From d47b90be39ecbf53bbc169bb294583f4905cba9e Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 24 Jul 2013 13:37:25 +0200 Subject: [PATCH] print usage if input or output is not set --- src/oxframe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/oxframe.c b/src/oxframe.c index 00dd9e7..37ef91b 100644 --- a/src/oxframe.c +++ b/src/oxframe.c @@ -67,7 +67,7 @@ typedef struct _oxstate { static void usage(void){ fprintf(stderr, - "Usage: oxframe [options]\n\n" + "Usage: oxframe -i -o [options]\n\n" "Options: \n\n" " -h, --help show this help message and exit\n" " -x WIDTH, --width=WIDTH\n" @@ -538,7 +538,7 @@ int main (int argc, char * argv[]) { } } - if(argc < 3) { + if(argc < 3 || state.input == NULL || state.output == NULL) { usage(); }