diff options
author | Harry Jeffery <harry@exec64.co.uk> | 2017-11-30 22:04:21 +0000 |
---|---|---|
committer | Harry Jeffery <harry@exec64.co.uk> | 2017-11-30 21:16:15 +0000 |
commit | e8ec492616157a4067e43da19dd8a90e67566730 (patch) | |
tree | d952df98a6a066aa0527d8febf69da3308f17648 | |
parent | 11919464cfa10ba02113ef0ffcdf0a255ab5b914 (diff) | |
download | imv-e8ec492616157a4067e43da19dd8a90e67566730.tar.gz |
Add error messages for invalid command line flags
-rw-r--r-- | src/imv.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -408,21 +408,25 @@ bool imv_parse_args(struct imv *imv, int argc, char **argv) return true; case 's': if(!parse_scaling_mode(imv, optarg)) { + fprintf(stderr, "Invalid scaling mode. Aborting.\n"); return false; } break; case 'u': if(!parse_upscaling_method(imv, optarg)) { + fprintf(stderr, "Invalid upscaling method. Aborting.\n"); return false; } break; case 'b': if(!parse_bg(imv, optarg)) { + fprintf(stderr, "Invalid background. Aborting.\n"); return false; } break; case 't': if(!parse_slideshow_duration(imv, optarg)) { + fprintf(stderr, "Invalid slideshow duration. Aborting.\n"); return false; } break; |