26 for (i=1; i<=
n; i++) {
35 LUA_QL(
"tostring")
" must return a string to " LUA_QL(
"print"));
36 if (i>1) luai_writestring(
"\t", 1);
37 luai_writestring(s, l);
45 #define SPACECHARS " \f\n\r\t\v"
60 const char *
e = s +
l;
63 luaL_argcheck(L, 2 <= base && base <= 36, 2,
"base out of range");
65 if (*s ==
'-') { s++; neg = 1; }
66 else if (*s ==
'+') s++;
67 if (isalnum((
unsigned char)*s)) {
70 int digit = (isdigit((
unsigned char)*s)) ? *s -
'0'
71 : toupper((
unsigned char)*
s) -
'A' + 10;
72 if (digit >= base)
break;
75 }
while (isalnum((
unsigned char)*
s));
115 "nil or table expected");
117 return luaL_error(L,
"cannot change a protected metatable");
135 "table or string expected");
160 static const char *
const opts[] = {
"stop",
"restart",
"collect",
161 "count",
"step",
"setpause",
"setstepmul",
162 "setmajorinc",
"isrunning",
"generational",
"incremental", NULL};
282 #define RESERVEDSLOT 5
302 luaL_error(L,
"reader function must return a string");
360 if (i < 0) i = n +
i;
361 else if (i > n) i =
n;
425 #if defined(LUA_COMPAT_LOADSTRING)
LUA_API void lua_rawgeti(lua_State *L, int idx, int n)
#define lua_isnoneornil(L, n)
#define lua_pushcfunction(L, f)
LUA_API void lua_replace(lua_State *L, int idx)
static int luaB_select(lua_State *L)
GLvoid **typedef void(GLAPIENTRY *PFNGLGETVERTEXATTRIBDVPROC)(GLuint
LUALIB_API const char * luaL_tolstring(lua_State *L, int idx, size_t *len)
LUA_API void lua_settop(lua_State *L, int idx)
LUA_API int lua_type(lua_State *L, int idx)
static int luaB_pcall(lua_State *L)
LUA_API void lua_pushboolean(lua_State *L, int b)
LUALIB_API void luaL_checktype(lua_State *L, int narg, int t)
LUA_API void lua_getglobal(lua_State *L, const char *var)
LUALIB_API int luaL_getmetafield(lua_State *L, int obj, const char *event)
LUA_API int lua_gettop(lua_State *L)
static int luaB_next(lua_State *L)
static int pairsmeta(lua_State *L, const char *method, int iszero, lua_CFunction iter)
LUALIB_API int luaL_loadfilex(lua_State *L, const char *filename, const char *mode)
#define luaL_typename(L, i)
LUALIB_API void luaL_checkstack(lua_State *L, int space, const char *msg)
static int luaB_xpcall(lua_State *L)
#define luaL_argcheck(L, cond, numarg, extramsg)
static int luaB_ipairs(lua_State *L)
static int luaB_print(lua_State *L)
LUAMOD_API int luaopen_base(lua_State *L)
LUA_API void lua_callk(lua_State *L, int nargs, int nresults, int ctx, lua_CFunction k)
int(* lua_CFunction)(lua_State *L)
#define luaL_loadfile(L, f)
GLdouble GLdouble GLdouble b
LUA_API int lua_gc(lua_State *L, int what, int data)
static int luaB_pairs(lua_State *L)
static int luaB_dofile(lua_State *L)
#define LUA_GCSETMAJORINC
LUA_API int lua_isstring(lua_State *L, int idx)
LUALIB_API int luaL_checkoption(lua_State *L, int narg, const char *def, const char *const lst[])
LUA_API int lua_rawequal(lua_State *L, int index1, int index2)
LUALIB_API int luaL_loadbufferx(lua_State *L, const char *buff, size_t size, const char *name, const char *mode)
LUA_API int lua_toboolean(lua_State *L, int idx)
#define lua_pushglobaltable(L)
LUALIB_API void luaL_where(lua_State *L, int level)
static int pcallcont(lua_State *L)
LUA_API int lua_getmetatable(lua_State *L, int objindex)
static int luaB_tonumber(lua_State *L)
LUA_API int lua_setmetatable(lua_State *L, int objindex)
static int luaB_load(lua_State *L)
LUA_API const char * lua_tolstring(lua_State *L, int idx, size_t *len)
static const luaL_Reg base_funcs[]
static int luaB_setmetatable(lua_State *L)
LUA_API lua_Number lua_tonumberx(lua_State *L, int idx, int *isnum)
LUA_API void lua_pushnil(lua_State *L)
LUA_API const char * lua_setupvalue(lua_State *L, int funcindex, int n)
LUA_API void lua_pushnumber(lua_State *L, lua_Number n)
LUALIB_API const char * luaL_checklstring(lua_State *L, int narg, size_t *len)
#define lua_pushliteral(L, s)
static int luaB_rawequal(lua_State *L)
static int luaB_getmetatable(lua_State *L)
static int luaB_assert(lua_State *L)
static int luaB_rawlen(lua_State *L)
LUA_API int lua_pcallk(lua_State *L, int nargs, int nresults, int errfunc, int ctx, lua_CFunction k)
LUA_API void lua_rawset(lua_State *L, int idx)
static int luaB_collectgarbage(lua_State *L)
static int dofilecont(lua_State *L)
LUA_API int lua_load(lua_State *L, lua_Reader reader, void *data, const char *chunkname, const char *mode)
#define lua_tostring(L, i)
LUA_API void lua_insert(lua_State *L, int idx)
LUA_API void lua_pushvalue(lua_State *L, int idx)
static int luaB_tostring(lua_State *L)
#define lua_call(L, n, r)
LUALIB_API int luaL_error(lua_State *L, const char *fmt,...)
static int load_aux(lua_State *L, int status, int envidx)
LUA_API size_t lua_rawlen(lua_State *L, int idx)
static int luaB_rawget(lua_State *L)
static int ipairsaux(lua_State *L)
#define luaL_checkint(L, n)
LUA_API int lua_error(lua_State *L)
#define luaL_optint(L, n, d)
LUA_API void lua_concat(lua_State *L, int n)
LUALIB_API void luaL_checkany(lua_State *L, int narg)
static int luaB_type(lua_State *L)
LUA_API int lua_checkstack(lua_State *L, int size)
static const char * generic_reader(lua_State *L, void *ud, size_t *size)
LUA_API void lua_copy(lua_State *L, int fromidx, int toidx)
LUA_API int lua_getctx(lua_State *L, int *ctx)
static int finishpcall(lua_State *L, int status)
LUALIB_API void luaL_setfuncs(lua_State *L, const luaL_Reg *l, int nup)
static int luaB_loadfile(lua_State *L)
static int luaB_error(lua_State *L)
LUA_API void lua_pushinteger(lua_State *L, lua_Integer n)
#define luaL_optstring(L, n, d)
LUA_API void lua_rawget(lua_State *L, int idx)
LUA_API const char * lua_pushstring(lua_State *L, const char *s)
LUA_API void lua_setfield(lua_State *L, int idx, const char *k)
LUA_API int lua_next(lua_State *L, int idx)
static int luaB_rawset(lua_State *L)