[project @ 2003-10-08 20:50:18 by bursa]

Exit on EOF.

svn path=/import/netsurf/; revision=355
This commit is contained in:
James Bursa 2003-10-08 20:50:18 +00:00
parent b510716c1d
commit 4b45cf75a9
1 changed files with 5 additions and 1 deletions

View File

@ -41,7 +41,10 @@ int main(int argc, char *argv[])
while (1) {
puts("=== URL:");
gets(url);
if (!fgets(url, 1000, stdin))
return 0;
url[strlen(url) - 1] = 0;
destroyed = 0;
c = fetchcache(url, 0, callback, 0, 0, 100, 1000, false);
if (c) {
done = c->status == CONTENT_STATUS_DONE;
@ -49,6 +52,7 @@ int main(int argc, char *argv[])
fetch_poll();
puts("=== SUCCESS, dumping cache");
} else {
destroyed = 1;
puts("=== FAILURE, dumping cache");
}
cache_dump();