diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-12 10:53:08 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-12 10:53:08 +0800 |
commit | 04968c798f26073ff0779560051f46c4f5da0fb9 (patch) | |
tree | f6ad48dd027be7d6c96cc8bb73e5c78454eea3aa /mbbsd | |
parent | 1e47c1b50c691374edc30281c51a2ea48a5383fa (diff) | |
download | pttbbs-04968c798f26073ff0779560051f46c4f5da0fb9.tar pttbbs-04968c798f26073ff0779560051f46c4f5da0fb9.tar.gz pttbbs-04968c798f26073ff0779560051f46c4f5da0fb9.tar.bz2 pttbbs-04968c798f26073ff0779560051f46c4f5da0fb9.tar.lz pttbbs-04968c798f26073ff0779560051f46c4f5da0fb9.tar.xz pttbbs-04968c798f26073ff0779560051f46c4f5da0fb9.tar.zst pttbbs-04968c798f26073ff0779560051f46c4f5da0fb9.zip |
- name: improve space complete response
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4141 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/Makefile | 1 | ||||
-rw-r--r-- | mbbsd/name.c | 19 |
2 files changed, 13 insertions, 7 deletions
diff --git a/mbbsd/Makefile b/mbbsd/Makefile index 4bfb9e6f..749dd32f 100644 --- a/mbbsd/Makefile +++ b/mbbsd/Makefile @@ -122,6 +122,7 @@ ctags: ctags *.c ../include/*.h ../common/sys/*.c ../common/bbs/*.c test: $(PROG) + killall -TERM testmbbsd || true killall -9 testmbbsd || true cp mbbsd testmbbsd ./testmbbsd 9000 diff --git a/mbbsd/name.c b/mbbsd/name.c index 4e9d7134..59c9c471 100644 --- a/mbbsd/name.c +++ b/mbbsd/name.c @@ -2,11 +2,18 @@ #include "bbs.h" static word_t *current = NULL; -static char * const msg_more = "-- More --"; typedef char (*arrptr)[]; /* name complete for user ID */ +static void +prompt_more() +{ + move(b_lines, 0); clrtoeol(); + outs(ANSI_COLOR(1;36;44)); + prints("%-*s" ANSI_RESET, t_columns-2, " ◆ 按空白鍵可列出更多項目 "); +} + //----------------------------------------------------------------------- void NameList_init(struct NameList *self) @@ -476,7 +483,7 @@ namecomplete(const char *prompt, char *data) len = MaxLen(morelist, p_lines); } if (morelist) { - vmsg(msg_more); + prompt_more(); } continue; } @@ -601,7 +608,7 @@ namecomplete2(struct NameList *namelist, const char *prompt, char *data) len = NameList_MaxLen(&sublist, viewoffset, p_lines); } if (viewoffset < NameList_length(&sublist)) { - vmsg(msg_more); + prompt_more(); } continue; } @@ -791,9 +798,7 @@ usercomplete(const char *prompt, char *data) len = UserMaxLen((arrptr) cwlist, cwnum, morenum, p_lines); } if (morenum < cwnum) { - move(b_lines, 0); clrtoeol(); - outs(msg_more); - // vmsg(msg_more); + prompt_more(); } else morenum = 0; @@ -969,7 +974,7 @@ generalnamecomplete(const char *prompt, char *data, int len, size_t nmemb, col += len + 2; } if (morelist != end + 1) { - vmsg(msg_more); + prompt_more(); } continue; |