summaryrefslogtreecommitdiff
path: root/xlsatoms.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlsatoms.c')
-rw-r--r--xlsatoms.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/xlsatoms.c b/xlsatoms.c
index 717b42b..d3e0883 100644
--- a/xlsatoms.c
+++ b/xlsatoms.c
@@ -27,6 +27,10 @@ in this Software without prior written authorization from The Open Group.
* Author: Peter Harris, Open Text Corporation
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -57,7 +61,9 @@ usage(const char *errmsg)
" -display dpy X server to which to connect\n"
" -format string printf-style format to use\n"
" -range [num]-[num] atom values to list\n"
- " -name string name of single atom to print\n");
+ " -name string name of single atom to print\n"
+ " -version print program version\n"
+ );
exit (1);
}
@@ -100,6 +106,12 @@ main(int argc, char *argv[])
didit = 1;
}
continue;
+ case 'v':
+ if (strcmp(arg, "-version") == 0) {
+ puts(PACKAGE_STRING);
+ exit(0);
+ }
+ /* else FALLTHROUGH to unrecognized arg case below */
}
}
fprintf (stderr, "%s: unrecognized argument %s\n\n",