]> 4ch.mooo.com Git - 16.git/commitdiff
wwww map testing~
authorsparky4 <sparky4@cock.li>
Mon, 23 Mar 2015 00:20:34 +0000 (19:20 -0500)
committersparky4 <sparky4@cock.li>
Mon, 23 Mar 2015 00:20:34 +0000 (19:20 -0500)
new file:   data/test0.map
modified:   src/lib/jsmn/example/MAPTEST.EXE
modified:   src/lib/jsmn/example/maptest.c

data/test0.map [new file with mode: 0644]
src/lib/jsmn/example/MAPTEST.EXE
src/lib/jsmn/example/maptest.c

diff --git a/data/test0.map b/data/test0.map
new file mode 100644 (file)
index 0000000..56eb3dd
--- /dev/null
@@ -0,0 +1,4 @@
+{ "backgroundcolor":"#000000",
+ "height":30,
+ "width":40
+}
\ No newline at end of file
index a7d87639fac28665c76610c778bc8ff36cea952d..db505eb8d486e239bce3960403141e111347158c 100644 (file)
Binary files a/src/lib/jsmn/example/MAPTEST.EXE and b/src/lib/jsmn/example/MAPTEST.EXE differ
index d951e64b2bda1bc55ce10375b912d430dd6cf776..1a3416cc31f9854e6731f4d0a4b66c7203e690a1 100644 (file)
@@ -36,8 +36,8 @@ int main() {
        int r;
        size_t z;
        jsmn_parser p;
-       jsmntok_t t[2048]; /* We expect no more than 128 tokens */
-       FILE *fh = fopen("../../../../data/test.map", "r");
+       jsmntok_t t[128]; /* We expect no more than 128 tokens */
+       FILE *fh = fopen("../../../../data/test0.map", "r");
        char *json_string = malloc(filesize(fh));
        //memset(json_string, 0, sizeof(*json_string));
        memset(&p, 0, sizeof(p));