diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-12-20 12:16:27 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-12-20 12:16:27 +0800 |
commit | fbc5dde7a03e9272a3ef0d9cc2eb70ee50b1acc1 (patch) | |
tree | 0115024ce0ae06c7e304b9c5ae196e5954458803 /mbbsd/screen.c | |
parent | 3dff4118f19d96c1e38e0b6f2a6dc348de83ecae (diff) | |
download | pttbbs-fbc5dde7a03e9272a3ef0d9cc2eb70ee50b1acc1.tar pttbbs-fbc5dde7a03e9272a3ef0d9cc2eb70ee50b1acc1.tar.gz pttbbs-fbc5dde7a03e9272a3ef0d9cc2eb70ee50b1acc1.tar.bz2 pttbbs-fbc5dde7a03e9272a3ef0d9cc2eb70ee50b1acc1.tar.lz pttbbs-fbc5dde7a03e9272a3ef0d9cc2eb70ee50b1acc1.tar.xz pttbbs-fbc5dde7a03e9272a3ef0d9cc2eb70ee50b1acc1.tar.zst pttbbs-fbc5dde7a03e9272a3ef0d9cc2eb70ee50b1acc1.zip |
- grayout: API change, from [y,end) to [y,end]
- feature names change: now HAVE_GRAYOUT
- edit ask() changed to vmsg to prevent standout()
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3713 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/screen.c')
-rw-r--r-- | mbbsd/screen.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/mbbsd/screen.c b/mbbsd/screen.c index fa10e985..03f825c1 100644 --- a/mbbsd/screen.c +++ b/mbbsd/screen.c @@ -1,7 +1,7 @@ /* $Id$ */ #include "bbs.h" -#ifndef EXP_PFTERM +#if !defined(EXP_PFTERM) && !defined(HAVE_PFTERM) #define o_clear() output(clearbuf,clearbuflen) #define o_cleol() output(cleolbuf,cleolbuflen) @@ -523,7 +523,7 @@ standend(void) // 1 - text // 2 - no highlight (not implemented) void -grayout_lines(int y, int end, int level) +grayout(int y, int end, int level) { register screenline_t *slp = NULL; char buf[ANSILINELEN]; @@ -534,7 +534,7 @@ grayout_lines(int y, int end, int level) // TODO change to y <= end someday // loop lines - for (; y < end; y ++) + for (; y <= end; y ++) { // modify by scroll i = y + roll; @@ -571,8 +571,8 @@ grayout_lines(int y, int end, int level) switch(level) { - case 0: // dark text - case -1:// bold text + case GRAYOUT_DARK: // dark text + case GRAYOUT_BOLD:// 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. @@ -586,7 +586,7 @@ grayout_lines(int y, int end, int level) slp->len = strlen((char*)slp->data); break; - case 1: // Plain text + case GRAYOUT_NORM: // Plain text memcpy(slp->data, buf, slp->len + 1); break; } @@ -594,12 +594,6 @@ grayout_lines(int y, int end, int level) } } -void grayout_line(int y, int level) -{ - return grayout_lines(y, y+1, level); -} - - static size_t screen_backupsize(int len, const screenline_t *bp) { int i; @@ -656,7 +650,7 @@ void screen_restore(const screen_backup_t *old) redoscr(); } -#endif +#endif // !defined(EXP_PFTERM) && !defined(HAVE_PFTERM) /* vim:sw=4 */ |