[Pkg-wmaker-commits] [wmcliphist] 19/49: wmcliphist: Add -v command line option to print version.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Tue Aug 18 01:51:35 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository wmcliphist.

commit a3ba416cf0ac7755a7e03d736dcf7225aeeed98a
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date:   Sat Nov 22 20:48:51 2014 -0600

    wmcliphist: Add -v command line option to print version.
---
 wmcliphist.1 | 4 +++-
 wmcliphist.c | 6 ++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/wmcliphist.1 b/wmcliphist.1
index 7605037..af68043 100644
--- a/wmcliphist.1
+++ b/wmcliphist.1
@@ -3,7 +3,7 @@
 wmcliphist \(em provides a history to X11 selections
 .SH "SYNOPSIS"
 .PP
-\fBwmcliphist\fR [\fB-h\fP]  [\fB-n \fInum\fR\fP]  [\fB-c \fIcol\fR\fP]  [\fB-i \fInum\fR\fP]  [\fB-s \fIsize\fR\fP]
+\fBwmcliphist\fR [\fB-h\fP] [\fB-v\fP] [\fB-n \fInum\fR\fP]  [\fB-c \fIcol\fR\fP]  [\fB-i \fInum\fR\fP]  [\fB-s \fIsize\fR\fP]
 .SH "DESCRIPTION"
 .PP
 This manual page documents briefly the program
@@ -24,6 +24,8 @@ your $HOME. Find a well documented example in /usr/share/doc/wmcliphist.
 .SH "OPTIONS"
 .IP "\fB-h\fP         " 10
 Show summary of options.
+.IP "\fB-v\fP         " 10
+Print version.
 .IP "\fB-n num\fP         " 10
 Set the number of items to keep in the history.
 Default is 10.
diff --git a/wmcliphist.c b/wmcliphist.c
index 47b032b..98a9799 100644
--- a/wmcliphist.c
+++ b/wmcliphist.c
@@ -4,6 +4,8 @@
 
 #include "wmcliphist.h"
 
+#define WMCLIPHIST_VERSION "2.0"
+
 /*
  * print some help
  */
@@ -16,6 +18,7 @@ print_help()
 			"wmcliphist is small dock applet for Window Maker which "
 			"keeps X clipboard history\n\n");
 	fprintf(stderr, "-h         show this help\n"
+			"-v         print version\n"
 			"-n <num>   set number of items to keep (default 10)\n"
 			"-c color   set color for locked items (default is red)\n"
 			"-s <size>  choose wmcliphist icon size:\n"
@@ -163,6 +166,9 @@ main(int argc, char **argv)
 				}
 			} else if (*(arg + 1) == 'd') {
 				dump_only = TRUE;
+			} else if (*(arg + 1) == 'v') {
+				printf("wmcliphist "WMCLIPHIST_VERSION"\n");
+				exit(1);
 			} else {
 				fprintf(stderr, "Invalid option -%c\n", *(arg + 1));
 				print_help();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmcliphist.git



More information about the Pkg-wmaker-commits mailing list