Fix even more warnings in libwww2
Now that -Wall is turned on, it's possible to remove all sort of unused / unread variables and even fix one case of a missing initialization.
This commit is contained in:
parent
39b76427ae
commit
62396c5250
@ -624,9 +624,6 @@ PRIVATE char *compose_auth_string ARGS2(HTAAScheme, scheme,
|
|||||||
/* for MD5 -- DXP */
|
/* for MD5 -- DXP */
|
||||||
char * nonce; /* Server specified integer value */
|
char * nonce; /* Server specified integer value */
|
||||||
char * opaque; /* more random MD5 junk... */
|
char * opaque; /* more random MD5 junk... */
|
||||||
BOOL stale; /* flag indicating the previous request
|
|
||||||
from the client was rejected because
|
|
||||||
the nonce value was stale */
|
|
||||||
|
|
||||||
|
|
||||||
FREE(result); /* From previous call */
|
FREE(result); /* From previous call */
|
||||||
|
@ -139,7 +139,6 @@ PRIVATE int get_physical ARGS3(
|
|||||||
int, bong)
|
int, bong)
|
||||||
{
|
{
|
||||||
char * access=NULL; /* Name of access method */
|
char * access=NULL; /* Name of access method */
|
||||||
char * physical = NULL;
|
|
||||||
char * host = NULL;
|
char * host = NULL;
|
||||||
struct Proxy *GetNoProxy();
|
struct Proxy *GetNoProxy();
|
||||||
extern int useKeepAlive;
|
extern int useKeepAlive;
|
||||||
@ -181,7 +180,6 @@ PRIVATE int get_physical ARGS3(
|
|||||||
if (!GetNoProxy(tmp_access, tmp_host)) {
|
if (!GetNoProxy(tmp_access, tmp_host)) {
|
||||||
char *gateway_parameter, *gateway, *proxy;
|
char *gateway_parameter, *gateway, *proxy;
|
||||||
struct Proxy *proxent = NULL, *GetProxy();
|
struct Proxy *proxent = NULL, *GetProxy();
|
||||||
extern struct Proxy *proxy_list;
|
|
||||||
char *proxyentry = NULL;
|
char *proxyentry = NULL;
|
||||||
|
|
||||||
proxy_host_fix=strdup(tmp_host);
|
proxy_host_fix=strdup(tmp_host);
|
||||||
|
@ -50,7 +50,6 @@ void HTCompressedFileToFile (char *fnam, int compressed)
|
|||||||
{
|
{
|
||||||
char *znam;
|
char *znam;
|
||||||
char *cmd;
|
char *cmd;
|
||||||
int len;
|
|
||||||
|
|
||||||
cmd=NULL;
|
cmd=NULL;
|
||||||
|
|
||||||
@ -177,8 +176,6 @@ void HTCompressedFileToFile (char *fnam, int compressed)
|
|||||||
void HTCompressedHText (HText *text, int compressed, int plain)
|
void HTCompressedHText (HText *text, int compressed, int plain)
|
||||||
{
|
{
|
||||||
char *fnam;
|
char *fnam;
|
||||||
char *znam;
|
|
||||||
char *cmd;
|
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
int rv, size_of_data;
|
int rv, size_of_data;
|
||||||
|
|
||||||
|
@ -254,7 +254,6 @@ PRIVATE int response (cmd)
|
|||||||
int messageStarted = 0;
|
int messageStarted = 0;
|
||||||
|
|
||||||
char *ptr;
|
char *ptr;
|
||||||
char bytestr[256],*byteptr;
|
|
||||||
int bytes;
|
int bytes;
|
||||||
|
|
||||||
if (!control || control == -1)
|
if (!control || control == -1)
|
||||||
@ -1169,12 +1168,11 @@ ARGS4 (
|
|||||||
HTAtom *pencoding;
|
HTAtom *pencoding;
|
||||||
char *filename = HTParse(address, "", PARSE_PATH + PARSE_PUNCTUATION);
|
char *filename = HTParse(address, "", PARSE_PATH + PARSE_PUNCTUATION);
|
||||||
char buffer[BUFSIZ];
|
char buffer[BUFSIZ];
|
||||||
char buf[BUFSIZ];
|
|
||||||
char itemtype;
|
char itemtype;
|
||||||
char itemname[BUFSIZ];
|
char itemname[BUFSIZ];
|
||||||
char itemsize[BUFSIZ];
|
char itemsize[BUFSIZ];
|
||||||
char *full_ftp_name, *ptr;
|
char *full_ftp_name, *ptr;
|
||||||
int count, ret, cmpr, c, rv;
|
int count, ret, cmpr, c='\0', rv;
|
||||||
extern char *HTgeticonname(HTFormat, char *);
|
extern char *HTgeticonname(HTFormat, char *);
|
||||||
char *ellipsis_string=(char *)calloc(1024,sizeof(char));
|
char *ellipsis_string=(char *)calloc(1024,sizeof(char));
|
||||||
#ifdef NEW_PARSE
|
#ifdef NEW_PARSE
|
||||||
@ -1182,7 +1180,6 @@ int nTime;
|
|||||||
char szDate[256];
|
char szDate[256];
|
||||||
int nStringLen;
|
int nStringLen;
|
||||||
int nSpaces;
|
int nSpaces;
|
||||||
int nOldSpaces;
|
|
||||||
char szFileInfo[32];
|
char szFileInfo[32];
|
||||||
char szMonth[32];
|
char szMonth[32];
|
||||||
char szDay[16];
|
char szDay[16];
|
||||||
@ -1310,9 +1307,7 @@ char szTime[32];
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!buffer || !*buffer) {
|
if (!*buffer) continue;
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (usingNLST==2) { /*only name*/
|
if (usingNLST==2) { /*only name*/
|
||||||
strcpy(itemname,buffer);
|
strcpy(itemname,buffer);
|
||||||
@ -1356,7 +1351,7 @@ char szTime[32];
|
|||||||
|
|
||||||
HText_appendText (HT, "<A HREF=\"");
|
HText_appendText (HT, "<A HREF=\"");
|
||||||
/* Assuming it's a relative reference... */
|
/* Assuming it's a relative reference... */
|
||||||
if (itemname && itemname[0] != '/')
|
if (itemname[0] != '/')
|
||||||
{
|
{
|
||||||
HText_appendText (HT, filename);
|
HText_appendText (HT, filename);
|
||||||
if (filename[strlen(filename)-1] != '/')
|
if (filename[strlen(filename)-1] != '/')
|
||||||
@ -1484,7 +1479,6 @@ char szTime[32];
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HText_appendText (HT, buffer);
|
HText_appendText (HT, buffer);
|
||||||
#ifndef NEW_PARSE
|
#ifndef NEW_PARSE
|
||||||
HText_appendText (HT, "</A>\n");
|
HText_appendText (HT, "</A>\n");
|
||||||
@ -1495,14 +1489,10 @@ char szTime[32];
|
|||||||
|
|
||||||
nStringLen = strlen(buffer);
|
nStringLen = strlen(buffer);
|
||||||
nSpaces = ftpFilenameLength - nStringLen;
|
nSpaces = ftpFilenameLength - nStringLen;
|
||||||
/*
|
|
||||||
if (itemtype != 'd') {
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (nTime == 1) {
|
if (nTime == 1) {
|
||||||
struct tm *ptr;
|
struct tm *ptr;
|
||||||
time_t t;
|
time_t t;
|
||||||
|
|
||||||
t=time(0);
|
t=time(0);
|
||||||
ptr=localtime(&t);
|
ptr=localtime(&t);
|
||||||
sprintf(szYear,"%d",1900+ptr->tm_year);
|
sprintf(szYear,"%d",1900+ptr->tm_year);
|
||||||
@ -1515,22 +1505,6 @@ char szTime[32];
|
|||||||
/*nSpaces += strlen(itemsize); */
|
/*nSpaces += strlen(itemsize); */
|
||||||
sprintf(szDate, "%*s %9.9s %s %s", nSpaces, " ", itemsize, szMonth, szTime);
|
sprintf(szDate, "%*s %9.9s %s %s", nSpaces, " ", itemsize, szMonth, szTime);
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
nOldSpaces = nSpaces;
|
|
||||||
nSpaces += 22;
|
|
||||||
if (nTime == 1) {
|
|
||||||
sprintf(szDate, "%*s %s %s %2.2s", nSpaces, szFileInfo, szTime, szMonth, szDay);
|
|
||||||
}
|
|
||||||
else if (nTime == 0) {
|
|
||||||
sprintf(szDate, "%*s %s %s %2.2s, %s", nSpaces, szFileInfo, "00:00", szMonth, szDay, szYear);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
sprintf(szDate, "%*s %s %s", nOldSpaces, " ", szMonth, szTime);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (usingNLST!=2) {
|
if (usingNLST!=2) {
|
||||||
HText_appendText (HT, szDate);
|
HText_appendText (HT, szDate);
|
||||||
@ -2070,7 +2044,7 @@ PUBLIC int HTFTPMkDir ARGS1 ( char *, name )
|
|||||||
{
|
{
|
||||||
char *curpath, *path;
|
char *curpath, *path;
|
||||||
char command[ LINE_LENGTH+1];
|
char command[ LINE_LENGTH+1];
|
||||||
int status, method = 0;
|
int status = 0;
|
||||||
|
|
||||||
HTProgress ("FTP mkdir in progress");
|
HTProgress ("FTP mkdir in progress");
|
||||||
if(fTimerStarted) {
|
if(fTimerStarted) {
|
||||||
@ -2145,7 +2119,7 @@ PUBLIC int HTFTPMkDir ARGS1 ( char *, name )
|
|||||||
*/
|
*/
|
||||||
PUBLIC int HTFTPRemove ARGS1 ( char *, name )
|
PUBLIC int HTFTPRemove ARGS1 ( char *, name )
|
||||||
{
|
{
|
||||||
char *fname, *filename, *path;
|
char *fname, *filename;
|
||||||
char command[ LINE_LENGTH+1];
|
char command[ LINE_LENGTH+1];
|
||||||
int status, method = 0, didIt = 0;
|
int status, method = 0, didIt = 0;
|
||||||
|
|
||||||
|
@ -355,7 +355,6 @@ PRIVATE void HTFWriter_free ARGS1(HTStream *, me)
|
|||||||
if (binary_transfer)
|
if (binary_transfer)
|
||||||
rename_binary_file (me->fnam);
|
rename_binary_file (me->fnam);
|
||||||
|
|
||||||
really_done:
|
|
||||||
free (me->fnam);
|
free (me->fnam);
|
||||||
if (me->mime_type) {
|
if (me->mime_type) {
|
||||||
free(me->mime_type);
|
free(me->mime_type);
|
||||||
|
@ -123,8 +123,8 @@ PUBLIC void HTSetSuffix ARGS4(
|
|||||||
else if (strcmp(suffix, "*.*")==0) suff = &unknown_suffix;
|
else if (strcmp(suffix, "*.*")==0) suff = &unknown_suffix;
|
||||||
else {
|
else {
|
||||||
suff = (HTSuffix*) calloc(1, sizeof(HTSuffix));
|
suff = (HTSuffix*) calloc(1, sizeof(HTSuffix));
|
||||||
if (suff == NULL) outofmem(__FILE__, "HTSetSuffix");
|
|
||||||
|
|
||||||
|
if (suff == NULL) outofmem(__FILE__, "HTSetSuffix");
|
||||||
if (!HTSuffixes) HTSuffixes = HTList_new();
|
if (!HTSuffixes) HTSuffixes = HTList_new();
|
||||||
HTList_addObject(HTSuffixes, suff);
|
HTList_addObject(HTSuffixes, suff);
|
||||||
|
|
||||||
@ -165,7 +165,6 @@ PRIVATE char * vms_name(WWW_CONST char * nn, WWW_CONST char * fn)
|
|||||||
*/
|
*/
|
||||||
static char vmsname[INFINITY]; /* returned */
|
static char vmsname[INFINITY]; /* returned */
|
||||||
char * filename = (char*)malloc(strlen(fn)+1);
|
char * filename = (char*)malloc(strlen(fn)+1);
|
||||||
char * nodename = (char*)malloc(strlen(nn)+2+1); /* Copies to hack */
|
|
||||||
char *second; /* 2nd slash */
|
char *second; /* 2nd slash */
|
||||||
char *last; /* last slash */
|
char *last; /* last slash */
|
||||||
|
|
||||||
@ -215,56 +214,6 @@ PRIVATE char * vms_name(WWW_CONST char * nn, WWW_CONST char * fn)
|
|||||||
#endif /* vms */
|
#endif /* vms */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Send README file
|
|
||||||
**
|
|
||||||
** If a README file exists, then it is inserted into the document here.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef GOT_READ_DIR
|
|
||||||
PRIVATE void do_readme ARGS2(HTStructured *, target, WWW_CONST char *, localname)
|
|
||||||
{
|
|
||||||
FILE * fp;
|
|
||||||
char * readme_file_name =
|
|
||||||
malloc(strlen(localname)+ 1 + strlen(HT_DIR_README_FILE) + 1);
|
|
||||||
strcpy(readme_file_name, localname);
|
|
||||||
strcat(readme_file_name, "/");
|
|
||||||
strcat(readme_file_name, HT_DIR_README_FILE);
|
|
||||||
|
|
||||||
fp = fopen(readme_file_name, "r");
|
|
||||||
|
|
||||||
if (fp) {
|
|
||||||
HTStructuredClass targetClass;
|
|
||||||
|
|
||||||
targetClass = *target->isa; /* (Can't init agregate in K&R) */
|
|
||||||
START(HTML_PRE);
|
|
||||||
for(;;){
|
|
||||||
char c = fgetc(fp);
|
|
||||||
if (c == (char)EOF) break;
|
|
||||||
switch (c) {
|
|
||||||
case '&':
|
|
||||||
case '<':
|
|
||||||
case '>':
|
|
||||||
PUTC('&');
|
|
||||||
PUTC('#');
|
|
||||||
PUTC((char)(c / 10));
|
|
||||||
PUTC((char) (c % 10));
|
|
||||||
PUTC(';');
|
|
||||||
break;
|
|
||||||
/* case '\n':
|
|
||||||
PUTC('\r');
|
|
||||||
Bug removed thanks to joe@athena.mit.edu */
|
|
||||||
default:
|
|
||||||
PUTC(c);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
END(HTML_PRE);
|
|
||||||
fclose(fp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* Make the cache file name for a W3 document
|
/* Make the cache file name for a W3 document
|
||||||
** ------------------------------------------
|
** ------------------------------------------
|
||||||
** Make up a suitable name for saving the node in
|
** Make up a suitable name for saving the node in
|
||||||
@ -891,10 +840,12 @@ PUBLIC int HTLoadFile ARGS4 (
|
|||||||
{
|
{
|
||||||
char * filename;
|
char * filename;
|
||||||
HTFormat format;
|
HTFormat format;
|
||||||
int fd = -1; /* Unix file descriptor number = INVALID */
|
|
||||||
char * nodename = 0;
|
|
||||||
char * newname=0; /* Simplified name of file */
|
char * newname=0; /* Simplified name of file */
|
||||||
HTAtom * encoding; /* @@ not used yet */
|
HTAtom * encoding; /* @@ not used yet */
|
||||||
|
#ifdef vms
|
||||||
|
char * nodename;
|
||||||
|
int fd = -1; /* Unix file descriptor number = INVALID */
|
||||||
|
#endif
|
||||||
int compressed;
|
int compressed;
|
||||||
extern char *HTgeticonname(HTFormat, char *);
|
extern char *HTgeticonname(HTFormat, char *);
|
||||||
|
|
||||||
@ -902,7 +853,10 @@ PUBLIC int HTLoadFile ARGS4 (
|
|||||||
*/
|
*/
|
||||||
StrAllocCopy(newname, addr);
|
StrAllocCopy(newname, addr);
|
||||||
filename=HTParse(newname, "", PARSE_PATH|PARSE_PUNCTUATION);
|
filename=HTParse(newname, "", PARSE_PATH|PARSE_PUNCTUATION);
|
||||||
nodename=HTParse(newname, "", PARSE_HOST);
|
#ifdef vms
|
||||||
|
nodename=
|
||||||
|
#endif
|
||||||
|
HTParse(newname, "", PARSE_HOST);
|
||||||
free(newname);
|
free(newname);
|
||||||
|
|
||||||
format = HTFileFormat(filename, &encoding, WWW_PLAINTEXT, &compressed);
|
format = HTFileFormat(filename, &encoding, WWW_PLAINTEXT, &compressed);
|
||||||
@ -984,7 +938,6 @@ forget_multi:
|
|||||||
return HTLoadError(sink, 500,
|
return HTLoadError(sink, 500,
|
||||||
"Multiformat: directory scan failed.");
|
"Multiformat: directory scan failed.");
|
||||||
}
|
}
|
||||||
|
|
||||||
while (dirbuf = readdir(dp)) {
|
while (dirbuf = readdir(dp)) {
|
||||||
/* while there are directory entries to be read */
|
/* while there are directory entries to be read */
|
||||||
if (dirbuf->d_ino == 0) continue;
|
if (dirbuf->d_ino == 0) continue;
|
||||||
@ -1019,7 +972,6 @@ forget_multi:
|
|||||||
base[0] = 0;
|
base[0] = 0;
|
||||||
StrAllocCat(localname, best_dirbuf.d_name);
|
StrAllocCat(localname, best_dirbuf.d_name);
|
||||||
goto open_file;
|
goto open_file;
|
||||||
|
|
||||||
} else { /* If not found suitable file */
|
} else { /* If not found suitable file */
|
||||||
free(localname);
|
free(localname);
|
||||||
return HTLoadError(sink, 403, /* List formats? */
|
return HTLoadError(sink, 403, /* List formats? */
|
||||||
|
@ -100,18 +100,6 @@ PRIVATE void init_acceptable NOARGS
|
|||||||
|
|
||||||
PRIVATE WWW_CONST char hex[17] = "0123456789abcdef";
|
PRIVATE WWW_CONST char hex[17] = "0123456789abcdef";
|
||||||
|
|
||||||
/* Decode one hex character
|
|
||||||
*/
|
|
||||||
|
|
||||||
PRIVATE char from_hex ARGS1(char, c)
|
|
||||||
{
|
|
||||||
return (c>='0')&&(c<='9') ? c-'0'
|
|
||||||
: (c>='A')&&(c<='F') ? c-'A'+10
|
|
||||||
: (c>='a')&&(c<='f') ? c-'a'+10
|
|
||||||
: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Paste in an Anchor
|
/* Paste in an Anchor
|
||||||
** ------------------
|
** ------------------
|
||||||
@ -171,12 +159,11 @@ PRIVATE int parse_menu ARGS2 (
|
|||||||
char ch;
|
char ch;
|
||||||
char line[BIG];
|
char line[BIG];
|
||||||
char address[BIG];
|
char address[BIG];
|
||||||
char *name, *selector; /* Gopher menu fields */
|
char *name, *selector = NULL; /* Gopher menu fields */
|
||||||
char *host;
|
char *host;
|
||||||
char *port;
|
char *port;
|
||||||
char *p = line;
|
char *p = line;
|
||||||
extern int interrupted_in_htgetcharacter;
|
extern int interrupted_in_htgetcharacter;
|
||||||
WWW_CONST char *title;
|
|
||||||
|
|
||||||
#define TAB '\t'
|
#define TAB '\t'
|
||||||
#define HEX_ESCAPE '%'
|
#define HEX_ESCAPE '%'
|
||||||
|
@ -31,10 +31,8 @@ struct _HTStructured
|
|||||||
|
|
||||||
|
|
||||||
/* Module-wide variables
|
/* Module-wide variables
|
||||||
*/
|
*/
|
||||||
PRIVATE int s; /* Socket for FingerHost */
|
PRIVATE int s; /* Socket for FingerHost */
|
||||||
PRIVATE HTStructured * target; /* The output sink */
|
|
||||||
PRIVATE HTStructuredClass targetClass; /* Copy of fn addresses */
|
|
||||||
|
|
||||||
extern int GetMailtoKludgeInfo();
|
extern int GetMailtoKludgeInfo();
|
||||||
|
|
||||||
|
@ -252,7 +252,6 @@ PRIVATE BOOL match ARGS2 (WWW_CONST char *,unknown, WWW_CONST char *,template)
|
|||||||
*/
|
*/
|
||||||
char *parseemail (char *str, char *name, char *em)
|
char *parseemail (char *str, char *name, char *em)
|
||||||
{
|
{
|
||||||
char *c, d;
|
|
||||||
char *email, *end;
|
char *email, *end;
|
||||||
|
|
||||||
/* Pull out email address */
|
/* Pull out email address */
|
||||||
@ -400,7 +399,6 @@ static char b64_tab[256] = {
|
|||||||
|
|
||||||
int base64line(FILE *fp, char *buf)
|
int base64line(FILE *fp, char *buf)
|
||||||
{
|
{
|
||||||
int last_data = 0;
|
|
||||||
unsigned char *p = (unsigned char *) buf;
|
unsigned char *p = (unsigned char *) buf;
|
||||||
|
|
||||||
if(!buf || !*buf || isspace(*buf)){
|
if(!buf || !*buf || isspace(*buf)){
|
||||||
@ -441,7 +439,6 @@ int base64line(FILE *fp, char *buf)
|
|||||||
|
|
||||||
if (*p == '=') {
|
if (*p == '=') {
|
||||||
fputc(c1 << 2 | c2 >> 4,fp);
|
fputc(c1 << 2 | c2 >> 4,fp);
|
||||||
last_data = 1;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -865,7 +862,7 @@ static char qline[LINE_LENGTH+1];
|
|||||||
char *NNTPgetquoteline(char *art)
|
char *NNTPgetquoteline(char *art)
|
||||||
{
|
{
|
||||||
char *p;
|
char *p;
|
||||||
int i,f,status ;
|
int i,status;
|
||||||
|
|
||||||
if (!initialized)
|
if (!initialized)
|
||||||
initialized = initialize();
|
initialized = initialize();
|
||||||
@ -1347,7 +1344,7 @@ void news_index(char *url)
|
|||||||
/* Returns the status of the news buttons */
|
/* Returns the status of the news buttons */
|
||||||
void news_status(char *url, int *prevt, int *nextt, int *prev, int *next, int *follow)
|
void news_status(char *url, int *prevt, int *nextt, int *prev, int *next, int *follow)
|
||||||
{
|
{
|
||||||
NewsArt *art,*tmp;
|
NewsArt *art;
|
||||||
|
|
||||||
if( art = is_news_url(url) ) {
|
if( art = is_news_url(url) ) {
|
||||||
if(prevUnread(art,!newsNoThreadJumping))
|
if(prevUnread(art,!newsNoThreadJumping))
|
||||||
@ -1435,16 +1432,16 @@ PRIVATE void read_article ARGS1 (char *, artID)
|
|||||||
char *references=NULL; /* Hrefs for other articles */
|
char *references=NULL; /* Hrefs for other articles */
|
||||||
char *newsgroups=NULL; /* Newsgroups list */
|
char *newsgroups=NULL; /* Newsgroups list */
|
||||||
char *from=NULL,*subj=NULL,*org=NULL,*date=NULL;
|
char *from=NULL,*subj=NULL,*org=NULL,*date=NULL;
|
||||||
char *filename;
|
char *filename=NULL;
|
||||||
char *l = line;
|
char *l = line;
|
||||||
int f; /* ':' flag */
|
int f; /* ':' flag */
|
||||||
int decode=0; /*uudecoding...*/
|
int decode=0; /*uudecoding...*/
|
||||||
FILE *fp;
|
FILE *fp = NULL;
|
||||||
|
|
||||||
char *p = line,*pp,*m;
|
char *p = line,*pp,*m;
|
||||||
BOOL done = NO;
|
BOOL done = NO;
|
||||||
|
|
||||||
NewsArt *art,*art2,*art_t, *next;
|
NewsArt *art,*art2,*next;
|
||||||
int ll;
|
int ll;
|
||||||
|
|
||||||
|
|
||||||
@ -1828,7 +1825,7 @@ PRIVATE void read_article ARGS1 (char *, artID)
|
|||||||
|
|
||||||
NextArt = next;
|
NextArt = next;
|
||||||
if (CurrentArt) {
|
if (CurrentArt) {
|
||||||
char *tok, d, *last;
|
char *tok;
|
||||||
newsgroup_t *ng;
|
newsgroup_t *ng;
|
||||||
|
|
||||||
if (newsgroups) {
|
if (newsgroups) {
|
||||||
@ -1868,7 +1865,6 @@ PRIVATE void read_list NOARGS
|
|||||||
postable, *p;
|
postable, *p;
|
||||||
int first, last, junk, m=0, next_m=20, done=0, intr, g=0, next_g = 50, l=0, lastg=0,mark=0;
|
int first, last, junk, m=0, next_m=20, done=0, intr, g=0, next_g = 50, l=0, lastg=0,mark=0;
|
||||||
newsgroup_t *n=NULL, *nn=NULL;
|
newsgroup_t *n=NULL, *nn=NULL;
|
||||||
extern int twirl_increment;
|
|
||||||
|
|
||||||
START (HTML_TITLE);
|
START (HTML_TITLE);
|
||||||
PUTS ("Newsgroup Listing");
|
PUTS ("Newsgroup Listing");
|
||||||
@ -2111,17 +2107,15 @@ PRIVATE void XBuildArtList ARGS3(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
NewsArt *art;
|
NewsArt *art;
|
||||||
char *p,*aname=NULL, *author=NULL, *aref, abuf[1024+1];
|
char *p,*aname=NULL, *aref, abuf[1024+1];
|
||||||
BOOL done;
|
|
||||||
|
|
||||||
char *num,*title,*date,*msgid,*ref,*bytes,*lines,*from=NULL;
|
char *num,*title,*date,*msgid,*ref,*bytes,*lines,*from=NULL;
|
||||||
|
|
||||||
char buf[2048];
|
char buf[2048];
|
||||||
|
|
||||||
char *reference=0; /* Href for article */
|
|
||||||
int status, count, first, last; /* Response fields */
|
int status, count, first, last; /* Response fields */
|
||||||
/* count is only an upper limit */
|
/* count is only an upper limit */
|
||||||
int c,i,lineinc;
|
int lineinc;
|
||||||
|
|
||||||
HTMeter(0,NULL);
|
HTMeter(0,NULL);
|
||||||
|
|
||||||
@ -2250,12 +2244,11 @@ PRIVATE void BuildArtList ARGS3(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
NewsArt *art;
|
NewsArt *art;
|
||||||
char *p,*aname, *author, *aref, abuf[1024+1];
|
|
||||||
BOOL done;
|
BOOL done;
|
||||||
|
char *p,*aname, *aref, abuf[1024+1];
|
||||||
|
|
||||||
char buffer[LINE_LENGTH];
|
char buffer[LINE_LENGTH];
|
||||||
char line[LINE_LENGTH];
|
char line[LINE_LENGTH];
|
||||||
char *reference=0; /* Href for article */
|
|
||||||
int artno; /* Article number WITHIN GROUP */
|
int artno; /* Article number WITHIN GROUP */
|
||||||
int status, count, first, last; /* Response fields */
|
int status, count, first, last; /* Response fields */
|
||||||
/* count is only an upper limit */
|
/* count is only an upper limit */
|
||||||
@ -2266,6 +2259,7 @@ PRIVATE void BuildArtList ARGS3(
|
|||||||
if(www2Trace) fprintf(stderr,"[%s]",response_text);
|
if(www2Trace) fprintf(stderr,"[%s]",response_text);
|
||||||
#endif
|
#endif
|
||||||
sscanf(response_text, "%d %d %d %d", &status, &count, &first, &last);
|
sscanf(response_text, "%d %d %d %d", &status, &count, &first, &last);
|
||||||
|
|
||||||
#ifndef DISABLE_TRACE
|
#ifndef DISABLE_TRACE
|
||||||
if(www2Trace) fprintf(stderr,"Newsgroup status=%d, count=%d, (%d-%d)",
|
if(www2Trace) fprintf(stderr,"Newsgroup status=%d, count=%d, (%d-%d)",
|
||||||
status, count, first, last);
|
status, count, first, last);
|
||||||
@ -2475,17 +2469,10 @@ PRIVATE void read_group ARGS3(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
NewsArt *art,*art2, *f;
|
NewsArt *art,*art2, *f;
|
||||||
char *p;
|
|
||||||
BOOL done;
|
|
||||||
char buffer[LINE_LENGTH], subj[LINE_LENGTH];
|
char buffer[LINE_LENGTH], subj[LINE_LENGTH];
|
||||||
char line[LINE_LENGTH], from[LINE_LENGTH];
|
char from[LINE_LENGTH];
|
||||||
char efrom[LINE_LENGTH], esubj[LINE_LENGTH];
|
char efrom[LINE_LENGTH], esubj[LINE_LENGTH];
|
||||||
char *reference=0;
|
int i,mark=0;
|
||||||
int i,artno, mark=0;
|
|
||||||
int tc=0;
|
|
||||||
int status, count; /* Response fields */
|
|
||||||
/* count is only an upper limit */
|
|
||||||
char em[255+1];
|
|
||||||
|
|
||||||
if ((NewsGroupS = findgroup (groupName)) == NULL) {
|
if ((NewsGroupS = findgroup (groupName)) == NULL) {
|
||||||
/* Add group unsub'd to hash table */
|
/* Add group unsub'd to hash table */
|
||||||
@ -2605,7 +2592,7 @@ PUBLIC int HTLoadNews ARGS4(
|
|||||||
{
|
{
|
||||||
char command[257]; /* The whole command */
|
char command[257]; /* The whole command */
|
||||||
char groupName[GROUP_NAME_LENGTH]; /* Just the group name */
|
char groupName[GROUP_NAME_LENGTH]; /* Just the group name */
|
||||||
char buf[LINE_LENGTH+1], *pt, *p1;
|
char buf[LINE_LENGTH+1], *p1;
|
||||||
int status; /* tcp return */
|
int status; /* tcp return */
|
||||||
int retries; /* A count of how hard we have tried */
|
int retries; /* A count of how hard we have tried */
|
||||||
BOOL group_wanted; /* Flag: group was asked for, not article */
|
BOOL group_wanted; /* Flag: group was asked for, not article */
|
||||||
@ -2662,6 +2649,8 @@ PUBLIC int HTLoadNews ARGS4(
|
|||||||
*/
|
*/
|
||||||
if (!my_strncasecmp (arg, "news:", 5))
|
if (!my_strncasecmp (arg, "news:", 5))
|
||||||
p1 = arg + 5; /* Skip "news:" prefix */
|
p1 = arg + 5; /* Skip "news:" prefix */
|
||||||
|
else
|
||||||
|
p1 = arg;
|
||||||
if (group_wanted) {
|
if (group_wanted) {
|
||||||
strcpy (command, "GROUP ");
|
strcpy (command, "GROUP ");
|
||||||
first = 0;
|
first = 0;
|
||||||
|
@ -116,7 +116,6 @@ PUBLIC int HTLoadHTTP ARGS4 (
|
|||||||
HTStream *target; /* Unconverted data */
|
HTStream *target; /* Unconverted data */
|
||||||
HTFormat format_in; /* Format arriving in the message */
|
HTFormat format_in; /* Format arriving in the message */
|
||||||
|
|
||||||
BOOL had_header; /* Have we had at least one header? */
|
|
||||||
char *line_buffer;
|
char *line_buffer;
|
||||||
char *line_kept_clean;
|
char *line_kept_clean;
|
||||||
BOOL extensions; /* Assume good HTTP server */
|
BOOL extensions; /* Assume good HTTP server */
|
||||||
@ -133,10 +132,6 @@ PUBLIC int HTLoadHTTP ARGS4 (
|
|||||||
|
|
||||||
/*SWP*/
|
/*SWP*/
|
||||||
int statusError=0;
|
int statusError=0;
|
||||||
char tmpbuf[4096];
|
|
||||||
|
|
||||||
char *begin_ptr,*tmp_ptr;
|
|
||||||
int env_length;
|
|
||||||
|
|
||||||
if (!arg)
|
if (!arg)
|
||||||
{
|
{
|
||||||
@ -161,7 +156,6 @@ PUBLIC int HTLoadHTTP ARGS4 (
|
|||||||
so we can start over here... */
|
so we can start over here... */
|
||||||
eol = 0;
|
eol = 0;
|
||||||
bytes_already_read = 0;
|
bytes_already_read = 0;
|
||||||
had_header = NO;
|
|
||||||
length = 0;
|
length = 0;
|
||||||
doing_redirect = 0;
|
doing_redirect = 0;
|
||||||
compressed = 0;
|
compressed = 0;
|
||||||
@ -621,7 +615,6 @@ PUBLIC int HTLoadHTTP ARGS4 (
|
|||||||
{
|
{
|
||||||
/* Get numeric status etc */
|
/* Get numeric status etc */
|
||||||
BOOL end_of_file = NO;
|
BOOL end_of_file = NO;
|
||||||
HTAtom * encoding = HTAtom_for("8bit");
|
|
||||||
int buffer_length = INIT_LINE_SIZE;
|
int buffer_length = INIT_LINE_SIZE;
|
||||||
|
|
||||||
line_buffer = (char *) malloc(buffer_length * sizeof(char));
|
line_buffer = (char *) malloc(buffer_length * sizeof(char));
|
||||||
|
@ -226,8 +226,13 @@ customflags =
|
|||||||
# ---------------------- END OF CUSTOMIZABLE OPTIONS -------------------------
|
# ---------------------- END OF CUSTOMIZABLE OPTIONS -------------------------
|
||||||
|
|
||||||
# Disable certain warnings as we don't care for them
|
# Disable certain warnings as we don't care for them
|
||||||
CWARNINGS = -Wno-parentheses -Wno-switch-enum
|
CWARNINGS = -Wall \
|
||||||
CFLAGS = -g $(sysconfigflags) $(prereleaseflags) $(CWARNINGS)
|
-Wno-parentheses \
|
||||||
|
-Wno-switch -Wno-switch-enum \
|
||||||
|
-Wno-char-subscripts \
|
||||||
|
-Wno-unused-result
|
||||||
|
|
||||||
|
CFLAGS = -g $(sysconfigflags) $(prereleaseflags) $(CWARNINGS) $(customflags)
|
||||||
|
|
||||||
# Don't worry about these -- for development purposes only.
|
# Don't worry about these -- for development purposes only.
|
||||||
PURIFY = purify
|
PURIFY = purify
|
||||||
|
Loading…
Reference in New Issue
Block a user