summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <hg@njw.me.uk>2011-07-16 16:20:56 +0100
committerNick White <hg@njw.me.uk>2011-07-16 16:20:56 +0100
commit8e575d280946f1188f578fcf02b4ba4491a4308c (patch)
treec9865352f46da2a265e95287336b780540e295e2
parenta13f5650de7401a9953487a784028676604cb3c0 (diff)
Put in progress stuff under -a
-rw-r--r--getgbook.c10
1 files 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;
}