Macros | Typedefs | Functions | Variables
loadlib.c File Reference
#include "lprefix.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
Include dependency graph for loadlib.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DLMSG   "dynamic libraries not enabled; check your Lua installation"
 
#define ERRFUNC   2
 
#define ERRLIB   1
 
#define LIB_FAIL   "open"
 
#define LIB_FAIL   "absent"
 
#define loadlib_c
 
#define LUA_CPATH_VAR   "LUA_CPATH"
 
#define LUA_CSUBSEP   LUA_DIRSEP
 
#define LUA_IGMARK   "-"
 
#define LUA_LIB
 
#define LUA_LSUBSEP   LUA_DIRSEP
 
#define LUA_OFSEP   "_"
 
#define LUA_PATH_VAR   "LUA_PATH"
 
#define LUA_POF   "luaopen_"
 
#define setprogdir(L)   ((void)0)
 

Typedefs

typedef void(* voidf) (void)
 

Functions

static void addtoclib (lua_State *L, const char *path, void *plib)
 
static void * checkclib (lua_State *L, const char *path)
 
static int checkload (lua_State *L, int stat, const char *filename)
 
static void createclibstable (lua_State *L)
 
static void createsearcherstable (lua_State *L)
 
static const char * findfile (lua_State *L, const char *name, const char *pname, const char *dirsep)
 
static void findloader (lua_State *L, const char *name)
 
static int gctm (lua_State *L)
 
static const char * getnextfilename (char **path, char *end)
 
static int ll_loadlib (lua_State *L)
 
static int ll_require (lua_State *L)
 
static int ll_searchpath (lua_State *L)
 
static int loadfunc (lua_State *L, const char *filename, const char *modname)
 
static int lookforfunc (lua_State *L, const char *path, const char *sym)
 
static void * lsys_load (lua_State *L, const char *path, int seeglb)
 
static lua_CFunction lsys_sym (lua_State *L, void *lib, const char *sym)
 
static void lsys_unloadlib (void *lib)
 
LUAMOD_API int luaopen_package (lua_State *L)
 
static int noenv (lua_State *L)
 
static void pusherrornotfound (lua_State *L, const char *path)
 
static int readable (const char *filename)
 
static int searcher_C (lua_State *L)
 
static int searcher_Croot (lua_State *L)
 
static int searcher_Lua (lua_State *L)
 
static int searcher_preload (lua_State *L)
 
static const char * searchpath (lua_State *L, const char *name, const char *path, const char *sep, const char *dirsep)
 
static void setpath (lua_State *L, const char *fieldname, const char *envname, const char *dft)
 

Variables

static const char *const CLIBS = "_CLIBS"
 
static const luaL_Reg ll_funcs []
 
static const luaL_Reg pk_funcs []
 

Macro Definition Documentation

#define DLMSG   "dynamic libraries not enabled; check your Lua installation"

Definition at line 235 of file loadlib.c.

#define ERRFUNC   2

Definition at line 375 of file loadlib.c.

#define ERRLIB   1

Definition at line 374 of file loadlib.c.

#define LIB_FAIL   "open"

Definition at line 232 of file loadlib.c.

#define LIB_FAIL   "absent"

Definition at line 232 of file loadlib.c.

#define loadlib_c

Definition at line 11 of file loadlib.c.

#define LUA_CPATH_VAR   "LUA_CPATH"

Definition at line 275 of file loadlib.c.

#define LUA_CSUBSEP   LUA_DIRSEP

Definition at line 43 of file loadlib.c.

#define LUA_IGMARK   "-"

Definition at line 32 of file loadlib.c.

#define LUA_LIB

Definition at line 12 of file loadlib.c.

#define LUA_LSUBSEP   LUA_DIRSEP

Definition at line 47 of file loadlib.c.

#define LUA_OFSEP   "_"

Definition at line 55 of file loadlib.c.

#define LUA_PATH_VAR   "LUA_PATH"

Definition at line 271 of file loadlib.c.

#define LUA_POF   "luaopen_"

Definition at line 52 of file loadlib.c.

#define setprogdir (   L)    ((void)0)

Definition at line 67 of file loadlib.c.

Typedef Documentation

typedef void(* voidf) (void)

Definition at line 74 of file loadlib.c.

Function Documentation

static void addtoclib ( lua_State L,
const char *  path,
void *  plib 
)
static

Definition at line 347 of file loadlib.c.

static void* checkclib ( lua_State L,
const char *  path 
)
static

Definition at line 333 of file loadlib.c.

static int checkload ( lua_State L,
int  stat,
const char *  filename 
)
static

Definition at line 532 of file loadlib.c.

static void createclibstable ( lua_State L)
static

Definition at line 727 of file loadlib.c.

static void createsearcherstable ( lua_State L)
static

Definition at line 707 of file loadlib.c.

static const char* findfile ( lua_State L,
const char *  name,
const char *  pname,
const char *  dirsep 
)
static

Definition at line 520 of file loadlib.c.

static void findloader ( lua_State L,
const char *  name 
)
static

Definition at line 622 of file loadlib.c.

static int gctm ( lua_State L)
static

Definition at line 361 of file loadlib.c.

static const char* getnextfilename ( char **  path,
char *  end 
)
static

Definition at line 445 of file loadlib.c.

static int ll_loadlib ( lua_State L)
static

Definition at line 409 of file loadlib.c.

static int ll_require ( lua_State L)
static

Definition at line 654 of file loadlib.c.

static int ll_searchpath ( lua_State L)
static

Definition at line 506 of file loadlib.c.

static int loadfunc ( lua_State L,
const char *  filename,
const char *  modname 
)
static

Definition at line 560 of file loadlib.c.

static int lookforfunc ( lua_State L,
const char *  path,
const char *  sym 
)
static

Definition at line 388 of file loadlib.c.

static void * lsys_load ( lua_State L,
const char *  path,
int  seeglb 
)
static

Definition at line 243 of file loadlib.c.

static lua_CFunction lsys_sym ( lua_State L,
void *  lib,
const char *  sym 
)
static

Definition at line 250 of file loadlib.c.

static void lsys_unloadlib ( void *  lib)
static

Definition at line 238 of file loadlib.c.

LUAMOD_API int luaopen_package ( lua_State L)

Definition at line 736 of file loadlib.c.

static int noenv ( lua_State L)
static

Definition at line 283 of file loadlib.c.

static void pusherrornotfound ( lua_State L,
const char *  path 
)
static

Definition at line 469 of file loadlib.c.

static int readable ( const char *  filename)
static

Definition at line 432 of file loadlib.c.

static int searcher_C ( lua_State L)
static

Definition at line 578 of file loadlib.c.

static int searcher_Croot ( lua_State L)
static

Definition at line 586 of file loadlib.c.

static int searcher_Lua ( lua_State L)
static

Definition at line 543 of file loadlib.c.

static int searcher_preload ( lua_State L)
static

Definition at line 608 of file loadlib.c.

static const char* searchpath ( lua_State L,
const char *  name,
const char *  path,
const char *  sep,
const char *  dirsep 
)
static

Definition at line 479 of file loadlib.c.

static void setpath ( lua_State L,
const char *  fieldname,
const char *  envname,
const char *  dft 
)
static

Definition at line 295 of file loadlib.c.

Variable Documentation

const char* const CLIBS = "_CLIBS"
static

Definition at line 62 of file loadlib.c.

const luaL_Reg ll_funcs[]
static
Initial value:
= {
{"require", ll_require},
{NULL, NULL}
}
static int ll_require(lua_State *L)
Definition: loadlib.c:654

Definition at line 701 of file loadlib.c.

const luaL_Reg pk_funcs[]
static
Initial value:
= {
{"loadlib", ll_loadlib},
{"searchpath", ll_searchpath},
{"preload", NULL},
{"cpath", NULL},
{"path", NULL},
{"searchers", NULL},
{"loaded", NULL},
{NULL, NULL}
}
static int ll_searchpath(lua_State *L)
Definition: loadlib.c:506
static int ll_loadlib(lua_State *L)
Definition: loadlib.c:409

Definition at line 688 of file loadlib.c.



plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 04:02:48