diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-13 00:48:34 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-13 00:48:34 +0800 |
commit | 050df9b137cf1be6876e551a5a98c1038be73b50 (patch) | |
tree | 104fef52b1ca6b95ae3be806f02540d056cd93f0 /mbbsd/bbs.c | |
parent | 30b08ca27e39588cde705a96381a9643d534351e (diff) | |
download | pttbbs-050df9b137cf1be6876e551a5a98c1038be73b50.tar pttbbs-050df9b137cf1be6876e551a5a98c1038be73b50.tar.gz pttbbs-050df9b137cf1be6876e551a5a98c1038be73b50.tar.bz2 pttbbs-050df9b137cf1be6876e551a5a98c1038be73b50.tar.lz pttbbs-050df9b137cf1be6876e551a5a98c1038be73b50.tar.xz pttbbs-050df9b137cf1be6876e551a5a98c1038be73b50.tar.zst pttbbs-050df9b137cf1be6876e551a5a98c1038be73b50.zip |
- visio: add vbar and varf, better l-r API.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4148 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/bbs.c')
-rw-r--r-- | mbbsd/bbs.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index f7e3d49f..5baf189e 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -402,9 +402,11 @@ readtitle(void) { boardheader_t *bp; char *brd_title; + char buf[32]; assert(0<=currbid-1 && currbid-1<MAX_BOARD); bp = getbcache(currbid); + if(bp->bvote != 2 && bp->bvote) brd_title = "本看板進行投票中"; else @@ -412,23 +414,18 @@ readtitle(void) showtitle(currBM, brd_title); outs("[←]離開 [→]閱\讀 [^P]發表文章 [d]刪除 [z]精華區 [i]看板資訊/設定 [h]說明\n"); - prints(ANSI_COLOR(7) " 編號 %s 作 者 文 章 標 題", - IS_LISTING_MONEY ? listmode_desc[LISTMODE_MONEY] : listmode_desc[currlistmode]); + buf[0] = 0; #ifdef USE_COOLDOWN - if ( bp->brdattr & BRD_COOLDOWN && - !((currmode & MODE_BOARD) || HasUserPerm(PERM_SYSOP))) - outslr("", 44, ANSI_RESET, 0); - else + if (!(bp->brdattr & BRD_COOLDOWN)) #endif { - char buf[32]; - assert(0<=currbid-1 && currbid-1<MAX_BOARD); - sprintf(buf, "人氣:%d ", - SHM->bcache[currbid - 1].nuser); - outslr("", 44, buf, -1); - outs(ANSI_RESET); + snprintf(buf, sizeof(buf), "人氣:%d ", SHM->bcache[currbid - 1].nuser); } + + vbarf(ANSI_COLOR(7) " 編號 %s 作 者 文 章 標 題\t%s ", + IS_LISTING_MONEY ? listmode_desc[LISTMODE_MONEY] : listmode_desc[currlistmode], + buf); } static void |