diff options
-rw-r--r-- | man/x11perf.man | 3 | ||||
-rw-r--r-- | x11perf.c | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/man/x11perf.man b/man/x11perf.man index 843215f..dccc476 100644 --- a/man/x11perf.man +++ b/man/x11perf.man @@ -248,6 +248,9 @@ Perform only x11perf Version 1.6 tests using Version 1.6 semantics. .B \-v1.7 Perform only x11perf Version 1.7 tests using Version 1.7 semantics. .TP 14 +.B \-version +Print program version and exit. +.TP 14 .B \-su Set the save_under window attribute to True on all windows created by x11perf. Default is False. @@ -358,7 +358,7 @@ Get_Display_Name(int *pargc, /* MODIFIED */ /* * GetVersion (argc, argv) Look for -v followed by a version number. * If found remove it from command line. Don't go past a lone -. - * Leave -v followed by non-numbers as it could be -vclass. + * Leave -v followed by non-numbers as it could be -vclass or -version. */ static Version @@ -500,6 +500,7 @@ usage(void) " -v1.5 perform only v1.5 tests using old semantics\n" " -v1.6 perform only v1.6 tests using old semantics\n" " -v1.7 perform only v1.7 tests using old semantics\n" +" -version print version and exit\n" " -su request save unders on windows\n" " -bs <backing_store_hint> WhenMapped or Always (default = NotUseful)\n" ; @@ -1069,6 +1070,10 @@ main(int argc, char *argv[]) } else if (strcmp(argv[i], "Always") == 0) { xparms.backing_store = Always; } else usage (); + } else if ((strcmp(argv[i], "-version") == 0) || + (strcmp(argv[i], "--version") == 0)) { + puts(PACKAGE_STRING); + exit(EXIT_SUCCESS); } else { int len,found; ForEachTest (j) { |