Github User Fetcher 1.0.0
C Application with Server and GUI
|
#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 <ctype.h>
#include "ldebug.h"
#include "lopcodes.h"
Go to the source code of this file.
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 Proto * | combine (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 |
#define FUNCTION "(function()end)();" |
Definition at line 117 of file lua-5.2.4/src/luac.c.
Referenced by reader().
Definition at line 67 of file lua-5.2.4/src/luac.c.
#define LUA_CORE |
Definition at line 13 of file lua-5.2.4/src/luac.c.
#define LUA_CORE |
Definition at line 13 of file lua-5.2.4/src/luac.c.
#define luac_c |
Definition at line 12 of file lua-5.2.4/src/luac.c.
#define luac_c |
Definition at line 12 of file lua-5.2.4/src/luac.c.
#define luaU_print PrintFunction |
Definition at line 23 of file lua-5.2.4/src/luac.c.
#define MYK | ( | x | ) | (-1-(x)) |
Definition at line 275 of file lua-5.2.4/src/luac.c.
Referenced by PrintCode().
Definition at line 26 of file lua-5.2.4/src/luac.c.
#define PROGNAME "luac" /* default program name */ |
Definition at line 25 of file lua-5.2.4/src/luac.c.
Referenced by combine().
#define S | ( | x | ) | (int)(x),SS(x) |
Definition at line 376 of file lua-5.2.4/src/luac.c.
Referenced by PrintHeader().
#define SS | ( | x | ) | ((x==1)?"":"s") |
Definition at line 375 of file lua-5.2.4/src/luac.c.
Referenced by PrintHeader().
#define toproto | ( | L, | |
i ) getproto(L->top+(i)) |
Definition at line 134 of file lua-5.2.4/src/luac.c.
Referenced by combine().
Definition at line 274 of file lua-5.2.4/src/luac.c.
Referenced by PrintCode(), and PrintDebug().
#define VOID | ( | p | ) | ((const void*)(p)) |
Definition at line 221 of file lua-5.2.4/src/luac.c.
Referenced by PrintCode(), PrintDebug(), and PrintHeader().
|
static |
Definition at line 41 of file lua-5.2.4/src/luac.c.
References output, and progname.
Referenced by pmain().
Definition at line 136 of file lua-5.2.4/src/luac.c.
References fatal(), lua_load(), LUA_OK, lua_tostring, NULL, Proto::p, PROGNAME, reader(), Proto::sizelineinfo, Proto::sizeupvalues, toproto, and Proto::upvalues.
Referenced by pmain().
|
static |
Definition at line 69 of file lua-5.2.4/src/luac.c.
References dumping, IS, listing, LUA_COPYRIGHT, LUA_QL, NULL, Output, output, printf, progname, stripping, and usage().
Referenced by main().
|
static |
int main | ( | int | argc, |
char * | argv[] ) |
Definition at line 189 of file lua-5.2.4/src/luac.c.
References doargs(), fatal(), lua_close(), LUA_OK, lua_pcall, lua_pushcfunction, lua_pushinteger(), lua_pushlightuserdata(), lua_tostring, luaL_newstate(), NULL, pmain(), and usage().
|
static |
Definition at line 162 of file lua-5.2.4/src/luac.c.
References cannot(), combine(), dumping, fatal(), IS, listing, lua_checkstack(), lua_lock, LUA_OK, lua_tointeger, lua_tostring, lua_touserdata(), lua_unlock, luaL_loadfile, luaU_dump(), luaU_print, NULL, output, stripping, and writer().
Referenced by main().
|
static |
Definition at line 277 of file lua-5.2.4/src/luac.c.
References Proto::code, GET_OPCODE, GETARG_A, GETARG_Ax, GETARG_B, GETARG_Bx, GETARG_C, GETARG_sBx, getBMode, getCMode, getfuncline, getOpMode, iABC, iABx, iAsBx, iAx, INDEXK, ISK, luaP_opnames, MYK, OP_ADD, OP_CLOSURE, OP_DIV, OP_EQ, OP_EXTRAARG, OP_FORLOOP, OP_FORPREP, OP_GETTABLE, OP_GETTABUP, OP_GETUPVAL, OP_JMP, OP_LE, OP_LOADK, OP_LT, OP_MUL, OP_POW, OP_SELF, OP_SETLIST, OP_SETTABLE, OP_SETTABUP, OP_SETUPVAL, OP_SUB, OP_TFORLOOP, OpArgK, OpArgN, OpArgU, Proto::p, PrintConstant(), printf, Proto::sizecode, UPVALNAME, and VOID.
Referenced by PrintFunction().
|
static |
Definition at line 251 of file lua-5.2.4/src/luac.c.
References bvalue, Proto::k, LUA_NUMBER_FMT, LUA_TBOOLEAN, LUA_TNIL, LUA_TNUMBER, LUA_TSTRING, nvalue, printf, PrintString(), rawtsvalue, ttype, and ttypenv.
Referenced by PrintCode(), and PrintDebug().
|
static |
Definition at line 398 of file lua-5.2.4/src/luac.c.
References LocVar::endpc, getstr, Proto::locvars, PrintConstant(), printf, Proto::sizek, Proto::sizelocvars, Proto::sizeupvalues, LocVar::startpc, UPVALNAME, Proto::upvalues, LocVar::varname, and VOID.
Referenced by PrintFunction().
|
static |
Definition at line 425 of file lua-5.2.4/src/luac.c.
References Proto::p, PrintCode(), PrintDebug(), PrintFunction, PrintHeader(), and Proto::sizep.
|
static |
Definition at line 378 of file lua-5.2.4/src/luac.c.
References getstr, Proto::is_vararg, Proto::lastlinedefined, Proto::linedefined, LUA_SIGNATURE, Proto::maxstacksize, Proto::numparams, printf, S, s, Proto::sizecode, Proto::sizek, Proto::sizelocvars, Proto::sizep, Proto::sizeupvalues, Proto::source, SS, and VOID.
Referenced by PrintFunction().
|
static |
Definition at line 223 of file lua-5.2.4/src/luac.c.
References getstr, TString::len, printf, s, and TString::tsv.
Referenced by PrintConstant().
|
static |
Definition at line 119 of file lua-5.2.4/src/luac.c.
References FUNCTION, NULL, and UNUSED.
Referenced by combine(), lua_load(), lua_load(), and luaZ_init().
|
static |
Definition at line 47 of file lua-5.2.4/src/luac.c.
|
static |
|
static |
Definition at line 29 of file lua-5.2.4/src/luac.c.
|
static |
Definition at line 28 of file lua-5.2.4/src/luac.c.
|
static |
Definition at line 31 of file lua-5.2.4/src/luac.c.
|
static |
Definition at line 32 of file lua-5.2.4/src/luac.c.
|
static |
|
static |
Definition at line 30 of file lua-5.2.4/src/luac.c.