]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/jsmn/jsmn.c
ok it just needs the mode x values!
[16.git] / src / lib / jsmn / jsmn.c
old mode 100644 (file)
new mode 100755 (executable)
index fd40795..a0f4f69
@@ -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;