Lines Matching refs:token
67 static int _process_token_len(mcp_parser_t *pr, size_t token) { in _process_token_len() argument
68 const char *s = pr->request + pr->tokens[token]; in _process_token_len()
69 const char *e = pr->request + pr->tokens[token+1]; in _process_token_len()
123 static int _process_request_metaflags(mcp_parser_t *pr, int token) { in _process_request_metaflags() argument
124 if (pr->ntokens <= token) { in _process_request_metaflags()
128 const char *cur = pr->request + pr->tokens[token]; in _process_request_metaflags()
730 int token = luaL_checkinteger(L, 2); in mcplib_request_token() local
732 if (token < 1 || token > rq->pr.ntokens) { in mcplib_request_token()
743 if (mcp_request_render(rq, token-1, 0, newtok, newlen) != 0) { in mcplib_request_token()
750 const char *start = rq->pr.request + rq->pr.tokens[token-1]; in mcplib_request_token()
751 vlen = _process_token_len(&rq->pr, token-1); in mcplib_request_token()
789 int64_t token = 0; in mcplib_request_token_int() local
790 if (safe_strtoll(temp, &token)) { in mcplib_request_token_int()
791 lua_pushinteger(L, token); in mcplib_request_token_int()
920 int64_t token = 0; in mcplib_request_flag_token_int() local
921 if (safe_strtoll(temp, &token)) { in mcplib_request_flag_token_int()
922 lua_pushinteger(L, token); in mcplib_request_flag_token_int()
959 const char *token = NULL; in _mcp_request_check_flag_token() local
962 token = lua_tolstring(L, idx, tlen); in _mcp_request_check_flag_token()
968 token = tostring; in _mcp_request_check_flag_token()
981 return token; in _mcp_request_check_flag_token()
999 const char *token = _mcp_request_check_flag_token(L, 3, tostring, &tlen); in mcplib_request_flag_add() local
1001 if (mcp_request_append(rq, flag, token, tlen) == 0) { in mcplib_request_flag_add()
1019 const char *token = _mcp_request_check_flag_token(L, 3, tostring, &tlen); in mcplib_request_flag_set() local
1025 if (mcp_request_render(rq, x, flag, token, tlen) != 0) { in mcplib_request_flag_set()
1030 if (mcp_request_append(rq, flag, token, tlen) != 0) { in mcplib_request_flag_set()
1051 const char *token = _mcp_request_check_flag_token(L, 4, tostring, &tlen); in mcplib_request_flag_replace() local
1054 if (mcp_request_render(rq, x, newflag, token, tlen) != 0) { in mcplib_request_flag_replace()
1059 if (mcp_request_append(rq, newflag, token, tlen) != 0) { in mcplib_request_flag_replace()
1212 int mcp_request_find_flag_token(mcp_request_t *rq, const char flag, const char **token, size_t *len… in mcp_request_find_flag_token() argument
1217 *token = rq->pr.request + rq->pr.tokens[x] +1; in mcp_request_find_flag_token()
1219 *token = NULL; in mcp_request_find_flag_token()
1228 int mcp_request_find_flag_tokenint64(mcp_request_t *rq, const char flag, int64_t *token) { in mcp_request_find_flag_tokenint64() argument
1239 if (safe_strtoll(temp, token)) { in mcp_request_find_flag_tokenint64()