X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fres.c;h=34676128798dfa0b22eba42b75330b284d88aa46;hp=626b2c85cdb7185f12e9ddd334d073be71ab025c;hb=462e643a7e31676eceda23e634241f7b4d2cd7bb;hpb=3073a77ed89e7d9527d110a028d134bfd1f9cb40 diff --git a/src/res.c b/src/res.c index 626b2c85..34676128 100644 --- a/src/res.c +++ b/src/res.c @@ -67,9 +67,7 @@ as that of the covered work. */ res_match_path, res_register_specs, res_get_specs, and res_retrieve_file. */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include "wget.h" #include #include @@ -77,7 +75,6 @@ as that of the covered work. */ #include #include -#include "wget.h" #include "utils.h" #include "hash.h" #include "url.h" @@ -181,7 +178,7 @@ prune_non_exact (struct robot_specs *specs) #define EOL(p) ((p) >= lineend) #define SKIP_SPACE(p) do { \ - while (!EOL (p) && ISSPACE (*p)) \ + while (!EOL (p) && c_isspace (*p)) \ ++p; \ } while (0) @@ -267,18 +264,18 @@ res_parse (const char *source, int length) lineend to a location preceding the first comment. Real line ending remains in lineend_real. */ for (lineend = p; lineend < lineend_real; lineend++) - if ((lineend == p || ISSPACE (*(lineend - 1))) + if ((lineend == p || c_isspace (*(lineend - 1))) && *lineend == '#') break; /* Ignore trailing whitespace in the same way. */ - while (lineend > p && ISSPACE (*(lineend - 1))) + while (lineend > p && c_isspace (*(lineend - 1))) --lineend; assert (!EOL (p)); field_b = p; - while (!EOL (p) && (ISALNUM (*p) || *p == '-')) + while (!EOL (p) && (c_isalnum (*p) || *p == '-')) ++p; field_e = p; @@ -416,7 +413,7 @@ free_specs (struct robot_specs *specs) advance the pointer. */ #define DECODE_MAYBE(c, ptr) do { \ - if (c == '%' && ISXDIGIT (ptr[1]) && ISXDIGIT (ptr[2])) \ + if (c == '%' && c_isxdigit (ptr[1]) && c_isxdigit (ptr[2])) \ { \ char decoded = X2DIGITS_TO_NUM (ptr[1], ptr[2]); \ if (decoded != '/') \