diff options
author | Henrik Brautaset Aronsen <subsurface@henrik.synth.no> | 2013-05-27 12:15:34 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-06-21 08:29:12 -0700 |
commit | 58697c0289deffb58e702e4a3f8483073400bde0 (patch) | |
tree | 7687377624612f293b957e379069a1c72c9a6d4c | |
parent | 2e2cb178d78bd584666528f7acc63608461a1504 (diff) | |
download | subsurface-58697c0289deffb58e702e4a3f8483073400bde0.tar.gz |
Add --version to command line options
Displays Subsurface and libdivecomputer versions.
Suggested-by: Jef Driesen <jefdriesen@telenet.be>
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | main.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -9,6 +9,8 @@ #include "dive.h" #include "divelist.h" +#include "libdivecomputer.h" +#include "version.h" #include <osm-gps-map.h> #ifdef DEBUGFILE @@ -226,6 +228,11 @@ static void parse_argument(const char *arg) imported = TRUE; return; } + if (strcmp(arg, "--version") == 0) { + printf("Subsurface v%s, ", VERSION_STRING); + printf("built with libdivecomputer v%s\n", dc_version(NULL)); + exit(0); + } /* fallthrough */ case 'p': /* ignore process serial number argument when run as native macosx app */ |