}
//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
//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;
}
#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 {\r
bitmap_t *data;
} 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_*/
#include "src/lib/mapread.h"\r
#define DUMP
-#define DUMP_MAP
+//#define DUMP_MAP
void
main(int argc, char *argv[])\r
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);