summaryrefslogtreecommitdiffstats
path: root/mbbsd/stuff.c
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-24 04:49:16 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-24 04:49:16 +0800
commit77977eec595648e9143769c7993c65490b753b99 (patch)
treee3fa49665ab69c7ac59c11323044dd6d545b8f26 /mbbsd/stuff.c
parentda56c5ed1f424f78040d2bd7f11833978eeb46b8 (diff)
downloadpttbbs-77977eec595648e9143769c7993c65490b753b99.tar
pttbbs-77977eec595648e9143769c7993c65490b753b99.tar.gz
pttbbs-77977eec595648e9143769c7993c65490b753b99.tar.bz2
pttbbs-77977eec595648e9143769c7993c65490b753b99.tar.lz
pttbbs-77977eec595648e9143769c7993c65490b753b99.tar.xz
pttbbs-77977eec595648e9143769c7993c65490b753b99.tar.zst
pttbbs-77977eec595648e9143769c7993c65490b753b99.zip
modify a little for vmsg
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1837 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/stuff.c')
-rw-r--r--mbbsd/stuff.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/mbbsd/stuff.c b/mbbsd/stuff.c
index 605e8cd3..fc2ce69d 100644
--- a/mbbsd/stuff.c
+++ b/mbbsd/stuff.c
@@ -439,14 +439,15 @@ getans(const char *fmt,...)
int
vmsg(const char *fmt,...)
{
- char msg[80] = "\033[1;36;44m ◆ ", i;
+ char msg[128] = "\033[1;36;44m ◆ ", i;
va_list ap;
va_start(ap, fmt);
- vsnprintf(msg+14, 55, fmt, ap);
+ i = vsnprintf(msg+14, 100, fmt, ap);
va_end(ap);
- for(i=69; i>0 && *(msg+i+1); i--)
+ for(; i<69; i++)
*(msg+i) = ' ';
- strcat(msg+69,"\033[33;46m \033[200m\033[1431m\033[506m[請按任意鍵繼續]\033[201m \033[m");
+ strcat(msg+69,
+ "\033[33;46m \033[200m\033[1431m\033[506m[請按任意鍵繼續]\033[201m \033[m");
return vmsg_lines(b_lines, msg);
}