The output of `sigrok -P <decoder> --show` omitted the binary classes,
users could not learn which specs are available for the -B option. Add
a "Binary classes:" section after the list of annotations.
Signed-off-by: Gerhard Sittig <redacted>
struct srd_decoder_annotation_row *r;
GSList *l, *ll, *ol;
int idx;
struct srd_decoder_annotation_row *r;
GSList *l, *ll, *ol;
int idx;
- char **pdtokens, **pdtok, *optsep, **ann, *val, *doc;
+ char **pdtokens, **pdtok, *optsep, **ann, **bin, *val, *doc;
pdtokens = g_strsplit(opt_pds, ",", -1);
for (pdtok = pdtokens; *pdtok; pdtok++) {
pdtokens = g_strsplit(opt_pds, ",", -1);
for (pdtok = pdtokens; *pdtok; pdtok++) {
} else {
printf("None.\n");
}
} else {
printf("None.\n");
}
+ printf("Binary classes:\n");
+ if (dec->binary) {
+ for (l = dec->binary; l; l = l->next) {
+ bin = l->data;
+ printf("- %s: %s\n", bin[0], bin[1]);
+ }
+ } else {
+ printf("None.\n");
+ }
printf("Required channels:\n");
if (dec->channels) {
for (l = dec->channels; l; l = l->next) {
printf("Required channels:\n");
if (dec->channels) {
for (l = dec->channels; l; l = l->next) {