From: Dale Weiler Date: Mon, 17 Dec 2012 15:07:55 +0000 (+0000) Subject: Added -which/-version X-Git-Tag: 0.1.9~88 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ae960efff4270460f80c687e443a2f34fed82187;p=xonotic%2Fgmqcc.git Added -which/-version --- diff --git a/main.c b/main.c index 9e2051b..26321c1 100644 --- a/main.c +++ b/main.c @@ -235,6 +235,19 @@ static bool options_parse(int argc, char **argv) { continue; } + if (!strcmp(argv[0]+1, "which") || + !strcmp(argv[0]+1, "version")) { + con_out("GMQCC %d.%d.%d Built %s %s\n", + GMQCC_VERSION_MINOR, + GMQCC_VERSION_MAJOR, + GMQCC_VERSION_PATCH, + __DATE__, + __TIME__ + ); + exit(0); + } + + /* show defaults (like pathscale) */ if (!strcmp(argv[0]+1, "show-defaults")) { size_t itr;