From bf9f8695786a65e5dcf9d2dc02bc60369063b80a Mon Sep 17 00:00:00 2001 From: "\"John Hawthorn ext:(%22)" Date: Wed, 31 Dec 2008 17:17:15 -0800 Subject: added version and updated usage --- src/main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 2437ac0..57d8723 100644 --- a/src/main.c +++ b/src/main.c @@ -37,8 +37,9 @@ struct imageformat *formats[] = { void usage(){ printf("USAGE: meh [FILE1 [FILE2 [...]]]\n"); - printf(" meh -list : treat stdin as list of files\n"); - printf(" meh -ctl : display files as they are received on stdin\n"); + printf(" meh -list [LISTFILE] : Treat file as list of images. Defaults to stdin.\n"); + printf(" meh -ctl : Display files as they are received on stdin\n"); + printf(" meh -v : Print version and exit.\n"); exit(EXIT_FAILURE); } @@ -316,6 +317,9 @@ int main(int argc, char *argv[]){ }else{ usage(); } + }else if(!strcmp(argv[1], "-v")){ + printf("meh version 0.1\n"); + return 0; }else{ mode = MODE_NORM; images = &argv[1]; -- cgit v1.2.3