From 03e5e4fe4d9eb84423e8ad8c73b18a8cf7b82535 Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 2 Mar 2000 13:28:59 -0800 Subject: [PATCH] [svn] recur.c (parse_robots): Applied Edward J. Sabol's patch for Guan Yang's reported problem with "User-agent:*" lines. --- src/recur.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/recur.c b/src/recur.c index 8de38061..078f7d85 100644 --- a/src/recur.c +++ b/src/recur.c @@ -709,13 +709,13 @@ parse_robots (const char *robots_filename) *str++ = '\0'; /* Look for the string beginning... */ for (; *str && ISSPACE (*str); str++); - /* Look for comments and kill them off. */ + /* Look for comments or trailing spaces and kill them off. */ for (p = str; *p; p++) - if (*p && ISSPACE (*p) && *(p + 1) == '#') + if (*p && ISSPACE (*p) && ((*(p + 1) == '#') || (*(p + 1) == '\0'))) { - /* We have found a shell-style comment `+ #'. Now - rewind to the beginning of the spaces and place '\0' - there. */ + /* We have found either a shell-style comment `+#' or some + trailing spaces. Now rewind to the beginning of the spaces + and place '\0' there. */ while (p > str && ISSPACE (*p)) --p; if (p == str) -- 2.39.2