summaryrefslogtreecommitdiff
path: root/getgbook.c
diff options
context:
space:
mode:
authorNick White <git@njw.me.uk>2011-08-21 17:58:28 +0100
committerNick White <git@njw.me.uk>2011-08-21 17:58:28 +0100
commitfc43d1cacbb62fd854960901688e1b9b9752e7cd (patch)
treee5015074d0d2165cb24d11436e3b58b09154cd43 /getgbook.c
parent043da4609ae6f9e229f0f03d602f57908f66879a (diff)
Fix usage printing
Diffstat (limited to 'getgbook.c')
-rw-r--r--getgbook.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/getgbook.c b/getgbook.c
index 3fbdf47..8073194 100644
--- a/getgbook.c
+++ b/getgbook.c
@@ -107,7 +107,9 @@ int main(int argc, char *argv[])
int a, i, j, totalpages;
FILE *f;
- if(argc < 2 || argc > 3 || (argc == 3 && argv[1][0]!='-')) {
+ if(argc < 2 || argc > 3 || (argc == 3 && (argv[1][0]!='-'
+ || (argv[1][1] != 'c' && argv[1][1] != 'n')))
+ || (argc >= 2 && argv[1][0] == '-' && argv[1][1] == 'h')) {
fputs(usage, stdout);
return 1;
}