#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) |
|
#define has_E 16 /* -E */ |
#define has_error 1 /* bad option */ |
Definition at line 7 of file lua.c.
#define lua_freeline |
( |
|
L, |
|
|
|
b |
|
) |
| { (void)L; (void)b; } |
#define LUA_INIT_VAR "LUA_INIT" |
Definition at line 29 of file lua.c.
#define lua_initreadline |
( |
|
L | ) |
((void)L) |
Definition at line 32 of file lua.c.
#define LUA_PROGNAME "lua" |
Definition at line 25 of file lua.c.
#define LUA_PROMPT2 ">> " |
#define lua_readline |
( |
|
L, |
|
|
|
b, |
|
|
|
p |
|
) |
| |
Value:((
void)L, fputs(p, stdout), fflush(stdout), \
Definition at line 407 of file lua.c.
#define lua_saveline |
( |
|
L, |
|
|
|
line |
|
) |
| { (void)L; (void)line; } |
#define lua_stdin_is_tty |
( |
| ) |
1 /* assume stdin is a tty */ |
#define marklen (sizeof(EOFMARK)/sizeof(char) - 1) |
static int collectargs |
( |
char ** |
argv, |
|
|
int * |
first |
|
) |
| |
|
static |
static void createargtable |
( |
lua_State * |
L, |
|
|
char ** |
argv, |
|
|
int |
argc, |
|
|
int |
script |
|
) |
| |
|
static |
static int docall |
( |
lua_State * |
L, |
|
|
int |
narg, |
|
|
int |
nres |
|
) |
| |
|
static |
static int dochunk |
( |
lua_State * |
L, |
|
|
int |
status |
|
) |
| |
|
static |
static int dofile |
( |
lua_State * |
L, |
|
|
const char * |
name |
|
) |
| |
|
static |
static int dolibrary |
( |
lua_State * |
L, |
|
|
const char * |
name |
|
) |
| |
|
static |
static int dostring |
( |
lua_State * |
L, |
|
|
const char * |
s, |
|
|
const char * |
name |
|
) |
| |
|
static |
static const char* get_prompt |
( |
lua_State * |
L, |
|
|
int |
firstline |
|
) |
| |
|
static |
static int handle_script |
( |
lua_State * |
L, |
|
|
char ** |
argv |
|
) |
| |
|
static |
static int incomplete |
( |
lua_State * |
L, |
|
|
int |
status |
|
) |
| |
|
static |
static void l_message |
( |
const char * |
pname, |
|
|
const char * |
msg |
|
) |
| |
|
static |
Definition at line 89 of file lua.c.
static void laction |
( |
int |
i | ) |
|
|
static |
Definition at line 56 of file lua.c.
Definition at line 43 of file lua.c.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
static void print_usage |
( |
const char * |
badoption | ) |
|
|
static |
Definition at line 63 of file lua.c.
static void print_version |
( |
void |
| ) |
|
|
static |
static int pushline |
( |
lua_State * |
L, |
|
|
int |
firstline |
|
) |
| |
|
static |
static int report |
( |
lua_State * |
L, |
|
|
int |
status |
|
) |
| |
|
static |
static int runargs |
( |
lua_State * |
L, |
|
|
char ** |
argv, |
|
|
int |
n |
|
) |
| |
|
static |
Definition at line 35 of file lua.c.
Definition at line 37 of file lua.c.