diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-07-25 13:39:58 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-07-25 13:39:58 +0800 |
commit | 67ffc7654419486b0874fc25f23545e477be2682 (patch) | |
tree | c3ea292b92a2b6e16221c82b98ab292ec2f695ae /mbbsd/io.c | |
parent | 1da6e876431475755e1fb84f4920a0cb19134bdb (diff) | |
download | pttbbs-67ffc7654419486b0874fc25f23545e477be2682.tar pttbbs-67ffc7654419486b0874fc25f23545e477be2682.tar.gz pttbbs-67ffc7654419486b0874fc25f23545e477be2682.tar.bz2 pttbbs-67ffc7654419486b0874fc25f23545e477be2682.tar.lz pttbbs-67ffc7654419486b0874fc25f23545e477be2682.tar.xz pttbbs-67ffc7654419486b0874fc25f23545e477be2682.tar.zst pttbbs-67ffc7654419486b0874fc25f23545e477be2682.zip |
make recommendation system better
- prevent waterball overwrites recommendation
- eliminate confirm scroll
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2952 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/io.c')
-rw-r--r-- | mbbsd/io.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -766,6 +766,7 @@ oldgetdata(int line, int col, const char *prompt, char *buf, int len, int echo) int dirty_line = 0; /* if this line contains ansi escapes, we have to dirty entire line. */ static char lastcmd[MAXLASTCMD][80]; + unsigned char occupy_msg = 0; #ifdef DBCSAWARE_GETDATA unsigned int dbcsincomplete = 0; @@ -773,6 +774,9 @@ oldgetdata(int line, int col, const char *prompt, char *buf, int len, int echo) strip_ansi(buf, buf, STRIP_ALL); + if(line == b_lines-msg_occupied) + occupy_msg=1, msg_occupied ++; + if (prompt) { x += strip_ansi(NULL, prompt, STRIP_ALL); if(strlen(prompt) + col != x) @@ -1007,13 +1011,15 @@ oldgetdata(int line, int col, const char *prompt, char *buf, int len, int echo) strlcpy(lastcmd[0], buf, sizeof(lastcmd[0])); memmove(lastcmd+1, lastcmd, (MAXLASTCMD-1)*sizeof(lastcmd[0])); } - /* why return here? */ + /* why return here? because some code then outs.*/ // outc('\n'); move(y+1, 0); refresh(); } if ((echo == LCECHO) && isupper((int)buf[0])) buf[0] = tolower(buf[0]); + + if(occupy_msg) msg_occupied --; return clen; } |