diff options
author | Nick White <hg@njw.me.uk> | 2011-07-16 16:20:56 +0100 |
---|---|---|
committer | Nick White <hg@njw.me.uk> | 2011-07-16 16:20:56 +0100 |
commit | 8e575d280946f1188f578fcf02b4ba4491a4308c (patch) | |
tree | c9865352f46da2a265e95287336b780540e295e2 | |
parent | a13f5650de7401a9953487a784028676604cb3c0 (diff) |
Put in progress stuff under -a
-rw-r--r-- | getgbook.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -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; } |