From c5495b165a64835eef37dff6c010af89499bf2a2 Mon Sep 17 00:00:00 2001 From: kcwu Date: Sun, 28 Aug 2005 04:49:12 +0000 Subject: 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 --- include/proto.h | 2 +- include/pttstruct.h | 7 ++++++- 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 */ -- cgit v1.2.3