diff options
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/menu.c | 2 | ||||
-rw-r--r-- | mbbsd/stuff.c | 18 | ||||
-rw-r--r-- | mbbsd/xyz.c | 2 |
3 files changed, 15 insertions, 7 deletions
diff --git a/mbbsd/menu.c b/mbbsd/menu.c index 778f10d0..7bf56748 100644 --- a/mbbsd/menu.c +++ b/mbbsd/menu.c @@ -477,7 +477,7 @@ domenu(int cmdmode, const char *cmdtitle, int cmd, const commands_t cmdtable[]) /* INDENT OFF */ // ----------------------------------------------------------- MENU DEFINITION -// 注意每個 menu 最多不能同時顯示超過 11 項 (80x25 標準大小的限制) +// 注意每個 menu 最多不能同時顯示超過 11 項 (80x24 標準大小的限制) /* administrator's maintain menu */ static const commands_t adminlist[] = { diff --git a/mbbsd/stuff.c b/mbbsd/stuff.c index 9d05843e..a18e7989 100644 --- a/mbbsd/stuff.c +++ b/mbbsd/stuff.c @@ -170,10 +170,10 @@ wait_penalty(int sec) /** * 從第 y 列開始 show 出 filename 檔案中的前 lines 行。 * mode 為 output 的模式,參數同 strip_ansi。 - * @param filename - * @param x - * @param lines - * @param mode: SHOWFILE_*, see modes.h + * @param filename: the file to show + * @param y: starting line on screen + * @param lines: max lines to be displayed + * @param mode: SHOWFILE_*, see modes.h * @return 失敗傳回 0,否則為 1。 * 2 表示有 PttPrints 碼 */ @@ -181,7 +181,7 @@ int show_file(const char *filename, int y, int lines, int mode) { FILE *fp; - char buf[1024]; + char buf[ANSILINELEN]; int ret = 1; int strpmode = STRIP_ALL; @@ -220,6 +220,14 @@ show_file(const char *filename, int y, int lines, int mode) return ret; } +int +show_80x24_screen(const char *filename) +{ + clear(); + // max 24 lines, holding one more line for pause/messages + return show_file(filename, 0, 24, SHOWFILE_ALLOW_ALL); +} + // TODO // move this function to visio.c or visio.c int diff --git a/mbbsd/xyz.c b/mbbsd/xyz.c index e62e4b66..badddf1d 100644 --- a/mbbsd/xyz.c +++ b/mbbsd/xyz.c @@ -276,7 +276,7 @@ Goodbye(void) clear(); - more("etc/Logout", NA); + show_80x24_screen("etc/Logout"); { int diff = (now - login_start_time) / 60; |