summaryrefslogtreecommitdiff
path: root/json.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-04-16 02:56:25 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-04-16 02:56:25 -0400
commitc552e1e9381d2e0da016fa70be444189bebdd55b (patch)
tree365efb94afe99fb0796549ca2872e0212ed3da3e /json.c
parent62bc9311632aaba85f011f4d6306b4e6904d1937 (diff)
downloadgpsd-c552e1e9381d2e0da016fa70be444189bebdd55b.tar.gz
Cosmetic tweak: t_timestamp -> t_time.
Diffstat (limited to 'json.c')
-rw-r--r--json.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/json.c b/json.c
index 111c2e74..65b17d85 100644
--- a/json.c
+++ b/json.c
@@ -121,7 +121,7 @@ static /*@null@*/ char *json_target_address(const struct json_attr_t *cursor,
case t_uinteger:
targetaddr = (char *)&cursor->addr.uinteger[offset];
break;
- case t_timestamp:
+ case t_time:
case t_real:
targetaddr = (char *)&cursor->addr.real[offset];
break;
@@ -199,7 +199,7 @@ static int json_internal_read_object(const char *cp,
case t_uinteger:
*((unsigned int *)lptr) = cursor->dflt.uinteger;
break;
- case t_timestamp:
+ case t_time:
case t_real:
*((double *)lptr) = cursor->dflt.real;
break;
@@ -386,7 +386,7 @@ static int json_internal_read_object(const char *cp,
*/
for (;;) {
int seeking = cursor->type;
- if (value_quoted && (cursor->type == t_string || cursor->type == t_timestamp))
+ if (value_quoted && (cursor->type == t_string || cursor->type == t_time))
break;
if ((strcmp(valbuf, "true")==0 || strcmp(valbuf, "false")==0)
&& seeking == t_boolean)
@@ -406,7 +406,7 @@ static int json_internal_read_object(const char *cp,
}
if (value_quoted
&& (cursor->type != t_string && cursor->type != t_character
- && cursor->type != t_check && cursor->type != t_timestamp
+ && cursor->type != t_check && cursor->type != t_time
&& cursor->map == 0)) {
json_debug_trace((1,
"Saw quoted value when expecting non-string.\n"));
@@ -414,7 +414,7 @@ static int json_internal_read_object(const char *cp,
}
if (!value_quoted
&& (cursor->type == t_string || cursor->type == t_check
- || cursor->type == t_timestamp || cursor->map != 0)) {
+ || cursor->type == t_time || cursor->map != 0)) {
json_debug_trace((1,
"Didn't see quoted value when expecting string.\n"));
return JSON_ERR_NONQSTRING;
@@ -439,7 +439,7 @@ static int json_internal_read_object(const char *cp,
case t_uinteger:
*((unsigned int *)lptr) = (unsigned)atoi(valbuf);
break;
- case t_timestamp:
+ case t_time:
*((double *)lptr) = iso8601_to_unix(valbuf);
break;
case t_real:
@@ -562,7 +562,7 @@ int json_read_array(const char *cp, const struct json_array_t *arr,
break;
case t_integer:
case t_uinteger:
- case t_timestamp:
+ case t_time:
case t_real:
case t_boolean:
case t_character: