summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-26 23:28:24 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-26 23:28:24 +0800
commit4b502e05397babe1c8050adb99c2f3e1ebcce641 (patch)
tree728b6c056cdbb67dc8579b5d789a967c1ad9858e /include
parentc144625766bb0db3b3f0bc5718fbe55d356e449f (diff)
parenta08baf738de7959e912f5b12314da85eaea5a3c9 (diff)
downloadpttbbs-Ptt.read.tar
pttbbs-Ptt.read.tar.gz
pttbbs-Ptt.read.tar.bz2
pttbbs-Ptt.read.tar.lz
pttbbs-Ptt.read.tar.xz
pttbbs-Ptt.read.tar.zst
pttbbs-Ptt.read.zip
simplify thread() i_read() git-svn-id: http://opensvn.csie.org/pttbbs/branches/Ptt.read@1862 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'include')
-rw-r--r--include/config.h8
-rw-r--r--include/modes.h2
-rw-r--r--include/perm.h5
-rw-r--r--include/proto.h9
-rw-r--r--include/pttstruct.h9
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 {