+
#include "../config.h"
/* Connection: Keep-Alive support -bjs */
#include "HTMIME.h"
@@ -24,6 +26,7 @@ PUBLIC float HTMaxLength = 1e10; /* No effective limit */
#include "SGML.h"
#include "HTML.h"
#include "HTMLGen.h"
+#include "HTTCP.h"
/* From gui-documents.c. */
extern int loading_inlined_images;
diff --git a/libwww2/HTGopher.c b/libwww2/HTGopher.c
index 00c2254..c28444b 100644
--- a/libwww2/HTGopher.c
+++ b/libwww2/HTGopher.c
@@ -47,7 +47,7 @@
#include "HTUtils.h" /* Coding convention macros */
#include "tcp.h"
-
+#include "HTAlert.h"
#include "HTParse.h"
#include "HTFormat.h"
#include "HTFile.h"
diff --git a/libwww2/HTInit.c b/libwww2/HTInit.c
index 2e9d3b4..75ad96b 100644
--- a/libwww2/HTInit.c
+++ b/libwww2/HTInit.c
@@ -17,6 +17,8 @@
extern int www2Trace;
#endif
+int HTLoadTypesConfigFile(char *);
+
/* Reread config files. */
PUBLIC void HTReInit NOARGS
{
@@ -220,7 +222,7 @@ static char *Cleanse(char *s) /* no leading or trailing space, all lower case */
return(news);
}
-static ProcessMailcapEntry(FILE *fp, struct MailcapEntry *mc)
+static int ProcessMailcapEntry(FILE *fp, struct MailcapEntry *mc)
{
int rawentryalloc = 2000, len;
char *rawentry, *s, *t, *LineBuf;
@@ -294,7 +296,7 @@ static ProcessMailcapEntry(FILE *fp, struct MailcapEntry *mc)
}
-static ProcessMailcapFile(char *file)
+static int ProcessMailcapFile(char *file)
{
struct MailcapEntry mc;
FILE *fp;
@@ -534,6 +536,7 @@ static void getword(char *word, char *line, char stop, char stop2)
int HTLoadExtensionsConfigFile (char *fn)
{
char l[MAX_STRING_LEN],w[MAX_STRING_LEN],*ct,*ptr;
+ size_t len = MAX_STRING_LEN;
FILE *f;
int x, count = 0;
@@ -553,7 +556,7 @@ int HTLoadExtensionsConfigFile (char *fn)
return -1;
}
- while(!(getline(l,MAX_STRING_LEN,f)))
+ while(!(getline((char**)&l,&len,f)))
{
/* always get rid of leading white space for "line" -- SWP */
for (ptr=l; *ptr && isspace(*ptr); ptr++);
diff --git a/libwww2/HTMIME.c b/libwww2/HTMIME.c
index 6b04d9d..1da9c23 100644
--- a/libwww2/HTMIME.c
+++ b/libwww2/HTMIME.c
@@ -585,7 +585,7 @@ PRIVATE void HTMIME_put_character ARGS2(HTStream *, me, char, c)
me->format = HTAtom_for(me->value);
#ifndef DISABLE_TRACE
if (www2Trace)
- fprintf (stderr, "[MIME_put_char] Got content-type value atom 0x%08x\n",
+ fprintf (stderr, "[MIME_put_char] Got content-type value atom %p\n",
me->format);
#endif
break;
@@ -595,7 +595,7 @@ PRIVATE void HTMIME_put_character ARGS2(HTStream *, me, char, c)
if (www2Trace)
fprintf (stderr,
"[MIME_put_char] Picked up transfer_encoding '%s'\n",
- me->encoding);
+ (char*)me->encoding);
#endif
break;
case CONTENT_ENCODING:
@@ -887,18 +887,18 @@ PRIVATE void HTMIME_free ARGS1(HTStream *, me)
#endif
#ifndef DISABLE_TRACE
if (www2Trace)
- fprintf (stderr, " me 0x%08x, me->target 0x%08x\n", me, me->target);
+ fprintf (stderr, " me %p, me->target %p\n", me, me->target);
#endif
me->format = HTAtom_for ("text/html");
me->target = HTStreamStack(me->format, me->targetRep, 0,
me->sink, me->anchor);
#ifndef DISABLE_TRACE
if (www2Trace)
- fprintf (stderr, " me->target->isa 0x%08x\n", me->target->isa);
+ fprintf (stderr, " me->target->isa %p\n", me->target->isa);
#endif
#ifndef DISABLE_TRACE
if (www2Trace)
- fprintf (stderr, " *me->target->isa 0x%08x\n", *me->target->isa);
+ fprintf (stderr, " me->target->isa->name %s\n", me->target->isa->name);
#endif
me->targetClass = *me->target->isa;
(*me->targetClass.put_string) (me->target, "ERROR IN HTTP/1.0 RESPONSE
The remote server returned a HTTP/1.0 response that Mosaic's MIME parser could not understand. Please contact the server maintainer. Sorry for the inconvenience,
The Management");
diff --git a/libwww2/HTMailto.c b/libwww2/HTMailto.c
index f164b6b..7eb43a9 100644
--- a/libwww2/HTMailto.c
+++ b/libwww2/HTMailto.c
@@ -10,12 +10,15 @@
*/
#include "../config.h"
#include "HTAccess.h"
+#include "HTAlert.h"
#include "HTUtils.h"
#include "tcp.h"
#include "HTML.h"
#include "HTParse.h"
#include "HTFormat.h"
#include "../libnut/str-tools.h"
+#include "../src/mosaic.h"
+#include "../src/mailto.h"
#ifndef DISABLE_TRACE
extern int www2Trace;
#endif
diff --git a/libwww2/HTNews.c b/libwww2/HTNews.c
index 6f9d125..d1b0915 100644
--- a/libwww2/HTNews.c
+++ b/libwww2/HTNews.c
@@ -27,9 +27,13 @@ char *mo_tmpnam(char *url);
#include "HTNews.h"
+
#include "../src/mosaic.h"
#include "../src/newsrc.h"
#include "../src/prefs.h"
+#include "../src/img.h"
+
+#include "../libnut/str-tools.h"
#define NEWS_PORT 119 /* See rfc977 */
#define APPEND /* Use append methods */
@@ -51,6 +55,8 @@ char *mo_tmpnam(char *url);
#include "HTML.h"
#include "HTParse.h"
#include "HTFormat.h"
+#include "HTAlert.h"
+#include "HTTCP.h"
#ifndef DISABLE_TRACE
extern int www2Trace;
@@ -1021,8 +1027,10 @@ int NNTPgetarthdrs(char *art,char **ref, char **grp, char **subj, char **from)
} /* if end of line */
} /* Loop over characters */
} /* If good response */
+
+ return 0;
}
-
+
int NNTPpost(char *from, char *subj, char *ref, char *groups, char *msg)
{
char buf[1024];
@@ -1073,6 +1081,8 @@ int NNTPpost(char *from, char *subj, char *ref, char *groups, char *msg)
HTProgress("Article was posted successfully.");
HTDoneWithIcon ();
+
+ return 0;
}
@@ -1626,7 +1636,7 @@ PRIVATE void read_article ARGS1 (char *, artID)
case 1:
uudecodeline(fp,NULL);
sprintf(line,"%s\n%s",filename,filename);
- ImageResolve(NULL,line,0);
+ ImageResolve(NULL,line,0,NULL,NULL);
PUTS("
");
@@ -1634,7 +1644,7 @@ PRIVATE void read_article ARGS1 (char *, artID)
case 2:
base64line(fp,NULL);
sprintf(line,"%s\n%s",filename,filename);
- ImageResolve(NULL,line,0);
+ ImageResolve(NULL,line,0,NULL,NULL);
PUTS("
");
@@ -1645,15 +1655,15 @@ PRIVATE void read_article ARGS1 (char *, artID)
}
linenum++;
if(linecount && !(linenum%lineinc)) {
- HTMeter((linenum*100)/(linecount),NULL);
+ HTMeter((linenum*100)/(linecount),NULL);
}
switch(decode) {
- case 1:
+ case 1:
/* uuencoded */
if(uudecodeline(fp,line)){
decode=6;
sprintf(line,"%s\n%s",filename,filename);
- ImageResolve(NULL,line,0);
+ ImageResolve(NULL,line,0,NULL,NULL);
PUTS("
");
@@ -1666,13 +1676,13 @@ PRIVATE void read_article ARGS1 (char *, artID)
if(base64line(fp,line)){
decode=6;
sprintf(line,"%s\n%s",filename,filename);
- ImageResolve(NULL,line,0);
+ ImageResolve(NULL,line,0,NULL,NULL);
PUTS("
");
}
p = line;
- continue;
+ continue;
case 3:
/* is mime, looking for encoding... */
if(match(line,"CONTENT-TRANSFER-ENCODING: BASE64")){
@@ -1953,7 +1963,7 @@ PRIVATE void read_list NOARGS
if (n->attribs&naSUBSCRIBED &&
(newsShowAllGroups || n->unread>0
|| newsShowReadGroups)) {
- sprintf(line,"%s % 7d S %s \n",
+ sprintf(line,"%s % 7ld S %s \n",
(lastg==1)?">>>":" ",
n->unread, n->name, elgroup);
PUTS (line);
@@ -2015,7 +2025,7 @@ PRIVATE void read_list NOARGS
else if (nn == n && !mark)
lastg = 1;
if (newsShowAllGroups || n->unread>0 || newsShowReadGroups) {
- sprintf(line,"%s % 7d %s %s \n",
+ sprintf(line,"%s % 7ld %s %s \n",
(lastg==1)? ">>>":" ",
n->unread, n->attribs&naSUBSCRIBED?"S":"U",
n->name, elgroup);
diff --git a/libwww2/HTParse.c b/libwww2/HTParse.c
index b2b1f34..d69ef83 100644
--- a/libwww2/HTParse.c
+++ b/libwww2/HTParse.c
@@ -238,7 +238,7 @@ char * HTParse(aName, relatedName, wanted)
{
#ifndef DISABLE_TRACE
if (www2Trace)
- fprintf (stderr, "[Parse] Copying '%s' to '%s', %d bytes\n",
+ fprintf (stderr, "[Parse] Copying '%s' to '%s', %zu bytes\n",
p+1, p, strlen (p+1));
#endif
/*
diff --git a/libwww2/HTTP.c b/libwww2/HTTP.c
index 97abbbe..56833e7 100644
--- a/libwww2/HTTP.c
+++ b/libwww2/HTTP.c
@@ -4,6 +4,9 @@
#include "../config.h"
#include "HTTP.h"
+#include "../src/mosaic.h"
+#include "../src/mo-www.h"
+
#define HTTP_VERSION "HTTP/1.0"
#define INIT_LINE_SIZE 1024 /* Start with line buffer this big */
diff --git a/libwww2/HTUU.c b/libwww2/HTUU.c
index f3220dc..7f26550 100644
--- a/libwww2/HTUU.c
+++ b/libwww2/HTUU.c
@@ -148,21 +148,21 @@ PUBLIC int HTUU_decode ARGS3(char *, bufcoded,
for(j=0; j<64; j++) pr2six[six2pr[j]] = (unsigned char) j;
#if 0
- pr2six['A']= 0; pr2six['B']= 1; pr2six['C']= 2; pr2six['D']= 3;
- pr2six['E']= 4; pr2six['F']= 5; pr2six['G']= 6; pr2six['H']= 7;
- pr2six['I']= 8; pr2six['J']= 9; pr2six['K']=10; pr2six['L']=11;
- pr2six['M']=12; pr2six['N']=13; pr2six['O']=14; pr2six['P']=15;
- pr2six['Q']=16; pr2six['R']=17; pr2six['S']=18; pr2six['T']=19;
- pr2six['U']=20; pr2six['V']=21; pr2six['W']=22; pr2six['X']=23;
- pr2six['Y']=24; pr2six['Z']=25; pr2six['a']=26; pr2six['b']=27;
- pr2six['c']=28; pr2six['d']=29; pr2six['e']=30; pr2six['f']=31;
- pr2six['g']=32; pr2six['h']=33; pr2six['i']=34; pr2six['j']=35;
- pr2six['k']=36; pr2six['l']=37; pr2six['m']=38; pr2six['n']=39;
- pr2six['o']=40; pr2six['p']=41; pr2six['q']=42; pr2six['r']=43;
- pr2six['s']=44; pr2six['t']=45; pr2six['u']=46; pr2six['v']=47;
- pr2six['w']=48; pr2six['x']=49; pr2six['y']=50; pr2six['z']=51;
- pr2six['0']=52; pr2six['1']=53; pr2six['2']=54; pr2six['3']=55;
- pr2six['4']=56; pr2six['5']=57; pr2six['6']=58; pr2six['7']=59;
+ pr2six['A']= 0; pr2six['B']= 1; pr2six['C']= 2; pr2six['D']= 3;
+ pr2six['E']= 4; pr2six['F']= 5; pr2six['G']= 6; pr2six['H']= 7;
+ pr2six['I']= 8; pr2six['J']= 9; pr2six['K']=10; pr2six['L']=11;
+ pr2six['M']=12; pr2six['N']=13; pr2six['O']=14; pr2six['P']=15;
+ pr2six['Q']=16; pr2six['R']=17; pr2six['S']=18; pr2six['T']=19;
+ pr2six['U']=20; pr2six['V']=21; pr2six['W']=22; pr2six['X']=23;
+ pr2six['Y']=24; pr2six['Z']=25; pr2six['a']=26; pr2six['b']=27;
+ pr2six['c']=28; pr2six['d']=29; pr2six['e']=30; pr2six['f']=31;
+ pr2six['g']=32; pr2six['h']=33; pr2six['i']=34; pr2six['j']=35;
+ pr2six['k']=36; pr2six['l']=37; pr2six['m']=38; pr2six['n']=39;
+ pr2six['o']=40; pr2six['p']=41; pr2six['q']=42; pr2six['r']=43;
+ pr2six['s']=44; pr2six['t']=45; pr2six['u']=46; pr2six['v']=47;
+ pr2six['w']=48; pr2six['x']=49; pr2six['y']=50; pr2six['z']=51;
+ pr2six['0']=52; pr2six['1']=53; pr2six['2']=54; pr2six['3']=55;
+ pr2six['4']=56; pr2six['5']=57; pr2six['6']=58; pr2six['7']=59;
pr2six['8']=60; pr2six['9']=61; pr2six['+']=62; pr2six['/']=63;
#endif
}
@@ -175,7 +175,7 @@ PUBLIC int HTUU_decode ARGS3(char *, bufcoded,
* If this would decode into more bytes than would fit into
* the output buffer, adjust the number of input bytes downwards.
*/
- bufin = bufcoded;
+ bufin = (unsigned char *) bufcoded;
while(pr2six[*(bufin++)] <= MAXVAL);
nprbytes = bufin - ((unsigned char *)bufcoded) - 1;
nbytesdecoded = ((nprbytes+3)/4) * 3;
@@ -183,7 +183,7 @@ PUBLIC int HTUU_decode ARGS3(char *, bufcoded,
nprbytes = (outbufsize*4)/3;
}
- bufin = bufcoded;
+ bufin = (unsigned char *) bufcoded;
while (nprbytes > 0) {
*(bufout++) = (unsigned char) (DEC(*bufin) << 2 | DEC(bufin[1]) >> 4);
diff --git a/libwww2/SGML.c b/libwww2/SGML.c
index c64268c..f58a717 100644
--- a/libwww2/SGML.c
+++ b/libwww2/SGML.c
@@ -13,6 +13,7 @@
#include
#include
+#include
#include "HTUtils.h"
#include "HTChunk.h"
#include "../libnut/str-tools.h"
diff --git a/libwww2/tcp.h b/libwww2/tcp.h
index 042add9..2870118 100644
--- a/libwww2/tcp.h
+++ b/libwww2/tcp.h
@@ -50,6 +50,7 @@ Default values
#ifdef unix
#define GOT_PIPE
+#include
#endif
typedef struct sockaddr_in SockA; /* See netinet/in.h */
diff --git a/makefiles/Makefile.linux b/makefiles/Makefile.linux
index 2cea009..2b7ad4b 100755
--- a/makefiles/Makefile.linux
+++ b/makefiles/Makefile.linux
@@ -225,7 +225,9 @@ customflags =
# ---------------------- END OF CUSTOMIZABLE OPTIONS -------------------------
-CFLAGS = -g $(sysconfigflags) $(prereleaseflags)
+# Disable certain warnings as we don't care for them
+CWARNINGS = -Wno-parentheses -Wno-switch-enum
+CFLAGS = -g $(sysconfigflags) $(prereleaseflags) $(CWARNINGS)
# Don't worry about these -- for development purposes only.
PURIFY = purify
diff --git a/src/img.c b/src/img.c
index 43e5407..584830a 100644
--- a/src/img.c
+++ b/src/img.c
@@ -52,13 +52,13 @@
* mosaic-x@ncsa.uiuc.edu. *
****************************************************************************/
#include "../config.h"
+#include "../libhtmlw/HTML.h"
#include "mosaic.h"
#include "gui.h"
#include "img.h"
#include "mo-www.h"
#include "globalhist.h"
#include "picread.h"
-#include "libhtmlw/HTML.h"
#include "cci.h"
extern int cci_event;
diff --git a/src/img.h b/src/img.h
index 17b1f23..a46e5ad 100644
--- a/src/img.h
+++ b/src/img.h
@@ -66,8 +66,11 @@
#ifndef __IMG_H__
#define __IMG_H__
+#include "../libhtmlw/HTML.h"
+
mo_status mo_free_image_data (void *);
mo_status mo_register_image_resolution_function (mo_window *);
+ImageInfo *ImageResolve (Widget w, char *src, int noload, char *wid, char *hei);
#endif
diff --git a/src/mailto.h b/src/mailto.h
index 2012295..fc2e4bd 100644
--- a/src/mailto.h
+++ b/src/mailto.h
@@ -52,7 +52,7 @@
* mosaic-x@ncsa.uiuc.edu. *
****************************************************************************/
-/*
+/*
* Created: Wed Apr 10 17:41:00 CDT 1996
* Author: Dan Pape
*
@@ -63,4 +63,4 @@
the source whenever something changed. */
-
+mo_status mo_post_mailto_win (char *to_address, char *subject);
diff --git a/src/newsrc.h b/src/newsrc.h
index d8dac1d..db15042 100644
--- a/src/newsrc.h
+++ b/src/newsrc.h
@@ -95,7 +95,9 @@ newsgroup_t *addgroup (char *, long, long, int);
newsgroup_t *firstgroup ();
newsgroup_t *nextgroup (newsgroup_t *);
void news_refreshprefs (void);
-
+void setminmax(newsgroup_t *ng,long min, long max);
+void rereadseq(newsgroup_t *ng);
+int newsrc_init(char *newshost);
int newsrc_kill (void);
#endif
diff --git a/src/proxy-dialogs.h b/src/proxy-dialogs.h
index 2012295..d03f01c 100644
--- a/src/proxy-dialogs.h
+++ b/src/proxy-dialogs.h
@@ -62,5 +62,4 @@
that file up because it was too big, and required a re-compile of all
the source whenever something changed. */
-
-
+void ClearTempBongedProxies();