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>2000-03-13 00:59:01 -0500
committerThomas E. Dickey <dickey@invisible-island.net>2000-03-13 00:59:01 -0500
commitd70fdcf7f031566fd582362899099f9fba23a7ac (patch)
treece3bd362adcf7db4e41b32bafb52d855cfc097b4 /WWW/Library/Implementation/HTNews.c
parent184855c6f7b9e1727a8f419b475b1fffd9292911 (diff)
downloadlynx-snapshots-d70fdcf7f031566fd582362899099f9fba23a7ac.tar.gz
snapshot of project "lynx", label v2-8-3dev_22
Diffstat (limited to 'WWW/Library/Implementation/HTNews.c')
-rw-r--r--WWW/Library/Implementation/HTNews.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/WWW/Library/Implementation/HTNews.c b/WWW/Library/Implementation/HTNews.c
index 68457ffd..dcde38a3 100644
--- a/WWW/Library/Implementation/HTNews.c
+++ b/WWW/Library/Implementation/HTNews.c
@@ -229,7 +229,7 @@ PRIVATE BOOL initialize NOARGS
 **	Negative status indicates transmission error, socket closed.
 **	Positive status is an NNTP status.
 */
-PRIVATE int response ARGS1(CONST char *,command)
+PRIVATE int response ARGS1(char *,command)
 {
     int result;
     char * p = response_text;
@@ -358,10 +358,7 @@ PRIVATE NNTPAuthResult HTHandleAuthInfo ARGS1(
 
     while (tries) {
 	if (UserName == NULL) {
-	    if ((msg = (char *)calloc(1, (strlen(host) + 30))) == NULL) {
-		outofmem(__FILE__, "HTHandleAuthInfo");
-	    }
-	    sprintf(msg, gettext("Username for news host '%s':"), host);
+	    HTSprintf0(&msg, gettext("Username for news host '%s':"), host);
 	    UserName = HTPrompt(msg, NULL);
 	    FREE(msg);
 	    if (!(UserName && *UserName)) {
@@ -443,10 +440,7 @@ PRIVATE NNTPAuthResult HTHandleAuthInfo ARGS1(
 	tries = 3;
 	while (tries) {
 	    if (PassWord == NULL) {
-		if ((msg = (char *)calloc(1, (strlen(host) + 30))) == NULL) {
-		    outofmem(__FILE__, "HTHandleAuthInfo");
-		}
-		sprintf(msg, gettext("Password for news host '%s':"), host);
+		HTSprintf0(&msg, gettext("Password for news host '%s':"), host);
 		PassWord = HTPromptPassword(msg);
 		FREE(msg);
 		if (!(PassWord && *PassWord)) {
@@ -1698,10 +1692,12 @@ PRIVATE int read_list ARGS1(char *, arg)
 	} /* if end of line */
     } /* Loop over characters */
     if (!listing) {
+	char *msg = NULL;
 	START(HTML_DT);
-	sprintf(line, gettext("No matches for: %s"), arg);
-	PUTS(line);
+	HTSprintf0(&msg, gettext("No matches for: %s"), arg);
+	PUTS(msg);
 	MAYBE_END(HTML_DT);
+	FREE(msg);
     }
     END(HTML_DLC);
     PUTC('\n');
@@ -2033,7 +2029,7 @@ PRIVATE int read_group ARGS3(
 			    }
 			}
 		    }
-		    sprintf(buffer, " [%s]", date);
+		    sprintf(buffer, " [%.*s]", (int)(sizeof(buffer) - 4), date);
 		    PUTS(buffer);
 		    FREE(date);
 		}
@@ -2231,7 +2227,7 @@ PRIVATE int HTLoadNews ARGS4(
 		StrAllocCopy(NewsHost, cp);
 	    }
 	    FREE(cp);
-	    sprintf(command, "%s://%.*s/",
+	    HTSprintf0(&NewsHREF, "%s://%.*s/",
 			     (post_wanted ?
 			       "newspost" :
 			    (reply_wanted ?
@@ -2239,7 +2235,6 @@ PRIVATE int HTLoadNews ARGS4(
 			    (spost_wanted ?
 			      "snewspost" : "snewsreply"))),
 			    (int) sizeof(command) - 15, NewsHost);
-	    StrAllocCopy(NewsHREF, command);
 
 	    /*
 	    **	If the SSL daemon is being used as a proxy,