Alexey Aphanasyev <[EMAIL PROTECTED]> writes:

> I'm using wget compiled from the latest CVS sources (GNU Wget
> 1.8.1+cvs). I use it to mirror several ftp sites. I keep ftp
> accounts in .netrc file which looks like this:
[...]

Ah, I see.  The macro definition (`macdef init') would fail to be
terminated at empty lines.

Thanks for the report.  This patch should fix the problems; please let
me know if it works for you.


2002-01-17  Hrvoje Niksic  <[EMAIL PROTECTED]>

        * netrc.c (parse_netrc): Skip leading whitespace before testing
        whether the line is empty.  Empty lines still contain the line
        terminator.

Index: src/netrc.c
===================================================================
RCS file: /pack/anoncvs/wget/src/netrc.c,v
retrieving revision 1.10
diff -u -r1.10 netrc.c
--- src/netrc.c 2001/11/30 09:33:22     1.10
+++ src/netrc.c 2002/01/17 00:56:12
@@ -280,6 +280,10 @@
       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.  */

Reply via email to