Source-Changes-HG archive

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

[src/netbsd-1-4]: src/usr.bin/audio/play Pull up revision 1.11 (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/a026c16d9243
branches:  netbsd-1-4
changeset: 469637:a026c16d9243
user:      he <he%NetBSD.org@localhost>
date:      Fri Oct 22 09:37:04 1999 +0000

description:
Pull up revision 1.11 (requested by dmcmahill):
  If not specified on the command line, attempt to fall back
  to the environment variables AUDIODEVICE (for -d) and
  AUDIOCTLDEVICE (for -C) before falling back to _PATH_* constants.

diffstat:

 usr.bin/audio/play/play.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (22 lines):

diff -r a3f30160bb56 -r a026c16d9243 usr.bin/audio/play/play.c
--- a/usr.bin/audio/play/play.c Fri Oct 22 09:34:38 1999 +0000
+++ b/usr.bin/audio/play/play.c Fri Oct 22 09:37:04 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: play.c,v 1.7.2.3 1999/09/27 05:08:00 cgd Exp $ */
+/*     $NetBSD: play.c,v 1.7.2.4 1999/10/22 09:37:04 he Exp $  */
 
 /*
  * Copyright (c) 1999 Matthew R. Green
@@ -154,9 +154,10 @@
                        errx(1, "unknown encoding, bailing...");
        }
 
-       if (device == NULL)
+       if (device == NULL && (device = getenv("AUDIODEVICE")) == NULL &&
+           (device = getenv("AUDIODEV")) == NULL) /* Sun compatibility */
                device = _PATH_AUDIO;
-       if (ctldev == NULL)
+       if (ctldev == NULL && (ctldev = getenv("AUDIOCTLDEVICE")) == NULL)
                ctldev = _PATH_AUDIOCTL;
 
        audiofd = open(device, O_WRONLY);



Home | Main Index | Thread Index | Old Index