]> sigrok.org Git - sigrok-cli.git/commitdiff
cli: Add missing fflush(stdout) for PD annotation output.
authorUwe Hermann <redacted>
Fri, 22 Jun 2012 15:47:11 +0000 (17:47 +0200)
committerUwe Hermann <redacted>
Fri, 22 Jun 2012 15:48:42 +0000 (17:48 +0200)
This is required/helpful to be able to pipe sigrok-cli PD output into
other tools, like this:

  sigrok-cli -i ... -a ... | othertool

sigrok-cli.c

index 3bda15857377cb9f4c7546a08001eb9f6d797eec..ab8296e1317f413ae19c10ad9b9f6ea1ed90085b 100644 (file)
@@ -923,6 +923,7 @@ void show_pd_annotations(struct srd_proto_data *pdata, void *cb_data)
        for (i = 0; annotations[i]; i++)
                printf("\"%s\" ", annotations[i]);
        printf("\n");
+       fflush(stdout);
 }
 
 static int select_probes(struct sr_dev *dev)