]> 4ch.mooo.com Git - 16.git/commitdiff
modified: src/lib/jsmn/example/MAPTEST.EXE
authorsparky4 <sparky4@cock.li>
Sun, 22 Mar 2015 17:19:58 +0000 (12:19 -0500)
committersparky4 <sparky4@cock.li>
Sun, 22 Mar 2015 17:19:58 +0000 (12:19 -0500)
modified:   src/lib/jsmn/example/jsondump.c
modified:   src/lib/jsmn/example/maptest.c

src/lib/jsmn/example/MAPTEST.EXE
src/lib/jsmn/example/jsondump.c
src/lib/jsmn/example/maptest.c

index 884e5f6705472bbffd74c717d37fd709b9e62833..85c362798d47181d1a6d3b9c01ded6ee932b732e 100644 (file)
Binary files a/src/lib/jsmn/example/MAPTEST.EXE and b/src/lib/jsmn/example/MAPTEST.EXE differ
index e0f998589c08bab88cf3f6fb474cec3fa23a5756..04d9f5aea28bff16fca984c9c43d366ec4e73d53 100644 (file)
@@ -50,7 +50,7 @@ int main() {
        int eof_expected = 0;
        char *js = NULL;
        size_t jslen = 0;
-       char buf[BUFSIZ-256];
+       char buf[BUFSIZ];
 
        jsmn_parser p;
        jsmntok_t *tok;
index 942402fab92fd61e0239af6a94c9f82dd07f9261..5ad017075070c23dc0259e8c23ce0b7383c846c4 100644 (file)
@@ -13,7 +13,7 @@
        "\"groups\": [\"users\", \"wheel\", \"audio\", \"video\"]}";*/
 
 char *JSON_STRING;
-char JSON_S[6144];
+char JSON_S[8192];
 
 long int filesize(FILE *fp)\r
 {\r
@@ -39,7 +39,7 @@ int main() {
        int r;
        jsmn_parser p;
        FILE *fh = fopen("../../../../data/test.map", "r");
-       jsmntok_t t[1536]; /* We expect no more than 128 tokens */
+       jsmntok_t t[2048]; /* We expect no more than 128 tokens */
        //memset(JSON_S, 0, sizeof(JSON_S));
 
        if(fh != NULL)
@@ -53,7 +53,7 @@ int main() {
        jsmn_init(&p);
        r = jsmn_parse(&p, JSON_STRING, filesize(fh), t, sizeof(t)/sizeof(t[0]));
                fclose(fh); fh = NULL;
-       //printf("%s", JSON_STRING);
+       printf("%s", JSON_STRING);
        if (r < 0) {
                printf("Failed to parse JSON: %d\n", r);
                return 1;