diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-12-08 16:56:29 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-12-08 16:56:29 +0000 |
commit | 0d4c52337759775474a5be37213037d924502347 (patch) | |
tree | 77406dbb4476c706fa9e0c4ee1d242fb4f2fbcf4 | |
parent | 1e66cf7f52d8d3a6a9e7880c9a3150881f319f4c (diff) | |
download | gpsd-0d4c52337759775474a5be37213037d924502347.tar.gz |
Give gpxlogger the -D option, abolish the last remnant of cgpxlogger.
-rw-r--r-- | Makefile.am | 3 | ||||
-rw-r--r-- | gps.xml | 2 | ||||
-rw-r--r-- | gpsd.c | 2 | ||||
-rw-r--r-- | gpxlogger.c | 11 | ||||
-rw-r--r-- | packaging/gpsd.spec.in | 1 |
5 files changed, 13 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am index 12e09f24..3021f08f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -330,7 +330,6 @@ MANPAGES_BASE = \ xgpsspeed.1 \ cgps.1 \ lcdgps.1 \ - cgpxlogger.1 \ libgps.3 \ libgpsmm.3 \ libgpsd.3 \ @@ -369,7 +368,7 @@ BUILT_MANPAGES = $(MANPAGES_DIST) $(MANGENERATOR) $(MANFLAGS) $(MANTARGET) $< # Another instance of the multiple-outputs hack. -gps.1 xgps.1 xgpsspeed.1 cgps.1 lcdgps.1 cgpxlogger.1: stamp-gps-manpages +gps.1 xgps.1 xgpsspeed.1 cgps.1 lcdgps.1: stamp-gps-manpages +@WITNESS=stamp-gps-manpages; $(MULTIOUT_RECOVER_DELETED) stamp-gps-manpages: gps.xml @rm -f '$@' '$@.tmp' @@ -14,7 +14,6 @@ <refname>xgpsspeed</refname> <refname>cgps</refname> <refname>lcdgps</refname> -<refname>cgpxlogger</refname> <refpurpose>test clients for gpsd</refpurpose> </refnamediv> <refsynopsisdiv id='synopsis'> @@ -91,6 +90,7 @@ </cmdsynopsis> <cmdsynopsis> <command>gpxlogger</command> + <arg choice='opt'>-D <replaceable>debug-level</replaceable></arg> <arg choice='opt'>-h </arg> <arg choice='opt'>-V </arg> <arg choice='opt'>-i <replaceable>track timeout</replaceable></arg> @@ -1209,7 +1209,7 @@ static bool handle_oldstyle(struct subscriber_t *sub, char *buf, * fighting with Dragorn. We'll just disable it. The client * library could never parse the response anyway, so the only * people who lose are the ones opening a socket direct to the - * daemon and doing depreacated single-shot queries. + * daemon and doing deprecated single-shot queries. */ case 'L': (void)snprintf(phrase, sizeof(phrase), ",L=%d %d %s abcdefgijklmnopqrstuvwxyz", GPSD_API_MAJOR_VERSION, GPSD_API_MINOR_VERSION, VERSION); //h diff --git a/gpxlogger.c b/gpxlogger.c index a9c32ead..899da956 100644 --- a/gpxlogger.c +++ b/gpxlogger.c @@ -31,6 +31,9 @@ static time_t int_time, old_int_time; static bool intrack = false; static bool first = true; static time_t timeout = 5; /* seconds */ +#ifdef CLIENTDEBUG_ENABLE +static int debug; +#endif /* CLIENTDEBUG_ENABLE */ static void print_gpx_header(void) { @@ -342,8 +345,14 @@ int main (int argc, char** argv) int ch; progname = argv[0]; - while ((ch = getopt(argc, argv, "hi:V")) != -1) { + while ((ch = getopt(argc, argv, "D:hi:V")) != -1) { switch (ch) { + case 'D': + debug = atoi(optarg); +#ifdef CLIENTDEBUG_ENABLE + gps_enable_debug(debug, stdout); +#endif /* CLIENTDEBUG_ENABLE */ + break; case 'i': /* set polling interfal */ timeout = (unsigned int)atoi(optarg); if (timeout < 1) diff --git a/packaging/gpsd.spec.in b/packaging/gpsd.spec.in index 73931811..980cc4b7 100644 --- a/packaging/gpsd.spec.in +++ b/packaging/gpsd.spec.in @@ -157,7 +157,6 @@ cp packaging/etc_init.d_gpsd_rpm "$RPM_BUILD_ROOT"/etc/rc.d/init.d/gpsd %attr(755, root, root) %{_bindir}/gpxlogger %{_mandir}/man1/gps.1* %{_mandir}/man1/cgps.1* -%{_mandir}/man1/cgpxlogger.1* %{_mandir}/man1/xgps.1* %{_mandir}/man1/xgpsspeed.1* %{_mandir}/man1/gpspipe.1* |