summaryrefslogtreecommitdiffstats
path: root/mbbsd/visio.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-18 15:50:34 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-18 15:50:34 +0800
commit9896099baf6e727919325820bb6dcd368ca0b705 (patch)
tree0ce0ac66075965405d8a4cb78520f13e05ec7233 /mbbsd/visio.c
parent37f7b8ce5a7909a47b18bdcdddc66feec0db3839 (diff)
downloadpttbbs-9896099baf6e727919325820bb6dcd368ca0b705.tar
pttbbs-9896099baf6e727919325820bb6dcd368ca0b705.tar.gz
pttbbs-9896099baf6e727919325820bb6dcd368ca0b705.tar.bz2
pttbbs-9896099baf6e727919325820bb6dcd368ca0b705.tar.lz
pttbbs-9896099baf6e727919325820bb6dcd368ca0b705.tar.xz
pttbbs-9896099baf6e727919325820bb6dcd368ca0b705.tar.zst
pttbbs-9896099baf6e727919325820bb6dcd368ca0b705.zip
- (internal) refine i/o system to try new vget system
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4189 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/visio.c')
-rw-r--r--mbbsd/visio.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/mbbsd/visio.c b/mbbsd/visio.c
index 35384ab8..27b6cbf9 100644
--- a/mbbsd/visio.c
+++ b/mbbsd/visio.c
@@ -853,6 +853,7 @@ vgetstring(char *_buf, int len, int flags, const char *defstr, const VGET_CALLBA
int line, col;
int icurr = 0, iend = 0, abort = 0;
int c;
+ char ismsgline = 0;
// always use internal buffer to prevent temporary input issue.
char buf[STRLEN] = ""; // zero whole.
@@ -884,6 +885,13 @@ vgetstring(char *_buf, int len, int flags, const char *defstr, const VGET_CALLBA
getyx(&line, &col); // now (line,col) is the beginning of our new fields.
+ // XXX be compatible with traditional...
+ if (line == b_lines - msg_occupied)
+ ismsgline = 1;
+
+ if (ismsgline)
+ msg_occupied ++;
+
while (!abort)
{
if (!(flags & VGET_NOECHO))
@@ -1084,6 +1092,14 @@ vgetstring(char *_buf, int len, int flags, const char *defstr, const VGET_CALLBA
// copy buffer!
memcpy(_buf, buf, len);
+
+ // XXX update screen display
+ if (ismsgline)
+ msg_occupied --;
+
+ /* because some code then outs so change new line.*/
+ move(line+1, 0);
+
return iend;
}