From c2cded3c25ffed4bd3ceda295b477d8b5f6f929c Mon Sep 17 00:00:00 2001 From: piaip Date: Wed, 17 Aug 2005 16:42:57 +0000 Subject: Equivalent config file updates - little/big endian is useless. - DBCSAWARE_* now merged into DBCSAWARE git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3056 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/chat.c | 10 +++++----- mbbsd/edit.c | 26 +++++++++++++------------- mbbsd/io.c | 18 +++++++++--------- 3 files changed, 27 insertions(+), 27 deletions(-) (limited to 'mbbsd') diff --git a/mbbsd/chat.c b/mbbsd/chat.c index bd0a381e..761965bb 100644 --- a/mbbsd/chat.c +++ b/mbbsd/chat.c @@ -1,7 +1,7 @@ /* $Id$ */ #include "bbs.h" -#ifndef DBCSAWARE_GETDATA +#ifndef DBCSAWARE #define dbcs_off (1) #endif @@ -414,7 +414,7 @@ t_chat(void) if (currchar) { --currchar; -#ifdef DBCSAWARE_GETDATA +#ifdef DBCSAWARE if(currchar > 0 && ISDBCSAWARE() && getDBCSstatus(inbuf, currchar) == DBCS_TRAILING) @@ -426,7 +426,7 @@ t_chat(void) if (inbuf[currchar]) { ++currchar; -#ifdef DBCSAWARE_GETDATA +#ifdef DBCSAWARE if(inbuf[currchar] && ISDBCSAWARE() && getDBCSstatus(inbuf, currchar) == DBCS_TRAILING) @@ -481,7 +481,7 @@ t_chat(void) move(b_lines - 1, chatid_len); } else if (ch == Ctrl('H') || ch == '\177') { if (currchar) { -#ifdef DBCSAWARE_GETDATA +#ifdef DBCSAWARE int dbcs_off = 1; if (ISDBCSAWARE() && getDBCSstatus(inbuf, currchar-1) == DBCS_TRAILING) @@ -505,7 +505,7 @@ t_chat(void) break; } else if (ch == Ctrl('D')) { if ((size_t)currchar < strlen(inbuf)) { -#ifdef DBCSAWARE_GETDATA +#ifdef DBCSAWARE int dbcs_off = 1; if (ISDBCSAWARE() && inbuf[currchar+1] && getDBCSstatus(inbuf, currchar+1) == DBCS_TRAILING) diff --git a/mbbsd/edit.c b/mbbsd/edit.c index 42b104a6..4b79abd7 100644 --- a/mbbsd/edit.c +++ b/mbbsd/edit.c @@ -212,7 +212,7 @@ static const char *table_mode[6] = { "¢¦" }; -#ifdef DBCSAWARE_EDIT +#ifdef DBCSAWARE static char mbcs_mode =1; #define IS_BIG5_HI(x) (0x81 <= (x) && (x) <= 0xfe) @@ -1917,7 +1917,7 @@ edit_outs_n(const char *text, int n) register unsigned char inAnsi = 0; register unsigned char ch; -#ifdef DBCSAWARE_EDIT +#ifdef DBCSAWARE /* 0 = N/A, 1 = leading byte printed, 2 = ansi in middle */ register unsigned char isDBCS = 0; #endif @@ -1943,7 +1943,7 @@ edit_outs_n(const char *text, int n) else if(ch == ESC_CHR) { inAnsi = 1; -#ifdef DBCSAWARE_EDIT +#ifdef DBCSAWARE if(isDBCS == 1) { isDBCS = 2; @@ -1955,7 +1955,7 @@ edit_outs_n(const char *text, int n) } else { -#ifdef DBCSAWARE_EDIT +#ifdef DBCSAWARE if(isDBCS == 1) isDBCS = 0; else if (isDBCS == 2) @@ -2083,7 +2083,7 @@ display_textline_internal(textline_t *p, int i, int min, int max) (*output)(p->data + max); } else -#ifdef DBCSAWARE_EDIT +#ifdef DBCSAWARE if(mbcs_mode && curr_buf->edit_margin > 0) { if(curr_buf->edit_margin >= p->len) @@ -2681,7 +2681,7 @@ vedit(char *fpath, int saveheader, int *islocal) strncpy(mytitle, save_title, STRLEN-2); mytitle[STRLEN-1] = 0; -#ifdef DBCSAWARE_EDIT +#ifdef DBCSAWARE mbcs_mode = (cuser.uflag & DBCSAWARE_FLAG) ? 1 : 0; #endif @@ -2760,7 +2760,7 @@ vedit(char *fpath, int saveheader, int *islocal) count = 0; tin = interval; } -#ifndef DBCSAWARE_EDIT +#ifndef DBCSAWARE /* this is almost useless! */ if (curr_buf->raw_mode) { switch (ch) { @@ -2933,7 +2933,7 @@ vedit(char *fpath, int saveheader, int *islocal) curr_buf->oldcurrline = curr_buf->currline; break; case 'R': -#ifdef DBCSAWARE_EDIT +#ifdef DBCSAWARE case 'r': mbcs_mode =! mbcs_mode; #endif @@ -3056,7 +3056,7 @@ vedit(char *fpath, int saveheader, int *islocal) curr_buf->currpnt--; if (curr_buf->ansimode) curr_buf->currpnt = ansi2n(curr_buf->currpnt, curr_buf->currline); -#ifdef DBCSAWARE_EDIT +#ifdef DBCSAWARE if(mbcs_mode) curr_buf->currpnt = fix_cursor(curr_buf->currline->data, curr_buf->currpnt, FC_LEFT); #endif @@ -3074,7 +3074,7 @@ vedit(char *fpath, int saveheader, int *islocal) curr_buf->currpnt++; if (curr_buf->ansimode) curr_buf->currpnt = ansi2n(curr_buf->currpnt, curr_buf->currline); -#ifdef DBCSAWARE_EDIT +#ifdef DBCSAWARE if(mbcs_mode) curr_buf->currpnt = fix_cursor(curr_buf->currline->data, curr_buf->currpnt, FC_RIGHT); #endif @@ -3193,7 +3193,7 @@ vedit(char *fpath, int saveheader, int *islocal) } break; } -#ifndef DBCSAWARE_EDIT +#ifndef DBCSAWARE curr_buf->currpnt--; delete_char(); #else @@ -3226,7 +3226,7 @@ vedit(char *fpath, int saveheader, int *islocal) } curr_buf->redraw_everything = YEA; } else { -#ifndef DBCSAWARE_EDIT +#ifndef DBCSAWARE delete_char(); #else { @@ -3293,7 +3293,7 @@ vedit(char *fpath, int saveheader, int *islocal) window_scroll_down(); else if (cursor_at_bottom_line()) window_scroll_up(); -#ifdef DBCSAWARE_EDIT +#ifdef DBCSAWARE if(mbcs_mode) curr_buf->currpnt = fix_cursor(curr_buf->currline->data, curr_buf->currpnt, FC_LEFT); #endif diff --git a/mbbsd/io.c b/mbbsd/io.c index 89f03a0b..bf7eb91e 100644 --- a/mbbsd/io.c +++ b/mbbsd/io.c @@ -721,7 +721,7 @@ strip_nonebig5(unsigned char *str, int maxlen) str[len]='\0'; } -#ifdef DBCSAWARE_GETDATA +#ifdef DBCSAWARE int getDBCSstatus(unsigned char *s, int pos) { @@ -759,7 +759,7 @@ oldgetdata(int line, int col, const char *prompt, char *buf, int len, int echo) static char lastcmd[MAXLASTCMD][80]; unsigned char occupy_msg = 0; -#ifdef DBCSAWARE_GETDATA +#ifdef DBCSAWARE unsigned int dbcsincomplete = 0; #endif @@ -867,7 +867,7 @@ oldgetdata(int line, int col, const char *prompt, char *buf, int len, int echo) if (currchar > 0) { --currchar; -#ifdef DBCSAWARE_GETDATA +#ifdef DBCSAWARE if(currchar > 0 && ISDBCSAWARE() && getDBCSstatus(buf, currchar) == DBCS_TRAILING) @@ -879,7 +879,7 @@ oldgetdata(int line, int col, const char *prompt, char *buf, int len, int echo) if (buf[currchar]) { ++currchar; -#ifdef DBCSAWARE_GETDATA +#ifdef DBCSAWARE if(buf[currchar] && ISDBCSAWARE() && getDBCSstatus(buf, currchar) == DBCS_TRAILING) @@ -890,7 +890,7 @@ oldgetdata(int line, int col, const char *prompt, char *buf, int len, int echo) case '\177': case Ctrl('H'): if (currchar) { -#ifdef DBCSAWARE_GETDATA +#ifdef DBCSAWARE int dbcs_off = 1; if (ISDBCSAWARE() && getDBCSstatus(buf, currchar-1) == DBCS_TRAILING) @@ -905,7 +905,7 @@ oldgetdata(int line, int col, const char *prompt, char *buf, int len, int echo) { move(y, x + clen); outc(' '); -#ifdef DBCSAWARE_GETDATA +#ifdef DBCSAWARE while(--dbcs_off > 0) outc(' '); #endif move(y, x); @@ -929,7 +929,7 @@ oldgetdata(int line, int col, const char *prompt, char *buf, int len, int echo) case Ctrl('D'): case KEY_DEL: if (buf[currchar]) { -#ifdef DBCSAWARE_GETDATA +#ifdef DBCSAWARE int dbcs_off = 1; if (ISDBCSAWARE() && buf[currchar+1] && getDBCSstatus(buf, currchar+1) == DBCS_TRAILING) @@ -942,7 +942,7 @@ oldgetdata(int line, int col, const char *prompt, char *buf, int len, int echo) { move(y, x + clen); outc(' '); -#ifdef DBCSAWARE_GETDATA +#ifdef DBCSAWARE while(--dbcs_off > 0) outc(' '); #endif move(y, x); @@ -960,7 +960,7 @@ oldgetdata(int line, int col, const char *prompt, char *buf, int len, int echo) break; default: if (isprint2(ch) && clen < len && x + clen < scr_cols) { -#ifdef DBCSAWARE_GETDATA +#ifdef DBCSAWARE if(ISDBCSAWARE()) { /* to prevent single byte input */ -- cgit v1.2.3