summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-16 12:43:32 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-16 12:43:32 +0800
commit81aedaf08d5fb34eddb2cf838a434aed1bfe3a6f (patch)
treeb03e3192666424bfed4eb831eff4eee092d79ff6 /mbbsd
parent8e5fa100d37547fbbb2862fe8bab431e0d1ea7a6 (diff)
downloadpttbbs-81aedaf08d5fb34eddb2cf838a434aed1bfe3a6f.tar
pttbbs-81aedaf08d5fb34eddb2cf838a434aed1bfe3a6f.tar.gz
pttbbs-81aedaf08d5fb34eddb2cf838a434aed1bfe3a6f.tar.bz2
pttbbs-81aedaf08d5fb34eddb2cf838a434aed1bfe3a6f.tar.lz
pttbbs-81aedaf08d5fb34eddb2cf838a434aed1bfe3a6f.tar.xz
pttbbs-81aedaf08d5fb34eddb2cf838a434aed1bfe3a6f.tar.zst
pttbbs-81aedaf08d5fb34eddb2cf838a434aed1bfe3a6f.zip
- disable interupting ANSI inside DBCS characters (for UTF-8 or
non-DBCS clients) git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3688 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/screen.c28
-rw-r--r--mbbsd/user.c2
2 files changed, 28 insertions, 2 deletions
diff --git a/mbbsd/screen.c b/mbbsd/screen.c
index 8256ba5e..59e0addb 100644
--- a/mbbsd/screen.c
+++ b/mbbsd/screen.c
@@ -121,7 +121,8 @@ void
redoscr(void)
{
register screenline_t *bp;
- register int i, j, len;
+ register int i, j;
+ int len;
o_clear();
for (tc_col = tc_line = i = 0, j = roll; i < scr_lns; i++, j++) {
@@ -130,6 +131,17 @@ redoscr(void)
bp = &big_picture[j];
if ((len = bp->len)) {
rel_move(tc_col, tc_line, 0, i);
+
+#ifdef DBCSAWARE
+ if (!(bp->mode & STANDOUT) &&
+ (cuser.uflag & DBCS_NOINTRESC) &&
+ DBCS_RemoveIntrEscape(bp->data, &len))
+ {
+ // if anything changed, dirty whole line.
+ bp->len = len;
+ }
+#endif // DBCSAWARE
+
if (bp->mode & STANDOUT) {
standoutput((char *)bp->data, 0, len, bp->sso, bp->eso);
}
@@ -188,7 +200,8 @@ refresh(void)
{
/* TODO remove unnecessary refresh() call, to save CPU time */
register screenline_t *bp = big_picture;
- register int i, j, len;
+ register int i, j;
+ int len;
if (num_in_buf())
return;
@@ -221,6 +234,17 @@ refresh(void)
{
bp->mode &= ~(MODIFIED);
+#ifdef DBCSAWARE
+ if (!(bp->mode & STANDOUT) &&
+ (cuser.uflag & DBCS_NOINTRESC) &&
+ DBCS_RemoveIntrEscape(bp->data, &len))
+ {
+ // if anything changed, dirty whole line.
+ bp->len = len;
+ bp->smod = 0; bp->emod = len;
+ }
+#endif // DBCSAWARE
+
// more effort to determine ANSI smod
if (bp->smod > 0)
{
diff --git a/mbbsd/user.c b/mbbsd/user.c
index f2475e95..05289ef6 100644
--- a/mbbsd/user.c
+++ b/mbbsd/user.c
@@ -335,6 +335,7 @@ void Customize(void)
COLORED_MODMARK,
#ifdef DBCSAWARE
DBCSAWARE_FLAG,
+ DBCS_NOINTRESC,
#endif
0,
};
@@ -345,6 +346,7 @@ void Customize(void)
"改用色彩代替修改符號 (+)",
#ifdef DBCSAWARE
"自動偵測雙位元字集(如全型中文)",
+ "禁止插入雙位元的色碼(一字雙色)",
#endif
0,
};