diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-09-19 15:08:22 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-09-19 15:08:22 +0000 |
commit | 723087fa9463efa270a8581c8037e44fcc327766 (patch) | |
tree | 4fcd2790815d779bfc8ea8a38b276f940a85d33c /gps.h | |
parent | 715aabcbb2d082f80740d133761ab7862933021a (diff) | |
download | gpsd-723087fa9463efa270a8581c8037e44fcc327766.tar.gz |
Make a re-entrance-friendly version of gps_open().
The immediate use for this will be to simplify the code of gpsmon. All
regression tests pass and xgps runs sanely. Codebase splints clean.
Diffstat (limited to 'gps.h')
-rw-r--r-- | gps.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -973,7 +973,9 @@ struct gps_data_t { #define WATCH_SCALED 0x04u #define WATCH_NEWSTYLE 0x10u /* for test purposes only - will go away */ -extern /*@null@*/ struct gps_data_t *gps_open(const char *host, const char *port); +extern int gps_open_r(const char *host, const char *port, + /*@out@*/struct gps_data_t *gpsdata); +extern /*@null@*/struct gps_data_t *gps_open(const char *host,const char *port); extern int gps_close(struct gps_data_t *); extern int gps_query(struct gps_data_t *gpsdata, const char *fmt, ... ); extern int gps_poll(struct gps_data_t *gpsdata); |