aboutsummaryrefslogtreecommitdiff
path: root/apps/xwininfo/xwininfo.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-06-08 15:05:49 +0200
committermarha <marha@users.sourceforge.net>2014-06-08 15:05:49 +0200
commit71cc8d9b7dc729934a29445cbd6d1f7a6d9ecbec (patch)
treeea689cdd51f395980ddc37dc33781635976f3a16 /apps/xwininfo/xwininfo.c
parentaec798fb4dc72d616732d0fa711faffaa8cd7590 (diff)
parent2acb86c9b086bdb9a3897db0b93820652e07cb59 (diff)
downloadvcxsrv-71cc8d9b7dc729934a29445cbd6d1f7a6d9ecbec.tar.gz
vcxsrv-71cc8d9b7dc729934a29445cbd6d1f7a6d9ecbec.tar.bz2
vcxsrv-71cc8d9b7dc729934a29445cbd6d1f7a6d9ecbec.zip
Merge remote-tracking branch 'origin/released'
Conflicts: apps/xwininfo/xwininfo.c xorg-server/hw/xwin/glx/indirect.c
Diffstat (limited to 'apps/xwininfo/xwininfo.c')
-rwxr-xr-x[-rw-r--r--]apps/xwininfo/xwininfo.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/xwininfo/xwininfo.c b/apps/xwininfo/xwininfo.c
index 59e09aff8..cda2e2f9d 100644..100755
--- a/apps/xwininfo/xwininfo.c
+++ b/apps/xwininfo/xwininfo.c
@@ -281,7 +281,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)
{
@@ -289,6 +289,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"
@@ -546,7 +547,12 @@ main (int argc, char **argv)
if (!strcmp(argv[i], "-pause")) {
pauseatend = 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 ();
}