diff options
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/stuff.c | 4 | ||||
-rw-r--r-- | mbbsd/user.c | 7 |
2 files changed, 5 insertions, 6 deletions
diff --git a/mbbsd/stuff.c b/mbbsd/stuff.c index 28388960..7ffc4f92 100644 --- a/mbbsd/stuff.c +++ b/mbbsd/stuff.c @@ -436,10 +436,10 @@ char getans(char *prompt) int getkey(const char *fmt,...) { - char msg[256] = "\033[1;36;44m ◆ ", i; + char msg[256], i; va_list ap; va_start(ap, fmt); - i = vsnprintf(msg + 14, 100, fmt, ap); + i = vsnprintf(msg , 100, fmt, ap); va_end(ap); return vmsg_lines(b_lines, msg); } diff --git a/mbbsd/user.c b/mbbsd/user.c index 127de100..bd4ed6b8 100644 --- a/mbbsd/user.c +++ b/mbbsd/user.c @@ -23,7 +23,6 @@ u_loginview() { int i; unsigned int pbits = cuser.loginview; - char choice[5]; clear(); move(4, 0); @@ -32,9 +31,9 @@ u_loginview() loginview_file[i][1], ((pbits >> i) & 1 ? "ˇ" : "X")); clrtobot(); - while (getdata(b_lines - 1, 0, "請按 [A-N] 切換設定,按 [Return] 結束:", - choice, 3, LCECHO)) { - i = choice[0] - 'a'; + while ((i = getkey("請按 [A-N] 切換設定,按 [Return] 結束:"))!='\r') + { + i = i - 'a'; if (i >= NUMVIEWFILE || i < 0) bell(); else { |