]> thyrsus.com Git - microjson.git/commitdiff
Mve NITEMS where it needs to be.
authorEric S. Raymond <esr@thyrsus.com>
Wed, 17 Sep 2014 22:33:43 +0000 (18:33 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Wed, 17 Sep 2014 22:34:26 +0000 (18:34 -0400)
Unit test passes.

microjson.h
test_microjson.c

index 47e2671aa1c7e43180c3387085d8854a8fec9c1e..0629811bb2079a59d9182cb43ce14e6b35f04fae 100644 (file)
@@ -1,12 +1,14 @@
 /* Structures for JSON parsing using only fixed-extent memory
  *
- * This file is Copyright (c) 2010 by the GPSD project
+ * This file is Copyright (c) 2014 by Eric S. Raymond.
  * BSD terms apply: see the file COPYING in the distribution root for details.
  */
 
 #include <stdbool.h>
 #include <ctype.h>
 
+#define NITEMS(x) (int)(sizeof(x)/sizeof(x[0]))
+
 typedef enum {t_integer, t_uinteger, t_real,
              t_string, t_boolean, t_character,
              t_time,
index 68e7d8b1b34b46da0195cb9fb30b565ce05e3f6a..70c9cb255311e12257b1134fe162dd51d515d8c5 100644 (file)
@@ -33,8 +33,6 @@
 #define DEVDEFAULT_STOPBITS    3
 #define DEVDEFAULT_NATIVE      -1
 
-#define NITEMS(x) (int)(sizeof(x)/sizeof(x[0]))
-
 typedef double timestamp_t;    /* Unix time in seconds with fractional part */
 
 struct dop_t {