-int jsoneq(const char huge *json, jsmntok_t huge *tok, const char *s) {
- if (tok->type == JSMN_STRING && (int) strlen(s) == tok->end - tok->start &&
- strncmp((char const near *)json + tok->start, s, tok->end - tok->start) == 0) {
+int jsoneq(const char huge *json, jsmntok_t huge *tok, const char huge *s) {
+ if (tok->type == JSMN_STRING && (int)_fstrlen(s) == tok->end - tok->start &&
+ _fstrncmp((char const *)json + tok->start, s, tok->end - tok->start) == 0) {
{
//---- map->height = (unsigned int)strtol(js+t->start, (char **)js+t->end, 10);
map->height = atoi((const char *)js+t->start);
{
//---- map->height = (unsigned int)strtol(js+t->start, (char **)js+t->end, 10);
map->height = atoi((const char *)js+t->start);
fprintf(stdout, "indent= [%d] ", indent);
fprintf(stdout, "h:[%d]\n", map->height);
#endif
fprintf(stdout, "indent= [%d] ", indent);
fprintf(stdout, "h:[%d]\n", map->height);
#endif
{
//---- map->width = (unsigned int)strtol(js+t->start, (char **)js+t->end, 10);
map->width = atoi((const char *)js+t->start);
{
//---- map->width = (unsigned int)strtol(js+t->start, (char **)js+t->end, 10);
map->width = atoi((const char *)js+t->start);
- strcpy(js_sv, "width");//strdup(js+t->start);//, t->end - t->start);
- }else strcpy(js_sv, "\0");
+ _fstrcpy(js_sv, "width");//strdup(js+t->start);//, t->end - t->start);
+ }else _fstrcpy(js_sv, "\0");
for (;;) {
/* Read another chunk */
r = fread(buf, 1, sizeof(buf), fh);
for (;;) {
/* Read another chunk */
r = fread(buf, 1, sizeof(buf), fh);
r = jsmn_parse(&p, js, jslen, tok, tokcount);
if (r < 0) {
if (r == JSMN_ERROR_NOMEM) {
r = jsmn_parse(&p, js, jslen, tok, tokcount);
if (r < 0) {
if (r == JSMN_ERROR_NOMEM) {
- printf("js=%Fp\n", js);
- printf("*js=%Fp\n", (*js));
- printf("*js=%s\n", &(*js));
- printf("&buf=[%Fp]\n", &buf);
+ //printf("js=%Fp\n", (js));
+ //printf("*js=%Fp\n", (*(js)));
+ //printf("&*js=%s\n", &(*(js)));
+ //printf("&buf=[%Fp]\n", &buf);
//printf("&buf_seg=[%x]\n", FP_SEG(&buf));
//printf("&buf_off=[%x]\n", FP_OFF(&buf));
//printf("&buf_fp=[%Fp]\n", MK_FP(FP_SEG(&buf), FP_OFF(&buf)));
//printf("buf=[\n%s\n]\n", buf);
//printf("&buf_seg=[%x]\n", FP_SEG(&buf));
//printf("&buf_off=[%x]\n", FP_OFF(&buf));
//printf("&buf_fp=[%Fp]\n", MK_FP(FP_SEG(&buf), FP_OFF(&buf)));
//printf("buf=[\n%s\n]\n", buf);
- printf("buff=[%Fp]\n", buff);
- printf("(*buff)=[%Fp]\n", (*buff));
- printf("&(*buff)=[\n%s\n]\n", &(*buff));
+ //printf("buff=[%Fp]\n", buff);
+ //printf("(*buff)=[%Fp]\n", (*buff));
+ //printf("&(*buff)=[\n%s\n]\n", &(*buff));
dump(js, tok, p.toknext, incr, &js_ss, map, 0);
eof_expected = 1;
}
}
dump(js, tok, p.toknext, incr, &js_ss, map, 0);
eof_expected = 1;
}
}