Various minor whitespace fixes.

This commit is contained in:
Uwe Hermann 2015-03-20 14:36:47 +01:00
parent e8be616955
commit 1beccaed46
41 changed files with 7 additions and 55 deletions

View File

@ -544,7 +544,6 @@ SR_API const char *sr_dev_inst_connid_get(const struct sr_dev_inst *sdi)
} }
#endif #endif
#ifdef HAVE_LIBUSB_1_0 #ifdef HAVE_LIBUSB_1_0
if ((!sdi->connection_id) && (sdi->inst_type == SR_INST_USB)) { if ((!sdi->connection_id) && (sdi->inst_type == SR_INST_USB)) {
/* connection_id isn't populated, let's do that here. */ /* connection_id isn't populated, let's do that here. */

View File

@ -783,7 +783,6 @@ static int convert_trigger(const struct sr_dev_inst *sdi)
} }
} }
return SR_OK; return SR_OK;
} }
@ -949,7 +948,6 @@ static int get_trigger_offset(uint8_t *samples, uint16_t last_sample,
return i & 0x7; return i & 0x7;
} }
/* /*
* Return the timestamp of "DRAM cluster". * Return the timestamp of "DRAM cluster".
*/ */

View File

@ -75,7 +75,6 @@ static struct pps_model models[] = {
}, },
}; };
SR_PRIV struct sr_dev_driver atten_pps3203_driver_info; SR_PRIV struct sr_dev_driver atten_pps3203_driver_info;
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx) static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)

View File

@ -164,4 +164,3 @@ SR_PRIV int atten_pps3xxx_receive_data(int fd, int revents, void *cb_data)
return TRUE; return TRUE;
} }

View File

@ -21,6 +21,7 @@
#include "protocol.h" #include "protocol.h"
#define SERIALCOMM "9600/8n1" #define SERIALCOMM "9600/8n1"
/* 23ms is the longest interval between tokens. */ /* 23ms is the longest interval between tokens. */
#define MAX_SCAN_TIME 25 * 1000 #define MAX_SCAN_TIME 25 * 1000
@ -66,8 +67,8 @@ static const char *data_sources[] = {
"Live", "Live",
"Memory", "Memory",
}; };
SR_PRIV struct sr_dev_driver cem_dt_885x_driver_info;
SR_PRIV struct sr_dev_driver cem_dt_885x_driver_info;
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx) static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{ {

View File

@ -404,7 +404,6 @@ SR_PRIV int cem_dt_885x_receive_data(int fd, int revents, void *cb_data)
return TRUE; return TRUE;
} }
static int wait_for_token(const struct sr_dev_inst *sdi, int8_t *tokens, int timeout) static int wait_for_token(const struct sr_dev_inst *sdi, int8_t *tokens, int timeout)
{ {
struct dev_context *devc; struct dev_context *devc;

View File

@ -183,7 +183,6 @@ SR_PRIV struct sr_dev_driver demo_driver_info;
static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data); static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data);
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx) static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{ {
return std_init(sr_ctx, di, LOG_PREFIX); return std_init(sr_ctx, di, LOG_PREFIX);

View File

@ -386,7 +386,6 @@ static void handle_qm_19x_data(const struct sr_dev_inst *sdi, char **tokens)
/* Don't have valid metadata yet. */ /* Don't have valid metadata yet. */
return; return;
if (devc->mq == SR_MQ_RESISTANCE && isnan(fvalue)) if (devc->mq == SR_MQ_RESISTANCE && isnan(fvalue))
fvalue = INFINITY; fvalue = INFINITY;
else if (devc->mq == SR_MQ_CONTINUITY) { else if (devc->mq == SR_MQ_CONTINUITY) {

View File

@ -58,7 +58,6 @@ static const uint32_t devopts_bd[] = {
SR_CONF_POWER_OFF | SR_CONF_GET | SR_CONF_SET, SR_CONF_POWER_OFF | SR_CONF_GET | SR_CONF_SET,
}; };
/* TODO: /* TODO:
* - For the 29S SR_CONF_ENERGYMETER, too. * - For the 29S SR_CONF_ENERGYMETER, too.
* - SR_CONF_PATTERN_MODE for some 2x devices * - SR_CONF_PATTERN_MODE for some 2x devices

View File

@ -602,7 +602,6 @@ static void decode_rs_2x_TR2(uint8_t rs, struct dev_context *devc)
devc->scale *= -1.0; devc->scale *= -1.0;
} }
/** /**
* Decode special chars (Metrahit 2x). * Decode special chars (Metrahit 2x).
* *
@ -1497,7 +1496,6 @@ SR_PRIV const char *gmc_model_str(enum model mcode)
} }
} }
/** @copydoc sr_dev_driver.config_set /** @copydoc sr_dev_driver.config_set
*/ */
SR_PRIV int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi, SR_PRIV int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,

View File

@ -62,7 +62,6 @@ static const char *data_sources[] = {
SR_PRIV struct sr_dev_driver kecheng_kc_330b_driver_info; SR_PRIV struct sr_dev_driver kecheng_kc_330b_driver_info;
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx) static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{ {
return std_init(sr_ctx, di, LOG_PREFIX); return std_init(sr_ctx, di, LOG_PREFIX);
@ -236,7 +235,6 @@ static int cleanup(const struct sr_dev_driver *di)
/* Can get called on an unused driver, doesn't matter. */ /* Can get called on an unused driver, doesn't matter. */
return SR_OK; return SR_OK;
ret = std_dev_clear(di, NULL); ret = std_dev_clear(di, NULL);
g_free(drvc); g_free(drvc);

View File

@ -152,7 +152,6 @@ static int cleanup(const struct sr_dev_driver *di)
/* Can get called on an unused driver, doesn't matter. */ /* Can get called on an unused driver, doesn't matter. */
return SR_OK; return SR_OK;
ret = std_dev_clear(di, NULL); ret = std_dev_clear(di, NULL);
g_free(drvc); g_free(drvc);
@ -390,7 +389,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
libusb_control_transfer(usb->devhdl, LIBUSB_REQUEST_TYPE_VENDOR, libusb_control_transfer(usb->devhdl, LIBUSB_REQUEST_TYPE_VENDOR,
0x02, 0x0001, 0x00, NULL, 0, 50); 0x02, 0x0001, 0x00, NULL, 0, 50);
/* Flush input. The F321 requires this. */ /* Flush input. The F321 requires this. */
while (libusb_bulk_transfer(usb->devhdl, LASCAR_EP_IN, resp, while (libusb_bulk_transfer(usb->devhdl, LASCAR_EP_IN, resp,
256, &ret, 5) == 0 && ret > 0) 256, &ret, 5) == 0 && ret > 0)

View File

@ -54,7 +54,6 @@ static const struct elusb_profile profiles[] = {
{ 0, NULL, 0 } { 0, NULL, 0 }
}; };
static libusb_device_handle *lascar_open(struct libusb_device *dev) static libusb_device_handle *lascar_open(struct libusb_device *dev)
{ {
libusb_device_handle *dev_hdl; libusb_device_handle *dev_hdl;

View File

@ -441,7 +441,6 @@ static GSList *do_scan(lps_modelid modelid, struct sr_dev_driver *drv, GSList *o
goto exit_err; goto exit_err;
} }
g_strstrip(buf); g_strstrip(buf);
verstr = buf + 4; verstr = buf + 4;
} }

View File

@ -131,7 +131,6 @@ static void process_line(struct sr_dev_inst *sdi)
devc->buflen = 0; devc->buflen = 0;
} }
SR_PRIV int motech_lps_30x_receive_data(int fd, int revents, void *cb_data) SR_PRIV int motech_lps_30x_receive_data(int fd, int revents, void *cb_data)
{ {
struct sr_dev_inst *sdi; struct sr_dev_inst *sdi;

View File

@ -321,7 +321,6 @@ SR_PRIV struct sr_dev_driver norma_dmm_driver_info = {
.priv = NULL, .priv = NULL,
}; };
SR_PRIV struct sr_dev_driver siemens_b102x_driver_info = { SR_PRIV struct sr_dev_driver siemens_b102x_driver_info = {
.name = "siemens-b102x", .name = "siemens-b102x",
.longname = "Siemens B102x DMMs", .longname = "Siemens B102x DMMs",

View File

@ -101,7 +101,6 @@ struct dev_context {
unsigned char *raw_sample_buf; unsigned char *raw_sample_buf;
}; };
SR_PRIV extern const char *ols_channel_names[NUM_CHANNELS + 1]; SR_PRIV extern const char *ols_channel_names[NUM_CHANNELS + 1];
SR_PRIV int send_shortcommand(struct sr_serial_dev_inst *serial, SR_PRIV int send_shortcommand(struct sr_serial_dev_inst *serial,

View File

@ -229,7 +229,6 @@ static int cleanup(const struct sr_dev_driver *di)
return dev_clear(di); return dev_clear(di);
} }
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi, static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg) const struct sr_channel_group *cg)
{ {
@ -469,7 +468,6 @@ static int dev_close(struct sr_dev_inst *sdi)
return ret; return ret;
} }
static int set_trigger(const struct sr_dev_inst *sdi, int stage) static int set_trigger(const struct sr_dev_inst *sdi, int stage)
{ {
struct dev_context *devc; struct dev_context *devc;
@ -706,8 +704,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi,
return SR_OK; return SR_OK;
} }
static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data) static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
{ {
struct dev_context *devc; struct dev_context *devc;

View File

@ -384,7 +384,6 @@ SR_PRIV int p_ols_set_samplerate(const struct sr_dev_inst *sdi,
return SR_OK; return SR_OK;
} }
SR_PRIV int p_ols_receive_data(int fd, int revents, void *cb_data) SR_PRIV int p_ols_receive_data(int fd, int revents, void *cb_data)
{ {
struct dev_context *devc; struct dev_context *devc;

View File

@ -36,7 +36,6 @@
#define FTDI_BUF_SIZE (16 * 1024) #define FTDI_BUF_SIZE (16 * 1024)
#define NUM_CHANNELS 32 #define NUM_CHANNELS 32
#define NUM_TRIGGER_STAGES 4 #define NUM_TRIGGER_STAGES 4
#define CLOCK_RATE SR_MHZ(100) #define CLOCK_RATE SR_MHZ(100)
@ -118,7 +117,6 @@ struct dev_context {
unsigned char *raw_sample_buf; unsigned char *raw_sample_buf;
}; };
SR_PRIV extern const char *p_ols_channel_names[NUM_CHANNELS + 1]; SR_PRIV extern const char *p_ols_channel_names[NUM_CHANNELS + 1];
SR_PRIV int write_shortcommand(struct dev_context *devc, uint8_t command); SR_PRIV int write_shortcommand(struct dev_context *devc, uint8_t command);
SR_PRIV int write_longcommand(struct dev_context *devc, uint8_t command, uint8_t *data); SR_PRIV int write_longcommand(struct dev_context *devc, uint8_t command, uint8_t *data);

View File

@ -302,7 +302,6 @@ struct scpi_command philips_pm2800_cmd[] = {
{ SCPI_CMD_GET_OVER_CURRENT_PROTECTION_ACTIVE, ":SOUR:CURR:PROT:TRIP?" }, { SCPI_CMD_GET_OVER_CURRENT_PROTECTION_ACTIVE, ":SOUR:CURR:PROT:TRIP?" },
}; };
SR_PRIV const struct scpi_pps pps_profiles[] = { SR_PRIV const struct scpi_pps pps_profiles[] = {
/* HP 6632B */ /* HP 6632B */
{ "HP", "6632B", 0, { "HP", "6632B", 0,
@ -350,5 +349,5 @@ SR_PRIV const struct scpi_pps pps_profiles[] = {
philips_pm2800_probe_channels, philips_pm2800_probe_channels,
}, },
}; };
SR_PRIV unsigned int num_pps_profiles = ARRAY_SIZE(pps_profiles);
SR_PRIV unsigned int num_pps_profiles = ARRAY_SIZE(pps_profiles);

View File

@ -51,7 +51,6 @@ SR_PRIV int testo_set_serial_params(struct sr_usb_dev_inst *usb)
return SR_OK; return SR_OK;
} }
/* Due to the modular nature of the Testo hardware, you can't assume /* Due to the modular nature of the Testo hardware, you can't assume
* which measurements the device will supply. Fetch a single result * which measurements the device will supply. Fetch a single result
* set synchronously to see which measurements it has. */ * set synchronously to see which measurements it has. */
@ -289,4 +288,3 @@ SR_PRIV void testo_receive_packet(const struct sr_dev_inst *sdi)
g_slist_free(analog.channels); g_slist_free(analog.channels);
} }
} }

View File

@ -80,4 +80,5 @@ SR_PRIV int testo_request_packet(const struct sr_dev_inst *sdi);
SR_PRIV gboolean testo_check_packet_prefix(unsigned char *buf, int len); SR_PRIV gboolean testo_check_packet_prefix(unsigned char *buf, int len);
SR_PRIV uint16_t crc16_mcrf4xx(uint16_t crc, uint8_t *data, size_t len); SR_PRIV uint16_t crc16_mcrf4xx(uint16_t crc, uint8_t *data, size_t len);
SR_PRIV void testo_receive_packet(const struct sr_dev_inst *sdi); SR_PRIV void testo_receive_packet(const struct sr_dev_inst *sdi);
#endif #endif

View File

@ -41,7 +41,6 @@ static const char *data_sources[] = {
SR_PRIV struct sr_dev_driver uni_t_ut32x_driver_info; SR_PRIV struct sr_dev_driver uni_t_ut32x_driver_info;
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx) static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{ {
return std_init(sr_ctx, di, LOG_PREFIX); return std_init(sr_ctx, di, LOG_PREFIX);
@ -182,7 +181,6 @@ static int cleanup(const struct sr_dev_driver *di)
/* Can get called on an unused driver, doesn't matter. */ /* Can get called on an unused driver, doesn't matter. */
return SR_OK; return SR_OK;
ret = std_dev_clear(di, NULL); ret = std_dev_clear(di, NULL);
g_free(drvc); g_free(drvc);

View File

@ -238,4 +238,3 @@ SR_PRIV int uni_t_ut32x_handle_events(int fd, int revents, void *cb_data)
return TRUE; return TRUE;
} }

View File

@ -37,6 +37,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data);
static const uint32_t drvopts[] = { static const uint32_t drvopts[] = {
SR_CONF_MULTIMETER, SR_CONF_MULTIMETER,
}; };
static const uint32_t scanopts[] = { static const uint32_t scanopts[] = {
SR_CONF_CONN, SR_CONF_CONN,
}; };
@ -195,7 +196,6 @@ static int cleanup(const struct sr_dev_driver *di)
/* Can get called on an unused driver, doesn't matter. */ /* Can get called on an unused driver, doesn't matter. */
return SR_OK; return SR_OK;
ret = std_dev_clear(di, NULL); ret = std_dev_clear(di, NULL);
g_free(drvc); g_free(drvc);

View File

@ -41,7 +41,6 @@
#define DLM_DIVISION_FOR_WORD_FORMAT (3200) #define DLM_DIVISION_FOR_WORD_FORMAT (3200)
#define DLM_DIVISION_FOR_BYTE_FORMAT (12.5) #define DLM_DIVISION_FOR_BYTE_FORMAT (12.5)
enum trigger_slopes { enum trigger_slopes {
SLOPE_POSITIVE, SLOPE_POSITIVE,
SLOPE_NEGATIVE SLOPE_NEGATIVE

View File

@ -253,7 +253,6 @@ int dlm_digital_pod_state_set(struct sr_scpi_dev_inst *scpi, int pod,
return sr_scpi_send(scpi, ":LOGIC:MODE OFF"); return sr_scpi_send(scpi, ":LOGIC:MODE OFF");
} }
int dlm_response_headers_set(struct sr_scpi_dev_inst *scpi, int dlm_response_headers_set(struct sr_scpi_dev_inst *scpi,
const gboolean value) const gboolean value)
{ {
@ -268,7 +267,6 @@ int dlm_acquisition_stop(struct sr_scpi_dev_inst *scpi)
return sr_scpi_send(scpi, ":STOP"); return sr_scpi_send(scpi, ":STOP");
} }
int dlm_acq_length_get(struct sr_scpi_dev_inst *scpi, int dlm_acq_length_get(struct sr_scpi_dev_inst *scpi,
uint32_t *response) uint32_t *response)
{ {

View File

@ -590,5 +590,4 @@ SR_API void sr_input_free(const struct sr_input *in)
g_free((gpointer)in); g_free((gpointer)in);
} }
/** @} */ /** @} */

View File

@ -87,7 +87,6 @@ struct vcd_channel {
gchar *identifier; gchar *identifier;
}; };
/* /*
* Reads a single VCD section from input file and parses it to name/contents. * Reads a single VCD section from input file and parses it to name/contents.
* e.g. $timescale 1ps $end => "timescale" "1ps" * e.g. $timescale 1ps $end => "timescale" "1ps"

View File

@ -73,7 +73,6 @@ static int parse_wav_header(GString *buf, struct context *inc)
return SR_ERR_DATA; return SR_ERR_DATA;
} }
if (fmt_code == WAVE_FORMAT_PCM) { if (fmt_code == WAVE_FORMAT_PCM) {
} else if (fmt_code == WAVE_FORMAT_IEEE_FLOAT) { } else if (fmt_code == WAVE_FORMAT_IEEE_FLOAT) {
if (unitsize != 4) { if (unitsize != 4) {
@ -370,4 +369,3 @@ SR_PRIV struct sr_input_module input_wav = {
.receive = receive, .receive = receive,
.end = end, .end = end,
}; };

View File

@ -305,7 +305,6 @@ static int send_config_update_key(struct sr_dev_inst *sdi, uint32_t key,
sr_config_free(cfg); sr_config_free(cfg);
return ret; return ret;
} }
/* /*
@ -467,7 +466,7 @@ static int parse_mq(const uint8_t *pkt, int is_secondary, int is_parallel)
switch (is_secondary << 8 | buf[0]) { switch (is_secondary << 8 | buf[0]) {
case 0x001: case 0x001:
return is_parallel ? return is_parallel ?
SR_MQ_PARALLEL_INDUCTANCE : SR_MQ_SERIES_INDUCTANCE; SR_MQ_PARALLEL_INDUCTANCE : SR_MQ_SERIES_INDUCTANCE;
case 0x002: case 0x002:
return is_parallel ? return is_parallel ?
@ -607,7 +606,6 @@ static unsigned int parse_model(const uint8_t *pkt)
return MODEL_PAR; return MODEL_PAR;
else else
return MODEL_SER; return MODEL_SER;
} }
static gboolean packet_valid(const uint8_t *pkt) static gboolean packet_valid(const uint8_t *pkt)

View File

@ -258,5 +258,3 @@ SR_PRIV struct sr_output_module output_ascii = {
.receive = receive, .receive = receive,
.cleanup = cleanup, .cleanup = cleanup,
}; };

View File

@ -43,7 +43,6 @@ static const char *gnuplot_header2 = "\
# -----------------------------------------------------------------------------\n\ # -----------------------------------------------------------------------------\n\
# 0\t\tSample counter (for internal gnuplot purposes)\n"; # 0\t\tSample counter (for internal gnuplot purposes)\n";
static int init(struct sr_output *o, GHashTable *options) static int init(struct sr_output *o, GHashTable *options)
{ {
struct context *ctx; struct context *ctx;

View File

@ -258,4 +258,3 @@ SR_PRIV struct sr_output_module output_hex = {
.receive = receive, .receive = receive,
.cleanup = cleanup, .cleanup = cleanup,
}; };

View File

@ -318,4 +318,3 @@ SR_PRIV struct sr_output_module output_srzip = {
.receive = receive, .receive = receive,
.cleanup = cleanup, .cleanup = cleanup,
}; };

View File

@ -357,4 +357,3 @@ SR_PRIV struct sr_output_module output_wav = {
.receive = receive, .receive = receive,
.cleanup = cleanup, .cleanup = cleanup,
}; };

View File

@ -92,7 +92,6 @@ enum {
#define EOM 0x01 #define EOM 0x01
#define TERM_CHAR_ENABLED 0x02 #define TERM_CHAR_ENABLED 0x02
static GSList *scpi_usbtmc_libusb_scan(struct drv_context *drvc) static GSList *scpi_usbtmc_libusb_scan(struct drv_context *drvc)
{ {
struct libusb_device **devlist; struct libusb_device **devlist;

View File

@ -447,6 +447,7 @@ static int verify_trigger(struct sr_trigger *trigger)
return SR_OK; return SR_OK;
} }
/** /**
* Start a session. * Start a session.
* *

View File

@ -49,7 +49,6 @@
extern SR_PRIV struct sr_dev_driver session_driver; extern SR_PRIV struct sr_dev_driver session_driver;
static int session_driver_initialized = 0; static int session_driver_initialized = 0;
/** @private */ /** @private */
SR_PRIV int sr_sessionfile_check(const char *filename) SR_PRIV int sr_sessionfile_check(const char *filename)
{ {

View File

@ -219,4 +219,3 @@ SR_PRIV int soft_trigger_logic_check(struct soft_trigger_logic *stl,
return offset; return offset;
} }