/* Read and parse the .netrc file to get hosts, accounts, and passwords.
Copyright (C) 1996, Free Software Foundation, Inc.
-This file is part of Wget.
+This file is part of GNU Wget.
-This program is free software; you can redistribute it and/or modify
+GNU Wget is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
-This program is distributed in the hope that it will be useful,
+GNU Wget is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
+along with Wget; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* This file used to be kept in synch with the code in Fetchmail, but
/* 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)
{
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)
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. */