summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-08-28 12:49:12 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-08-28 12:49:12 +0800
commitc5495b165a64835eef37dff6c010af89499bf2a2 (patch)
treed24e1261a67a272055796f44862ebfe8b53bffbf /include
parentf6172d5bc668be2372fcb23d5c05e7f70f9af201 (diff)
downloadpttbbs-c5495b165a64835eef37dff6c010af89499bf2a2.tar
pttbbs-c5495b165a64835eef37dff6c010af89499bf2a2.tar.gz
pttbbs-c5495b165a64835eef37dff6c010af89499bf2a2.tar.bz2
pttbbs-c5495b165a64835eef37dff6c010af89499bf2a2.tar.lz
pttbbs-c5495b165a64835eef37dff6c010af89499bf2a2.tar.xz
pttbbs-c5495b165a64835eef37dff6c010af89499bf2a2.tar.zst
pttbbs-c5495b165a64835eef37dff6c010af89499bf2a2.zip
distinguish functions that need item or not, and allow the latter in empty itemlist.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3098 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'include')
-rw-r--r--include/proto.h2
-rw-r--r--include/pttstruct.h7
2 files changed, 7 insertions, 2 deletions
diff --git a/include/proto.h b/include/proto.h
index 2ed3890f..7a33212b 100644
--- a/include/proto.h
+++ b/include/proto.h
@@ -72,7 +72,7 @@ int Select(void);
void do_reply_title(int row, const char *title);
void outgo_post(const fileheader_t *fh, const char *board, const char *userid, const char *username);
int edit_title(int ent, fileheader_t *fhdr, const char *direct);
-int whereami(int ent, const fileheader_t *fhdr, const char *direct);
+int whereami(void);
void set_board(void);
int do_post(void);
void ReadSelect(void);
diff --git a/include/pttstruct.h b/include/pttstruct.h
index 53c34cd0..8a33b22b 100644
--- a/include/pttstruct.h
+++ b/include/pttstruct.h
@@ -431,7 +431,12 @@ typedef struct {
/* Used to pass commands to the readmenu.
* direct mapping, indexed by ascii code. */
#define onekey_size ((int) 'z')
-typedef int (* onekey_t)();
+/* keymap, 若 needitem = 0 表示不需要 item, func 的 type 應為 int (*)(void).
+ * 否則應為 int (*)(int ent, const fileheader_t *fhdr, const char *direct) */
+typedef struct {
+ char needitem;
+ int (*func)();
+} onekey_t;
#define ANSILINELEN (511) /* Maximum Screen width in chars */