command[259] = '\0';
command[sizeof(command)-1] = '\0';
PRIVATE int HTLoadNews ARGS4(	CONST char *,		arg,	HTParentAnchor *,	anAnchor,	HTFormat,		format_out,	HTStream*,		stream){    char command[260];			/* The whole command */    char proxycmd[260]; 		/* The proxy command */    char groupName[GROUP_NAME_LENGTH];	/* Just the group name */    int status; 			/* tcp return */    int retries;			/* A count of how hard we have tried */    BOOL group_wanted;		/* Flag: group was asked for, not article */    BOOL list_wanted;		/* Flag: list was asked for, not article */    BOOL post_wanted;		/* Flag: new post to group was asked for */    BOOL reply_wanted;		/* Flag: followup post was asked for */    BOOL spost_wanted;		/* Flag: new SSL post to group was asked for */    BOOL sreply_wanted; 	/* Flag: followup SSL post was asked for */    BOOL head_wanted = NO;	/* Flag: want HEAD of single article */    int first, last;		/* First and last articles asked for */    char *cp = 0;    char *ListArg = NULL;    char *ProxyHost = NULL;    char *ProxyHREF = NULL;    char *postfile = NULL;    diagnostic = (format_out == WWW_SOURCE ||	/* set global flag */		  format_out == HTAtom_for("www/download") ||		  format_out == HTAtom_for("www/dump"));    rawtext = NO;    CTRACE(tfp, "HTNews: Looking for %s\n", arg);    if (!initialized)	initialized = initialize();    if (!initialized)	return -1;	/* FAIL */    FREE(NewsHREF);    command[0] = '\0';    command[259] = '\0';    proxycmd[0] = '\0';    proxycmd[259] = '\0';    {	CONST char * p1 = arg;	/*	**  We will ask for the document, omitting the host name & anchor.	**	**  Syntax of address is	**	xxx@yyy 		Article	**	<xxx@yyy>		Same article	**	xxxxx			News group (no "@")	**	group/n1-n2		Articles n1 to n2 in group	*/	spost_wanted = (strstr(arg, "snewspost:") != NULL);	sreply_wanted = (!(spost_wanted) &&			 strstr(arg, "snewsreply:") != NULL);	post_wanted = (!(spost_wanted || sreply_wanted) &&			strstr(arg, "newspost:") != NULL);	reply_wanted = (!(spost_wanted || sreply_wanted ||			  post_wanted) &&			strstr(arg, "newsreply:") != NULL);	group_wanted = (!(spost_wanted || sreply_wanted ||			  post_wanted || reply_wanted) &&			strchr(arg, '@') == NULL) && (strchr(arg, '*') == NULL);	list_wanted  = (!(spost_wanted || sreply_wanted ||			  post_wanted || reply_wanted ||			  group_wanted) &&			strchr(arg, '@') == NULL) && (strchr(arg, '*') != NULL);#ifndef USE_SSL	if (!strncasecomp(arg, "snewspost:", 10) ||	    !strncasecomp(arg, "snewsreply:", 11)) {	    HTAlert(FAILED_CANNOT_POST_SSL);	    return HT_NOT_LOADED;	}#endif /* !USE_SSL */	if (post_wanted || reply_wanted || spost_wanted || sreply_wanted) {	    /*	    **	Make sure we have a non-zero path for the newsgroup(s). - FM	    */	    if ((p1 = strrchr(arg, '/')) != NULL) {		p1++;	    } else if ((p1 = strrchr(arg, ':')) != NULL) {		p1++;	    }	    if (!(p1 && *p1)) {		HTAlert(WWW_ILLEGAL_URL_MESSAGE);		return(HT_NO_DATA);	    }	    if (!(cp = HTParse(arg, "", PARSE_HOST)) || *cp == '\0') {		if (s >= 0 && NewsHost && strcasecomp(NewsHost, HTNewsHost)) {		    NEWS_NETCLOSE(s);		    s = -1;		}		StrAllocCopy(NewsHost, HTNewsHost);	    } else {		if (s >= 0 && NewsHost && strcasecomp(NewsHost, cp)) {		    NEWS_NETCLOSE(s);		    s = -1;		}		StrAllocCopy(NewsHost, cp);	    }	    FREE(cp);	    sprintf(command, "%s://%.245s/",			     (post_wanted ?			       "newspost" :			    (reply_wanted ?			       "newreply" :			    (spost_wanted ?			      "snewspost" : "snewsreply"))), NewsHost);	    StrAllocCopy(NewsHREF, command);	    /*	    **	If the SSL daemon is being used as a proxy,	    **	reset p1 to the start of the proxied URL	    **	rather than to the start of the newsgroup(s). - FM	    */	    if (spost_wanted && strncasecomp(arg, "snewspost:", 10))		p1 = strstr(arg, "snewspost:");	    if (sreply_wanted && strncasecomp(arg, "snewsreply:", 11))		p1 = strstr(arg, "snewsreply:");	/* p1 = HTParse(arg, "", PARSE_PATH | PARSE_PUNCTUATION); */	/*	**  Don't use HTParse because news: access doesn't follow traditional	**  rules.  For instance, if the article reference contains a '#',	**  the rest of it is lost -- JFG 10/7/92, from a bug report	*/	} else if (!strncasecomp (arg, "nntp:", 5)) {	    if (((*(arg + 5) == '\0') ||		 (!strcmp((arg + 5), "/") ||		  !strcmp((arg + 5), "//") ||		  !strcmp((arg + 5), "///"))) ||		((!strncmp((arg + 5), "//", 2)) &&		 (!(cp = strchr((arg + 7), '/')) || *(cp + 1) == '\0'))) {		p1 = "*";		group_wanted = FALSE;		list_wanted = TRUE;	    } else if (*(arg + 5) != '/') {		p1 = (arg + 5);	    } else if (*(arg + 5) == '/' && *(arg + 6) != '/') {		p1 = (arg + 6);	    } else {		p1 = (cp + 1);	    }	    if (!(cp = HTParse(arg, "", PARSE_HOST)) || *cp == '\0') {		if (s >= 0 && NewsHost && strcasecomp(NewsHost, HTNewsHost)) {		    NEWS_NETCLOSE(s);		    s = -1;		}		StrAllocCopy(NewsHost, HTNewsHost);	    } else {		if (s >= 0 && NewsHost && strcasecomp(NewsHost, cp)) {		    NEWS_NETCLOSE(s);		    s = -1;		}		StrAllocCopy(NewsHost, cp);	    }	    FREE(cp);	    sprintf(command, "nntp://%.251s/", NewsHost);	    StrAllocCopy(NewsHREF, command);	}	else if (!strncasecomp(arg, "snews:", 6)) {#ifdef USE_SSL	    if (((*(arg + 6) == '\0') ||		 (!strcmp((arg + 6), "/") ||		  !strcmp((arg + 6), "//") ||		  !strcmp((arg + 6), "///"))) ||		((!strncmp((arg + 6), "//", 2)) &&		 (!(cp = strchr((arg + 8), '/')) || *(cp + 1) == '\0'))) {		p1 = "*";		group_wanted = FALSE;		list_wanted = TRUE;	    } else if (*(arg + 6) != '/') {		p1 = (arg + 6);	    } else if (*(arg + 6) == '/' && *(arg + 7) != '/') {		p1 = (arg + 7);	    } else {		p1 = (cp + 1);	    }	    if (!(cp = HTParse(arg, "", PARSE_HOST)) || *cp == '\0') {		if (s >= 0 && NewsHost && strcasecomp(NewsHost, HTNewsHost)) {		    NEWS_NETCLOSE(s);		    s = -1;		}		StrAllocCopy(NewsHost, HTNewsHost);	    } else {		if (s >= 0 && NewsHost && strcasecomp(NewsHost, cp)) {		    NEWS_NETCLOSE(s);		    s = -1;		}	    StrAllocCopy(NewsHost, cp);	    }	    FREE(cp);	    sprintf(command, "snews://%.250s/", NewsHost);	    StrAllocCopy(NewsHREF, command);#else	    HTAlert(gettext("This client does not contain support for SNEWS URLs."));	    return HT_NOT_LOADED;#endif /* USE_SSL */	}	else if (!strncasecomp (arg, "news:/", 6)) {	    if (((*(arg + 6) == '\0') ||		 !strcmp((arg + 6), "/") ||		 !strcmp((arg + 6), "//")) ||		((*(arg + 6) == '/') &&		 (!(cp = strchr((arg + 7), '/')) || *(cp + 1) == '\0'))) {		p1 = "*";		group_wanted = FALSE;		list_wanted = TRUE;	    } else if (*(arg + 6) != '/') {		p1 = (arg + 6);	    } else {		p1 = (cp + 1);	    }	    if (!(cp = HTParse(arg, "", PARSE_HOST)) || *cp == '\0') {		if (s >= 0 && NewsHost && strcasecomp(NewsHost, HTNewsHost)) {		    NEWS_NETCLOSE(s);		    s = -1;		}		StrAllocCopy(NewsHost, HTNewsHost);	    } else {		if (s >= 0 && NewsHost && strcasecomp(NewsHost, cp)) {		    NEWS_NETCLOSE(s);		    s = -1;		}		StrAllocCopy(NewsHost, cp);	    }	    FREE(cp);	    sprintf(command, "news://%.251s/", NewsHost);	    StrAllocCopy(NewsHREF, command);	} else {	    p1 = (arg + 5);  /* Skip "news:" prefix */	    if (*p1 == '\0') {		p1 = "*";		group_wanted = FALSE;		list_wanted = TRUE;	    }	    if (s >= 0 && NewsHost && strcasecomp(NewsHost, HTNewsHost)) {		NEWS_NETCLOSE(s);		s = -1;	    }	    StrAllocCopy(NewsHost, HTNewsHost);	    StrAllocCopy(NewsHREF, "news:");	}	/*	**  Set up any proxy for snews URLs that returns NNTP	**  responses for Lynx to convert to HTML, instead of	**  doing the conversion itself, and for handling posts	**  or followups.  - TZ & FM	*/	if (!strncasecomp(p1, "snews:", 6) ||	    !strncasecomp(p1, "snewspost:", 10) ||	    !strncasecomp(p1, "snewsreply:", 11)) {	    StrAllocCopy(ProxyHost, NewsHost);	    if ((cp = HTParse(p1, "", PARSE_HOST)) != NULL && *cp != '\0') {		sprintf(command, "snews://%.250s", cp);		StrAllocCopy(NewsHost, cp);	    } else {		sprintf(command, "snews://%.250s", NewsHost);	    }	    command[258] = '\0';	    FREE(cp);	    sprintf(proxycmd, "GET %.251s%c%c%c%c", command, CR, LF, CR, LF);	    CTRACE(tfp, "HTNews: Proxy command is '%.*s'\n",			(int)(strlen(proxycmd) - 4), proxycmd);	    strcat(command, "/");	    StrAllocCopy(ProxyHREF, NewsHREF);	    StrAllocCopy(NewsHREF, command);	    if (spost_wanted || sreply_wanted) {		/*		**  Reset p1 so that it points to the newsgroup(s).		*/		if ((p1 = strrchr(arg, '/')) != NULL) {		    p1++;		} else {		    p1 = (strrchr(arg, ':') + 1);		}	    } else {		/*		**  Reset p1 so that it points to the newgroup		**  (or a wildcard), or the article.		*/		if (!(cp = strrchr((p1 + 6), '/')) || *(cp + 1) == '\0') {		    p1 = "*";		    group_wanted = FALSE;		    list_wanted = TRUE;		} else {		    p1 = (cp + 1);		}	    }	}	/*	**  Set up command for a post, listing, or article request. - FM	*/	if (post_wanted || reply_wanted || spost_wanted || sreply_wanted) {	    strcpy(command, "POST");	} else if (list_wanted) {	    sprintf(command, "XGTITLE %.*s", 249, p1);	} else if (group_wanted) {	    char * slash = strchr(p1, '/');	    strcpy(command, "GROUP ");	    first = 0;	    last = 0;	    if (slash) {		*slash = '\0';		strcpy(groupName, p1);		*slash = '/';		(void)sscanf(slash+1, "%d-%d", &first, &last);		if ((first > 0) && (isdigit(*(slash+1))) &&		    (strchr(slash+1, '-') == NULL || first == last)) {		    /*		    **	We got a number greater than 0, which will be		    **	loaded as first, and either no range or the		    **	range computes to zero, so make last negative,		    **	as a flag to select the group and then fetch		    **	an article by number (first) instead of by		    **	messageID. - FM		    */		    last = -1;		}	    } else {		strcpy(groupName, p1);	    }	    strcat(command, groupName);	} else {	    strcpy(command, "ARTICLE ");	    if (strchr(p1, '<') == 0)		strcat(command,"<");	    strcat(command, p1);	    if (strchr(p1, '>') == 0)		strcat(command,">");	}	{	    char * p = command + strlen(command);	    /*	    **	Terminate command with CRLF, as in RFC 977.	    */	    *p++ = CR;		/* Macros to be correct on Mac */	    *p++ = LF;	    *p++ = 0;	}	StrAllocCopy(ListArg, p1);    } /* scope of p1 */    if (!*arg) {	FREE(NewsHREF);	FREE(ProxyHost);	FREE(ProxyHREF);	FREE(ListArg);	return NO;			/* Ignore if no name */    }    if (!(post_wanted || reply_wanted || spost_wanted || sreply_wanted ||	  (group_wanted && last != -1) || list_wanted)) {	head_wanted = anAnchor->isHEAD;	if (head_wanted && !strncmp(command, "ARTICLE_", 8)) {	    /* overwrite "ARTICLE" - hack... */	    strcpy(command, "HEAD ");	    for (cp = command + 5; ; cp++)		if ((*cp = *(cp + 3)) == '\0')		    break;	}	rawtext = (head_wanted || keep_mime_headers);    }    if (rawtext) {	node_anchor = anAnchor;	rawtarget = HTStreamStack(WWW_PLAINTEXT,				  format_out,				  stream, anAnchor);	if (!rawtarget) {	    FREE(NewsHost);	    FREE(NewsHREF);	    FREE(ProxyHost);	    FREE(ProxyHREF);	    FREE(ListArg);	    HTAlert(gettext("No target for raw text!"));	    return(HT_NOT_LOADED);	}	/* Copy routine entry points */	rawtargetClass = *rawtarget->isa;    } else    /*    **	Make a hypertext object with an anchor list.    */    if (!(post_wanted || reply_wanted || spost_wanted || sreply_wanted)) {	node_anchor = anAnchor;	target = HTML_new(anAnchor, format_out, stream);	targetClass = *target->isa;	/* Copy routine entry points */    }    /*    **	Now, let's get a stream setup up from the NewsHost.    */    for (retries = 0; retries < 2; retries++) {	if (s < 0) {	    /* CONNECTING to news host */	    char url[260];	    if (!strcmp(NewsHREF, "news:")) {		sprintf (url, "lose://%.251s/", NewsHost);	    } else if (ProxyHREF) {		sprintf (url, "%.259s", ProxyHREF);	    } else {		sprintf (url, "%.259s", NewsHREF);	    }	    CTRACE (tfp, "News: doing HTDoConnect on '%s'\n", url);	    _HTProgress(gettext("Connecting to NewsHost ..."));#ifdef USE_SSL	    if (!using_proxy &&		(!strncmp(arg, "snews:", 6) ||		 !strncmp(arg, "snewspost:", 10) ||		 !strncmp(arg, "snewsreply:", 11)))		status = HTDoConnect (url, "NNTPS", SNEWS_PORT, &s);	    else		status = HTDoConnect (url, "NNTP", NEWS_PORT, &s);#else	    status = HTDoConnect (url, "NNTP", NEWS_PORT, &s);#endif /* USE_SSL */	    if (status == HT_INTERRUPTED) {		/*		**  Interrupt cleanly.		*/		CTRACE(tfp, "HTNews: Interrupted on connect; recovering cleanly.\n");		_HTProgress(CONNECTION_INTERRUPTED);		if (!(post_wanted || reply_wanted ||		      spost_wanted || sreply_wanted)) {		    ABORT_TARGET;		}		FREE(NewsHost);		FREE(NewsHREF);		FREE(ProxyHost);		FREE(ProxyHREF);		FREE(ListArg);#ifdef USE_SSL		if (Handle) {		    SSL_free(Handle);		    Handle = NULL;		}#endif /* USE_SSL */		if (postfile) {		    HTSYS_remove(postfile);		    FREE(postfile);		}		return HT_NOT_LOADED;	    }	    if (status < 0) {		NEWS_NETCLOSE(s);		s = -1;		CTRACE(tfp, "HTNews: Unable to connect to news host.\n");		if (retries < 1)		    continue;		if (!(post_wanted || reply_wanted ||		      spost_wanted || sreply_wanted)) {		    ABORT_TARGET;		}		HTSprintf0(&dbuf, gettext("Could not access %s."), NewsHost);		FREE(NewsHost);		FREE(NewsHREF);		FREE(ProxyHost);		FREE(ProxyHREF);		FREE(ListArg);		if (postfile) {		    HTSYS_remove(postfile);		    FREE(postfile);		}		return HTLoadError(stream, 500, dbuf);	    } else {		CTRACE(tfp, "HTNews: Connected to news host %s.\n",			    NewsHost);#ifdef USE_SSL		/*		**  If this is an snews url,		**  then do the SSL stuff here		*/		if (!using_proxy &&		    (!strncmp(url, "snews", 5) ||		     !strncmp(url, "snewspost:", 10) ||		     !strncmp(url, "snewsreply:", 11))) {		    Handle = HTGetSSLHandle();		    SSL_set_fd(Handle, s);		    status = SSL_connect(Handle);		    if (status <= 0) {			CTRACE(tfp,"HTNews: Unable to complete SSL handshake for remote host '%s' (SSLerror = %d)\n",			       url, status);			HTAlert(			    "Unable to make secure connection to remote host.");			NEWS_NETCLOSE(s);			s = -1;			if (!(post_wanted || reply_wanted ||			      spost_wanted || sreply_wanted))			    (*targetClass._abort)(target, NULL);			FREE(NewsHost);			FREE(NewsHREF);			FREE(ProxyHost);			FREE(ProxyHREF);			FREE(ListArg);			if (postfile) {#ifdef VMS			    while (remove(postfile) == 0)			    ; /* loop through all versions */#else			    remove(postfile);#endif /* VMS */			    FREE(postfile);			}			return HT_NOT_LOADED;		    }		    _HTProgress(SSL_get_cipher(Handle));		}#endif /* USE_SSL */		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);		}		if (((status = response(NULL)) / 100) != 2) {			NEWS_NETCLOSE(s);			s = -1;			if (status == HT_INTERRUPTED) {			    _HTProgress(CONNECTION_INTERRUPTED);			    if (!(post_wanted || reply_wanted ||				  spost_wanted || sreply_wanted)) {				ABORT_TARGET;			    }			    FREE(NewsHost);			    FREE(NewsHREF);			    FREE(ProxyHost);			    FREE(ProxyHREF);			    FREE(ListArg);			    if (postfile) {				HTSYS_remove(postfile);				FREE(postfile);			    }			    return(HT_NOT_LOADED);			}			if (retries < 1)			    continue;			if (!(post_wanted || reply_wanted ||			      spost_wanted || sreply_wanted)) {			    ABORT_TARGET;			}			HTSprintf0(&dbuf,				gettext("Can't read news info.  News host %.20s responded: %.200s"),				NewsHost, response_text);			return HTLoadError(stream, 500, dbuf);		}		if (status == 200) {		    HTCanPost = TRUE;		} else {		    HTCanPost = FALSE;		    if (post_wanted || reply_wanted ||			spost_wanted || sreply_wanted) {			HTAlert(CANNOT_POST);			FREE(NewsHREF);			if (ProxyHREF) {			    StrAllocCopy(NewsHost, ProxyHost);			    FREE(ProxyHost);			    FREE(ProxyHREF);			}			FREE(ListArg);			if (postfile) {			    HTSYS_remove(postfile);			    FREE(postfile);			}			return(HT_NOT_LOADED);		    }		}	    }	} /* If needed opening */	if (post_wanted || reply_wanted ||	     spost_wanted || sreply_wanted) {	    if (!HTCanPost) {		HTAlert(CANNOT_POST);		FREE(NewsHREF);		if (ProxyHREF) {		    StrAllocCopy(NewsHost, ProxyHost);		    FREE(ProxyHost);		    FREE(ProxyHREF);		}		FREE(ListArg);		if (postfile) {		    HTSYS_remove(postfile);		    FREE(postfile);		}		return(HT_NOT_LOADED);	    }	    if (postfile == NULL) {		postfile = LYNewsPost(ListArg, (reply_wanted || sreply_wanted));	    }	    if (postfile == NULL) {		HTProgress(CANCELLED);		FREE(NewsHREF);		if (ProxyHREF) {		    StrAllocCopy(NewsHost, ProxyHost);		    FREE(ProxyHost);		    FREE(ProxyHREF);		}		FREE(ListArg);		return(HT_NOT_LOADED);	    }	} else {	    /*	    **	Ensure reader mode, but don't bother checking the	    **	status for anything but HT_INTERRUPTED or a 480	    **	Authorization request, because if the reader mode	    **	command is not needed, the server probably returned	    **	a 500, which is irrelevant at this point. - FM	    */	    char buffer[20];	    sprintf(buffer, "mode reader%c%c", CR, LF);	    if ((status = response(buffer)) == HT_INTERRUPTED) {		_HTProgress(CONNECTION_INTERRUPTED);		break;	    }	    if (status == 480) {		NNTPAuthResult auth_result = HTHandleAuthInfo(NewsHost);		if (auth_result == NNTPAUTH_CLOSE) {		    if (s != -1 && !(ProxyHost || ProxyHREF)) {			NEWS_NETCLOSE(s);			s = -1;		    }		}		if (auth_result != NNTPAUTH_OK) {		    break;		}		if ((status = response(buffer)) == HT_INTERRUPTED) {		    _HTProgress(CONNECTION_INTERRUPTED);		    break;		}	    }	}Send_NNTP_command:	if ((status = response(command)) == HT_INTERRUPTED) {	    _HTProgress(CONNECTION_INTERRUPTED);	    break;	}	if (status < 0) {	    if (retries < 1) {		continue;	    } else {		break;	    }	}	/*	 *  For some well known error responses which are expected	 *  to occur in normal use, break from the loop without retrying	 *  and without closing the connection.  It is unlikely that	 *  these are leftovers from a timed-out connection (but we do	 *  some checks to see whether the response rorresponds to the	 *  last command), or that they will give anything else when	 *  automatically retried.  - kw	 */	if (status == 411 && group_wanted &&	    !strncmp(command, "GROUP ", 6) &&	    !strncasecomp(response_text + 3, " No such group ", 15) &&	    !strcmp(response_text + 18, groupName)) {	    HTAlert(response_text);	    break;	} else if (status == 430 && !group_wanted && !list_wanted &&	    !strncmp(command, "ARTICLE <", 9) &&	    !strcasecomp(response_text + 3, " No such article")) {	    HTAlert(response_text);	    break;	}	if ((status/100) != 2 &&	    status != 340 &&	    status != 480) {	    if (retries) {		if (list_wanted && !strncmp(command, "XGTITLE", 7)) {		    sprintf(command, "LIST NEWSGROUPS%c%c", CR, LF);		    goto Send_NNTP_command;		}		HTAlert(response_text);	    } else {		_HTProgress(response_text);	    }	    NEWS_NETCLOSE(s);	    s = -1;	    /*	    **	Message might be a leftover "Timeout-disconnected",	    **	so try again if the retries maximum has not been	    **	reached.	    */	    continue;	}	/*	**  Post or load a group, article, etc	*/	if (status == 480) {	    NNTPAuthResult auth_result;	    /*	     *	Some servers return 480 for a failed XGTITLE. - FM	     */	    if (list_wanted && !strncmp(command, "XGTITLE", 7) &&		strstr(response_text, "uthenticat") == NULL &&		strstr(response_text, "uthor") == NULL) {		sprintf(command, "LIST NEWSGROUPS%c%c", CR, LF);		goto Send_NNTP_command;	    }	    /*	    **	Handle Authorization. - FM	    */	    if ((auth_result = HTHandleAuthInfo(NewsHost)) == NNTPAUTH_OK) {		goto Send_NNTP_command;	    } else if (auth_result == NNTPAUTH_CLOSE) {		if (s != -1 && !(ProxyHost || ProxyHREF)) {		    NEWS_NETCLOSE(s);		    s = -1;		}		if (retries < 1)		    continue;	    }	    status = HT_NOT_LOADED;	} else if (post_wanted || reply_wanted ||		   spost_wanted || sreply_wanted) {	    /*	    **	Handle posting of an article. - FM	    */	    if (status != 340) {		HTAlert(CANNOT_POST);		if (postfile) {		    HTSYS_remove(postfile);		}	    } else {		post_article(postfile);	    }	    FREE(postfile);	    status = HT_NOT_LOADED;	} else if (list_wanted) {	    /*	    **	List available newsgroups. - FM	    */	    _HTProgress(gettext("Reading list of available newsgroups."));	    status = read_list(ListArg);	} else if (group_wanted) {	    /*	    **	List articles in a news group. - FM	    */	    if (last < 0) {		/*		**  We got one article number rather than a range		**  following the slash which followed the group		**  name, or the range was zero, so now that we		**  have selected that group, load ARTICLE and the		**  the number (first) as the command and go back		**  to send it and check the response. - FM		*/		sprintf(command, "%s %d%c%c",			head_wanted ? "HEAD" : "ARTICLE",			first, CR, LF);		group_wanted = FALSE;		retries = 2;		goto Send_NNTP_command;	    }	    _HTProgress(gettext("Reading list of articles in newsgroup."));	    status = read_group(groupName, first, last);	} else {	    /*	    **	Get an article from a news group. - FM	    */	    _HTProgress(gettext("Reading news article."));	    status = read_article(anAnchor);	}	if (status == HT_INTERRUPTED) {	    _HTProgress(CONNECTION_INTERRUPTED);	    status = HT_LOADED;	}	if (!(post_wanted || reply_wanted ||	      spost_wanted || sreply_wanted)) {	    if (status == HT_NOT_LOADED) {		ABORT_TARGET;	    } else {		FREE_TARGET;	    }	}	FREE(NewsHREF);	if (ProxyHREF) {	    StrAllocCopy(NewsHost, ProxyHost);	    FREE(ProxyHost);	    FREE(ProxyHREF);	}	FREE(ListArg);	if (postfile) {	    HTSYS_remove(postfile);	    FREE(postfile);	}	return status;    } /* Retry loop */    /* HTAlert(gettext("Sorry, could not load requested news.")); *//*    NXRunAlertPanel(NULL, "Sorry, could not load `%s'.",	    NULL,NULL,NULL, arg);No -- message earlier wil have covered it */    if (!(post_wanted || reply_wanted ||	  spost_wanted || sreply_wanted)) {	ABORT_TARGET;    }    FREE(NewsHREF);    if (ProxyHREF) {	StrAllocCopy(NewsHost, ProxyHost);	FREE(ProxyHost);	FREE(ProxyHREF);    }    FREE(ListArg);    if (postfile) {	HTSYS_remove(postfile);	FREE(postfile);    }    return HT_NOT_LOADED;}