input/output formats: Explicit struct member names.
This makes it immediately clear what an entry is supposed to be, no need to look it up in some header file.
This commit is contained in:
parent
f4314d7e06
commit
d494a4aa9d
|
@ -99,9 +99,9 @@ static int loadfile(struct sr_input *in, const char *filename)
|
||||||
}
|
}
|
||||||
|
|
||||||
struct sr_input_format input_binary = {
|
struct sr_input_format input_binary = {
|
||||||
"binary",
|
.extension = "binary",
|
||||||
"Raw binary",
|
.description = "Raw binary",
|
||||||
format_match,
|
.format_match = format_match,
|
||||||
init,
|
.init = init,
|
||||||
loadfile,
|
.loadfile = loadfile,
|
||||||
};
|
};
|
||||||
|
|
|
@ -439,29 +439,29 @@ static int data_ascii(struct sr_output *o, const char *data_in,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct sr_output_format output_analog_bits = {
|
struct sr_output_format output_analog_bits = {
|
||||||
"analog_bits",
|
.extension = "analog_bits",
|
||||||
"Bits (takes argument, default 64)",
|
.description = "Bits (takes argument, default 64)",
|
||||||
SR_DF_ANALOG,
|
.df_type = SR_DF_ANALOG,
|
||||||
init_bits,
|
.init = init_bits,
|
||||||
data_bits,
|
.data = data_bits,
|
||||||
event,
|
.event = event,
|
||||||
};
|
};
|
||||||
#if 0
|
#if 0
|
||||||
struct sr_output_format output_analog_hex = {
|
struct sr_output_format output_analog_hex = {
|
||||||
"analog_hex",
|
.extension = "analog_hex",
|
||||||
"Hexadecimal (takes argument, default 192)",
|
.description = "Hexadecimal (takes argument, default 192)",
|
||||||
SR_DF_ANALOG,
|
.df_type = SR_DF_ANALOG,
|
||||||
init_hex,
|
.init = init_hex,
|
||||||
data_hex,
|
.data = data_hex,
|
||||||
event,
|
.event = event,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct sr_output_format output_analog_ascii = {
|
struct sr_output_format output_analog_ascii = {
|
||||||
"analog_ascii",
|
.extension = "analog_ascii",
|
||||||
"ASCII (takes argument, default 74)",
|
.description = "ASCII (takes argument, default 74)",
|
||||||
SR_DF_ANALOG,
|
.df_type = SR_DF_ANALOG,
|
||||||
init_ascii,
|
.init = init_ascii,
|
||||||
data_ascii,
|
.data = data_ascii,
|
||||||
event,
|
.event = event,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -43,10 +43,10 @@ static int data(struct sr_output *o, const char *data_in, uint64_t length_in,
|
||||||
}
|
}
|
||||||
|
|
||||||
struct sr_output_format output_binary = {
|
struct sr_output_format output_binary = {
|
||||||
"binary",
|
.extension = "binary",
|
||||||
"Raw binary",
|
.description = "Raw binary",
|
||||||
SR_DF_LOGIC,
|
.df_type = SR_DF_LOGIC,
|
||||||
NULL,
|
.init = NULL,
|
||||||
data,
|
.data = data,
|
||||||
NULL,
|
.event = NULL,
|
||||||
};
|
};
|
||||||
|
|
|
@ -194,12 +194,12 @@ static int data(struct sr_output *o, const char *data_in, uint64_t length_in,
|
||||||
}
|
}
|
||||||
|
|
||||||
struct sr_output_format output_gnuplot = {
|
struct sr_output_format output_gnuplot = {
|
||||||
"gnuplot",
|
.extension = "gnuplot",
|
||||||
"Gnuplot",
|
.description = "Gnuplot",
|
||||||
SR_DF_LOGIC,
|
.df_type = SR_DF_LOGIC,
|
||||||
init,
|
.init = init,
|
||||||
data,
|
.data = data,
|
||||||
event,
|
.event = event,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Temporarily disabled. */
|
/* Temporarily disabled. */
|
||||||
|
@ -340,11 +340,11 @@ static int analog_data(struct sr_output *o, char *data_in, uint64_t length_in,
|
||||||
}
|
}
|
||||||
|
|
||||||
struct sr_output_format output_analog_gnuplot = {
|
struct sr_output_format output_analog_gnuplot = {
|
||||||
"analog_gnuplot",
|
.extension = "analog_gnuplot",
|
||||||
"Gnuplot analog",
|
.description = "Gnuplot analog",
|
||||||
SR_DF_ANALOG,
|
.df_type = SR_DF_ANALOG,
|
||||||
analog_init,
|
.init = analog_init,
|
||||||
analog_data,
|
.data = analog_data,
|
||||||
event,
|
.event = event,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -124,10 +124,10 @@ static int data(struct sr_output *o, const char *data_in, uint64_t length_in,
|
||||||
}
|
}
|
||||||
|
|
||||||
struct sr_output_format output_ols = {
|
struct sr_output_format output_ols = {
|
||||||
"ols",
|
.extension = "ols",
|
||||||
"OpenBench Logic Sniffer",
|
.description = "OpenBench Logic Sniffer",
|
||||||
SR_DF_LOGIC,
|
.df_type = SR_DF_LOGIC,
|
||||||
init,
|
.init = init,
|
||||||
data,
|
.data = data,
|
||||||
event,
|
.event = event,
|
||||||
};
|
};
|
||||||
|
|
|
@ -38,10 +38,10 @@ static int event(struct sr_output *o, int event_type, char **data_out,
|
||||||
}
|
}
|
||||||
|
|
||||||
struct sr_output_format output_foo = {
|
struct sr_output_format output_foo = {
|
||||||
"foo",
|
.extension = "foo",
|
||||||
"The foo format",
|
.description = "The foo format",
|
||||||
SR_DF_LOGIC,
|
.df_type = SR_DF_LOGIC,
|
||||||
init,
|
.init = init,
|
||||||
data,
|
.data = data,
|
||||||
event,
|
.event = event,
|
||||||
};
|
};
|
||||||
|
|
|
@ -213,10 +213,10 @@ static int data(struct sr_output *o, const char *data_in, uint64_t length_in,
|
||||||
}
|
}
|
||||||
|
|
||||||
struct sr_output_format output_vcd = {
|
struct sr_output_format output_vcd = {
|
||||||
"vcd",
|
.extension = "vcd",
|
||||||
"Value Change Dump (VCD)",
|
.description = "Value Change Dump (VCD)",
|
||||||
SR_DF_LOGIC,
|
.df_type = SR_DF_LOGIC,
|
||||||
init,
|
.init = init,
|
||||||
data,
|
.data = data,
|
||||||
event,
|
.event = event,
|
||||||
};
|
};
|
||||||
|
|
|
@ -114,10 +114,10 @@ int data_ascii(struct sr_output *o, const char *data_in, uint64_t length_in,
|
||||||
}
|
}
|
||||||
|
|
||||||
struct sr_output_format output_text_ascii = {
|
struct sr_output_format output_text_ascii = {
|
||||||
"ascii",
|
.extension = "ascii",
|
||||||
"ASCII (takes argument, default 74)",
|
.description = "ASCII (takes argument, default 74)",
|
||||||
SR_DF_LOGIC,
|
.df_type = SR_DF_LOGIC,
|
||||||
init_ascii,
|
.init = init_ascii,
|
||||||
data_ascii,
|
.data = data_ascii,
|
||||||
event,
|
.event = event,
|
||||||
};
|
};
|
||||||
|
|
|
@ -101,10 +101,10 @@ int data_bits(struct sr_output *o, const char *data_in, uint64_t length_in,
|
||||||
}
|
}
|
||||||
|
|
||||||
struct sr_output_format output_text_bits = {
|
struct sr_output_format output_text_bits = {
|
||||||
"bits",
|
.extension = "bits",
|
||||||
"Bits (takes argument, default 64)",
|
.description = "Bits (takes argument, default 64)",
|
||||||
SR_DF_LOGIC,
|
.df_type = SR_DF_LOGIC,
|
||||||
init_bits,
|
.init = init_bits,
|
||||||
data_bits,
|
.data = data_bits,
|
||||||
event,
|
.event = event,
|
||||||
};
|
};
|
||||||
|
|
|
@ -90,10 +90,10 @@ int data_hex(struct sr_output *o, const char *data_in, uint64_t length_in,
|
||||||
}
|
}
|
||||||
|
|
||||||
struct sr_output_format output_text_hex = {
|
struct sr_output_format output_text_hex = {
|
||||||
"hex",
|
.extension = "hex",
|
||||||
"Hexadecimal (takes argument, default 192)",
|
.description = "Hexadecimal (takes argument, default 192)",
|
||||||
SR_DF_LOGIC,
|
.df_type = SR_DF_LOGIC,
|
||||||
init_hex,
|
.init = init_hex,
|
||||||
data_hex,
|
.data = data_hex,
|
||||||
event,
|
.event = event,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue