add a -version parameter to print the program version and exit

This commit is contained in:
Fabian Greffrath 2022-03-28 14:38:42 +02:00
parent 558829dfd9
commit 2215de96a3

View File

@ -82,6 +82,12 @@ int main(int argc, char **argv)
myargc = argc;
myargv = argv;
// print the program version and exit
if (M_ParmExists("-version") || M_ParmExists("--version"))
{
puts(PROJECT_STRING);
exit(0);
}
/*
killough 1/98: