diff options
author | Nick White <git@njw.me.uk> | 2011-08-21 17:58:28 +0100 |
---|---|---|
committer | Nick White <git@njw.me.uk> | 2011-08-21 17:58:28 +0100 |
commit | fc43d1cacbb62fd854960901688e1b9b9752e7cd (patch) | |
tree | e5015074d0d2165cb24d11436e3b58b09154cd43 /getgbook.c | |
parent | 043da4609ae6f9e229f0f03d602f57908f66879a (diff) |
Fix usage printing
Diffstat (limited to 'getgbook.c')
-rw-r--r-- | getgbook.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; } |