From dfae7cc51e19e1ca4aa857bf858e7e0ad4fa9ce1 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Fri, 2 Jan 2009 02:01:19 -0500 Subject: snapshot of project "lynx", label v2-8-7dev_12a --- WWW/Library/Implementation/HTAnchor.c | 4 +++- WWW/Library/Implementation/HTAnchor.h | 4 ++-- WWW/Library/Implementation/HTFTP.c | 9 ++++----- WWW/Library/Implementation/HTFile.c | 15 ++++----------- WWW/Library/Implementation/HTMIME.c | 3 +-- WWW/Library/Implementation/HTNews.c | 5 +---- WWW/Library/Implementation/HTRules.c | 4 ++-- WWW/Library/Implementation/HTString.c | 8 ++++---- WWW/Library/Implementation/HTTP.c | 7 +++---- WWW/Library/Implementation/HTUtils.h | 4 ++-- WWW/Library/Implementation/SGML.h | 4 ++-- WWW/Library/Implementation/UCMap.h | 4 ++-- WWW/Library/Implementation/makefile.in | 11 +++++++---- 13 files changed, 37 insertions(+), 45 deletions(-) (limited to 'WWW') diff --git a/WWW/Library/Implementation/HTAnchor.c b/WWW/Library/Implementation/HTAnchor.c index 4e5e2391..f317d69f 100644 --- a/WWW/Library/Implementation/HTAnchor.c +++ b/WWW/Library/Implementation/HTAnchor.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTAnchor.c,v 1.61 2008/12/31 22:02:20 tom Exp $ + * $LynxId: HTAnchor.c,v 1.62 2009/01/01 16:56:15 tom Exp $ * * Hypertext "Anchor" Object HTAnchor.c * ========================== @@ -1365,6 +1365,8 @@ LYUCcharset *HTAnchor_resetUCInfoStage(HTParentAnchor *me, /* Allow a switch to a more suitable display charset */ if (LYhndl >= 0 && LYhndl != ohandle && which_stage == UCT_STAGE_PARSER) setup_switch_display_charset(me, LYhndl); +#else + (void) ohandle; #endif return (&me->UCStages->s[which_stage].C); } diff --git a/WWW/Library/Implementation/HTAnchor.h b/WWW/Library/Implementation/HTAnchor.h index 9d175c9c..653111b3 100644 --- a/WWW/Library/Implementation/HTAnchor.h +++ b/WWW/Library/Implementation/HTAnchor.h @@ -1,5 +1,5 @@ /* - * $LynxId: HTAnchor.h,v 1.32 2008/12/31 01:35:49 tom Exp $ + * $LynxId: HTAnchor.h,v 1.33 2009/01/01 16:47:33 tom Exp $ * * Hypertext "Anchor" Object HTAnchor.h * ========================== @@ -112,7 +112,7 @@ extern "C" { char *content_md5; /* Content-MD5 */ char *message_id; /* Message-ID */ char *subject; /* Subject */ - int content_length; /* Content-Length */ + long content_length; /* Content-Length */ char *date; /* Date */ char *expires; /* Expires */ char *last_modified; /* Last-Modified */ diff --git a/WWW/Library/Implementation/HTFTP.c b/WWW/Library/Implementation/HTFTP.c index bbf5e35a..5f508efc 100644 --- a/WWW/Library/Implementation/HTFTP.c +++ b/WWW/Library/Implementation/HTFTP.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTFTP.c,v 1.86 2008/12/26 22:19:03 tom Exp $ + * $LynxId: HTFTP.c,v 1.87 2009/01/01 16:53:31 tom Exp $ * * File Transfer Protocol (FTP) Client * for a WorldWideWeb browser @@ -2551,7 +2551,9 @@ static EntryInfo *parse_dir_entry(char *entry, } /* switch (server_type) */ -#ifndef LONG_LIST +#ifdef LONG_LIST + (void) remove_size; +#else if (remove_size && entry_info->size) { entry_info->size = 0; } @@ -2960,7 +2962,6 @@ static int read_directory(HTParentAnchor *parent, int status; BOOLEAN WasInterrupted = FALSE; HTStructured *target = HTML_new(parent, format_out, sink); - HTStructuredClass targetClass; char *filename = HTParse(address, "", PARSE_PATH + PARSE_PUNCTUATION); EntryInfo *entry_info; BOOLEAN first = TRUE; @@ -2972,8 +2973,6 @@ static int read_directory(HTParentAnchor *parent, char string_buffer[64]; #endif - targetClass = *(target->isa); - _HTProgress(gettext("Receiving FTP directory.")); /* diff --git a/WWW/Library/Implementation/HTFile.c b/WWW/Library/Implementation/HTFile.c index 376795af..e98077c3 100644 --- a/WWW/Library/Implementation/HTFile.c +++ b/WWW/Library/Implementation/HTFile.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTFile.c,v 1.116 2008/12/31 01:47:53 tom Exp $ + * $LynxId: HTFile.c,v 1.117 2009/01/01 16:47:58 tom Exp $ * * File Access HTFile.c * =========== @@ -1791,9 +1791,6 @@ static void do_readme(HTStructured * target, const char *localname) fp = fopen(readme_file_name, "r"); if (fp) { - HTStructuredClass targetClass; - - targetClass = *target->isa; /* (Can't init agregate in K&R) */ START(HTML_PRE); while ((ch = fgetc(fp)) != EOF) { PUTC((char) ch); @@ -1881,7 +1878,6 @@ static int print_local_dir(DIR *dp, char *localname, char *pathname = NULL; char *tail = NULL; char *p; - BOOL present[HTML_A_ATTRIBUTES]; char *tmpfilename = NULL; BOOL need_parent_link = FALSE; BOOL preformatted = FALSE; @@ -1917,9 +1913,6 @@ static int print_local_dir(DIR *dp, char *localname, target = HTML_new(anchor, format_out, sink); targetClass = *target->isa; /* Copy routine entry points */ - for (i = 0; i < HTML_A_ATTRIBUTES; i++) - present[i] = (BOOL) (i == HTML_A_HREF); - /* * The need_parent_link flag will be set if an "Up to " link was * not created for a readable parent in HTDirTitles() because LONG_LIST is @@ -2918,10 +2911,10 @@ int HTLoadFile(const char *addr, } /* end if localname is a directory */ if (S_ISREG(dir_info.st_mode)) { -#ifdef INT_MAX - if (dir_info.st_size <= INT_MAX) +#ifdef LONG_MAX + if (dir_info.st_size <= LONG_MAX) #endif - anchor->content_length = dir_info.st_size; + anchor->content_length = (long) dir_info.st_size; } } /* end if file stat worked */ diff --git a/WWW/Library/Implementation/HTMIME.c b/WWW/Library/Implementation/HTMIME.c index bda69913..844cf6e0 100644 --- a/WWW/Library/Implementation/HTMIME.c +++ b/WWW/Library/Implementation/HTMIME.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTMIME.c,v 1.67 2008/12/14 18:46:52 tom Exp $ + * $LynxId: HTMIME.c,v 1.68 2009/01/01 16:50:17 tom Exp $ * * MIME Message Parse HTMIME.c * ================== @@ -2501,7 +2501,6 @@ int HTrjis(char **t, */ /* * RJIS ( Recover JIS code from broken file ) - * @Header: rjis.c,v 0.2 92/09/04 takahasi Exp @ * Copyright (C) 1992 1994 * Hironobu Takahashi (takahasi@tiny.or.jp) * diff --git a/WWW/Library/Implementation/HTNews.c b/WWW/Library/Implementation/HTNews.c index bc16318d..1a3fdbc0 100644 --- a/WWW/Library/Implementation/HTNews.c +++ b/WWW/Library/Implementation/HTNews.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTNews.c,v 1.57 2007/07/03 00:13:21 tom Exp $ + * $LynxId: HTNews.c,v 1.58 2009/01/01 17:00:01 tom Exp $ * * NEWS ACCESS HTNews.c * =========== @@ -99,7 +99,6 @@ static HTStructured *target; /* The output sink */ static HTStructuredClass targetClass; /* Copy of fn addresses */ static HTStream *rawtarget = NULL; /* The output sink for rawtext */ static HTStreamClass rawtargetClass; /* Copy of fn addresses */ -static HTParentAnchor *node_anchor; /* Its anchor */ static int diagnostic; /* level: 0=none 2=source */ static BOOL rawtext = NO; /* Flag: HEAD or -mime_headers */ static HTList *NNTP_AuthInfo = NULL; /* AUTHINFO database */ @@ -2537,7 +2536,6 @@ static int HTLoadNews(const char *arg, rawtext = (BOOL) (head_wanted || keep_mime_headers); } if (rawtext) { - node_anchor = anAnchor; rawtarget = HTStreamStack(WWW_PLAINTEXT, format_out, stream, anAnchor); @@ -2556,7 +2554,6 @@ static int HTLoadNews(const char *arg, * 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 */ } diff --git a/WWW/Library/Implementation/HTRules.c b/WWW/Library/Implementation/HTRules.c index 382805ff..7fcc1e97 100644 --- a/WWW/Library/Implementation/HTRules.c +++ b/WWW/Library/Implementation/HTRules.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTRules.c,v 1.34 2008/07/06 12:53:43 tom Exp $ + * $LynxId: HTRules.c,v 1.35 2009/01/01 16:59:24 tom Exp $ * * Configuration manager for Hypertext Daemon HTRules.c * ========================================== @@ -508,7 +508,7 @@ int HTSetConfiguration(char *config) status >= 1 ? quality : 1.0, status >= 2 ? secs : 0.0, status >= 3 ? secs_per_byte : 0.0, - status >= 4 ? maxbytes : 0, + status >= 4 ? (long) maxbytes : 0, mediaCFG); } else if (0 == strncasecomp(word1, "htbin", 5) || diff --git a/WWW/Library/Implementation/HTString.c b/WWW/Library/Implementation/HTString.c index 1b7ff715..30c2bace 100644 --- a/WWW/Library/Implementation/HTString.c +++ b/WWW/Library/Implementation/HTString.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTString.c,v 1.55 2008/12/31 22:03:25 tom Exp $ + * $LynxId: HTString.c,v 1.56 2009/01/01 16:57:48 tom Exp $ * * Case-independent string comparison HTString.c * @@ -604,9 +604,9 @@ typedef enum { Format } PRINTF; -#define VA_INTGR(type) ival = va_arg((*ap), type) -#define VA_FLOAT(type) fval = va_arg((*ap), type) -#define VA_POINT(type) pval = (char *)va_arg((*ap), type) +#define VA_INTGR(type) ival = (int) va_arg((*ap), type) +#define VA_FLOAT(type) fval = (double) va_arg((*ap), type) +#define VA_POINT(type) pval = (char *) va_arg((*ap), type) #define NUM_WIDTH 10 /* allow for width substituted for "*" in "%*s" */ /* also number of chars assumed to be needed in addition diff --git a/WWW/Library/Implementation/HTTP.c b/WWW/Library/Implementation/HTTP.c index 4242f5aa..47c8307a 100644 --- a/WWW/Library/Implementation/HTTP.c +++ b/WWW/Library/Implementation/HTTP.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTTP.c,v 1.101 2008/12/31 02:03:20 tom Exp $ + * $LynxId: HTTP.c,v 1.103 2009/01/01 16:40:54 tom Exp $ * * HyperText Tranfer Protocol - Client implementation HTTP.c * ========================== @@ -469,6 +469,7 @@ static void show_cert_issuer(X509 * peer_cert GCC_UNUSED) /* * Remove IPv6 brackets (and any port-number) from the given host-string. */ +#ifdef USE_SSL static char *StripIpv6Brackets(char *host) { int port_number; @@ -486,6 +487,7 @@ static char *StripIpv6Brackets(char *host) } return host; } +#endif /* Load Document from HTTP Server HTLoadHTTP() * ============================== @@ -524,7 +526,6 @@ static int HTLoadHTTP(const char *arg, BOOL do_post = FALSE; /* ARE WE posting ? */ const char *METHOD; - BOOL had_header; /* Have we had at least one header? */ char *line_buffer; char *line_kept_clean; int real_length_of_line = 0; @@ -624,7 +625,6 @@ static int HTLoadHTTP(const char *arg, * over here... */ eol = 0; - had_header = NO; length = 0; doing_redirect = FALSE; permanent_redirection = FALSE; @@ -1816,7 +1816,6 @@ static int HTLoadHTTP(const char *arg, already_retrying = TRUE; eol = 0; bytes_already_read = 0; - had_header = NO; length = 0; doing_redirect = FALSE; permanent_redirection = FALSE; diff --git a/WWW/Library/Implementation/HTUtils.h b/WWW/Library/Implementation/HTUtils.h index 16137deb..e16fc10d 100644 --- a/WWW/Library/Implementation/HTUtils.h +++ b/WWW/Library/Implementation/HTUtils.h @@ -1,5 +1,5 @@ /* - * $LynxId: HTUtils.h,v 1.92 2008/12/29 18:35:59 tom Exp $ + * $LynxId: HTUtils.h,v 1.93 2009/01/01 21:49:29 tom Exp $ * * Utility macros for the W3 code library * MACROS FOR GENERAL USE @@ -624,7 +624,7 @@ extern int WWW_TraceMask; #define CTRACE(p) ((void)((TRACE) && ( LY_SHOWWHERE fprintf p ))) #define CTRACE2(m,p) ((void)((m) && ( LY_SHOWWHERE fprintf p ))) #define tfp TraceFP() -#define CTRACE_SLEEP(secs) if (TRACE && LYTraceLogFP == 0) sleep(secs) +#define CTRACE_SLEEP(secs) if (TRACE && LYTraceLogFP == 0) sleep((unsigned)secs) #define CTRACE_FLUSH(fp) if (TRACE) fflush(fp) #include diff --git a/WWW/Library/Implementation/SGML.h b/WWW/Library/Implementation/SGML.h index 04a2fc40..66f77c94 100644 --- a/WWW/Library/Implementation/SGML.h +++ b/WWW/Library/Implementation/SGML.h @@ -1,5 +1,5 @@ /* - * $LynxId: SGML.h,v 1.40 2008/09/18 23:36:15 tom Exp $ + * $LynxId: SGML.h,v 1.41 2009/01/01 23:05:07 tom Exp $ * SGML parse and stream definition for libwww * SGML AND STRUCTURED STREAMS * @@ -139,7 +139,7 @@ extern "C" { struct _tag { const char *name; /* The name of the tag */ #ifdef USE_COLOR_STYLE - int name_len; /* The length of the name */ + unsigned name_len; /* The length of the name */ #endif #ifdef EXP_JUSTIFY_ELTS BOOL can_justify; /* justification allowed? */ diff --git a/WWW/Library/Implementation/UCMap.h b/WWW/Library/Implementation/UCMap.h index 233361f1..e1a802cc 100644 --- a/WWW/Library/Implementation/UCMap.h +++ b/WWW/Library/Implementation/UCMap.h @@ -1,5 +1,5 @@ /* - * $LynxId: UCMap.h,v 1.22 2009/01/01 00:46:06 tom Exp $ + * $LynxId: UCMap.h,v 1.23 2009/01/01 02:03:25 tom Exp $ */ #ifndef UCMAP_H #define UCMAP_H @@ -20,7 +20,7 @@ extern "C" { ucCannotConvert = -11, ucCannotOutput = -12, ucBufferTooSmall = -13, - ucUnknown = -14, + ucUnknown = -14 } UCStatus; typedef long UCode_t; diff --git a/WWW/Library/Implementation/makefile.in b/WWW/Library/Implementation/makefile.in index dc8d55d7..62a5a4f8 100644 --- a/WWW/Library/Implementation/makefile.in +++ b/WWW/Library/Implementation/makefile.in @@ -1,4 +1,4 @@ -# $LynxId: makefile.in,v 1.19 2008/09/17 01:14:02 tom Exp $ +# $LynxId: makefile.in,v 1.20 2009/01/02 00:52:08 tom Exp $ # Make WWW under unix for a.n.other unix system (bsd) # Use this as a template @@ -22,6 +22,11 @@ DEFS = @DEFS@ EXTRA_CPPFLAGS = @EXTRA_CPPFLAGS@ CPPFLAGS = @CPPFLAGS@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ + +RANLIB = @RANLIB@ + o = .@OBJEXT@ x = @EXEEXT@ @@ -58,8 +63,6 @@ VC = 2.14 # If this env var is set to something else Some makes will use that instead SHELL = @CONFIG_SHELL@ -RANLIB = @RANLIB@ - # .h files are distributed but originally are made from the # self-documenting hypertext files. @@ -170,7 +173,7 @@ depend : # On SGI, ranlib is unnecessary and does not exist so we ignore errors # for that step $(LOB)/libwww.a : $(COMMON) - @AR@ @AR_OPTS@ $(LOB)/libwww.a $(COMMON) + $(AR) $(ARFLAGS) $(LOB)/libwww.a $(COMMON) -$(RANLIB) $(LOB)/libwww.a # Clean up everything generatable except final products -- cgit 1.4.1-2-gfad0