=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/aucat/aucat.c,v retrieving revision 1.121 retrieving revision 1.122 diff -u -r1.121 -r1.122 --- src/usr.bin/aucat/aucat.c 2011/10/12 12:16:10 1.121 +++ src/usr.bin/aucat/aucat.c 2011/10/17 21:09:11 1.122 @@ -1,4 +1,4 @@ -/* $OpenBSD: aucat.c,v 1.121 2011/10/12 12:16:10 jmc Exp $ */ +/* $OpenBSD: aucat.c,v 1.122 2011/10/17 21:09:11 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov * @@ -56,7 +56,6 @@ #define SNDIO_PRIO (-20) #define PROG_AUCAT "aucat" -#define PROG_MIDICAT "midicat" /* * sample rate if no ``-r'' is used @@ -84,10 +83,6 @@ "[-q port] [-r rate] [-s name] [-t mode] [-U unit] [-v volume]\n\t" "[-w flag] [-x policy] [-z nframes]\n"; -char midicat_usage[] = "usage: " PROG_MIDICAT " [-dlM] [-a flag] " - "[-i file] [-L addr] [-o file] [-q port]\n\t" - "[-s name] [-U unit]\n"; - /* * SIGINT handler, it raises the quit flag. If the flag is already set, * that means that the last SIGINT was not handled, because the process @@ -367,8 +362,8 @@ int main(int argc, char **argv) { - char *prog, *un_path, *optstr, *usagestr; - int c, background, unit, server, tcp_port, active; + char *prog, *optstr, *usagestr; + int c, background, unit, server, active; char base[PATH_MAX], path[PATH_MAX]; unsigned mode, hdr, xrun, rate, join, mmc, vol; unsigned hold, autovol, bufsz, round; @@ -409,21 +404,11 @@ mode = MODE_MIDIMASK | MODE_PLAY | MODE_REC; optstr = "a:b:c:C:de:f:h:i:j:lL:m:Mno:q:r:s:t:U:v:w:x:z:t:j:z:"; usagestr = aucat_usage; - un_path = AUCAT_PATH; - tcp_port = AUCAT_PORT; - } else if (strcmp(prog, PROG_MIDICAT) == 0) { - mode = MODE_MIDIMASK | MODE_THRU; - optstr = "a:di:lL:Mo:q:s:U:"; - usagestr = midicat_usage; - un_path = MIDICAT_PATH; - tcp_port = MIDICAT_PORT; - mkdev("midithru", MODE_THRU, 0, 0, 1, 0); } else { fprintf(stderr, "%s: can't determine program to run\n", prog); return 1; } - while ((c = getopt(argc, argv, optstr)) != -1) { switch (c) { case 'd': @@ -441,7 +426,7 @@ server = 1; break; case 'L': - listen_new_tcp(optarg, tcp_port + unit); + listen_new_tcp(optarg, AUCAT_PORT + unit); server = 1; break; case 'm': @@ -567,7 +552,7 @@ } if (server) { getbasepath(base, sizeof(base)); - snprintf(path, PATH_MAX, "%s/%s%u", base, un_path, unit); + snprintf(path, PATH_MAX, "%s/%s%u", base, AUCAT_PATH, unit); listen_new_un(path); if (geteuid() == 0) privdrop();