commit a58b617d3d3effa74ff00da4ed032d1fc92758b8
parent b4d2e996413139a66e94aa25b1713510abbf6de1
Author: Willy Goiffon <w.goiffon@gmail.com>
Date: Mon, 21 Oct 2013 23:20:54 +0200
Added option -h to get help
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/prout.c b/src/prout.c
@@ -22,7 +22,7 @@
/* Usage function */
static void usage()
{
- fputs("usage: prout [-o opt=value,...] <file>\n", stdout);
+ fputs("usage: prout [-h] <file>\n", stdout);
}
/* Return the file name if the file is opennable. exit instead */
@@ -154,7 +154,7 @@ int main(int argc, char **argv)
char *file;
/* check the input file */
- if (argc < 2 ) {
+ if (argc < 2 || !strcmp(argv[1], "-h")) {
usage();
exit (1);
}