diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-12-17 18:30:52 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-12-17 18:30:52 +0800 |
commit | d9108233ecee950fcc9aa1f0599f28adfd204537 (patch) | |
tree | 709e2f6db13c9f43ee8ac5a7f9ce226834ba8965 /mbbsd/screen.c | |
parent | 3fb29022e04342c0a6c9112d578f44ae736c7e00 (diff) | |
download | pttbbs-d9108233ecee950fcc9aa1f0599f28adfd204537.tar pttbbs-d9108233ecee950fcc9aa1f0599f28adfd204537.tar.gz pttbbs-d9108233ecee950fcc9aa1f0599f28adfd204537.tar.bz2 pttbbs-d9108233ecee950fcc9aa1f0599f28adfd204537.tar.lz pttbbs-d9108233ecee950fcc9aa1f0599f28adfd204537.tar.xz pttbbs-d9108233ecee950fcc9aa1f0599f28adfd204537.tar.zst pttbbs-d9108233ecee950fcc9aa1f0599f28adfd204537.zip |
edit: exp - upload file
screen/grayout: add bold out option (-1)
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3702 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/screen.c')
-rw-r--r-- | mbbsd/screen.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mbbsd/screen.c b/mbbsd/screen.c index 853d3110..941ad015 100644 --- a/mbbsd/screen.c +++ b/mbbsd/screen.c @@ -608,7 +608,7 @@ standend(void) } // level: -// -1 - black (not implemented) +// -1 - bold out // 0 - dark text // 1 - text // 2 - no highlight (not implemented) @@ -661,13 +661,15 @@ grayout_lines(int y, int end, int level) switch(level) { case 0: // dark text + case -1:// bold text // basically, in current system slp->data will // not exceed t_columns. buffer overflow is impossible. // but to make it more robust, let's quick check here. // of course, t_columns should always be far smaller. if (strlen((char*)slp->data) > t_columns) slp->data[t_columns] = 0; - strcpy((char*)slp->data, ANSI_COLOR(1;30;40)); + strcpy((char*)slp->data, + level < 0 ? ANSI_COLOR(1) : ANSI_COLOR(1;30;40)); strcat((char*)slp->data, buf); strcat((char*)slp->data, ANSI_RESET ANSI_CLRTOEND); slp->len = strlen((char*)slp->data); |