diff options
author | 7415963987456321 <tetenhop@gmail.com> | 2019-05-10 00:21:17 +0000 |
---|---|---|
committer | 7415963987456321 <tetenhop@gmail.com> | 2019-05-10 00:21:17 +0000 |
commit | 9fc019cd41612d3c991ee580c44d6b219fdfcdb6 (patch) | |
tree | 0667d46d7b90f7d0b9b51cfd8105ca11c03e1302 /src | |
parent | e278e289896c7effb283c6b29c52b918d70251b7 (diff) | |
download | imv-9fc019cd41612d3c991ee580c44d6b219fdfcdb6.tar.gz |
Add version flag with -v
Diffstat (limited to 'src')
-rw-r--r-- | src/imv.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -644,7 +644,7 @@ bool imv_parse_args(struct imv *imv, int argc, char **argv) int o; - while((o = getopt(argc, argv, "frdwWxhlu:s:n:b:t:")) != -1) { + while((o = getopt(argc, argv, "frdwWxhvlu:s:n:b:t:")) != -1) { switch(o) { case 'f': imv->fullscreen = true; break; case 'r': imv->recursive_load = true; break; @@ -658,6 +658,10 @@ bool imv_parse_args(struct imv *imv, int argc, char **argv) print_help(imv); imv->quit = true; return true; + case 'v': + printf("Version: %s\n", IMV_VERSION); + imv->quit = true; + return false; case 's': if(!parse_scaling_mode(imv, optarg)) { fprintf(stderr, "Invalid scaling mode. Aborting.\n"); |