diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2010-12-19 08:19:16 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2010-12-19 08:19:16 -0500 |
commit | 468d2ad0f276b02dd131a574c087f8a797300c2a (patch) | |
tree | f443e9d8da07d66421e7dd624c65561e8eadb959 | |
parent | 17a14ffaf734eb856abf29aa63058c9df79b7891 (diff) | |
download | gpsd-468d2ad0f276b02dd131a574c087f8a797300c2a.tar.gz |
Clients are no longer required to define a gpsd_report() hook.
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | gpxlogger.c | 8 | ||||
-rw-r--r-- | json.c | 4 | ||||
-rw-r--r-- | libgpsd.xml | 7 | ||||
-rw-r--r-- | libgpsd_core.c | 2 |
5 files changed, 12 insertions, 12 deletions
@@ -5,7 +5,8 @@ link with uClibc for embedded use. Various bugs in the C++ binding have been fixed. gpxlogger can now daemonize and write to a specified log file. A gpsd client can now set any locale it likes, and JSON - will still be parsed using the C locale matching the daemon's. + will still be parsed using the C locale matching the daemon's. Clients + are no longer required to define a gpsd_report() hook. * Tue Jul 13 2010 Eric S. Raymond <esr@snark.thyrsus.com> - 2.95 The autonomous robot submarine total world domination release! diff --git a/gpxlogger.c b/gpxlogger.c index 0b1f4acd..5dc82af4 100644 --- a/gpxlogger.c +++ b/gpxlogger.c @@ -134,7 +134,7 @@ static void conditionally_log_fix(struct gps_fix_t *gpsfix) return; /* may not be worth logging if we've moved only a very short distance */ - if (minmove && !first && earth_distance(gpsfix->latitude, gpsfix->longitude, + if (minmove>0 && !first && earth_distance(gpsfix->latitude, gpsfix->longitude, old_lat, old_lon) < minmove) return; @@ -160,7 +160,7 @@ static void conditionally_log_fix(struct gps_fix_t *gpsfix) } old_int_time = int_time; - if (minmove) { + if (minmove > 0) { old_lat = gpsfix->latitude; old_lon = gpsfix->longitude; } @@ -356,6 +356,7 @@ static void usage(void) exit(1); } +/*@-mustfreefresh -globstate@*/ int main(int argc, char **argv) { int ch; @@ -438,12 +439,14 @@ int main(int argc, char **argv) (void)signal(SIGQUIT, quit_handler); (void)signal(SIGINT, quit_handler); + /*@-unrecog@*/ /* might be time to daemonize */ if (daemonize) { /* not SuS/POSIX portable, but we have our own fallback version */ if (daemon(0, 0) != 0) (void) fprintf(stderr,"demonization failed: %s\n", strerror(errno)); } + /*@+unrecog@*/ //syslog (LOG_INFO, "---------- STARTED ----------"); @@ -459,3 +462,4 @@ int main(int argc, char **argv) return socket_mainloop(); #endif } +/*@+mustfreefresh +globstate@*/ @@ -559,10 +559,10 @@ int json_read_object(const char *cp, const struct json_attr_t *attrs, char *savedlocale = setlocale(LC_ALL, NULL); int st; - setlocale(LC_ALL, "C"); + (void)setlocale(LC_ALL, "C"); json_debug_trace((1, "json_read_object() sees '%s'\n", cp)); st = json_internal_read_object(cp, attrs, NULL, 0, end); - setlocale(LC_ALL, savedlocale); + (void)setlocale(LC_ALL, savedlocale); return st; } diff --git a/libgpsd.xml b/libgpsd.xml index 0e7956b5..277f8202 100644 --- a/libgpsd.xml +++ b/libgpsd.xml @@ -53,13 +53,6 @@ C: <funcdef>void <function>gpsd_wrap</function></funcdef> <paramdef>struct gps_device_t * <parameter>session</parameter></paramdef> </funcprototype> - -<funcprototype> -<funcdef>void <function>gpsd_report</function></funcdef> - <paramdef>int <parameter>d</parameter></paramdef> - <paramdef>const char * <parameter>fmt</parameter></paramdef> - <paramdef><parameter>...</parameter></paramdef> -</funcprototype> </funcsynopsis> </refsynopsisdiv> diff --git a/libgpsd_core.c b/libgpsd_core.c index 2876b30b..6df1067f 100644 --- a/libgpsd_core.c +++ b/libgpsd_core.c @@ -615,12 +615,14 @@ static /*@null@*/ void *gpsd_ppsmonitor(void *arg) } sample.offset -= TSTOD( &ts ); #if defined(ONCORE_ENABLE) && defined(BINARY_ENABLE) + /*@-noeffect@*/ if (session->device_type == &oncore_binary) { pulse_delay_ns = session->driver.oncore.pps_offset_ns; sample.offset += (double)pulse_delay_ns / 1000000000; ts.tv_nsec -= pulse_delay_ns; TS_NORM( &ts ); } + /*@+noeffect@*/ #endif if ( 0 <= chronyfd ) { |