1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] Commit several fixes.

This commit is contained in:
hniksic 2000-04-12 06:23:35 -07:00
parent e5b8bc39c0
commit 6b4a85888e
9 changed files with 24 additions and 15 deletions

BIN
po/hr.gmo

Binary file not shown.

View File

@ -1,3 +1,9 @@
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

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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;
}

View File

@ -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");

View File

@ -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;

View File

@ -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'))