From: Bert Vermeulen Date: Sun, 10 Nov 2013 11:55:23 +0000 (+0100) Subject: Show only the longest PD annotation. X-Git-Tag: sigrok-cli-0.5.0~66 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=e947e227a2fd904d5617858aeb7e34239efa964d;p=sigrok-cli.git Show only the longest PD annotation. --- diff --git a/sigrok-cli.c b/sigrok-cli.c index 740dd6a..3ae7910 100644 --- a/sigrok-cli.c +++ b/sigrok-cli.c @@ -1352,8 +1352,8 @@ void show_pd_annotations(struct srd_proto_data *pdata, void *cb_data) if (opt_loglevel > SR_LOG_WARN) printf("%"PRIu64"-%"PRIu64" ", pdata->start_sample, pdata->end_sample); printf("%s: ", pdata->pdo->proto_id); - for (i = 0; pda->ann_text[i]; i++) - printf("\"%s\" ", pda->ann_text[i]); + /* Show only the longest annotation. */ + printf("\"%s\" ", pda->ann_text[0]); printf("\n"); fflush(stdout); }