From 1778077b86c072bc7be502d0746a0b20aba5a947 Mon Sep 17 00:00:00 2001 From: victor Date: Sat, 22 Nov 2003 02:17:30 +0000 Subject: missing commit, and add '/help' prompt to chatroom git-svn-id: http://opensvn.csie.org/pttbbs/trunk@1357 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- pttbbs/include/fav.h | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++ pttbbs/mbbsd/chat.c | 2 ++ 2 files changed, 58 insertions(+) create mode 100644 pttbbs/include/fav.h diff --git a/pttbbs/include/fav.h b/pttbbs/include/fav.h new file mode 100644 index 00000000..5e34189d --- /dev/null +++ b/pttbbs/include/fav.h @@ -0,0 +1,56 @@ + +#define FAVT_BOARD 1 +#define FAVT_FOLDER 2 +#define FAVT_LINE 3 + +#define FAVH_FAV 1 +#define FAVH_TAG 2 +#define FAVH_UNREAD 4 + +#define TRUE 1 +#define FALSE 0 + +#define FAV_PRE_ALLOC 8 +#define FAV_MAXDEPTH 5 +#define MAX_FAV 1024 +#define MAX_LINE 64 +#define MAX_FOLDER 64 + +#define FAV3 ".fav3" +#define FAV4 ".fav4" + +typedef struct { + char type; + char attr; + /* *fp could be *fav_board_t or *fav_folder_t. */ + void *fp; +} fav_type_t; + +typedef struct { + short nAllocs; + short DataTail; /* the tail of item list that user + have ever used */ + short nBoards; /* number of the boards */ + char nLines; /* number of the lines */ + char nFolders; /* number of the folders */ + char lineID; /* current max line id */ + char folderID; /* current max folder id */ + + fav_type_t *favh; /* record of boards/folders */ +} fav_t; + +typedef struct { + short bid; + time_t lastvisit; + char attr; +} fav_board_t; + +typedef struct { + char fid; + char title[BTLEN + 1]; + fav_t *this_folder; +} fav_folder_t; + +typedef struct { + char lid; +} fav_line_t; diff --git a/pttbbs/mbbsd/chat.c b/pttbbs/mbbsd/chat.c index 11988f9f..6090c246 100644 --- a/pttbbs/mbbsd/chat.c +++ b/pttbbs/mbbsd/chat.c @@ -374,6 +374,8 @@ t_chat() move(STOP_LINE, 0); outs(msg_seperator); + move(STOP_LINE, 60); + outs(" /help ¬d¸ß«ü¥O "); move(1, 0); outs(msg_seperator); print_chatid(chatid); -- cgit v1.2.3