[xiph-commits] r12626 - in trunk/ezstream: doc src

moritz at svn.xiph.org moritz at svn.xiph.org
Sun Mar 4 06:27:46 PST 2007


Author: moritz
Date: 2007-03-04 06:27:37 -0800 (Sun, 04 Mar 2007)
New Revision: 12626

Modified:
   trunk/ezstream/doc/ezstream.1.in
   trunk/ezstream/src/ezstream.c
Log:
Add -V command line parameter to print the version number and exit.


Modified: trunk/ezstream/doc/ezstream.1.in
===================================================================
--- trunk/ezstream/doc/ezstream.1.in	2007-03-04 08:22:04 UTC (rev 12625)
+++ trunk/ezstream/doc/ezstream.1.in	2007-03-04 14:27:37 UTC (rev 12626)
@@ -12,7 +12,7 @@
 .Sh SYNOPSIS
 .Nm
 .Bk -words
-.Op Fl hqv
+.Op Fl hqVv
 .Op Fl c Ar configfile
 .Ek
 .Sh DESCRIPTION
@@ -39,6 +39,10 @@
 .It Fl q
 Be more quiet.
 Suppress the output that external programs send to standard error.
+.It Fl V
+Print the
+.Nm
+version number and exit.
 .It Fl v
 Produce more verbose output from
 .Nm .

Modified: trunk/ezstream/src/ezstream.c
===================================================================
--- trunk/ezstream/src/ezstream.c	2007-03-04 08:22:04 UTC (rev 12625)
+++ trunk/ezstream/src/ezstream.c	2007-03-04 14:27:37 UTC (rev 12626)
@@ -882,7 +882,7 @@
 void
 usage(void)
 {
-	printf("usage: %s [-hqv] [-c configfile]\n", __progname);
+	printf("usage: %s [-hqVv] [-c configfile]\n", __progname);
 }
 
 void
@@ -892,6 +892,7 @@
 	printf("  -c configfile  use XML configuration in configfile\n");
 	printf("  -h             display this additional help and exit\n");
 	printf("  -q             suppress STDERR output from external en-/decoders\n");
+	printf("  -V             print the version number and exit\n");
 	printf("  -v             verbose output (use twice for more effect)\n");
 	printf("\n");
 	printf("See the ezstream(1) manual for detailed information.\n");
@@ -919,7 +920,7 @@
 	qFlag = 0;
 	vFlag = 0;
 
-	while ((c = getopt(argc, argv, "c:hqv")) != -1) {
+	while ((c = getopt(argc, argv, "c:hqVv")) != -1) {
 		switch (c) {
 		case 'c':
 			if (configFile != NULL) {
@@ -936,6 +937,9 @@
 		case 'q':
 			qFlag = 1;
 			break;
+		case 'V':
+			printf("%s\n", PACKAGE_STRING);
+			return (0);
 		case 'v':
 			vFlag++;
 			break;



More information about the commits mailing list