Macros | Functions | Variables
lua.c File Reference
#include "lprefix.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
Include dependency graph for lua.c:

Go to the source code of this file.

Macros

#define EOFMARK   "<eof>"
 
#define has_e   8 /* -e */
 
#define has_E   16 /* -E */
 
#define has_error   1 /* bad option */
 
#define has_i   2 /* -i */
 
#define has_v   4 /* -v */
 
#define lua_c
 
#define lua_freeline(L, b)   { (void)L; (void)b; }
 
#define LUA_INIT_VAR   "LUA_INIT"
 
#define lua_initreadline(L)   ((void)L)
 
#define LUA_INITVARVERSION   LUA_INIT_VAR LUA_VERSUFFIX
 
#define LUA_MAXINPUT   512
 
#define LUA_PROGNAME   "lua"
 
#define LUA_PROMPT   "> "
 
#define LUA_PROMPT2   ">> "
 
#define lua_readline(L, b, p)
 
#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)
 
#define setsignal   signal
 

Functions

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)
 

Variables

static lua_StateglobalL = NULL
 
static const char * progname = LUA_PROGNAME
 

Macro Definition Documentation

◆ EOFMARK

#define EOFMARK   "<eof>"

Definition at line 454 of file lua.c.

◆ has_e

#define has_e   8 /* -e */

Definition at line 258 of file lua.c.

◆ has_E

#define has_E   16 /* -E */

Definition at line 259 of file lua.c.

◆ has_error

#define has_error   1 /* bad option */

Definition at line 255 of file lua.c.

◆ has_i

#define has_i   2 /* -i */

Definition at line 256 of file lua.c.

◆ has_v

#define has_v   4 /* -v */

Definition at line 257 of file lua.c.

◆ lua_c

#define lua_c

Definition at line 7 of file lua.c.

◆ lua_freeline

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

Definition at line 431 of file lua.c.

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

Definition at line 426 of file lua.c.

◆ LUA_INITVARVERSION

#define LUA_INITVARVERSION   LUA_INIT_VAR LUA_VERSUFFIX

Definition at line 32 of file lua.c.

◆ LUA_MAXINPUT

#define LUA_MAXINPUT   512

Definition at line 375 of file lua.c.

◆ LUA_PROGNAME

#define LUA_PROGNAME   "lua"

Definition at line 25 of file lua.c.

◆ LUA_PROMPT

#define LUA_PROMPT   "> "

Definition at line 370 of file lua.c.

◆ LUA_PROMPT2

#define LUA_PROMPT2   ">> "

Definition at line 371 of file lua.c.

◆ lua_readline

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

Definition at line 427 of file lua.c.

◆ lua_saveline

#define lua_saveline (   L,
  line 
)    { (void)L; (void)line; }

Definition at line 430 of file lua.c.

◆ lua_stdin_is_tty

#define lua_stdin_is_tty ( )    1 /* assume stdin is a tty */

Definition at line 400 of file lua.c.

◆ marklen

#define marklen   (sizeof(EOFMARK)/sizeof(char) - 1)

Definition at line 455 of file lua.c.

◆ setsignal

#define setsignal   signal

Definition at line 55 of file lua.c.

Function Documentation

◆ addreturn()

static int addreturn ( lua_State L)
static

Definition at line 504 of file lua.c.

◆ collectargs()

static int collectargs ( char **  argv,
int *  first 
)
static

Definition at line 268 of file lua.c.

◆ createargtable()

static void createargtable ( lua_State L,
char **  argv,
int  argc,
int  script 
)
static

Definition at line 180 of file lua.c.

◆ docall()

static int docall ( lua_State L,
int  narg,
int  nres 
)
static

Definition at line 152 of file lua.c.

◆ dochunk()

static int dochunk ( lua_State L,
int  status 
)
static

Definition at line 193 of file lua.c.

◆ dofile()

static int dofile ( lua_State L,
const char *  name 
)
static

Definition at line 199 of file lua.c.

◆ dolibrary()

static int dolibrary ( lua_State L,
const char *  name 
)
static

Definition at line 213 of file lua.c.

◆ doREPL()

static void doREPL ( lua_State L)
static

Definition at line 577 of file lua.c.

◆ dostring()

static int dostring ( lua_State L,
const char *  s,
const char *  name 
)
static

Definition at line 204 of file lua.c.

◆ get_prompt()

static const char* get_prompt ( lua_State L,
int  firstline 
)
static

Definition at line 443 of file lua.c.

◆ handle_luainit()

static int handle_luainit ( lua_State L)
static

Definition at line 348 of file lua.c.

◆ handle_script()

static int handle_script ( lua_State L,
char **  argv 
)
static

Definition at line 240 of file lua.c.

◆ incomplete()

static int incomplete ( lua_State L,
int  status 
)
static

Definition at line 463 of file lua.c.

◆ l_message()

static void l_message ( const char *  pname,
const char *  msg 
)
static

Definition at line 109 of file lua.c.

◆ l_print()

static void l_print ( lua_State L)
static

Definition at line 560 of file lua.c.

◆ laction()

static void laction ( int  i)
static

Definition at line 76 of file lua.c.

◆ loadline()

static int loadline ( lua_State L)
static

Definition at line 544 of file lua.c.

◆ lstop()

static void lstop ( lua_State L,
lua_Debug ar 
)
static

Definition at line 63 of file lua.c.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 643 of file lua.c.

◆ msghandler()

static int msghandler ( lua_State L)
static

Definition at line 133 of file lua.c.

◆ multiline()

static int multiline ( lua_State L)
static

Definition at line 522 of file lua.c.

◆ pmain()

static int pmain ( lua_State L)
static

Definition at line 600 of file lua.c.

◆ 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

Definition at line 166 of file lua.c.

◆ pushargs()

static int pushargs ( lua_State L)
static

Definition at line 227 of file lua.c.

◆ pushline()

static int pushline ( lua_State L,
int  firstline 
)
static

Definition at line 479 of file lua.c.

◆ report()

static int report ( lua_State L,
int  status 
)
static

Definition at line 120 of file lua.c.

◆ runargs()

static int runargs ( lua_State L,
char **  argv,
int  n 
)
static

Definition at line 322 of file lua.c.

Variable Documentation

◆ globalL

lua_State* globalL = NULL
static

Definition at line 35 of file lua.c.

◆ progname

const char* progname = LUA_PROGNAME
static

Definition at line 37 of file lua.c.

nlohmann::detail::void
j template void())
Definition: json.hpp:4061
LUA_MAXINPUT
#define LUA_MAXINPUT
Definition: lua.c:375


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Aug 11 2024 02:24:28