summaryrefslogtreecommitdiff
path: root/xkill.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-08-03 15:57:06 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-08-03 15:57:06 -0700
commit411ea0142d62900528d314bc654945c94e4f034d (patch)
treea02f38e0994ea61a52fb8de9482a382613714965 /xkill.c
parent000d4af7f036119cf19717cff105a2bd2efd01e2 (diff)
Add -version option to print version
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'xkill.c')
-rw-r--r--xkill.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xkill.c b/xkill.c
index 5a303b7..a4f5c48 100644
--- a/xkill.c
+++ b/xkill.c
@@ -35,6 +35,10 @@ from The Open Group.
* Warning, this is a very dangerous client....
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
@@ -78,6 +82,7 @@ usage(void)
" -frame don't ignore window manager frames\n"
" -button number specific button to be pressed to select window\n"
" -all kill all clients with top level windows\n"
+" -version print version and exit\n"
"\n";
fprintf (stderr, "usage: %s [-option ...]\n%s",
@@ -129,6 +134,9 @@ main(int argc, char *argv[])
case 'a': /* -all */
kill_all = True;
continue;
+ case 'v':
+ puts(PACKAGE_STRING);
+ exit(0);
default:
usage ();
}