X-Git-Url: http://sjero.net/git/?a=blobdiff_plain;f=src%2Fres.c;h=8c35f0e1cfae726a877e23e12b4ac44256d940ff;hb=123f5c39669abc055987d69a311785c861494c87;hp=56041229987ecdac88f99f0a5bbe95d972788ead;hpb=c2c71c32cf7e75336bb45fc299658910e0f9f8af;p=wget
diff --git a/src/res.c b/src/res.c
index 56041229..8c35f0e1 100644
--- a/src/res.c
+++ b/src/res.c
@@ -1,5 +1,5 @@
/* Support for Robot Exclusion Standard (RES).
- Copyright (C) 2001, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2006, 2007, 2008 Free Software Foundation, Inc.
This file is part of Wget.
@@ -16,15 +16,16 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with Wget. If not, see .
-In addition, as a special exception, the Free Software Foundation
-gives permission to link the code of its release of Wget with the
-OpenSSL project's "OpenSSL" library (or with modified versions of it
-that use the same license as the "OpenSSL" library), and distribute
-the linked executables. You must obey the GNU General Public License
-in all respects for all of the code used other than "OpenSSL". If you
-modify this file, you may extend this exception to your version of the
-file, but you are not obligated to do so. If you do not wish to do
-so, delete this exception statement from your version. */
+Additional permission under GNU GPL version 3 section 7
+
+If you modify this program, or any covered work, by linking or
+combining it with the OpenSSL project's OpenSSL library (or a
+modified version of that library), containing parts covered by the
+terms of the OpenSSL or SSLeay licenses, the Free Software Foundation
+grants you additional permission to convey the resulting work.
+Corresponding Source for a non-source form of such a combination
+shall include the source code for the parts of OpenSSL used as well
+as that of the covered work. */
/* This file implements the Robot Exclusion Standard (RES).
@@ -66,9 +67,7 @@ so, delete this exception statement from your version. */
res_match_path, res_register_specs, res_get_specs, and
res_retrieve_file. */
-#ifdef HAVE_CONFIG_H
-# include
-#endif
+#include "wget.h"
#include
#include
@@ -76,7 +75,6 @@ so, delete this exception statement from your version. */
#include
#include
-#include "wget.h"
#include "utils.h"
#include "hash.h"
#include "url.h"
@@ -180,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)
@@ -266,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;
@@ -415,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 != '/') \
@@ -465,9 +463,9 @@ res_match_path (const struct robot_specs *specs, const char *path)
if (matches (specs->paths[i].path, path))
{
bool allowedp = specs->paths[i].allowedp;
- DEBUGP (("%s path %s because of rule `%s'.\n",
+ DEBUGP (("%s path %s because of rule %s.\n",
allowedp ? "Allowing" : "Rejecting",
- path, specs->paths[i].path));
+ path, quote (specs->paths[i].path)));
return allowedp;
}
return true;