diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-09-07 03:52:57 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-09-07 03:52:57 +0800 |
commit | fc05c7ec6b8d7bbd2fbad6426c2e5d23994aea0b (patch) | |
tree | f3f43d69f0b65589a931b98a634e3b27d2c5d136 /mbbsd/cal.c | |
parent | bc3952ec2fcbddd3c4820f21c8490ccd8c728a1d (diff) | |
download | pttbbs-fc05c7ec6b8d7bbd2fbad6426c2e5d23994aea0b.tar pttbbs-fc05c7ec6b8d7bbd2fbad6426c2e5d23994aea0b.tar.gz pttbbs-fc05c7ec6b8d7bbd2fbad6426c2e5d23994aea0b.tar.bz2 pttbbs-fc05c7ec6b8d7bbd2fbad6426c2e5d23994aea0b.tar.lz pttbbs-fc05c7ec6b8d7bbd2fbad6426c2e5d23994aea0b.tar.xz pttbbs-fc05c7ec6b8d7bbd2fbad6426c2e5d23994aea0b.tar.zst pttbbs-fc05c7ec6b8d7bbd2fbad6426c2e5d23994aea0b.zip |
clean up
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1166 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/cal.c')
-rw-r--r-- | mbbsd/cal.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/mbbsd/cal.c b/mbbsd/cal.c index 89383f99..fceaf2b1 100644 --- a/mbbsd/cal.c +++ b/mbbsd/cal.c @@ -118,9 +118,7 @@ osong(char *defaultid) } move(12, 0); clrtobot(); - snprintf(buf, sizeof(buf), - "親愛的 %s 歡迎來到歐桑自動點歌系統\n", cuser.userid); - outs(buf); + prints("親愛的 %s 歡迎來到歐桑自動點歌系統\n", cuser.userid); trans_buffer[0] = 0; if (!defaultid) { getdata(13, 0, "要點給誰呢:[可直接按 Enter 先選歌]", @@ -174,12 +172,12 @@ osong(char *defaultid) "◇ %s 點給 %s ", (ano[0] == 'y') ? "匿名者" : cuser.userid, destid); - while (fgets(buf, 200, fp)) { + while (fgets(buf, sizeof(buf), fp)) { char *po; if (!strncmp(buf, "標題: ", 6)) { clear(); move(10, 10); - prints("%s", buf); + outs(buf); pressanykey(); fclose(fp); fclose(fp1); @@ -313,9 +311,7 @@ p_exmail() int n; if (cuser.exmailbox >= MAX_EXKEEPMAIL) { - snprintf(buf, sizeof(buf), - "容量最多增加 %d 封,不能再買了。", MAX_EXKEEPMAIL); - outs(buf); + prints("容量最多增加 %d 封,不能再買了。", MAX_EXKEEPMAIL); refresh(); return 0; } @@ -477,11 +473,11 @@ cal() float a = 0; char flo = 0, ch = 0; char mode[6] = {' ', '=', '+', '-', '*', '/'}, cmode = 0; - char buf[100] = "[ 0] [ ] ", b[20] = "0"; + char b[20] = "0"; move(b_lines - 1, 0); clrtoeol(); - outs(buf); + outs("[ 0] [ ] "); move(b_lines, 0); clrtoeol(); outs("\033[44m 小計算機 \033[31;47m (0123456789+-*/=) " @@ -502,8 +498,7 @@ cal() b[0] = '0'; b[1] = 0; move(b_lines - 1, 0); - snprintf(buf, sizeof(buf), "[%13.2f] [%c] ", a, ch); - outs(buf); + prints("[%13.2f] [%c] ", a, ch); break; case '.': if (!flo) @@ -527,8 +522,7 @@ cal() else b[0] = ch; move(b_lines - 1, 0); - snprintf(buf, sizeof(buf), "[%13s] [%c]", b, mode[(int)cmode]); - outs(buf); + prints("[%13s] [%c]", b, mode[(int)cmode]); break; case 'q': return 0; |