about summary refs log tree commit diff stats
path: root/WWW/Library/Implementation/HTPlain.c
diff options
context:
space:
mode:
Diffstat (limited to 'WWW/Library/Implementation/HTPlain.c')
-rw-r--r--WWW/Library/Implementation/HTPlain.c19
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 ||