diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-12-03 15:01:37 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-12-03 15:01:37 +0000 |
commit | 127e22cd8c36510363870645e3288cf39d1589dc (patch) | |
tree | 93ee4b6c68e4e1539cc51c82cc7ae206f7a2de1f /gps.h | |
parent | ccf785d06cc5f891e814a63e275185f31c7c1836 (diff) | |
download | gpsd-127e22cd8c36510363870645e3288cf39d1589dc.tar.gz |
Change the library private data member to void *...
...in case we ever want to hang an opaque state structure off it.
Currently it's used only as a flag indicating whether user has seen
JSON yet. All regression tests pass.
Diffstat (limited to 'gps.h')
-rw-r--r-- | gps.h | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -921,7 +921,8 @@ struct gps_data_t { * prone to false zero values. */ - struct gps_fix_t fix; /* accumulated PVT data */ + int gps_fd; /* socket or file descriptor to GPS */ + struct gps_fix_t fix; /* accumulated PVT data */ double separation; /* Geoidal separation, MSL - WGS84 (Meters) */ @@ -953,8 +954,6 @@ struct gps_data_t { char tag[MAXTAGLEN+1]; /* tag of last sentence processed */ - /* hook functions */ - int gps_fd; /* socket or file descriptor to GPS */ void (*raw_hook)(struct gps_data_t *, char *, size_t len); /* Raw-mode hook for GPS data. */ /* pack things never reported together to reduce structure size */ @@ -976,8 +975,8 @@ struct gps_data_t { char error[80]; }; - /* Private data - may be changed or removed */ - bool newstyle; /* have we seen a JSON response */ + /* Private data - client code must not set this */ + void *privdata; }; /* mode flags for gps_stream() */ |