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>
This commit is contained in:
parent
da52ff56b2
commit
9e130c902c
7
main.c
7
main.c
@ -9,6 +9,8 @@
|
||||
|
||||
#include "dive.h"
|
||||
#include "divelist.h"
|
||||
#include "libdivecomputer.h"
|
||||
#include "version.h"
|
||||
|
||||
struct preferences prefs;
|
||||
struct preferences default_prefs = {
|
||||
@ -98,6 +100,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 */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user