aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarry Jeffery <harry@exec64.co.uk>2017-11-30 22:04:21 +0000
committerHarry Jeffery <harry@exec64.co.uk>2017-11-30 21:16:15 +0000
commite8ec492616157a4067e43da19dd8a90e67566730 (patch)
treed952df98a6a066aa0527d8febf69da3308f17648
parent11919464cfa10ba02113ef0ffcdf0a255ab5b914 (diff)
downloadimv-e8ec492616157a4067e43da19dd8a90e67566730.tar.gz
Add error messages for invalid command line flags
-rw-r--r--src/imv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/imv.c b/src/imv.c
index 7b0f34d..1365fa9 100644
--- a/src/imv.c
+++ b/src/imv.c
@@ -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;