GNU Wget is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
+the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
GNU Wget is distributed in the hope that it will be useful,
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with Wget; if not, write to the Free Software Foundation, Inc.,
-51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+along with Wget. If not, see <http://www.gnu.org/licenses/>.
In addition, as a special exception, the Free Software Foundation
gives permission to link the code of its release of Wget with the
};
static bool
-in_url_list_p (const struct url_list *list, const char *url, bool verbose)
+in_url_list_p (const struct url_list *list, const char *url)
{
const struct url_list *ptr;
for (ptr = list; ptr; ptr = ptr->next)
{
/* str[case]cmp is inadequate for URL comparison */
- if (are_urls_equal (url, ptr->url))
+ if (ptr->url != NULL && are_urls_equal (url, ptr->url))
return true;
}
list->url = referrer ? xstrdup (referrer) : NULL;
hash_table_put (visited_urls_hash, xstrdup (url), list);
}
- else if (referrer && !in_url_list_p (list, referrer, false))
+ else if (referrer && !in_url_list_p (list, referrer))
{
/* Append referrer at the end of the list */
struct url_list *newnode;
num_elems = hash_table_count (nonexisting_urls_set);
assert (num_elems > 0);
-
- if (num_elems > 1)
- {
- logprintf (LOG_NOTQUIET, _("Found %d broken links.\n\n"),
- num_elems);
- }
- else
- {
- logprintf (LOG_NOTQUIET, _("Found 1 broken link.\n\n"));
- }
+
+ logprintf (LOG_NOTQUIET, ngettext("Found %d broken link.\n\n",
+ "Found %d broken links.\n\n", num_elems),
+ num_elems);
for (hash_table_iterate (nonexisting_urls_set, &iter);
hash_table_iter_next (&iter); )