Github User Fetcher 1.0.0
C Application with Server and GUI
|
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
Go to the source code of this file.
Data Structures | |
struct | Smain |
Macros | |
#define | lua_c |
#define | notail(x) {if ((x)[2] != '\0') return -1;} |
Functions | |
static void | lstop (lua_State *L, lua_Debug *ar) |
static void | laction (int i) |
static void | print_usage (void) |
static void | l_message (const char *pname, const char *msg) |
static int | report (lua_State *L, int status) |
static int | traceback (lua_State *L) |
static int | docall (lua_State *L, int narg, int clear) |
static void | print_version (void) |
static int | getargs (lua_State *L, char **argv, int n) |
static int | dofile (lua_State *L, const char *name) |
static int | dostring (lua_State *L, const char *s, const char *name) |
static int | dolibrary (lua_State *L, const char *name) |
static const char * | get_prompt (lua_State *L, int firstline) |
static int | incomplete (lua_State *L, int status) |
static int | pushline (lua_State *L, int firstline) |
static int | loadline (lua_State *L) |
static void | dotty (lua_State *L) |
static int | handle_script (lua_State *L, char **argv, int n) |
static int | collectargs (char **argv, int *pi, int *pv, int *pe) |
static int | runargs (lua_State *L, char **argv, int n) |
static int | handle_luainit (lua_State *L) |
static int | pmain (lua_State *L) |
int | main (int argc, char **argv) |
Variables | |
static lua_State * | globalL = NULL |
static const char * | progname = LUA_PROGNAME |
#define lua_c |
Definition at line 13 of file lua-5.1.5/src/lua.c.
#define notail | ( | x | ) | {if ((x)[2] != '\0') return -1;} |
Definition at line 258 of file lua-5.1.5/src/lua.c.
Referenced by collectargs().
|
static |
Definition at line 261 of file lua-5.1.5/src/lua.c.
Referenced by pmain().
|
static |
Definition at line 96 of file lua-5.1.5/src/lua.c.
References laction(), lua_gc(), LUA_GCCOLLECT, lua_gettop(), lua_insert, LUA_MULTRET, lua_pcall, lua_pushcfunction, lua_remove, and traceback().
Referenced by dofile(), dolibrary(), dostring(), dotty(), and handle_script().
|
static |
Definition at line 134 of file lua-5.1.5/src/lua.c.
References docall(), luaL_loadfile, name, and report().
Referenced by handle_luainit(), and pmain().
|
static |
Definition at line 146 of file lua-5.1.5/src/lua.c.
References docall(), lua_getglobal, lua_pushstring(), name, and report().
Referenced by runargs().
|
static |
Definition at line 140 of file lua-5.1.5/src/lua.c.
References docall(), luaL_loadbuffer, name, report(), and s.
Referenced by handle_luainit(), and runargs().
|
static |
Definition at line 216 of file lua-5.1.5/src/lua.c.
References docall(), l_message(), loadline(), lua_getglobal, lua_gettop(), lua_insert, lua_pcall, lua_pushfstring(), LUA_QL, lua_settop(), lua_tostring, NULL, progname, and report().
Referenced by pmain().
|
static |
Definition at line 153 of file lua-5.1.5/src/lua.c.
References lua_getfield(), LUA_GLOBALSINDEX, lua_pop, LUA_PROMPT, LUA_PROMPT2, lua_tostring, and NULL.
Referenced by pushline().
|
static |
Definition at line 116 of file lua-5.1.5/src/lua.c.
References lua_createtable(), lua_pushstring(), lua_rawseti(), and luaL_checkstack().
Referenced by handle_script().
|
static |
Definition at line 323 of file lua-5.1.5/src/lua.c.
References dofile(), dostring(), LUA_INIT, and NULL.
Referenced by pmain().
|
static |
Definition at line 239 of file lua-5.1.5/src/lua.c.
References docall(), getargs(), lua_insert, lua_pop, lua_setglobal, luaL_loadfile, NULL, and report().
Referenced by pmain().
|
static |
Definition at line 163 of file lua-5.1.5/src/lua.c.
References LUA_ERRSYNTAX, lua_pop, LUA_QL, and lua_tolstring().
Referenced by loadline().
|
static |
Definition at line 58 of file lua-5.1.5/src/lua.c.
Referenced by dotty(), main(), print_version(), and report().
|
static |
Definition at line 35 of file lua-5.1.5/src/lua.c.
References globalL, lstop(), LUA_MASKCALL, LUA_MASKCOUNT, LUA_MASKRET, and lua_sethook().
Referenced by docall().
|
static |
Definition at line 196 of file lua-5.1.5/src/lua.c.
References incomplete(), lua_concat(), lua_insert, lua_pushliteral, lua_remove, lua_saveline, lua_settop(), lua_strlen, lua_tostring, luaL_loadbuffer, and pushline().
Referenced by dotty().
Definition at line 28 of file lua-5.1.5/src/lua.c.
References lua_sethook(), luaL_error(), and NULL.
Referenced by laction().
int main | ( | int | argc, |
char ** | argv ) |
Definition at line 377 of file lua-5.1.5/src/lua.c.
References Smain::argc, Smain::argv, l_message(), lua_close(), lua_cpcall(), lua_open, NULL, pmain(), report(), s, and Smain::status.
|
static |
Definition at line 340 of file lua-5.1.5/src/lua.c.
References Smain::argv, collectargs(), dofile(), dotty(), globalL, handle_luainit(), handle_script(), has_e, has_i, has_v, lua_gc(), LUA_GCRESTART, LUA_GCSTOP, lua_stdin_is_tty, lua_touserdata(), luaL_openlibs(), NULL, print_usage(), print_version(), progname, runargs(), and s.
Referenced by main().
|
static |
Definition at line 42 of file lua-5.1.5/src/lua.c.
|
static |
Definition at line 111 of file lua-5.1.5/src/lua.c.
References l_message(), LUA_COPYRIGHT, LUA_RELEASE, and NULL.
Referenced by pmain().
|
static |
Definition at line 177 of file lua-5.1.5/src/lua.c.
References get_prompt(), lua_freeline, LUA_MAXINPUT, lua_pushfstring(), lua_pushstring(), and lua_readline.
Referenced by loadline().
|
static |
Definition at line 65 of file lua-5.1.5/src/lua.c.
References l_message(), lua_isnil, lua_pop, lua_tostring, NULL, and progname.
Referenced by dofile(), dolibrary(), dostring(), dotty(), handle_script(), and main().
|
static |
Definition at line 294 of file lua-5.1.5/src/lua.c.
References chunk(), dolibrary(), dostring(), lua_assert, and NULL.
Referenced by pmain().
|
static |
Definition at line 76 of file lua-5.1.5/src/lua.c.
References lua_call, lua_getfield(), LUA_GLOBALSINDEX, lua_isfunction, lua_isstring(), lua_istable, lua_pop, lua_pushinteger(), and lua_pushvalue().
Referenced by docall().
Definition at line 22 of file lua-5.1.5/src/lua.c.
|
static |
Definition at line 24 of file lua-5.1.5/src/lua.c.
Referenced by dotty(), pmain(), print_usage(), and report().