diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-12-29 17:27:27 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-12-29 17:27:27 +0800 |
commit | 6c79d638fefc182f68c9b539e532256cf218febf (patch) | |
tree | 5838ff1db3b75e649dc78adbeb48df59cc8e9159 | |
parent | aa3007d2546e871d72ef482f16ebc3dd3403dd91 (diff) | |
download | pttbbs-6c79d638fefc182f68c9b539e532256cf218febf.tar pttbbs-6c79d638fefc182f68c9b539e532256cf218febf.tar.gz pttbbs-6c79d638fefc182f68c9b539e532256cf218febf.tar.bz2 pttbbs-6c79d638fefc182f68c9b539e532256cf218febf.tar.lz pttbbs-6c79d638fefc182f68c9b539e532256cf218febf.tar.xz pttbbs-6c79d638fefc182f68c9b539e532256cf218febf.tar.zst pttbbs-6c79d638fefc182f68c9b539e532256cf218febf.zip |
- pmore: enable warning messages for movie playing
- pfterm: fix chattr optimization for background attr change
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3757 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/pfterm.c | 3 | ||||
-rw-r--r-- | mbbsd/pmore.c | 16 |
2 files changed, 18 insertions, 1 deletions
diff --git a/mbbsd/pfterm.c b/mbbsd/pfterm.c index 14c15e67..1dba337a 100644 --- a/mbbsd/pfterm.c +++ b/mbbsd/pfterm.c @@ -1501,10 +1501,11 @@ fterm_chattr(char *s, ftattr oattr, ftattr nattr) // for background change? if ((oblink != blink && !blink) || (obold != bold && !bold) || - (bg == FTATTR_DEFAULT_FG && obg != bg) ) + (bg == FTATTR_DEFAULT_BG && obg != bg) ) { if (lead) lead = 0; else *s++ = ';'; *s++ = '0'; + ofg = FTATTR_DEFAULT_FG; obg = FTATTR_DEFAULT_BG; obold = 0; oblink = 0; diff --git a/mbbsd/pmore.c b/mbbsd/pmore.c index 377657de..3869c472 100644 --- a/mbbsd/pmore.c +++ b/mbbsd/pmore.c @@ -1991,6 +1991,7 @@ pmore(char *fpath, int promptend) buf[0] = 0; if(override_attr) outs(override_attr); snprintf(buf, sizeof(buf), override_msg); + override_attr = NULL; override_msg = NULL; } else @@ -2758,6 +2759,21 @@ mf_moviePromptPlaying(int type) // s may change to anykey... const char *s = PMORE_MSG_MOVIE_PLAYING; + if (override_msg) + { + // we must warn user about something... + move(type ? b_lines-2 : b_lines-1, 0); // clrtoeol? + outs(ANSI_RESET); + if (override_attr) outs(override_attr); + w -= strlen(override_msg); + outs(override_msg); + while(w-- > 0) outc(' '); + + outs(ANSI_RESET ANSI_CLRTOEND); + override_msg = NULL; override_attr = NULL; + w = t_columns -1; + } + move(type ? b_lines-1 : b_lines, 0); // clrtoeol? if (type) |