Github User Fetcher 1.0.0
C Application with Server and GUI
|
#include "lprefix.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
Go to the source code of this file.
Macros | |
#define | lua_c |
#define | LUA_PROGNAME "lua" |
#define | LUA_INIT_VAR "LUA_INIT" |
#define | LUA_INITVARVERSION LUA_INIT_VAR LUA_VERSUFFIX |
#define | setsignal signal |
#define | has_error 1 /* bad option */ |
#define | has_i 2 /* -i */ |
#define | has_v 4 /* -v */ |
#define | has_e 8 /* -e */ |
#define | has_E 16 /* -E */ |
#define | LUA_PROMPT "> " |
#define | LUA_PROMPT2 ">> " |
#define | LUA_MAXINPUT 512 |
#define | lua_stdin_is_tty() 1 /* assume stdin is a tty */ |
#define | lua_initreadline(L) ((void)L) |
#define | lua_readline(L, b, p) |
#define | lua_saveline(L, line) { (void)L; (void)line; } |
#define | lua_freeline(L, b) { (void)L; (void)b; } |
#define | EOFMARK "<eof>" |
#define | marklen (sizeof(EOFMARK)/sizeof(char) - 1) |
Functions | |
static void | lstop (lua_State *L, lua_Debug *ar) |
static void | laction (int i) |
static void | print_usage (const char *badoption) |
static void | l_message (const char *pname, const char *msg) |
static int | report (lua_State *L, int status) |
static int | msghandler (lua_State *L) |
static int | docall (lua_State *L, int narg, int nres) |
static void | print_version (void) |
static void | createargtable (lua_State *L, char **argv, int argc, int script) |
static int | dochunk (lua_State *L, int status) |
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 int | pushargs (lua_State *L) |
static int | handle_script (lua_State *L, char **argv) |
static int | collectargs (char **argv, int *first) |
static int | runargs (lua_State *L, char **argv, int n) |
static int | handle_luainit (lua_State *L) |
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 | addreturn (lua_State *L) |
static int | multiline (lua_State *L) |
static int | loadline (lua_State *L) |
static void | l_print (lua_State *L) |
static void | doREPL (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 EOFMARK "<eof>" |
Definition at line 454 of file lua-5.4.3/src/lua.c.
Referenced by incomplete().
#define has_e 8 /* -e */ |
Definition at line 258 of file lua-5.4.3/src/lua.c.
Referenced by collectargs(), and pmain().
#define has_E 16 /* -E */ |
Definition at line 259 of file lua-5.4.3/src/lua.c.
Referenced by collectargs(), and pmain().
#define has_error 1 /* bad option */ |
Definition at line 255 of file lua-5.4.3/src/lua.c.
Referenced by collectargs(), and pmain().
#define has_i 2 /* -i */ |
Definition at line 256 of file lua-5.4.3/src/lua.c.
Referenced by collectargs(), and pmain().
#define has_v 4 /* -v */ |
Definition at line 257 of file lua-5.4.3/src/lua.c.
Referenced by collectargs(), and pmain().
#define lua_c |
Definition at line 7 of file lua-5.4.3/src/lua.c.
#define lua_freeline | ( | L, | |
b ) { (void)L; (void)b; } |
Definition at line 431 of file lua-5.4.3/src/lua.c.
Referenced by pushline().
#define LUA_INIT_VAR "LUA_INIT" |
Definition at line 29 of file lua-5.4.3/src/lua.c.
Referenced by handle_luainit().
#define lua_initreadline | ( | L | ) | ((void)L) |
Definition at line 426 of file lua-5.4.3/src/lua.c.
Referenced by doREPL().
#define LUA_INITVARVERSION LUA_INIT_VAR LUA_VERSUFFIX |
Definition at line 32 of file lua-5.4.3/src/lua.c.
Referenced by handle_luainit().
#define LUA_MAXINPUT 512 |
Definition at line 375 of file lua-5.4.3/src/lua.c.
Referenced by pushline().
#define LUA_PROGNAME "lua" |
Definition at line 25 of file lua-5.4.3/src/lua.c.
#define LUA_PROMPT "> " |
Definition at line 370 of file lua-5.4.3/src/lua.c.
Referenced by get_prompt().
#define LUA_PROMPT2 ">> " |
Definition at line 371 of file lua-5.4.3/src/lua.c.
Referenced by get_prompt().
#define lua_readline | ( | L, | |
b, | |||
p ) |
Definition at line 427 of file lua-5.4.3/src/lua.c.
Referenced by pushline().
#define lua_saveline | ( | L, | |
line ) { (void)L; (void)line; } |
Definition at line 430 of file lua-5.4.3/src/lua.c.
Referenced by addreturn(), and multiline().
Definition at line 400 of file lua-5.4.3/src/lua.c.
Referenced by pmain().
#define marklen (sizeof(EOFMARK)/sizeof(char) - 1) |
Definition at line 455 of file lua-5.4.3/src/lua.c.
Referenced by incomplete().
#define setsignal signal |
Definition at line 55 of file lua-5.4.3/src/lua.c.
|
static |
Definition at line 504 of file lua-5.4.3/src/lua.c.
References LUA_OK, lua_pop, lua_pushfstring(), lua_remove, lua_saveline, lua_tostring, and luaL_loadbuffer.
Referenced by loadline().
|
static |
Definition at line 268 of file lua-5.4.3/src/lua.c.
References has_e, has_E, has_error, has_i, has_v, and NULL.
Referenced by pmain().
|
static |
Definition at line 180 of file lua-5.4.3/src/lua.c.
References lua_createtable(), lua_pushstring(), lua_rawseti(), and lua_setglobal.
Referenced by pmain().
|
static |
Definition at line 152 of file lua-5.4.3/src/lua.c.
References globalL, laction(), lua_gettop(), lua_insert, lua_pcall, lua_pushcfunction, lua_remove, msghandler(), and setsignal.
Referenced by dochunk(), dolibrary(), doREPL(), and handle_script().
|
static |
Definition at line 193 of file lua-5.4.3/src/lua.c.
References docall(), LUA_OK, and report().
Referenced by dofile(), and dostring().
|
static |
Definition at line 199 of file lua-5.4.3/src/lua.c.
References dochunk(), luaL_loadfile, and name.
Referenced by handle_luainit(), and pmain().
|
static |
Definition at line 213 of file lua-5.4.3/src/lua.c.
References docall(), lua_getglobal, LUA_OK, lua_pushstring(), lua_setglobal, name, and report().
Referenced by runargs().
|
static |
Definition at line 577 of file lua-5.4.3/src/lua.c.
References docall(), l_print(), loadline(), lua_initreadline, LUA_MULTRET, LUA_OK, lua_settop(), lua_writeline, NULL, progname, and report().
Referenced by pmain().
|
static |
Definition at line 204 of file lua-5.4.3/src/lua.c.
References dochunk(), luaL_loadbuffer, name, and s.
Referenced by handle_luainit(), and runargs().
|
static |
Definition at line 443 of file lua-5.4.3/src/lua.c.
References lua_getglobal, LUA_PROMPT, LUA_PROMPT2, lua_remove, LUA_TNIL, luaL_tolstring(), and NULL.
Referenced by pushline().
|
static |
Definition at line 348 of file lua-5.4.3/src/lua.c.
References dofile(), dostring(), LUA_INIT_VAR, LUA_INITVARVERSION, LUA_OK, name, and NULL.
Referenced by pmain().
|
static |
Definition at line 240 of file lua-5.4.3/src/lua.c.
References docall(), LUA_MULTRET, LUA_OK, luaL_loadfile, NULL, pushargs(), and report().
Referenced by pmain().
|
static |
Definition at line 463 of file lua-5.4.3/src/lua.c.
References EOFMARK, LUA_ERRSYNTAX, lua_pop, lua_tolstring(), and marklen.
Referenced by multiline().
|
static |
|
static |
Definition at line 560 of file lua-5.4.3/src/lua.c.
References l_message(), lua_getglobal, lua_gettop(), lua_insert, LUA_MINSTACK, LUA_OK, lua_pcall, lua_pushfstring(), lua_tostring, luaL_checkstack(), and progname.
Referenced by doREPL().
|
static |
Definition at line 76 of file lua-5.4.3/src/lua.c.
References globalL, lstop(), LUA_MASKCALL, LUA_MASKCOUNT, LUA_MASKLINE, LUA_MASKRET, lua_sethook(), and setsignal.
Referenced by docall().
|
static |
Definition at line 544 of file lua-5.4.3/src/lua.c.
References addreturn(), lua_assert, lua_gettop(), LUA_OK, lua_remove, lua_settop(), multiline(), and pushline().
Referenced by doREPL().
Definition at line 63 of file lua-5.4.3/src/lua.c.
References lua_sethook(), luaL_error(), and NULL.
Referenced by laction().
int main | ( | int | argc, |
char ** | argv ) |
Definition at line 643 of file lua-5.4.3/src/lua.c.
References l_message(), lua_close(), LUA_OK, lua_pcall, lua_pushcfunction, lua_pushinteger(), lua_pushlightuserdata(), lua_toboolean(), luaL_newstate(), NULL, pmain(), and report().
|
static |
Definition at line 133 of file lua-5.4.3/src/lua.c.
References lua_pushfstring(), lua_tostring, LUA_TSTRING, lua_type(), luaL_callmeta(), luaL_traceback(), luaL_typename, and NULL.
Referenced by docall().
|
static |
Definition at line 522 of file lua-5.4.3/src/lua.c.
References incomplete(), lua_concat(), lua_insert, lua_pushliteral, lua_saveline, lua_tolstring(), luaL_loadbuffer, and pushline().
Referenced by loadline().
|
static |
Definition at line 600 of file lua-5.4.3/src/lua.c.
References collectargs(), createargtable(), dofile(), doREPL(), handle_luainit(), handle_script(), has_e, has_E, has_error, has_i, has_v, lua_gc(), LUA_GCGEN, LUA_OK, lua_pushboolean(), LUA_REGISTRYINDEX, lua_setfield(), lua_stdin_is_tty, lua_tointeger, lua_touserdata(), luaL_checkversion, luaL_openlibs(), NULL, print_usage(), print_version(), progname, and runargs().
Referenced by main().
|
static |
Definition at line 83 of file lua-5.4.3/src/lua.c.
References lua_writestringerror, and progname.
|
static |
Definition at line 166 of file lua-5.4.3/src/lua.c.
References LUA_COPYRIGHT, lua_writeline, and lua_writestring.
Referenced by pmain().
|
static |
Definition at line 227 of file lua-5.4.3/src/lua.c.
References lua_getglobal, lua_rawgeti(), lua_remove, LUA_TTABLE, luaL_checkstack(), luaL_error(), and luaL_len().
Referenced by handle_script().
|
static |
Definition at line 479 of file lua-5.4.3/src/lua.c.
References get_prompt(), lua_freeline, LUA_MAXINPUT, lua_pop, lua_pushfstring(), lua_pushlstring(), and lua_readline.
Referenced by loadline(), and multiline().
|
static |
Definition at line 120 of file lua-5.4.3/src/lua.c.
References l_message(), LUA_OK, lua_pop, lua_tostring, and progname.
Referenced by dochunk(), dolibrary(), doREPL(), handle_script(), and main().
|
static |
Definition at line 322 of file lua-5.4.3/src/lua.c.
References dolibrary(), dostring(), lua_assert, LUA_OK, lua_warning(), and NULL.
Referenced by pmain().
Definition at line 35 of file lua-5.4.3/src/lua.c.
|
static |
Definition at line 37 of file lua-5.4.3/src/lua.c.
Referenced by doREPL(), l_print(), pmain(), print_usage(), and report().