From 8e575d280946f1188f578fcf02b4ba4491a4308c Mon Sep 17 00:00:00 2001 From: Nick White Date: Sat, 16 Jul 2011 16:20:56 +0100 Subject: Put in progress stuff under -a --- getgbook.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/getgbook.c b/getgbook.c index 468a0f2..de600d8 100644 --- a/getgbook.c +++ b/getgbook.c @@ -115,10 +115,6 @@ int main(int argc, char *argv[]) if((bookid = getbookid(argv[2])) == NULL) die("Could not find book\n"); - printf("bookid is %s\n", bookid); - } else { - if((bookid = getbookid(argv[1])) == NULL) - die("Could not find book\n"); if(!(totalpages = gettotalpages(bookid))) die("Book has no pages\n"); @@ -132,9 +128,11 @@ int main(int argc, char *argv[]) gettofile(url, pg); printf("Downloaded page %s\n", pg); } + free(bookid); + free(url); + } else { + fputs("Patience... (try -a in the meantime)\n", stderr); } - free(bookid); - free(url); return EXIT_SUCCESS; } -- cgit v1.2.3