From: hniksic Date: Wed, 12 Apr 2000 13:23:35 +0000 (-0700) Subject: [svn] Commit several fixes. X-Git-Tag: v1.13~2491 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=6b4a85888e351e8ad6c55770fff98e0eddf22cd2 [svn] Commit several fixes. --- diff --git a/po/hr.gmo b/po/hr.gmo index adc85d97..c468f994 100644 Binary files a/po/hr.gmo and b/po/hr.gmo differ diff --git a/src/ChangeLog b/src/ChangeLog index 044e7839..c94e1247 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2000-04-12 Hrvoje Niksic + + * http.c (gethttp): Don't free REQUEST -- it was allocated with + alloca(). + Pointed out by Gisle Vanem . + 2000-04-04 Dan Harkless * host.c (store_hostaddress): R. K. Owen's patch introduces a diff --git a/src/cmpt.c b/src/cmpt.c index b193ae3b..439828ca 100644 --- a/src/cmpt.c +++ b/src/cmpt.c @@ -67,8 +67,8 @@ strcasecmp (const char *s1, const char *s2) do { - c1 = tolower (*p1++); - c2 = tolower (*p2++); + c1 = TOLOWER (*p1++); + c2 = TOLOWER (*p2++); if (c1 == '\0') break; } @@ -96,8 +96,8 @@ strncasecmp (const char *s1, const char *s2, size_t n) do { - c1 = tolower (*p1++); - c2 = tolower (*p2++); + c1 = TOLOWER (*p1++); + c2 = TOLOWER (*p2++); if (c1 == '\0' || c1 != c2) return c1 - c2; } while (--n > 0); diff --git a/src/ftp.c b/src/ftp.c index a5473916..9a7f33d8 100644 --- a/src/ftp.c +++ b/src/ftp.c @@ -90,7 +90,7 @@ ftp_expected_bytes (const char *s) ++s; if (!*s) return 0; - if (tolower (*s) != 'b') + if (TOLOWER (*s) != 'b') continue; if (strncasecmp (s, "byte", 4)) continue; @@ -243,8 +243,8 @@ Error in server response, closing control connection.\n")); } /* Third: Set type to Image (binary). */ if (!opt.server_response) - logprintf (LOG_VERBOSE, "==> TYPE %c ... ", toupper (u->ftp_type)); - err = ftp_type (&con->rbuf, toupper (u->ftp_type)); + logprintf (LOG_VERBOSE, "==> TYPE %c ... ", TOUPPER (u->ftp_type)); + err = ftp_type (&con->rbuf, TOUPPER (u->ftp_type)); /* FTPRERR, WRITEFAILED, FTPUNKNOWNTYPE */ switch (err) { @@ -268,7 +268,7 @@ Error in server response, closing control connection.\n")); logputs (LOG_VERBOSE, "\n"); logprintf (LOG_NOTQUIET, _("Unknown type `%c', closing control connection.\n"), - toupper (u->ftp_type)); + TOUPPER (u->ftp_type)); CLOSE (csock); rbuf_uninitialize (&con->rbuf); return err; diff --git a/src/headers.c b/src/headers.c index bf279552..6b1a670f 100644 --- a/src/headers.c +++ b/src/headers.c @@ -128,7 +128,7 @@ header_process (const char *header, const char *name, void *arg) { /* Check whether HEADER matches NAME. */ - while (*name && (tolower (*name) == tolower (*header))) + while (*name && (TOLOWER (*name) == TOLOWER (*header))) ++name, ++header; if (*name || *header++ != ':') return 0; diff --git a/src/http.c b/src/http.c index effd0c97..fde316bf 100644 --- a/src/http.c +++ b/src/http.c @@ -505,7 +505,6 @@ Accept: %s\r\n\ if (num_written < 0) { logputs (LOG_VERBOSE, _("Failed writing HTTP request.\n")); - free (request); CLOSE (sock); return WRITEFAILED; } diff --git a/src/main.c b/src/main.c index cb724787..2d1276b8 100644 --- a/src/main.c +++ b/src/main.c @@ -87,7 +87,11 @@ i18n_initialize (void) things up. For example, when in a foreign locale, Solaris strptime() fails to handle international dates correctly, which makes http_atotm() malfunction. */ +#ifdef LC_MESSAGES setlocale (LC_MESSAGES, ""); +#else + setlocale (LC_ALL, ""); +#endif /* Set the text message domain. */ bindtextdomain ("wget", LOCALEDIR); textdomain ("wget"); diff --git a/src/recur.c b/src/recur.c index 078f7d85..397db8c6 100644 --- a/src/recur.c +++ b/src/recur.c @@ -335,7 +335,7 @@ recursive_retrieve (const char *file, const char *this_url) char *p; /* Just lowercase the hostname. */ for (p = u->host; *p; p++) - *p = tolower (*p); + *p = TOLOWER (*p); free (u->url); u->url = str_url (u, 0); } @@ -655,9 +655,9 @@ parse_robots (const char *robots_filename) sprintf (version, "Wget/%s", version_string); } for (p = version; *p; p++) - *p = tolower (*p); + *p = TOLOWER (*p); for (p = base_version; *p && *p != '/'; p++) - *p = tolower (*p); + *p = TOLOWER (*p); *p = '\0'; /* Setting this to 1 means that Wget considers itself under @@ -729,7 +729,7 @@ parse_robots (const char *robots_filename) int match = 0; /* Lowercase the agent string. */ for (p = str; *p; p++) - *p = tolower (*p); + *p = TOLOWER (*p); /* If the string is `*', it matches. */ if (*str == '*' && !*(str + 1)) match = 1; diff --git a/src/wget.h b/src/wget.h index 1a1fdb45..d42cb5ae 100644 --- a/src/wget.h +++ b/src/wget.h @@ -113,7 +113,7 @@ char *xstrdup PARAMS ((const char *)); /* ASCII char -> HEX digit */ #define ASC2HEXD(x) (((x) >= '0' && (x) <= '9') ? \ - ((x) - '0') : (toupper(x) - 'A' + 10)) + ((x) - '0') : (TOUPPER(x) - 'A' + 10)) /* HEX digit -> ASCII char */ #define HEXD2ASC(x) (((x) < 10) ? ((x) + '0') : ((x) - 10 + 'A'))