#include <stddef.h>#include <stdio.h>#include "lua.h"

Go to the source code of this file.
Classes | |
| struct | luaL_Reg |
| struct | luaL_Buffer |
| struct | luaL_Stream |
Defines | |
| #define | LUA_ERRFILE (LUA_ERRERR+1) |
| #define | luaL_checkversion(L) luaL_checkversion_(L, LUA_VERSION_NUM) |
| #define | LUA_NOREF (-2) |
| #define | LUA_REFNIL (-1) |
| #define | luaL_loadfile(L, f) luaL_loadfilex(L,f,NULL) |
| #define | luaL_newlibtable(L, l) lua_createtable(L, 0, sizeof(l)/sizeof((l)[0]) - 1) |
| #define | luaL_newlib(L, l) (luaL_newlibtable(L,l), luaL_setfuncs(L,l,0)) |
| #define | luaL_argcheck(L, cond, numarg, extramsg) ((void)((cond) || luaL_argerror(L, (numarg), (extramsg)))) |
| #define | luaL_checkstring(L, n) (luaL_checklstring(L, (n), NULL)) |
| #define | luaL_optstring(L, n, d) (luaL_optlstring(L, (n), (d), NULL)) |
| #define | luaL_checkint(L, n) (static_cast<int>(luaL_checkinteger(L, (n)))) |
| #define | luaL_optint(L, n, d) (static_cast<int>(luaL_optinteger(L, (n), (d)))) |
| #define | luaL_checklong(L, n) (static_cast<long>(luaL_checkinteger(L, (n)))) |
| #define | luaL_optlong(L, n, d) (static_cast<long>(luaL_optinteger(L, (n), (d)))) |
| #define | luaL_typename(L, i) lua_typename(L, lua_type(L,(i))) |
| #define | luaL_dofile(L, fn) (luaL_loadfile(L, fn) || lua_pcall(L, 0, LUA_MULTRET, 0)) |
| #define | luaL_dostring(L, s) (luaL_loadstring(L, s) || lua_pcall(L, 0, LUA_MULTRET, 0)) |
| #define | luaL_getmetatable(L, n) (lua_getfield(L, LUA_REGISTRYINDEX, (n))) |
| #define | luaL_opt(L, f, n, d) (lua_isnoneornil(L,(n)) ? (d) : f(L,(n))) |
| #define | luaL_loadbuffer(L, s, sz, n) luaL_loadbufferx(L,s,sz,n,NULL) |
| #define | luaL_addchar(B, c) |
| #define | luaL_addsize(B, s) ((B)->n += (s)) |
| #define | luaL_prepbuffer(B) luaL_prepbuffsize(B, LUAL_BUFFERSIZE) |
| #define | LUA_FILEHANDLE "FILE*" |
| #define | luaL_register(L, n, l) (luaL_openlib(L,(n),(l),0)) |
Typedefs | |
| typedef struct luaL_Reg | luaL_Reg |
| typedef struct luaL_Buffer | luaL_Buffer |
| typedef struct luaL_Stream | luaL_Stream |
Functions | |
| LUALIB_API void() | luaL_checkversion_ (lua_State *L, lua_Number ver) |
| LUALIB_API int() | luaL_getmetafield (lua_State *L, int obj, const char *e) |
| LUALIB_API int() | luaL_callmeta (lua_State *L, int obj, const char *e) |
| LUALIB_API const char *() | luaL_tolstring (lua_State *L, int idx, size_t *len) |
| LUALIB_API int() | luaL_typerror (lua_State *L, int narg, const char *tname) |
| LUALIB_API int() | luaL_argerror (lua_State *L, int numarg, const char *extramsg) |
| LUALIB_API const char *() | luaL_checklstring (lua_State *L, int numArg, size_t *l) |
| LUALIB_API const char *() | luaL_optlstring (lua_State *L, int numArg, const char *def, size_t *l) |
| LUALIB_API lua_Number() | luaL_checknumber (lua_State *L, int numArg) |
| LUALIB_API lua_Number() | luaL_optnumber (lua_State *L, int nArg, lua_Number def) |
| LUALIB_API lua_Integer() | luaL_checkinteger (lua_State *L, int numArg) |
| LUALIB_API lua_Integer() | luaL_optinteger (lua_State *L, int nArg, lua_Integer def) |
| LUALIB_API lua_Unsigned() | luaL_checkunsigned (lua_State *L, int numArg) |
| LUALIB_API lua_Unsigned() | luaL_optunsigned (lua_State *L, int numArg, lua_Unsigned def) |
| LUALIB_API void() | luaL_checkstack (lua_State *L, int sz, const char *msg) |
| LUALIB_API void() | luaL_checktype (lua_State *L, int narg, int t) |
| LUALIB_API void() | luaL_checkany (lua_State *L, int narg) |
| LUALIB_API int() | luaL_newmetatable (lua_State *L, const char *tname) |
| LUALIB_API void() | luaL_setmetatable (lua_State *L, const char *tname) |
| LUALIB_API void *() | luaL_testudata (lua_State *L, int ud, const char *tname) |
| LUALIB_API void *() | luaL_checkudata (lua_State *L, int ud, const char *tname) |
| LUALIB_API void() | luaL_where (lua_State *L, int lvl) |
| LUALIB_API int() | luaL_error (lua_State *L, const char *fmt,...) |
| LUALIB_API int() | luaL_checkoption (lua_State *L, int narg, const char *def, const char *const lst[]) |
| LUALIB_API int() | luaL_fileresult (lua_State *L, int stat, const char *fname) |
| LUALIB_API int() | luaL_execresult (lua_State *L, int stat) |
| LUALIB_API int() | luaL_ref (lua_State *L, int t) |
| LUALIB_API void() | luaL_unref (lua_State *L, int t, int ref) |
| LUALIB_API int() | luaL_loadfilex (lua_State *L, const char *filename, const char *mode) |
| LUALIB_API int() | luaL_loadbufferx (lua_State *L, const char *buff, size_t sz, const char *name, const char *mode) |
| LUALIB_API int() | luaL_loadstring (lua_State *L, const char *s) |
| LUALIB_API lua_State *() | luaL_newstate (void) |
| LUALIB_API int() | luaL_len (lua_State *L, int idx) |
| LUALIB_API const char *() | luaL_gsub (lua_State *L, const char *s, const char *p, const char *r) |
| LUALIB_API void() | luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) |
| LUALIB_API int() | luaL_getsubtable (lua_State *L, int idx, const char *fname) |
| LUALIB_API void() | luaL_traceback (lua_State *L, lua_State *L1, const char *msg, int level) |
| LUALIB_API void() | luaL_requiref (lua_State *L, const char *modname, lua_CFunction openf, int glb) |
| LUALIB_API void() | luaL_buffinit (lua_State *L, luaL_Buffer *B) |
| LUALIB_API char *() | luaL_prepbuffsize (luaL_Buffer *B, size_t sz) |
| LUALIB_API void() | luaL_addlstring (luaL_Buffer *B, const char *s, size_t l) |
| LUALIB_API void() | luaL_addstring (luaL_Buffer *B, const char *s) |
| LUALIB_API void() | luaL_addvalue (luaL_Buffer *B) |
| LUALIB_API void() | luaL_pushresult (luaL_Buffer *B) |
| LUALIB_API void() | luaL_pushresultsize (luaL_Buffer *B, size_t sz) |
| LUALIB_API char *() | luaL_buffinitsize (lua_State *L, luaL_Buffer *B, size_t sz) |
| LUALIB_API void() | luaL_pushmodule (lua_State *L, const char *modname, int sizehint) |
| LUALIB_API void() | luaL_openlib (lua_State *L, const char *libname, const luaL_Reg *l, int nup) |
| #define LUA_FILEHANDLE "FILE*" |
Definition at line 186 of file lauxlib.h.
Referenced by createmeta(), io_type(), and newprefile().
| #define luaL_addchar | ( | B, | ||
| c | ||||
| ) |
((void)((B)->n < (B)->size || luaL_prepbuffsize((B), 1)), \ ((B)->b[(B)->n++] = (c)))
Definition at line 153 of file lauxlib.h.
Referenced by add_s(), addquoted(), os_date(), str_format(), and str_gsub().
| #define luaL_addsize | ( | B, | ||
| s | ||||
| ) | ((B)->n += (s)) |
Definition at line 157 of file lauxlib.h.
Referenced by luaL_addlstring(), luaL_pushresultsize(), read_all(), read_chars(), read_line(), and str_format().
| #define luaL_argcheck | ( | L, | ||
| cond, | ||||
| numarg, | ||||
| extramsg | ||||
| ) | ((void)((cond) || luaL_argerror(L, (numarg), (extramsg)))) |
Definition at line 114 of file lauxlib.h.
Referenced by aux_lines(), checkupval(), db_setmetatable(), db_upvaluejoin(), f_seek(), fieldargs(), g_read(), luaB_coresume(), luaB_costatus(), luaB_rawlen(), luaB_select(), luaB_setmetatable(), luaB_tonumber(), luaB_xpcall(), math_random(), str_char(), str_format(), and str_gsub().
| #define luaL_checkint | ( | L, | ||
| n | ||||
| ) | (static_cast<int>(luaL_checkinteger(L, (n)))) |
Definition at line 118 of file lauxlib.h.
Referenced by auxupvalue(), b_arshift(), b_lrot(), b_lshift(), b_rrot(), b_rshift(), checkupval(), db_getlocal(), db_setlocal(), fieldargs(), intf_find_vacant_tile(), intf_get_starting_location(), intf_get_terrain(), intf_get_time_of_day(), intf_get_village_owner(), intf_is_enemy(), intf_set_terrain(), intf_set_village_owner(), ipairsaux(), luaB_select(), luaB_tonumber(), math_ldexp(), str_char(), str_format(), str_rep(), tconcat(), tinsert(), and unpack().
| #define luaL_checklong | ( | L, | ||
| n | ||||
| ) | (static_cast<long>(luaL_checkinteger(L, (n)))) |
| #define luaL_checkstring | ( | L, | ||
| n | ||||
| ) | (luaL_checklstring(L, (n), NULL)) |
Definition at line 116 of file lauxlib.h.
Referenced by ai::ai_recall(), ai::ai_recruit(), db_sethook(), gmatch(), impl_current_get(), impl_game_config_get(), impl_game_config_set(), impl_gettext(), impl_race_get(), impl_side_get(), impl_side_set(), impl_theme_items_get(), impl_theme_items_set(), impl_unit_get(), impl_unit_set(), impl_unit_status_get(), impl_unit_status_set(), impl_unit_type_get(), impl_unit_variables_get(), impl_unit_variables_set(), impl_vconfig_get(), intf_add_known_unit(), intf_add_modification(), intf_compare_versions(), intf_dofile(), intf_fire_event(), intf_get_image_size(), intf_get_terrain_info(), intf_get_variable(), intf_message(), intf_play_sound(), intf_require(), intf_set_terrain(), intf_set_variable(), intf_transform_unit(), intf_unit_ability(), intf_unit_defense(), intf_unit_movement_cost(), intf_unit_resistance(), io_lines(), io_open(), io_popen(), ll_loadlib(), ll_module(), ll_require(), ll_searchpath(), luaL_checkoption(), os_getenv(), os_remove(), os_rename(), searcher_C(), searcher_Croot(), searcher_Lua(), and searcher_preload().
| #define luaL_checkversion | ( | L | ) | luaL_checkversion_(L, LUA_VERSION_NUM) |
Definition at line 30 of file lauxlib.h.
Referenced by luaL_openlib(), and pmain().
| #define luaL_dofile | ( | L, | ||
| fn | ||||
| ) | (luaL_loadfile(L, fn) || lua_pcall(L, 0, LUA_MULTRET, 0)) |
| #define luaL_dostring | ( | L, | ||
| s | ||||
| ) | (luaL_loadstring(L, s) || lua_pcall(L, 0, LUA_MULTRET, 0)) |
| #define luaL_getmetatable | ( | L, | ||
| n | ||||
| ) | (lua_getfield(L, LUA_REGISTRYINDEX, (n))) |
Definition at line 131 of file lauxlib.h.
Referenced by luaL_newmetatable(), luaL_setmetatable(), and luaL_testudata().
| #define luaL_loadbuffer | ( | L, | ||
| s, | ||||
| sz, | ||||
| n | ||||
| ) | luaL_loadbufferx(L,s,sz,n,NULL) |
Definition at line 135 of file lauxlib.h.
Referenced by db_debug(), dostring(), loadline(), and luaL_loadstring().
| #define luaL_loadfile | ( | L, | ||
| f | ||||
| ) | luaL_loadfilex(L,f,NULL) |
Definition at line 79 of file lauxlib.h.
Referenced by dofile(), handle_script(), intf_dofile(), intf_require(), luaB_dofile(), pmain(), and searcher_Lua().
| #define luaL_newlib | ( | L, | ||
| l | ||||
| ) | (luaL_newlibtable(L,l), luaL_setfuncs(L,l,0)) |
Definition at line 112 of file lauxlib.h.
Referenced by luaopen_bit32(), luaopen_coroutine(), luaopen_debug(), luaopen_io(), luaopen_math(), luaopen_os(), luaopen_package(), luaopen_string(), and luaopen_table().
| #define luaL_newlibtable | ( | L, | ||
| l | ||||
| ) | lua_createtable(L, 0, sizeof(l)/sizeof((l)[0]) - 1) |
| #define luaL_opt | ( | L, | ||
| f, | ||||
| n, | ||||
| d | ||||
| ) | (lua_isnoneornil(L,(n)) ? (d) : f(L,(n))) |
Definition at line 133 of file lauxlib.h.
Referenced by luaL_optinteger(), luaL_optnumber(), luaL_optunsigned(), os_date(), tconcat(), and unpack().
| #define luaL_optint | ( | L, | ||
| n, | ||||
| d | ||||
| ) | (static_cast<int>(luaL_optinteger(L, (n), (d)))) |
Definition at line 119 of file lauxlib.h.
Referenced by db_sethook(), db_traceback(), fieldargs(), intf_get_unit(), luaB_collectgarbage(), luaB_error(), os_exit(), tconcat(), tremove(), and unpack().
| #define luaL_optlong | ( | L, | ||
| n, | ||||
| d | ||||
| ) | (static_cast<long>(luaL_optinteger(L, (n), (d)))) |
| #define luaL_optstring | ( | L, | ||
| n, | ||||
| d | ||||
| ) | (luaL_optlstring(L, (n), (d), NULL)) |
Definition at line 117 of file lauxlib.h.
Referenced by db_getinfo(), io_open(), io_popen(), ll_searchpath(), luaB_assert(), luaB_dofile(), luaB_load(), luaB_loadfile(), luaL_checkoption(), os_date(), os_execute(), and os_setlocale().
| #define luaL_prepbuffer | ( | B | ) | luaL_prepbuffsize(B, LUAL_BUFFERSIZE) |
Definition at line 168 of file lauxlib.h.
Referenced by read_line().
| #define luaL_register | ( | L, | ||
| n, | ||||
| l | ||||
| ) | (luaL_openlib(L,(n),(l),0)) |
Definition at line 206 of file lauxlib.h.
Referenced by LuaKernel::LuaKernel().
| #define luaL_typename | ( | L, | ||
| i | ||||
| ) | lua_typename(L, lua_type(L,(i))) |
Definition at line 123 of file lauxlib.h.
Referenced by add_value(), addfield(), luaB_type(), luaL_tolstring(), and typeerror().
| typedef struct luaL_Buffer luaL_Buffer |
| typedef struct luaL_Stream luaL_Stream |
| LUALIB_API void() luaL_addlstring | ( | luaL_Buffer * | B, | |
| const char * | s, | |||
| size_t | l | |||
| ) |
Definition at line 461 of file lauxlib.c.
References luaL_addsize, and luaL_prepbuffsize().
Referenced by add_s(), luaL_addstring(), luaL_addvalue(), luaL_gsub(), os_date(), str_gsub(), tconcat(), and writer().


| LUALIB_API void() luaL_addstring | ( | luaL_Buffer * | B, | |
| const char * | s | |||
| ) |
Definition at line 468 of file lauxlib.c.
References luaL_addlstring().
Referenced by addquoted(), and luaL_gsub().


| LUALIB_API void() luaL_addvalue | ( | luaL_Buffer * | B | ) |
Definition at line 487 of file lauxlib.c.
References buffonstack, luaL_Buffer::L, lua_insert(), lua_remove(), lua_tolstring(), and luaL_addlstring().
Referenced by add_s(), add_value(), addfield(), findloader(), searchpath(), and str_format().


| LUALIB_API int() luaL_argerror | ( | lua_State * | L, | |
| int | numarg, | |||
| const char * | extramsg | |||
| ) |
Definition at line 153 of file lauxlib.c.
References lua_getinfo(), lua_getstack(), LUA_QS, lua_tostring, luaL_error(), lua_Debug::name, lua_Debug::namewhat, and pushglobalfuncname().
Referenced by ai::cfun_ai_get_suitable_keep(), checkoption(), db_getinfo(), db_getlocal(), db_setlocal(), db_setuservalue(), find_widget(), g_read(), impl_game_config_set(), impl_race_get(), impl_side_set(), impl_unit_get(), impl_unit_set(), impl_unit_status_get(), impl_unit_status_set(), impl_unit_type_get(), impl_unit_variables_get(), impl_unit_variables_set(), intf_add_known_unit(), intf_add_modification(), intf_compare_versions(), intf_dofile(), intf_extract_unit(), intf_find_path(), intf_find_reach(), intf_get_dialog_value(), intf_get_starting_location(), intf_get_time_of_day(), intf_match_unit(), intf_put_recall_unit(), intf_put_unit(), intf_require(), intf_select_hex(), intf_set_dialog_active(), intf_set_dialog_callback(), intf_set_dialog_canvas(), intf_set_dialog_value(), intf_set_variable(), intf_simulate_combat(), intf_transform_unit(), luaL_checkany(), luaL_checkoption(), str_format(), and typeerror().


| LUALIB_API void() luaL_buffinit | ( | lua_State * | L, | |
| luaL_Buffer * | B | |||
| ) |
Definition at line 498 of file lauxlib.c.
References luaL_Buffer::b, luaL_Buffer::initb, luaL_Buffer::L, luaL_Buffer::n, and luaL_Buffer::size.
Referenced by findloader(), luaL_buffinitsize(), luaL_gsub(), os_date(), read_all(), read_chars(), read_line(), searchpath(), str_dump(), str_format(), str_gsub(), and tconcat().

| LUALIB_API char*() luaL_buffinitsize | ( | lua_State * | L, | |
| luaL_Buffer * | B, | |||
| size_t | sz | |||
| ) |
Definition at line 506 of file lauxlib.c.
References luaL_buffinit(), and luaL_prepbuffsize().
Referenced by str_char(), str_lower(), str_rep(), str_reverse(), and str_upper().


| LUALIB_API int() luaL_callmeta | ( | lua_State * | L, | |
| int | obj, | |||
| const char * | e | |||
| ) |
Definition at line 715 of file lauxlib.c.
References lua_absindex(), lua_call, lua_pushvalue(), and luaL_getmetafield().
Referenced by luaL_tolstring(), and traceback().


| LUALIB_API void() luaL_checkany | ( | lua_State * | L, | |
| int | narg | |||
| ) |
Definition at line 353 of file lauxlib.c.
References LUA_TNONE, lua_type(), and luaL_argerror().
Referenced by db_getmetatable(), db_setlocal(), db_setupvalue(), io_type(), luaB_getmetatable(), luaB_pcall(), luaB_rawequal(), luaB_rawget(), luaB_rawset(), luaB_tonumber(), luaB_tostring(), and luaB_type().


| LUALIB_API lua_Integer() luaL_checkinteger | ( | lua_State * | L, | |
| int | numArg | |||
| ) |
Definition at line 391 of file lauxlib.c.
References LUA_TNUMBER, lua_tointegerx(), and tag_error().
Referenced by intf_add_tile_overlay(), intf_delay(), intf_find_path(), intf_find_reach(), intf_fire_event(), intf_float_label(), intf_get_time_of_day(), intf_get_unit(), intf_highlight_hex(), intf_match_location(), intf_match_side(), intf_put_unit(), intf_remove_tile_overlay(), intf_scroll_to_tile(), intf_select_hex(), intf_set_dialog_canvas(), intf_set_dialog_value(), intf_unit_resistance(), luaL_optinteger(), and str_sub().


| LUALIB_API const char*() luaL_checklstring | ( | lua_State * | L, | |
| int | numArg, | |||
| size_t * | l | |||
| ) |
Definition at line 359 of file lauxlib.c.
References lua_tolstring(), LUA_TSTRING, and tag_error().
Referenced by addquoted(), g_write(), intf_textdomain(), luaB_tonumber(), luaL_optlstring(), str_byte(), str_find_aux(), str_format(), str_gsub(), str_len(), str_lower(), str_rep(), str_reverse(), str_sub(), and str_upper().


| LUALIB_API lua_Number() luaL_checknumber | ( | lua_State * | L, | |
| int | numArg | |||
| ) |
Definition at line 377 of file lauxlib.c.
References LUA_TNUMBER, lua_tonumberx(), and tag_error().
Referenced by intf_find_path(), luaL_optnumber(), math_abs(), math_acos(), math_asin(), math_atan(), math_atan2(), math_ceil(), math_cos(), math_cosh(), math_deg(), math_exp(), math_floor(), math_fmod(), math_frexp(), math_ldexp(), math_log(), math_log10(), math_max(), math_min(), math_modf(), math_pow(), math_rad(), math_random(), math_sin(), math_sinh(), math_sqrt(), math_tan(), math_tanh(), os_date(), os_difftime(), and str_format().


| LUALIB_API int() luaL_checkoption | ( | lua_State * | L, | |
| int | narg, | |||
| const char * | def, | |||
| const char *const | lst[] | |||
| ) |
Definition at line 322 of file lauxlib.c.
References lua_pushfstring(), LUA_QS, luaL_argerror(), luaL_checkstring, and luaL_optstring.
Referenced by f_seek(), f_setvbuf(), luaB_collectgarbage(), and os_setlocale().


| LUALIB_API void() luaL_checkstack | ( | lua_State * | L, | |
| int | sz, | |||
| const char * | msg | |||
| ) |
Definition at line 335 of file lauxlib.c.
References lua_checkstack(), and luaL_error().
Referenced by dotty(), g_read(), generic_reader(), getargs(), luaL_setfuncs(), push_captures(), sort(), and str_byte().


| LUALIB_API void() luaL_checktype | ( | lua_State * | L, | |
| int | narg, | |||
| int | t | |||
| ) |
Definition at line 347 of file lauxlib.c.
References lua_type(), and tag_error().
Referenced by auxupvalue(), checkupval(), db_sethook(), db_setuservalue(), ipairsaux(), ll_seeall(), luaB_cocreate(), luaB_load(), luaB_next(), luaB_rawget(), luaB_rawset(), luaB_setmetatable(), maxn(), os_time(), pairsmeta(), sort(), str_dump(), tconcat(), and unpack().


| LUALIB_API void*() luaL_checkudata | ( | lua_State * | L, | |
| int | ud, | |||
| const char * | tname | |||
| ) |
Definition at line 307 of file lauxlib.c.
References luaL_testudata(), and typeerror().
Referenced by gctm().


| LUALIB_API lua_Unsigned() luaL_checkunsigned | ( | lua_State * | L, | |
| int | numArg | |||
| ) |
Definition at line 400 of file lauxlib.c.
References LUA_TNUMBER, lua_tounsignedx(), and tag_error().
Referenced by andaux(), b_arshift(), b_extract(), b_lshift(), b_not(), b_or(), b_replace(), b_rot(), b_rshift(), b_xor(), luaL_optunsigned(), and math_randomseed().


| LUALIB_API void() luaL_checkversion_ | ( | lua_State * | L, | |
| lua_Number | ver | |||
| ) |
Definition at line 945 of file lauxlib.c.
References lua_pop, lua_pushnumber(), lua_tointeger, lua_tounsigned, lua_version(), and luaL_error().

| LUALIB_API int() luaL_error | ( | lua_State * | L, | |
| const char * | fmt, | |||
| ... | ||||
| ) |
Definition at line 198 of file lauxlib.c.
References lua_concat(), lua_error(), lua_pushvfstring(), and luaL_where().
Referenced by add_s(), add_value(), addfield(), auxsort(), capture_to_close(), check_capture(), checkload(), classend(), fieldargs(), find_widget(), findfile(), findloader(), generic_reader(), getfield(), getiofile(), io_open(), io_readline(), lstop(), luaB_assert(), luaB_print(), luaB_setmetatable(), luaL_argerror(), luaL_checkstack(), luaL_checkversion_(), luaL_len(), luaL_prepbuffsize(), luaL_pushmodule(), match(), matchbalance(), math_random(), opencheck(), os_tmpname(), push_onecapture(), scanformat(), set_env(), start_capture(), str_byte(), str_dump(), str_format(), str_rep(), tinsert(), tofile(), and unpack().


| LUALIB_API int() luaL_execresult | ( | lua_State * | L, | |
| int | stat | |||
| ) |
Definition at line 249 of file lauxlib.c.
References inspectstat, lua_pushboolean(), lua_pushinteger(), lua_pushnil(), lua_pushstring(), and luaL_fileresult().
Referenced by io_pclose(), and os_execute().


| LUALIB_API int() luaL_fileresult | ( | lua_State * | L, | |
| int | stat, | |||
| const char * | fname | |||
| ) |
Definition at line 209 of file lauxlib.c.
References lua_pushboolean(), lua_pushfstring(), lua_pushinteger(), and lua_pushnil().
Referenced by f_flush(), f_seek(), f_setvbuf(), g_read(), g_write(), io_fclose(), io_flush(), io_open(), io_popen(), io_tmpfile(), luaL_execresult(), os_remove(), and os_rename().


| LUALIB_API int() luaL_getmetafield | ( | lua_State * | L, | |
| int | obj, | |||
| const char * | e | |||
| ) |
Definition at line 699 of file lauxlib.c.
References lua_getmetatable(), lua_isnil, lua_pop, lua_pushstring(), lua_rawget(), and lua_remove().
Referenced by luaB_getmetatable(), luaB_setmetatable(), luaL_callmeta(), and pairsmeta().


| LUALIB_API int() luaL_getsubtable | ( | lua_State * | L, | |
| int | idx, | |||
| const char * | fname | |||
| ) |
Definition at line 865 of file lauxlib.c.
References lua_absindex(), lua_getfield(), lua_istable, lua_newtable, lua_pop, lua_pushvalue(), and lua_setfield().
Referenced by luaL_openlibs(), luaL_requiref(), and luaopen_package().


| LUALIB_API const char*() luaL_gsub | ( | lua_State * | L, | |
| const char * | s, | |||
| const char * | p, | |||
| const char * | r | |||
| ) |
Definition at line 903 of file lauxlib.c.
References lua_tostring, luaL_addlstring(), luaL_addstring(), luaL_buffinit(), and luaL_pushresult().
Referenced by loadfunc(), searchpath(), and setpath().


| LUALIB_API int() luaL_len | ( | lua_State * | L, | |
| int | idx | |||
| ) |
Definition at line 725 of file lauxlib.c.
References lua_len(), lua_pop, lua_tointegerx(), and luaL_error().
Referenced by tconcat(), and unpack().


| LUALIB_API int() luaL_loadbufferx | ( | lua_State * | L, | |
| const char * | buff, | |||
| size_t | sz, | |||
| const char * | name, | |||
| const char * | mode | |||
| ) |
Definition at line 682 of file lauxlib.c.
References getS(), lua_load(), LoadS::s, and LoadS::size.
Referenced by luaB_load().


| LUALIB_API int() luaL_loadfilex | ( | lua_State * | L, | |
| const char * | filename, | |||
| const char * | mode | |||
| ) |
Definition at line 630 of file lauxlib.c.
References LoadF::buff, errfile(), LoadF::f, getF(), lua_gettop(), lua_load(), lua_pushfstring(), lua_pushliteral, lua_remove(), lua_settop(), LUA_SIGNATURE, lua_tostring, LoadF::n, and skipcomment().
Referenced by luaB_loadfile().


| LUALIB_API int() luaL_loadstring | ( | lua_State * | L, | |
| const char * | s | |||
| ) |
Definition at line 691 of file lauxlib.c.
References luaL_loadbuffer.
Referenced by ai::lua_ai_action_handler::create(), ai::lua_ai_context::create(), and LuaKernel::execute().

| LUALIB_API int() luaL_newmetatable | ( | lua_State * | L, | |
| const char * | tname | |||
| ) |
Definition at line 274 of file lauxlib.c.
References lua_isnil, lua_newtable, lua_pop, lua_pushvalue(), LUA_REGISTRYINDEX, lua_setfield(), and luaL_getmetatable.
Referenced by createmeta(), and luaopen_package().


| LUALIB_API lua_State*() luaL_newstate | ( | void | ) |
Definition at line 938 of file lauxlib.c.
References l_alloc(), lua_atpanic(), lua_newstate(), and panic().
Referenced by main().


Definition at line 827 of file lauxlib.c.
References libsize(), lua_insert(), lua_pop, luaL_checkversion, luaL_pushmodule(), and luaL_setfuncs().

| LUALIB_API lua_Integer() luaL_optinteger | ( | lua_State * | L, | |
| int | nArg, | |||
| lua_Integer | def | |||
| ) |
Definition at line 409 of file lauxlib.c.
References luaL_checkinteger(), and luaL_opt.
Referenced by f_setvbuf(), str_byte(), str_find_aux(), str_gsub(), and str_sub().


| LUALIB_API const char*() luaL_optlstring | ( | lua_State * | L, | |
| int | numArg, | |||
| const char * | def, | |||
| size_t * | l | |||
| ) |
Definition at line 366 of file lauxlib.c.
References lua_isnoneornil, and luaL_checklstring().
Referenced by str_rep(), and tconcat().


| LUALIB_API lua_Number() luaL_optnumber | ( | lua_State * | L, | |
| int | nArg, | |||
| lua_Number | def | |||
| ) |
Definition at line 386 of file lauxlib.c.
References luaL_checknumber(), and luaL_opt.
Referenced by f_seek(), and os_difftime().


| LUALIB_API lua_Unsigned() luaL_optunsigned | ( | lua_State * | L, | |
| int | numArg, | |||
| lua_Unsigned | def | |||
| ) |
Definition at line 415 of file lauxlib.c.
References luaL_checkunsigned(), and luaL_opt.

| LUALIB_API char*() luaL_prepbuffsize | ( | luaL_Buffer * | B, | |
| size_t | sz | |||
| ) |
Definition at line 439 of file lauxlib.c.
References luaL_Buffer::b, buffonstack, luaL_Buffer::L, lua_newuserdata(), lua_remove(), luaL_error(), luaL_Buffer::n, and luaL_Buffer::size.
Referenced by luaL_addlstring(), luaL_buffinitsize(), read_all(), read_chars(), and str_format().


| LUALIB_API void() luaL_pushmodule | ( | lua_State * | L, | |
| const char * | modname, | |||
| int | sizehint | |||
| ) |
Definition at line 810 of file lauxlib.c.
References lua_getfield(), lua_istable, lua_pop, lua_pushglobaltable, lua_pushvalue(), LUA_QS, LUA_REGISTRYINDEX, lua_remove(), lua_setfield(), luaL_error(), and luaL_findtable().
Referenced by ll_module(), and luaL_openlib().


| LUALIB_API void() luaL_pushresult | ( | luaL_Buffer * | B | ) |
Definition at line 473 of file lauxlib.c.
References luaL_Buffer::b, buffonstack, luaL_Buffer::L, lua_pushlstring(), lua_remove(), and luaL_Buffer::n.
Referenced by findloader(), luaL_gsub(), luaL_pushresultsize(), os_date(), read_all(), read_chars(), read_line(), searchpath(), str_dump(), str_format(), str_gsub(), and tconcat().


| LUALIB_API void() luaL_pushresultsize | ( | luaL_Buffer * | B, | |
| size_t | sz | |||
| ) |
Definition at line 481 of file lauxlib.c.
References luaL_addsize, and luaL_pushresult().
Referenced by str_char(), str_lower(), str_rep(), str_reverse(), and str_upper().


| LUALIB_API int() luaL_ref | ( | lua_State * | L, | |
| int | t | |||
| ) |
Definition at line 524 of file lauxlib.c.
References freelist, lua_absindex(), lua_isnil, lua_pop, lua_rawgeti(), lua_rawlen(), lua_rawseti(), and lua_tointeger.

| LUALIB_API void() luaL_requiref | ( | lua_State * | L, | |
| const char * | modname, | |||
| lua_CFunction | openf, | |||
| int | glb | |||
| ) |
Definition at line 885 of file lauxlib.c.
References lua_call, lua_pop, lua_pushcfunction, lua_pushglobaltable, lua_pushstring(), lua_pushvalue(), LUA_REGISTRYINDEX, lua_setfield(), and luaL_getsubtable().
Referenced by LuaKernel::LuaKernel(), and luaL_openlibs().


Definition at line 848 of file lauxlib.c.
References luaL_Reg::func, lua_pop, lua_pushcclosure(), lua_pushvalue(), lua_setfield(), luaL_checkstack(), and luaL_Reg::name.
Referenced by createmeta(), luaL_openlib(), luaopen_base(), and luaopen_package().


| LUALIB_API void() luaL_setmetatable | ( | lua_State * | L, | |
| const char * | tname | |||
| ) |
Definition at line 286 of file lauxlib.c.
References lua_setmetatable(), and luaL_getmetatable.
Referenced by ll_register(), and newprefile().


| LUALIB_API void*() luaL_testudata | ( | lua_State * | L, | |
| int | ud, | |||
| const char * | tname | |||
| ) |
Definition at line 292 of file lauxlib.c.
References lua_getmetatable(), lua_pop, lua_rawequal(), lua_touserdata(), and luaL_getmetatable.
Referenced by io_type(), and luaL_checkudata().


| LUALIB_API const char*() luaL_tolstring | ( | lua_State * | L, | |
| int | idx, | |||
| size_t * | len | |||
| ) |
Definition at line 737 of file lauxlib.c.
References lua_pushfstring(), lua_pushliteral, lua_pushstring(), lua_pushvalue(), LUA_TBOOLEAN, LUA_TNIL, LUA_TNUMBER, lua_toboolean(), lua_tolstring(), lua_topointer(), LUA_TSTRING, lua_type(), luaL_callmeta(), and luaL_typename.
Referenced by luaB_tostring(), and str_format().


Definition at line 116 of file lauxlib.c.
References countlevels(), lua_Debug::currentline, lua_Debug::istailcall, LEVELS1, lua_concat(), lua_getinfo(), lua_getstack(), lua_gettop(), lua_pushfstring(), lua_pushliteral, pushfuncname(), and lua_Debug::short_src.
Referenced by db_traceback(), and traceback().


| LUALIB_API int() luaL_typerror | ( | lua_State * | L, | |
| int | narg, | |||
| const char * | tname | |||
| ) |
Definition at line 176 of file lauxlib.c.
References typeerror().
Referenced by ai::ai_attack(), ai::ai_move(), ai::ai_stopunit_select(), ai::cfun_ai_get_suitable_keep(), find_widget(), impl_unit_status_get(), impl_unit_status_set(), impl_unit_variables_get(), impl_unit_variables_set(), intf_extract_unit(), intf_match_unit(), intf_set_variable(), luaW_checkconfig(), luaW_checktstring(), luaW_checkunit(), luaW_checkvconfig(), and tstring_concat_aux().


| LUALIB_API void() luaL_unref | ( | lua_State * | L, | |
| int | t, | |||
| int | ref | |||
| ) |
Definition at line 545 of file lauxlib.c.
References freelist, lua_absindex(), lua_pushinteger(), lua_rawgeti(), and lua_rawseti().

| LUALIB_API void() luaL_where | ( | lua_State * | L, | |
| int | lvl | |||
| ) |
Definition at line 185 of file lauxlib.c.
References lua_Debug::currentline, lua_getinfo(), lua_getstack(), lua_pushfstring(), lua_pushliteral, and lua_Debug::short_src.
Referenced by luaB_auxwrap(), luaB_error(), and luaL_error().


| Generated by doxygen 1.7.1 on Fri May 25 2012 01:05:59 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |