Add a -version parameter like most programs have

Supports both -version and --version, even though the later breaks
the normal convention of Doom parameters, it is common enough with
any general program that it should be useful to include in this.
This commit is contained in:
Mike Swanson 2018-11-03 06:43:14 -07:00
parent 54500659f9
commit b00a10ae33

View file

@ -41,6 +41,17 @@ int main(int argc, char **argv)
myargc = argc;
myargv = argv;
//!
// @arg
//
// Print the program version and exit.
//
if (M_ParmExists("-version") || M_ParmExists("--version")) {
puts (PACKAGE_NAME " " PACKAGE_VERSION);
exit (0);
}
M_FindResponseFile();
#ifdef SDL_HINT_NO_SIGNAL_HANDLERS