diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-09-08 13:33:38 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-09-08 13:33:38 +0800 |
commit | a6f6f4baddbdaf0979ccdfe47f5710797df1bb55 (patch) | |
tree | 49787a00dc48c9220fd8ccca1a60cb2603013092 /mbbsd/stuff.c | |
parent | f6fabc3faa9e9886cdfd21899bc11544e3c8c131 (diff) | |
download | pttbbs-a6f6f4baddbdaf0979ccdfe47f5710797df1bb55.tar pttbbs-a6f6f4baddbdaf0979ccdfe47f5710797df1bb55.tar.gz pttbbs-a6f6f4baddbdaf0979ccdfe47f5710797df1bb55.tar.bz2 pttbbs-a6f6f4baddbdaf0979ccdfe47f5710797df1bb55.tar.lz pttbbs-a6f6f4baddbdaf0979ccdfe47f5710797df1bb55.tar.xz pttbbs-a6f6f4baddbdaf0979ccdfe47f5710797df1bb55.tar.zst pttbbs-a6f6f4baddbdaf0979ccdfe47f5710797df1bb55.zip |
name complete enhanced
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3140 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/stuff.c')
-rw-r--r-- | mbbsd/stuff.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/mbbsd/stuff.c b/mbbsd/stuff.c index f5ecafa3..1c6c3941 100644 --- a/mbbsd/stuff.c +++ b/mbbsd/stuff.c @@ -812,25 +812,29 @@ cursor_key(int row, int column) } void -printdash(const char *mesg) +printdash(const char *mesg, int msglen) { int head = 0, tail; + if(msglen <= 0) + msglen = strlen(mesg); + if (mesg) - head = (strlen(mesg) + 1) >> 1; + head = (msglen + 1) >> 1; tail = head; - while (head++ < 38) + while (head++ < t_columns/2-2) outc('-'); if (tail) { outc(' '); - outs(mesg); + if(mesg) outs(mesg); outc(' '); } - while (tail++ < 38) + while (tail++ < t_columns/2-2) outc('-'); + outc('\n'); } |