Print properties differently.
Change indentation.
This commit is contained in:
parent
3081c6f8cf
commit
64e2e4badb
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ctl.c,v 1.10 1997/10/08 22:31:55 jtc Exp $ */
|
||||
/* $NetBSD: ctl.c,v 1.11 1997/10/11 13:40:26 augustss Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
@ -148,6 +148,16 @@ struct {
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
static struct {
|
||||
char *name;
|
||||
u_int prop;
|
||||
} props[] = {
|
||||
{ "full_duplex", AUDIO_PROP_FULLDUPLEX },
|
||||
{ "mmap", AUDIO_PROP_MMAP },
|
||||
{ "independent", AUDIO_PROP_INDEPENDENT },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
struct field *
|
||||
findfield(name)
|
||||
char *name;
|
||||
@ -211,14 +221,11 @@ prfield(p, sep)
|
||||
break;
|
||||
case PROPS:
|
||||
v = *(u_int*)p->valp;
|
||||
cm = "";
|
||||
if (v & AUDIO_PROP_FULLDUPLEX) {
|
||||
fprintf(out, "%sfull_duplex", cm);
|
||||
for (cm = "", i = 0; props[i].name; i++) {
|
||||
if (v & props[i].prop) {
|
||||
fprintf(out, "%s%s", cm, props[i].name);
|
||||
cm = ",";
|
||||
}
|
||||
if (v & AUDIO_PROP_MMAP) {
|
||||
fprintf(out, "%smmap", cm);
|
||||
cm = ",";
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: audioctl.c,v 1.10 1997/10/08 22:31:55 jtc Exp $ */
|
||||
/* $NetBSD: audioctl.c,v 1.11 1997/10/11 13:40:26 augustss Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
@ -148,6 +148,16 @@ struct {
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
static struct {
|
||||
char *name;
|
||||
u_int prop;
|
||||
} props[] = {
|
||||
{ "full_duplex", AUDIO_PROP_FULLDUPLEX },
|
||||
{ "mmap", AUDIO_PROP_MMAP },
|
||||
{ "independent", AUDIO_PROP_INDEPENDENT },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
struct field *
|
||||
findfield(name)
|
||||
char *name;
|
||||
@ -211,14 +221,11 @@ prfield(p, sep)
|
||||
break;
|
||||
case PROPS:
|
||||
v = *(u_int*)p->valp;
|
||||
cm = "";
|
||||
if (v & AUDIO_PROP_FULLDUPLEX) {
|
||||
fprintf(out, "%sfull_duplex", cm);
|
||||
for (cm = "", i = 0; props[i].name; i++) {
|
||||
if (v & props[i].prop) {
|
||||
fprintf(out, "%s%s", cm, props[i].name);
|
||||
cm = ",";
|
||||
}
|
||||
if (v & AUDIO_PROP_MMAP) {
|
||||
fprintf(out, "%smmap", cm);
|
||||
cm = ",";
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user