From: Uwe Hermann Date: Mon, 23 Mar 2015 19:18:39 +0000 (+0100) Subject: Various #include file cosmetic fixes. X-Git-Tag: libsigrok-0.4.0~562 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=515ab0889ebde4b373d620044a1a98da37153056;p=libsigrok.git Various #include file cosmetic fixes. Generally include system headers before local headers, unless there's a technical reason to use another order. --- diff --git a/src/hardware/agilent-dmm/sched.c b/src/hardware/agilent-dmm/sched.c index 56218051..d1b76566 100644 --- a/src/hardware/agilent-dmm/sched.c +++ b/src/hardware/agilent-dmm/sched.c @@ -18,13 +18,13 @@ */ #include -#include "libsigrok.h" -#include "libsigrok-internal.h" -#include "agilent-dmm.h" #include #include #include #include +#include "libsigrok.h" +#include "libsigrok-internal.h" +#include "agilent-dmm.h" static void dispatch(const struct sr_dev_inst *sdi) { diff --git a/src/hardware/baylibre-acme/gpio.c b/src/hardware/baylibre-acme/gpio.c index 7af4ebf5..fb5d298c 100644 --- a/src/hardware/baylibre-acme/gpio.c +++ b/src/hardware/baylibre-acme/gpio.c @@ -17,15 +17,15 @@ * along with this program. If not, see . */ -#include "libsigrok.h" -#include "libsigrok-internal.h" -#include "gpio.h" #include #include #include #include #include #include +#include "libsigrok.h" +#include "libsigrok-internal.h" +#include "gpio.h" #define LOG_PREFIX "gpio" diff --git a/src/hardware/beaglelogic/beaglelogic.h b/src/hardware/beaglelogic/beaglelogic.h index 78363c1c..9015c610 100644 --- a/src/hardware/beaglelogic/beaglelogic.h +++ b/src/hardware/beaglelogic/beaglelogic.h @@ -21,14 +21,11 @@ #define BEAGLELOGIC_H_ #include - #include #include #include #include - #include - #include /* BeagleLogic device node name */ diff --git a/src/hardware/beaglelogic/protocol.c b/src/hardware/beaglelogic/protocol.c index a0a784e8..a07bb203 100644 --- a/src/hardware/beaglelogic/protocol.c +++ b/src/hardware/beaglelogic/protocol.c @@ -17,11 +17,11 @@ * along with this program. If not, see . */ -#include "protocol.h" #include #include #include #include +#include "protocol.h" /* Define data packet size independent of packet (bufunitsize bytes) size * from the BeagleLogic kernel module */ diff --git a/src/hardware/colead-slm/api.c b/src/hardware/colead-slm/api.c index 62f4dc0e..a6044401 100644 --- a/src/hardware/colead-slm/api.c +++ b/src/hardware/colead-slm/api.c @@ -18,14 +18,14 @@ */ #include -#include "libsigrok.h" -#include "libsigrok-internal.h" -#include "protocol.h" #include #include #include #include #include +#include "libsigrok.h" +#include "libsigrok-internal.h" +#include "protocol.h" /* The Colead SL-5868P uses this. */ #define SERIALCOMM "2400/8n1" diff --git a/src/hardware/colead-slm/protocol.c b/src/hardware/colead-slm/protocol.c index d68e8f50..01e748fb 100644 --- a/src/hardware/colead-slm/protocol.c +++ b/src/hardware/colead-slm/protocol.c @@ -19,11 +19,11 @@ #include #include +#include +#include #include "libsigrok.h" #include "libsigrok-internal.h" #include "protocol.h" -#include -#include static void process_packet(const struct sr_dev_inst *sdi) { diff --git a/src/hardware/hantek-dso/dso.c b/src/hardware/hantek-dso/dso.c index 76615748..7a2d2379 100644 --- a/src/hardware/hantek-dso/dso.c +++ b/src/hardware/hantek-dso/dso.c @@ -19,12 +19,12 @@ * along with this program. If not, see . */ -#include "libsigrok.h" -#include "libsigrok-internal.h" -#include "dso.h" #include #include #include +#include "libsigrok.h" +#include "libsigrok-internal.h" +#include "dso.h" extern struct sr_dev_driver hantek_dso_driver_info; diff --git a/src/hardware/motech-lps-30x/api.c b/src/hardware/motech-lps-30x/api.c index ff4b9e21..ee873e86 100644 --- a/src/hardware/motech-lps-30x/api.c +++ b/src/hardware/motech-lps-30x/api.c @@ -27,7 +27,6 @@ #include #include #include - #include "protocol.h" /* Forward declarations */ diff --git a/src/hardware/motech-lps-30x/protocol.c b/src/hardware/motech-lps-30x/protocol.c index c8ac58ac..db69eb5f 100644 --- a/src/hardware/motech-lps-30x/protocol.c +++ b/src/hardware/motech-lps-30x/protocol.c @@ -25,7 +25,6 @@ #include #include - #include "protocol.h" /** Send data packets for current measurements. */ diff --git a/src/hardware/motech-lps-30x/protocol.h b/src/hardware/motech-lps-30x/protocol.h index 94eeb67e..493f7827 100644 --- a/src/hardware/motech-lps-30x/protocol.h +++ b/src/hardware/motech-lps-30x/protocol.h @@ -23,7 +23,6 @@ * @internal */ - #ifndef LIBSIGROK_HARDWARE_MOTECH_LPS_30X_PROTOCOL_H #define LIBSIGROK_HARDWARE_MOTECH_LPS_30X_PROTOCOL_H @@ -32,7 +31,6 @@ #include "libsigrok.h" #include "libsigrok-internal.h" - SR_PRIV int lps_process_status(struct sr_dev_inst* sdi, int stat); SR_PRIV int lps_send_req(struct sr_serial_dev_inst *serial, const char* fmt, ...); diff --git a/src/hardware/openbench-logic-sniffer/api.c b/src/hardware/openbench-logic-sniffer/api.c index 14437839..620f5e1b 100644 --- a/src/hardware/openbench-logic-sniffer/api.c +++ b/src/hardware/openbench-logic-sniffer/api.c @@ -17,8 +17,8 @@ * along with this program. If not, see . */ -#include "protocol.h" #include +#include "protocol.h" #define SERIALCOMM "115200/8n1" diff --git a/src/hardware/openbench-logic-sniffer/protocol.c b/src/hardware/openbench-logic-sniffer/protocol.c index 1aa345c1..9082ec18 100644 --- a/src/hardware/openbench-logic-sniffer/protocol.c +++ b/src/hardware/openbench-logic-sniffer/protocol.c @@ -17,8 +17,8 @@ * along with this program. If not, see . */ -#include "protocol.h" #include +#include "protocol.h" extern SR_PRIV struct sr_dev_driver ols_driver_info; diff --git a/src/hardware/pipistrello-ols/protocol.h b/src/hardware/pipistrello-ols/protocol.h index 12a7e69f..4923835a 100644 --- a/src/hardware/pipistrello-ols/protocol.h +++ b/src/hardware/pipistrello-ols/protocol.h @@ -20,11 +20,6 @@ #ifndef LIBSIGROK_HARDWARE_PIPISTRELLO_OLS_PROTOCOL_H #define LIBSIGROK_HARDWARE_PIPISTRELLO_OLS_PROTOCOL_H -#define USB_VENDOR_ID 0x0403 -#define USB_DEVICE_ID 0x6010 -#define USB_VENDOR_NAME "Saanlima" -#define USB_IPRODUCT "Pipistrello LX45" - #include #include #include @@ -34,6 +29,11 @@ #define LOG_PREFIX "p-ols" +#define USB_VENDOR_ID 0x0403 +#define USB_DEVICE_ID 0x6010 +#define USB_VENDOR_NAME "Saanlima" +#define USB_IPRODUCT "Pipistrello LX45" + #define FTDI_BUF_SIZE (16 * 1024) #define NUM_CHANNELS 32 diff --git a/src/hardware/saleae-logic16/protocol.c b/src/hardware/saleae-logic16/protocol.c index 3bc7c756..4bb16814 100644 --- a/src/hardware/saleae-logic16/protocol.c +++ b/src/hardware/saleae-logic16/protocol.c @@ -19,8 +19,6 @@ * along with this program. If not, see . */ -#include "protocol.h" - #include #include #include @@ -30,6 +28,7 @@ #include #include "libsigrok.h" #include "libsigrok-internal.h" +#include "protocol.h" #define FPGA_FIRMWARE_18 FIRMWARE_DIR"/saleae-logic16-fpga-18.bitstream" #define FPGA_FIRMWARE_33 FIRMWARE_DIR"/saleae-logic16-fpga-33.bitstream" diff --git a/src/hardware/sysclk-lwla/api.c b/src/hardware/sysclk-lwla/api.c index 3fe9b2bd..7da96eec 100644 --- a/src/hardware/sysclk-lwla/api.c +++ b/src/hardware/sysclk-lwla/api.c @@ -17,13 +17,13 @@ * along with this program. If not, see . */ -#include "protocol.h" -#include "libsigrok.h" -#include "libsigrok-internal.h" #include #include #include #include +#include "libsigrok.h" +#include "libsigrok-internal.h" +#include "protocol.h" static const uint32_t scanopts[] = { SR_CONF_CONN, diff --git a/src/hardware/sysclk-lwla/lwla.c b/src/hardware/sysclk-lwla/lwla.c index 2f55014e..e0e1c87b 100644 --- a/src/hardware/sysclk-lwla/lwla.c +++ b/src/hardware/sysclk-lwla/lwla.c @@ -17,11 +17,12 @@ * along with this program. If not, see . */ -#include "lwla.h" -#include "protocol.h" -#include "libsigrok-internal.h" #include #include +#include "libsigrok.h" +#include "libsigrok-internal.h" +#include "protocol.h" +#include "lwla.h" #define BITSTREAM_MAX_SIZE (256 * 1024) /* bitstream size limit for safety */ #define BITSTREAM_HEADER_SIZE 4 /* transfer header size in bytes */ diff --git a/src/hardware/sysclk-lwla/lwla.h b/src/hardware/sysclk-lwla/lwla.h index 052e1199..8d72eda1 100644 --- a/src/hardware/sysclk-lwla/lwla.h +++ b/src/hardware/sysclk-lwla/lwla.h @@ -20,10 +20,10 @@ #ifndef LIBSIGROK_HARDWARE_SYSCLK_LWLA_LWLA_H #define LIBSIGROK_HARDWARE_SYSCLK_LWLA_LWLA_H -#include "libsigrok.h" #include #include #include +#include "libsigrok.h" struct sr_usb_dev_inst; diff --git a/src/hardware/sysclk-lwla/protocol.c b/src/hardware/sysclk-lwla/protocol.c index 7b8c4885..a8659a6b 100644 --- a/src/hardware/sysclk-lwla/protocol.c +++ b/src/hardware/sysclk-lwla/protocol.c @@ -17,8 +17,8 @@ * along with this program. If not, see . */ -#include "protocol.h" #include +#include "protocol.h" /* Bit mask for the RLE repeat-count-follows flag. */ #define RLE_FLAG_LEN_FOLLOWS ((uint64_t)1 << 35) diff --git a/src/hardware/sysclk-lwla/protocol.h b/src/hardware/sysclk-lwla/protocol.h index 1c17b48d..d890775b 100644 --- a/src/hardware/sysclk-lwla/protocol.h +++ b/src/hardware/sysclk-lwla/protocol.h @@ -22,11 +22,11 @@ #define LOG_PREFIX "sysclk-lwla" -#include "lwla.h" -#include "libsigrok.h" -#include "libsigrok-internal.h" #include #include +#include "libsigrok.h" +#include "libsigrok-internal.h" +#include "lwla.h" /* For now, only the LWLA1034 is supported. */ diff --git a/src/hardware/uni-t-ut32x/api.c b/src/hardware/uni-t-ut32x/api.c index b1ebf8a1..a4868287 100644 --- a/src/hardware/uni-t-ut32x/api.c +++ b/src/hardware/uni-t-ut32x/api.c @@ -17,9 +17,8 @@ * along with this program. If not, see . */ -#include "protocol.h" - #include +#include "protocol.h" static const uint32_t devopts[] = { SR_CONF_THERMOMETER, diff --git a/src/hardware/uni-t-ut32x/protocol.c b/src/hardware/uni-t-ut32x/protocol.c index 3bbdd99b..1a910b3a 100644 --- a/src/hardware/uni-t-ut32x/protocol.c +++ b/src/hardware/uni-t-ut32x/protocol.c @@ -17,10 +17,9 @@ * along with this program. If not, see . */ -#include "protocol.h" - #include #include +#include "protocol.h" extern struct sr_dev_driver uni_t_ut32x_driver_info; diff --git a/src/scpi/scpi.c b/src/scpi/scpi.c index 0835c90b..52fe76dd 100644 --- a/src/scpi/scpi.c +++ b/src/scpi/scpi.c @@ -17,11 +17,10 @@ * along with this program. If not, see . */ -#include "libsigrok.h" -#include "libsigrok-internal.h" - #include #include +#include "libsigrok.h" +#include "libsigrok-internal.h" #define LOG_PREFIX "scpi" diff --git a/src/scpi/scpi_libgpib.c b/src/scpi/scpi_libgpib.c index 5df90413..cd098e89 100644 --- a/src/scpi/scpi_libgpib.c +++ b/src/scpi/scpi_libgpib.c @@ -17,11 +17,10 @@ * along with this program. If not, see . */ -#include "libsigrok.h" -#include "libsigrok-internal.h" - #include #include +#include "libsigrok.h" +#include "libsigrok-internal.h" #define LOG_PREFIX "scpi_gpib" diff --git a/src/scpi/scpi_serial.c b/src/scpi/scpi_serial.c index de307989..68a684c2 100644 --- a/src/scpi/scpi_serial.c +++ b/src/scpi/scpi_serial.c @@ -18,12 +18,11 @@ * along with this program. If not, see . */ -#include "libsigrok.h" -#include "libsigrok-internal.h" - #include #include #include +#include "libsigrok.h" +#include "libsigrok-internal.h" #define LOG_PREFIX "scpi_serial" diff --git a/src/scpi/scpi_tcp.c b/src/scpi/scpi_tcp.c index ef3a6c75..7b3c9155 100644 --- a/src/scpi/scpi_tcp.c +++ b/src/scpi/scpi_tcp.c @@ -22,10 +22,6 @@ #include #include #endif - -#include "libsigrok.h" -#include "libsigrok-internal.h" - #include #include #include @@ -36,6 +32,8 @@ #include #endif #include +#include "libsigrok.h" +#include "libsigrok-internal.h" #define LOG_PREFIX "scpi_tcp" diff --git a/src/scpi/scpi_visa.c b/src/scpi/scpi_visa.c index cf34a555..34ac9455 100644 --- a/src/scpi/scpi_visa.c +++ b/src/scpi/scpi_visa.c @@ -17,11 +17,10 @@ * along with this program. If not, see . */ -#include "libsigrok.h" -#include "libsigrok-internal.h" - #include #include +#include "libsigrok.h" +#include "libsigrok-internal.h" #define LOG_PREFIX "scpi_visa" diff --git a/src/scpi/scpi_vxi.c b/src/scpi/scpi_vxi.c index e7a4b2b5..e7e48d62 100644 --- a/src/scpi/scpi_vxi.c +++ b/src/scpi/scpi_vxi.c @@ -22,7 +22,6 @@ #include #include - #include "vxi.h" #include "libsigrok.h" #include "libsigrok-internal.h"