diff options
Diffstat (limited to 'apps/xwininfo/xwininfo.c')
-rw-r--r-- | apps/xwininfo/xwininfo.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/xwininfo/xwininfo.c b/apps/xwininfo/xwininfo.c index 39ae6ea27..520719bdd 100644 --- a/apps/xwininfo/xwininfo.c +++ b/apps/xwininfo/xwininfo.c @@ -278,7 +278,7 @@ static size_t strlcat (char *dst, const char *src, size_t dstsize) /* * Report the syntax for calling xwininfo: */ -_X_NORETURN +_X_NORETURN _X_COLD static void usage (void) { @@ -286,6 +286,7 @@ usage (void) "usage: %s [-options ...]\n\n" "where options include:\n" " -help print this message\n" + " -version print version message\n" " -display host:dpy X server to contact\n" " -root use the root window\n" " -id windowid use the window with the specified id\n" @@ -537,6 +538,12 @@ main (int argc, char **argv) tree = stats = bits = events = wm = size = shape = 1; continue; } + if (!strcmp(argv[i], "-version")) { + puts(PACKAGE_STRING); + exit(0); + } + fprintf (stderr, "%s: unrecognized argument %s\n\n", + program_name, argv[i]); usage (); } |