summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2010-10-29 20:45:08 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2010-10-29 20:45:08 +0800
commit1a149a5b96b90fb904b2d34857e43e11f7ec108f (patch)
tree1198b3929668177ecc8bafca5d9f426bebbb3504
parent678ae3ad6b74fe5c7a20f15ca5e38cd3dfbf7c1e (diff)
downloadpttbbs-1a149a5b96b90fb904b2d34857e43e11f7ec108f.tar
pttbbs-1a149a5b96b90fb904b2d34857e43e11f7ec108f.tar.gz
pttbbs-1a149a5b96b90fb904b2d34857e43e11f7ec108f.tar.bz2
pttbbs-1a149a5b96b90fb904b2d34857e43e11f7ec108f.tar.lz
pttbbs-1a149a5b96b90fb904b2d34857e43e11f7ec108f.tar.xz
pttbbs-1a149a5b96b90fb904b2d34857e43e11f7ec108f.tar.zst
pttbbs-1a149a5b96b90fb904b2d34857e43e11f7ec108f.zip
clean up old unsed code, add (possible) escape hack
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5178 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/screen.c26
1 files changed, 5 insertions, 21 deletions
diff --git a/pttbbs/mbbsd/screen.c b/pttbbs/mbbsd/screen.c
index 5da0faec..51921b47 100644
--- a/pttbbs/mbbsd/screen.c
+++ b/pttbbs/mbbsd/screen.c
@@ -535,10 +535,7 @@ outc(unsigned char c)
cur_ln++;
return;
}
- /*
- * else if(c != ESC_CHR && !isprint2(c)) { c = '*'; //substitute a '*' for
- * non-printable }
- */
+
if (cur_col >= slp->len) {
for (i = slp->len; i < cur_col; i++)
slp->data[i] = ' ';
@@ -546,7 +543,8 @@ outc(unsigned char c)
slp->len = cur_col + 1;
}
- if (slp->data[cur_col] != c) {
+ // always invalid escapes
+ if (c == ESC_CHR || slp->data[cur_col] != c) {
slp->data[cur_col] = c;
if (!(slp->mode & MODIFIED))
slp->smod = slp->emod = cur_col;
@@ -556,23 +554,9 @@ outc(unsigned char c)
if (cur_col < slp->smod)
slp->smod = cur_col;
}
-#if 1
+
if(cur_col < scr_cols)
- cur_col++;
-#else
- /* vvv commented by piaip: but SCR_COLS is 511 > unsigned char! */
- /* this comparison is always false (cur_col is unsigned char and scr_cols
- * is 511). */
- if (++cur_col >= scr_cols) {
- if (standing && (slp->mode & STANDOUT)) {
- standing = 0;
- slp->eso = MAX(slp->eso, cur_col);
- }
- cur_col = 0;
- if (cur_ln < scr_lns)
- cur_ln++;
- }
-#endif
+ cur_col++;
}
void