w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

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,
  p 
)     (fprintf(stderr, (s), (p)), fflush(stderr))

Definition at line 233 of file lauxlib.h.

◆ luaL_addchar

#define luaL_addchar (   B,
  c 
)
Value:
((void)((B)->n < (B)->size || luaL_prepbuffsize((B), 1)), \
((B)->b[(B)->n++] = (c)))
#define b
Definition: jpegint.h:372
static void
Definition: fpif.c:118
#define c(n)
Definition: gpos-common.c:150
#define B(x, y)
static int size
Definition: ppmlabel.c:24
char *() luaL_prepbuffsize(luaL_Buffer *B, size_t sz)
Definition: lauxlib.c:505

Definition at line 157 of file lauxlib.h.

◆ luaL_addsize

#define luaL_addsize (   B,
  s 
)    ((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,
  n 
)    (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,
  s 
)     (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,
  n 
)    (lua_getfield(L, LUA_REGISTRYINDEX, (n)))

Definition at line 135 of file lauxlib.h.

◆ luaL_loadbuffer

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

Definition at line 139 of file lauxlib.h.

◆ luaL_loadfile

#define luaL_loadfile (   L,
  f 
)    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,
  d 
)    (lua_isnoneornil(L,(n)) ? (d) : f(L,(n)))

Definition at line 137 of file lauxlib.h.

◆ luaL_optstring

#define luaL_optstring (   L,
  n,
  d 
)    (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,
  i 
)    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 
)

Definition at line 528 of file lauxlib.c.

◆ luaL_addstring()

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

Definition at line 537 of file lauxlib.c.

◆ luaL_addvalue()

void() luaL_addvalue ( luaL_Buffer B)

Definition at line 558 of file lauxlib.c.

◆ luaL_argerror()

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

Definition at line 164 of file lauxlib.c.

◆ luaL_buffinit()

void() luaL_buffinit ( lua_State L,
luaL_Buffer B 
)

Definition at line 569 of file lauxlib.c.

◆ luaL_buffinitsize()

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

Definition at line 577 of file lauxlib.c.

◆ luaL_callmeta()

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

Definition at line 788 of file lauxlib.c.

◆ luaL_checkany()

void() luaL_checkany ( lua_State L,
int  arg 
)

Definition at line 384 of file lauxlib.c.

◆ luaL_checkinteger()

lua_Integer() luaL_checkinteger ( lua_State L,
int  arg 
)

Definition at line 430 of file lauxlib.c.

◆ luaL_checklstring()

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

Definition at line 390 of file lauxlib.c.

◆ luaL_checknumber()

lua_Number() luaL_checknumber ( lua_State L,
int  arg 
)

Definition at line 408 of file lauxlib.c.

◆ luaL_checkoption()

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

Definition at line 348 of file lauxlib.c.

◆ luaL_checkstack()

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

Definition at line 368 of file lauxlib.c.

◆ luaL_checktype()

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

Definition at line 378 of file lauxlib.c.

◆ luaL_checkudata()

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

Definition at line 333 of file lauxlib.c.

◆ luaL_checkversion_()

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

Definition at line 1038 of file lauxlib.c.

◆ luaL_error()

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

Definition at line 223 of file lauxlib.c.

◆ luaL_execresult()

int() luaL_execresult ( lua_State L,
int  stat 
)

Definition at line 274 of file lauxlib.c.

◆ luaL_fileresult()

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

Definition at line 234 of file lauxlib.c.

◆ luaL_getmetafield()

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

Definition at line 772 of file lauxlib.c.

◆ luaL_getsubtable()

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

Definition at line 951 of file lauxlib.c.

◆ luaL_gsub()

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

Definition at line 991 of file lauxlib.c.

◆ luaL_len()

lua_Integer() luaL_len ( lua_State L,
int  idx 
)

Definition at line 798 of file lauxlib.c.

◆ luaL_loadbufferx()

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

Definition at line 755 of file lauxlib.c.

◆ luaL_loadfilex()

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

Definition at line 703 of file lauxlib.c.

◆ luaL_loadstring()

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

Definition at line 764 of file lauxlib.c.

◆ luaL_newmetatable()

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

Definition at line 299 of file lauxlib.c.

◆ luaL_newstate()

lua_State*() luaL_newstate ( void  )

Definition at line 1031 of file lauxlib.c.

◆ luaL_optinteger()

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

Definition at line 440 of file lauxlib.c.

◆ luaL_optlstring()

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

Definition at line 397 of file lauxlib.c.

◆ luaL_optnumber()

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

Definition at line 417 of file lauxlib.c.

◆ luaL_prepbuffsize()

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

Definition at line 505 of file lauxlib.c.

◆ luaL_pushresult()

void() luaL_pushresult ( luaL_Buffer B)

Definition at line 542 of file lauxlib.c.

◆ luaL_pushresultsize()

void() luaL_pushresultsize ( luaL_Buffer B,
size_t  sz 
)

Definition at line 552 of file lauxlib.c.

◆ luaL_ref()

int() luaL_ref ( lua_State L,
int  t 
)

Definition at line 595 of file lauxlib.c.

◆ luaL_requiref()

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

Definition at line 971 of file lauxlib.c.

◆ luaL_setfuncs()

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

Definition at line 934 of file lauxlib.c.

◆ luaL_setmetatable()

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

Definition at line 312 of file lauxlib.c.

◆ luaL_testudata()

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

Definition at line 318 of file lauxlib.c.

◆ luaL_tolstring()

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

Definition at line 810 of file lauxlib.c.

◆ luaL_traceback()

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

Definition at line 125 of file lauxlib.c.

◆ luaL_unref()

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

Definition at line 616 of file lauxlib.c.

◆ luaL_where()

void() luaL_where ( lua_State L,
int  lvl 
)

Definition at line 205 of file lauxlib.c.