]> sigrok.org Git - libsigrok.git/blobdiff - output/output_skeleton.c
input/output formats: Explicit struct member names.
[libsigrok.git] / output / output_skeleton.c
index 669a29cdb41eafd43d71ee7210c52d9a91ea8e94..af82d5b4a80266a5bbcdc73e55d41d7cf96fb2c0 100644 (file)
 #include <stdint.h>
 #include <sigrok.h>
 
-static int init(struct output *o)
+static int init(struct sr_output *o)
 {
        return 0;
 }
 
-static int data(struct output *o, char *data_in, uint64_t length_in,
+static int data(struct sr_output *o, const char *data_in, uint64_t length_in,
                char **data_out, uint64_t *length_out)
 {
        return SR_OK;
 }
 
-static int event(struct output *o, int event_type, char **data_out,
+static int event(struct sr_output *o, int event_type, char **data_out,
                 uint64_t *length_out)
 {
        return SR_OK;
 }
 
-struct output_format output_foo = {
-       "foo",
-       "The foo format",
-       DF_LOGIC,
-       init,
-       data,
-       event,
+struct sr_output_format output_foo = {
+       .extension = "foo",
+       .description = "The foo format",
+       .df_type = SR_DF_LOGIC,
+       .init = init,
+       .data = data,
+       .event = event,
 };