RetroArch
Macros | Functions | Variables
luac.c File Reference
#include "lprefix.h"
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "lua.h"
#include "lauxlib.h"
#include "lobject.h"
#include "lstate.h"
#include "lundump.h"
#include "ldebug.h"
#include "lopcodes.h"
Include dependency graph for luac.c:

Macros

#define luac_c
 
#define LUA_CORE
 
#define luaU_print   PrintFunction
 
#define PROGNAME   "luac" /* default program name */
 
#define OUTPUT   PROGNAME ".out" /* default output file */
 
#define IS(s)   (strcmp(argv[i],s)==0)
 
#define FUNCTION   "(function()end)();"
 
#define toproto(L, i)   getproto(L->top+(i))
 
#define luac_c
 
#define LUA_CORE
 
#define VOID(p)   ((const void*)(p))
 
#define UPVALNAME(x)   ((f->upvalues[x].name) ? getstr(f->upvalues[x].name) : "-")
 
#define MYK(x)   (-1-(x))
 
#define SS(x)   ((x==1)?"":"s")
 
#define S(x)   (int)(x),SS(x)
 

Functions

static void PrintFunction (const Proto *f, int full)
 
static void fatal (const char *message)
 
static void cannot (const char *what)
 
static void usage (const char *message)
 
static int doargs (int argc, char *argv[])
 
static const char * reader (lua_State *L, void *ud, size_t *size)
 
static const Protocombine (lua_State *L, int n)
 
static int writer (lua_State *L, const void *p, size_t size, void *u)
 
static int pmain (lua_State *L)
 
int main (int argc, char *argv[])
 
static void PrintString (const TString *ts)
 
static void PrintConstant (const Proto *f, int i)
 
static void PrintCode (const Proto *f)
 
static void PrintHeader (const Proto *f)
 
static void PrintDebug (const Proto *f)
 

Variables

static int listing =0
 
static int dumping =1
 
static int stripping =0
 
static char Output [] ={ OUTPUT }
 
static const char * output =Output
 
static const char * progname =PROGNAME
 

Macro Definition Documentation

◆ FUNCTION

#define FUNCTION   "(function()end)();"

◆ IS

#define IS (   s)    (strcmp(argv[i],s)==0)

◆ LUA_CORE [1/2]

#define LUA_CORE

◆ LUA_CORE [2/2]

#define LUA_CORE

◆ luac_c [1/2]

#define luac_c

◆ luac_c [2/2]

#define luac_c

◆ luaU_print

#define luaU_print   PrintFunction

◆ MYK

#define MYK (   x)    (-1-(x))

◆ OUTPUT

#define OUTPUT   PROGNAME ".out" /* default output file */

◆ PROGNAME

#define PROGNAME   "luac" /* default program name */

◆ S

#define S (   x)    (int)(x),SS(x)

◆ SS

#define SS (   x)    ((x==1)?"":"s")

◆ toproto

#define toproto (   L,
 
)    getproto(L->top+(i))

◆ UPVALNAME

#define UPVALNAME (   x)    ((f->upvalues[x].name) ? getstr(f->upvalues[x].name) : "-")

◆ VOID

#define VOID (   p)    ((const void*)(p))

Function Documentation

◆ cannot()

static void cannot ( const char *  what)
static
Here is the caller graph for this function:

◆ combine()

static const Proto* combine ( lua_State L,
int  n 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ doargs()

static int doargs ( int  argc,
char *  argv[] 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fatal()

static void fatal ( const char *  message)
static
Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char *  argv[] 
)
Here is the call graph for this function:

◆ pmain()

static int pmain ( lua_State L)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrintCode()

static void PrintCode ( const Proto f)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrintConstant()

static void PrintConstant ( const Proto f,
int  i 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrintDebug()

static void PrintDebug ( const Proto f)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrintFunction()

static void PrintFunction ( const Proto f,
int  full 
)
static
Here is the call graph for this function:

◆ PrintHeader()

static void PrintHeader ( const Proto f)
static
Here is the caller graph for this function:

◆ PrintString()

static void PrintString ( const TString ts)
static
Here is the caller graph for this function:

◆ reader()

static const char* reader ( lua_State L,
void ud,
size_t *  size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ usage()

static void usage ( const char *  message)
static
Here is the caller graph for this function:

◆ writer()

static int writer ( lua_State L,
const void p,
size_t  size,
void u 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ dumping

int dumping =1
static

◆ listing

int listing =0
static

◆ Output

char Output[] ={ OUTPUT }
static

◆ output

const char* output =Output
static

◆ progname

const char* progname =PROGNAME
static

◆ stripping

int stripping =0
static