]> sjero.net Git - wget/blobdiff - src/cookies.c
[svn] Allow Wget to be compiled with a K&R compiler.
[wget] / src / cookies.c
index d4ccb90ac8221a0409efdd3e356a438c3661570c..18e6c8f9f11ddfcd4ef4f11187c857a3de5d7389 100644 (file)
@@ -84,7 +84,7 @@ cookie_new (void)
 
   /* If we don't know better, assume cookie is non-permanent and valid
      for the entire session. */
-  cookie->expiry_time = ~0UL;
+  cookie->expiry_time = ~(unsigned long)0;
 
   /* Assume default port. */
   cookie->port = 80;
@@ -121,7 +121,7 @@ delete_cookie (struct cookie *cookie)
   result = alloca (HP_len + 1 + numdigit (port) + 1);  \
   memcpy (result, host, HP_len);                       \
   result[HP_len] = ':';                                        \
-  long_to_string (result + HP_len + 1, port);          \
+  number_to_string (result + HP_len + 1, port);                \
 } while (0)
 
 /* Find cookie chain that corresponds to DOMAIN (exact) and PORT.  */
@@ -726,9 +726,9 @@ check_domain_match (const char *cookie_domain, const char *host)
     {
       int dlen = strlen (cookie_domain);
       int hlen = strlen (host);
-      /* hostname.foobar.com                   */
-      /*             bar.com                   */
-      /*            ^ <-- must be '.' for host */
+      /* cookie host:    hostname.foobar.com */
+      /* desired domain:             bar.com */
+      /* '.' must be here in host-> ^        */
       if (hlen > dlen && host[hlen - dlen - 1] != '.')
        return 0;
     }
@@ -825,7 +825,7 @@ set_cookie_header_cb (const char *hdr, void *closure)
    SIZE matches are written; if more matches are present, return the
    number of chains that would have been written.  */
 
-int
+static int
 find_matching_chains (const char *host, int port,
                      struct cookie *store[], int size)
 {