#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.
|
static int | addreturn (lua_State *L) |
|
static int | collectargs (char **argv, int *first) |
|
static void | createargtable (lua_State *L, char **argv, int argc, int script) |
|
static int | docall (lua_State *L, int narg, int nres) |
|
static int | dochunk (lua_State *L, int status) |
|
static int | dofile (lua_State *L, const char *name) |
|
static int | dolibrary (lua_State *L, const char *name) |
|
static void | doREPL (lua_State *L) |
|
static int | dostring (lua_State *L, const char *s, const char *name) |
|
static const char * | get_prompt (lua_State *L, int firstline) |
|
static int | handle_luainit (lua_State *L) |
|
static int | handle_script (lua_State *L, char **argv) |
|
static int | incomplete (lua_State *L, int status) |
|
static void | l_message (const char *pname, const char *msg) |
|
static void | l_print (lua_State *L) |
|
static void | laction (int i) |
|
static int | loadline (lua_State *L) |
|
static void | lstop (lua_State *L, lua_Debug *ar) |
|
int | main (int argc, char **argv) |
|
static int | msghandler (lua_State *L) |
|
static int | multiline (lua_State *L) |
|
static int | pmain (lua_State *L) |
|
static void | print_usage (const char *badoption) |
|
static void | print_version (void) |
|
static int | pushargs (lua_State *L) |
|
static int | pushline (lua_State *L, int firstline) |
|
static int | report (lua_State *L, int status) |
|
static int | runargs (lua_State *L, char **argv, int n) |
|
◆ EOFMARK
◆ has_e
◆ has_E
#define has_E 16 /* -E */ |
◆ has_error
#define has_error 1 /* bad option */ |
◆ has_i
◆ has_v
◆ lua_c
Definition at line 7 of file lua.c.
◆ lua_freeline
#define lua_freeline |
( |
|
L, |
|
|
|
b |
|
) |
| { (void)L; (void)b; } |
◆ LUA_INIT_VAR
#define LUA_INIT_VAR "LUA_INIT" |
Definition at line 29 of file lua.c.
◆ lua_initreadline
#define lua_initreadline |
( |
|
L | ) |
((void)L) |
◆ LUA_INITVARVERSION
Definition at line 32 of file lua.c.
◆ LUA_MAXINPUT
◆ LUA_PROGNAME
#define LUA_PROGNAME "lua" |
Definition at line 25 of file lua.c.
◆ LUA_PROMPT
◆ LUA_PROMPT2
#define LUA_PROMPT2 ">> " |
◆ lua_readline
#define lua_readline |
( |
|
L, |
|
|
|
b, |
|
|
|
p |
|
) |
| |
Value: ((
void)L, fputs(p, stdout), fflush(stdout), \
Definition at line 427 of file lua.c.
◆ lua_saveline
#define lua_saveline |
( |
|
L, |
|
|
|
line |
|
) |
| { (void)L; (void)line; } |
◆ lua_stdin_is_tty
#define lua_stdin_is_tty |
( |
| ) |
1 /* assume stdin is a tty */ |
◆ marklen
#define marklen (sizeof(EOFMARK)/sizeof(char) - 1) |
◆ setsignal
Definition at line 55 of file lua.c.
◆ addreturn()
◆ collectargs()
static int collectargs |
( |
char ** |
argv, |
|
|
int * |
first |
|
) |
| |
|
static |
◆ createargtable()
static void createargtable |
( |
lua_State * |
L, |
|
|
char ** |
argv, |
|
|
int |
argc, |
|
|
int |
script |
|
) |
| |
|
static |
◆ docall()
static int docall |
( |
lua_State * |
L, |
|
|
int |
narg, |
|
|
int |
nres |
|
) |
| |
|
static |
◆ dochunk()
static int dochunk |
( |
lua_State * |
L, |
|
|
int |
status |
|
) |
| |
|
static |
◆ dofile()
static int dofile |
( |
lua_State * |
L, |
|
|
const char * |
name |
|
) |
| |
|
static |
◆ dolibrary()
static int dolibrary |
( |
lua_State * |
L, |
|
|
const char * |
name |
|
) |
| |
|
static |
◆ doREPL()
◆ dostring()
static int dostring |
( |
lua_State * |
L, |
|
|
const char * |
s, |
|
|
const char * |
name |
|
) |
| |
|
static |
◆ get_prompt()
static const char* get_prompt |
( |
lua_State * |
L, |
|
|
int |
firstline |
|
) |
| |
|
static |
◆ handle_luainit()
◆ handle_script()
static int handle_script |
( |
lua_State * |
L, |
|
|
char ** |
argv |
|
) |
| |
|
static |
◆ incomplete()
static int incomplete |
( |
lua_State * |
L, |
|
|
int |
status |
|
) |
| |
|
static |
◆ l_message()
static void l_message |
( |
const char * |
pname, |
|
|
const char * |
msg |
|
) |
| |
|
static |
◆ l_print()
◆ laction()
static void laction |
( |
int |
i | ) |
|
|
static |
Definition at line 76 of file lua.c.
◆ loadline()
◆ lstop()
Definition at line 63 of file lua.c.
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
◆ msghandler()
◆ multiline()
◆ pmain()
◆ print_usage()
static void print_usage |
( |
const char * |
badoption | ) |
|
|
static |
Definition at line 83 of file lua.c.
◆ print_version()
static void print_version |
( |
void |
| ) |
|
|
static |
◆ pushargs()
◆ pushline()
static int pushline |
( |
lua_State * |
L, |
|
|
int |
firstline |
|
) |
| |
|
static |
◆ report()
static int report |
( |
lua_State * |
L, |
|
|
int |
status |
|
) |
| |
|
static |
◆ runargs()
static int runargs |
( |
lua_State * |
L, |
|
|
char ** |
argv, |
|
|
int |
n |
|
) |
| |
|
static |
◆ globalL
Definition at line 35 of file lua.c.
◆ progname
Definition at line 37 of file lua.c.