diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2010-09-26 14:26:23 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2010-09-26 14:26:23 -0400 |
commit | bf9ea0cbb0562934c45170f94ebfe2ac609a44a8 (patch) | |
tree | f4bde48763d66ed00b176397aee2b3fd6e9fc7f5 /WWW/Library/Implementation/HTPlain.c | |
parent | 69a1a751cb798556c786e3ef66d473bf8a88abdc (diff) | |
download | lynx-snapshots-bf9ea0cbb0562934c45170f94ebfe2ac609a44a8.tar.gz |
snapshot of project "lynx", label v2-8-8dev_5e
Diffstat (limited to 'WWW/Library/Implementation/HTPlain.c')
-rw-r--r-- | WWW/Library/Implementation/HTPlain.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/WWW/Library/Implementation/HTPlain.c b/WWW/Library/Implementation/HTPlain.c index ef79695a..ff8b2bfb 100644 --- a/WWW/Library/Implementation/HTPlain.c +++ b/WWW/Library/Implementation/HTPlain.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTPlain.c,v 1.46 2010/04/30 08:28:48 tom Exp $ + * $LynxId: HTPlain.c,v 1.48 2010/09/25 12:38:08 tom Exp $ * * Plain text object HTWrite.c * ================= @@ -106,7 +106,7 @@ static void HTPlain_write(HTStream *me, const char *s, /* Character handling * ------------------ */ -static void HTPlain_put_character(HTStream *me, char c) +static void HTPlain_put_character(HTStream *me, int c) { #ifdef REMOVE_CR_ONLY /* @@ -127,17 +127,23 @@ static void HTPlain_put_character(HTStream *me, char c) return; } if (c == '\b' || c == '_' || HTPlain_bs_pending) { - HTPlain_write(me, &c, 1); + char temp[1]; + + temp[0] = (char) c; + HTPlain_write(me, temp, 1); return; } HTPlain_lastraw = UCH(c); if (c == '\r') { HText_appendCharacter(me->text, '\n'); } else if (TOASCII(UCH(c)) >= 127) { /* S/390 -- gil -- 0305 */ + char temp[1]; + + temp[0] = (char) c; /* * For now, don't repeat everything here that has been done below - KW */ - HTPlain_write(me, &c, 1); + HTPlain_write(me, temp, 1); } else if (IS_CJK_TTY) { HText_appendCharacter(me->text, c); } else if (TOASCII(UCH(c)) >= 127 && TOASCII(UCH(c)) < 161 && @@ -536,8 +542,9 @@ static void HTPlain_write(HTStream *me, const char *s, int l) (uck = UCTransUniChar(code, me->outUCLYhndl)) >= ' ' && /* S/390 -- gil -- 0464 */ uck < 256) { - CTRACE((tfp, "UCTransUniChar returned 0x%.2lX:'%c'.\n", - uck, FROMASCII((char) uck))); + CTRACE((tfp, "UCTransUniChar returned 0x%.2" PRI_UCode_t + ":'%c'.\n", + uck, FROMASCII(UCH(uck)))); HText_appendCharacter(me->text, ((char) (uck & 0xff))); } else if (chk && (uck == -4 || |