diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2008-09-06 15:47:47 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2008-09-06 15:47:47 -0400 |
commit | b027e6c551e944c3de2c6a41958afbdfcbb9e942 (patch) | |
tree | 0de5acdb29ed7fb4794713db1cd1ae38b387d3e7 /WWW/Library/Implementation | |
parent | 260d8a57df392ef59b6430ccadf4e9e5bcdefe12 (diff) | |
download | lynx-snapshots-b027e6c551e944c3de2c6a41958afbdfcbb9e942.tar.gz |
snapshot of project "lynx", label v2-8-7dev_9i
Diffstat (limited to 'WWW/Library/Implementation')
-rw-r--r-- | WWW/Library/Implementation/HTAccess.c | 5 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTPlain.c | 10 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTWAIS.c | 7 | ||||
-rw-r--r-- | WWW/Library/Implementation/SGML.c | 36 |
4 files changed, 33 insertions, 25 deletions
diff --git a/WWW/Library/Implementation/HTAccess.c b/WWW/Library/Implementation/HTAccess.c index ebcf0863..f92df3a0 100644 --- a/WWW/Library/Implementation/HTAccess.c +++ b/WWW/Library/Implementation/HTAccess.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTAccess.c,v 1.66 2008/08/31 22:38:38 tom Exp $ + * $LynxId: HTAccess.c,v 1.67 2008/09/06 14:44:37 tom Exp $ * * Access Manager HTAccess.c * ============== @@ -64,6 +64,7 @@ #include <LYGlobalDefs.h> #include <LYexit.h> +#include <LYStrings.h> #include <LYUtils.h> #include <LYLeaks.h> @@ -1287,7 +1288,7 @@ BOOL HTSearch(const char *keywords, if (WHITE(*p)) { *q++ = '+'; - } else if (HTCJK != NOCJK) { + } else if (IS_CJK_TTY) { *q++ = *p; } else if (c >= 32 && c <= UCH(127) && isAcceptable[c - 32]) { *q++ = *p; /* 930706 TBL for MVS bug */ diff --git a/WWW/Library/Implementation/HTPlain.c b/WWW/Library/Implementation/HTPlain.c index 3e40be02..8dfa901e 100644 --- a/WWW/Library/Implementation/HTPlain.c +++ b/WWW/Library/Implementation/HTPlain.c @@ -1,4 +1,7 @@ -/* Plain text object HTWrite.c +/* + * $LynxId: HTPlain.c,v 1.42 2008/09/06 14:45:09 tom Exp $ + * + * Plain text object HTWrite.c * ================= * * This version of the stream object just writes to a socket. @@ -28,6 +31,7 @@ #include <UCAux.h> #include <LYCharSets.h> +#include <LYStrings.h> #include <LYLeaks.h> static int HTPlain_lastraw = -1; @@ -134,7 +138,7 @@ static void HTPlain_put_character(HTStream *me, char c) * For now, don't repeat everything here that has been done below - KW */ HTPlain_write(me, &c, 1); - } else if (HTCJK != NOCJK) { + } else if (IS_CJK_TTY) { HText_appendCharacter(me->text, c); } else if (TOASCII(UCH(c)) >= 127 && TOASCII(UCH(c)) < 161 && HTPassHighCtrlRaw) { @@ -470,7 +474,7 @@ static void HTPlain_write(HTStream *me, const char *s, int l) * display character set, and if not, the user should toggle off * raw/CJK mode to reload. - FM */ - if (HTCJK != NOCJK) { + if (IS_CJK_TTY) { HText_appendCharacter(me->text, c); #define PASSHICTRL (me->T.transp || \ diff --git a/WWW/Library/Implementation/HTWAIS.c b/WWW/Library/Implementation/HTWAIS.c index fcc64344..0e09f761 100644 --- a/WWW/Library/Implementation/HTWAIS.c +++ b/WWW/Library/Implementation/HTWAIS.c @@ -1,4 +1,7 @@ -/* WorldWideWeb - Wide Area Informaion Server Access HTWAIS.c +/* + * $LynxId: HTWAIS.c,v 1.31 2008/09/06 15:47:08 tom Exp $ + * + * WorldWideWeb - Wide Area Informaion Server Access HTWAIS.c * ================================================== * * This module allows a WWW server or client to read data from a @@ -436,7 +439,7 @@ static void output_text_record(HTStream *target, count += 4; /* it is a paragraph marker */ } else if (ch == '\n' || ch == '\r') { PUTC('\n'); - } else if (HTCJK != NOCJK || ch == '\t' || isprint(ch)) { + } else if (IS_CJK_TTY || ch == '\t' || isprint(ch)) { PUTC(ch); } } diff --git a/WWW/Library/Implementation/SGML.c b/WWW/Library/Implementation/SGML.c index 4c571fd7..6b3863d0 100644 --- a/WWW/Library/Implementation/SGML.c +++ b/WWW/Library/Implementation/SGML.c @@ -1,5 +1,5 @@ /* - * $LynxId: SGML.c,v 1.109 2008/08/31 18:34:05 tom Exp $ + * $LynxId: SGML.c,v 1.110 2008/09/06 14:44:04 tom Exp $ * * General SGML Parser code SGML.c * ======================== @@ -395,7 +395,7 @@ static void set_chartrans_handling(HTStream *context, * its HTStructured object, itself, if this were needed. - FM */ #ifndef EXP_JAPANESEUTF8_SUPPORT - if (HTCJK != NOCJK) { + if (IS_CJK_TTY) { context->current_tag_charset = -1; } else #endif @@ -1829,7 +1829,7 @@ static void SGML_character(HTStream *context, char c_in) */ if (TOASCII(unsign_c) < 32 && c != '\t' && c != '\n' && c != '\r' && - HTCJK == NOCJK) + !IS_CJK_TTY) goto after_switch; /* @@ -1838,7 +1838,7 @@ static void SGML_character(HTStream *context, char c_in) #define PASSHICTRL (context->T.transp || \ unsign_c >= LYlowest_eightbit[context->inUCLYhndl]) if (TOASCII(c) == 127 && /* S/390 -- gil -- 0830 */ - !(PASSHICTRL || HTCJK != NOCJK)) + !(PASSHICTRL || IS_CJK_TTY)) goto after_switch; /* @@ -1846,7 +1846,7 @@ static void SGML_character(HTStream *context, char c_in) * nor HTCJK is set. - FM */ if (TOASCII(unsign_c) > 127 && TOASCII(unsign_c) < 160 && /* S/390 -- gil -- 0847 */ - !(PASSHICTRL || HTCJK != NOCJK)) + !(PASSHICTRL || IS_CJK_TTY)) goto after_switch; /* Almost all CJK characters are double byte but only Japanese @@ -1909,7 +1909,7 @@ static void SGML_character(HTStream *context, char c_in) } /* fall through in any case! */ case S_text: - if ((HTCJK != NOCJK) && ((TOASCII(c) & 0200) != 0) + if (IS_CJK_TTY && ((TOASCII(c) & 0200) != 0) #ifdef EXP_JAPANESEUTF8_SUPPORT && !context->T.decode_utf8 #endif @@ -1925,7 +1925,7 @@ static void SGML_character(HTStream *context, char c_in) context->state = S_in_kanji; context->kanji_buf = c; break; - } else if (HTCJK != NOCJK && TOASCII(c) == '\033') { /* S/390 -- gil -- 0881 */ + } else if (IS_CJK_TTY && TOASCII(c) == '\033') { /* S/390 -- gil -- 0881 */ /* * Setting up for CJK escape sequence handling (based on Takuya * ASADA's (asada@three-a.co.jp) CJK Lynx). - FM @@ -2023,7 +2023,7 @@ static void SGML_character(HTStream *context, char c_in) PUTS(context->utf_buf); context->utf_buf_p = context->utf_buf; *(context->utf_buf_p) = '\0'; - } else if (HTCJK == NOCJK && + } else if (!IS_CJK_TTY && (context->T.output_utf8 || context->T.trans_from_uni)) { if (LYIsASCII(clong)) { @@ -2049,7 +2049,7 @@ static void SGML_character(HTStream *context, char c_in) */ } else if (unsign_c == CH_NBSP && /* S/390 -- gil -- 0932 */ !context->no_lynx_specialcodes && - !(PASS8859SPECL || HTCJK != NOCJK)) { + !(PASS8859SPECL || IS_CJK_TTY)) { PUTC(HT_NON_BREAK_SPACE); /* * Convert 173 (shy) to Lynx special character if neither @@ -2057,7 +2057,7 @@ static void SGML_character(HTStream *context, char c_in) */ } else if (unsign_c == CH_SHY && /* S/390 -- gil -- 0949 */ !context->no_lynx_specialcodes && - !(PASS8859SPECL || HTCJK != NOCJK)) { + !(PASS8859SPECL || IS_CJK_TTY)) { PUTC(LY_SOFT_HYPHEN); /* * Handle the case in which we think we have a character which @@ -2121,7 +2121,7 @@ static void SGML_character(HTStream *context, char c_in) (context->T.do_8bitraw && !context->T.trans_from_uni)) } else if (unsign_c > 160 && unsign_c < 256 && - !(PASSHI8BIT || HTCJK != NOCJK) && + !(PASSHI8BIT || IS_CJK_TTY) && !IncludesLatin1Enc) { #ifdef USE_PRETTYSRC int psrc_view_backup = 0; @@ -2827,9 +2827,9 @@ static void SGML_character(HTStream *context, char c_in) } else if ((code > 255) || (code < ' ' && /* S/390 -- gil -- 1140 */ code != '\t' && code != '\n' && code != '\r' && - HTCJK == NOCJK) || + !IS_CJK_TTY) || (TOASCII(code) == 127 && - !(HTPassHighCtrlRaw || HTCJK != NOCJK)) || + !(HTPassHighCtrlRaw || IS_CJK_TTY)) || (TOASCII(code) > 127 && code < 160 && !HTPassHighCtrlNum)) { /* @@ -3341,7 +3341,7 @@ static void SGML_character(HTStream *context, char c_in) HTChunkPuts(string, context->utf_buf); context->utf_buf_p = context->utf_buf; *(context->utf_buf_p) = '\0'; - } else if (HTCJK == NOCJK && + } else if (!IS_CJK_TTY && (context->T.output_utf8 || context->T.trans_from_uni)) { if (clong == 0xfffd && saved_char_in && @@ -3733,7 +3733,7 @@ static void SGML_character(HTStream *context, char c_in) #endif { #ifdef CJK_EX /* Quick hack. - JH7AYN */ - if (HTCJK != NOCJK) { + if (IS_CJK_TTY) { if (string->data[0] == '$') { if (string->data[1] == 'B' || string->data[1] == '@') { char *jis_buf = 0; @@ -3768,7 +3768,7 @@ static void SGML_character(HTStream *context, char c_in) HTChunkPuts(string, context->utf_buf); context->utf_buf_p = context->utf_buf; *(context->utf_buf_p) = '\0'; - } else if (HTCJK == NOCJK && + } else if (!IS_CJK_TTY && (context->T.output_utf8 || context->T.trans_from_uni)) { if (clong == 0xfffd && saved_char_in && @@ -3828,7 +3828,7 @@ static void SGML_character(HTStream *context, char c_in) HTChunkPuts(string, context->utf_buf); context->utf_buf_p = context->utf_buf; *(context->utf_buf_p) = '\0'; - } else if (HTCJK == NOCJK && + } else if (!IS_CJK_TTY && (context->T.output_utf8 || context->T.trans_from_uni)) { if (clong == 0xfffd && saved_char_in && @@ -3893,7 +3893,7 @@ static void SGML_character(HTStream *context, char c_in) HTChunkPuts(string, context->utf_buf); context->utf_buf_p = context->utf_buf; *(context->utf_buf_p) = '\0'; - } else if (HTCJK == NOCJK && + } else if (!IS_CJK_TTY && (context->T.output_utf8 || context->T.trans_from_uni)) { if (clong == 0xfffd && saved_char_in && |