From: Bert Vermeulen Date: Sun, 3 Aug 2014 13:11:24 +0000 (+0200) Subject: input: s/format/module in all naming. X-Git-Tag: libsigrok-0.4.0~1118 X-Git-Url: https://sigrok.org/gitweb/?a=commitdiff_plain;h=d4c937749a92ce6defa2f0095b34692181afe597;p=libsigrok.git input: s/format/module in all naming. --- diff --git a/include/libsigrok/libsigrok.h b/include/libsigrok/libsigrok.h index 03eedc61..1a076d6a 100644 --- a/include/libsigrok/libsigrok.h +++ b/include/libsigrok/libsigrok.h @@ -443,13 +443,13 @@ struct sr_option { GSList *values; }; -/** Input (file) format struct. */ +/** Input (file) module struct. */ struct sr_input { /** - * A pointer to this input format's 'struct sr_input_format'. + * A pointer to this input module's 'struct sr_input_module'. * The frontend can use this to call the module's callbacks. */ - struct sr_input_format *format; + struct sr_input_module *module; GHashTable *param; @@ -458,13 +458,13 @@ struct sr_input { void *internal; }; -/** Input (file) format driver. */ -struct sr_input_format { - /** The unique ID for this input format. Must not be NULL. */ +/** Input (file) module driver. */ +struct sr_input_module { + /** The unique ID for this input module. Must not be NULL. */ char *id; /** - * A short description of the input format, which can (for example) + * A short description of the input module, which can (for example) * be displayed to the user by frontends. Must not be NULL. */ char *description; diff --git a/include/libsigrok/proto.h b/include/libsigrok/proto.h index a159baed..fd6cb7f8 100644 --- a/include/libsigrok/proto.h +++ b/include/libsigrok/proto.h @@ -124,7 +124,7 @@ SR_API int sr_session_source_remove_channel(struct sr_session *session, /*--- input/input.c ---------------------------------------------------------*/ -SR_API struct sr_input_format **sr_input_list(void); +SR_API struct sr_input_module **sr_input_list(void); /*--- output/output.c -------------------------------------------------------*/ diff --git a/src/backend.c b/src/backend.c index 47f352bf..e6297f54 100644 --- a/src/backend.c +++ b/src/backend.c @@ -215,7 +215,7 @@ static int sanity_check_all_drivers(void) static int sanity_check_all_input_modules(void) { int i, errors, ret = SR_OK; - struct sr_input_format **inputs; + struct sr_input_module **inputs; const char *d; sr_spew("Sanity-checking all input modules."); diff --git a/src/input/binary.c b/src/input/binary.c index e0d4c1dd..846e6bab 100644 --- a/src/input/binary.c +++ b/src/input/binary.c @@ -142,7 +142,7 @@ static int loadfile(struct sr_input *in, const char *filename) return SR_OK; } -SR_PRIV struct sr_input_format input_binary = { +SR_PRIV struct sr_input_module input_binary = { .id = "binary", .description = "Raw binary", .format_match = format_match, diff --git a/src/input/chronovu_la8.c b/src/input/chronovu_la8.c index dcedcf8c..5291eabe 100644 --- a/src/input/chronovu_la8.c +++ b/src/input/chronovu_la8.c @@ -197,7 +197,7 @@ static int loadfile(struct sr_input *in, const char *filename) return SR_OK; } -SR_PRIV struct sr_input_format input_chronovu_la8 = { +SR_PRIV struct sr_input_module input_chronovu_la8 = { .id = "chronovu-la8", .description = "ChronoVu LA8", .format_match = format_match, diff --git a/src/input/csv.c b/src/input/csv.c index 1218cd64..c0316b62 100644 --- a/src/input/csv.c +++ b/src/input/csv.c @@ -863,7 +863,7 @@ static int loadfile(struct sr_input *in, const char *filename) return SR_OK; } -SR_PRIV struct sr_input_format input_csv = { +SR_PRIV struct sr_input_module input_csv = { .id = "csv", .description = "Comma-separated values (CSV)", .format_match = format_match, diff --git a/src/input/input.c b/src/input/input.c index d22b3734..21043fcc 100644 --- a/src/input/input.c +++ b/src/input/input.c @@ -27,9 +27,9 @@ */ /** - * @defgroup grp_input Input formats + * @defgroup grp_input Input modules * - * Input file/data format handling. + * Input file/data module handling. * * libsigrok can process acquisition data in several different ways. * Aside from acquiring data from a hardware device, it can also take it from @@ -43,21 +43,21 @@ * Every input module is "pluggable", meaning it's handled as being separate * from the main libsigrok, but linked in to it statically. To keep things * modular and separate like this, functions within an input module should be - * declared static, with only the respective 'struct sr_input_format' being + * declared static, with only the respective 'struct sr_input_module' being * exported for use into the wider libsigrok namespace. * * @{ */ /** @cond PRIVATE */ -extern SR_PRIV struct sr_input_format input_chronovu_la8; -extern SR_PRIV struct sr_input_format input_csv; -extern SR_PRIV struct sr_input_format input_binary; -extern SR_PRIV struct sr_input_format input_vcd; -extern SR_PRIV struct sr_input_format input_wav; +extern SR_PRIV struct sr_input_module input_chronovu_la8; +extern SR_PRIV struct sr_input_module input_csv; +extern SR_PRIV struct sr_input_module input_binary; +extern SR_PRIV struct sr_input_module input_vcd; +extern SR_PRIV struct sr_input_module input_wav; /* @endcond */ -static struct sr_input_format *input_module_list[] = { +static struct sr_input_module *input_module_list[] = { &input_vcd, &input_chronovu_la8, &input_wav, @@ -68,7 +68,7 @@ static struct sr_input_format *input_module_list[] = { }; /** @since 0.1.0 */ -SR_API struct sr_input_format **sr_input_list(void) +SR_API struct sr_input_module **sr_input_list(void) { return input_module_list; } diff --git a/src/input/vcd.c b/src/input/vcd.c index eec53e10..fe937567 100644 --- a/src/input/vcd.c +++ b/src/input/vcd.c @@ -535,7 +535,7 @@ static int loadfile(struct sr_input *in, const char *filename) return SR_OK; } -SR_PRIV struct sr_input_format input_vcd = { +SR_PRIV struct sr_input_module input_vcd = { .id = "vcd", .description = "Value Change Dump", .format_match = format_match, diff --git a/src/input/wav.c b/src/input/wav.c index 2e666255..cf061f23 100644 --- a/src/input/wav.c +++ b/src/input/wav.c @@ -256,7 +256,7 @@ static int loadfile(struct sr_input *in, const char *filename) } -SR_PRIV struct sr_input_format input_wav = { +SR_PRIV struct sr_input_module input_wav = { .id = "wav", .description = "WAV file", .format_match = format_match,