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/mail.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/mail.c')
-rw-r--r-- | mbbsd/mail.c | 36 |
1 files changed, 13 insertions, 23 deletions
diff --git a/mbbsd/mail.c b/mbbsd/mail.c index 2f3ff920..1b05e801 100644 --- a/mbbsd/mail.c +++ b/mbbsd/mail.c @@ -984,33 +984,23 @@ static void mailtitle(void) { char buf[STRLEN]; - int msglen = 0; - - showtitle("郵件選單", BBSName); - prints("[←]離開[↑↓]選擇[→]閱\讀信件 [X]轉錄看板[F]轉寄站外 " - " [O]站外信:%s [h]求助\n" - ANSI_COLOR(7) " 編號 %s 作 者 信 件 標 題" - "", - REJECT_OUTTAMAIL ? ANSI_COLOR(31) "關" ANSI_RESET : "開", - (showmail_mode == SHOWMAIL_SUM) ? "大 小":"日 期"); - - /* 43 columns in length, used later. */ - buf[0] = 0; if (mailsumlimit) { - /* warning: snprintf returns length "if not limited". - * however if this case, they should be the same. */ - - msglen = snprintf(buf, sizeof(buf), - ANSI_COLOR(32) - " (容量:%d/%dk %d/%d篇) ", - mailsum, mailsumlimit, - mailkeep, mailmaxkeep); - msglen -= strlen(ANSI_COLOR(32)); + snprintf(buf, sizeof(buf), ANSI_COLOR(32) "(容量:%d/%dk %d/%d篇)", + mailsum, mailsumlimit, + mailkeep, mailmaxkeep); + } else { + snprintf(buf, sizeof(buf), ANSI_COLOR(32) "(大小:%dk %d篇)", + mailsum, mailkeep); } - outslr("", 44, buf, msglen); - outs(ANSI_RESET); + + showtitle("郵件選單", BBSName); + outs("[←]離開[↑↓]選擇[→]閱\讀信件 [X]轉錄看板[F]轉寄站外 "); + prints(" [O]站外信:%s [h]求助\n" , REJECT_OUTTAMAIL ? ANSI_COLOR(31) "關" ANSI_RESET : "開"); + vbarf(ANSI_COLOR(7) " 編號 %s 作 者 信 件 標 題\t%s ", + (showmail_mode == SHOWMAIL_SUM) ? "大 小":"日 期", + buf); } static void |