summaryrefslogtreecommitdiff
path: root/ais_json.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-12-18 03:53:22 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-12-18 03:53:22 +0000
commit7a4d5797c68cc03a9a2d00d29e2f2ee839edaa24 (patch)
tree28b5fc5a67e16c96d2b4fb265ef84c7e7b977076 /ais_json.c
parent91dc9b27f6a7bb7dd91b6990a20e682d9a7826c4 (diff)
downloadgpsd-7a4d5797c68cc03a9a2d00d29e2f2ee839edaa24.tar.gz
Introduce the "scaled" attribute to JSON dumps...
...so they are fully self-describing again.
Diffstat (limited to 'ais_json.c')
-rw-r--r--ais_json.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ais_json.c b/ais_json.c
index 53c6b1d9..80e25491 100644
--- a/ais_json.c
+++ b/ais_json.c
@@ -36,6 +36,8 @@ int json_ais_read(const char *buf,
struct ais_t *ais,
/*@null@*/const char **endptr)
{
+ /* collected but not actually used yet */
+ bool scaled;
/*@-compdef@*//* splint is confused by storage declared in the .i file */
/*@-nullstate@*/
@@ -45,6 +47,8 @@ int json_ais_read(const char *buf,
{"device", string, .addr.string = path, \
.len = pathlen}, \
{"repeat", uinteger, .addr.uinteger = &ais->repeat}, \
+ {"scaled", boolean, .addr.boolean = &scaled, \
+ .dflt.boolean = false}, \
{"mmsi", uinteger, .addr.uinteger = &ais->mmsi}
int status;