summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-10-21 14:07:48 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-10-21 14:07:48 +0800
commit601e7363e441d7e1c4c78794e29359ae3f031d91 (patch)
tree1916f20cad2b8decbfc95b3c77436ed8e36f510c
parent7f74e222a4968ca9113a988b2ad378114a8e1324 (diff)
downloadpttbbs-601e7363e441d7e1c4c78794e29359ae3f031d91.tar
pttbbs-601e7363e441d7e1c4c78794e29359ae3f031d91.tar.gz
pttbbs-601e7363e441d7e1c4c78794e29359ae3f031d91.tar.bz2
pttbbs-601e7363e441d7e1c4c78794e29359ae3f031d91.tar.lz
pttbbs-601e7363e441d7e1c4c78794e29359ae3f031d91.tar.xz
pttbbs-601e7363e441d7e1c4c78794e29359ae3f031d91.tar.zst
pttbbs-601e7363e441d7e1c4c78794e29359ae3f031d91.zip
* enable ansi-safe refresh mechanism again
* modify vgets() to workaround ansi stuff git-svn-id: http://opensvn.csie.org/pttbbs/trunk@4942 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/screen.c12
-rw-r--r--pttbbs/mbbsd/vtuikit.c6
2 files changed, 10 insertions, 8 deletions
diff --git a/pttbbs/mbbsd/screen.c b/pttbbs/mbbsd/screen.c
index 1389afd9..74d0f755 100644
--- a/pttbbs/mbbsd/screen.c
+++ b/pttbbs/mbbsd/screen.c
@@ -348,14 +348,14 @@ doupdate(void)
}
#endif // DBCSAWARE
-#if 0
- // disabled now, bugs:
- // (1) input number (goto) in bbs list (search_num)
- // (2) some empty lines becomes weird (eg, b_config)
- //
- // more effort to determine ANSI smod
+// disable this if you encounter some bugs.
+// bug history:
+// (1) input number (goto) in bbs list (search_num) [solved: search_num merged to vget]
+// (2) some empty lines becomes weird (eg, b_config) [not seen anymore?]
+#if 1
if (bp->smod > 0)
{
+ // more effort to determine ANSI smod
int iesc;
for (iesc = bp->smod-1; iesc >= 0; iesc--)
{
diff --git a/pttbbs/mbbsd/vtuikit.c b/pttbbs/mbbsd/vtuikit.c
index 351c3d4e..32c00a41 100644
--- a/pttbbs/mbbsd/vtuikit.c
+++ b/pttbbs/mbbsd/vtuikit.c
@@ -970,7 +970,7 @@ vgetstring(char *_buf, int len, int flags, const char *defstr, const VGET_CALLBA
{
// rt.iend points to NUL address, and
// rt.icurr points to cursor.
- int line, col;
+ int line, col, line_ansi, col_ansi;
int abort = 0, dirty = 0;
int c = 0;
char ismsgline = 0;
@@ -1007,6 +1007,7 @@ vgetstring(char *_buf, int len, int flags, const char *defstr, const VGET_CALLBA
cb = *pcbs;
getyx(&line, &col); // now (line,col) is the beginning of our new fields.
+ getyx_ansi(&line_ansi, &col_ansi);
// XXX be compatible with traditional...
if (line == b_lines - msg_occupied)
@@ -1034,6 +1035,7 @@ vgetstring(char *_buf, int len, int flags, const char *defstr, const VGET_CALLBA
// print current buffer
move(line, col);
+ SOLVE_ANSI_CACHE();
clrtoeol();
SOLVE_ANSI_CACHE();
@@ -1046,7 +1048,7 @@ vgetstring(char *_buf, int len, int flags, const char *defstr, const VGET_CALLBA
outs(ANSI_RESET);
// move to cursor position
- move(line, col+rt.icurr);
+ move(line_ansi, col_ansi+rt.icurr);
} else {
// to simulate the "clrtoeol" behavior...
// XXX make this call only once? or not?