diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/config.h | 8 | ||||
| -rw-r--r-- | include/modes.h | 2 | ||||
| -rw-r--r-- | include/perm.h | 5 | ||||
| -rw-r--r-- | include/proto.h | 9 | ||||
| -rw-r--r-- | include/pttstruct.h | 9 | 
5 files changed, 25 insertions, 8 deletions
diff --git a/include/config.h b/include/config.h index d44ce8a0..5f9a5a73 100644 --- a/include/config.h +++ b/include/config.h @@ -25,6 +25,14 @@  #define MAX_CPULOAD       (70)           /* CPU 最高load */  #endif +#ifndef MAX_LANG +#define MAX_LANG          (1)			 /* 最多使用語言 */ +#endif + +#ifndef MAX_STRING +#define MAX_STRING        (8000)         /* 系統最多使用字串 */ +#endif +  #ifndef MAX_POST_MONEY                      /* 發表文章稿費的上限 */  #define MAX_POST_MONEY     100  #endif diff --git a/include/modes.h b/include/modes.h index 16d23754..1a180055 100644 --- a/include/modes.h +++ b/include/modes.h @@ -13,7 +13,7 @@  #define READ_REDRAW     9  #define PART_REDRAW     10  #define TITLE_REDRAW    11 -#define POS_NEXT        101     /* cursor_pos(locmem, locmem->crs_ln + 1, 1);*/ +#define READ_SKIP       12        /* user 操作狀態與模式 */  #define IDLE            0 diff --git a/include/perm.h b/include/perm.h index 2d676bae..02c03d0f 100644 --- a/include/perm.h +++ b/include/perm.h @@ -11,7 +11,7 @@  #define PERM_CLOAK        000000000100 /* 目前隱形中     */  #define PERM_SEECLOAK     000000000200 /* 看見忍者       */  #define PERM_XEMPT        000000000400 /* 永久保留帳號   */ -#define PERM_DENYPOST     000000001000 /* 站長隱身術     */ +#define PERM_SYSOPHIDE    000000001000 /* 站長隱身術     */  #define PERM_BM           000000002000 /* 板主           */  #define PERM_ACCOUNTS     000000004000 /* 帳號總管       */  #define PERM_CHATROOM     000000010000 /* 聊天室總管     */ @@ -51,8 +51,7 @@  #define HAS_PERM(x)     ((x) ? cuser.userlevel & (x) : 1)  #define HAVE_PERM(x)    (cuser.userlevel&(x)) -#define PERM_HIDE(u)    ((u)->userlevel & PERM_SYSOP && \ -			 (u)->userlevel & PERM_DENYPOST) +#define PERM_HIDE(u)    (u && (u)->userlevel & PERM_SYSOPHIDE)  #define IS_BOARD(bptr)   ((bptr)->brdname[0] && \                            !((bptr)->brdattr & BRD_GROUPBOARD)) diff --git a/include/proto.h b/include/proto.h index b3fed5a6..01593227 100644 --- a/include/proto.h +++ b/include/proto.h @@ -312,7 +312,6 @@ void init_alarm(void);  int num_in_buf(void);  int ochar(int c);  int rget(int x,char *prompt); -char getans(char *prompt);  /* kaede */  int Rename(char* src, char* dst); @@ -454,13 +453,13 @@ void check_register(void);  char *genpasswd(char *pw);  /* screen */ +void mouts(int y, int x, char *str);  void move(int y, int x);  void outs(char *str);  void clrtoeol(void);  void clear(void);  void refresh(void);  void clrtobot(void); -void mprints(int y, int x, char *str);  void outmsg(char *msg);  void region_scroll_up(int top, int bottom);  void outc(unsigned char ch); @@ -480,11 +479,13 @@ void out_lines(char *str, int line);  #define isprint2(ch) ((ch & 0x80) || isprint(ch))  #define not_alpha(ch) (ch < 'A' || (ch > 'Z' && ch < 'a') || ch > 'z')  #define not_alnum(ch) (ch < '0' || (ch > '9' && ch < 'A') || (ch > 'Z' && ch < 'a') || ch > 'z') +#define pressanykey() vmsg_lines(b_lines, NULL) +int vmsg_lines(int lines, const char *msg);  time_t gettime(int line, time_t dt, char* head);  void setcalfile(char *buf, char *userid);  void stand_title(char *title); -void pressanykey(void); -int  vmsg (const char *fmt,...) GCC_CHECK_FORMAT(1,2); +int getans(const char *fmt,...) GCC_CHECK_FORMAT(1,2); +int vmsg(const char *fmt,...) GCC_CHECK_FORMAT(1,2);  void trim(char *buf);  void bell(void);  void setbpath(char *buf, char *boardname); diff --git a/include/pttstruct.h b/include/pttstruct.h index 80cef86c..eafc8636 100644 --- a/include/pttstruct.h +++ b/include/pttstruct.h @@ -424,6 +424,15 @@ typedef struct {      time_t  Fuptime;      time_t  Ftouchtime;      int     Fbusystate; + +#ifdef I18N     +    /* i18n(internationlization) */ +    char	*i18nstrptr[MAX_LANG][MAX_STRING]; +    char	i18nstrbody[16 * MAX_LANG * MAX_STRING];  +    	/* Based on the statistis, we found the lengh of one string +    	   is 16 bytes approximately. +    	*/ +#endif      } SHM_t;  typedef struct {  | 
