Fix some warnings in libwww2
The directory libwww2 now compiles without any warnings with gcc and clang.
This commit is contained in:
parent
0fbd9595a7
commit
39b76427ae
@ -52,8 +52,8 @@
|
||||
* mosaic-x@ncsa.uiuc.edu. *
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef HTML_H
|
||||
#define HTML_H
|
||||
#ifndef HTMLW_HTML_H
|
||||
#define HTMLW_HTML_H
|
||||
|
||||
#ifdef MOTIF
|
||||
#include <Xm/Xm.h>
|
||||
@ -634,5 +634,5 @@ typedef struct _HTMLRec *HTMLWidget;
|
||||
extern WidgetClass htmlWidgetClass;
|
||||
|
||||
|
||||
#endif /* HTML_H */
|
||||
#endif /* HTMLW_HTML_H */
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
int compact_string(char *main_string, char *ellipsis_string, int num_chars, int mode, int eLength);
|
||||
char *getFileName(char *file_src);
|
||||
char *strcasechr(char *src, char srch);
|
||||
char *strrcasechr(char *src, char srch);
|
||||
|
@ -753,22 +753,22 @@ PRIVATE char *compose_auth_string ARGS2(HTAAScheme, scheme,
|
||||
|
||||
/* make A1 */
|
||||
*A1 = (unsigned char)0;
|
||||
strcat(A1, realm->username);
|
||||
strcat(A1, ":");
|
||||
strcat(A1, realm->realmname);
|
||||
strcat(A1, ":");
|
||||
strcat(A1, realm->password);
|
||||
strcat(A1, "\0");
|
||||
strcat((char*)A1, realm->username);
|
||||
strcat((char*)A1, ":");
|
||||
strcat((char*)A1, realm->realmname);
|
||||
strcat((char*)A1, ":");
|
||||
strcat((char*)A1, realm->password);
|
||||
strcat((char*)A1, "\0");
|
||||
|
||||
/* make A2 */
|
||||
*A2 = (unsigned char)0;
|
||||
if (do_post)
|
||||
strcat(A2, "POST");
|
||||
strcat((char*)A2, "POST");
|
||||
else
|
||||
strcat(A2, "GET");
|
||||
strcat(A2, ":");
|
||||
strcat(A2, current_docname);
|
||||
strcat(A2, "\0");
|
||||
strcat((char*)A2, "GET");
|
||||
strcat((char*)A2, ":");
|
||||
strcat((char*)A2, current_docname);
|
||||
strcat((char*)A2, "\0");
|
||||
|
||||
if (!(md5_cleartext = (unsigned char*)malloc(100 + 1)))
|
||||
outofmem(__FILE__, "compose_auth_string");
|
||||
@ -783,8 +783,8 @@ PRIVATE char *compose_auth_string ARGS2(HTAAScheme, scheme,
|
||||
if (!(digest2 = (unsigned char*)malloc(16)))
|
||||
outofmem(__FILE__, "compose_auth_string");
|
||||
|
||||
MD5Mem(A1, strlen(A1), digest1);
|
||||
MD5Mem(A2, strlen(A2), digest2);
|
||||
MD5Mem(A1, strlen((char*)A1), digest1);
|
||||
MD5Mem(A2, strlen((char*)A2), digest2);
|
||||
|
||||
MD5Convert_to_Hex(digest1, hex1);
|
||||
MD5Convert_to_Hex(digest2, hex2);
|
||||
@ -792,13 +792,13 @@ PRIVATE char *compose_auth_string ARGS2(HTAAScheme, scheme,
|
||||
/* make md5_cleartext */
|
||||
|
||||
*md5_cleartext = (unsigned char)0;
|
||||
strcat(md5_cleartext, hex1);
|
||||
strcat(md5_cleartext, ":");
|
||||
strcat(md5_cleartext, nonce);
|
||||
strcat(md5_cleartext, ":");
|
||||
strcat(md5_cleartext, hex2);
|
||||
strcat((char*)md5_cleartext, (char*)hex1);
|
||||
strcat((char*)md5_cleartext, ":");
|
||||
strcat((char*)md5_cleartext, (char*)nonce);
|
||||
strcat((char*)md5_cleartext, ":");
|
||||
strcat((char*)md5_cleartext, (char*)hex2);
|
||||
|
||||
MD5Mem(md5_cleartext, strlen(md5_cleartext), digest1);
|
||||
MD5Mem(md5_cleartext, strlen((char*)md5_cleartext), digest1);
|
||||
MD5Convert_to_Hex(digest1, md5_ciphertext);
|
||||
|
||||
*result = (char)0;
|
||||
@ -811,7 +811,7 @@ PRIVATE char *compose_auth_string ARGS2(HTAAScheme, scheme,
|
||||
strcat(result, "\", uri=\"");
|
||||
strcat(result, current_docname);
|
||||
strcat(result, "\", response=\"");
|
||||
strcat(result, md5_ciphertext);
|
||||
strcat(result, (char*)md5_ciphertext);
|
||||
strcat(result, "\", opaque=\"");
|
||||
strcat(result, opaque);
|
||||
strcat(result, "\"");
|
||||
|
@ -47,6 +47,7 @@
|
||||
#include "tcp.h" /* NETREAD() etc. */
|
||||
#include "HTAAUtil.h" /* Implemented here */
|
||||
#include "HTAssoc.h" /* Assoc list */
|
||||
#include "HTTCP.h"
|
||||
|
||||
#ifndef DISABLE_TRACE
|
||||
extern int www2Trace;
|
||||
|
@ -41,7 +41,11 @@
|
||||
#include "HText.h" /* See bugs above */
|
||||
#include "HTAlert.h"
|
||||
|
||||
#include "../src/mosaic.h"
|
||||
#include "../src/gui.h"
|
||||
#include "../src/mo-www.h"
|
||||
#include "../src/proxy.h"
|
||||
#include "../src/proxy-dialogs.h"
|
||||
|
||||
#ifndef DISABLE_TRACE
|
||||
extern int www2Trace;
|
||||
|
@ -15,10 +15,8 @@
|
||||
#include "tcp.h" /* for TOUPPER */
|
||||
#include <ctype.h> /* for toupper - should be in tcp.h */
|
||||
|
||||
extern void mo_gui_notify_progress (char *);
|
||||
extern int mo_gui_check_icon (int);
|
||||
extern void mo_gui_clear_icon (void);
|
||||
extern void mo_gui_update_meter(int,char *);
|
||||
#include "../src/mosaic.h"
|
||||
#include "../src/gui.h"
|
||||
|
||||
PUBLIC void HTAlert ARGS1(WWW_CONST char *, Msg)
|
||||
{
|
||||
|
@ -28,7 +28,7 @@ extern char * HTPromptPassword PARAMS((WWW_CONST char * Msg));
|
||||
** The input is a list of parameters for printf.
|
||||
*/
|
||||
extern void HTAlert PARAMS((WWW_CONST char * Msg));
|
||||
|
||||
extern void HTDoneWithIcon NOPARAMS;
|
||||
|
||||
/* Display a progress message for information (and diagnostics) only
|
||||
**
|
||||
@ -36,6 +36,7 @@ extern void HTAlert PARAMS((WWW_CONST char * Msg));
|
||||
** The input is a list of parameters for printf.
|
||||
*/
|
||||
extern void HTProgress PARAMS((WWW_CONST char * Msg));
|
||||
extern void HTMeter PARAMS((WWW_CONST int, WWW_CONST char *));
|
||||
extern int HTCheckActiveIcon PARAMS((int twirl));
|
||||
extern void HTClearActiveIcon NOPARAMS;
|
||||
|
||||
|
@ -96,9 +96,9 @@ PUBLIC HTChildAnchor * HTAnchor_findChild
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
if (kids = parent->children) { /* parent has children : search them */
|
||||
if ((kids = parent->children)) { /* parent has children : search them */
|
||||
if (tag && *tag) { /* TBL */
|
||||
while (child = HTList_nextObject (kids)) {
|
||||
while ((child = HTList_nextObject (kids))) {
|
||||
if (equivalent(child->tag, tag)) { /* Case sensitive 920226 */
|
||||
#ifndef DISABLE_TRACE
|
||||
if (www2Trace) fprintf (stderr,
|
||||
@ -115,7 +115,7 @@ PUBLIC HTChildAnchor * HTAnchor_findChild
|
||||
child = HTChildAnchor_new ();
|
||||
#ifndef DISABLE_TRACE
|
||||
if (www2Trace) fprintf(stderr, "new Anchor %p named `%s' is child of %p\n",
|
||||
(void*)child, (int)tag ? tag : (WWW_CONST char *)"" , (void*)parent); /* int for apollo */
|
||||
(void*)child, tag == NULL ? tag : (WWW_CONST char *)"" , (void*)parent); /* int for apollo */
|
||||
#endif
|
||||
HTList_addObject (parent->children, child);
|
||||
child->parent = parent;
|
||||
@ -201,7 +201,7 @@ HTAnchor * HTAnchor_findAddress
|
||||
|
||||
/* Search list for anchor */
|
||||
grownups = adults;
|
||||
while (foundAnchor = HTList_nextObject (grownups)) {
|
||||
while ((foundAnchor = HTList_nextObject (grownups))) {
|
||||
if (equivalent(foundAnchor->address, address)) {
|
||||
#ifndef DISABLE_TRACE
|
||||
if (www2Trace) fprintf(stderr, "Anchor %p with address `%s' already exists.\n",
|
||||
|
@ -21,6 +21,9 @@
|
||||
|
||||
#include "../libnut/system.h"
|
||||
|
||||
#include "../src/mosaic.h"
|
||||
#include "../src/mo-www.h"
|
||||
|
||||
#ifndef DISABLE_TRACE
|
||||
extern int www2Trace;
|
||||
#endif
|
||||
|
@ -43,10 +43,13 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "HTFTP.h" /* Implemented here */
|
||||
#include "../libnut/str-tools.h"
|
||||
#define LINE_LENGTH 1024
|
||||
|
||||
#include "HTAlert.h"
|
||||
#include "HTParse.h"
|
||||
#include "HTUtils.h"
|
||||
#include "tcp.h"
|
||||
@ -57,6 +60,10 @@
|
||||
#include "HTSort.h"
|
||||
#include "HText.h"
|
||||
|
||||
#include "../src/mosaic.h"
|
||||
#include "../src/gui.h"
|
||||
#include "../src/gui-dialogs.h"
|
||||
|
||||
#ifndef MAXHOSTNAMELEN
|
||||
#define MAXHOSTNAMELEN 64 /* Arbitrary limit */
|
||||
#endif
|
||||
@ -125,6 +132,8 @@ extern int ftpFilenameLength;
|
||||
extern int ftpEllipsisLength;
|
||||
extern int ftpEllipsisMode;
|
||||
|
||||
void CLOSE_CONTROL(int);
|
||||
|
||||
/*SWP -- 9.27.95 -- Directory parsing*/
|
||||
#define NEW_PARSE
|
||||
#ifdef NEW_PARSE
|
||||
@ -1042,7 +1051,7 @@ PRIVATE int get_listen_socket()
|
||||
sin->sin_addr.s_addr = INADDR_ANY; /* Any peer address */
|
||||
{
|
||||
int status;
|
||||
int address_length = sizeof(soc_address);
|
||||
socklen_t address_length = sizeof(soc_address);
|
||||
#ifdef SOCKS
|
||||
status = Rgetsockname(control,
|
||||
#else
|
||||
@ -1878,7 +1887,7 @@ skipDir:
|
||||
{
|
||||
struct sockaddr_in soc_address;
|
||||
|
||||
int soc_addrlen = sizeof(soc_address);
|
||||
socklen_t soc_addrlen = sizeof(soc_address);
|
||||
#ifdef SOCKS
|
||||
status = Raccept(master_socket,
|
||||
#else
|
||||
@ -2271,7 +2280,7 @@ PUBLIC int HTFTPSend ARGS1 ( char *, name ) {
|
||||
extern int twirl_increment;
|
||||
int next_twirl = twirl_increment, intr = 0;
|
||||
struct sockaddr_in soc_address;
|
||||
int soc_addrlen = sizeof (soc_address);
|
||||
socklen_t soc_addrlen = sizeof (soc_address);
|
||||
struct stat sbuf;
|
||||
|
||||
HTProgress ("FTP send in progress.");
|
||||
@ -2501,7 +2510,7 @@ PUBLIC int HTFTPSend ARGS1 ( char *, name ) {
|
||||
} /* End of HTFTPSend */
|
||||
|
||||
|
||||
CLOSE_CONTROL(s)
|
||||
void CLOSE_CONTROL(s)
|
||||
int s;
|
||||
{
|
||||
NETCLOSE(s);
|
||||
|
@ -9,6 +9,7 @@
|
||||
*/
|
||||
#include "../config.h"
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "HTFWriter.h"
|
||||
|
||||
@ -19,6 +20,12 @@
|
||||
#include "tcp.h"
|
||||
#include "HTCompressed.h"
|
||||
|
||||
#include "../libhtmlw/HTML.h"
|
||||
|
||||
#include "../src/mosaic.h"
|
||||
#include "../src/gui-dialogs.h"
|
||||
#include "../src/img.h"
|
||||
|
||||
extern char *currentURL;
|
||||
|
||||
int imageViewInternal=0;
|
||||
@ -245,7 +252,7 @@ PRIVATE void HTFWriter_free ARGS1(HTStream *, me)
|
||||
|
||||
buf=(char *)calloc((strlen(currentURL)+strlen(me->fnam)+5),sizeof(char));
|
||||
sprintf(buf,"%s\n%s",me->fnam,currentURL);
|
||||
ImageResolve(NULL,buf,0);
|
||||
ImageResolve(NULL,buf,0,NULL,NULL);
|
||||
|
||||
free(buf);
|
||||
|
||||
|
@ -23,6 +23,8 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/param.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "HText.h"
|
||||
#include "HTUtils.h"
|
||||
|
||||
@ -36,7 +38,9 @@
|
||||
#include "HTFWriter.h"
|
||||
#include "HTInit.h"
|
||||
#include "HTSort.h"
|
||||
|
||||
#include "../libnut/system.h"
|
||||
#include "../libnut/str-tools.h"
|
||||
|
||||
typedef struct _HTSuffix {
|
||||
char * suffix;
|
||||
@ -729,7 +733,7 @@ PUBLIC BOOL HTEditable ARGS1 (WWW_CONST char *,filename)
|
||||
#ifdef NO_GROUPS
|
||||
return NO; /* Safe answer till we find the correct algorithm */
|
||||
#else
|
||||
int groups[NGROUPS];
|
||||
gid_t groups[NGROUPS];
|
||||
uid_t myUid;
|
||||
int ngroups; /* The number of groups */
|
||||
struct stat fileStatus;
|
||||
@ -1165,8 +1169,8 @@ forget_multi:
|
||||
if(strcmp(dataptr,".") == 0) continue;
|
||||
|
||||
/* If its .. *and* the current directory is / dont show anything, otherwise
|
||||
/* print out a nice Parent Directory entry.
|
||||
/* */
|
||||
* print out a nice Parent Directory entry.
|
||||
* */
|
||||
|
||||
if(strcmp(dataptr,"..") == 0)
|
||||
{
|
||||
@ -1227,8 +1231,8 @@ forget_multi:
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(buffer,"%s (%d bytes)",
|
||||
dataptr, statbuf.st_size);
|
||||
sprintf(buffer,"%s (%ld bytes)",
|
||||
dataptr, (long)statbuf.st_size);
|
||||
|
||||
format = HTFileFormat(dataptr, &pencoding,
|
||||
WWW_SOURCE, &cmpr);
|
||||
|
@ -2,6 +2,8 @@
|
||||
** =============================
|
||||
**
|
||||
*/
|
||||
#include <unistd.h>
|
||||
|
||||
#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;
|
||||
|
@ -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"
|
||||
|
@ -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++);
|
||||
|
@ -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, "<H1>ERROR IN HTTP/1.0 RESPONSE</H1> The remote server returned a HTTP/1.0 response that Mosaic's MIME parser could not understand. Please contact the server maintainer.<P> Sorry for the inconvenience,<P> <ADDRESS>The Management</ADDRESS>");
|
||||
|
@ -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
|
||||
|
@ -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,6 +1027,8 @@ 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)
|
||||
@ -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("<BR><IMG SRC=\"");
|
||||
PUTS(filename);
|
||||
PUTS("\"><BR>");
|
||||
@ -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("<BR><IMG SRC=\"");
|
||||
PUTS(filename);
|
||||
PUTS("\"><BR>");
|
||||
@ -1653,7 +1663,7 @@ PRIVATE void read_article ARGS1 (char *, artID)
|
||||
if(uudecodeline(fp,line)){
|
||||
decode=6;
|
||||
sprintf(line,"%s\n%s",filename,filename);
|
||||
ImageResolve(NULL,line,0);
|
||||
ImageResolve(NULL,line,0,NULL,NULL);
|
||||
PUTS("<BR><IMG SRC=\"");
|
||||
PUTS(filename);
|
||||
PUTS("\"><BR>");
|
||||
@ -1666,7 +1676,7 @@ 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("<BR><IMG SRC=\"");
|
||||
PUTS(filename);
|
||||
PUTS("\"><BR>");
|
||||
@ -1953,7 +1963,7 @@ PRIVATE void read_list NOARGS
|
||||
if (n->attribs&naSUBSCRIBED &&
|
||||
(newsShowAllGroups || n->unread>0
|
||||
|| newsShowReadGroups)) {
|
||||
sprintf(line,"%s % 7d S <A HREF=\"news:%s\">%s</A> \n",
|
||||
sprintf(line,"%s % 7ld S <A HREF=\"news:%s\">%s</A> \n",
|
||||
(lastg==1)?"<b>>>></b>":" ",
|
||||
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 <A HREF=\"news:%s\">%s</A> \n",
|
||||
sprintf(line,"%s % 7ld %s <A HREF=\"news:%s\">%s</A> \n",
|
||||
(lastg==1)? "<b>>>></b>":" ",
|
||||
n->unread, n->attribs&naSUBSCRIBED?"S":"U",
|
||||
n->name, elgroup);
|
||||
|
@ -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
|
||||
/*
|
||||
|
@ -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 */
|
||||
|
@ -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);
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "HTUtils.h"
|
||||
#include "HTChunk.h"
|
||||
#include "../libnut/str-tools.h"
|
||||
|
@ -50,6 +50,7 @@ Default values
|
||||
|
||||
#ifdef unix
|
||||
#define GOT_PIPE
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
typedef struct sockaddr_in SockA; /* See netinet/in.h */
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -63,4 +63,4 @@
|
||||
the source whenever something changed. */
|
||||
|
||||
|
||||
|
||||
mo_status mo_post_mailto_win (char *to_address, char *subject);
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user