+2000-04-12 Hrvoje Niksic <hniksic@iskon.hr>
+
+ * http.c (gethttp): Don't free REQUEST -- it was allocated with
+ alloca().
+ Pointed out by Gisle Vanem <gvanem@eunet.no>.
+
2000-04-04 Dan Harkless <dan-wget@dilvish.speed.net>
* host.c (store_hostaddress): R. K. Owen's patch introduces a
do
{
- c1 = tolower (*p1++);
- c2 = tolower (*p2++);
+ c1 = TOLOWER (*p1++);
+ c2 = TOLOWER (*p2++);
if (c1 == '\0')
break;
}
do
{
- c1 = tolower (*p1++);
- c2 = tolower (*p2++);
+ c1 = TOLOWER (*p1++);
+ c2 = TOLOWER (*p2++);
if (c1 == '\0' || c1 != c2)
return c1 - c2;
} while (--n > 0);
++s;
if (!*s)
return 0;
- if (tolower (*s) != 'b')
+ if (TOLOWER (*s) != 'b')
continue;
if (strncasecmp (s, "byte", 4))
continue;
}
/* 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)
{
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;
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;
if (num_written < 0)
{
logputs (LOG_VERBOSE, _("Failed writing HTTP request.\n"));
- free (request);
CLOSE (sock);
return WRITEFAILED;
}
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");
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);
}
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
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;
/* 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'))