From: Uwe Hermann Date: Tue, 23 Oct 2012 22:41:21 +0000 (+0200) Subject: config.h usage cleanups. X-Git-Tag: dsupstream~631 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=545f9786390a89b8bb6868907afa555fc0a6ece4;p=libsigrok.git config.h usage cleanups. - Drop config.h #include from files that don't actually use any of its contents (at the moment). - Add comment for those that do need it. --- diff --git a/backend.c b/backend.c index 389df253..4823044e 100644 --- a/backend.c +++ b/backend.c @@ -19,6 +19,7 @@ */ #include +#include "config.h" /* Needed for HAVE_LIBUSB_1_0 and others. */ #include "libsigrok.h" #include "libsigrok-internal.h" diff --git a/device.c b/device.c index 2509c542..740ad507 100644 --- a/device.c +++ b/device.c @@ -19,6 +19,7 @@ #include #include +#include "config.h" /* Needed for HAVE_LIBUSB_1_0 and others. */ #include "libsigrok.h" #include "libsigrok-internal.h" diff --git a/hardware/agilent-dmm/api.c b/hardware/agilent-dmm/api.c index da5cad6f..7987086e 100644 --- a/hardware/agilent-dmm/api.c +++ b/hardware/agilent-dmm/api.c @@ -20,7 +20,6 @@ #include #include "libsigrok.h" #include "libsigrok-internal.h" -#include "config.h" #include "agilent-dmm.h" #include #include diff --git a/hardware/agilent-dmm/sched.c b/hardware/agilent-dmm/sched.c index 151b8fce..6687953a 100644 --- a/hardware/agilent-dmm/sched.c +++ b/hardware/agilent-dmm/sched.c @@ -20,7 +20,6 @@ #include #include "libsigrok.h" #include "libsigrok-internal.h" -#include "config.h" #include "agilent-dmm.h" #include #include diff --git a/hardware/fluke-dmm/api.c b/hardware/fluke-dmm/api.c index e75849e6..d6c322ac 100644 --- a/hardware/fluke-dmm/api.c +++ b/hardware/fluke-dmm/api.c @@ -20,7 +20,6 @@ #include #include "libsigrok.h" #include "libsigrok-internal.h" -#include "config.h" #include "fluke-dmm.h" #include #include diff --git a/hardware/fluke-dmm/fluke.c b/hardware/fluke-dmm/fluke.c index 9ed24cb6..9258fab5 100644 --- a/hardware/fluke-dmm/fluke.c +++ b/hardware/fluke-dmm/fluke.c @@ -20,7 +20,6 @@ #include #include "libsigrok.h" #include "libsigrok-internal.h" -#include "config.h" #include "fluke-dmm.h" #include #include diff --git a/hardware/fx2lafw/fx2lafw.c b/hardware/fx2lafw/fx2lafw.c index 118d2d24..9a193270 100644 --- a/hardware/fx2lafw/fx2lafw.c +++ b/hardware/fx2lafw/fx2lafw.c @@ -23,7 +23,6 @@ #include #include #include -#include "config.h" #include "libsigrok.h" #include "libsigrok-internal.h" #include "fx2lafw.h" diff --git a/hardware/hantek-dso/api.c b/hardware/hantek-dso/api.c index 4982d2ab..e35dacbd 100644 --- a/hardware/hantek-dso/api.c +++ b/hardware/hantek-dso/api.c @@ -31,7 +31,6 @@ #include #include "libsigrok.h" #include "libsigrok-internal.h" -#include "config.h" #include "dso.h" diff --git a/hardware/hantek-dso/dso.c b/hardware/hantek-dso/dso.c index 8480f07f..3fea9a58 100644 --- a/hardware/hantek-dso/dso.c +++ b/hardware/hantek-dso/dso.c @@ -21,7 +21,6 @@ #include "libsigrok.h" #include "libsigrok-internal.h" -#include "config.h" #include "dso.h" #include #include diff --git a/hardware/radioshack-dmm/api.c b/hardware/radioshack-dmm/api.c index 62b3c0d1..6388c463 100644 --- a/hardware/radioshack-dmm/api.c +++ b/hardware/radioshack-dmm/api.c @@ -21,7 +21,6 @@ #include #include "libsigrok.h" #include "libsigrok-internal.h" -#include "config.h" #include "radioshack-dmm.h" #include #include diff --git a/hardware/radioshack-dmm/radioshack.c b/hardware/radioshack-dmm/radioshack.c index e4fc43cf..2ce7c8f8 100644 --- a/hardware/radioshack-dmm/radioshack.c +++ b/hardware/radioshack-dmm/radioshack.c @@ -21,7 +21,6 @@ #include #include "libsigrok.h" #include "libsigrok-internal.h" -#include "config.h" #include "radioshack-dmm.h" #include #include diff --git a/hardware/zeroplus-logic-cube/zeroplus.c b/hardware/zeroplus-logic-cube/zeroplus.c index 85555d85..c22f9458 100644 --- a/hardware/zeroplus-logic-cube/zeroplus.c +++ b/hardware/zeroplus-logic-cube/zeroplus.c @@ -24,7 +24,6 @@ #include #include #include -#include "config.h" #include "libsigrok.h" #include "libsigrok-internal.h" #include "analyzer.h" diff --git a/hwdriver.c b/hwdriver.c index 8be8a9e2..ef7f3efe 100644 --- a/hwdriver.c +++ b/hwdriver.c @@ -23,6 +23,7 @@ #include #include #include +#include "config.h" /* Needed for HAVE_LIBUSB_1_0 and others. */ #include "libsigrok.h" #include "libsigrok-internal.h" diff --git a/libsigrok-internal.h b/libsigrok-internal.h index 38647622..9983d66a 100644 --- a/libsigrok-internal.h +++ b/libsigrok-internal.h @@ -96,8 +96,8 @@ SR_PRIV struct sr_probe *sr_probe_new(int index, int type, SR_PRIV struct sr_dev_inst *sr_dev_inst_new(int index, int status, const char *vendor, const char *model, const char *version); SR_PRIV void sr_dev_inst_free(struct sr_dev_inst *sdi); -#ifdef HAVE_LIBUSB_1_0 +#ifdef HAVE_LIBUSB_1_0 /* USB-specific instances */ SR_PRIV struct sr_usb_dev_inst *sr_usb_dev_inst_new(uint8_t bus, uint8_t address, struct libusb_device_handle *hdl); diff --git a/output/analog.c b/output/analog.c index 05194dab..6f3609c0 100644 --- a/output/analog.c +++ b/output/analog.c @@ -20,7 +20,6 @@ #include #include #include -#include "config.h" #include "libsigrok.h" #include "libsigrok-internal.h" #include diff --git a/output/csv.c b/output/csv.c index 31e4d8d9..def7c893 100644 --- a/output/csv.c +++ b/output/csv.c @@ -21,7 +21,7 @@ #include #include #include -#include "config.h" +#include "config.h" /* Needed for PACKAGE_STRING and others. */ #include "libsigrok.h" #include "libsigrok-internal.h" diff --git a/output/float.c b/output/float.c index 5c9631f4..cd4ef8c3 100644 --- a/output/float.c +++ b/output/float.c @@ -20,7 +20,6 @@ #include #include #include -#include "config.h" #include "libsigrok.h" #include "libsigrok-internal.h" diff --git a/output/gnuplot.c b/output/gnuplot.c index a2124bb1..6e0e745f 100644 --- a/output/gnuplot.c +++ b/output/gnuplot.c @@ -21,7 +21,7 @@ #include #include #include -#include "config.h" +#include "config.h" /* Needed for PACKAGE_STRING and others. */ #include "libsigrok.h" #include "libsigrok-internal.h" diff --git a/output/text/text.c b/output/text/text.c index 6462cb9e..60d27154 100644 --- a/output/text/text.c +++ b/output/text/text.c @@ -22,7 +22,7 @@ #include #include #include -#include "config.h" +#include "config.h" /* Needed for PACKAGE_STRING and others. */ #include "libsigrok.h" #include "libsigrok-internal.h" #include "text.h" diff --git a/output/vcd.c b/output/vcd.c index 3a2114c8..6e3910fd 100644 --- a/output/vcd.c +++ b/output/vcd.c @@ -22,7 +22,7 @@ #include #include #include -#include "config.h" +#include "config.h" /* Needed for PACKAGE and others. */ #include "libsigrok.h" #include "libsigrok-internal.h" diff --git a/session_file.c b/session_file.c index 41ca36c5..3746520b 100644 --- a/session_file.c +++ b/session_file.c @@ -23,7 +23,7 @@ #include #include #include -#include "config.h" +#include "config.h" /* Needed for PACKAGE_VERSION and others. */ #include "libsigrok.h" #include "libsigrok-internal.h"