mirror of https://github.com/rusefi/lua.git
new scheme for buffers, centralized in auxlib.
This commit is contained in:
parent
82d09fbf0d
commit
502343b402
71
lauxlib.c
71
lauxlib.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lauxlib.c,v 1.4 1997/11/21 19:00:46 roberto Exp roberto $
|
** $Id: lauxlib.c,v 1.5 1997/12/09 13:35:19 roberto Exp roberto $
|
||||||
** Auxiliar functions for building Lua libraries
|
** Auxiliar functions for building Lua libraries
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -10,6 +10,8 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "lauxlib.h"
|
#include "lauxlib.h"
|
||||||
|
#include "lmem.h"
|
||||||
|
#include "lstate.h"
|
||||||
#include "lua.h"
|
#include "lua.h"
|
||||||
#include "luadebug.h"
|
#include "luadebug.h"
|
||||||
|
|
||||||
|
@ -99,3 +101,70 @@ void luaL_verror (char *fmt, ...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*-------------------------------------------------------
|
||||||
|
** Auxiliar buffer
|
||||||
|
-------------------------------------------------------*/
|
||||||
|
|
||||||
|
#define BUFF_STEP 32
|
||||||
|
|
||||||
|
#define openspace(size) if (L->Mbuffnext+(size) > L->Mbuffsize) Openspace(size)
|
||||||
|
|
||||||
|
static void Openspace (int size)
|
||||||
|
{
|
||||||
|
LState *l = L; /* to optimize */
|
||||||
|
int base = l->Mbuffbase-l->Mbuffer;
|
||||||
|
l->Mbuffsize *= 2;
|
||||||
|
if (l->Mbuffnext+size > l->Mbuffsize) /* still not big enough? */
|
||||||
|
l->Mbuffsize = l->Mbuffnext+size;
|
||||||
|
l->Mbuffer = luaM_realloc(l->Mbuffer, l->Mbuffsize);
|
||||||
|
l->Mbuffbase = l->Mbuffer+base;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
char *luaL_openspace (int size)
|
||||||
|
{
|
||||||
|
openspace(size);
|
||||||
|
return L->Mbuffer+L->Mbuffnext;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void luaL_addchar (int c)
|
||||||
|
{
|
||||||
|
openspace(BUFF_STEP);
|
||||||
|
L->Mbuffer[L->Mbuffnext++] = c;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void luaL_resetbuffer (void)
|
||||||
|
{
|
||||||
|
L->Mbuffnext = L->Mbuffbase-L->Mbuffer;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void luaL_addsize (int n)
|
||||||
|
{
|
||||||
|
L->Mbuffnext += n;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int luaL_newbuffer (int size)
|
||||||
|
{
|
||||||
|
int old = L->Mbuffbase-L->Mbuffer;
|
||||||
|
openspace(size);
|
||||||
|
L->Mbuffbase = L->Mbuffer+L->Mbuffnext;
|
||||||
|
return old;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void luaL_oldbuffer (int old)
|
||||||
|
{
|
||||||
|
L->Mbuffnext = L->Mbuffbase-L->Mbuffer;
|
||||||
|
L->Mbuffbase = L->Mbuffer+old;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
char *luaL_buffer (void)
|
||||||
|
{
|
||||||
|
return L->Mbuffbase;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lauxlib.h,v 1.3 1997/11/21 19:00:46 roberto Exp roberto $
|
** $Id: lauxlib.h,v 1.4 1997/12/09 13:35:19 roberto Exp roberto $
|
||||||
** Auxiliar functions for building Lua libraries
|
** Auxiliar functions for building Lua libraries
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -27,6 +27,13 @@ lua_Object luaL_functionarg (int arg);
|
||||||
lua_Object luaL_tablearg (int arg);
|
lua_Object luaL_tablearg (int arg);
|
||||||
lua_Object luaL_nonnullarg (int numArg);
|
lua_Object luaL_nonnullarg (int numArg);
|
||||||
void luaL_verror (char *fmt, ...);
|
void luaL_verror (char *fmt, ...);
|
||||||
|
char *luaL_openspace (int size);
|
||||||
|
void luaL_resetbuffer (void);
|
||||||
|
void luaL_addchar (int c);
|
||||||
|
void luaL_addsize (int n);
|
||||||
|
int luaL_newbuffer (int size);
|
||||||
|
void luaL_oldbuffer (int old);
|
||||||
|
char *luaL_buffer (void);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lbuiltin.c,v 1.16 1997/12/11 17:21:11 roberto Exp roberto $
|
** $Id: lbuiltin.c,v 1.17 1997/12/15 16:17:20 roberto Exp roberto $
|
||||||
** Built-in functions
|
** Built-in functions
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -131,7 +131,7 @@ static void internaldofile (void)
|
||||||
|
|
||||||
static char *to_string (lua_Object obj)
|
static char *to_string (lua_Object obj)
|
||||||
{
|
{
|
||||||
char *buff = luaM_buffer(30);
|
char *buff = luaL_openspace(30);
|
||||||
TObject *o = luaA_Address(obj);
|
TObject *o = luaA_Address(obj);
|
||||||
switch (ttype(o)) {
|
switch (ttype(o)) {
|
||||||
case LUA_T_NUMBER: case LUA_T_STRING:
|
case LUA_T_NUMBER: case LUA_T_STRING:
|
||||||
|
|
3
lgc.c
3
lgc.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lgc.c,v 1.12 1997/12/11 14:48:46 roberto Exp roberto $
|
** $Id: lgc.c,v 1.13 1997/12/15 16:17:20 roberto Exp roberto $
|
||||||
** Garbage Collector
|
** Garbage Collector
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -272,7 +272,6 @@ long lua_collectgarbage (long limit)
|
||||||
luaS_free(freestr);
|
luaS_free(freestr);
|
||||||
luaF_freeproto(freefunc);
|
luaF_freeproto(freefunc);
|
||||||
luaF_freeclosure(freeclos);
|
luaF_freeclosure(freeclos);
|
||||||
luaM_clearbuffer();
|
|
||||||
recovered = recovered-L->nblocks;
|
recovered = recovered-L->nblocks;
|
||||||
L->GCthreshold = (limit == 0) ? 2*L->nblocks : L->nblocks+limit;
|
L->GCthreshold = (limit == 0) ? 2*L->nblocks : L->nblocks+limit;
|
||||||
return recovered;
|
return recovered;
|
||||||
|
|
9
liolib.c
9
liolib.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: liolib.c,v 1.8 1997/11/28 12:40:37 roberto Exp roberto $
|
** $Id: liolib.c,v 1.9 1997/12/09 13:50:08 roberto Exp roberto $
|
||||||
** Standard I/O (and system) library
|
** Standard I/O (and system) library
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -190,7 +190,7 @@ static void io_read (void)
|
||||||
char *p = luaL_opt_string(arg, "[^\n]*{\n}");
|
char *p = luaL_opt_string(arg, "[^\n]*{\n}");
|
||||||
int inskip = 0; /* to control {skips} */
|
int inskip = 0; /* to control {skips} */
|
||||||
int c = NEED_OTHER;
|
int c = NEED_OTHER;
|
||||||
luaI_emptybuff();
|
luaL_resetbuffer();
|
||||||
while (*p) {
|
while (*p) {
|
||||||
if (*p == '{') {
|
if (*p == '{') {
|
||||||
inskip++;
|
inskip++;
|
||||||
|
@ -208,7 +208,7 @@ static void io_read (void)
|
||||||
if (c == NEED_OTHER) c = getc(f);
|
if (c == NEED_OTHER) c = getc(f);
|
||||||
m = luaI_singlematch((c == EOF) ? 0 : (char)c, p, &ep);
|
m = luaI_singlematch((c == EOF) ? 0 : (char)c, p, &ep);
|
||||||
if (m) {
|
if (m) {
|
||||||
if (inskip == 0) luaI_addchar(c);
|
if (inskip == 0) luaL_addchar(c);
|
||||||
c = NEED_OTHER;
|
c = NEED_OTHER;
|
||||||
}
|
}
|
||||||
switch (*ep) {
|
switch (*ep) {
|
||||||
|
@ -227,7 +227,8 @@ static void io_read (void)
|
||||||
} break_while:
|
} break_while:
|
||||||
if (c >= 0) /* not EOF nor NEED_OTHER? */
|
if (c >= 0) /* not EOF nor NEED_OTHER? */
|
||||||
ungetc(c, f);
|
ungetc(c, f);
|
||||||
buff = luaI_addchar(0);
|
luaL_addchar(0);
|
||||||
|
buff = luaL_buffer();
|
||||||
if (*buff != 0 || *p == 0) /* read something or did not fail? */
|
if (*buff != 0 || *p == 0) /* read something or did not fail? */
|
||||||
lua_pushstring(buff);
|
lua_pushstring(buff);
|
||||||
}
|
}
|
||||||
|
|
64
llex.c
64
llex.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: llex.c,v 1.9 1997/12/02 12:43:54 roberto Exp roberto $
|
** $Id: llex.c,v 1.10 1997/12/09 13:35:19 roberto Exp roberto $
|
||||||
** Lexical Analizer
|
** Lexical Analizer
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -8,6 +8,7 @@
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "lauxlib.h"
|
||||||
#include "llex.h"
|
#include "llex.h"
|
||||||
#include "lmem.h"
|
#include "lmem.h"
|
||||||
#include "lobject.h"
|
#include "lobject.h"
|
||||||
|
@ -66,8 +67,7 @@ void luaX_setinput (ZIO *z)
|
||||||
LS->ifstate[0].elsepart = 1; /* to avoid a free $else */
|
LS->ifstate[0].elsepart = 1; /* to avoid a free $else */
|
||||||
LS->lex_z = z;
|
LS->lex_z = z;
|
||||||
firstline(LS);
|
firstline(LS);
|
||||||
LS->textbuff.buffsize = 20;
|
luaL_resetbuffer();
|
||||||
LS->textbuff.text = luaM_buffer(LS->textbuff.buffsize);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -201,31 +201,24 @@ static void inclinenumber (LexState *LS)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void save (LexState *LS, int c)
|
#define save(c) luaL_addchar(c)
|
||||||
{
|
#define save_and_next(LS) (save(LS->current), next(LS))
|
||||||
if (LS->textbuff.tokensize >= LS->textbuff.buffsize)
|
|
||||||
LS->textbuff.text = luaM_buffer(LS->textbuff.buffsize *= 2);
|
|
||||||
LS->textbuff.text[LS->textbuff.tokensize++] = c;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
char *luaX_lasttoken (void)
|
char *luaX_lasttoken (void)
|
||||||
{
|
{
|
||||||
save(L->lexstate, 0);
|
save(0);
|
||||||
return L->lexstate->textbuff.text;
|
return luaL_buffer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define save_and_next(LS) (save(LS, LS->current), next(LS))
|
|
||||||
|
|
||||||
|
|
||||||
static int read_long_string (LexState *LS, YYSTYPE *l)
|
static int read_long_string (LexState *LS, YYSTYPE *l)
|
||||||
{
|
{
|
||||||
int cont = 0;
|
int cont = 0;
|
||||||
while (1) {
|
while (1) {
|
||||||
switch (LS->current) {
|
switch (LS->current) {
|
||||||
case EOZ:
|
case EOZ:
|
||||||
save(LS, 0);
|
save(0);
|
||||||
return WRONGTOKEN;
|
return WRONGTOKEN;
|
||||||
case '[':
|
case '[':
|
||||||
save_and_next(LS);
|
save_and_next(LS);
|
||||||
|
@ -243,7 +236,7 @@ static int read_long_string (LexState *LS, YYSTYPE *l)
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
case '\n':
|
case '\n':
|
||||||
save(LS, '\n');
|
save('\n');
|
||||||
inclinenumber(LS);
|
inclinenumber(LS);
|
||||||
continue;
|
continue;
|
||||||
default:
|
default:
|
||||||
|
@ -251,9 +244,9 @@ static int read_long_string (LexState *LS, YYSTYPE *l)
|
||||||
}
|
}
|
||||||
} endloop:
|
} endloop:
|
||||||
save_and_next(LS); /* pass the second ']' */
|
save_and_next(LS); /* pass the second ']' */
|
||||||
LS->textbuff.text[LS->textbuff.tokensize-2] = 0; /* erases ']]' */
|
L->Mbuffer[L->Mbuffnext-2] = 0; /* erases ']]' */
|
||||||
l->pTStr = luaS_new(LS->textbuff.text+2);
|
l->pTStr = luaS_new(L->Mbuffbase+2);
|
||||||
LS->textbuff.text[LS->textbuff.tokensize-2] = ']'; /* restores ']]' */
|
L->Mbuffer[L->Mbuffnext-2] = ']'; /* restores ']]' */
|
||||||
return STRING;
|
return STRING;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -267,7 +260,7 @@ int luaY_lex (YYSTYPE *l)
|
||||||
{
|
{
|
||||||
LexState *LS = L->lexstate;
|
LexState *LS = L->lexstate;
|
||||||
double a;
|
double a;
|
||||||
LS->textbuff.tokensize = 0;
|
luaL_resetbuffer();
|
||||||
if (lua_debug)
|
if (lua_debug)
|
||||||
luaY_codedebugline(LS->linelasttoken);
|
luaY_codedebugline(LS->linelasttoken);
|
||||||
LS->linelasttoken = LS->linenumber;
|
LS->linelasttoken = LS->linenumber;
|
||||||
|
@ -286,7 +279,7 @@ int luaY_lex (YYSTYPE *l)
|
||||||
save_and_next(LS);
|
save_and_next(LS);
|
||||||
if (LS->current != '-') return '-';
|
if (LS->current != '-') return '-';
|
||||||
do { next(LS); } while (LS->current != '\n' && LS->current != EOZ);
|
do { next(LS); } while (LS->current != '\n' && LS->current != EOZ);
|
||||||
LS->textbuff.tokensize = 0;
|
luaL_resetbuffer();
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
case '[':
|
case '[':
|
||||||
|
@ -325,15 +318,15 @@ int luaY_lex (YYSTYPE *l)
|
||||||
switch (LS->current) {
|
switch (LS->current) {
|
||||||
case EOZ:
|
case EOZ:
|
||||||
case '\n':
|
case '\n':
|
||||||
save(LS, 0);
|
save(0);
|
||||||
return WRONGTOKEN;
|
return WRONGTOKEN;
|
||||||
case '\\':
|
case '\\':
|
||||||
next(LS); /* do not save the '\' */
|
next(LS); /* do not save the '\' */
|
||||||
switch (LS->current) {
|
switch (LS->current) {
|
||||||
case 'n': save(LS, '\n'); next(LS); break;
|
case 'n': save('\n'); next(LS); break;
|
||||||
case 't': save(LS, '\t'); next(LS); break;
|
case 't': save('\t'); next(LS); break;
|
||||||
case 'r': save(LS, '\r'); next(LS); break;
|
case 'r': save('\r'); next(LS); break;
|
||||||
case '\n': save(LS, '\n'); inclinenumber(LS); break;
|
case '\n': save('\n'); inclinenumber(LS); break;
|
||||||
default : save_and_next(LS); break;
|
default : save_and_next(LS); break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -342,9 +335,9 @@ int luaY_lex (YYSTYPE *l)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
next(LS); /* skip delimiter */
|
next(LS); /* skip delimiter */
|
||||||
save(LS, 0);
|
save(0);
|
||||||
l->pTStr = luaS_new(LS->textbuff.text+1);
|
l->pTStr = luaS_new(L->Mbuffbase+1);
|
||||||
LS->textbuff.text[LS->textbuff.tokensize-1] = del; /* restore delimiter */
|
L->Mbuffer[L->Mbuffnext-1] = del; /* restore delimiter */
|
||||||
return STRING;
|
return STRING;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -375,7 +368,7 @@ int luaY_lex (YYSTYPE *l)
|
||||||
if (LS->current == '.') {
|
if (LS->current == '.') {
|
||||||
save_and_next(LS);
|
save_and_next(LS);
|
||||||
if (LS->current == '.') {
|
if (LS->current == '.') {
|
||||||
save(LS, 0);
|
save(0);
|
||||||
luaY_error(
|
luaY_error(
|
||||||
"ambiguous syntax (decimal point x string concatenation)");
|
"ambiguous syntax (decimal point x string concatenation)");
|
||||||
}
|
}
|
||||||
|
@ -396,7 +389,7 @@ int luaY_lex (YYSTYPE *l)
|
||||||
neg=(LS->current=='-');
|
neg=(LS->current=='-');
|
||||||
if (LS->current == '+' || LS->current == '-') save_and_next(LS);
|
if (LS->current == '+' || LS->current == '-') save_and_next(LS);
|
||||||
if (!isdigit(LS->current)) {
|
if (!isdigit(LS->current)) {
|
||||||
save(LS, 0); return WRONGTOKEN; }
|
save(0); return WRONGTOKEN; }
|
||||||
do {
|
do {
|
||||||
e=10.0*e+(LS->current-'0');
|
e=10.0*e+(LS->current-'0');
|
||||||
save_and_next(LS);
|
save_and_next(LS);
|
||||||
|
@ -412,23 +405,24 @@ int luaY_lex (YYSTYPE *l)
|
||||||
}
|
}
|
||||||
|
|
||||||
case EOZ:
|
case EOZ:
|
||||||
save(LS, 0);
|
save(0);
|
||||||
if (LS->iflevel > 0)
|
if (LS->iflevel > 0)
|
||||||
luaY_syntaxerror("input ends inside a $if", "");
|
luaY_syntaxerror("input ends inside a $if", "");
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (LS->current != '_' && !isalpha(LS->current)) {
|
if (LS->current != '_' && !isalpha(LS->current)) {
|
||||||
|
int c = LS->current;
|
||||||
save_and_next(LS);
|
save_and_next(LS);
|
||||||
return LS->textbuff.text[0];
|
return c;
|
||||||
}
|
}
|
||||||
else { /* identifier or reserved word */
|
else { /* identifier or reserved word */
|
||||||
TaggedString *ts;
|
TaggedString *ts;
|
||||||
do {
|
do {
|
||||||
save_and_next(LS);
|
save_and_next(LS);
|
||||||
} while (isalnum(LS->current) || LS->current == '_');
|
} while (isalnum(LS->current) || LS->current == '_');
|
||||||
save(LS, 0);
|
save(0);
|
||||||
ts = luaS_new(LS->textbuff.text);
|
ts = luaS_new(L->Mbuffbase);
|
||||||
if (ts->head.marked > 255)
|
if (ts->head.marked > 255)
|
||||||
return ts->head.marked; /* reserved word */
|
return ts->head.marked; /* reserved word */
|
||||||
l->pTStr = ts;
|
l->pTStr = ts;
|
||||||
|
|
9
llex.h
9
llex.h
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: llex.h,v 1.4 1997/11/26 18:53:45 roberto Exp roberto $
|
** $Id: llex.h,v 1.5 1997/12/02 12:43:44 roberto Exp roberto $
|
||||||
** Lexical Analizer
|
** Lexical Analizer
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -21,18 +21,11 @@ struct ifState {
|
||||||
int skip; /* true if part must be skiped */
|
int skip; /* true if part must be skiped */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct textBuff {
|
|
||||||
char *text; /* always points to luaM_buffer */
|
|
||||||
int tokensize;
|
|
||||||
int buffsize;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct LexState {
|
typedef struct LexState {
|
||||||
int current; /* look ahead character */
|
int current; /* look ahead character */
|
||||||
struct zio *lex_z; /* input stream */
|
struct zio *lex_z; /* input stream */
|
||||||
int linenumber; /* input line counter */
|
int linenumber; /* input line counter */
|
||||||
struct textBuff textbuff; /* buffer for tokens */
|
|
||||||
int linelasttoken; /* line where last token was read */
|
int linelasttoken; /* line where last token was read */
|
||||||
int lastline; /* last line wherein a SETLINE was generated */
|
int lastline; /* last line wherein a SETLINE was generated */
|
||||||
struct ifState ifstate[MAX_IFS];
|
struct ifState ifstate[MAX_IFS];
|
||||||
|
|
19
lmem.c
19
lmem.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lmem.c,v 1.2 1997/11/19 17:29:23 roberto Exp roberto $
|
** $Id: lmem.c,v 1.3 1997/12/01 20:30:44 roberto Exp roberto $
|
||||||
** Interface to Memory Manager
|
** Interface to Memory Manager
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -27,23 +27,6 @@ int luaM_growaux (void **block, unsigned long nelems, int size,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void *luaM_buffer (unsigned long size)
|
|
||||||
{
|
|
||||||
if (size > L->Mbuffsize) {
|
|
||||||
L->Mbuffsize = size;
|
|
||||||
L->Mbuffer = luaM_realloc(L->Mbuffer, L->Mbuffsize);
|
|
||||||
}
|
|
||||||
return L->Mbuffer;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void luaM_clearbuffer (void)
|
|
||||||
{
|
|
||||||
L->Mbuffsize /= 2;
|
|
||||||
L->Mbuffer = luaM_realloc(L->Mbuffer, L->Mbuffsize);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef DEBUG
|
#ifndef DEBUG
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
4
lmem.h
4
lmem.h
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lmem.h,v 1.3 1997/11/26 20:44:52 roberto Exp roberto $
|
** $Id: lmem.h,v 1.4 1997/12/01 20:30:44 roberto Exp roberto $
|
||||||
** Interface to Memory Manager
|
** Interface to Memory Manager
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -20,8 +20,6 @@
|
||||||
#define tableEM "table overflow"
|
#define tableEM "table overflow"
|
||||||
#define memEM "not enough memory"
|
#define memEM "not enough memory"
|
||||||
|
|
||||||
void *luaM_buffer (unsigned long size);
|
|
||||||
void luaM_clearbuffer (void);
|
|
||||||
void *luaM_realloc (void *oldblock, unsigned long size);
|
void *luaM_realloc (void *oldblock, unsigned long size);
|
||||||
int luaM_growaux (void **block, unsigned long nelems, int size,
|
int luaM_growaux (void **block, unsigned long nelems, int size,
|
||||||
char *errormsg, unsigned long limit);
|
char *errormsg, unsigned long limit);
|
||||||
|
|
4
lstate.c
4
lstate.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lstate.c,v 1.3 1997/12/01 20:31:25 roberto Exp roberto $
|
** $Id: lstate.c,v 1.4 1997/12/11 14:48:46 roberto Exp roberto $
|
||||||
** Global State
|
** Global State
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -40,6 +40,8 @@ void lua_open (void)
|
||||||
L->refArray = NULL;
|
L->refArray = NULL;
|
||||||
L->refSize = 0;
|
L->refSize = 0;
|
||||||
L->Mbuffsize = 0;
|
L->Mbuffsize = 0;
|
||||||
|
L->Mbuffnext = 0;
|
||||||
|
L->Mbuffbase = NULL;
|
||||||
L->Mbuffer = NULL;
|
L->Mbuffer = NULL;
|
||||||
L->GCthreshold = GARBAGE_BLOCK;
|
L->GCthreshold = GARBAGE_BLOCK;
|
||||||
L->nblocks = 0;
|
L->nblocks = 0;
|
||||||
|
|
8
lstate.h
8
lstate.h
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lstate.h,v 1.4 1997/11/27 15:59:25 roberto Exp roberto $
|
** $Id: lstate.h,v 1.5 1997/11/28 16:56:05 roberto Exp roberto $
|
||||||
** Global State
|
** Global State
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -65,8 +65,10 @@ typedef struct LState {
|
||||||
int refSize; /* size of refArray */
|
int refSize; /* size of refArray */
|
||||||
unsigned long GCthreshold;
|
unsigned long GCthreshold;
|
||||||
unsigned long nblocks; /* number of 'blocks' currently allocated */
|
unsigned long nblocks; /* number of 'blocks' currently allocated */
|
||||||
char *Mbuffer; /* global buffer, used by luaM_buffer */
|
char *Mbuffer; /* global buffer */
|
||||||
unsigned long Mbuffsize; /* size of Mbuffer */
|
char *Mbuffbase; /* current first position of Mbuffer */
|
||||||
|
int Mbuffsize; /* size of Mbuffer */
|
||||||
|
int Mbuffnext; /* next position to fill in Mbuffer */
|
||||||
} LState;
|
} LState;
|
||||||
|
|
||||||
|
|
||||||
|
|
125
lstrlib.c
125
lstrlib.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lstrlib.c,v 1.3 1997/12/09 13:35:19 roberto Exp roberto $
|
** $Id: lstrlib.c,v 1.4 1997/12/15 17:58:49 roberto Exp roberto $
|
||||||
** Standard library for strings and pattern-matching
|
** Standard library for strings and pattern-matching
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -15,56 +15,12 @@
|
||||||
#include "lualib.h"
|
#include "lualib.h"
|
||||||
|
|
||||||
|
|
||||||
struct lbuff {
|
|
||||||
char *b;
|
|
||||||
size_t max;
|
|
||||||
size_t size;
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct lbuff lbuffer = {NULL, 0, 0};
|
|
||||||
|
|
||||||
|
|
||||||
static char *strbuffer (unsigned long size)
|
|
||||||
{
|
|
||||||
if (size > lbuffer.max) {
|
|
||||||
/* ANSI "realloc" doesn't need this test, but some machines (Sun!)
|
|
||||||
don't follow ANSI */
|
|
||||||
lbuffer.b = (lbuffer.b) ? realloc(lbuffer.b, lbuffer.max=size) :
|
|
||||||
malloc(lbuffer.max=size);
|
|
||||||
if (lbuffer.b == NULL)
|
|
||||||
lua_error("memory overflow");
|
|
||||||
}
|
|
||||||
return lbuffer.b;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static char *openspace (unsigned long size)
|
|
||||||
{
|
|
||||||
char *buff = strbuffer(lbuffer.size+size);
|
|
||||||
return buff+lbuffer.size;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
char *luaI_addchar (int c)
|
|
||||||
{
|
|
||||||
if (lbuffer.size >= lbuffer.max)
|
|
||||||
strbuffer(lbuffer.max == 0 ? 100 : lbuffer.max*2);
|
|
||||||
lbuffer.b[lbuffer.size++] = c;
|
|
||||||
return lbuffer.b;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void luaI_emptybuff (void)
|
|
||||||
{
|
|
||||||
lbuffer.size = 0; /* prepare for next string */
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void addnchar (char *s, int n)
|
static void addnchar (char *s, int n)
|
||||||
{
|
{
|
||||||
char *b = openspace(n);
|
char *b = luaL_openspace(n);
|
||||||
strncpy(b, s, n);
|
strncpy(b, s, n);
|
||||||
lbuffer.size += n;
|
luaL_addsize(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -80,6 +36,13 @@ static void str_len (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void closeandpush (void)
|
||||||
|
{
|
||||||
|
luaL_addchar(0);
|
||||||
|
lua_pushstring(luaL_buffer());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void str_sub (void)
|
static void str_sub (void)
|
||||||
{
|
{
|
||||||
char *s = luaL_check_string(1);
|
char *s = luaL_check_string(1);
|
||||||
|
@ -89,9 +52,9 @@ static void str_sub (void)
|
||||||
if (start < 0) start = l+start+1;
|
if (start < 0) start = l+start+1;
|
||||||
if (end < 0) end = l+end+1;
|
if (end < 0) end = l+end+1;
|
||||||
if (1 <= start && start <= end && end <= l) {
|
if (1 <= start && start <= end && end <= l) {
|
||||||
luaI_emptybuff();
|
luaL_resetbuffer();
|
||||||
addnchar(s+start-1, end-start+1);
|
addnchar(s+start-1, end-start+1);
|
||||||
lua_pushstring(luaI_addchar(0));
|
closeandpush();
|
||||||
}
|
}
|
||||||
else lua_pushstring("");
|
else lua_pushstring("");
|
||||||
}
|
}
|
||||||
|
@ -100,30 +63,30 @@ static void str_sub (void)
|
||||||
static void str_lower (void)
|
static void str_lower (void)
|
||||||
{
|
{
|
||||||
char *s;
|
char *s;
|
||||||
luaI_emptybuff();
|
luaL_resetbuffer();
|
||||||
for (s = luaL_check_string(1); *s; s++)
|
for (s = luaL_check_string(1); *s; s++)
|
||||||
luaI_addchar(tolower((unsigned char)*s));
|
luaL_addchar(tolower((unsigned char)*s));
|
||||||
lua_pushstring(luaI_addchar(0));
|
closeandpush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void str_upper (void)
|
static void str_upper (void)
|
||||||
{
|
{
|
||||||
char *s;
|
char *s;
|
||||||
luaI_emptybuff();
|
luaL_resetbuffer();
|
||||||
for (s = luaL_check_string(1); *s; s++)
|
for (s = luaL_check_string(1); *s; s++)
|
||||||
luaI_addchar(toupper((unsigned char)*s));
|
luaL_addchar(toupper((unsigned char)*s));
|
||||||
lua_pushstring(luaI_addchar(0));
|
closeandpush();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void str_rep (void)
|
static void str_rep (void)
|
||||||
{
|
{
|
||||||
char *s = luaL_check_string(1);
|
char *s = luaL_check_string(1);
|
||||||
int n = (int)luaL_check_number(2);
|
int n = (int)luaL_check_number(2);
|
||||||
luaI_emptybuff();
|
luaL_resetbuffer();
|
||||||
while (n-- > 0)
|
while (n-- > 0)
|
||||||
addstr(s);
|
addstr(s);
|
||||||
lua_pushstring(luaI_addchar(0));
|
closeandpush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -163,7 +126,7 @@ static void push_captures (struct Capture *cap)
|
||||||
int i;
|
int i;
|
||||||
for (i=0; i<cap->level; i++) {
|
for (i=0; i<cap->level; i++) {
|
||||||
int l = cap->capture[i].len;
|
int l = cap->capture[i].len;
|
||||||
char *buff = openspace(l+1);
|
char *buff = luaL_openspace(l+1);
|
||||||
if (l == -1) lua_error("unfinished capture");
|
if (l == -1) lua_error("unfinished capture");
|
||||||
strncpy(buff, cap->capture[i].init, l);
|
strncpy(buff, cap->capture[i].init, l);
|
||||||
buff[l] = 0;
|
buff[l] = 0;
|
||||||
|
@ -395,7 +358,7 @@ static void add_s (lua_Object newp, struct Capture *cap)
|
||||||
char *news = lua_getstring(newp);
|
char *news = lua_getstring(newp);
|
||||||
while (*news) {
|
while (*news) {
|
||||||
if (*news != ESC || !isdigit((unsigned char)*++news))
|
if (*news != ESC || !isdigit((unsigned char)*++news))
|
||||||
luaI_addchar(*news++);
|
luaL_addchar(*news++);
|
||||||
else {
|
else {
|
||||||
int l = check_cap(*news++, cap);
|
int l = check_cap(*news++, cap);
|
||||||
addnchar(cap->capture[l].init, cap->capture[l].len);
|
addnchar(cap->capture[l].init, cap->capture[l].len);
|
||||||
|
@ -404,24 +367,24 @@ static void add_s (lua_Object newp, struct Capture *cap)
|
||||||
}
|
}
|
||||||
else if (lua_isfunction(newp)) {
|
else if (lua_isfunction(newp)) {
|
||||||
lua_Object res;
|
lua_Object res;
|
||||||
struct lbuff oldbuff;
|
|
||||||
int status;
|
int status;
|
||||||
|
int oldbuff;
|
||||||
lua_beginblock();
|
lua_beginblock();
|
||||||
push_captures(cap);
|
push_captures(cap);
|
||||||
/* function may use lbuffer, so save it and create a luaM_new one */
|
/* function may use buffer, so save it and create a new one */
|
||||||
oldbuff = lbuffer;
|
oldbuff = luaL_newbuffer(0);
|
||||||
lbuffer.b = NULL; lbuffer.max = lbuffer.size = 0;
|
|
||||||
status = lua_callfunction(newp);
|
status = lua_callfunction(newp);
|
||||||
/* restore old buffer */
|
/* restore old buffer */
|
||||||
free(lbuffer.b);
|
luaL_oldbuffer(oldbuff);
|
||||||
lbuffer = oldbuff;
|
if (status != 0) {
|
||||||
if (status != 0)
|
lua_endblock();
|
||||||
lua_error(NULL);
|
lua_error(NULL);
|
||||||
|
}
|
||||||
res = lua_getresult(1);
|
res = lua_getresult(1);
|
||||||
addstr(lua_isstring(res) ? lua_getstring(res) : "");
|
addstr(lua_isstring(res) ? lua_getstring(res) : "");
|
||||||
lua_endblock();
|
lua_endblock();
|
||||||
}
|
}
|
||||||
else luaL_arg_check(0, 3, NULL);
|
else luaL_arg_check(0, 3, "string or function expected");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -433,7 +396,7 @@ static void str_gsub (void)
|
||||||
int max_s = (int)luaL_opt_number(4, strlen(src)+1);
|
int max_s = (int)luaL_opt_number(4, strlen(src)+1);
|
||||||
int anchor = (*p == '^') ? (p++, 1) : 0;
|
int anchor = (*p == '^') ? (p++, 1) : 0;
|
||||||
int n = 0;
|
int n = 0;
|
||||||
luaI_emptybuff();
|
luaL_resetbuffer();
|
||||||
while (n < max_s) {
|
while (n < max_s) {
|
||||||
struct Capture cap;
|
struct Capture cap;
|
||||||
char *e;
|
char *e;
|
||||||
|
@ -446,25 +409,25 @@ static void str_gsub (void)
|
||||||
if (e && e>src) /* non empty match? */
|
if (e && e>src) /* non empty match? */
|
||||||
src = e; /* skip it */
|
src = e; /* skip it */
|
||||||
else if (*src)
|
else if (*src)
|
||||||
luaI_addchar(*src++);
|
luaL_addchar(*src++);
|
||||||
else break;
|
else break;
|
||||||
if (anchor) break;
|
if (anchor) break;
|
||||||
}
|
}
|
||||||
addstr(src);
|
addstr(src);
|
||||||
lua_pushstring(luaI_addchar(0));
|
closeandpush();
|
||||||
lua_pushnumber(n); /* number of substitutions */
|
lua_pushnumber(n); /* number of substitutions */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void luaI_addquoted (char *s)
|
static void luaI_addquoted (char *s)
|
||||||
{
|
{
|
||||||
luaI_addchar('"');
|
luaL_addchar('"');
|
||||||
for (; *s; s++) {
|
for (; *s; s++) {
|
||||||
if (strchr("\"\\\n", *s))
|
if (strchr("\"\\\n", *s))
|
||||||
luaI_addchar('\\');
|
luaL_addchar('\\');
|
||||||
luaI_addchar(*s);
|
luaL_addchar(*s);
|
||||||
}
|
}
|
||||||
luaI_addchar('"');
|
luaL_addchar('"');
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MAX_FORMAT 200
|
#define MAX_FORMAT 200
|
||||||
|
@ -473,12 +436,12 @@ static void str_format (void)
|
||||||
{
|
{
|
||||||
int arg = 1;
|
int arg = 1;
|
||||||
char *strfrmt = luaL_check_string(arg);
|
char *strfrmt = luaL_check_string(arg);
|
||||||
luaI_emptybuff(); /* initialize */
|
luaL_resetbuffer();
|
||||||
while (*strfrmt) {
|
while (*strfrmt) {
|
||||||
if (*strfrmt != '%')
|
if (*strfrmt != '%')
|
||||||
luaI_addchar(*strfrmt++);
|
luaL_addchar(*strfrmt++);
|
||||||
else if (*++strfrmt == '%')
|
else if (*++strfrmt == '%')
|
||||||
luaI_addchar(*strfrmt++); /* %% */
|
luaL_addchar(*strfrmt++); /* %% */
|
||||||
else { /* format item */
|
else { /* format item */
|
||||||
char form[MAX_FORMAT]; /* store the format ('%...') */
|
char form[MAX_FORMAT]; /* store the format ('%...') */
|
||||||
struct Capture cap;
|
struct Capture cap;
|
||||||
|
@ -496,14 +459,14 @@ static void str_format (void)
|
||||||
arg++;
|
arg++;
|
||||||
strncpy(form+1, initf, strfrmt-initf+1); /* +1 to include convertion */
|
strncpy(form+1, initf, strfrmt-initf+1); /* +1 to include convertion */
|
||||||
form[strfrmt-initf+2] = 0;
|
form[strfrmt-initf+2] = 0;
|
||||||
buff = openspace(1000); /* to store the formatted value */
|
buff = luaL_openspace(1000); /* to store the formatted value */
|
||||||
switch (*strfrmt++) {
|
switch (*strfrmt++) {
|
||||||
case 'q':
|
case 'q':
|
||||||
luaI_addquoted(luaL_check_string(arg));
|
luaI_addquoted(luaL_check_string(arg));
|
||||||
continue;
|
continue;
|
||||||
case 's': {
|
case 's': {
|
||||||
char *s = luaL_check_string(arg);
|
char *s = luaL_check_string(arg);
|
||||||
buff = openspace(strlen(s));
|
buff = luaL_openspace(strlen(s));
|
||||||
sprintf(buff, form, s);
|
sprintf(buff, form, s);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -517,10 +480,10 @@ static void str_format (void)
|
||||||
default: /* also treat cases 'pnLlh' */
|
default: /* also treat cases 'pnLlh' */
|
||||||
lua_error("invalid option in `format'");
|
lua_error("invalid option in `format'");
|
||||||
}
|
}
|
||||||
lbuffer.size += strlen(buff);
|
luaL_addsize(strlen(buff));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lua_pushstring(luaI_addchar(0)); /* push the result */
|
closeandpush(); /* push the result */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
5
lualib.h
5
lualib.h
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lualib.h,v 1.1 1997/09/16 19:25:59 roberto Exp roberto $
|
** $Id: lualib.h,v 1.2 1997/11/26 18:53:45 roberto Exp roberto $
|
||||||
** Lua standard libraries
|
** Lua standard libraries
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -28,9 +28,6 @@ void lua_mathlibopen (void);
|
||||||
|
|
||||||
/* auxiliar functions (private) */
|
/* auxiliar functions (private) */
|
||||||
|
|
||||||
char *luaI_addchar (int c);
|
|
||||||
void luaI_emptybuff (void);
|
|
||||||
|
|
||||||
int luaI_singlematch (int c, char *p, char **ep);
|
int luaI_singlematch (int c, char *p, char **ep);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
6
lvm.c
6
lvm.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lvm.c,v 1.16 1997/12/09 13:35:19 roberto Exp roberto $
|
** $Id: lvm.c,v 1.17 1997/12/15 16:17:20 roberto Exp roberto $
|
||||||
** Lua virtual machine
|
** Lua virtual machine
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
#define next_word(pc) (pc+=2, get_word(pc-2))
|
#define next_word(pc) (pc+=2, get_word(pc-2))
|
||||||
|
|
||||||
|
|
||||||
/* Extra stack to run a function: LUA_T_LINE(1), TM calls(2), ... */
|
/* Extra stack size to run a function: LUA_T_LINE(1), TM calls(2), ... */
|
||||||
#define EXTRA_STACK 5
|
#define EXTRA_STACK 5
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
static TaggedString *strconc (char *l, char *r)
|
static TaggedString *strconc (char *l, char *r)
|
||||||
{
|
{
|
||||||
size_t nl = strlen(l);
|
size_t nl = strlen(l);
|
||||||
char *buffer = luaM_buffer(nl+strlen(r)+1);
|
char *buffer = luaL_openspace(nl+strlen(r)+1);
|
||||||
strcpy(buffer, l);
|
strcpy(buffer, l);
|
||||||
strcpy(buffer+nl, r);
|
strcpy(buffer+nl, r);
|
||||||
return luaS_new(buffer);
|
return luaS_new(buffer);
|
||||||
|
|
13
makefile
13
makefile
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
## $Id: makefile,v 1.5 1997/11/07 15:09:49 roberto Exp roberto $
|
## $Id: makefile,v 1.6 1997/11/19 17:29:23 roberto Exp roberto $
|
||||||
## Makefile
|
## Makefile
|
||||||
## See Copyright Notice in lua.h
|
## See Copyright Notice in lua.h
|
||||||
#
|
#
|
||||||
|
@ -94,7 +94,8 @@ clear :
|
||||||
|
|
||||||
lapi.o: lapi.c lapi.h lua.h lobject.h lauxlib.h ldo.h lstate.h lfunc.h \
|
lapi.o: lapi.c lapi.h lua.h lobject.h lauxlib.h ldo.h lstate.h lfunc.h \
|
||||||
lgc.h lmem.h lstring.h ltable.h ltm.h luadebug.h lvm.h
|
lgc.h lmem.h lstring.h ltable.h ltm.h luadebug.h lvm.h
|
||||||
lauxlib.o: lauxlib.c lauxlib.h lua.h luadebug.h
|
lauxlib.o: lauxlib.c lauxlib.h lua.h lmem.h lstate.h lobject.h \
|
||||||
|
luadebug.h
|
||||||
lbuiltin.o: lbuiltin.c lapi.h lua.h lobject.h lauxlib.h lbuiltin.h \
|
lbuiltin.o: lbuiltin.c lapi.h lua.h lobject.h lauxlib.h lbuiltin.h \
|
||||||
ldo.h lstate.h lfunc.h lmem.h lstring.h ltable.h ltm.h
|
ldo.h lstate.h lfunc.h lmem.h lstring.h ltable.h ltm.h
|
||||||
ldo.o: ldo.c ldo.h lobject.h lua.h lstate.h lfunc.h lgc.h lmem.h \
|
ldo.o: ldo.c ldo.h lobject.h lua.h lstate.h lfunc.h lgc.h lmem.h \
|
||||||
|
@ -103,13 +104,13 @@ lfunc.o: lfunc.c lfunc.h lobject.h lua.h lmem.h lstate.h
|
||||||
lgc.o: lgc.c ldo.h lobject.h lua.h lstate.h lfunc.h lgc.h lmem.h \
|
lgc.o: lgc.c ldo.h lobject.h lua.h lstate.h lfunc.h lgc.h lmem.h \
|
||||||
lstring.h ltable.h ltm.h
|
lstring.h ltable.h ltm.h
|
||||||
liolib.o: liolib.c lauxlib.h lua.h luadebug.h lualib.h
|
liolib.o: liolib.c lauxlib.h lua.h luadebug.h lualib.h
|
||||||
llex.o: llex.c llex.h lobject.h lua.h lzio.h lmem.h lparser.h lstate.h \
|
llex.o: llex.c lauxlib.h lua.h llex.h lobject.h lzio.h lmem.h \
|
||||||
lstring.h lstx.h luadebug.h
|
lparser.h lstate.h lstring.h lstx.h luadebug.h
|
||||||
lmathlib.o: lmathlib.c lauxlib.h lua.h lualib.h
|
lmathlib.o: lmathlib.c lauxlib.h lua.h lualib.h
|
||||||
lmem.o: lmem.c lmem.h lstate.h lobject.h lua.h
|
lmem.o: lmem.c lmem.h lstate.h lobject.h lua.h
|
||||||
lobject.o: lobject.c lobject.h lua.h
|
lobject.o: lobject.c lobject.h lua.h
|
||||||
lstate.o: lstate.c lbuiltin.h ldo.h lobject.h lua.h lstate.h llex.h \
|
lstate.o: lstate.c lbuiltin.h ldo.h lobject.h lua.h lstate.h lfunc.h \
|
||||||
lzio.h lmem.h lstring.h ltable.h ltm.h
|
lgc.h llex.h lzio.h lmem.h lstring.h ltable.h ltm.h
|
||||||
lstring.o: lstring.c lmem.h lobject.h lua.h lstate.h lstring.h
|
lstring.o: lstring.c lmem.h lobject.h lua.h lstate.h lstring.h
|
||||||
lstrlib.o: lstrlib.c lauxlib.h lua.h lualib.h
|
lstrlib.o: lstrlib.c lauxlib.h lua.h lualib.h
|
||||||
lstx.o: lstx.c lauxlib.h lua.h ldo.h lobject.h lstate.h lfunc.h llex.h \
|
lstx.o: lstx.c lauxlib.h lua.h ldo.h lobject.h lstate.h lfunc.h llex.h \
|
||||||
|
|
Loading…
Reference in New Issue