diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-05-25 13:59:30 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-05-25 14:10:25 -0700 |
commit | d7027d4644cb5333ae041bebb0724ddb62fd7686 (patch) | |
tree | 422ac6576760970571dbb0a3d213adeb3057d2be | |
parent | 8d4c472d81e2ee735ed2b642cd7290fb5830ee60 (diff) |
Add -version option to print program version
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | man/xkbevd.man | 3 | ||||
-rw-r--r-- | xkbevd.c | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/man/xkbevd.man b/man/xkbevd.man index a114d42..a8cd93d 100644 --- a/man/xkbevd.man +++ b/man/xkbevd.man @@ -85,6 +85,9 @@ Forces synchronization of all X requests. Slow. .B \-v Print more information, including debugging messages. Multiple specifications of \fI-v\fP cause more output, to a point. +.TP 8 +.B \-version +Prints the program version and exits. .SH "SEE ALSO" X(__miscmansuffix__) .SH COPYRIGHT @@ -89,6 +89,7 @@ Usage(int argc, char *argv[]) "-bg Run in background\n" "-synch Force synchronization\n" "-v Print verbose messages\n" + "-version Print program version\n" ); return; } @@ -194,6 +195,10 @@ parseArgs(int argc, char *argv[]) else if (strcmp(argv[i], "-v") == 0) { verbose++; } + else if (strcmp(argv[i], "-version") == 0) { + puts(PACKAGE_STRING); + exit(0); + } else if ((strcmp(argv[i], "-?") == 0) || (strcmp(argv[i], "-help") == 0)) { Usage(argc, argv); |