[svn] Cosmetic changes to get_urls_html.

This commit is contained in:
hniksic 2001-12-12 11:06:10 -08:00
parent cf8772cf8a
commit b9f370004d
2 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,7 @@
2001-12-12 Hrvoje Niksic <hniksic@arsdigita.com>
* url.c (get_urls_file): Cosmetic changes.
2001-12-12 Hrvoje Niksic <hniksic@arsdigita.com>
* html-url.c (append_one_url): Resurrect warning when unable to

View File

@ -998,6 +998,7 @@ get_urls_file (const char *file)
return NULL;
}
DEBUGP (("Loaded %s (size %ld).\n", file, fm->length));
head = tail = NULL;
text = fm->content;
text_end = fm->content + fm->length;
@ -1010,12 +1011,13 @@ get_urls_file (const char *file)
else
++line_end;
text = line_end;
while (line_beg < line_end
&& ISSPACE (*line_beg))
/* Strip whitespace from the beginning and end of line. */
while (line_beg < line_end && ISSPACE (*line_beg))
++line_beg;
while (line_end > line_beg + 1
&& ISSPACE (*(line_end - 1)))
while (line_end > line_beg && ISSPACE (*(line_end - 1)))
--line_end;
if (line_end > line_beg)
{
/* URL is in the [line_beg, line_end) region. */