From: sparky4 Date: Tue, 2 Jun 2015 18:39:25 +0000 (-0500) Subject: wwww testing huge map readings~ X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=48ea577d47c8f0ae5230fb0b54c6f210ea196e57;p=16.git wwww testing huge map readings~ modified: maptest.exe modified: maptest0.exe modified: scroll.exe modified: src/lib/mapread.c modified: src/lib/mapread.h modified: src/maptest0.c --- diff --git a/maptest.exe b/maptest.exe index dc50247e..a772c37b 100644 Binary files a/maptest.exe and b/maptest.exe differ diff --git a/maptest0.exe b/maptest0.exe index 2fc0e966..e58d6828 100644 Binary files a/maptest0.exe and b/maptest0.exe differ diff --git a/scroll.exe b/scroll.exe index eedd2c97..0968b28b 100644 Binary files a/scroll.exe and b/scroll.exe differ diff --git a/src/lib/mapread.c b/src/lib/mapread.c index 63e123b7..09c7ba46 100644 --- a/src/lib/mapread.c +++ b/src/lib/mapread.c @@ -9,7 +9,7 @@ int jsoneq(const char huge *json, jsmntok_t huge *tok, const char huge *s) { } //this function is quite messy ^^; sorry! it is a quick and dirty fix~ -int dump(const char huge *js, jsmntok_t huge *t, size_t count, int indent, char *js_sv, map_t *map, int q) { +int dump(const char huge *js, jsmntok_t huge *t, size_t count, int indent, char *js_sv, map_t huge *map, int q) { int i, j, k; bitmap_t bp; #ifdef DEBUG_JS @@ -194,6 +194,9 @@ again: //printf("buff=[%Fp]\n", buff); //printf("(*buff)=[%Fp]\n", (*buff)); //printf("&(*buff)=[\n%s\n]\n", &(*buff)); + #ifdef DEBUG_DUMPVARS + fprintf(stdout, "running dump~\n"); + #endif dump(js, tok, p.toknext, incr, &js_ss, map, 0); eof_expected = 1; } diff --git a/src/lib/mapread.h b/src/lib/mapread.h index 58769d5d..eb75663e 100644 --- a/src/lib/mapread.h +++ b/src/lib/mapread.h @@ -10,10 +10,10 @@ #include "src/lib/modex16.h" #include "src/lib/lib_head.h" -#define DEBUG_MAPDATA +//#define DEBUG_MAPDATA #define DEBUG_MAPVAR -#define DEBUG_DUMPVARS -#define DEBUG_JS +//#define DEBUG_DUMPVARS +//#define DEBUG_JS typedef struct { bitmap_t *data; @@ -31,7 +31,7 @@ typedef struct { } map_t; int jsoneq(const char huge *json, jsmntok_t huge *tok, const char huge *s); -int dump(const char huge *js, jsmntok_t huge *t, size_t count, int indent, char *js_sv, map_t *map, int q); +int dump(const char huge *js, jsmntok_t huge *t, size_t count, int indent, char *js_sv, map_t huge *map, int q); int loadmap(char *mn, map_t *map); #endif/*_LIBMAPREAD_H_*/ diff --git a/src/maptest0.c b/src/maptest0.c index 244f16bc..b682eb02 100644 --- a/src/maptest0.c +++ b/src/maptest0.c @@ -2,7 +2,7 @@ #include "src/lib/mapread.h" #define DUMP -#define DUMP_MAP +//#define DUMP_MAP void main(int argc, char *argv[]) @@ -11,12 +11,15 @@ main(int argc, char *argv[]) short i; char *fmt = "Memory available = %u\n"; char *fmt0 = "Largest Contiguous Block of Memory available = %u\n"; + fprintf(stderr, fmt, _memavl()); fprintf(stderr, fmt0, _memmax()); - while(!kbhit()); - fprintf(stderr, "loading~\n"); + fprintf(stderr, "Size of map var = %u\n", _msize(&map)); + getch(); + + fprintf(stderr, "loading~\n\n"); loadmap("data/tes0.map", &map); - fprintf(stderr, "okies~\n"); + fprintf(stderr, "\nokies~\n"); #ifdef DUMP fprintf(stdout, "map.width= %d\n", map.width); fprintf(stdout, "map.height= %d\n", map.height);