/* Support for Robot Exclusion Standard (RES).
- Copyright (C) 2001, 2006, 2007, 2008, 2009 Free Software Foundation,
- Inc.
+ Copyright (C) 2001, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+ Foundation, Inc.
This file is part of Wget.
SKIP_SPACE (p);
if (field_b == field_e || EOL (p) || *p != ':')
{
- DEBUGP (("Ignoring malformed line %d", line_count));
+ DEBUGP (("Ignoring malformed line %d\n", line_count));
goto next;
}
++p; /* skip ':' */
}
else
{
- DEBUGP (("Ignoring unknown field at line %d", line_count));
+ DEBUGP (("Ignoring unknown field at line %d\n", line_count));
goto next;
}
res_parse_from_file (const char *filename)
{
struct robot_specs *specs;
- struct file_memory *fm = read_file (filename);
+ struct file_memory *fm = wget_read_file (filename);
if (!fm)
{
logprintf (LOG_NOTQUIET, _("Cannot open %s: %s"),
return NULL;
}
specs = res_parse (fm->content, fm->length);
- read_file_free (fm);
+ wget_read_file_free (fm);
return specs;
}
bool ret = are_urls_equal (url, robots_url);
xfree (robots_url);
-
+
return ret;
}
\f
{ "http://www.yoyodyne.com/somepath/", false },
{ "http://www.yoyodyne.com/somepath/robots.txt", false },
};
-
- for (i = 0; i < sizeof(test_array)/sizeof(test_array[0]); ++i)
+
+ for (i = 0; i < sizeof(test_array)/sizeof(test_array[0]); ++i)
{
- mu_assert ("test_is_robots_txt_url: wrong result",
+ mu_assert ("test_is_robots_txt_url: wrong result",
is_robots_txt_url (test_array[i].url) == test_array[i].expected_result);
}