Go to the source code of this file.
Defines | |
#define | loslib_c |
#define | LUA_LIB |
Functions | |
static int | os_pushresult (lua_State *L, int i, const char *filename) |
static int | os_execute (lua_State *L) |
static int | os_remove (lua_State *L) |
static int | os_rename (lua_State *L) |
static int | os_tmpname (lua_State *L) |
static int | os_getenv (lua_State *L) |
static int | os_clock (lua_State *L) |
static void | setfield (lua_State *L, const char *key, int value) |
static void | setboolfield (lua_State *L, const char *key, int value) |
static int | getboolfield (lua_State *L, const char *key) |
static int | getfield (lua_State *L, const char *key, int d) |
static int | os_date (lua_State *L) |
static int | os_time (lua_State *L) |
static int | os_difftime (lua_State *L) |
static int | os_setlocale (lua_State *L) |
static int | os_exit (lua_State *L) |
LUALIB_API int | luaopen_os (lua_State *L) |
Variables | |
static const luaL_Reg | syslib [] |
static int getboolfield | ( | lua_State * | L, | |
const char * | key | |||
) | [static] |
Definition at line 104 of file loslib.c.
References lua_getfield(), lua_isnil, lua_pop, and lua_toboolean().
Referenced by os_time().
static int getfield | ( | lua_State * | L, | |
const char * | key, | |||
int | d | |||
) | [static] |
Definition at line 113 of file loslib.c.
References lua_getfield(), lua_isnumber(), lua_pop, LUA_QS, lua_tointeger(), and luaL_error().
Referenced by os_time().
LUALIB_API int luaopen_os | ( | lua_State * | L | ) |
Definition at line 243 of file loslib.c.
References LUA_OSLIBNAME, and luaL_register().
static int os_clock | ( | lua_State * | L | ) | [static] |
Definition at line 78 of file loslib.c.
References lua_pushnumber().
static int os_date | ( | lua_State * | L | ) | [static] |
Definition at line 128 of file loslib.c.
References lua_createtable(), lua_pushnil(), luaL_addchar, luaL_addlstring(), luaL_buffinit(), luaL_checknumber(), luaL_opt, luaL_optstring, luaL_pushresult(), setboolfield(), and setfield().
static int os_difftime | ( | lua_State * | L | ) | [static] |
Definition at line 199 of file loslib.c.
References lua_pushnumber(), luaL_checknumber(), and luaL_optnumber().
static int os_execute | ( | lua_State * | L | ) | [static] |
Definition at line 42 of file loslib.c.
References lua_pushinteger(), and luaL_optstring.
static int os_exit | ( | lua_State * | L | ) | [static] |
Definition at line 220 of file loslib.c.
References luaL_optint.
static int os_getenv | ( | lua_State * | L | ) | [static] |
Definition at line 72 of file loslib.c.
References lua_pushstring(), and luaL_checkstring.
static int os_pushresult | ( | lua_State * | L, | |
int | i, | |||
const char * | filename | |||
) | [static] |
Definition at line 27 of file loslib.c.
References lua_pushboolean(), lua_pushfstring(), lua_pushinteger(), and lua_pushnil().
Referenced by os_remove(), and os_rename().
static int os_remove | ( | lua_State * | L | ) | [static] |
Definition at line 48 of file loslib.c.
References luaL_checkstring, and os_pushresult().
static int os_rename | ( | lua_State * | L | ) | [static] |
Definition at line 54 of file loslib.c.
References luaL_checkstring, and os_pushresult().
static int os_setlocale | ( | lua_State * | L | ) | [static] |
Definition at line 208 of file loslib.c.
References lua_pushstring(), luaL_checkoption(), and luaL_optstring.
static int os_time | ( | lua_State * | L | ) | [static] |
Definition at line 174 of file loslib.c.
References getboolfield(), getfield(), lua_isnoneornil, lua_pushnil(), lua_pushnumber(), lua_settop(), LUA_TTABLE, and luaL_checktype().
static int os_tmpname | ( | lua_State * | L | ) | [static] |
Definition at line 61 of file loslib.c.
References lua_pushstring(), lua_tmpnam, LUA_TMPNAMBUFSIZE, and luaL_error().
static void setboolfield | ( | lua_State * | L, | |
const char * | key, | |||
int | value | |||
) | [static] |
Definition at line 97 of file loslib.c.
References lua_pushboolean(), and lua_setfield().
Referenced by os_date().
static void setfield | ( | lua_State * | L, | |
const char * | key, | |||
int | value | |||
) | [static] |
Definition at line 92 of file loslib.c.
References lua_pushinteger(), and lua_setfield().
Referenced by os_date().
{ {"clock", os_clock}, {"date", os_date}, {"difftime", os_difftime}, {"execute", os_execute}, {"exit", os_exit}, {"getenv", os_getenv}, {"remove", os_remove}, {"rename", os_rename}, {"setlocale", os_setlocale}, {"time", os_time}, {"tmpname", os_tmpname}, {NULL, NULL} }
ContextLogger2—ContextLogger2 Logger Daemon Internals—Generated on Mon May 2 13:50:00 2011 by Doxygen 1.6.1