about summary refs log tree commit diff stats
path: root/WWW/Library/Implementation/HTNews.c
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>1999-09-29 11:47:35 -0400
committerThomas E. Dickey <dickey@invisible-island.net>1999-09-29 11:47:35 -0400
commit95586cc28c61df18b7a2cd2a9b3ee4c4c83aa583 (patch)
tree292eb191b3e53e39d8be1e1e546104122fbf1cfa /WWW/Library/Implementation/HTNews.c
parent2b52e9e64b2fc32242c207a0784521b2cf6d1976 (diff)
downloadlynx-snapshots-95586cc28c61df18b7a2cd2a9b3ee4c4c83aa583.tar.gz
snapshot of project "lynx", label v2-8-3dev_10
Diffstat (limited to 'WWW/Library/Implementation/HTNews.c')
-rw-r--r--WWW/Library/Implementation/HTNews.c98
1 files changed, 49 insertions, 49 deletions
diff --git a/WWW/Library/Implementation/HTNews.c b/WWW/Library/Implementation/HTNews.c
index 6c781e51..2cd431e1 100644
--- a/WWW/Library/Implementation/HTNews.c
+++ b/WWW/Library/Implementation/HTNews.c
@@ -196,16 +196,16 @@ PRIVATE BOOL initialize NOARGS
 #else
     if (getenv("NNTPSERVER")) {
 	StrAllocCopy(HTNewsHost, (char *)getenv("NNTPSERVER"));
-	CTRACE(tfp, "HTNews: NNTPSERVER defined as `%s'\n",
-		    HTNewsHost);
+	CTRACE((tfp, "HTNews: NNTPSERVER defined as `%s'\n",
+		    HTNewsHost));
     } else {
 	char server_name[256];
 	FILE* fp = fopen(SERVER_FILE, "r");
 	if (fp) {
 	    if (fscanf(fp, "%s", server_name)==1) {
 		StrAllocCopy(HTNewsHost, server_name);
-		CTRACE(tfp, "HTNews: File %s defines news host as `%s'\n",
-			    SERVER_FILE, HTNewsHost);
+		CTRACE((tfp, "HTNews: File %s defines news host as `%s'\n",
+			    SERVER_FILE, HTNewsHost));
 	    }
 	    fclose(fp);
 	}
@@ -240,7 +240,7 @@ PRIVATE int response ARGS1(CONST char *,command)
     if (command) {
 	int status;
 	int length = strlen(command);
-	CTRACE(tfp, "NNTP command to be sent: %s", command);
+	CTRACE((tfp, "NNTP command to be sent: %s", command));
 #ifdef NOT_ASCII
 	{
 	    CONST char	* p;
@@ -255,7 +255,7 @@ PRIVATE int response ARGS1(CONST char *,command)
 	status = NEWS_NETWRITE(s, (char *)command, length);
 #endif /* NOT_ASCII */
 	if (status < 0){
-	    CTRACE(tfp, "HTNews: Unable to send command. Disconnecting.\n");
+	    CTRACE((tfp, "HTNews: Unable to send command. Disconnecting.\n"));
 	    NEWS_NETCLOSE(s);
 	    s = -1;
 	    return status;
@@ -267,7 +267,7 @@ PRIVATE int response ARGS1(CONST char *,command)
 	if (((*p++ = (char) ich) == LF) ||
 	    (p == &response_text[LINE_LENGTH])) {
 	    *--p = '\0';			/* Terminate the string */
-	    CTRACE(tfp, "NNTP Response: %s\n", response_text);
+	    CTRACE((tfp, "NNTP Response: %s\n", response_text));
 	    sscanf(response_text, "%d", &result);
 	    return result;
 	} /* if end of line */
@@ -275,11 +275,11 @@ PRIVATE int response ARGS1(CONST char *,command)
 	if (ich == EOF) {
 	    *(p-1) = '\0';
 	    if (interrupted_in_htgetcharacter) {
-		CTRACE(tfp, "HTNews: Interrupted on read, closing socket %d\n",
-			    s);
+		CTRACE((tfp, "HTNews: Interrupted on read, closing socket %d\n",
+			    s));
 	    } else {
-		CTRACE(tfp, "HTNews: EOF on read, closing socket %d\n",
-			    s);
+		CTRACE((tfp, "HTNews: EOF on read, closing socket %d\n",
+			    s));
 	    }
 	    NEWS_NETCLOSE(s);	/* End of file, close socket */
 	    s = -1;
@@ -566,7 +566,7 @@ PRIVATE char * author_name ARGS1 (char *,email)
     char *p, *e;
 
     StrAllocCopy(name, email);
-    CTRACE(tfp,"Trying to find name in: %s\n",name);
+    CTRACE((tfp,"Trying to find name in: %s\n",name));
 
     if ((p = strrchr(name, '(')) && (e = strrchr(name, ')'))) {
 	if (e > p) {
@@ -602,7 +602,7 @@ PRIVATE char * author_address ARGS1(char *,email)
     char *p, *at, *e;
 
     StrAllocCopy(address, email);
-    CTRACE(tfp,"Trying to find address in: %s\n",address);
+    CTRACE((tfp,"Trying to find address in: %s\n",address));
 
     if ((p = strrchr(address, '<'))) {
 	if ((e = strrchr(p, '>')) && (at = strrchr(p, '@'))) {
@@ -774,7 +774,7 @@ PRIVATE void write_anchors ARGS1 (char *,text)
 */
 PRIVATE void abort_socket NOARGS
 {
-    CTRACE(tfp, "HTNews: EOF on read, closing socket %d\n", s);
+    CTRACE((tfp, "HTNews: EOF on read, closing socket %d\n", s));
     NEWS_NETCLOSE(s);	/* End of file, close socket */
     if (rawtext) {
 	RAW_PUTS("Network Error: connection lost\n");
@@ -1060,8 +1060,8 @@ PRIVATE int read_article ARGS1(
 	    if (ich == EOF) {
 		if (interrupted_in_htgetcharacter) {
 		    interrupted_in_htgetcharacter = 0;
-		    CTRACE(tfp, "HTNews: Interrupted on read, closing socket %d\n",
-				s);
+		    CTRACE((tfp, "HTNews: Interrupted on read, closing socket %d\n",
+				s));
 		    NEWS_NETCLOSE(s);
 		    s = -1;
 		    return(HT_INTERRUPTED);
@@ -1071,7 +1071,7 @@ PRIVATE int read_article ARGS1(
 	    }
 	    if (((char)ich == LF) || (p == &line[LINE_LENGTH])) {
 		*--p = '\0';			/* Terminate the string */
-		CTRACE(tfp, "H %s\n", line);
+		CTRACE((tfp, "H %s\n", line));
 
 		if (line[0] == '\t' || line[0] == ' ') {
 		    int i = 0;
@@ -1390,8 +1390,8 @@ PRIVATE int read_article ARGS1(
 	if (ich == EOF) {
 	    if (interrupted_in_htgetcharacter) {
 		interrupted_in_htgetcharacter = 0;
-		CTRACE(tfp, "HTNews: Interrupted on read, closing socket %d\n",
-			    s);
+		CTRACE((tfp, "HTNews: Interrupted on read, closing socket %d\n",
+			    s));
 		NEWS_NETCLOSE(s);
 		s = -1;
 		return(HT_INTERRUPTED);
@@ -1401,7 +1401,7 @@ PRIVATE int read_article ARGS1(
 	}
 	if (((char)ich == LF) || (p == &line[LINE_LENGTH])) {
 	    *p++ = '\0';			/* Terminate the string */
-	    CTRACE(tfp, "B %s", line);
+	    CTRACE((tfp, "B %s", line));
 #if NEWS_DEBUG	/* 1997/11/09 (Sun) 15:56:11 */
 	    debug_print(line);	/* @@@ */
 #endif
@@ -1599,8 +1599,8 @@ PRIVATE int read_list ARGS1(char *, arg)
 	if (ich == EOF) {
 	    if (interrupted_in_htgetcharacter) {
 		interrupted_in_htgetcharacter = 0;
-		CTRACE(tfp, "HTNews: Interrupted on read, closing socket %d\n",
-			    s);
+		CTRACE((tfp, "HTNews: Interrupted on read, closing socket %d\n",
+			    s));
 		NEWS_NETCLOSE(s);
 		s = -1;
 		return(HT_INTERRUPTED);
@@ -1619,7 +1619,7 @@ PRIVATE int read_list ARGS1(char *, arg)
 		continue;
 	    }
 	} else if (p == &line[LINE_LENGTH]) {
-	    CTRACE(tfp, "b %.*s%c[...]\n", (LINE_LENGTH), line, ch);
+	    CTRACE((tfp, "b %.*s%c[...]\n", (LINE_LENGTH), line, ch));
 	    *p = '\0';
 	    if (ch == LF) {
 		;		/* Will be dealt with below */
@@ -1629,7 +1629,7 @@ PRIVATE int read_list ARGS1(char *, arg)
 	    } else if (strchr(line, ' ') == NULL &&
 		       strchr(line, '\t') == NULL) {
 		/* No separator found */
-		CTRACE(tfp, "HTNews..... group name too long, discarding.\n");
+		CTRACE((tfp, "HTNews..... group name too long, discarding.\n"));
 		skip_this_line = YES; /* ignore whole line */
 		continue;
 	    } else {
@@ -1641,7 +1641,7 @@ PRIVATE int read_list ARGS1(char *, arg)
 	if (ch == LF) {
 	    skip_rest_of_line = NO;	/* done, reset flag */
 	    *p = '\0';			/* Terminate the string */
-	    CTRACE(tfp, "B %s", line);
+	    CTRACE((tfp, "B %s", line));
 	    if (line[0] == '.') {
 		/*
 		**  End of article?
@@ -1750,8 +1750,8 @@ PRIVATE int read_group ARGS3(
     PUTC('\n');
 
     sscanf(response_text, " %d %d %d %d", &status, &count, &first, &last);
-    CTRACE(tfp, "Newsgroup status=%d, count=%d, (%d-%d) required:(%d-%d)\n",
-		status, count, first, last, first_required, last_required);
+    CTRACE((tfp, "Newsgroup status=%d, count=%d, (%d-%d) required:(%d-%d)\n",
+		status, count, first, last, first_required, last_required));
     if (last == 0) {
 	PUTS(gettext("\nNo articles in this group.\n"));
 	goto add_post;
@@ -1773,8 +1773,8 @@ PRIVATE int read_group ARGS3(
     if (last_required-first_required+1 > HTNewsMaxChunk) { /* Trim this block */
 	first_required = last_required-HTNewsChunkSize+1;
     }
-    CTRACE(tfp, "    Chunk will be (%d-%d)\n",
-		first_required, last_required);
+    CTRACE((tfp, "    Chunk will be (%d-%d)\n",
+		first_required, last_required));
 
     /*
     **	Set window title.
@@ -1798,7 +1798,7 @@ PRIVATE int read_group ARGS3(
 	    before = first_required-HTNewsChunkSize;
 	HTSprintf0(&dbuf, "%s%s/%d-%d", NewsHREF, groupName,
 				      before, first_required-1);
-	CTRACE(tfp, "    Block before is %s\n", dbuf);
+	CTRACE((tfp, "    Block before is %s\n", dbuf));
 	PUTC('(');
 	start_anchor(dbuf);
 	PUTS(gettext("Earlier articles"));
@@ -1828,8 +1828,8 @@ PRIVATE int read_group ARGS3(
 		if (ich == EOF) {
 		    if (interrupted_in_htgetcharacter) {
 			interrupted_in_htgetcharacter = 0;
-			CTRACE(tfp, "HTNews: Interrupted on read, closing socket %d\n",
-				    s);
+			CTRACE((tfp, "HTNews: Interrupted on read, closing socket %d\n",
+				    s));
 			NEWS_NETCLOSE(s);
 			s = -1;
 			return(HT_INTERRUPTED);
@@ -1839,7 +1839,7 @@ PRIVATE int read_group ARGS3(
 		}
 		if (((char)ich == '\n') || (p == &line[LINE_LENGTH])) {
 		    *p = '\0';		/* Terminate the string */
-		    CTRACE(tfp, "X %s", line);
+		    CTRACE((tfp, "X %s", line));
 		    if (line[0] == '.') {
 			/*
 			**  End of article?
@@ -1932,8 +1932,8 @@ PRIVATE int read_group ARGS3(
 		    if (ich == EOF) {
 			if (interrupted_in_htgetcharacter) {
 			    interrupted_in_htgetcharacter = 0;
-			    CTRACE(tfp, "HTNews: Interrupted on read, closing socket %d\n",
-					s);
+			    CTRACE((tfp, "HTNews: Interrupted on read, closing socket %d\n",
+					s));
 			    NEWS_NETCLOSE(s);
 			    s = -1;
 			    return(HT_INTERRUPTED);
@@ -1946,7 +1946,7 @@ PRIVATE int read_group ARGS3(
 
 			*--p = '\0';		/* Terminate  & chop LF*/
 			p = line;		/* Restart at beginning */
-			CTRACE(tfp, "G %s\n", line);
+			CTRACE((tfp, "G %s\n", line));
 			switch(line[0]) {
 
 			case '.':
@@ -2045,8 +2045,8 @@ PRIVATE int read_group ARGS3(
 		*/
 	    } else if (status == HT_INTERRUPTED) {
 		interrupted_in_htgetcharacter = 0;
-		CTRACE(tfp, "HTNews: Interrupted on read, closing socket %d\n",
-			    s);
+		CTRACE((tfp, "HTNews: Interrupted on read, closing socket %d\n",
+			    s));
 		NEWS_NETCLOSE(s);
 		s = -1;
 		return(HT_INTERRUPTED);
@@ -2087,7 +2087,7 @@ PRIVATE int read_group ARGS3(
 	else
 	    HTSprintf0(&dbuf, "%s%s/%d-%d", NewsHREF, groupName,
 					  last_required+1, after);
-	CTRACE(tfp, "    Block after is %s\n", dbuf);
+	CTRACE((tfp, "    Block after is %s\n", dbuf));
 	PUTC('(');
 	start_anchor(dbuf);
 	PUTS(gettext("Later articles"));
@@ -2158,7 +2158,7 @@ PRIVATE int HTLoadNews ARGS4(
 		  format_out == HTAtom_for("www/dump"));
     rawtext = NO;
 
-    CTRACE(tfp, "HTNews: Looking for %s\n", arg);
+    CTRACE((tfp, "HTNews: Looking for %s\n", arg));
 
     if (!initialized)
 	initialized = initialize();
@@ -2361,8 +2361,8 @@ PRIVATE int HTLoadNews ARGS4(
 	    sprintf(proxycmd, "GET %.*s%c%c%c%c",
 		    (int) sizeof(proxycmd)-9, command,
 		    CR, LF, CR, LF);
-	    CTRACE(tfp, "HTNews: Proxy command is '%.*s'\n",
-			(int)(strlen(proxycmd) - 4), proxycmd);
+	    CTRACE((tfp, "HTNews: Proxy command is '%.*s'\n",
+			(int)(strlen(proxycmd) - 4), proxycmd));
 	    strcat(command, "/");
 	    StrAllocCopy(ProxyHREF, NewsHREF);
 	    StrAllocCopy(NewsHREF, command);
@@ -2503,7 +2503,7 @@ PRIVATE int HTLoadNews ARGS4(
 	    } else {
 		SnipIn (url, "%.*s", 1, NewsHREF);
 	    }
-	    CTRACE (tfp, "News: doing HTDoConnect on '%s'\n", url);
+	    CTRACE((tfp, "News: doing HTDoConnect on '%s'\n", url));
 
 	    _HTProgress(gettext("Connecting to NewsHost ..."));
 
@@ -2512,7 +2512,7 @@ PRIVATE int HTLoadNews ARGS4(
 		/*
 		**  Interrupt cleanly.
 		*/
-		CTRACE(tfp, "HTNews: Interrupted on connect; recovering cleanly.\n");
+		CTRACE((tfp, "HTNews: Interrupted on connect; recovering cleanly.\n"));
 		_HTProgress(CONNECTION_INTERRUPTED);
 		if (!(post_wanted || reply_wanted ||
 		      spost_wanted || sreply_wanted)) {
@@ -2532,7 +2532,7 @@ PRIVATE int HTLoadNews ARGS4(
 	    if (status < 0) {
 		NEWS_NETCLOSE(s);
 		s = -1;
-		CTRACE(tfp, "HTNews: Unable to connect to news host.\n");
+		CTRACE((tfp, "HTNews: Unable to connect to news host.\n"));
 		if (retries < 1)
 		    continue;
 		if (!(post_wanted || reply_wanted ||
@@ -2551,13 +2551,13 @@ PRIVATE int HTLoadNews ARGS4(
 		}
 		return HTLoadError(stream, 500, dbuf);
 	    } else {
-		CTRACE(tfp, "HTNews: Connected to news host %s.\n",
-			    NewsHost);
+		CTRACE((tfp, "HTNews: Connected to news host %s.\n",
+			    NewsHost));
 		HTInitInput(s);		/* set up buffering */
 		if (proxycmd[0]) {
 		    status = NEWS_NETWRITE(s, proxycmd, strlen(proxycmd));
-		    CTRACE(tfp, "HTNews: Proxy command returned status '%d'.\n",
-				status);
+		    CTRACE((tfp, "HTNews: Proxy command returned status '%d'.\n",
+				status));
 		}
 		if (((status = response(NULL)) / 100) != 2) {
 			NEWS_NETCLOSE(s);