Lines Matching refs:k

158                               "expected list of \"scriptpath\"", cpk[cpv->k_id].k);  in SETDEFAULTS_FUNC()
192 #define lua_getfield_and_type(L,idx,k) \ argument
193 (lua_getfield((L),(idx),(k)), lua_type((L),-1))
197 #define lua_getfield_and_type(L,idx,k) \ argument
198 lua_getfield((L),(idx),(k))
356 const char * const k = luaL_checklstring(L, 2, &klen);
358 array_get_element_klen(a, k, klen);
494 const_buffer k = magnet_checkconstbuffer(L, -1); in magnet_stat_field() local
495 switch (k.len ? k.ptr[0] : 0) { in magnet_stat_field()
497 if (0 != strcmp(k.ptr, "content-type")) break; in magnet_stat_field()
507 if (0 != strcmp(k.ptr, "etag")) break; in magnet_stat_field()
517 if (0 != strcmp(k.ptr, "http-response-send-file")) break; in magnet_stat_field()
526 if (k.len < 4) break; in magnet_stat_field()
527 switch (k.ptr[3]) { in magnet_stat_field()
529 if (0 == strcmp(k.ptr, "is_block")) { in magnet_stat_field()
535 if (0 == strcmp(k.ptr, "is_char")) { in magnet_stat_field()
541 if (0 == strcmp(k.ptr, "is_dir")) { in magnet_stat_field()
547 if (0 == strcmp(k.ptr, "is_file")) { in magnet_stat_field()
551 if (0 == strcmp(k.ptr, "is_fifo")) { in magnet_stat_field()
557 if (0 == strcmp(k.ptr, "is_link")) { in magnet_stat_field()
563 if (0 == strcmp(k.ptr, "is_socket")) { in magnet_stat_field()
573 if (k.len < 4) break; in magnet_stat_field()
574 switch (k.ptr[3]) { in magnet_stat_field()
576 if (0 == strcmp(k.ptr, "st_atime")) { in magnet_stat_field()
580 if (0 == strcmp(k.ptr, "st_atim")) { in magnet_stat_field()
596 if (0 == strcmp(k.ptr, "st_ctime")) { in magnet_stat_field()
600 if (0 == strcmp(k.ptr, "st_ctim")) { in magnet_stat_field()
616 if (0 == strcmp(k.ptr, "st_ino")) { in magnet_stat_field()
622 if (0 == strcmp(k.ptr, "st_mtime")) { in magnet_stat_field()
626 if (0 == strcmp(k.ptr, "st_mtim")) { in magnet_stat_field()
640 if (0 == strcmp(k.ptr, "st_mode")) { in magnet_stat_field()
646 if (0 == strcmp(k.ptr, "st_gid")) { in magnet_stat_field()
652 if (0 == strcmp(k.ptr, "st_size")) { in magnet_stat_field()
658 if (0 == strcmp(k.ptr, "st_uid")) { in magnet_stat_field()
1566 const char * const k = luaL_checklstring(L, 2, &klen); in magnet_reqhdr_get() local
1568 const int id = http_header_hkey_get(k, (uint32_t)klen); in magnet_reqhdr_get()
1569 magnet_push_buffer(L, http_header_request_get(r, id, k, klen)); in magnet_reqhdr_get()
1574 const_buffer k = magnet_checkconstbuffer(L, 2); in magnet_reqhdr_set() local
1578 enum http_header_e id = http_header_hkey_get(k.ptr, (uint32_t)k.len); in magnet_reqhdr_set()
1631 ? http_header_request_set(r, id, k.ptr, k.len, v.ptr, v.len) in magnet_reqhdr_set()
1632 : http_header_request_unset(r, id, k.ptr, k.len); in magnet_reqhdr_set()
1645 const char * const k = luaL_checklstring(L, 2, &klen); in magnet_resphdr_get() local
1647 const int id = http_header_hkey_get(k, (uint32_t)klen); in magnet_resphdr_get()
1648 magnet_push_buffer(L, http_header_response_get(r, id, k, klen)); in magnet_resphdr_get()
1653 const const_buffer k = magnet_checkconstbuffer(L, -2); in magnet_resphdr_set_kv() local
1655 const enum http_header_e id = http_header_hkey_get(k.ptr, (uint32_t)k.len); in magnet_resphdr_set_kv()
1677 http_header_response_unset(r, id, k.ptr, k.len); in magnet_resphdr_set_kv()
1681 buffer * const vb = http_header_response_set_ptr(r, id, k.ptr, k.len); in magnet_resphdr_set_kv()
1713 const_buffer k = magnet_checkconstbuffer(L, 2); in magnet_plugin_stats_get() local
1714 lua_pushinteger(L, (lua_Integer)*plugin_stats_get_ptr(k.ptr, k.len)); in magnet_plugin_stats_get()
1719 const_buffer k = magnet_checkconstbuffer(L, 2); in magnet_plugin_stats_set() local
1720 plugin_stats_set(k.ptr, k.len, luaL_checkinteger(L, 3)); in magnet_plugin_stats_set()
1733 const char * const k = luaL_checklstring(L, 2, &klen); in magnet_req_item_get() local
1737 if (0 == memcmp(k, "bytes_in", 8)) { in magnet_req_item_get()
1743 if (0 == memcmp(k, "bytes_out", 9)) { in magnet_req_item_get()
1747 if (0 == memcmp(k, "stream_id", 9)) { in magnet_req_item_get()
1751 if (0 == memcmp(k, "req_count", 9)) { in magnet_req_item_get()
1757 if (0 == memcmp(k, "start_time", 10)) { in magnet_req_item_get()
1763 if (0 == memcmp(k, "keep_alive", 10)) { in magnet_req_item_get()
1769 if (0 == memcmp(k, "http_status", 11)) { in magnet_req_item_get()
1775 if (0 == memcmp(k, "req_header_len", 14)) { in magnet_req_item_get()
1781 if (0 == memcmp(k, "resp_header_len", 15)) { in magnet_req_item_get()
1789 return luaL_error(L, "r.req_item['%s'] invalid", k); in magnet_req_item_get()
1796 const char * const k = luaL_checklstring(L, 2, &klen); in magnet_req_item_set() local
1802 if (0 == memcmp(k, "keep_alive", 10)) { in magnet_req_item_set()
1810 return luaL_error(L, "r.req_item['%s'] invalid or read-only", k); in magnet_req_item_set()
2022 const char * const k = luaL_checklstring(L, 2, &klen); in magnet_env_get() local
2023 const int env_id = magnet_env_get_id(k, klen); in magnet_env_get()
2172 const char * const k = luaL_checklstring(L, 2, &klen); in magnet_envvar_get() local
2174 magnet_push_buffer(L, http_header_env_get(r, k, klen)); in magnet_envvar_get()
2279 const char * const k = luaL_checklstring(L, 2, &klen); in magnet_respbody() local
2280 switch (k[0]) { in magnet_respbody()
2282 if (k[1] == 'd' && k[2] == 'd' && k[3] == '\0') { in magnet_respbody()
2289 if (klen == 8 && 0 == memcmp(k, "bytes_in", 8)) { in magnet_respbody()
2293 if (klen == 9 && 0 == memcmp(k, "bytes_out", 9)) { in magnet_respbody()
2303 if (k[1] == 'e' && k[2] == 't' && k[3] == '\0') { in magnet_respbody()
2317 if (k[1] == 'e' && k[2] == 'n' && k[3] == '\0') { in magnet_respbody()
2326 if (k[1] == 'e' && k[2] == 't' && k[3] == '\0') { in magnet_respbody()
2390 const char * const k = luaL_checklstring(L, 2, &klen); in magnet_reqbody() local
2391 switch (k[0]) { in magnet_reqbody()
2393 if (k[1] == 'd' && k[2] == 'd' && k[3] == '\0') { in magnet_reqbody()
2405 if (klen == 8 && 0 == memcmp(k, "bytes_in", 8)) { in magnet_reqbody()
2409 if (klen == 9 && 0 == memcmp(k, "bytes_out", 9)) { in magnet_reqbody()
2415 if (klen == 7 && 0 == memcmp(k, "collect", 7)) { in magnet_reqbody()
2441 if (k[1] == 'e' && k[2] == 't' && k[3] == '\0') { in magnet_reqbody()
2454 if (k[1] == 'e' && k[2] == 'n' && k[3] == '\0') { in magnet_reqbody()
2460 if (k[1] == 'e' && k[2] == 't' && k[3] == '\0') { in magnet_reqbody()
2488 const_buffer k = magnet_checkconstbuffer(L, 2); in magnet_lighty_result_get() local
2489 if ( (k.len == 6 && 0 == memcmp(k.ptr, "header", 6)) in magnet_lighty_result_get()
2490 || (k.len == 7 && 0 == memcmp(k.ptr, "content", 7))) { in magnet_lighty_result_get()
2757 const char * const k = luaL_checklstring(L, 2, &klen); in magnet_server_stats_get() local
2762 if (0 == memcmp(k, "uptime", 6)) { in magnet_server_stats_get()
2768 if (0 == memcmp(k, "version", 7)) { in magnet_server_stats_get()
2775 if (0 == memcmp(k, "clients_open", 12)) { in magnet_server_stats_get()
2784 return luaL_error(L, "server.stats['%s'] invalid", k); in magnet_server_stats_get()