diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-19 09:35:03 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-19 09:35:03 +0800 |
commit | 079854fba142e7c5d52293c88e9fba8aa51dfa0c (patch) | |
tree | 15764b4b412b6695097254c2bd02905118aadcc2 /mbbsd | |
parent | f51f81cd5d73c514205752d736af5c006f3771e5 (diff) | |
download | pttbbs-079854fba142e7c5d52293c88e9fba8aa51dfa0c.tar pttbbs-079854fba142e7c5d52293c88e9fba8aa51dfa0c.tar.gz pttbbs-079854fba142e7c5d52293c88e9fba8aa51dfa0c.tar.bz2 pttbbs-079854fba142e7c5d52293c88e9fba8aa51dfa0c.tar.lz pttbbs-079854fba142e7c5d52293c88e9fba8aa51dfa0c.tar.xz pttbbs-079854fba142e7c5d52293c88e9fba8aa51dfa0c.tar.zst pttbbs-079854fba142e7c5d52293c88e9fba8aa51dfa0c.zip |
- menu: simple Ctrl-Z nav
- admin: offset-by-one? (not sure...)
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4197 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/admin.c | 3 | ||||
-rw-r--r-- | mbbsd/menu.c | 27 |
2 files changed, 29 insertions, 1 deletions
diff --git a/mbbsd/admin.c b/mbbsd/admin.c index e22ad368..6b95e5bd 100644 --- a/mbbsd/admin.c +++ b/mbbsd/admin.c @@ -145,7 +145,8 @@ search_key_user(const char *passwdfile, int mode) } vs_hdr(key); - while ((fread(&user, sizeof(user), 1, fp1)) > 0 && unum++ <= MAX_USERS) { + // <= or < ? I'm not sure... + while ((fread(&user, sizeof(user), 1, fp1)) > 0 && unum++ < MAX_USERS) { // skip empty records if (!user.userid[0]) diff --git a/mbbsd/menu.c b/mbbsd/menu.c index 774d41e9..1a0db144 100644 --- a/mbbsd/menu.c +++ b/mbbsd/menu.c @@ -252,6 +252,33 @@ domenu(int cmdmode, const char *cmdtitle, int cmd, const commands_t cmdtable[]) do { i = -1; switch (cmd) { + case Ctrl('Z'): // simple quick nav + vs_footer(" 快速切換 ", + " (b)文章列表 (c)分類看板 (f)我的最愛 (m)信箱 (u)使用者名單"); + refscreen = 1; + switch(vkey()) { + case 'b': case 'B': + Read(); + break; + case 'c': case 'C': + Class(); + break; + case 'f': case 'F': + Favorite(); + break; + case 'm': case 'M': + m_read(); + break; + case 'u': case 'U': + t_users(); + break; + default: + show_status(); + refscreen = 0; + break; + } + i = lastcmdptr; + break; case Ctrl('I'): t_idle(); refscreen = YEA; |