about summary refs log tree commit diff stats
path: root/WWW/Library/Implementation/HTWriter.c
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>1998-11-06 16:18:09 -0500
committerThomas E. Dickey <dickey@invisible-island.net>1998-11-06 16:18:09 -0500
commit18024037b515bfff83e0230b35151babe6005e18 (patch)
treeb8c80055282a00883284722a3dd6bb25234e07f0 /WWW/Library/Implementation/HTWriter.c
parent3d8ecbe48af249fa0d77ce4d273e32ce4b7e6e18 (diff)
downloadlynx-snapshots-18024037b515bfff83e0230b35151babe6005e18.tar.gz
snapshot of project "lynx", label v2-8-1dev_4
Diffstat (limited to 'WWW/Library/Implementation/HTWriter.c')
-rw-r--r--WWW/Library/Implementation/HTWriter.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/WWW/Library/Implementation/HTWriter.c b/WWW/Library/Implementation/HTWriter.c
index c4dba35b..601bdb0a 100644
--- a/WWW/Library/Implementation/HTWriter.c
+++ b/WWW/Library/Implementation/HTWriter.c
@@ -2,15 +2,19 @@
 **		===========
 **
 */
-
 #include <HTUtils.h>
+#include <tcp.h>
 
 #include <HTWriter.h>
 
 #define BUFFER_SIZE 4096	/* Tradeoff */
 
+/*#include <stdio.h> included by HTUtils.h -- FM */
+
 #include <LYLeaks.h>
 
+#define FREE(x) if (x) {free(x); x = NULL;}
+
 /*		HTML Object
 **		-----------
 */
@@ -48,7 +52,8 @@ PRIVATE void flush ARGS1(HTStream *, me)
 	status = NETWRITE(me->soc, me->buffer,	/* Put timeout? @@@ */
 			write_pointer - read_pointer);
 	if (status<0) {
-	    CTRACE(tfp, "HTWrite: Error: write() on socket returns %d !!!\n", status);
+	    if(TRACE) fprintf(stderr,
+	    "HTWrite: Error: write() on socket returns %d !!!\n", status);
 	    return;
 	}
 	read_pointer = read_pointer + status;
@@ -103,7 +108,8 @@ PRIVATE void HTWriter_write ARGS3(HTStream *, me, CONST char*, s, int, l)
 	int status = NETWRITE(me->soc, (char *)read_pointer,
 			write_pointer - read_pointer);
 	if (status<0) {
-	    CTRACE(tfp, "HTWriter_write: Error on socket output stream!!!\n");
+	    if(TRACE) fprintf(stderr,
+	    "HTWriter_write: Error on socket output stream!!!\n");
 	    return;
 	}
 	read_pointer = read_pointer + status;