aboutsummaryrefslogtreecommitdiffhomepage
path: root/midimonster.c
diff options
context:
space:
mode:
authorJan Düpmeier <j.duepmeier@googlemail.com>2021-11-18 11:32:26 +0100
committerJan Düpmeier <j.duepmeier@googlemail.com>2021-11-18 11:32:26 +0100
commit0b2f304075645de8c44d079e7d21febde5be17a9 (patch)
tree9b63c0498d0a63369e509904ffd8980d42337a7f /midimonster.c
parenta99d4c7c135821375a6263f2a2289af9c875ab80 (diff)
downloadmidimonster-0b2f304075645de8c44d079e7d21febde5be17a9.tar.gz
midimonster-0b2f304075645de8c44d079e7d21febde5be17a9.tar.bz2
midimonster-0b2f304075645de8c44d079e7d21febde5be17a9.zip
add -h,--help to show the usage infos
Diffstat (limited to 'midimonster.c')
-rw-r--r--midimonster.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/midimonster.c b/midimonster.c
index 91e81ce..0b01517 100644
--- a/midimonster.c
+++ b/midimonster.c
@@ -40,6 +40,7 @@ static int usage(char* fn){
fprintf(stderr, "\t-v,--version - show version\n");
fprintf(stderr, "\t-b <backend> - override backend options (can be used multiple times)\n");
fprintf(stderr, "\t-i <instance> - override instance options (can be used multiple times)\n");
+ fprintf(stderr, "\t-h,--help - show this usage info\n");
fprintf(stderr, "\nInstance/Backend options format:\n");
fprintf(stderr, "<instance/backend>.<option>=<value>\n");
return EXIT_FAILURE;
@@ -74,6 +75,10 @@ static int args_parse(int argc, char** argv, char** cfg_file){
version();
return 1;
}
+ else if(!strcmp(argv[u], "-h") || !strcmp(argv[u], "--help")){
+ usage(argv[0]);
+ return 1;
+ }
else if(!strcmp(argv[u], "-i")){
if(!argv[u + 1]){
fprintf(stderr, "Missing instance override specification\n");