diff --git a/input/binary.c b/input/binary.c index 9172eb8e..f00a14b8 100644 --- a/input/binary.c +++ b/input/binary.c @@ -102,7 +102,7 @@ static int loadfile(struct sr_input *in, const char *filename) return SR_OK; } -struct sr_input_format input_binary = { +SR_PRIV struct sr_input_format input_binary = { .id = "binary", .description = "Raw binary", .format_match = format_match, diff --git a/input/chronovu_la8.c b/input/chronovu_la8.c index efc7704c..a2aab335 100644 --- a/input/chronovu_la8.c +++ b/input/chronovu_la8.c @@ -167,7 +167,7 @@ static int loadfile(struct sr_input *in, const char *filename) return SR_OK; } -struct sr_input_format input_chronovu_la8 = { +SR_PRIV struct sr_input_format input_chronovu_la8 = { .id = "chronovu-la8", .description = "ChronoVu LA8", .format_match = format_match, diff --git a/input/input.c b/input/input.c index 3f60b1a8..d1d46550 100644 --- a/input/input.c +++ b/input/input.c @@ -20,8 +20,8 @@ #include "sigrok.h" #include "sigrok-internal.h" -extern struct sr_input_format input_chronovu_la8; -extern struct sr_input_format input_binary; +extern SR_PRIV struct sr_input_format input_chronovu_la8; +extern SR_PRIV struct sr_input_format input_binary; static struct sr_input_format *input_module_list[] = { &input_chronovu_la8, diff --git a/output/analog.c b/output/analog.c index 65c8c965..58c37dba 100644 --- a/output/analog.c +++ b/output/analog.c @@ -437,7 +437,7 @@ static int data_ascii(struct sr_output *o, const char *data_in, } #endif -struct sr_output_format output_analog_bits = { +SR_PRIV struct sr_output_format output_analog_bits = { .id = "analog_bits", .description = "Bits (takes argument, default 64)", .df_type = SR_DF_ANALOG, @@ -445,6 +445,7 @@ struct sr_output_format output_analog_bits = { .data = data_bits, .event = event, }; + #if 0 struct sr_output_format output_analog_hex = { .id = "analog_hex", diff --git a/output/binary.c b/output/binary.c index daf0feab..f0a3c35a 100644 --- a/output/binary.c +++ b/output/binary.c @@ -59,7 +59,7 @@ static int data(struct sr_output *o, const char *data_in, uint64_t length_in, return SR_OK; } -struct sr_output_format output_binary = { +SR_PRIV struct sr_output_format output_binary = { .id = "binary", .description = "Raw binary", .df_type = SR_DF_LOGIC, diff --git a/output/chronovu_la8.c b/output/chronovu_la8.c index f6127352..6ef99daf 100644 --- a/output/chronovu_la8.c +++ b/output/chronovu_la8.c @@ -231,7 +231,7 @@ static int data(struct sr_output *o, const char *data_in, uint64_t length_in, return SR_OK; } -struct sr_output_format output_chronovu_la8 = { +SR_PRIV struct sr_output_format output_chronovu_la8 = { .id = "chronovu-la8", .description = "ChronoVu LA8", .df_type = SR_DF_LOGIC, diff --git a/output/csv.c b/output/csv.c index 48c20218..2f91226b 100644 --- a/output/csv.c +++ b/output/csv.c @@ -216,7 +216,7 @@ static int data(struct sr_output *o, const char *data_in, uint64_t length_in, return SR_OK; } -struct sr_output_format output_csv = { +SR_PRIV struct sr_output_format output_csv = { .id = "csv", .description = "Comma-separated values (CSV)", .df_type = SR_DF_LOGIC, diff --git a/output/gnuplot.c b/output/gnuplot.c index 77ca39fe..fffafdfc 100644 --- a/output/gnuplot.c +++ b/output/gnuplot.c @@ -277,7 +277,7 @@ static int data(struct sr_output *o, const char *data_in, uint64_t length_in, return SR_OK; } -struct sr_output_format output_gnuplot = { +SR_PRIV struct sr_output_format output_gnuplot = { .id = "gnuplot", .description = "Gnuplot", .df_type = SR_DF_LOGIC, diff --git a/output/ols.c b/output/ols.c index 92d1d106..04403456 100644 --- a/output/ols.c +++ b/output/ols.c @@ -124,7 +124,7 @@ static int data(struct sr_output *o, const char *data_in, uint64_t length_in, return SR_OK; } -struct sr_output_format output_ols = { +SR_PRIV struct sr_output_format output_ols = { .id = "ols", .description = "OpenBench Logic Sniffer", .df_type = SR_DF_LOGIC, diff --git a/output/output.c b/output/output.c index 8d363f6a..44747c25 100644 --- a/output/output.c +++ b/output/output.c @@ -20,17 +20,17 @@ #include "sigrok.h" #include "sigrok-internal.h" -extern struct sr_output_format output_text_bits; -extern struct sr_output_format output_text_hex; -extern struct sr_output_format output_text_ascii; -extern struct sr_output_format output_binary; -extern struct sr_output_format output_vcd; -extern struct sr_output_format output_ols; -extern struct sr_output_format output_gnuplot; -extern struct sr_output_format output_chronovu_la8; -extern struct sr_output_format output_csv; -/* extern struct sr_output_format output_analog_bits; */ -/* extern struct sr_output_format output_analog_gnuplot; */ +extern SR_PRIV struct sr_output_format output_text_bits; +extern SR_PRIV struct sr_output_format output_text_hex; +extern SR_PRIV struct sr_output_format output_text_ascii; +extern SR_PRIV struct sr_output_format output_binary; +extern SR_PRIV struct sr_output_format output_vcd; +extern SR_PRIV struct sr_output_format output_ols; +extern SR_PRIV struct sr_output_format output_gnuplot; +extern SR_PRIV struct sr_output_format output_chronovu_la8; +extern SR_PRIV struct sr_output_format output_csv; +/* extern SR_PRIV struct sr_output_format output_analog_bits; */ +/* extern SR_PRIV struct sr_output_format output_analog_gnuplot; */ static struct sr_output_format *output_module_list[] = { &output_text_bits, diff --git a/output/text/ascii.c b/output/text/ascii.c index 2d6aad72..d97243e6 100644 --- a/output/text/ascii.c +++ b/output/text/ascii.c @@ -25,13 +25,14 @@ #include "sigrok-internal.h" #include "text.h" -int init_ascii(struct sr_output *o) +SR_PRIV int init_ascii(struct sr_output *o) { return init(o, DEFAULT_BPL_ASCII, MODE_ASCII); } -int data_ascii(struct sr_output *o, const char *data_in, uint64_t length_in, - char **data_out, uint64_t *length_out) +SR_PRIV int data_ascii(struct sr_output *o, const char *data_in, + uint64_t length_in, char **data_out, + uint64_t *length_out) { struct context *ctx; unsigned int outsize, offset, p; @@ -114,7 +115,7 @@ int data_ascii(struct sr_output *o, const char *data_in, uint64_t length_in, return SR_OK; } -struct sr_output_format output_text_ascii = { +SR_PRIV struct sr_output_format output_text_ascii = { .id = "ascii", .description = "ASCII (takes argument, default 74)", .df_type = SR_DF_LOGIC, diff --git a/output/text/bits.c b/output/text/bits.c index 1d918184..bb90e1c9 100644 --- a/output/text/bits.c +++ b/output/text/bits.c @@ -25,13 +25,13 @@ #include "sigrok-internal.h" #include "text.h" -int init_bits(struct sr_output *o) +SR_PRIV int init_bits(struct sr_output *o) { return init(o, DEFAULT_BPL_BITS, MODE_BITS); } -int data_bits(struct sr_output *o, const char *data_in, uint64_t length_in, - char **data_out, uint64_t *length_out) +SR_PRIV int data_bits(struct sr_output *o, const char *data_in, + uint64_t length_in, char **data_out, uint64_t *length_out) { struct context *ctx; unsigned int outsize, offset, p; @@ -101,7 +101,7 @@ int data_bits(struct sr_output *o, const char *data_in, uint64_t length_in, return SR_OK; } -struct sr_output_format output_text_bits = { +SR_PRIV struct sr_output_format output_text_bits = { .id = "bits", .description = "Bits (takes argument, default 64)", .df_type = SR_DF_LOGIC, diff --git a/output/text/hex.c b/output/text/hex.c index 9c74d730..964cb9cc 100644 --- a/output/text/hex.c +++ b/output/text/hex.c @@ -24,13 +24,13 @@ #include "sigrok.h" #include "text.h" -int init_hex(struct sr_output *o) +SR_PRIV int init_hex(struct sr_output *o) { return init(o, DEFAULT_BPL_HEX, MODE_HEX); } -int data_hex(struct sr_output *o, const char *data_in, uint64_t length_in, - char **data_out, uint64_t *length_out) +SR_PRIV int data_hex(struct sr_output *o, const char *data_in, + uint64_t length_in, char **data_out, uint64_t *length_out) { struct context *ctx; unsigned int outsize, offset, p; @@ -89,7 +89,7 @@ int data_hex(struct sr_output *o, const char *data_in, uint64_t length_in, return SR_OK; } -struct sr_output_format output_text_hex = { +SR_PRIV struct sr_output_format output_text_hex = { .id = "hex", .description = "Hexadecimal (takes argument, default 192)", .df_type = SR_DF_LOGIC, diff --git a/output/text/text.c b/output/text/text.c index ad3e91d0..29740656 100644 --- a/output/text/text.c +++ b/output/text/text.c @@ -26,7 +26,7 @@ #include "sigrok.h" #include "text.h" -void flush_linebufs(struct context *ctx, char *outbuf) +SR_PRIV void flush_linebufs(struct context *ctx, char *outbuf) { static int max_probename_len = 0; int len, i; @@ -63,7 +63,7 @@ void flush_linebufs(struct context *ctx, char *outbuf) memset(ctx->linebuf, 0, i * ctx->linebuf_len); } -int init(struct sr_output *o, int default_spl, enum outputmode mode) +SR_PRIV int init(struct sr_output *o, int default_spl, enum outputmode mode) { struct context *ctx; struct sr_probe *probe; @@ -136,8 +136,8 @@ int init(struct sr_output *o, int default_spl, enum outputmode mode) return SR_OK; } -int event(struct sr_output *o, int event_type, char **data_out, - uint64_t *length_out) +SR_PRIV int event(struct sr_output *o, int event_type, char **data_out, + uint64_t *length_out) { struct context *ctx; int outsize; diff --git a/output/text/text.h b/output/text/text.h index 9d5abd53..d23d22ef 100644 --- a/output/text/text.h +++ b/output/text/text.h @@ -46,22 +46,23 @@ struct context { enum outputmode mode; }; -void flush_linebufs(struct context *ctx, char *outbuf); -int init(struct sr_output *o, int default_spl, enum outputmode mode); -int event(struct sr_output *o, int event_type, char **data_out, - uint64_t *length_out); +SR_PRIV void flush_linebufs(struct context *ctx, char *outbuf); +SR_PRIV int init(struct sr_output *o, int default_spl, enum outputmode mode); +SR_PRIV int event(struct sr_output *o, int event_type, char **data_out, + uint64_t *length_out); +SR_PRIV int init_bits(struct sr_output *o); +SR_PRIV int data_bits(struct sr_output *o, const char *data_in, + uint64_t length_in, char **data_out, + uint64_t *length_out); -int init_bits(struct sr_output *o); -int data_bits(struct sr_output *o, const char *data_in, uint64_t length_in, - char **data_out, uint64_t *length_out); +SR_PRIV int init_hex(struct sr_output *o); +SR_PRIV int data_hex(struct sr_output *o, const char *data_in, + uint64_t length_in, char **data_out, uint64_t *length_out); -int init_hex(struct sr_output *o); -int data_hex(struct sr_output *o, const char *data_in, uint64_t length_in, - char **data_out, uint64_t *length_out); - -int init_ascii(struct sr_output *o); -int data_ascii(struct sr_output *o, const char *data_in, uint64_t length_in, - char **data_out, uint64_t *length_out); +SR_PRIV int init_ascii(struct sr_output *o); +SR_PRIV int data_ascii(struct sr_output *o, const char *data_in, + uint64_t length_in, char **data_out, + uint64_t *length_out); #endif