summaryrefslogtreecommitdiff
path: root/xmodmap.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2014-05-31 23:49:27 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2014-05-31 23:49:27 -0700
commit82f549d1c8780538fb115ee2768d2f4024d302b2 (patch)
treeac12a3bd49f94d86e59e815112b5323abf263f6c /xmodmap.c
parent156921246c26f5e12790d52b8b9f395a56f61c87 (diff)
Add -version option to print program version
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'xmodmap.c')
-rw-r--r--xmodmap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/xmodmap.c b/xmodmap.c
index 2a10976..ffa6cea 100644
--- a/xmodmap.c
+++ b/xmodmap.c
@@ -116,6 +116,7 @@ static const char help_message[] =
" -pp print pointer map\n"
" -help print this usage message\n"
" -grammar print out short help on allowable input\n"
+" -version print program version\n"
" - read standard input\n"
"\n";
@@ -195,6 +196,11 @@ main(int argc, char *argv[])
case 'h': /* -help */
case '?':
usage(0);
+ case 'v':
+ if (strcmp(arg, "-version") == 0) {
+ puts(PACKAGE_STRING);
+ exit(0);
+ }
}
}
}