summaryrefslogtreecommitdiff
path: root/xkbprint.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2014-05-31 20:16:42 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2014-05-31 20:16:42 -0700
commit545db04829433b7d30de75ea03dc4495a91a8ab6 (patch)
tree5075dd08e897acffa2d89673b7b3de8cfd9e97d4 /xkbprint.c
parent8e86b50311c3b926d2bb1e00fb5343f3e76d55b3 (diff)
Add -version option to print program version
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'xkbprint.c')
-rw-r--r--xkbprint.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/xkbprint.c b/xkbprint.c
index b800381..c7f4310 100644
--- a/xkbprint.c
+++ b/xkbprint.c
@@ -119,6 +119,7 @@ Usage(int argc, char *argv[])
" keysym names where available, <what> can\n"
" be \"all\", \"none\" or \"common\" (default)\n"
"-synch Force synchronization\n"
+ "-version Print program version\n"
"-w <lvl> Set warning level (0=none, 10=all)\n"
);
}
@@ -387,6 +388,10 @@ parseArgs(int argc, char *argv[])
(strcmp(argv[i], "-s") == 0)) {
synch = True;
}
+ else if (strcmp(argv[i], "-version") == 0) {
+ puts(PACKAGE_STRING);
+ exit(0);
+ }
else if (strcmp(argv[i], "-w") == 0) {
if ((i >= (argc - 1)) || (!isdigit(argv[i + 1][0]))) {
warningLevel = 0;