]> sjero.net Git - wget/blobdiff - src/netrc.c
Dependency improvements (but still needs some work).
[wget] / src / netrc.c
index c70a8a348ae35d87b6015a462273f2c70e763bb5..fea440d33eb60f7b1ac2a729d5136f3f9a72fbee 100644 (file)
@@ -1,5 +1,5 @@
 /* Read and parse the .netrc file to get hosts, accounts, and passwords.
-   Copyright (C) 1996, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1996, 2007, 2008 Free Software Foundation, Inc.
 
 This file is part of GNU Wget.
 
@@ -30,16 +30,13 @@ as that of the covered work.  */
 /* This file used to be kept in synch with the code in Fetchmail, but
    the latter has diverged since.  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include "wget.h"
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
 
-#include "wget.h"
 #include "utils.h"
 #include "netrc.h"
 #include "init.h"
@@ -284,7 +281,7 @@ parse_netrc (const char *path)
       quote = 0;
 
       /* Skip leading whitespace.  */
-      while (*p && ISSPACE (*p))
+      while (*p && c_isspace (*p))
         p ++;
 
       /* If the line is empty, then end any macro definition.  */
@@ -296,7 +293,7 @@ parse_netrc (const char *path)
       while (*p && last_token != tok_macdef)
         {
           /* Skip any whitespace.  */
-          while (*p && ISSPACE (*p))
+          while (*p && c_isspace (*p))
             p ++;
 
           /* Discard end-of-line comments; also, stop processing if
@@ -314,7 +311,7 @@ parse_netrc (const char *path)
           tok = p;
 
           /* Find the end of the token, handling quotes and escapes.  */
-          while (*p && (quote ? *p != '"' : !ISSPACE (*p))){
+          while (*p && (quote ? *p != '"' : !c_isspace (*p))){
             if (*p == '\\')
               shift_left (p);
             p ++;