From 80b04e80100eadcb20527a4ad9ee54f75a71111a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 16 Jan 2015 18:03:54 +0000 Subject: Add standard version flag. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5519 a436a847-0d15-0410-975c-d299462d15a1 --- src/ingen/ingen.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/ingen') diff --git a/src/ingen/ingen.cpp b/src/ingen/ingen.cpp index 6e058414..f37608b9 100644 --- a/src/ingen/ingen.cpp +++ b/src/ingen/ingen.cpp @@ -70,6 +70,18 @@ ingen_try(bool cond, const char* msg) } } +static int +print_version() +{ + cout << "ingen " << INGEN_VERSION + << " \n" + << "Copyright 2007-2015 David Robillard .\n" + << "License: \n" + << "This is free software; you are free to change and redistribute it.\n" + << "There is NO WARRANTY, to the extent permitted by law." << endl; + return EXIT_SUCCESS; +} + int main(int argc, char** argv) { @@ -85,6 +97,8 @@ main(int argc, char** argv) } else if (world->conf().option("help").get()) { world->conf().print_usage("ingen", cout); return EXIT_SUCCESS; + } else if (world->conf().option("version").get()) { + return print_version(); } } catch (std::exception& e) { cout << "ingen: " << e.what() << endl; -- cgit v1.2.1