]> sjero.net Git - wget/commitdiff
[svn] Commit several fixes.
authorhniksic <devnull@localhost>
Wed, 12 Apr 2000 13:23:35 +0000 (06:23 -0700)
committerhniksic <devnull@localhost>
Wed, 12 Apr 2000 13:23:35 +0000 (06:23 -0700)
po/hr.gmo
src/ChangeLog
src/cmpt.c
src/ftp.c
src/headers.c
src/http.c
src/main.c
src/recur.c
src/wget.h

index adc85d9749ff974590734bee88b3c41d60862138..c468f994cdc13157b547bbb7f0eb3fa42e8296b9 100644 (file)
Binary files a/po/hr.gmo and b/po/hr.gmo differ
index 044e78399ae790ea9e32b9740caad6baac50e9b1..c94e12471254980bbf724d6945637f68cba077a5 100644 (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
index b193ae3b794381c126b3c559b9e86c94a6f34fbf..439828ca570639f3b98c77680e17cf24a5ae628f 100644 (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);
index a5473916650b93877d5ce7fbfc61e125f8cbf69e..9a7f33d81a13627d4c6135355a64bc09c21a174e 100644 (file)
--- 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;
index bf279552aa9459a97cbf48cf60f3659c12064dbd..6b1a670fd041b9e2c43af457c994db613d90b65c 100644 (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;
index effd0c97298140e68b9f5f656948368d0ff64347..fde316bfe2c54d43bab0a99f352bd05f34677353 100644 (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;
     }
index cb724787615ea5e9da92636992d6f4be074dd3c7..2d1276b8100ea5ef34f84d68e056a643c38b4992 100644 (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");
index 078f7d855ee3f3d2308b2d2dee159117a91c0277..397db8c69c515a2245e675f543305f9805b52437 100644 (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;
index 1a1fdb4589f220abaf5a9b5ef4391170a0b29ea3..d42cb5aeb1d7b71350d5efac0cb0c5ada54fce6e 100644 (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'))