Github User Fetcher 1.0.0
C Application with Server and GUI
|
#include <errno.h>
#include <locale.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
Go to the source code of this file.
Macros | |
#define | loslib_c |
#define | LUA_LIB |
#define | LUA_STRFTIMEOPTIONS { "aAbBcdHIjmMpSUwWxXyYz%", "" } |
#define | LUA_TMPNAMBUFSIZE L_tmpnam |
#define | lua_tmpnam(b, e) { e = (tmpnam(b) == NULL); } |
#define | l_gmtime(t, r) ((void)r, gmtime(t)) |
#define | l_localtime(t, r) ((void)r, localtime(t)) |
Functions | |
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 const char * | checkoption (lua_State *L, const char *conv, char *buff) |
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) |
LUAMOD_API int | luaopen_os (lua_State *L) |
Variables | |
static const luaL_Reg | syslib [] |
#define l_gmtime | ( | t, | |
r ) ((void)r, gmtime(t)) |
Definition at line 73 of file lua-5.2.4/src/loslib.c.
Referenced by os_date().
#define l_localtime | ( | t, | |
r ) ((void)r, localtime(t)) |
Definition at line 74 of file lua-5.2.4/src/loslib.c.
Referenced by os_date().
#define loslib_c |
Definition at line 14 of file lua-5.2.4/src/loslib.c.
#define LUA_LIB |
Definition at line 15 of file lua-5.2.4/src/loslib.c.
#define LUA_STRFTIMEOPTIONS { "aAbBcdHIjmMpSUwWxXyYz%", "" } |
Definition at line 29 of file lua-5.2.4/src/loslib.c.
Referenced by checkoption().
#define lua_tmpnam | ( | b, | |
e ) { e = (tmpnam(b) == NULL); } |
Definition at line 57 of file lua-5.2.4/src/loslib.c.
Referenced by os_tmpname(), and os_tmpname().
#define LUA_TMPNAMBUFSIZE L_tmpnam |
Definition at line 56 of file lua-5.2.4/src/loslib.c.
Referenced by os_tmpname(), and os_tmpname().
|
static |
Definition at line 171 of file lua-5.2.4/src/loslib.c.
References lua_pushfstring(), LUA_STRFTIMEOPTIONS, luaL_argerror(), and NULL.
Referenced by os_date().
|
static |
Definition at line 148 of file lua-5.2.4/src/loslib.c.
References lua_getfield(), lua_isnil, lua_pop, and lua_toboolean().
Referenced by os_time().
|
static |
Definition at line 157 of file lua-5.2.4/src/loslib.c.
References lua_getfield(), lua_pop, LUA_QS, lua_tointegerx(), and luaL_error().
Referenced by os_time().
LUAMOD_API int luaopen_os | ( | lua_State * | L | ) |
Definition at line 319 of file lua-5.2.4/src/loslib.c.
References luaL_newlib, and syslib.
|
static |
Definition at line 122 of file lua-5.2.4/src/loslib.c.
References lua_pushnumber().
|
static |
Definition at line 195 of file lua-5.2.4/src/loslib.c.
References checkoption(), l_gmtime, l_localtime, lua_createtable(), lua_pushnil(), luaL_addchar, luaL_addlstring(), luaL_buffinit(), luaL_checknumber(), luaL_opt, luaL_optstring, luaL_pushresult(), NULL, s, setboolfield(), and setfield().
|
static |
Definition at line 266 of file lua-5.2.4/src/loslib.c.
References lua_pushnumber(), luaL_checknumber(), and luaL_optnumber().
|
static |
Definition at line 80 of file lua-5.2.4/src/loslib.c.
References lua_pushboolean(), luaL_execresult(), luaL_optstring, and NULL.
|
static |
Definition at line 287 of file lua-5.2.4/src/loslib.c.
References lua_close(), lua_isboolean, lua_toboolean(), and luaL_optint.
|
static |
Definition at line 116 of file lua-5.2.4/src/loslib.c.
References lua_pushstring(), and luaL_checkstring.
|
static |
Definition at line 92 of file lua-5.2.4/src/loslib.c.
References luaL_checkstring, and luaL_fileresult().
|
static |
Definition at line 98 of file lua-5.2.4/src/loslib.c.
References luaL_checkstring, luaL_fileresult(), and NULL.
|
static |
Definition at line 275 of file lua-5.2.4/src/loslib.c.
References lua_pushstring(), luaL_checkoption(), luaL_optstring, and NULL.
|
static |
Definition at line 241 of file lua-5.2.4/src/loslib.c.
References getboolfield(), getfield(), lua_isnoneornil, lua_pushnil(), lua_pushnumber(), lua_settop(), LUA_TTABLE, luaL_checktype(), and NULL.
|
static |
Definition at line 105 of file lua-5.2.4/src/loslib.c.
References lua_pushstring(), lua_tmpnam, LUA_TMPNAMBUFSIZE, and luaL_error().
|
static |
Definition at line 141 of file lua-5.2.4/src/loslib.c.
References lua_pushboolean(), lua_setfield(), and value.
Referenced by os_date().
|
static |
Definition at line 136 of file lua-5.2.4/src/loslib.c.
References lua_pushinteger(), lua_setfield(), and value.
Referenced by os_date().
|
static |
Definition at line 300 of file lua-5.2.4/src/loslib.c.
Referenced by luaopen_os().