From e443776eb7025c569df22f801965f0ec84798e35 Mon Sep 17 00:00:00 2001 From: jack Date: Sun, 2 May 2004 21:58:08 +0000 Subject: merge trunk to branches and corrected confliction git-svn-id: http://opensvn.csie.org/pttbbs/branches/Jaky.i18n@1919 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- include/config.h | 2 +- include/modes.h | 26 +++++++++++++++----------- include/perm.h | 5 ++--- include/proto.h | 19 +++++++++++-------- include/pttstruct.h | 6 +++--- 5 files changed, 32 insertions(+), 26 deletions(-) (limited to 'include') diff --git a/include/config.h b/include/config.h index 8e280dbd..6ac1a261 100644 --- a/include/config.h +++ b/include/config.h @@ -34,7 +34,7 @@ #endif #ifndef LANG_FILE -#define LANG_FILE "lang.big5" /* 預設語言檔 */ +#define LANG_FILE {"lang.big5"} /* 預設語言檔 */ #endif #ifndef MAX_POST_MONEY /* 發表文章稿費的上限 */ diff --git a/include/modes.h b/include/modes.h index 16d23754..4c629f2f 100644 --- a/include/modes.h +++ b/include/modes.h @@ -13,7 +13,8 @@ #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 +#define HEADERS_RELOAD 13 /* user 操作狀態與模式 */ #define IDLE 0 @@ -128,21 +129,24 @@ #define RS_FORWARD 0x01 /* backward */ #define RS_TITLE 0x02 /* author/title */ -#define RS_RELATED 0x04 +#define RS_KEYWORD 0x04 #define RS_FIRST 0x08 /* find first article */ #define RS_CURRENT 0x10 /* match current read article */ -#define RS_THREAD 0x20 /* search the first article */ +#define RS_MARK 0x20 /* search the first article */ #define RS_AUTHOR 0x40 /* search author's article */ #define RS_NEWPOST 0x80 /* search new posts */ -#define CURSOR_FIRST (RS_RELATED | RS_TITLE | RS_FIRST) -#define CURSOR_NEXT (RS_RELATED | RS_TITLE | RS_FORWARD) -#define CURSOR_PREV (RS_RELATED | RS_TITLE) -#define RELATE_FIRST (RS_RELATED | RS_TITLE | RS_FIRST | RS_CURRENT) -#define RELATE_NEXT (RS_RELATED | RS_TITLE | RS_FORWARD | RS_CURRENT) -#define RELATE_PREV (RS_RELATED | RS_TITLE | RS_CURRENT) -#define THREAD_NEXT (RS_THREAD | RS_FORWARD) -#define THREAD_PREV (RS_THREAD) +#define CURSOR_FIRST (RS_TITLE | RS_FIRST) +#define CURSOR_NEXT (RS_TITLE | RS_FORWARD) +#define CURSOR_PREV (RS_TITLE) +#define RELATE_FIRST (RS_TITLE | RS_FIRST | RS_CURRENT) +#define RELATE_NEXT (RS_TITLE | RS_FORWARD | RS_CURRENT) +#define RELATE_PREV (RS_TITLE | RS_CURRENT) +#define NEWPOST_NEXT (RS_NEWPOST | RS_FORWARD) +#define NEWPOST_PREV (RS_NEWPOST) +#define AUTHOR_NEXT (RS_AUTHOR | RS_FORWARD) +#define AUTHOR_PREV (RS_AUTHOR) + enum {STRIP_ALL = 0, ONLY_COLOR, NO_RELOAD}; 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 9e9b70f7..a2e182c8 100644 --- a/include/proto.h +++ b/include/proto.h @@ -58,7 +58,6 @@ int Select(void); void do_reply_title(int row, char *title); int cmpfmode(fileheader_t *fhdr); int cmpfilename(fileheader_t *fhdr); -int getindex(char *fpath, char *fname, int size); void outgo_post(fileheader_t *fh, char *board); int edit_title(int ent, fileheader_t *fhdr, char *direct); int whereami(int ent, fileheader_t *fhdr, char *direct); @@ -102,7 +101,7 @@ void brc_addlist(const char* fname); #define moneyof(uid) SHM->money[uid - 1] #define getbtotal(bid) SHM->total[bid - 1] #define getbottomtotal(bid) SHM->n_bottom[bid-1] - +void sort_bcache(void); int getuser(char *userid); void setuserid(int num, char *userid); int searchuser(char *userid); @@ -312,7 +311,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); @@ -353,7 +351,6 @@ void my_send(char *uident); void show_call_in(int save, int which); void write_request (int sig); void log_usies(char *mode, char *mesg); -void log_user(char *msg); void system_abort(void); void abort_bbs(int sig); void del_distinct(char *fname, char *line); @@ -444,6 +441,8 @@ int apply_record(char *fpath, int (*fptr)(), int size); int search_rec(char* dirname, int (*filecheck)()); int append_record_forward(char *fpath, fileheader_t *record, int size); int get_sum_records(char* fpath, int size); +int substitute_ref_record(char* direct, fileheader_t *fhdr, int ent); +int getindex(char *fpath, fileheader_t *fh, int start); /* register */ int getnewuserid(void); @@ -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,15 @@ 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); +int log_user(const char *fmt, ...); 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); +char getans(const char *fmt,...); +int getkey(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); @@ -493,7 +496,7 @@ void sethomepath(char *buf, char *userid); void sethomedir(char *buf, char *userid); char *Cdate(time_t *clock); void sethomefile(char *buf, char *userid, char *fname); -int log_file(char *filename, char *buf, int flags); +int log_file(char *fn, int ifcreate, const char *fmt,...); void str_lower(char *t, char *s); int strstr_lower(char *str, char *tag); int cursor_key(int row, int column); diff --git a/include/pttstruct.h b/include/pttstruct.h index 7b7ffc28..2c989e88 100644 --- a/include/pttstruct.h +++ b/include/pttstruct.h @@ -428,9 +428,9 @@ typedef struct { /* i18n(internationlization) */ char *i18nstr[MAX_LANG][MAX_STRING]; - char i18nstrbody[20 * MAX_LANG * MAX_STRING]; - /* Based on the statistis, we found the lengh of one string - is 20 bytes approximately. + char i18nstrbody[22 * MAX_LANG * MAX_STRING]; + /* Based on the statistics, we found the lengh of one string + is 22 bytes approximately. */ } SHM_t; -- cgit v1.2.3