]> sjero.net Git - wget/blobdiff - src/netrc.c
[svn] Allow Wget to be compiled with a K&R compiler.
[wget] / src / netrc.c
index 4b3d2b40a83050302feb50bff98d396181e5a64d..9535472c469dabdafe373ad946e27c615fa11b20 100644 (file)
@@ -235,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)
@@ -280,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.  */