X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fjsmn%2Fjsmn.c;h=a0f4f69c6710939fefb2c4d04cbfa5b0e5a19946;hb=1f0c7fdf6d8cc3b6c9c86983c0336e9cb7ae5635;hp=fd407953eb8895da9da7d01fd35cde1af286f752;hpb=8e7cced60cc3375099328304114e9a1ce4ea5139;p=16.git diff --git a/src/lib/jsmn/jsmn.c b/src/lib/jsmn/jsmn.c old mode 100644 new mode 100755 index fd407953..a0f4f69c --- a/src/lib/jsmn/jsmn.c +++ b/src/lib/jsmn/jsmn.c @@ -5,9 +5,9 @@ /** * Allocates a fresh unused token from the token pull. */ -static jsmntok_t huge *jsmn_alloc_token(jsmn_parser huge *parser, - jsmntok_t huge *tokens, size_t num_tokens) { - jsmntok_t huge *tok; +static jsmntok_t *jsmn_alloc_token(jsmn_parser *parser, + jsmntok_t *tokens, size_t num_tokens) { + jsmntok_t *tok; if (parser->toknext >= num_tokens) { return NULL; } @@ -23,7 +23,7 @@ static jsmntok_t huge *jsmn_alloc_token(jsmn_parser huge *parser, /** * Fills token type and boundaries. */ -static void jsmn_fill_token(jsmntok_t huge *token, jsmntype_t type, +static void jsmn_fill_token(jsmntok_t *token, jsmntype_t type, int start, int end) { token->type = type; token->start = start; @@ -34,9 +34,9 @@ static void jsmn_fill_token(jsmntok_t huge *token, jsmntype_t type, /** * Fills next available token with JSON primitive. */ -static jsmnerr_t jsmn_parse_primitive(jsmn_parser huge *parser, const char huge *js, - size_t len, jsmntok_t huge *tokens, size_t num_tokens) { - jsmntok_t huge *token; +static jsmnerr_t jsmn_parse_primitive(jsmn_parser *parser, const char *js, + size_t len, jsmntok_t *tokens, size_t num_tokens) { + jsmntok_t *token; int start; start = parser->pos; @@ -83,9 +83,9 @@ found: /** * Filsl next token with JSON string. */ -static jsmnerr_t jsmn_parse_string(jsmn_parser huge *parser, const char huge *js, - size_t len, jsmntok_t huge *tokens, size_t num_tokens) { - jsmntok_t huge *token; +static jsmnerr_t jsmn_parse_string(jsmn_parser *parser, const char *js, + size_t len, jsmntok_t *tokens, size_t num_tokens) { + jsmntok_t *token; int start = parser->pos; @@ -150,11 +150,11 @@ static jsmnerr_t jsmn_parse_string(jsmn_parser huge *parser, const char huge *js /** * Parse JSON string and fill tokens. */ -jsmnerr_t jsmn_parse(jsmn_parser *parser, const char huge *js, size_t len, - jsmntok_t huge *tokens, unsigned int num_tokens) { +jsmnerr_t jsmn_parse(jsmn_parser *parser, const char *js, size_t len, + jsmntok_t *tokens, unsigned int num_tokens) { jsmnerr_t r; int i; - jsmntok_t huge *token; + jsmntok_t *token; int count = 0; for (; parser->pos < len && js[parser->pos] != '\0'; parser->pos++) { @@ -264,7 +264,7 @@ jsmnerr_t jsmn_parse(jsmn_parser *parser, const char huge *js, size_t len, case 't': case 'f': case 'n' : /* And they must not be keys of the object */ if (tokens != NULL) { - jsmntok_t huge *t = &tokens[parser->toksuper]; + jsmntok_t *t = &tokens[parser->toksuper]; if (t->type == JSMN_OBJECT || (t->type == JSMN_STRING && t->size != 0)) { return JSMN_ERROR_INVAL;