/civetweb-2.7.6/src/third_party/lua-5.1.5/src/ |
D | lapi.c | 41 #define api_checknelems(L, n) api_check(L, (n) <= (L->top - L->base)) argument 43 #define api_checkvalidindex(L, i) api_check(L, (i) != luaO_nilobject) argument 45 #define api_incr_top(L) {api_check(L, L->top < L->ci->top); L->top++;} argument 49 static TValue *index2adr (lua_State *L, int idx) { in index2adr() argument 51 TValue *o = L->base + (idx - 1); in index2adr() 52 api_check(L, idx <= L->ci->top - L->base); in index2adr() 53 if (o >= L->top) return cast(TValue *, luaO_nilobject); in index2adr() 57 api_check(L, idx != 0 && -idx <= L->top - L->base); in index2adr() 58 return L->top + idx; in index2adr() 60 else switch (idx) { /* pseudo-indices */ in index2adr() [all …]
|
D | ldo.c | 38 ** Error-recovery functions 51 void luaD_seterrorobj (lua_State *L, int errcode, StkId oldtop) { in luaD_seterrorobj() argument 54 setsvalue2s(L, oldtop, luaS_newliteral(L, MEMERRMSG)); in luaD_seterrorobj() 58 setsvalue2s(L, oldtop, luaS_newliteral(L, "error in error handling")); in luaD_seterrorobj() 63 setobjs2s(L, oldtop, L->top - 1); /* error message on current top */ in luaD_seterrorobj() 67 L->top = oldtop + 1; in luaD_seterrorobj() 71 static void restore_stack_limit (lua_State *L) { in restore_stack_limit() argument 72 lua_assert(L->stack_last - L->stack == L->stacksize - EXTRA_STACK - 1); in restore_stack_limit() 73 if (L->size_ci > LUAI_MAXCALLS) { /* there was an overflow? */ in restore_stack_limit() 74 int inuse = cast_int(L->ci - L->base_ci); in restore_stack_limit() [all …]
|
D | lvm.c | 31 /* limit for table tag-method chains (to avoid loops) */ 47 int luaV_tostring (lua_State *L, StkId obj) { in luaV_tostring() argument 54 setsvalue2s(L, obj, luaS_new(L, s)); in luaV_tostring() 60 static void traceexec (lua_State *L, const Instruction *pc) { in traceexec() argument 61 lu_byte mask = L->hookmask; in traceexec() 62 const Instruction *oldpc = L->savedpc; in traceexec() 63 L->savedpc = pc; in traceexec() 64 if ((mask & LUA_MASKCOUNT) && L->hookcount == 0) { in traceexec() 65 resethookcount(L); in traceexec() 66 luaD_callhook(L, LUA_HOOKCOUNT, -1); in traceexec() [all …]
|
D | lauxlib.c | 32 #define abs_index(L, i) ((i) > 0 || (i) <= LUA_REGISTRYINDEX ? (i) : \ argument 33 lua_gettop(L) + (i) + 1) 38 ** Error-report functions 43 LUALIB_API int luaL_argerror (lua_State *L, int narg, const char *extramsg) { in luaL_argerror() argument 45 if (!lua_getstack(L, 0, &ar)) /* no stack frame? */ in luaL_argerror() 46 return luaL_error(L, "bad argument #%d (%s)", narg, extramsg); in luaL_argerror() 47 lua_getinfo(L, "n", &ar); in luaL_argerror() 49 narg--; /* do not count `self' */ in luaL_argerror() 51 return luaL_error(L, "calling " LUA_QS " on bad self (%s)", in luaL_argerror() 56 return luaL_error(L, "bad argument #%d to " LUA_QS " (%s)", in luaL_argerror() [all …]
|
D | lstate.c | 28 #define fromstate(l) (cast(lu_byte *, (l)) - LUAI_EXTRASPACE) argument 29 #define tostate(l) (cast(lua_State *, cast(lu_byte *, l) + LUAI_EXTRASPACE)) argument 36 lua_State l; member 42 static void stack_init (lua_State *L1, lua_State *L) { in stack_init() argument 44 L1->base_ci = luaM_newvector(L, BASIC_CI_SIZE, CallInfo); in stack_init() 45 L1->ci = L1->base_ci; in stack_init() 46 L1->size_ci = BASIC_CI_SIZE; in stack_init() 47 L1->end_ci = L1->base_ci + L1->size_ci - 1; in stack_init() 49 L1->stack = luaM_newvector(L, BASIC_STACK_SIZE + EXTRA_STACK, TValue); in stack_init() 50 L1->stacksize = BASIC_STACK_SIZE + EXTRA_STACK; in stack_init() [all …]
|
D | ltablib.c | 19 #define aux_getn(L,n) (luaL_checktype(L, n, LUA_TTABLE), luaL_getn(L, n)) argument 22 static int foreachi (lua_State *L) { in foreachi() argument 24 int n = aux_getn(L, 1); in foreachi() 25 luaL_checktype(L, 2, LUA_TFUNCTION); in foreachi() 27 lua_pushvalue(L, 2); /* function */ in foreachi() 28 lua_pushinteger(L, i); /* 1st argument */ in foreachi() 29 lua_rawgeti(L, 1, i); /* 2nd argument */ in foreachi() 30 lua_call(L, 2, 1); in foreachi() 31 if (!lua_isnil(L, -1)) in foreachi() 33 lua_pop(L, 1); /* remove nil result */ in foreachi() [all …]
|
D | lbaselib.c | 31 static int luaB_print (lua_State *L) { in luaB_print() argument 32 int n = lua_gettop(L); /* number of arguments */ in luaB_print() 34 lua_getglobal(L, "tostring"); in luaB_print() 37 lua_pushvalue(L, -1); /* function to be called */ in luaB_print() 38 lua_pushvalue(L, i); /* value to print */ in luaB_print() 39 lua_call(L, 1, 1); in luaB_print() 40 s = lua_tostring(L, -1); /* get result */ in luaB_print() 42 return luaL_error(L, LUA_QL("tostring") " must return a string to " in luaB_print() 46 lua_pop(L, 1); /* pop result */ in luaB_print() 53 static int luaB_tonumber (lua_State *L) { in luaB_tonumber() argument [all …]
|
/civetweb-2.7.6/src/third_party/lua-5.3.5/src/ |
D | lapi.c | 39 /* value at a non-valid index */ 54 #define api_checkvalidindex(l,o) api_check(l, isvalid(o), "invalid index") argument 56 #define api_checkstackindex(l, i, o) \ argument 57 api_check(l, isstackindex(i, o), "index not in the stack") 60 static TValue *index2addr (lua_State *L, int idx) { in index2addr() argument 61 CallInfo *ci = L->ci; in index2addr() 63 TValue *o = ci->func + idx; in index2addr() 64 api_check(L, idx <= ci->top - (ci->func + 1), "unacceptable index"); in index2addr() 65 if (o >= L->top) return NONVALIDVALUE; in index2addr() 69 api_check(L, idx != 0 && -idx <= L->top - (ci->func + 1), "invalid index"); in index2addr() [all …]
|
D | ldo.c | 43 ** Error-recovery functions 58 #define LUAI_THROW(L,c) throw(c) argument 59 #define LUAI_TRY(L,c,a) \ argument 60 try { a } catch(...) { if ((c)->status == 0) (c)->status = -1; } 66 #define LUAI_THROW(L,c) _longjmp((c)->b, 1) argument 67 #define LUAI_TRY(L,c,a) if (_setjmp((c)->b) == 0) { a } argument 73 #define LUAI_THROW(L,c) longjmp((c)->b, 1) argument 74 #define LUAI_TRY(L,c,a) if (setjmp((c)->b) == 0) { a } argument 91 static void seterrorobj (lua_State *L, int errcode, StkId oldtop) { in seterrorobj() argument 94 setsvalue2s(L, oldtop, G(L)->memerrmsg); /* reuse preregistered msg. */ in seterrorobj() [all …]
|
D | lauxlib.c | 43 ** search for 'objidx' in table at index -1. 46 static int findfield (lua_State *L, int objidx, int level) { in findfield() argument 47 if (level == 0 || !lua_istable(L, -1)) in findfield() 49 lua_pushnil(L); /* start 'next' loop */ in findfield() 50 while (lua_next(L, -2)) { /* for each pair in table */ in findfield() 51 if (lua_type(L, -2) == LUA_TSTRING) { /* ignore non-string keys */ in findfield() 52 if (lua_rawequal(L, objidx, -1)) { /* found object? */ in findfield() 53 lua_pop(L, 1); /* remove value (but keep name) */ in findfield() 56 else if (findfield(L, objidx, level - 1)) { /* try recursively */ in findfield() 57 lua_remove(L, -2); /* remove table (but keep name) */ in findfield() [all …]
|
D | lstate.c | 56 lua_State l; member 64 LX l; member 70 #define fromstate(L) (cast(LX *, cast(lu_byte *, (L)) - offsetof(LX, l))) argument 81 static unsigned int makeseed (lua_State *L) { in makeseed() argument 85 addbuff(buff, p, L); /* heap variable */ in makeseed() 101 if (debt < tb - MAX_LMEM) in luaE_setdebt() 102 debt = tb - MAX_LMEM; /* will make 'totalbytes == MAX_LMEM' */ in luaE_setdebt() 103 g->totalbytes = tb - debt; in luaE_setdebt() 104 g->GCdebt = debt; in luaE_setdebt() 108 CallInfo *luaE_extendCI (lua_State *L) { in luaE_extendCI() argument [all …]
|
/civetweb-2.7.6/src/third_party/lua-5.2.4/src/ |
D | lapi.c | 37 /* value at a non-valid index */ 49 #define api_checkvalidindex(L, o) api_check(L, isvalid(o), "invalid index") argument 51 #define api_checkstackindex(L, i, o) \ argument 52 api_check(L, isstackindex(i, o), "index not in the stack") 55 static TValue *index2addr (lua_State *L, int idx) { in index2addr() argument 56 CallInfo *ci = L->ci; in index2addr() 58 TValue *o = ci->func + idx; in index2addr() 59 api_check(L, idx <= ci->top - (ci->func + 1), "unacceptable index"); in index2addr() 60 if (o >= L->top) return NONVALIDVALUE; in index2addr() 64 api_check(L, idx != 0 && -idx <= L->top - (ci->func + 1), "invalid index"); in index2addr() [all …]
|
D | ldo.c | 39 ** Error-recovery functions 53 #define LUAI_THROW(L,c) throw(c) argument 54 #define LUAI_TRY(L,c,a) \ argument 55 try { a } catch(...) { if ((c)->status == 0) (c)->status = -1; } 60 #define LUAI_THROW(L,c) _longjmp((c)->b, 1) argument 61 #define LUAI_TRY(L,c,a) if (_setjmp((c)->b) == 0) { a } argument 66 #define LUAI_THROW(L,c) longjmp((c)->b, 1) argument 67 #define LUAI_TRY(L,c,a) if (setjmp((c)->b) == 0) { a } argument 84 static void seterrorobj (lua_State *L, int errcode, StkId oldtop) { in seterrorobj() argument 87 setsvalue2s(L, oldtop, G(L)->memerrmsg); /* reuse preregistered msg. */ in seterrorobj() [all …]
|
D | lvm.c | 31 /* limit for table tag-method chains (to avoid loops) */ 38 if (ttisstring(obj) && luaO_str2d(svalue(obj), tsvalue(obj)->len, &num)) { in luaV_tonumber() 47 int luaV_tostring (lua_State *L, StkId obj) { in luaV_tostring() argument 53 int l = lua_number2str(s, n); in luaV_tostring() local 54 setsvalue2s(L, obj, luaS_newlstr(L, s, l)); in luaV_tostring() 60 static void traceexec (lua_State *L) { in traceexec() argument 61 CallInfo *ci = L->ci; in traceexec() 62 lu_byte mask = L->hookmask; in traceexec() 63 int counthook = ((mask & LUA_MASKCOUNT) && L->hookcount == 0); in traceexec() 65 resethookcount(L); /* reset count */ in traceexec() [all …]
|
D | lauxlib.c | 40 ** search for 'objidx' in table at index -1. 43 static int findfield (lua_State *L, int objidx, int level) { in findfield() argument 44 if (level == 0 || !lua_istable(L, -1)) in findfield() 46 lua_pushnil(L); /* start 'next' loop */ in findfield() 47 while (lua_next(L, -2)) { /* for each pair in table */ in findfield() 48 if (lua_type(L, -2) == LUA_TSTRING) { /* ignore non-string keys */ in findfield() 49 if (lua_rawequal(L, objidx, -1)) { /* found object? */ in findfield() 50 lua_pop(L, 1); /* remove value (but keep name) */ in findfield() 53 else if (findfield(L, objidx, level - 1)) { /* try recursively */ in findfield() 54 lua_remove(L, -2); /* remove table (but keep name) */ in findfield() [all …]
|
D | lstate.c | 63 lua_State l; member 71 LX l; member 77 #define fromstate(L) (cast(LX *, cast(lu_byte *, (L)) - offsetof(LX, l))) argument 89 static unsigned int makeseed (lua_State *L) { in makeseed() argument 93 addbuff(buff, p, L); /* heap variable */ in makeseed() 107 g->totalbytes -= (debt - g->GCdebt); in luaE_setdebt() 108 g->GCdebt = debt; in luaE_setdebt() 112 CallInfo *luaE_extendCI (lua_State *L) { in luaE_extendCI() argument 113 CallInfo *ci = luaM_new(L, CallInfo); in luaE_extendCI() 114 lua_assert(L->ci->next == NULL); in luaE_extendCI() [all …]
|
D | ltablib.c | 20 #define aux_getn(L,n) (luaL_checktype(L, n, LUA_TTABLE), luaL_len(L, n)) argument 25 static int maxn (lua_State *L) { in maxn() argument 27 luaL_checktype(L, 1, LUA_TTABLE); in maxn() 28 lua_pushnil(L); /* first key */ in maxn() 29 while (lua_next(L, 1)) { in maxn() 30 lua_pop(L, 1); /* remove value */ in maxn() 31 if (lua_type(L, -1) == LUA_TNUMBER) { in maxn() 32 lua_Number v = lua_tonumber(L, -1); in maxn() 36 lua_pushnumber(L, max); in maxn() 42 static int tinsert (lua_State *L) { in tinsert() argument [all …]
|
D | liolib.c | 10 ** should not affect non-POSIX systems 58 #define lua_popen(L,c,m) ((void)L, fflush(NULL), popen(c,m)) argument 59 #define lua_pclose(L,file) ((void)L, pclose(file)) argument 63 #define lua_popen(L,c,m) ((void)L, _popen(c,m)) argument 64 #define lua_pclose(L,file) ((void)L, _pclose(file)) argument 69 #define lua_popen(L,c,m) ((void)((void)c, m), \ argument 70 luaL_error(L, LUA_QL("popen") " not supported"), (FILE*)0) 71 #define lua_pclose(L,file) ((void)((void)L, file), -1) argument 125 #define tolstream(L) ((LStream *)luaL_checkudata(L, 1, LUA_FILEHANDLE)) argument 127 #define isclosed(p) ((p)->closef == NULL) [all …]
|
/civetweb-2.7.6/src/third_party/duktape-1.8.0/src/ |
D | duktape.c | 5 * Git branch v1.8-maintenance. 19 * Copyright (c) 2013-2017 by Duktape authors (see AUTHORS.rst) 55 * Please include an e-mail address, a link to your GitHub profile, or something 65 * * L\u00e1szl\u00f3 Lang\u00f3 <llango.u-szeged@partner.samsung.com> 107 * * https://github.com/chris-y 111 * If you are accidentally missing from this list, send me an e-mail 116 * Top-level include file to be used for all (internal) source files. 130 * C types which is quite platform/compiler specific especially for a non-C99 363 * There are two packed type alternatives: an 8-byte representation 364 * based on an IEEE double (preferred for compactness), and a 12-byte [all …]
|
/civetweb-2.7.6/src/third_party/duktape-1.8.0/src-noline/ |
D | duktape.c | 5 * Git branch v1.8-maintenance. 19 * Copyright (c) 2013-2017 by Duktape authors (see AUTHORS.rst) 55 * Please include an e-mail address, a link to your GitHub profile, or something 65 * * L\u00e1szl\u00f3 Lang\u00f3 <llango.u-szeged@partner.samsung.com> 107 * * https://github.com/chris-y 111 * If you are accidentally missing from this list, send me an e-mail 115 * Top-level include file to be used for all (internal) source files. 129 * C types which is quite platform/compiler specific especially for a non-C99 357 * There are two packed type alternatives: an 8-byte representation 358 * based on an IEEE double (preferred for compactness), and a 12-byte [all …]
|
/civetweb-2.7.6/src/third_party/duktape-1.5.2/src-noline/ |
D | duktape.c | 19 * Copyright (c) 2013-2016 by Duktape authors (see AUTHORS.rst) 55 * Please include an e-mail address, a link to your GitHub profile, or something 65 * * L\u00e1szl\u00f3 Lang\u00f3 <llango.u-szeged@partner.samsung.com> 107 * * https://github.com/chris-y 111 * If you are accidentally missing from this list, send me an e-mail 115 * Top-level include file to be used for all (internal) source files. 129 * C types which is quite platform/compiler specific especially for a non-C99 357 * There are two packed type alternatives: an 8-byte representation 358 * based on an IEEE double (preferred for compactness), and a 12-byte 360 * 64-bit environments (it usually pads to 16 bytes per value). [all …]
|
/civetweb-2.7.6/src/third_party/duktape-1.5.2/src/ |
D | duktape.c | 19 * Copyright (c) 2013-2016 by Duktape authors (see AUTHORS.rst) 55 * Please include an e-mail address, a link to your GitHub profile, or something 65 * * L\u00e1szl\u00f3 Lang\u00f3 <llango.u-szeged@partner.samsung.com> 107 * * https://github.com/chris-y 111 * If you are accidentally missing from this list, send me an e-mail 116 * Top-level include file to be used for all (internal) source files. 130 * C types which is quite platform/compiler specific especially for a non-C99 363 * There are two packed type alternatives: an 8-byte representation 364 * based on an IEEE double (preferred for compactness), and a 12-byte 366 * 64-bit environments (it usually pads to 16 bytes per value). [all …]
|
/civetweb-2.7.6/src/third_party/ |
D | lsqlite3.c | 3 * Copyright (C) 2002-2016 Tiago Dionizio, Doug Currie * 7 * Library : lsqlite3 - an SQLite 3 database binding for Lua 5 * 41 #define luaL_typerror(L,ndx,str) luaL_error(L,"bad argument %d (%s expected, got nil)",ndx,str) argument 43 #define luaL_register(L,name,reg) lua_newtable(L);luaL_setfuncs(L,reg,0) argument 45 #define luaL_openlib(L,name,reg,nup) luaL_setfuncs(L,reg,nup) argument 51 #define luaL_checkint(L,n) ((int)luaL_checkinteger(L, (n))) argument 65 #define SQLITE3_OPEN(L,filename,flags) sqlite3_open(L,filename) argument 67 #define SQLITE3_OPEN(L,filename,flags) sqlite3_open_v2(L,filename,flags,NULL) argument 91 lua_State *L; member 133 #define PUSH_INT64(L,i64in,fallback) \ argument [all …]
|
D | lfs.c | 16 ** lfs.symlinkattributes (filepath [, attributename]) -- thanks to Sam Roberts 30 #define _FILE_OFFSET_BITS 64 /* Linux, Solaris and HP-UX */ 83 # define luaL_newlib(L,l) (lua_newtable(L), luaL_register(L,NULL,l)) argument 122 #define lfs_setmode(L,file,m) ((void)L, setmode(_fileno(file), m)) argument 125 #define lfs_setmode(L,file,m) ((void)L, _setmode(_fileno(file), m)) argument 133 #define lfs_setmode(L,file,m) ((void)L, (void)file, (void)m, 0) argument 142 static int pusherror(lua_State *L, const char *info) in pusherror() argument 144 lua_pushnil(L); in pusherror() 146 lua_pushstring(L, strerror(errno)); in pusherror() 148 lua_pushfstring(L, "%s: %s", info, strerror(errno)); in pusherror() [all …]
|
/civetweb-2.7.6/src/ |
D | mod_lua.inl | 73 reg_lstring(struct lua_State *L, argument 79 lua_pushstring(L, name); 80 lua_pushlstring(L, (const char *)buffer, buflen); 81 lua_rawset(L, -3); 86 reg_llstring(struct lua_State *L, argument 93 lua_pushlstring(L, (const char *)buffer1, buflen1); 94 lua_pushlstring(L, (const char *)buffer2, buflen2); 95 lua_rawset(L, -3); 99 #define reg_string(L, name, val) \ argument 100 reg_lstring(L, name, val, val ? strlen(val) : 0) [all …]
|