diff options
author | Rob Norris <rw_norris@hotmail.com> | 2016-02-29 21:36:23 +0000 |
---|---|---|
committer | Jon Schlueter <jon.schlueter@gmail.com> | 2016-03-08 20:48:47 -0500 |
commit | 286046427488c1200cb375388f30bb11ac3b85bf (patch) | |
tree | 1d0bce7a9ba104eb53b5fe1e8aa228ac7e93434d | |
parent | 48083ca320afa1027067c8fe6f89119bb4d2efba (diff) | |
download | gpsd-286046427488c1200cb375388f30bb11ac3b85bf.tar.gz |
Move declarations of libgps_debug related functions and definitions.
Move from gpsd.h to libgps.h
This is the more logical place for this code
and removes the dependency of test_libgps.c on gpsd.h
Signed-off-by: Jon Schlueter <jon.schlueter@gmail.com>
-rw-r--r-- | driver_nmea2000.c | 1 | ||||
-rw-r--r-- | gpsd.h-tail | 14 | ||||
-rw-r--r-- | libgps.h | 17 | ||||
-rw-r--r-- | test_libgps.c | 3 |
4 files changed, 20 insertions, 15 deletions
diff --git a/driver_nmea2000.c b/driver_nmea2000.c index 76da0002..6f938e00 100644 --- a/driver_nmea2000.c +++ b/driver_nmea2000.c @@ -19,6 +19,7 @@ #include <sys/ioctl.h> #include "gpsd.h" +#include "libgps.h" #if defined(NMEA2000_ENABLE) #include "driver_nmea2000.h" #include "bits.h" diff --git a/gpsd.h-tail b/gpsd.h-tail index c51cda98..6af997ae 100644 --- a/gpsd.h-tail +++ b/gpsd.h-tail @@ -931,20 +931,6 @@ extern bool ais_binary_decode(const struct gpsd_errout_t *errout, const unsigned char *, size_t, struct ais_type24_queue_t *); -/* debugging apparatus for the client library */ -#ifdef CLIENTDEBUG_ENABLE -#define LIBGPS_DEBUG -#endif /* CLIENTDEBUG_ENABLE */ -#ifdef LIBGPS_DEBUG -#define DEBUG_CALLS 1 /* shallowest debug level */ -#define DEBUG_JSON 5 /* minimum level for verbose JSON debugging */ -# define libgps_debug_trace(args) (void) libgps_trace args -extern int libgps_debuglevel; -extern void libgps_dump_state(struct gps_data_t *); -#else -# define libgps_debug_trace(args) do { } while (0) -#endif /* LIBGPS_DEBUG */ - void gpsd_labeled_report(const int, const int, const char *, const char *, va_list); void gpsd_vlog(const struct gpsd_errout_t *, @@ -10,6 +10,8 @@ #define SHM_PSEUDO_FD -1 #define DBUS_PSEUDO_FD -2 +#include "gps.h" +#include "gpsd_config.h" #include "compiler.h" #ifdef __cplusplus @@ -38,6 +40,21 @@ extern int gps_dbus_mainloop(struct gps_data_t *, int, extern int json_ais_read(const char *, char *, size_t, struct ais_t *, const char **); + +/* debugging apparatus for the client library */ +#ifdef CLIENTDEBUG_ENABLE +#define LIBGPS_DEBUG +#endif /* CLIENTDEBUG_ENABLE */ +#ifdef LIBGPS_DEBUG +#define DEBUG_CALLS 1 /* shallowest debug level */ +#define DEBUG_JSON 5 /* minimum level for verbose JSON debugging */ +# define libgps_debug_trace(args) (void) libgps_trace args +extern int libgps_debuglevel; +extern void libgps_dump_state(struct gps_data_t *); +#else +# define libgps_debug_trace(args) do { } while (0) +#endif /* LIBGPS_DEBUG */ + #ifdef __cplusplus } #endif diff --git a/test_libgps.c b/test_libgps.c index 97ad107f..1102c35d 100644 --- a/test_libgps.c +++ b/test_libgps.c @@ -12,7 +12,8 @@ #define LIBGPS_DEBUG -#include "gpsd.h" +#include "gps.h" +#include "libgps.h" #include "gpsdclient.h" #include <unistd.h> |