change a bunch of functions from SR_PRIV to static

None of those functions are called across compilation units.
This commit is contained in:
Aurelien Jacobs 2014-01-14 23:16:55 +01:00
parent 8162cad7e0
commit d87c1766f2
9 changed files with 38 additions and 38 deletions

View File

@ -440,7 +440,7 @@ static int wait_for_token(const struct sr_dev_inst *sdi, int8_t *tokens, int tim
/* cmd is the command to send, tokens are the tokens that denote the state
* which the command affects. The first token is the desired state. */
SR_PRIV int cem_dt_885x_toggle(const struct sr_dev_inst *sdi, uint8_t cmd,
static int cem_dt_885x_toggle(const struct sr_dev_inst *sdi, uint8_t cmd,
int8_t *tokens, int timeout)
{
struct dev_context *devc;

View File

@ -47,7 +47,7 @@ static int scpi_serial_dev_inst_new(void *priv, const char *resource,
return SR_OK;
}
SR_PRIV int scpi_serial_open(void *priv)
static int scpi_serial_open(void *priv)
{
struct scpi_serial *sscpi = priv;
struct sr_serial_dev_inst *serial = sscpi->serial;
@ -61,7 +61,7 @@ SR_PRIV int scpi_serial_open(void *priv)
return SR_OK;
}
SR_PRIV int scpi_serial_source_add(void *priv, int events, int timeout,
static int scpi_serial_source_add(void *priv, int events, int timeout,
sr_receive_data_callback_t cb, void *cb_data)
{
struct scpi_serial *sscpi = priv;
@ -70,7 +70,7 @@ SR_PRIV int scpi_serial_source_add(void *priv, int events, int timeout,
return serial_source_add(serial, events, timeout, cb, cb_data);
}
SR_PRIV int scpi_serial_source_remove(void *priv)
static int scpi_serial_source_remove(void *priv)
{
struct scpi_serial *sscpi = priv;
struct sr_serial_dev_inst *serial = sscpi->serial;
@ -78,7 +78,7 @@ SR_PRIV int scpi_serial_source_remove(void *priv)
return serial_source_remove(serial);
}
SR_PRIV int scpi_serial_send(void *priv, const char *command)
static int scpi_serial_send(void *priv, const char *command)
{
int len, result, written;
gchar *terminated_command;
@ -105,7 +105,7 @@ SR_PRIV int scpi_serial_send(void *priv, const char *command)
return SR_OK;
}
SR_PRIV int scpi_serial_receive(void *priv, char **scpi_response)
static int scpi_serial_receive(void *priv, char **scpi_response)
{
int len, ret;
char buf[256];
@ -159,7 +159,7 @@ SR_PRIV int scpi_serial_receive(void *priv, char **scpi_response)
return ret;
}
SR_PRIV int scpi_serial_read_begin(void *priv)
static int scpi_serial_read_begin(void *priv)
{
struct scpi_serial *sscpi = priv;
@ -168,7 +168,7 @@ SR_PRIV int scpi_serial_read_begin(void *priv)
return SR_OK;
}
SR_PRIV int scpi_serial_read_data(void *priv, char *buf, int maxlen)
static int scpi_serial_read_data(void *priv, char *buf, int maxlen)
{
struct scpi_serial *sscpi = priv;
int ret;
@ -187,7 +187,7 @@ SR_PRIV int scpi_serial_read_data(void *priv, char *buf, int maxlen)
return ret;
}
SR_PRIV int scpi_serial_read_complete(void *priv)
static int scpi_serial_read_complete(void *priv)
{
struct scpi_serial *sscpi = priv;

View File

@ -71,7 +71,7 @@ static int scpi_tcp_dev_inst_new(void *priv, const char *resource,
return SR_OK;
}
SR_PRIV int scpi_tcp_open(void *priv)
static int scpi_tcp_open(void *priv)
{
struct scpi_tcp *tcp = priv;
struct addrinfo hints;
@ -114,7 +114,7 @@ SR_PRIV int scpi_tcp_open(void *priv)
return SR_OK;
}
SR_PRIV int scpi_tcp_source_add(void *priv, int events, int timeout,
static int scpi_tcp_source_add(void *priv, int events, int timeout,
sr_receive_data_callback_t cb, void *cb_data)
{
struct scpi_tcp *tcp = priv;
@ -122,14 +122,14 @@ SR_PRIV int scpi_tcp_source_add(void *priv, int events, int timeout,
return sr_source_add(tcp->socket, events, timeout, cb, cb_data);
}
SR_PRIV int scpi_tcp_source_remove(void *priv)
static int scpi_tcp_source_remove(void *priv)
{
struct scpi_tcp *tcp = priv;
return sr_source_remove(tcp->socket);
}
SR_PRIV int scpi_tcp_send(void *priv, const char *command)
static int scpi_tcp_send(void *priv, const char *command)
{
struct scpi_tcp *tcp = priv;
int len, out;
@ -155,7 +155,7 @@ SR_PRIV int scpi_tcp_send(void *priv, const char *command)
return SR_OK;
}
SR_PRIV int scpi_tcp_read_begin(void *priv)
static int scpi_tcp_read_begin(void *priv)
{
struct scpi_tcp *tcp = priv;
@ -165,7 +165,7 @@ SR_PRIV int scpi_tcp_read_begin(void *priv)
return SR_OK;
}
SR_PRIV int scpi_tcp_raw_read_data(void *priv, char *buf, int maxlen)
static int scpi_tcp_raw_read_data(void *priv, char *buf, int maxlen)
{
struct scpi_tcp *tcp = priv;
int len;
@ -184,7 +184,7 @@ SR_PRIV int scpi_tcp_raw_read_data(void *priv, char *buf, int maxlen)
return len;
}
SR_PRIV int scpi_tcp_rigol_read_data(void *priv, char *buf, int maxlen)
static int scpi_tcp_rigol_read_data(void *priv, char *buf, int maxlen)
{
struct scpi_tcp *tcp = priv;
int len;
@ -220,7 +220,7 @@ SR_PRIV int scpi_tcp_rigol_read_data(void *priv, char *buf, int maxlen)
return len;
}
SR_PRIV int scpi_tcp_read_complete(void *priv)
static int scpi_tcp_read_complete(void *priv)
{
struct scpi_tcp *tcp = priv;
@ -228,7 +228,7 @@ SR_PRIV int scpi_tcp_read_complete(void *priv)
tcp->response_bytes_read >= tcp->response_length);
}
SR_PRIV int scpi_tcp_close(void *priv)
static int scpi_tcp_close(void *priv)
{
struct scpi_tcp *tcp = priv;
@ -238,7 +238,7 @@ SR_PRIV int scpi_tcp_close(void *priv)
return SR_OK;
}
SR_PRIV void scpi_tcp_free(void *priv)
static void scpi_tcp_free(void *priv)
{
struct scpi_tcp *tcp = priv;

View File

@ -51,7 +51,7 @@ static int scpi_usbtmc_dev_inst_new(void *priv, const char *resource,
return SR_OK;
}
SR_PRIV int scpi_usbtmc_open(void *priv)
static int scpi_usbtmc_open(void *priv)
{
struct usbtmc_scpi *uscpi = priv;
struct sr_usbtmc_dev_inst *usbtmc = uscpi->usbtmc;
@ -62,7 +62,7 @@ SR_PRIV int scpi_usbtmc_open(void *priv)
return SR_OK;
}
SR_PRIV int scpi_usbtmc_source_add(void *priv, int events, int timeout,
static int scpi_usbtmc_source_add(void *priv, int events, int timeout,
sr_receive_data_callback_t cb, void *cb_data)
{
struct usbtmc_scpi *uscpi = priv;
@ -71,7 +71,7 @@ SR_PRIV int scpi_usbtmc_source_add(void *priv, int events, int timeout,
return sr_source_add(usbtmc->fd, events, timeout, cb, cb_data);
}
SR_PRIV int scpi_usbtmc_source_remove(void *priv)
static int scpi_usbtmc_source_remove(void *priv)
{
struct usbtmc_scpi *uscpi = priv;
struct sr_usbtmc_dev_inst *usbtmc = uscpi->usbtmc;
@ -79,7 +79,7 @@ SR_PRIV int scpi_usbtmc_source_remove(void *priv)
return sr_source_remove(usbtmc->fd);
}
SR_PRIV int scpi_usbtmc_send(void *priv, const char *command)
static int scpi_usbtmc_send(void *priv, const char *command)
{
struct usbtmc_scpi *uscpi = priv;
struct sr_usbtmc_dev_inst *usbtmc = uscpi->usbtmc;
@ -103,7 +103,7 @@ SR_PRIV int scpi_usbtmc_send(void *priv, const char *command)
return SR_OK;
}
SR_PRIV int scpi_usbtmc_read_begin(void *priv)
static int scpi_usbtmc_read_begin(void *priv)
{
struct usbtmc_scpi *uscpi = priv;
struct sr_usbtmc_dev_inst *usbtmc = uscpi->usbtmc;
@ -122,7 +122,7 @@ SR_PRIV int scpi_usbtmc_read_begin(void *priv)
return SR_OK;
}
SR_PRIV int scpi_usbtmc_read_data(void *priv, char *buf, int maxlen)
static int scpi_usbtmc_read_data(void *priv, char *buf, int maxlen)
{
struct usbtmc_scpi *uscpi = priv;
int read_length;
@ -147,7 +147,7 @@ SR_PRIV int scpi_usbtmc_read_data(void *priv, char *buf, int maxlen)
return read_length;
}
SR_PRIV int scpi_usbtmc_read_complete(void *priv)
static int scpi_usbtmc_read_complete(void *priv)
{
struct usbtmc_scpi *uscpi = priv;
@ -158,7 +158,7 @@ SR_PRIV int scpi_usbtmc_read_complete(void *priv)
return (uscpi->response_bytes_read >= uscpi->response_length);
}
SR_PRIV int scpi_usbtmc_close(void *priv)
static int scpi_usbtmc_close(void *priv)
{
struct usbtmc_scpi *uscpi = priv;

View File

@ -426,7 +426,7 @@ SR_PRIV int hmo_scope_state_get(struct sr_dev_inst *sdi)
return SR_OK;
}
SR_PRIV struct scope_state *scope_state_new(struct scope_config *config)
static struct scope_state *scope_state_new(struct scope_config *config)
{
struct scope_state *state;

View File

@ -66,7 +66,7 @@ static int send_bulkcmd(const struct sr_dev_inst *sdi, uint8_t *cmdstring, int c
return SR_OK;
}
SR_PRIV int dso_getmps(libusb_device *dev)
static int dso_getmps(libusb_device *dev)
{
struct libusb_device_descriptor des;
struct libusb_config_descriptor *conf_dsc;
@ -256,7 +256,7 @@ static int get_channel_offsets(const struct sr_dev_inst *sdi)
return SR_OK;
}
SR_PRIV int dso_set_trigger_samplerate(const struct sr_dev_inst *sdi)
static int dso_set_trigger_samplerate(const struct sr_dev_inst *sdi)
{
struct dev_context *devc;
struct sr_usb_dev_inst *usb;
@ -373,7 +373,7 @@ SR_PRIV int dso_set_trigger_samplerate(const struct sr_dev_inst *sdi)
return SR_OK;
}
SR_PRIV int dso_set_filters(const struct sr_dev_inst *sdi)
static int dso_set_filters(const struct sr_dev_inst *sdi)
{
struct dev_context *devc;
struct sr_usb_dev_inst *usb;
@ -415,7 +415,7 @@ SR_PRIV int dso_set_filters(const struct sr_dev_inst *sdi)
return SR_OK;
}
SR_PRIV int dso_set_voltage(const struct sr_dev_inst *sdi)
static int dso_set_voltage(const struct sr_dev_inst *sdi)
{
struct dev_context *devc;
struct sr_usb_dev_inst *usb;
@ -485,7 +485,7 @@ SR_PRIV int dso_set_voltage(const struct sr_dev_inst *sdi)
return SR_OK;
}
SR_PRIV int dso_set_relays(const struct sr_dev_inst *sdi)
static int dso_set_relays(const struct sr_dev_inst *sdi)
{
struct dev_context *devc;
struct sr_usb_dev_inst *usb;
@ -542,7 +542,7 @@ SR_PRIV int dso_set_relays(const struct sr_dev_inst *sdi)
return SR_OK;
}
SR_PRIV int dso_set_voffsets(const struct sr_dev_inst *sdi)
static int dso_set_voffsets(const struct sr_dev_inst *sdi)
{
struct dev_context *devc;
struct sr_usb_dev_inst *usb;

View File

@ -337,7 +337,7 @@ SR_PRIV int kecheng_kc_330b_log_info_get(const struct sr_dev_inst *sdi,
return SR_OK;
}
SR_PRIV int kecheng_kc_330b_log_date_time_get(const struct sr_dev_inst *sdi,
static int kecheng_kc_330b_log_date_time_get(const struct sr_dev_inst *sdi,
gboolean *tmp)
{

View File

@ -55,7 +55,7 @@ static const struct elusb_profile profiles[] = {
};
SR_PRIV libusb_device_handle *lascar_open(struct libusb_device *dev)
static libusb_device_handle *lascar_open(struct libusb_device *dev)
{
libusb_device_handle *dev_hdl;
int ret;
@ -202,7 +202,7 @@ cleanup:
return *configlen ? SR_OK : SR_ERR;
}
SR_PRIV int lascar_save_config(libusb_device_handle *dev_hdl,
static int lascar_save_config(libusb_device_handle *dev_hdl,
unsigned char *config, int configlen)
{
struct drv_context *drvc;

View File

@ -30,7 +30,7 @@ SR_PRIV unsigned int get_memory_size(int type)
return 0;
}
SR_PRIV int clz(unsigned int x)
static int clz(unsigned int x)
{
int n = 0;
if (x == 0)