From b2cde1725132e0f0f3cdd2019745d130235282c3 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Wed, 27 Nov 2013 18:18:38 -0800 Subject: Add -version option to print program version Signed-off-by: Alan Coopersmith --- man/xev.man | 4 ++++ xev.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/man/xev.man b/man/xev.man index f40b81d..4edec10 100644 --- a/man/xev.man +++ b/man/xev.man @@ -6,6 +6,7 @@ xev - print contents of X events [\-display \fIdisplayname\fP] [\-geometry \fIgeom\fP] [\-bw \fIpixels\fP] [\-bs \fI{NotUseful,WhenMapped,Always}\fP] [\-id \fIwindowid\fP] [\-root] [\-s] [\-name \fIstring\fP] [\-rv] +[\-version] [\-event \fIevent_mask\fP [\-event \fIevent_mask\fP ...]] .SH DESCRIPTION .PP @@ -62,6 +63,9 @@ option can be specified multiple times to select multiple types of events. When not specified, all events are selected. Available event masks: keyboard mouse expose visibility structure substructure focus property colormap owner_grab_button randr +.TP 8 +.B \-version +This option prints the program version and exits. .SH "SEE ALSO" X(__miscmansuffix__), xwininfo(__appmansuffix__), xdpyinfo(__appmansuffix__), Xlib Programmers Manual, X Protocol Specification diff --git a/xev.c b/xev.c index 9afec4a..45c283f 100644 --- a/xev.c +++ b/xev.c @@ -1086,6 +1086,9 @@ main (int argc, char **argv) usage (NULL); event_mask_specified = True; continue; + case 'v': + puts(PACKAGE_STRING); + exit(0); default: goto unrecognized; } /* end switch on - */ -- cgit v1.2.3