]> sigrok.org Git - sigrok-cli.git/commitdiff
Revert "Use annotation-specific struct".
authorUwe Hermann <redacted>
Mon, 11 Nov 2013 09:03:03 +0000 (10:03 +0100)
committerUwe Hermann <redacted>
Mon, 11 Nov 2013 09:03:03 +0000 (10:03 +0100)
This reverts commit fa498bbb3baf5d9bf62fe0e013aaf434cb2732fd (which
was accidentally committed).

sigrok-cli.c

index 1a79367108c90a95cdbb99702086dd6240cd7e86..7f7de8c8c9eaf0db50d962ff0d2e8ac9ff94e131 100644 (file)
@@ -1299,9 +1299,9 @@ int setup_pd_annotations(void)
 
 void show_pd_annotations(struct srd_proto_data *pdata, void *cb_data)
 {
-       struct srd_proto_data_annotation *pda;
-       gpointer ann_format;
        int i;
+       char **annotations;
+       gpointer ann_format;
 
        /* 'cb_data' is not used in this specific callback. */
        (void)cb_data;
@@ -1314,16 +1314,16 @@ void show_pd_annotations(struct srd_proto_data *pdata, void *cb_data)
                /* Not in the list of PDs whose annotations we're showing. */
                return;
 
-       pda = pdata->data;
-       if (pda->ann_format != GPOINTER_TO_INT(ann_format))
+       if (pdata->ann_format != GPOINTER_TO_INT(ann_format))
                /* We don't want this particular format from the PD. */
                return;
 
+       annotations = pdata->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]);
+       for (i = 0; annotations[i]; i++)
+               printf("\"%s\" ", annotations[i]);
        printf("\n");
        fflush(stdout);
 }