libsigrok: Fix #includes.

In the lib, we should only #include "sigrok.h" or "sigrok-internal.h",
but not the (possibly installed and thus different/older versions) via
<sigrok.h> or <sigrok-internal.h>.

Frontends should of course use <sigrok.h> and <sigrok-internal.h>.
This commit is contained in:
Uwe Hermann 2011-12-28 23:07:08 +01:00
parent a0ecd83bc6
commit b7f09cf86d
23 changed files with 41 additions and 45 deletions

View File

@ -17,7 +17,7 @@
## along with this program. If not, see <http://www.gnu.org/licenses/>.
##
AM_CPPFLAGS = -I $(top_srcdir)/libsigrok
AM_CPPFLAGS = -I$(top_srcdir)/libsigrok
SUBDIRS = hardware input output firmware

View File

@ -18,8 +18,8 @@
*/
#include <glib.h>
#include <sigrok.h>
#include <sigrok-internal.h>
#include "sigrok.h"
#include "sigrok-internal.h"
/**
* Initialize libsigrok.

View File

@ -21,8 +21,8 @@
#include <stdint.h>
#include <string.h>
#include <glib.h>
#include <sigrok.h>
#include <sigrok-internal.h>
#include "sigrok.h"
#include "sigrok-internal.h"
static gpointer new_chunk(struct sr_datastore **ds);

View File

@ -19,8 +19,8 @@
#include <stdio.h>
#include <glib.h>
#include <sigrok.h>
#include <sigrok-internal.h>
#include "sigrok.h"
#include "sigrok-internal.h"
static GSList *devices = NULL;

View File

@ -20,7 +20,7 @@
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <sigrok.h>
#include "sigrok.h"
#include "sigrok-internal.h"
/**

View File

@ -22,9 +22,9 @@
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sigrok.h>
#include <sigrok-internal.h>
#include <alsa/asoundlib.h>
#include "sigrok.h"
#include "sigrok-internal.h"
#define NUM_PROBES 2
#define SAMPLE_WIDTH 16

View File

@ -29,8 +29,8 @@
#include <ftdi.h>
#include <string.h>
#include <zlib.h>
#include <sigrok.h>
#include <sigrok-internal.h>
#include "sigrok.h"
#include "sigrok-internal.h"
#include "asix-sigma.h"
#define USB_VENDOR 0xa600

View File

@ -21,8 +21,8 @@
#include <ftdi.h>
#include <glib.h>
#include <string.h>
#include <sigrok.h>
#include <sigrok-internal.h>
#include "sigrok.h"
#include "sigrok-internal.h"
#define USB_VENDOR_ID 0x0403
#define USB_PRODUCT_ID 0x6001

View File

@ -21,8 +21,6 @@
* Helper functions for the Cypress EZ-USB / FX2 series chips.
*/
#include <sigrok.h>
#include <sigrok-internal.h>
#include <libusb.h>
#include <glib.h>
#include <glib/gstdio.h>
@ -30,6 +28,8 @@
#include <errno.h>
#include <string.h>
#include "config.h"
#include "sigrok.h"
#include "sigrok-internal.h"
int ezusb_reset(struct libusb_device_handle *hdl, int set_clear)
{

View File

@ -30,8 +30,8 @@
#endif
#include <stdlib.h>
#include <glib.h>
#include <sigrok.h>
#include <sigrok-internal.h>
#include "sigrok.h"
#include "sigrok-internal.h"
// FIXME: Must be moved, or rather passed as function argument.
#ifdef _WIN32

View File

@ -22,14 +22,14 @@
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sigrok.h>
#include <sigrok-internal.h>
#ifdef _WIN32
#include <io.h>
#include <fcntl.h>
#define pipe(fds) _pipe(fds, 4096, _O_BINARY)
#endif
#include "config.h"
#include "sigrok.h"
#include "sigrok-internal.h"
/* TODO: Number of probes should be configurable. */
#define NUM_PROBES 8

View File

@ -26,9 +26,9 @@
#include <inttypes.h>
#include <glib.h>
#include <libudev.h>
#include <sigrok.h>
#include <arpa/inet.h>
#include <sigrok-internal.h>
#include "sigrok.h"
#include "sigrok-internal.h"
#include "config.h"
#include "link-mso19.h"

View File

@ -38,8 +38,8 @@
#include <arpa/inet.h>
#endif
#include <glib.h>
#include <sigrok.h>
#include <sigrok-internal.h>
#include "sigrok.h"
#include "sigrok-internal.h"
#include "ols.h"
#ifdef _WIN32

View File

@ -24,8 +24,8 @@
#include <inttypes.h>
#include <glib.h>
#include <libusb.h>
#include <sigrok.h>
#include <sigrok-internal.h>
#include "sigrok.h"
#include "sigrok-internal.h"
#include "saleae-logic.h"
static struct fx2_profile supported_fx2[] = {

View File

@ -17,7 +17,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef SALEAE_LOGIC_H_
#define SALEAE_LOGIC_H_
@ -72,9 +71,6 @@ struct fx2_device {
* on the session bus along with samples.
*/
void *session_data;
};
#endif /* SALEAE_LOGIC_H_ */

View File

@ -31,7 +31,7 @@
#include <libusb.h>
#include <stdio.h>
#include <sigrok-internal.h>
#include "sigrok-internal.h"
#include "gl_usb.h"
#define CTRL_IN (LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_ENDPOINT_IN | \

View File

@ -24,8 +24,8 @@
#include <inttypes.h>
#include <glib.h>
#include <libusb.h>
#include <sigrok.h>
#include <sigrok-internal.h>
#include "sigrok.h"
#include "sigrok-internal.h"
#include "analyzer.h"
#define USB_VENDOR 0x0c12

View File

@ -24,8 +24,8 @@
#include <dirent.h>
#include <string.h>
#include <glib.h>
#include <sigrok.h>
#include <sigrok-internal.h>
#include "sigrok.h"
#include "sigrok-internal.h"
/* The list of loaded plugins lives here. */
static GSList *plugins;

4
log.c
View File

@ -20,8 +20,8 @@
#include <stdarg.h>
#include <stdio.h>
#include <sigrok.h>
#include <sigrok-internal.h>
#include "sigrok.h"
#include "sigrok-internal.h"
static int sr_loglevel = SR_LOG_WARN; /* Show errors+warnings per default. */

View File

@ -23,8 +23,8 @@
#include <unistd.h>
#include <string.h>
#include <glib.h>
#include <sigrok.h>
#include <sigrok-internal.h>
#include "sigrok.h"
#include "sigrok-internal.h"
/* demo.c */
extern GIOChannel channels[2];

View File

@ -23,8 +23,8 @@
#include <unistd.h>
#include <sys/time.h>
#include <zip.h>
#include <sigrok.h>
#include <sigrok-internal.h>
#include "sigrok.h"
#include "sigrok-internal.h"
/* size of payloads sent across the session bus */
#define CHUNKSIZE 4096

View File

@ -24,8 +24,8 @@
#include <zip.h>
#include <glib.h>
#include <glib/gstdio.h>
#include <sigrok.h>
#include <sigrok-internal.h>
#include "sigrok.h"
#include "sigrok-internal.h"
extern struct sr_session *session;
extern struct sr_device_plugin session_driver;

View File

@ -21,8 +21,8 @@
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <sigrok.h>
#include <sigrok-internal.h>
#include "sigrok.h"
#include "sigrok-internal.h"
/**
* Convert a numeric samplerate value to its "natural" string representation.