Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin Use '-d' rather than '-f' for specification of alter...



details:   https://anonhg.NetBSD.org/src/rev/5807c4c24d0c
branches:  trunk
changeset: 521253:5807c4c24d0c
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sun Jan 27 10:09:55 2002 +0000

description:
Use '-d' rather than '-f' for specification of alternative
mixer or audioctl device. The support for '-f' is kept for compatibility
for now.

diffstat:

 usr.bin/audio/ctl/audioctl.1 |  16 ++++++++++------
 usr.bin/audio/ctl/ctl.c      |  13 +++++++------
 usr.bin/mixerctl/mixerctl.1  |  21 +++++++++++++--------
 usr.bin/mixerctl/mixerctl.c  |  13 +++++++------
 4 files changed, 37 insertions(+), 26 deletions(-)

diffs (203 lines):

diff -r 5d5caed4a92d -r 5807c4c24d0c usr.bin/audio/ctl/audioctl.1
--- a/usr.bin/audio/ctl/audioctl.1      Sun Jan 27 09:02:37 2002 +0000
+++ b/usr.bin/audio/ctl/audioctl.1      Sun Jan 27 10:09:55 2002 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: audioctl.1,v 1.14 2001/10/17 22:13:04 wiz Exp $
+.\" $NetBSD: audioctl.1,v 1.15 2002/01/27 10:09:56 jdolecek Exp $
 .\"
 .\" Copyright (c) 1997, 1999 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -33,7 +33,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd February 18, 1999
+.Dd January 27, 2002
 .Dt AUDIOCTL 1
 .Os
 .Sh NAME
@@ -41,15 +41,15 @@
 .Nd control audio device
 .Sh SYNOPSIS
 .Nm
-.Op Fl f Ar file
+.Op Fl d Ar device
 .Op Fl n
 .Fl a
 .Nm ""
-.Op Fl f Ar file
+.Op Fl d Ar device
 .Op Fl n
 .Ar name ...
 .Nm ""
-.Op Fl f Ar file
+.Op Fl d Ar device
 .Op Fl n
 .Fl w
 .Ar name=value ...
@@ -70,7 +70,7 @@
 attempts to set the specified variables to the given values.
 .Pp
 The
-.Fl f
+.Fl d
 flag can be used to give an alternative audio control device, the default is
 .Pa /dev/audioctl0 .
 .Pp
@@ -115,3 +115,7 @@
 .Nm
 command first appeared in
 .Nx 1.3 .
+.Sh COMPATIBILITY
+The old
+.Fl f
+flag is still supported. This support will be removed eventually.
diff -r 5d5caed4a92d -r 5807c4c24d0c usr.bin/audio/ctl/ctl.c
--- a/usr.bin/audio/ctl/ctl.c   Sun Jan 27 09:02:37 2002 +0000
+++ b/usr.bin/audio/ctl/ctl.c   Sun Jan 27 10:09:55 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ctl.c,v 1.28 2002/01/15 23:48:52 mrg Exp $     */
+/*     $NetBSD: ctl.c,v 1.29 2002/01/27 10:09:56 jdolecek Exp $        */
 
 /*
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -330,9 +330,9 @@
 {
        const char *prog = getprogname();
 
-       fprintf(stderr, "Usage: %s [-f file] [-n] name ...\n", prog);
-       fprintf(stderr, "Usage: %s [-f file] [-n] -w name=value ...\n", prog);
-       fprintf(stderr, "Usage: %s [-f file] [-n] -a\n", prog);
+       fprintf(stderr, "Usage: %s [-d file] [-n] name ...\n", prog);
+       fprintf(stderr, "Usage: %s [-d file] [-n] -w name=value ...\n", prog);
+       fprintf(stderr, "Usage: %s [-d file] [-n] -a\n", prog);
        exit(1);
 }
 
@@ -351,7 +351,7 @@
        if (file == 0)
                file = _PATH_AUDIOCTL;
 
-       while ((ch = getopt(argc, argv, "af:nw")) != -1) {
+       while ((ch = getopt(argc, argv, "ad:f:nw")) != -1) {
                switch(ch) {
                case 'a':
                        aflag++;
@@ -362,7 +362,8 @@
                case 'n':
                        sep = 0;
                        break;
-               case 'f':
+               case 'f': /* compatiblity */
+               case 'd':
                        file = optarg;
                        break;
                case '?':
diff -r 5d5caed4a92d -r 5807c4c24d0c usr.bin/mixerctl/mixerctl.1
--- a/usr.bin/mixerctl/mixerctl.1       Sun Jan 27 09:02:37 2002 +0000
+++ b/usr.bin/mixerctl/mixerctl.1       Sun Jan 27 10:09:55 2002 +0000
@@ -1,4 +1,5 @@
-.\" $NetBSD: mixerctl.1,v 1.13 2001/12/01 20:40:20 wiz Exp $
+.\" $NetBSD: mixerctl.1,v 1.14 2002/01/27 10:09:55 jdolecek Exp $
+.\"
 .\" Copyright (c) 1997 The NetBSD Foundation, Inc.
 .\" All rights reserved.
 .\"
@@ -32,7 +33,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd May 4, 1997
+.Dd January 27, 2002
 .Dt MIXERCTL 1
 .Os
 .Sh NAME
@@ -40,27 +41,27 @@
 .Nd control audio mixing
 .Sh SYNOPSIS
 .Nm
-.Op Fl f Ar file
+.Op Fl d Ar file
 .Op Fl n
 .Op Fl v
 .Fl a
 .Nm ""
-.Op Fl f Ar file
+.Op Fl d Ar file
 .Op Fl n
 .Op Fl v
 .Ar name ...
 .Nm ""
-.Op Fl f Ar file
+.Op Fl d Ar file
 .Op Fl n
 .Fl w
 .Ar name=value ...
 .Nm ""
-.Op Fl f Ar file
+.Op Fl d Ar file
 .Op Fl n
 .Fl w
 .Ar name++ ...
 .Nm ""
-.Op Fl f Ar file
+.Op Fl d Ar file
 .Op Fl n
 .Fl w
 .Ar name-- ...
@@ -81,7 +82,7 @@
 attempts to set the specified variables to the given values.
 .Pp
 The
-.Fl f
+.Fl d
 flag can be used to give an alternative mixer device, the default is
 .Pa /dev/mixer0 .
 .Pp
@@ -155,3 +156,7 @@
 .Nm
 command first appeared in
 .Nx 1.3 .
+.Sh COMPATIBILITY
+The old
+.Fl f
+flag is still supported. This support will be removed eventually.
diff -r 5d5caed4a92d -r 5807c4c24d0c usr.bin/mixerctl/mixerctl.c
--- a/usr.bin/mixerctl/mixerctl.c       Sun Jan 27 09:02:37 2002 +0000
+++ b/usr.bin/mixerctl/mixerctl.c       Sun Jan 27 10:09:55 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mixerctl.c,v 1.15 2000/12/29 13:30:26 augustss Exp $   */
+/*     $NetBSD: mixerctl.c,v 1.16 2002/01/27 10:09:55 jdolecek Exp $   */
 
 /*
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -324,7 +324,7 @@
 
        prog = *argv;
 
-       while ((ch = getopt(argc, argv, "af:nvw")) != -1) {
+       while ((ch = getopt(argc, argv, "ad:f:nvw")) != -1) {
                switch(ch) {
                case 'a':
                        aflag++;
@@ -338,15 +338,16 @@
                case 'n':
                        sep = 0;
                        break;
-               case 'f':
+               case 'f': /* compatibility */
+               case 'd':
                        file = optarg;
                        break;
                case '?':
                default:
                usage:
-               fprintf(out, "%s [-f file] [-v] [-n] name ...\n", prog);
-               fprintf(out, "%s [-f file] [-v] [-n] -w name=value ...\n",prog);
-               fprintf(out, "%s [-f file] [-v] [-n] -a\n", prog);
+               fprintf(out, "%s [-d file] [-v] [-n] name ...\n", prog);
+               fprintf(out, "%s [-d file] [-v] [-n] -w name=value ...\n",prog);
+               fprintf(out, "%s [-d file] [-v] [-n] -a\n", prog);
                exit(0);
                }
        }



Home | Main Index | Thread Index | Old Index