summaryrefslogtreecommitdiff
path: root/xsetroot.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-01-13 11:06:39 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-01-13 11:08:46 -0800
commitd8cb397df5ecb94e7b0ea05d2407f4334a36eb87 (patch)
tree5f6b8c0a8ce198bee718fb5b1d8f3d736072079f /xsetroot.c
parent1636536e4d158e994f045133267ae9b4b278c4f3 (diff)
Add -version option
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'xsetroot.c')
-rw-r--r--xsetroot.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/xsetroot.c b/xsetroot.c
index 40f0267..3bf27d8 100644
--- a/xsetroot.c
+++ b/xsetroot.c
@@ -32,6 +32,10 @@ in this Software without prior written authorization from The Open Group.
* 11-Jun-87
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
@@ -75,7 +79,6 @@ usage(void)
" -fg <color> or -foreground <color>\n"
" -bg <color> or -background <color>\n"
" -rv or -reverse\n"
- " -help\n"
" -def or -default\n"
" -name <string>\n"
" -cursor <cursor file> <mask file>\n"
@@ -85,6 +88,8 @@ usage(void)
" -gray or -grey\n"
" -bitmap <filename>\n"
" -mod <x> <y>\n"
+ " -help\n"
+ " -version\n"
);
exit(1);
/*NOTREACHED*/
@@ -125,6 +130,10 @@ main(int argc, char *argv[])
if (!strcmp("-help", argv[i])) {
usage();
}
+ if (!strcmp("-version", argv[i])) {
+ printf("%s\n", PACKAGE_STRING);
+ exit(0);
+ }
if (!strcmp("-def", argv[i]) || !strcmp("-default", argv[i])) {
restore_defaults = 1;
continue;