1
0
mirror of https://gitlab.xiph.org/xiph/ezstream.git synced 2024-11-03 04:17:18 -05:00

Add -V command line parameter to print the version number and exit.

git-svn-id: https://svn.xiph.org/trunk/ezstream@12626 0101bb08-14d6-0310-b084-bc0e0c8e3800
This commit is contained in:
moritz 2007-03-04 14:27:37 +00:00
parent b87b03f2d6
commit e025a58235
2 changed files with 11 additions and 3 deletions

View File

@ -12,7 +12,7 @@
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm .Nm
.Bk -words .Bk -words
.Op Fl hqv .Op Fl hqVv
.Op Fl c Ar configfile .Op Fl c Ar configfile
.Ek .Ek
.Sh DESCRIPTION .Sh DESCRIPTION
@ -39,6 +39,10 @@ and exit.
.It Fl q .It Fl q
Be more quiet. Be more quiet.
Suppress the output that external programs send to standard error. Suppress the output that external programs send to standard error.
.It Fl V
Print the
.Nm
version number and exit.
.It Fl v .It Fl v
Produce more verbose output from Produce more verbose output from
.Nm . .Nm .

View File

@ -882,7 +882,7 @@ getProgname(const char *argv0)
void void
usage(void) usage(void)
{ {
printf("usage: %s [-hqv] [-c configfile]\n", __progname); printf("usage: %s [-hqVv] [-c configfile]\n", __progname);
} }
void void
@ -892,6 +892,7 @@ usageHelp(void)
printf(" -c configfile use XML configuration in configfile\n"); printf(" -c configfile use XML configuration in configfile\n");
printf(" -h display this additional help and exit\n"); printf(" -h display this additional help and exit\n");
printf(" -q suppress STDERR output from external en-/decoders\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(" -v verbose output (use twice for more effect)\n");
printf("\n"); printf("\n");
printf("See the ezstream(1) manual for detailed information.\n"); printf("See the ezstream(1) manual for detailed information.\n");
@ -919,7 +920,7 @@ main(int argc, char *argv[])
qFlag = 0; qFlag = 0;
vFlag = 0; vFlag = 0;
while ((c = getopt(argc, argv, "c:hqv")) != -1) { while ((c = getopt(argc, argv, "c:hqVv")) != -1) {
switch (c) { switch (c) {
case 'c': case 'c':
if (configFile != NULL) { if (configFile != NULL) {
@ -936,6 +937,9 @@ main(int argc, char *argv[])
case 'q': case 'q':
qFlag = 1; qFlag = 1;
break; break;
case 'V':
printf("%s\n", PACKAGE_STRING);
return (0);
case 'v': case 'v':
vFlag++; vFlag++;
break; break;