]> sjero.net Git - wget/blobdiff - src/netrc.c
[svn] Allow Wget to be compiled with a K&R compiler.
[wget] / src / netrc.c
index 28e9ec42d811f3f1d78fabcecf089775eb9fefeb..9535472c469dabdafe373ad946e27c615fa11b20 100644 (file)
@@ -90,8 +90,6 @@ search_netrc (const char *host, const char **acc, const char **passwd,
   /* Acc and password found; all OK.  */
   if (*acc && *passwd)
     return;
-  if (!*acc && !slack_default)
-    return;
   /* Some data not given -- try finding the host.  */
   for (l = netrc_list; l; l = l->next)
     {
@@ -237,7 +235,8 @@ maybe_add_to_list (acc_t **newentry, acc_t **list)
    null-terminated string once character to the left.
    Used in processing \ and " constructs in the netrc file */
 static void
-shift_left(char *string){
+shift_left(char *string)
+{
   char *p;
   
   for (p=string; *p; ++p)
@@ -282,6 +281,10 @@ parse_netrc (const char *path)
       p = line;
       quote = 0;
 
+      /* Skip leading whitespace.  */
+      while (*p && ISSPACE (*p))
+       p ++;
+
       /* If the line is empty, then end any macro definition.  */
       if (last_token == tok_macdef && !*p)
        /* End of macro if the line is empty.  */