diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 1998-06-04 14:28:00 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 1998-06-04 14:28:00 -0400 |
commit | b5ffa7c020e319cbfceee3c506f5c16764800dc2 (patch) | |
tree | 01d4efe0277a37c6bb05dc6599638822aa8a238d /WWW | |
parent | 6e75abc094af51d02563fd5250d1b55e9bb96912 (diff) | |
download | lynx-snapshots-b5ffa7c020e319cbfceee3c506f5c16764800dc2.tar.gz |
snapshot of project "lynx", label v2-8-1dev_14
Diffstat (limited to 'WWW')
-rw-r--r-- | WWW/Library/Implementation/CommonMakefile | 82 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTAAServ.c | 34 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTAAUtil.c | 9 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTAuth.c | 1 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTFTP.c | 4 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTFile.c | 18 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTFormat.c | 21 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTLex.c | 25 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTMIME.c | 20 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTMLDTD.c | 5 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTPlain.c | 4 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTTP.c | 13 | ||||
-rw-r--r-- | WWW/Library/unix/makefile.in | 1 |
13 files changed, 88 insertions, 149 deletions
diff --git a/WWW/Library/Implementation/CommonMakefile b/WWW/Library/Implementation/CommonMakefile index c7fe8899..818cb036 100644 --- a/WWW/Library/Implementation/CommonMakefile +++ b/WWW/Library/Implementation/CommonMakefile @@ -68,6 +68,8 @@ LOB = $(WTMP)/Library/$(WWW_MACH) # add -DNEW_GATEWAY here for the new gateway config stuff CFLAGS2 = $(CFLAGS) $(LYFLAGS) $(WAISCFLAGS) -I$(CMN) -DXMOSAIC_HACK -DACCESS_AUTH +COMPILE = $(ECHO) $(CC) $(CFLAGS2) -c + CERNLIBBIN = $(WWW)/bin COMMON = $(LOB)/HTParse.o $(LOB)/HTAccess.o $(LOB)/HTTP.o \ @@ -220,102 +222,102 @@ $(OE) : touch $@ $(LOB)/HTList.o : $(OE) $(CMN)HTList.c $(CMN)HTUtils.h $(CMN)HTList.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTList.c + $(COMPILE) $(CMN)HTList.c $(LOB)/HTAnchor.o : $(OE) $(CMN)HTAnchor.c $(CMN)HTUtils.h $(CMN)HTList.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAnchor.c + $(COMPILE) $(CMN)HTAnchor.c $(LOB)/HTFormat.o : $(OE) $(CMN)HTFormat.c $(CMN)HTUtils.h $(CMN)HTList.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTFormat.c + $(COMPILE) $(CMN)HTFormat.c $(LOB)/HTMIME.o : $(OE) $(CMN)HTMIME.c $(CMN)HTUtils.h $(CMN)HTList.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTMIME.c + $(COMPILE) $(CMN)HTMIME.c $(LOB)/HTHistory.o : $(OE) $(CMN)HTHistory.c $(CMN)HTUtils.h $(CMN)HTList.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTHistory.c + $(COMPILE) $(CMN)HTHistory.c $(LOB)/HTNews.o : $(OE) $(CMN)HTNews.c $(CMN)HTUtils.h $(CMN)HTList.h\ $(CMN)HTMLDTD.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTNews.c + $(COMPILE) $(CMN)HTNews.c $(LOB)/HTGopher.o : $(OE) $(CMN)HTGopher.c $(CMN)HTUtils.h $(CMN)HTList.h \ $(CMN)HTMLDTD.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTGopher.c + $(COMPILE) $(CMN)HTGopher.c $(LOB)/HTTelnet.o : $(OE) $(CMN)HTTelnet.c $(CMN)HTUtils.h $(CMN)HTTelnet.h $(CMN)../../../userdefs.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTTelnet.c + $(COMPILE) $(CMN)HTTelnet.c $(LOB)/HTFinger.o : $(OE) $(CMN)HTFinger.c $(CMN)HTUtils.h $(CMN)HTList.h \ $(CMN)HTMLDTD.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTFinger.c + $(COMPILE) $(CMN)HTFinger.c $(LOB)/HTStyle.o : $(OE) $(CMN)HTStyle.c $(CMN)HTUtils.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTStyle.c + $(COMPILE) $(CMN)HTStyle.c $(LOB)/HTAtom.o : $(OE) $(CMN)HTAtom.c $(CMN)HTUtils.h $(CMN)HTList.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAtom.c + $(COMPILE) $(CMN)HTAtom.c $(LOB)/HTChunk.o : $(OE) $(CMN)HTChunk.c $(CMN)HTUtils.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTChunk.c + $(COMPILE) $(CMN)HTChunk.c $(LOB)/HTString.o : $(OE) $(CMN)HTString.c $(CMN)HTUtils.h $(CMN)Version.make - $(CC) -c -o $@ $(CFLAGS2) -DVC=\"$(VC)\" $(CMN)HTString.c + $(COMPILE) -DVC=\"$(VC)\" $(CMN)HTString.c $(LOB)/HTRules.o : $(OE) $(CMN)HTRules.c $(CMN)HTUtils.h $(CMN)Version.make \ $(CMN)HTAAServ.h $(CMN)HTAAProt.h - $(CC) -c -o $@ $(CFLAGS2) -DVC=\"$(VC)\" $(CMN)HTRules.c + $(COMPILE) -DVC=\"$(VC)\" $(CMN)HTRules.c $(LOB)/SGML.o : $(OE) $(CMN)SGML.c $(CMN)HTUtils.h $(CMN)UCAux.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)SGML.c + $(COMPILE) $(CMN)SGML.c $(LOB)/HTMLGen.o : $(OE) $(CMN)HTMLGen.c $(CMN)HTUtils.h $(CMN)HTMLDTD.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTMLGen.c + $(COMPILE) $(CMN)HTMLGen.c $(LOB)/HTMLDTD.o : $(OE) $(CMN)HTMLDTD.c $(CMN)SGML.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTMLDTD.c + $(COMPILE) $(CMN)HTMLDTD.c $(LOB)/HTPlain.o : $(OE) $(CMN)HTPlain.c $(CMN)HTPlain.h $(CMN)HTStream.h \ $(CMN)UCAux.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTPlain.c + $(COMPILE) $(CMN)HTPlain.c $(LOB)/HTWAIS.o : $(OE) $(CMN)HTWAIS.c $(CMN)HTUtils.h $(CMN)HTList.h - $(CC) -c -o $@ $(CFLAGS2) $(WAISINC) $(CMN)HTWAIS.c + $(COMPILE) $(WAISINC) $(CMN)HTWAIS.c $(LOB)/HTWSRC.o : $(OE) $(CMN)HTWSRC.c $(CMN)HTUtils.h $(CMN)HTList.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTWSRC.c + $(COMPILE) $(CMN)HTWSRC.c $(LOB)/HTWriter.o : $(OE) $(CMN)HTWriter.c $(CMN)HTWriter.h $(CMN)HTStream.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTWriter.c + $(COMPILE) $(CMN)HTWriter.c # Access Authorization $(LOB)/HTAAUtil.o : $(OE) $(CMN)HTAAUtil.c $(CMN)HTAAUtil.h \ $(CMN)HTUtils.h $(CMN)HTString.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAAUtil.c + $(COMPILE) $(CMN)HTAAUtil.c $(LOB)/HTAAFile.o : $(OE) $(CMN)HTAAFile.c $(CMN)HTAAFile.h \ $(CMN)HTAAUtil.h $(CMN)HTUtils.h $(CMN)HTList.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAAFile.c + $(COMPILE) $(CMN)HTAAFile.c $(LOB)/HTPasswd.o : $(OE) $(CMN)HTPasswd.c $(CMN)HTPasswd.h \ $(CMN)HTAAUtil.h $(CMN)HTAAFile.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTPasswd.c + $(COMPILE) $(CMN)HTPasswd.c $(LOB)/HTGroup.o : $(OE) $(CMN)HTGroup.c $(CMN)HTGroup.h \ $(CMN)HTAAUtil.h $(CMN)HTAAFile.h \ $(CMN)HTAssoc.h $(CMN)HTLex.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTGroup.c + $(COMPILE) $(CMN)HTGroup.c $(LOB)/HTACL.o : $(OE) $(CMN)HTACL.c $(CMN)HTACL.h \ $(CMN)HTAAUtil.h $(CMN)HTAAFile.h $(CMN)HTGroup.h \ $(CMN)HTAssoc.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTACL.c + $(COMPILE) $(CMN)HTACL.c $(LOB)/HTAuth.o : $(OE) $(CMN)HTAuth.c $(CMN)HTAuth.h \ $(CMN)HTAAUtil.h $(CMN)HTPasswd.h $(CMN)HTAAFile.h \ $(CMN)HTAssoc.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAuth.c + $(COMPILE) $(CMN)HTAuth.c $(LOB)/HTAAServ.o : $(OE) $(CMN)HTAAServ.c $(CMN)HTAAServ.h \ $(CMN)HTAAUtil.h $(CMN)HTAAFile.h $(CMN)HTPasswd.h \ @@ -323,52 +325,52 @@ $(LOB)/HTAAServ.o : $(OE) $(CMN)HTAAServ.c $(CMN)HTAAServ.h \ $(CMN)HTUU.h $(CMN)HTParse.h $(CMN)HTList.h \ $(CMN)HTUtils.h $(CMN)HTString.h $(CMN)HTRules.h \ $(CMN)HTAAProt.h $(CMN)HTAssoc.h $(CMN)HTLex.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAAServ.c + $(COMPILE) $(CMN)HTAAServ.c $(LOB)/HTAABrow.o : $(OE) $(CMN)HTAABrow.c $(CMN)HTAABrow.h \ $(CMN)HTAAUtil.h $(CMN)HTUU.h \ $(CMN)HTUtils.h $(CMN)HTString.h \ $(CMN)HTParse.h $(CMN)HTList.h \ $(CMN)HTAssoc.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAABrow.c + $(COMPILE) $(CMN)HTAABrow.c $(LOB)/HTAAProt.o : $(OE) $(CMN)HTAAProt.c $(CMN)HTAAProt.h \ $(CMN)HTUtils.h $(CMN)HTAAUtil.h $(CMN)HTAAFile.h \ $(CMN)HTAssoc.h $(CMN)HTLex.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAAProt.c + $(COMPILE) $(CMN)HTAAProt.c $(LOB)/HTAssoc.o : $(OE) $(CMN)HTAssoc.c $(CMN)HTAssoc.h \ $(CMN)HTUtils.h $(CMN)HTString.h $(CMN)HTList.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAssoc.c + $(COMPILE) $(CMN)HTAssoc.c $(LOB)/HTLex.o : $(OE) $(CMN)HTLex.c $(CMN)HTLex.h $(CMN)HTUtils.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTLex.c + $(COMPILE) $(CMN)HTLex.c $(LOB)/HTUU.o : $(OE) $(CMN)HTUU.c $(CMN)HTUU.h $(CMN)HTUtils.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTUU.c + $(COMPILE) $(CMN)HTUU.c # Communications & Files $(LOB)/HTTP.o : $(OE) $(CMN)HTTP.c $(CMN)HTUtils.h $(CMN)HTAABrow.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTTP.c + $(COMPILE) $(CMN)HTTP.c $(LOB)/HTTCP.o : $(OE) $(CMN)HTTCP.c $(CMN)HTUtils.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTTCP.c + $(COMPILE) $(CMN)HTTCP.c $(LOB)/HTFile.o : $(OE) $(CMN)HTFile.c $(CMN)HTUtils.h \ $(CMN)HTMLDTD.h $(CMN)HTAAServ.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTFile.c + $(COMPILE) $(CMN)HTFile.c $(LOB)/HTBTree.o : $(OE) $(CMN)HTBTree.c $(CMN)HTUtils.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTBTree.c + $(COMPILE) $(CMN)HTBTree.c $(LOB)/HTFTP.o : $(OE) $(CMN)HTFTP.c $(CMN)HTUtils.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTFTP.c + $(COMPILE) $(CMN)HTFTP.c $(LOB)/HTAccess.o : $(OE) $(CMN)HTAccess.c $(CMN)HTUtils.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAccess.c + $(COMPILE) $(CMN)HTAccess.c $(LOB)/HTParse.o : $(OE) $(CMN)HTParse.c $(CMN)HTUtils.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTParse.c + $(COMPILE) $(CMN)HTParse.c diff --git a/WWW/Library/Implementation/HTAAServ.c b/WWW/Library/Implementation/HTAAServ.c index 5f61cb76..10f0a6f6 100644 --- a/WWW/Library/Implementation/HTAAServ.c +++ b/WWW/Library/Implementation/HTAAServ.c @@ -92,45 +92,34 @@ PUBLIC char *HTAA_statusMessage NOARGS /* 401 cases */ case HTAA_NO_AUTH: return "Unauthorized -- authentication failed"; - break; case HTAA_NOT_MEMBER: return "Unauthorized to access the document"; - break; /* 403 cases */ case HTAA_BY_RULE: return "Forbidden -- by rule"; - break; case HTAA_IP_MASK: return "Forbidden -- server refuses to serve to your IP address"; - break; case HTAA_NO_ACL: case HTAA_NO_ENTRY: return "Forbidden -- access to file is never allowed"; - break; case HTAA_SETUP_ERROR: return "Forbidden -- server protection setup error"; - break; case HTAA_DOTDOT: return "Forbidden -- URL containing /../ disallowed"; - break; case HTAA_HTBIN: return "Forbidden -- /htbin feature not enabled on this server"; - break; /* 404 cases */ case HTAA_NOT_FOUND: return "Not found -- file doesn't exist or is read protected"; - break; /* Success */ case HTAA_OK: return "AA: Access should be ok but something went wrong"; - break; case HTAA_OK_GATEWAY: return "AA check bypassed (gatewaying) but something went wrong"; - break; /* Others */ default: @@ -147,46 +136,34 @@ PRIVATE char *status_name ARGS1(HTAAFailReasonType, reason) /* 401 cases */ case HTAA_NO_AUTH: return "NO-AUTHENTICATION"; - break; case HTAA_NOT_MEMBER: return "NOT-AUTHORIZED"; - break; /* 403 cases */ case HTAA_BY_RULE: return "FORB-RULE"; - break; case HTAA_IP_MASK: return "FORB-IP"; - break; case HTAA_NO_ACL: return "NO-ACL-FILE"; - break; case HTAA_NO_ENTRY: return "NO-ACL-ENTRY"; - break; case HTAA_SETUP_ERROR: return "SETUP-ERROR"; - break; case HTAA_DOTDOT: return "SLASH-DOT-DOT"; - break; case HTAA_HTBIN: return "HTBIN-OFF"; - break; /* 404 cases */ case HTAA_NOT_FOUND: return "NOT-FOUND"; - break; /* Success */ case HTAA_OK: return "OK"; - break; case HTAA_OK_GATEWAY: return "OK-GATEWAY"; - break; /* Others */ default: @@ -520,7 +497,6 @@ PUBLIC int HTAA_checkAuthorization ARGS4(CONST char *, url, case HTAA_NO_AUTH: case HTAA_NOT_MEMBER: return 401; - break; case HTAA_BY_RULE: case HTAA_IP_MASK: @@ -530,16 +506,13 @@ PUBLIC int HTAA_checkAuthorization ARGS4(CONST char *, url, case HTAA_DOTDOT: case HTAA_HTBIN: return 403; - break; case HTAA_NOT_FOUND: return 404; - break; case HTAA_OK: case HTAA_OK_GATEWAY: return 200; - break; default: return 500; @@ -576,7 +549,6 @@ PRIVATE char *compose_scheme_specifics ARGS2(HTAAScheme, scheme, (realm ? realm : "UNKNOWN")); return result; } - break; case HTAA_PUBKEY: { @@ -587,7 +559,6 @@ PRIVATE char *compose_scheme_specifics ARGS2(HTAAScheme, scheme, "PUBKEY-NOT-IMPLEMENTED"); return result; } - break; default: return NULL; } @@ -613,7 +584,7 @@ PRIVATE char *compose_scheme_specifics ARGS2(HTAAScheme, scheme, PUBLIC char *HTAA_composeAuthHeaders NOARGS { static char *result = NULL; - HTAAScheme scheme; + int n; char *scheme_name; char *scheme_params; HTAAProt *prot = HTAA_getCurrentProtection(); @@ -633,7 +604,8 @@ PUBLIC char *HTAA_composeAuthHeaders NOARGS outofmem(__FILE__, "HTAA_composeAuthHeaders"); *result = '\0'; - for (scheme=0; scheme < HTAA_MAX_SCHEMES; scheme++) { + for (n = 0; n < (int) HTAA_MAX_SCHEMES; n++) { + HTAAScheme scheme = (HTAAScheme) n; if (-1 < HTList_indexOf(prot->valid_schemes, (void*)scheme)) { if ((scheme_name = HTAAScheme_name(scheme))) { scheme_params = compose_scheme_specifics(scheme,prot); diff --git a/WWW/Library/Implementation/HTAAUtil.c b/WWW/Library/Implementation/HTAAUtil.c index 2ce86409..7653c312 100644 --- a/WWW/Library/Implementation/HTAAUtil.c +++ b/WWW/Library/Implementation/HTAAUtil.c @@ -111,22 +111,16 @@ PUBLIC char *HTAAScheme_name ARGS1(HTAAScheme, scheme) switch (scheme) { case HTAA_NONE: return "None"; - break; case HTAA_BASIC: return "Basic"; - break; case HTAA_PUBKEY: return "Pubkey"; - break; case HTAA_KERBEROS_V4: return "KerberosV4"; - break; case HTAA_KERBEROS_V5: return "KerberosV5"; - break; case HTAA_UNKNOWN: return "UNKNOWN"; - break; default: return "THIS-IS-A-BUG"; } @@ -171,13 +165,10 @@ PUBLIC char *HTAAMethod_name ARGS1(HTAAMethod, method) switch (method) { case METHOD_GET: return "GET"; - break; case METHOD_PUT: return "PUT"; - break; case METHOD_UNKNOWN: return "UNKNOWN"; - break; default: return "THIS-IS-A-BUG"; } diff --git a/WWW/Library/Implementation/HTAuth.c b/WWW/Library/Implementation/HTAuth.c index 70d9781a..9f2185c7 100644 --- a/WWW/Library/Implementation/HTAuth.c +++ b/WWW/Library/Implementation/HTAuth.c @@ -199,7 +199,6 @@ PUBLIC HTAAUser *HTAA_authenticate ARGS3(HTAAScheme, scheme, else return NULL; } - break; default: /* Other authentication routines go here */ return NULL; diff --git a/WWW/Library/Implementation/HTFTP.c b/WWW/Library/Implementation/HTFTP.c index 1970b03d..aa03f47f 100644 --- a/WWW/Library/Implementation/HTFTP.c +++ b/WWW/Library/Implementation/HTFTP.c @@ -2097,7 +2097,6 @@ PRIVATE EntryInfo * parse_dir_entry ARGS2( */ StrAllocCopy(entry_info->filename, entry); return(entry_info); /* mostly empty info */ - break; /* not needed */ } /* switch (server_type) */ @@ -2164,7 +2163,6 @@ PRIVATE int compare_EntryInfo_structs ARGS2( return(1); else return(-1); - break; case FILE_BY_TYPE: if (entry1->type && entry2->type) { @@ -2174,7 +2172,6 @@ PRIVATE int compare_EntryInfo_structs ARGS2( /* else fall to filename comparison */ } return (strcmp(entry1->filename, entry2->filename)); - break; case FILE_BY_DATE: if (entry1->date && entry2->date) { @@ -2266,7 +2263,6 @@ PRIVATE int compare_EntryInfo_structs ARGS2( /* else fall to filename comparison */ } return (strcmp(entry1->filename, entry2->filename)); - break; case FILE_BY_NAME: default: diff --git a/WWW/Library/Implementation/HTFile.c b/WWW/Library/Implementation/HTFile.c index e4548616..0474c9ae 100644 --- a/WWW/Library/Implementation/HTFile.c +++ b/WWW/Library/Implementation/HTFile.c @@ -100,6 +100,10 @@ typedef struct _HTSuffix { #endif /* NGROUPS_MAX */ #endif /* NGROUPS */ +#ifndef TYPE_GETGROUPS +#define TYPE_GETGROUPS int +#endif + #include <HTML.h> /* For directory object building */ #define PUTC(c) (*target->isa->put_character)(target, c) @@ -223,6 +227,7 @@ PRIVATE void LYListFmtParse ARGS5( s++; c = *s; /* the format char. or \0 */ *s = '\0'; + buf[0] = '\0'; switch (c) { case '\0': @@ -1086,11 +1091,7 @@ PUBLIC BOOL HTEditable ARGS1( #ifdef NO_GROUPS return NO; /* Safe answer till we find the correct algorithm */ #else -#ifdef NeXT - int groups[NGROUPS]; -#else - gid_t groups[NGROUPS]; -#endif /* NeXT */ + TYPE_GETGROUPS groups[NGROUPS]; uid_t myUid; int ngroups; /* The number of groups */ struct stat fileStatus; @@ -1106,12 +1107,13 @@ PUBLIC BOOL HTEditable ARGS1( int i2; fprintf(tfp, "File mode is 0%o, uid=%d, gid=%d. My uid=%d, %d groups (", - (unsigned int) fileStatus.st_mode, fileStatus.st_uid, + (unsigned int) fileStatus.st_mode, + (int) fileStatus.st_uid, (int) fileStatus.st_gid, (int) myUid, (int) ngroups); for (i2 = 0; i2 < ngroups; i2++) - fprintf(tfp, " %d", groups[i2]); + fprintf(tfp, " %d", (int) groups[i2]); fprintf(tfp, ")\n"); } @@ -2067,6 +2069,7 @@ PUBLIC int HTLoadFile ARGS4( sprintf((char *)dirname, "F%s",dirbuf->d_name); /* D & F to have first directories, then files */ #else + { if (dir_list_style == MIXED_STYLE) sprintf((char *)dirname, " %s/", dirbuf->d_name); @@ -2076,6 +2079,7 @@ PUBLIC int HTLoadFile ARGS4( else sprintf((char *)dirname, "D%s", dirbuf->d_name); + } else if (dir_list_style == MIXED_STYLE) sprintf((char *)dirname, " %s", dirbuf->d_name); else if (dir_list_style == FILES_FIRST) diff --git a/WWW/Library/Implementation/HTFormat.c b/WWW/Library/Implementation/HTFormat.c index db0b59c1..fb7705e3 100644 --- a/WWW/Library/Implementation/HTFormat.c +++ b/WWW/Library/Implementation/HTFormat.c @@ -579,8 +579,11 @@ PUBLIC int HTCopy ARGS4( (*targetClass.put_block)(sink, input_buffer, status); #ifdef DISP_PARTIAL - if (display_partial) - HText_pageDisplay(Newline,""); + if (display_partial && + ((Newline_partial + display_lines) > NumOfLines_partial)) { + NumOfLines_partial = HText_getNumOfLines(); + HText_pageDisplay(Newline_partial, ""); + } #endif /* DISP_PARTIAL */ bytes += status; @@ -644,8 +647,11 @@ PUBLIC int HTFileCopy ARGS2( (*targetClass.put_block)(sink, input_buffer, status); #ifdef DISP_PARTIAL - if (display_partial) - HText_pageDisplay(Newline,""); + if (display_partial && + ((Newline_partial + display_lines) > NumOfLines_partial)) { + NumOfLines_partial = HText_getNumOfLines(); + HText_pageDisplay(Newline_partial, ""); + } #endif /* DISP_PARTIAL */ bytes += status; @@ -738,8 +744,11 @@ PRIVATE int HTGzFileCopy ARGS2( (*targetClass.put_block)(sink, input_buffer, status); #ifdef DISP_PARTIAL - if (display_partial) - HText_pageDisplay(Newline,""); + if (display_partial && + ((Newline_partial + display_lines) > NumOfLines_partial)) { + NumOfLines_partial = HText_getNumOfLines(); + HText_pageDisplay(Newline_partial, ""); + } #endif /* DISP_PARTIAL */ bytes += status; diff --git a/WWW/Library/Implementation/HTLex.c b/WWW/Library/Implementation/HTLex.c index 6cffe648..56b1fdae 100644 --- a/WWW/Library/Implementation/HTLex.c +++ b/WWW/Library/Implementation/HTLex.c @@ -77,14 +77,14 @@ PUBLIC LexItem lex ARGS1(FILE *, fp) else return LEX_ALPH_STR; } else switch(ch) { - case EOF: return LEX_EOF; break; + case EOF: return LEX_EOF; case '\n': - HTlex_line++; return LEX_REC_SEP; break; - case ':': return LEX_FIELD_SEP; break; - case ',': return LEX_ITEM_SEP; break; - case '(': return LEX_OPEN_PAREN; break; - case ')': return LEX_CLOSE_PAREN; break; - case '@': return LEX_AT_SIGN; break; + HTlex_line++; return LEX_REC_SEP; + case ':': return LEX_FIELD_SEP; + case ',': return LEX_ITEM_SEP; + case '(': return LEX_OPEN_PAREN; + case ')': return LEX_CLOSE_PAREN; + case '@': return LEX_AT_SIGN; default: ; /* Leading white space ignored (SP,TAB,CR) */ } break; @@ -104,39 +104,28 @@ PUBLIC char *lex_verbose ARGS1(LexItem, lex_item) switch (lex_item) { case LEX_NONE: /* Internally used */ return "NO-LEX-ITEM"; - break; case LEX_EOF: /* End of file */ return "end-of-file"; - break; case LEX_REC_SEP: /* Record separator */ return "record separator (newline)"; - break; case LEX_FIELD_SEP: /* Field separator */ return "field separator ':'"; - break; case LEX_ITEM_SEP: /* List item separator */ return "item separator ','"; - break; case LEX_OPEN_PAREN: /* Group start tag */ return "'('"; - break; case LEX_CLOSE_PAREN: /* Group end tag */ return "')'"; - break; case LEX_AT_SIGN: /* Address qualifier */ return "address qualifier '@'"; - break; case LEX_ALPH_STR: /* Alphanumeric string */ sprintf(msg, "alphanumeric string '%s'", HTlex_buffer); return msg; - break; case LEX_TMPL_STR: /* Template string */ sprintf(msg, "template string '%s'", HTlex_buffer); return msg; - break; default: return "UNKNOWN-LEX-ITEM"; - break; } } diff --git a/WWW/Library/Implementation/HTMIME.c b/WWW/Library/Implementation/HTMIME.c index 70083ab5..ed731263 100644 --- a/WWW/Library/Implementation/HTMIME.c +++ b/WWW/Library/Implementation/HTMIME.c @@ -560,7 +560,6 @@ PRIVATE void HTMIME_put_character ARGS2( default: goto bad_field_name; - break; } /* switch on character */ break; @@ -593,7 +592,6 @@ PRIVATE void HTMIME_put_character ARGS2( CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", c, "'g' or 'l'"); goto bad_field_name; - break; } /* switch on character */ break; @@ -620,7 +618,6 @@ PRIVATE void HTMIME_put_character ARGS2( CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", c, "'l' or 't'"); goto bad_field_name; - break; } /* switch on character */ break; @@ -645,7 +642,6 @@ PRIVATE void HTMIME_put_character ARGS2( CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", c, "'a' or 'o'"); goto bad_field_name; - break; } /* switch on character */ break; @@ -670,7 +666,6 @@ PRIVATE void HTMIME_put_character ARGS2( CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", c, "'n' or 'o'"); goto bad_field_name; - break; } /* switch on character */ break; @@ -697,7 +692,6 @@ PRIVATE void HTMIME_put_character ARGS2( CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", c, "'n' or 't'"); goto bad_field_name; - break; } /* switch on character */ break; @@ -724,7 +718,6 @@ PRIVATE void HTMIME_put_character ARGS2( CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", c, "'t' or 'x'"); goto bad_field_name; - break; } /* switch on character */ break; @@ -759,7 +752,6 @@ PRIVATE void HTMIME_put_character ARGS2( CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", c, "'a', 'i' or 'o'"); goto bad_field_name; - break; } /* switch on character */ break; @@ -784,7 +776,6 @@ PRIVATE void HTMIME_put_character ARGS2( CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", c, "'r' or 'u'"); goto bad_field_name; - break; } /* switch on character */ break; @@ -811,7 +802,6 @@ PRIVATE void HTMIME_put_character ARGS2( CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", c, "'a' or 'o'"); goto bad_field_name; - break; } /* switch on character */ break; @@ -836,7 +826,6 @@ PRIVATE void HTMIME_put_character ARGS2( CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", c, "'a' or 'e'"); goto bad_field_name; - break; } /* switch on character */ break; @@ -863,7 +852,6 @@ PRIVATE void HTMIME_put_character ARGS2( CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", c, "'r' or 't'"); goto bad_field_name; - break; } /* switch on character */ break; @@ -887,7 +875,6 @@ PRIVATE void HTMIME_put_character ARGS2( CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", c, "':' or '2'"); goto bad_field_name; - break; } /* switch on character */ break; @@ -914,7 +901,6 @@ PRIVATE void HTMIME_put_character ARGS2( CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", c, "'i' or 'r'"); goto bad_field_name; - break; } /* switch on character */ break; @@ -941,7 +927,6 @@ PRIVATE void HTMIME_put_character ARGS2( CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", c, "'p' or 'r'"); goto bad_field_name; - break; } /* switch on character */ break; @@ -968,7 +953,6 @@ PRIVATE void HTMIME_put_character ARGS2( CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", c, "'a' or 'i'"); goto bad_field_name; - break; } /* switch on character */ break; @@ -995,7 +979,6 @@ PRIVATE void HTMIME_put_character ARGS2( CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", c, "'a' or 'w'"); goto bad_field_name; - break; } /* switch on character */ break; @@ -1078,7 +1061,6 @@ PRIVATE void HTMIME_put_character ARGS2( default: CTRACE(tfp, "HTMIME: Was CONTENT_, found nothing; bleah\n"); goto bad_field_name; - break; } /* switch on character */ break; @@ -1114,7 +1096,6 @@ PRIVATE void HTMIME_put_character ARGS2( default: CTRACE (tfp, "HTMIME: Was CONTENT_L, found nothing; bleah\n"); goto bad_field_name; - break; } /* switch on character */ break; @@ -1142,7 +1123,6 @@ PRIVATE void HTMIME_put_character ARGS2( default: CTRACE (tfp, "HTMIME: Was CONTENT_T, found nothing; bleah\n"); goto bad_field_name; - break; } /* switch on character */ break; diff --git a/WWW/Library/Implementation/HTMLDTD.c b/WWW/Library/Implementation/HTMLDTD.c index 4e83e029..966697a8 100644 --- a/WWW/Library/Implementation/HTMLDTD.c +++ b/WWW/Library/Implementation/HTMLDTD.c @@ -1598,8 +1598,9 @@ PUBLIC void HTSwitchDTD ARGS1( { if (TRACE) CTRACE(tfp,"HTMLDTD: Copying DTD element info of size %d, %d * %d\n", - new ? sizeof(tags_new) : sizeof(tags_old), - HTML_ELEMENTS, sizeof(HTTag)); + (int) (new ? sizeof(tags_new) : sizeof(tags_old)), + HTML_ELEMENTS, + (int) sizeof(HTTag)); if (new) memcpy(tags, tags_new, HTML_ELEMENTS * sizeof(HTTag)); else diff --git a/WWW/Library/Implementation/HTPlain.c b/WWW/Library/Implementation/HTPlain.c index 5caa4550..b7b457d7 100644 --- a/WWW/Library/Implementation/HTPlain.c +++ b/WWW/Library/Implementation/HTPlain.c @@ -219,7 +219,7 @@ PRIVATE void HTPlain_write ARGS3(HTStream *, me, CONST char*, s, int, l) char c; unsigned char c_unsign; BOOL chk; - UCode_t code, uck; + UCode_t code, uck = -1; char saved_char_in = '\0'; for (p = s; p < e; p++) { @@ -584,7 +584,7 @@ PRIVATE void HTPlain_write ARGS3(HTStream *, me, CONST char*, s, int, l) ** If we get to here and have a monobyte character, ** pass it. - FM */ - } else if (c_unsign > 0 && c_unsign < 256) { + } else if (c_unsign != 0 && c_unsign < 256) { HText_appendCharacter(me->text, c); } #endif /* REMOVE_CR_ONLY */ diff --git a/WWW/Library/Implementation/HTTP.c b/WWW/Library/Implementation/HTTP.c index 870f35b1..8ad25eba 100644 --- a/WWW/Library/Implementation/HTTP.c +++ b/WWW/Library/Implementation/HTTP.c @@ -692,8 +692,11 @@ try_again: } } #ifdef DISP_PARTIAL +/* retrieving HTTP headers: never use display_partial mode at this point! + else if (display_partial) - HText_pageDisplay(Newline,""); + HText_pageDisplay(Newline_partial,""); +*/ #endif /* DISP_PARTIAL */ bytes_already_read += status; @@ -899,7 +902,6 @@ try_again: HTTP_NETCLOSE(s, handle); status = HT_NO_DATA; goto clean_up; - break; case 205: /* @@ -913,7 +915,6 @@ try_again: HTTP_NETCLOSE(s, handle); status = HT_NO_DATA; goto clean_up; - break; case 206: /* @@ -926,7 +927,6 @@ try_again: HTTP_NETCLOSE(s, handle); status = HT_NO_DATA; goto clean_up; - break; default: /* @@ -1488,7 +1488,6 @@ Cookie2_continuation: FREE(line_buffer); FREE(line_kept_clean); goto try_again; - break; } else if (!(traversal || dump_output_immediately) && HTConfirm("Show the 401 message body?")) { break; @@ -1500,7 +1499,6 @@ Cookie2_continuation: status = -1; goto clean_up; } - break; case 407: /* @@ -1537,7 +1535,6 @@ Cookie2_continuation: FREE(line_buffer); FREE(line_kept_clean); goto try_again; - break; } else if (!(traversal || dump_output_immediately) && HTConfirm("Show the 407 message body?")) { if (!dump_output_immediately && @@ -1558,7 +1555,6 @@ Cookie2_continuation: status = -1; goto clean_up; } - break; case 408: /* @@ -1569,7 +1565,6 @@ Cookie2_continuation: HTTP_NETCLOSE(s, handle); status = HT_NO_DATA; goto done; - break; default: /* diff --git a/WWW/Library/unix/makefile.in b/WWW/Library/unix/makefile.in index 3aae2df5..ed69fe50 100644 --- a/WWW/Library/unix/makefile.in +++ b/WWW/Library/unix/makefile.in @@ -7,6 +7,7 @@ WWW_MACH = unix # The ASIS repository's name for the machine we are on ASIS_MACH = hardware/os +ECHO = @DONT_ECHO_CC@ LFLAGS = prefix = @prefix@ |