Ardour  9.0-pre0-350-gf17a656217
lauxlib.h File Reference
#include <stddef.h>
#include <stdio.h>
#include "lua.h"
Include dependency graph for lauxlib.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  luaL_Reg
 
struct  luaL_Buffer
 
struct  luaL_Stream
 

Macros

#define LUA_ERRFILE   (LUA_ERRERR+1)
 
#define LUA_LOADED_TABLE   "_LOADED"
 
#define LUA_PRELOAD_TABLE   "_PRELOAD"
 
#define LUAL_NUMSIZES   (sizeof(lua_Integer)*16 + sizeof(lua_Number))
 
#define luaL_checkversion(L)    luaL_checkversion_(L, LUA_VERSION_NUM, LUAL_NUMSIZES)
 
#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_checkversion(L), luaL_newlibtable(L,l), luaL_setfuncs(L,l,0))
 
#define luaL_argcheck(L, cond, arg, extramsg)    ((void)((cond) || luaL_argerror(L, (arg), (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_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 lua_writestring(s, l)   fwrite((s), sizeof(char), (l), stdout)
 
#define lua_writeline()   (lua_writestring("\n", 1), fflush(stdout))
 
#define lua_writestringerror(s, p)    (fprintf(stderr, (s), (p)), fflush(stderr))
 

Typedefs

typedef struct luaL_Reg luaL_Reg
 
typedef struct luaL_Buffer luaL_Buffer
 
typedef struct luaL_Stream luaL_Stream
 

Functions

void() luaL_checkversion_ (lua_State *L, lua_Number ver, size_t sz)
 
int() luaL_getmetafield (lua_State *L, int obj, const char *e)
 
int() luaL_callmeta (lua_State *L, int obj, const char *e)
 
const char *() luaL_tolstring (lua_State *L, int idx, size_t *len)
 
int() luaL_argerror (lua_State *L, int arg, const char *extramsg)
 
const char *() luaL_checklstring (lua_State *L, int arg, size_t *l)
 
const char *() luaL_optlstring (lua_State *L, int arg, const char *def, size_t *l)
 
lua_Number() luaL_checknumber (lua_State *L, int arg)
 
lua_Number() luaL_optnumber (lua_State *L, int arg, lua_Number def)
 
lua_Integer() luaL_checkinteger (lua_State *L, int arg)
 
lua_Integer() luaL_optinteger (lua_State *L, int arg, lua_Integer def)
 
void() luaL_checkstack (lua_State *L, int sz, const char *msg)
 
void() luaL_checktype (lua_State *L, int arg, int t)
 
void() luaL_checkany (lua_State *L, int arg)
 
int() luaL_newmetatable (lua_State *L, const char *tname)
 
void() luaL_setmetatable (lua_State *L, const char *tname)
 
void *() luaL_testudata (lua_State *L, int ud, const char *tname)
 
void *() luaL_checkudata (lua_State *L, int ud, const char *tname)
 
void() luaL_where (lua_State *L, int lvl)
 
int() luaL_error (lua_State *L, const char *fmt,...)
 
int() luaL_checkoption (lua_State *L, int arg, const char *def, const char *const lst[])
 
int() luaL_fileresult (lua_State *L, int stat, const char *fname)
 
int() luaL_execresult (lua_State *L, int stat)
 
int() luaL_ref (lua_State *L, int t)
 
void() luaL_unref (lua_State *L, int t, int ref)
 
int() luaL_loadfilex (lua_State *L, const char *filename, const char *mode)
 
int() luaL_loadbufferx (lua_State *L, const char *buff, size_t sz, const char *name, const char *mode)
 
int() luaL_loadstring (lua_State *L, const char *s)
 
lua_State *() luaL_newstate (void)
 
lua_Integer() luaL_len (lua_State *L, int idx)
 
const char *() luaL_gsub (lua_State *L, const char *s, const char *p, const char *r)
 
void() luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup)
 
int() luaL_getsubtable (lua_State *L, int idx, const char *fname)
 
void() luaL_traceback (lua_State *L, lua_State *L1, const char *msg, int level)
 
void() luaL_requiref (lua_State *L, const char *modname, lua_CFunction openf, int glb)
 
void() luaL_buffinit (lua_State *L, luaL_Buffer *B)
 
char *() luaL_prepbuffsize (luaL_Buffer *B, size_t sz)
 
void() luaL_addlstring (luaL_Buffer *B, const char *s, size_t l)
 
void() luaL_addstring (luaL_Buffer *B, const char *s)
 
void() luaL_addvalue (luaL_Buffer *B)
 
void() luaL_pushresult (luaL_Buffer *B)
 
void() luaL_pushresultsize (luaL_Buffer *B, size_t sz)
 
char *() luaL_buffinitsize (lua_State *L, luaL_Buffer *B, size_t sz)
 

Macro Definition Documentation

◆ LUA_ERRFILE

#define LUA_ERRFILE   (LUA_ERRERR+1)

Definition at line 20 of file lauxlib.h.

◆ LUA_FILEHANDLE

#define LUA_FILEHANDLE   "FILE*"

Definition at line 190 of file lauxlib.h.

◆ LUA_LOADED_TABLE

#define LUA_LOADED_TABLE   "_LOADED"

Definition at line 24 of file lauxlib.h.

◆ LUA_NOREF

#define LUA_NOREF   (-2)

Definition at line 77 of file lauxlib.h.

◆ LUA_PRELOAD_TABLE

#define LUA_PRELOAD_TABLE   "_PRELOAD"

Definition at line 28 of file lauxlib.h.

◆ LUA_REFNIL

#define LUA_REFNIL   (-1)

Definition at line 78 of file lauxlib.h.

◆ lua_writeline

#define lua_writeline ( )    (lua_writestring("\n", 1), fflush(stdout))

Definition at line 228 of file lauxlib.h.

◆ lua_writestring

#define lua_writestring (   s,
 
)    fwrite((s), sizeof(char), (l), stdout)

Definition at line 223 of file lauxlib.h.

◆ lua_writestringerror

#define lua_writestringerror (   s,
 
)     (fprintf(stderr, (s), (p)), fflush(stderr))

Definition at line 233 of file lauxlib.h.

◆ luaL_addchar

#define luaL_addchar (   B,
 
)
Value:
((void)((B)->n < (B)->size || luaL_prepbuffsize((B), 1)), \
((B)->b[(B)->n++] = (c)))
char *() luaL_prepbuffsize(luaL_Buffer *B, size_t sz)

Definition at line 157 of file lauxlib.h.

◆ luaL_addsize

#define luaL_addsize (   B,
 
)    ((B)->n += (s))

Definition at line 161 of file lauxlib.h.

◆ luaL_argcheck

#define luaL_argcheck (   L,
  cond,
  arg,
  extramsg 
)     ((void)((cond) || luaL_argerror(L, (arg), (extramsg))))

Definition at line 122 of file lauxlib.h.

◆ luaL_checkstring

#define luaL_checkstring (   L,
 
)    (luaL_checklstring(L, (n), NULL))

Definition at line 124 of file lauxlib.h.

◆ luaL_checkversion

#define luaL_checkversion (   L)     luaL_checkversion_(L, LUA_VERSION_NUM, LUAL_NUMSIZES)

Definition at line 40 of file lauxlib.h.

◆ luaL_dofile

#define luaL_dofile (   L,
  fn 
)     (luaL_loadfile(L, fn) || lua_pcall(L, 0, LUA_MULTRET, 0))

Definition at line 129 of file lauxlib.h.

◆ luaL_dostring

#define luaL_dostring (   L,
 
)     (luaL_loadstring(L, s) || lua_pcall(L, 0, LUA_MULTRET, 0))

Definition at line 132 of file lauxlib.h.

◆ luaL_getmetatable

#define luaL_getmetatable (   L,
 
)    (lua_getfield(L, LUA_REGISTRYINDEX, (n)))

Definition at line 135 of file lauxlib.h.

◆ luaL_loadbuffer

#define luaL_loadbuffer (   L,
  s,
  sz,
 
)    luaL_loadbufferx(L,s,sz,n,NULL)

Definition at line 139 of file lauxlib.h.

◆ luaL_loadfile

#define luaL_loadfile (   L,
 
)    luaL_loadfilex(L,f,NULL)

Definition at line 86 of file lauxlib.h.

◆ luaL_newlib

#define luaL_newlib (   L,
 
)     (luaL_checkversion(L), luaL_newlibtable(L,l), luaL_setfuncs(L,l,0))

Definition at line 119 of file lauxlib.h.

◆ luaL_newlibtable

#define luaL_newlibtable (   L,
 
)     lua_createtable(L, 0, sizeof(l)/sizeof((l)[0]) - 1)

Definition at line 116 of file lauxlib.h.

◆ LUAL_NUMSIZES

#define LUAL_NUMSIZES   (sizeof(lua_Integer)*16 + sizeof(lua_Number))

Definition at line 37 of file lauxlib.h.

◆ luaL_opt

#define luaL_opt (   L,
  f,
  n,
 
)    (lua_isnoneornil(L,(n)) ? (d) : f(L,(n)))

Definition at line 137 of file lauxlib.h.

◆ luaL_optstring

#define luaL_optstring (   L,
  n,
 
)    (luaL_optlstring(L, (n), (d), NULL))

Definition at line 125 of file lauxlib.h.

◆ luaL_prepbuffer

#define luaL_prepbuffer (   B)    luaL_prepbuffsize(B, LUAL_BUFFERSIZE)

Definition at line 172 of file lauxlib.h.

◆ luaL_typename

#define luaL_typename (   L,
 
)    lua_typename(L, lua_type(L,(i)))

Definition at line 127 of file lauxlib.h.

Typedef Documentation

◆ luaL_Buffer

typedef struct luaL_Buffer luaL_Buffer

◆ luaL_Reg

typedef struct luaL_Reg luaL_Reg

◆ luaL_Stream

typedef struct luaL_Stream luaL_Stream

Function Documentation

◆ luaL_addlstring()

void() luaL_addlstring ( luaL_Buffer B,
const char *  s,
size_t  l 
)

◆ luaL_addstring()

void() luaL_addstring ( luaL_Buffer B,
const char *  s 
)

◆ luaL_addvalue()

void() luaL_addvalue ( luaL_Buffer B)

◆ luaL_argerror()

int() luaL_argerror ( lua_State L,
int  arg,
const char *  extramsg 
)

◆ luaL_buffinit()

void() luaL_buffinit ( lua_State L,
luaL_Buffer B 
)

◆ luaL_buffinitsize()

char*() luaL_buffinitsize ( lua_State L,
luaL_Buffer B,
size_t  sz 
)

◆ luaL_callmeta()

int() luaL_callmeta ( lua_State L,
int  obj,
const char *  e 
)

◆ luaL_checkany()

void() luaL_checkany ( lua_State L,
int  arg 
)

◆ luaL_checkinteger()

lua_Integer() luaL_checkinteger ( lua_State L,
int  arg 
)

◆ luaL_checklstring()

const char*() luaL_checklstring ( lua_State L,
int  arg,
size_t *  l 
)

◆ luaL_checknumber()

lua_Number() luaL_checknumber ( lua_State L,
int  arg 
)

◆ luaL_checkoption()

int() luaL_checkoption ( lua_State L,
int  arg,
const char *  def,
const char *const  lst[] 
)

◆ luaL_checkstack()

void() luaL_checkstack ( lua_State L,
int  sz,
const char *  msg 
)

◆ luaL_checktype()

void() luaL_checktype ( lua_State L,
int  arg,
int  t 
)

◆ luaL_checkudata()

void*() luaL_checkudata ( lua_State L,
int  ud,
const char *  tname 
)

◆ luaL_checkversion_()

void() luaL_checkversion_ ( lua_State L,
lua_Number  ver,
size_t  sz 
)

◆ luaL_error()

int() luaL_error ( lua_State L,
const char *  fmt,
  ... 
)

◆ luaL_execresult()

int() luaL_execresult ( lua_State L,
int  stat 
)

◆ luaL_fileresult()

int() luaL_fileresult ( lua_State L,
int  stat,
const char *  fname 
)

◆ luaL_getmetafield()

int() luaL_getmetafield ( lua_State L,
int  obj,
const char *  e 
)

◆ luaL_getsubtable()

int() luaL_getsubtable ( lua_State L,
int  idx,
const char *  fname 
)

◆ luaL_gsub()

const char*() luaL_gsub ( lua_State L,
const char *  s,
const char *  p,
const char *  r 
)

◆ luaL_len()

lua_Integer() luaL_len ( lua_State L,
int  idx 
)

◆ luaL_loadbufferx()

int() luaL_loadbufferx ( lua_State L,
const char *  buff,
size_t  sz,
const char *  name,
const char *  mode 
)

◆ luaL_loadfilex()

int() luaL_loadfilex ( lua_State L,
const char *  filename,
const char *  mode 
)

◆ luaL_loadstring()

int() luaL_loadstring ( lua_State L,
const char *  s 
)

◆ luaL_newmetatable()

int() luaL_newmetatable ( lua_State L,
const char *  tname 
)

◆ luaL_newstate()

lua_State*() luaL_newstate ( void  )

◆ luaL_optinteger()

lua_Integer() luaL_optinteger ( lua_State L,
int  arg,
lua_Integer  def 
)

◆ luaL_optlstring()

const char*() luaL_optlstring ( lua_State L,
int  arg,
const char *  def,
size_t *  l 
)

◆ luaL_optnumber()

lua_Number() luaL_optnumber ( lua_State L,
int  arg,
lua_Number  def 
)

◆ luaL_prepbuffsize()

char*() luaL_prepbuffsize ( luaL_Buffer B,
size_t  sz 
)

◆ luaL_pushresult()

void() luaL_pushresult ( luaL_Buffer B)

◆ luaL_pushresultsize()

void() luaL_pushresultsize ( luaL_Buffer B,
size_t  sz 
)

◆ luaL_ref()

int() luaL_ref ( lua_State L,
int  t 
)

◆ luaL_requiref()

void() luaL_requiref ( lua_State L,
const char *  modname,
lua_CFunction  openf,
int  glb 
)

◆ luaL_setfuncs()

void() luaL_setfuncs ( lua_State L,
const luaL_Reg l,
int  nup 
)

◆ luaL_setmetatable()

void() luaL_setmetatable ( lua_State L,
const char *  tname 
)

◆ luaL_testudata()

void*() luaL_testudata ( lua_State L,
int  ud,
const char *  tname 
)

◆ luaL_tolstring()

const char*() luaL_tolstring ( lua_State L,
int  idx,
size_t *  len 
)

◆ luaL_traceback()

void() luaL_traceback ( lua_State L,
lua_State L1,
const char *  msg,
int  level 
)

◆ luaL_unref()

void() luaL_unref ( lua_State L,
int  t,
int  ref 
)

◆ luaL_where()

void() luaL_where ( lua_State L,
int  lvl 
)