mirror of https://github.com/ericonr/sndio.git
sndioctl: Print lists as comma separated nodes
This commit is contained in:
parent
e2d1813cfa
commit
2c8bea3f08
|
@ -432,12 +432,21 @@ print_val(struct info *p, int mono)
|
||||||
if (e != firstent(p, e->desc.node1.name))
|
if (e != firstent(p, e->desc.node1.name))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (more)
|
if (e->desc.maxval == 1) {
|
||||||
printf(",");
|
if (e->curval) {
|
||||||
print_node(&e->desc.node1, mono);
|
if (more)
|
||||||
printf(":");
|
printf(",");
|
||||||
print_num(e);
|
print_node(&e->desc.node1, mono);
|
||||||
more = 1;
|
more = 1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (more)
|
||||||
|
printf(",");
|
||||||
|
print_node(&e->desc.node1, mono);
|
||||||
|
printf(":");
|
||||||
|
print_num(e);
|
||||||
|
more = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue