]> sigrok.org Git - libsigrok.git/blobdiff - output/output_gnuplot.c
output_text: Add ASCII output.
[libsigrok.git] / output / output_gnuplot.c
index 51648c4475be90b85a7183d677c13869381bc072..5ad9cc5ba54079a0a796ddaebb6672e23e29717c 100644 (file)
@@ -127,16 +127,17 @@ static int event(struct output *o, int event_type, char **data_out,
        ctx = o->internal;
        switch (event_type) {
        case DF_TRIGGER:
-               /* TODO */
+               /* TODO: can a trigger mark be in a gnuplot data file? */
                break;
        case DF_END:
-               *data_out = NULL;
-               *length_out = 0;
                free(o->internal);
                o->internal = NULL;
                break;
        }
 
+       *data_out = NULL;
+       *length_out = 0;
+
        return SIGROK_OK;
 }
 
@@ -193,6 +194,7 @@ static int data(struct output *o, char *data_in, uint64_t length_in,
 struct output_format output_gnuplot = {
        "gnuplot",
        "Gnuplot",
+       DF_LOGIC,
        init,
        data,
        event,