=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/audioctl/audioctl.c,v retrieving revision 1.14 retrieving revision 1.15 diff -c -r1.14 -r1.15 *** src/usr.bin/audioctl/audioctl.c 2007/09/17 13:46:11 1.14 --- src/usr.bin/audioctl/audioctl.c 2007/09/27 21:55:54 1.15 *************** *** 1,4 **** ! /* $OpenBSD: audioctl.c,v 1.14 2007/09/17 13:46:11 jakemsr Exp $ */ /* $NetBSD: audioctl.c,v 1.14 1998/04/27 16:55:23 augustss Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: audioctl.c,v 1.15 2007/09/27 21:55:54 sobrado Exp $ */ /* $NetBSD: audioctl.c,v 1.14 1998/04/27 16:55:23 augustss Exp $ */ /* *************** *** 180,186 **** findfield(char *name) { int i; ! for(i = 0; fields[i].name; i++) if (strcmp(fields[i].name, name) == 0) return &fields[i]; return (0); --- 180,186 ---- findfield(char *name) { int i; ! for (i = 0; fields[i].name; i++) if (strcmp(fields[i].name, name) == 0) return &fields[i]; return (0); *************** *** 195,201 **** if (sep) fprintf(out, "%s%s", p->name, sep); ! switch(p->format) { case STRING: fprintf(out, "%s", (char*)p->valp); break; --- 195,201 ---- if (sep) fprintf(out, "%s%s", p->name, sep); ! switch (p->format) { case STRING: fprintf(out, "%s", (char*)p->valp); break; *************** *** 229,235 **** break; case ENC: v = *(u_int*)p->valp; ! for(i = 0; encs[i].ename; i++) if (encs[i].eno == v) break; if (encs[i].ename) --- 229,235 ---- break; case ENC: v = *(u_int*)p->valp; ! for (i = 0; encs[i].ename; i++) if (encs[i].eno == v) break; if (encs[i].ename) *************** *** 257,263 **** int i; u_int u; ! switch(p->format) { case UINT: if (sscanf(q, "%u", (unsigned int *)p->valp) != 1) warnx("Bad number %s", q); --- 257,263 ---- int i; u_int u; ! switch (p->format) { case UINT: if (sscanf(q, "%u", (unsigned int *)p->valp) != 1) warnx("Bad number %s", q); *************** *** 274,280 **** warnx("Bad number %s", q); break; case ENC: ! for(i = 0; encs[i].ename; i++) if (strcmp(encs[i].ename, q) == 0) break; if (encs[i].ename) --- 274,280 ---- warnx("Bad number %s", q); break; case ENC: ! for (i = 0; encs[i].ename; i++) if (strcmp(encs[i].ename, q) == 0) break; if (encs[i].ename) *************** *** 295,301 **** if (ioctl(fd, AUDIO_GETDEV, &adev) < 0) err(1, "AUDIO_GETDEV"); ! for(;;) { audio_encoding_t enc; enc.index = i++; if (ioctl(fd, AUDIO_GETENC, &enc) < 0) --- 295,301 ---- if (ioctl(fd, AUDIO_GETDEV, &adev) < 0) err(1, "AUDIO_GETDEV"); ! for (;;) { audio_encoding_t enc; enc.index = i++; if (ioctl(fd, AUDIO_GETENC, &enc) < 0) *************** *** 323,332 **** extern char *__progname; /* from crt0.o */ fprintf(stderr, ! "usage: %s [-f file] [-n] -a\n" ! " %s [-f file] [-n] name ...\n" ! " %s [-f file] [-n] name=value ...\n", __progname, ! __progname, __progname); exit(1); } --- 323,332 ---- extern char *__progname; /* from crt0.o */ fprintf(stderr, ! "usage: %s [-n] [-f file] -a\n" ! " %s [-n] [-f file] name ...\n" ! " %s [-n] [-f file] name=value ...\n", ! __progname, __progname, __progname); exit(1); } *************** *** 345,351 **** file = "/dev/audioctl"; while ((ch = getopt(argc, argv, "af:nw")) != -1) { ! switch(ch) { case 'a': aflag++; break; --- 345,351 ---- file = "/dev/audioctl"; while ((ch = getopt(argc, argv, "af:nw")) != -1) { ! switch (ch) { case 'a': aflag++; break;