mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-02-17 09:02:25 +00:00
--version
This commit is contained in:
parent
08302ff32b
commit
340de8379a
1 changed files with 15 additions and 7 deletions
22
main.c
22
main.c
|
@ -45,6 +45,16 @@ static ppitem *ppems = NULL;
|
|||
|
||||
static const char *app_name;
|
||||
|
||||
static void version() {
|
||||
con_out("GMQCC %d.%d.%d Built %s %s\n",
|
||||
GMQCC_VERSION_MINOR,
|
||||
GMQCC_VERSION_MAJOR,
|
||||
GMQCC_VERSION_PATCH,
|
||||
__DATE__,
|
||||
__TIME__
|
||||
);
|
||||
}
|
||||
|
||||
static int usage() {
|
||||
con_out("usage: %s [options] [files...]", app_name);
|
||||
con_out("options:\n"
|
||||
|
@ -289,13 +299,7 @@ static bool options_parse(int argc, char **argv) {
|
|||
/* break; never reached because of exit(0) */
|
||||
|
||||
case 'v':
|
||||
con_out("GMQCC %d.%d.%d Built %s %s\n",
|
||||
GMQCC_VERSION_MINOR,
|
||||
GMQCC_VERSION_MAJOR,
|
||||
GMQCC_VERSION_PATCH,
|
||||
__DATE__,
|
||||
__TIME__
|
||||
);
|
||||
version();
|
||||
exit(0);
|
||||
|
||||
case 'E':
|
||||
|
@ -447,6 +451,10 @@ static bool options_parse(int argc, char **argv) {
|
|||
usage();
|
||||
exit(0);
|
||||
}
|
||||
else if (!strcmp(argv[0]+2, "version")) {
|
||||
version();
|
||||
exit(0);
|
||||
}
|
||||
else {
|
||||
/* All long options with arguments */
|
||||
if (options_long_witharg("output", &argc, &argv, &argarg)) {
|
||||
|
|
Loading…
Reference in a new issue