summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-07-09 15:56:33 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-07-09 15:56:33 +0800
commitf871c2aa2e4cbbc70051cb9c4b2ca622e926a0f0 (patch)
tree7031d29710f878511b342cfac49cadeb2169fbc7
parent86410ff52275a9ae7384295b2863eb964cfc4cbc (diff)
downloadpttbbs-f871c2aa2e4cbbc70051cb9c4b2ca622e926a0f0.tar
pttbbs-f871c2aa2e4cbbc70051cb9c4b2ca622e926a0f0.tar.gz
pttbbs-f871c2aa2e4cbbc70051cb9c4b2ca622e926a0f0.tar.bz2
pttbbs-f871c2aa2e4cbbc70051cb9c4b2ca622e926a0f0.tar.lz
pttbbs-f871c2aa2e4cbbc70051cb9c4b2ca622e926a0f0.tar.xz
pttbbs-f871c2aa2e4cbbc70051cb9c4b2ca622e926a0f0.tar.zst
pttbbs-f871c2aa2e4cbbc70051cb9c4b2ca622e926a0f0.zip
fix magic dbcs_off if no DBCSAWARE_GETDATA
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2929 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/chat.c8
-rw-r--r--mbbsd/io.c4
2 files changed, 8 insertions, 4 deletions
diff --git a/mbbsd/chat.c b/mbbsd/chat.c
index eee47b21..7f5e4939 100644
--- a/mbbsd/chat.c
+++ b/mbbsd/chat.c
@@ -1,6 +1,10 @@
/* $Id$ */
#include "bbs.h"
+#ifndef DBCSAWARE_GETDATA
+#define dbcs_off (1)
+#endif
+
#define STOP_LINE (t_lines-3)
static int chatline;
static FILE *flog;
@@ -477,8 +481,8 @@ t_chat(void)
move(b_lines - 1, chatid_len);
} else if (ch == Ctrl('H') || ch == '\177') {
if (currchar) {
- int dbcs_off = 1;
#ifdef DBCSAWARE_GETDATA
+ int dbcs_off = 1;
if (ISDBCSAWARE() &&
getDBCSstatus(inbuf, currchar-1) == DBCS_TRAILING)
dbcs_off = 2;
@@ -501,8 +505,8 @@ t_chat(void)
break;
} else if (ch == Ctrl('D')) {
if ((size_t)currchar < strlen(inbuf)) {
- int dbcs_off = 1;
#ifdef DBCSAWARE_GETDATA
+ int dbcs_off = 1;
if (ISDBCSAWARE() && inbuf[currchar+1] &&
getDBCSstatus(inbuf, currchar+1) == DBCS_TRAILING)
dbcs_off = 2;
diff --git a/mbbsd/io.c b/mbbsd/io.c
index 0189f612..c960af22 100644
--- a/mbbsd/io.c
+++ b/mbbsd/io.c
@@ -861,8 +861,8 @@ oldgetdata(int line, int col, const char *prompt, char *buf, int len, int echo)
case '\177':
case Ctrl('H'):
if (currchar) {
- int dbcs_off = 1;
#ifdef DBCSAWARE_GETDATA
+ int dbcs_off = 1;
if (ISDBCSAWARE() &&
getDBCSstatus(buf, currchar-1) == DBCS_TRAILING)
dbcs_off = 2;
@@ -893,8 +893,8 @@ oldgetdata(int line, int col, const char *prompt, char *buf, int len, int echo)
case Ctrl('D'):
case KEY_DEL:
if (buf[currchar]) {
- int dbcs_off = 1;
#ifdef DBCSAWARE_GETDATA
+ int dbcs_off = 1;
if (ISDBCSAWARE() && buf[currchar+1] &&
getDBCSstatus(buf, currchar+1) == DBCS_TRAILING)
dbcs_off = 2;