File nut/lua/lauxlib.c


Included Files


Preprocessor definitions

#define lauxlib_c

#define LUA_LIB

#define FREELIST_REF 0

#define abs_index( L, i )

#define bufflen( B )

#define bufffree( B )

#define LIMIT

#define PRINTALLOC


Typedef LoadF

typedef struct LoadF LoadF
struct LoadF  
   {  
      int extraline;  
      FILE* f;  
      char buff[1024];  
   }  

Typedef LoadS

typedef struct LoadS LoadS
struct LoadS  
   {  
      const char* s;  
      size_t size;  
   }  

Global Variable lua_alloc_size

int lua_alloc_size
Visible in:   nut/lua/lauxlib.c
Used in: l_alloc() nut/lua/lauxlib.c

Global Variable lua_alloc_max

int lua_alloc_max
Visible in:   nut/lua/lauxlib.c
Used in: l_alloc() nut/lua/lauxlib.c

Global Function luaL_addlstring()

void luaL_addlstring ( luaL_Buffer* B, const char* s, size_t l )
Calls: luaL_prepbuffer() nut/lua/lauxlib.c
Called by: luaL_addstring() nut/lua/lauxlib.c
  luaL_gsub() nut/lua/lauxlib.c

Global Function luaL_addstring()

void luaL_addstring ( luaL_Buffer* B, const char* s )
Calls: luaL_addlstring() nut/lua/lauxlib.c
  strlen() nut/c/string/strlen.c
Called by: luaL_gsub() nut/lua/lauxlib.c

Global Function luaL_addvalue()

void luaL_addvalue ( luaL_Buffer* B )
Calls: adjuststack() nut/lua/lauxlib.c
  emptybuffer() nut/lua/lauxlib.c
  memcpy() nut/c/string/memcpy.c
  lua_insert(), lua_settop(), lua_tolstring()

Global Function luaL_argerror()

int luaL_argerror ( lua_State* L, int narg, const char* extramsg )
Calls: luaL_error() nut/lua/lauxlib.c
  strcmp() nut/c/string/strcmp.c
  lua_getinfo(), lua_getstack()
Called by: luaL_checkany() nut/lua/lauxlib.c
  luaL_checkoption() nut/lua/lauxlib.c
  luaL_typerror() nut/lua/lauxlib.c

Global Function luaL_buffinit()

void luaL_buffinit ( lua_State* L, luaL_Buffer* B )
Called by: luaL_gsub() nut/lua/lauxlib.c

Global Function luaL_callmeta()

int luaL_callmeta ( lua_State* L, int obj, const char* event )
Calls: luaL_getmetafield() nut/lua/lauxlib.c
  lua_call(), lua_gettop(), lua_pushvalue()

Global Function luaL_checkany()

void luaL_checkany ( lua_State* L, int narg )
Calls: luaL_argerror() nut/lua/lauxlib.c
  lua_type()

Global Function luaL_checkinteger()

lua_Integer luaL_checkinteger ( lua_State* L, int narg )
Calls: tag_error() nut/lua/lauxlib.c
  lua_isnumber(), lua_tointeger()
Called by: luaL_optinteger() nut/lua/lauxlib.c

Global Function luaL_checklstring()

const char* luaL_checklstring ( lua_State* L, int narg, size_t* len )
Calls: tag_error() nut/lua/lauxlib.c
  lua_tolstring()
Called by: luaL_checkoption() nut/lua/lauxlib.c
  luaL_optlstring() nut/lua/lauxlib.c

Global Function luaL_checknumber()

lua_Number luaL_checknumber ( lua_State* L, int narg )
Calls: tag_error() nut/lua/lauxlib.c
  lua_isnumber(), lua_tonumber()
Called by: luaL_optnumber() nut/lua/lauxlib.c

Global Function luaL_checkoption()

int luaL_checkoption ( lua_State* L, int narg, const char* def, const char* const lst[] )
Calls: luaL_argerror() nut/lua/lauxlib.c
  luaL_checklstring() nut/lua/lauxlib.c
  luaL_optlstring() nut/lua/lauxlib.c
  strcmp() nut/c/string/strcmp.c
  lua_pushfstring()

Global Function luaL_checkstack()

void luaL_checkstack ( lua_State* L, int space, const char* mes )
Calls: luaL_error() nut/lua/lauxlib.c
  lua_checkstack()

Global Function luaL_checktype()

void luaL_checktype ( lua_State* L, int narg, int t )
Calls: tag_error() nut/lua/lauxlib.c
  lua_type()

Global Function luaL_checkudata()

void* luaL_checkudata ( lua_State* L, int ud, const char* tname )
Calls: luaL_typerror() nut/lua/lauxlib.c
  lua_getfield(), lua_getmetatable(), lua_rawequal(), lua_settop(), lua_touserdata()

Global Function luaL_error()

int luaL_error ( lua_State* L, const char* fmt, ... )
Calls: luaL_where() nut/lua/lauxlib.c
  __builtin_va_end(), __builtin_va_start(), lua_concat(), lua_error(), lua_pushvfstring()
Called by: luaL_argerror() nut/lua/lauxlib.c
  luaL_checkstack() nut/lua/lauxlib.c
  luaL_openlib() nut/lua/lauxlib.c

Global Function luaL_findtable()

const char* luaL_findtable ( lua_State* L, int idx, const char* fname, int szhint )
Calls: strchr() nut/c/string/strchr.c
  strlen() nut/c/string/strlen.c
  lua_createtable(), lua_pushlstring(), lua_pushvalue(), lua_rawget(), lua_remove(), lua_settable(), lua_settop(), lua_type()
Called by: luaL_openlib() nut/lua/lauxlib.c

Global Function luaL_getmetafield()

int luaL_getmetafield ( lua_State* L, int obj, const char* event )
Calls: lua_getmetatable(), lua_pushstring(), lua_rawget(), lua_remove(), lua_settop(), lua_type()
Called by: luaL_callmeta() nut/lua/lauxlib.c

Global Function luaL_gsub()

const char* luaL_gsub ( lua_State* L, const char* s, const char* p, const char* r )
Calls: luaL_addlstring() nut/lua/lauxlib.c
  luaL_addstring() nut/lua/lauxlib.c
  luaL_buffinit() nut/lua/lauxlib.c
  luaL_pushresult() nut/lua/lauxlib.c
  strlen() nut/c/string/strlen.c
  strstr() nut/c/string/strstr.c
  lua_tolstring()

Global Function luaL_loadbuffer()

int luaL_loadbuffer ( lua_State* L, const char* buff, size_t size, const char* name )
Calls: lua_load()
Called by: luaL_loadstring() nut/lua/lauxlib.c
References Functions: getS() nut/lua/lauxlib.c

Global Function luaL_loadfile()

int luaL_loadfile ( lua_State* L, const char* filename )
Calls: errfile() nut/lua/lauxlib.c
  ferror() nut/crt/ferror.c
  getc() nut/crt/getc.c
  ungetc() nut/crt/ungetc.c
  fclose(), fopen(), freopen(), lua_gettop(), lua_load(), lua_pushfstring(), lua_pushlstring(), lua_remove(), lua_settop(), lua_tolstring()
References Functions: getF() nut/lua/lauxlib.c

Global Function luaL_loadstring()

int ( luaL_loadstring) ( lua_State* L, const char* s )
Calls: luaL_loadbuffer() nut/lua/lauxlib.c
  strlen() nut/c/string/strlen.c

Global Function luaL_newmetatable()

int luaL_newmetatable ( lua_State* L, const char* tname )
Calls: lua_createtable(), lua_getfield(), lua_pushvalue(), lua_setfield(), lua_settop(), lua_type()

Global Function luaL_newstate()

lua_State* luaL_newstate ( void )
Calls: lua_atpanic(), lua_newstate()
References Functions: l_alloc() nut/lua/lauxlib.c
  panic() nut/lua/lauxlib.c

Global Function luaL_openlib()

void luaL_openlib ( lua_State* L, const char* libname, const luaL_Reg* l, int nup )
Calls: libsize() nut/lua/lauxlib.c
  luaL_error() nut/lua/lauxlib.c
  luaL_findtable() nut/lua/lauxlib.c
  lua_getfield(), lua_insert(), lua_pushcclosure(), lua_pushvalue(), lua_remove(), lua_setfield(), lua_settop(), lua_type()
Called by: luaL_register() nut/lua/lauxlib.c

Global Function luaL_optinteger()

lua_Integer luaL_optinteger ( lua_State* L, int narg, lua_Integer def )
Calls: luaL_checkinteger() nut/lua/lauxlib.c
  lua_type()

Global Function luaL_optlstring()

const char* luaL_optlstring ( lua_State* L, int narg, const char* def, size_t* len )
Calls: luaL_checklstring() nut/lua/lauxlib.c
  strlen() nut/c/string/strlen.c
  lua_type()
Called by: luaL_checkoption() nut/lua/lauxlib.c

Global Function luaL_optnumber()

lua_Number luaL_optnumber ( lua_State* L, int narg, lua_Number def )
Calls: luaL_checknumber() nut/lua/lauxlib.c
  lua_type()

Global Function luaL_prepbuffer()

char* luaL_prepbuffer ( luaL_Buffer* B )
Calls: adjuststack() nut/lua/lauxlib.c
  emptybuffer() nut/lua/lauxlib.c
Called by: luaL_addlstring() nut/lua/lauxlib.c

Global Function luaL_pushresult()

void luaL_pushresult ( luaL_Buffer* B )
Calls: emptybuffer() nut/lua/lauxlib.c
  lua_concat()
Called by: luaL_gsub() nut/lua/lauxlib.c

Global Function luaL_ref()

int luaL_ref ( lua_State* L, int t )
Calls: lua_gettop(), lua_objlen(), lua_rawgeti(), lua_rawseti(), lua_settop(), lua_tointeger(), lua_type()

Global Function luaL_register()

void ( luaL_register) ( lua_State* L, const char* libname, const luaL_Reg* l )
Calls: luaL_openlib() nut/lua/lauxlib.c

Global Function luaL_typerror()

int luaL_typerror ( lua_State* L, int narg, const char* tname )
Calls: luaL_argerror() nut/lua/lauxlib.c
  lua_pushfstring(), lua_type(), lua_typename()
Called by: luaL_checkudata() nut/lua/lauxlib.c
  tag_error() nut/lua/lauxlib.c

Global Function luaL_unref()

void luaL_unref ( lua_State* L, int t, int ref )
Calls: lua_gettop(), lua_pushinteger(), lua_rawgeti(), lua_rawseti()

Global Function luaL_where()

void luaL_where ( lua_State* L, int level )
Calls: lua_getinfo(), lua_getstack(), lua_pushfstring(), lua_pushlstring()
Called by: luaL_error() nut/lua/lauxlib.c

Local Function adjuststack()

static void adjuststack ( luaL_Buffer* B )
Calls: lua_concat(), lua_objlen()
Called by: luaL_addvalue() nut/lua/lauxlib.c
  luaL_prepbuffer() nut/lua/lauxlib.c

Local Function emptybuffer()

static int emptybuffer ( luaL_Buffer* B )
Calls: lua_pushlstring()
Called by: luaL_addvalue() nut/lua/lauxlib.c
  luaL_prepbuffer() nut/lua/lauxlib.c
  luaL_pushresult() nut/lua/lauxlib.c

Local Function errfile()

static int errfile ( lua_State* L, const char* what, int fnameindex )
Calls: lua_pushfstring(), lua_remove(), lua_tolstring(), strerror()
Called by: luaL_loadfile() nut/lua/lauxlib.c

Local Function getF()

static const char* getF ( lua_State* L, void* ud, size_t* size )
Calls: feof() nut/crt/feof.c
  fread() nut/crt/fread.c
Used in: luaL_loadfile() nut/lua/lauxlib.c

Local Function getS()

static const char* getS ( lua_State* L, void* ud, size_t* size )
Used in: luaL_loadbuffer() nut/lua/lauxlib.c

Local Function l_alloc()

static void* l_alloc ( void* ud, void* ptr, size_t osize, size_t nsize )
Calls: free() nut/crt/malloc.c
  malloc() nut/crt/malloc.c
  memcpy() nut/c/string/memcpy.c
  printf() nut/crt/printf.c
Used in: luaL_newstate() nut/lua/lauxlib.c
References Variables: lua_alloc_max nut/lua/lauxlib.c
  lua_alloc_size nut/lua/lauxlib.c

Local Function libsize()

static int libsize ( const luaL_Reg* l )
Called by: luaL_openlib() nut/lua/lauxlib.c

Local Function panic()

static int panic ( lua_State* L )
Calls: fprintf() nut/crt/fprintf.c
  lua_tolstring()
Used in: luaL_newstate() nut/lua/lauxlib.c

Local Function tag_error()

static void tag_error ( lua_State* L, int narg, int tag )
Calls: luaL_typerror() nut/lua/lauxlib.c
  lua_typename()
Called by: luaL_checkinteger() nut/lua/lauxlib.c
  luaL_checklstring() nut/lua/lauxlib.c
  luaL_checknumber() nut/lua/lauxlib.c
  luaL_checktype() nut/lua/lauxlib.c