lua5.4
宏定义 | 函数 | 变量
lua.c 文件参考
#include "lprefix.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
lua.c 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

宏定义

#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)
 

函数

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)
 

变量

static lua_StateglobalL = NULL
 
static const char * progname = LUA_PROGNAME
 

宏定义说明

◆ EOFMARK

#define EOFMARK   "<eof>"

◆ has_e

#define has_e   8 /* -e */

◆ has_E

#define has_E   16 /* -E */

◆ has_error

#define has_error   1 /* bad option */

◆ has_i

#define has_i   2 /* -i */

◆ has_v

#define has_v   4 /* -v */

◆ lua_c

#define lua_c

◆ lua_freeline

#define lua_freeline (   L,
 
)    { (void)L; (void)b; }

◆ LUA_INIT_VAR

#define LUA_INIT_VAR   "LUA_INIT"

◆ lua_initreadline

#define lua_initreadline (   L)    ((void)L)

◆ LUA_INITVARVERSION

#define LUA_INITVARVERSION   LUA_INIT_VAR LUA_VERSUFFIX

◆ LUA_MAXINPUT

#define LUA_MAXINPUT   512

◆ LUA_PROGNAME

#define LUA_PROGNAME   "lua"

◆ LUA_PROMPT

#define LUA_PROMPT   "> "

◆ LUA_PROMPT2

#define LUA_PROMPT2   ">> "

◆ lua_readline

#define lua_readline (   L,
  b,
 
)
值:
((void)L, fputs(p, stdout), fflush(stdout), /* show prompt */ \
fgets(b, LUA_MAXINPUT, stdin) != NULL) /* get line */

◆ 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

#define setsignal   signal

函数说明

◆ addreturn()

static int addreturn ( lua_State L)
static
函数调用图:
这是这个函数的调用关系图:

◆ 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()

static void doREPL ( lua_State L)
static
函数调用图:
这是这个函数的调用关系图:

◆ 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()

static int handle_luainit ( lua_State L)
static
函数调用图:
这是这个函数的调用关系图:

◆ 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()

static void l_print ( lua_State L)
static
函数调用图:
这是这个函数的调用关系图:

◆ laction()

static void laction ( int  i)
static
函数调用图:
这是这个函数的调用关系图:

◆ loadline()

static int loadline ( lua_State L)
static
函数调用图:
这是这个函数的调用关系图:

◆ lstop()

static void lstop ( lua_State L,
lua_Debug ar 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ main()

int main ( int  argc,
char **  argv 
)
函数调用图:

◆ msghandler()

static int msghandler ( lua_State L)
static
函数调用图:
这是这个函数的调用关系图:

◆ multiline()

static int multiline ( lua_State L)
static
函数调用图:
这是这个函数的调用关系图:

◆ pmain()

static int pmain ( lua_State L)
static
函数调用图:
这是这个函数的调用关系图:

◆ print_usage()

static void print_usage ( const char *  badoption)
static
这是这个函数的调用关系图:

◆ print_version()

static void print_version ( void  )
static
这是这个函数的调用关系图:

◆ pushargs()

static int pushargs ( lua_State L)
static
函数调用图:
这是这个函数的调用关系图:

◆ 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

lua_State* globalL = NULL
static

◆ progname

const char* progname = LUA_PROGNAME
static
LUA_MAXINPUT
#define LUA_MAXINPUT
Definition: lua.c:375