summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-08 21:25:11 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-08 21:25:11 +0800
commit1ef1fe4d34d71e9488b01f2cd8f9b9d06482392b (patch)
treec5e3b73404f70a6b71d6630150008c07b3862b3a /include
parentf09589e00925a3d9a03105ca5ff3717120acc853 (diff)
downloadpttbbs-1ef1fe4d34d71e9488b01f2cd8f9b9d06482392b.tar
pttbbs-1ef1fe4d34d71e9488b01f2cd8f9b9d06482392b.tar.gz
pttbbs-1ef1fe4d34d71e9488b01f2cd8f9b9d06482392b.tar.bz2
pttbbs-1ef1fe4d34d71e9488b01f2cd8f9b9d06482392b.tar.lz
pttbbs-1ef1fe4d34d71e9488b01f2cd8f9b9d06482392b.tar.xz
pttbbs-1ef1fe4d34d71e9488b01f2cd8f9b9d06482392b.tar.zst
pttbbs-1ef1fe4d34d71e9488b01f2cd8f9b9d06482392b.zip
- (internal) add some Maple-3 API interface to help porting
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4099 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'include')
-rw-r--r--include/common.h3
-rw-r--r--include/proto.h17
2 files changed, 12 insertions, 8 deletions
diff --git a/include/common.h b/include/common.h
index d448e96b..1086a796 100644
--- a/include/common.h
+++ b/include/common.h
@@ -15,7 +15,7 @@
#define FN_REJECT "reject"
#define FN_WATER "water"
#define FN_CANVOTE "can_vote"
-#define FN_VISABLE "visable"
+#define FN_VISABLE "visable" // 不知道是誰拼錯的,將錯就錯吧...
#define FN_USIES "usies" /* BBS log */
#define FN_DIR ".DIR"
#define FN_BOARD ".BRD" /* board list */
@@ -128,6 +128,7 @@
#define DOECHO 1
#define LCECHO 2
#define NUMECHO 4
+#define GCARRY 8 // (from M3) do not empty input buffer.
#define YEA 1 /* Booleans (Yep, for true and false) */
#define NA 0
diff --git a/include/proto.h b/include/proto.h
index 96fccf76..e68c638d 100644
--- a/include/proto.h
+++ b/include/proto.h
@@ -325,20 +325,23 @@ int guess_main(void);
void set_converting_type(int which);
/* io */
-int getdata(int line, int col, const char *prompt, char *buf, int len, int echo);
int igetch(void);
+int num_in_buf(void);
int wait_input(float f, int bIgnoreBuf);
int peek_input(float f, int c);
+int input_isfull();
void drop_input(void);
+void add_io(int fd, int timeout);
+int getdata(int line, int col, const char *prompt, char *buf, int len, int echo);
int getdata_str(int line, int col, const char *prompt, char *buf, int len, int echo, const char *defaultstr);
int getdata_buf(int line, int col, const char *prompt, char *buf, int len, int echo);
-void add_io(int fd, int timeout);
-void oflush(void);
-int oldgetdata(int line, int col, const char *prompt, char *buf, int len, int echo);
-void output(const char *s, int len);
-int num_in_buf(void);
-int input_isfull();
int ochar(int c);
+void output(const char *s, int len);
+void oflush(void);
+// maple 3 API
+int vget(int line, int col, const char *prompt, char *buf, int len, int mode);
+// int vkey(void); // P.S: in PTT system the vkey() is just alias to igetch().
+#define vkey() igetch()
/* kaede */
char *Ptt_prints(char *str, size_t size, int mode);