mirror of https://github.com/rusefi/lua.git
small details by lint.
This commit is contained in:
parent
accd7bc253
commit
9ae0c082a3
6
lapi.c
6
lapi.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lapi.c,v 1.6 1997/11/19 18:16:33 roberto Exp roberto $
|
** $Id: lapi.c,v 1.7 1997/11/21 19:00:46 roberto Exp roberto $
|
||||||
** Lua API
|
** Lua API
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -267,7 +267,7 @@ int lua_isfunction (lua_Object o)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
real lua_getnumber (lua_Object object)
|
double lua_getnumber (lua_Object object)
|
||||||
{
|
{
|
||||||
if (object == LUA_NOOBJECT) return 0.0;
|
if (object == LUA_NOOBJECT) return 0.0;
|
||||||
if (tonumber(Address(object))) return 0.0;
|
if (tonumber(Address(object))) return 0.0;
|
||||||
|
@ -302,7 +302,7 @@ void lua_pushnil (void)
|
||||||
incr_top;
|
incr_top;
|
||||||
}
|
}
|
||||||
|
|
||||||
void lua_pushnumber (real n)
|
void lua_pushnumber (double n)
|
||||||
{
|
{
|
||||||
ttype(L->stack.top) = LUA_T_NUMBER;
|
ttype(L->stack.top) = LUA_T_NUMBER;
|
||||||
nvalue(L->stack.top) = n;
|
nvalue(L->stack.top) = n;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lbuiltin.c,v 1.7 1997/11/07 18:19:13 roberto Exp roberto $
|
** $Id: lbuiltin.c,v 1.8 1997/11/19 17:29:23 roberto Exp roberto $
|
||||||
** Built-in functions
|
** Built-in functions
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -152,11 +152,11 @@ static char *to_string (lua_Object obj)
|
||||||
case LUA_T_NUMBER: case LUA_T_STRING:
|
case LUA_T_NUMBER: case LUA_T_STRING:
|
||||||
return lua_getstring(obj);
|
return lua_getstring(obj);
|
||||||
case LUA_T_ARRAY: {
|
case LUA_T_ARRAY: {
|
||||||
sprintf(buff, "table: %p", o->value.a);
|
sprintf(buff, "table: %p", (void *)o->value.a);
|
||||||
return buff;
|
return buff;
|
||||||
}
|
}
|
||||||
case LUA_T_FUNCTION: {
|
case LUA_T_FUNCTION: {
|
||||||
sprintf(buff, "function: %p", o->value.cl);
|
sprintf(buff, "function: %p", (void *)o->value.cl);
|
||||||
return buff;
|
return buff;
|
||||||
}
|
}
|
||||||
case LUA_T_USERDATA: {
|
case LUA_T_USERDATA: {
|
||||||
|
|
5
llex.h
5
llex.h
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: llex.h,v 1.2 1997/11/04 15:27:53 roberto Exp roberto $
|
** $Id: llex.h,v 1.3 1997/11/19 17:29:23 roberto Exp roberto $
|
||||||
** Lexical Analizer
|
** Lexical Analizer
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -40,9 +40,6 @@ typedef struct LexState {
|
||||||
} LexState;
|
} LexState;
|
||||||
|
|
||||||
|
|
||||||
extern int luaX_linenumber;
|
|
||||||
|
|
||||||
|
|
||||||
void luaX_init (void);
|
void luaX_init (void);
|
||||||
void luaX_setinput (ZIO *z);
|
void luaX_setinput (ZIO *z);
|
||||||
char *luaX_lasttoken (void);
|
char *luaX_lasttoken (void);
|
||||||
|
|
6
lmem.h
6
lmem.h
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: $
|
** $Id: lmem.h,v 1.1 1997/09/16 19:25:59 roberto Exp roberto $
|
||||||
** Interface to Memory Manager
|
** Interface to Memory Manager
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -38,7 +38,9 @@ int luaM_growaux (void **block, unsigned long nelems, int size,
|
||||||
#define luaM_reallocvector(v,n,t) ((t *)luaM_realloc(v,(n)*sizeof(t)))
|
#define luaM_reallocvector(v,n,t) ((t *)luaM_realloc(v,(n)*sizeof(t)))
|
||||||
|
|
||||||
|
|
||||||
void luaM_query (void); /* only ifdef DEBUG */
|
#ifdef DEBUG
|
||||||
|
void luaM_query (void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lstring.h,v 1.3 1997/11/04 15:27:53 roberto Exp roberto $
|
** $Id: lstring.h,v 1.4 1997/11/19 17:29:23 roberto Exp roberto $
|
||||||
** String table (keep all strings handled by Lua)
|
** String table (keep all strings handled by Lua)
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -15,7 +15,6 @@ void luaS_init (void);
|
||||||
TaggedString *luaS_createudata (void *udata, int tag);
|
TaggedString *luaS_createudata (void *udata, int tag);
|
||||||
TaggedString *luaS_collector (void);
|
TaggedString *luaS_collector (void);
|
||||||
void luaS_free (TaggedString *l);
|
void luaS_free (TaggedString *l);
|
||||||
void luaS_callIM (TaggedString *l);
|
|
||||||
TaggedString *luaS_new (char *str);
|
TaggedString *luaS_new (char *str);
|
||||||
TaggedString *luaS_newfixedstring (char *str);
|
TaggedString *luaS_newfixedstring (char *str);
|
||||||
void luaS_rawsetglobal (TaggedString *ts, TObject *newval);
|
void luaS_rawsetglobal (TaggedString *ts, TObject *newval);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lstrlib.c,v 1.1 1997/08/14 19:47:57 roberto Exp roberto $
|
** $Id: lstrlib.c,v 1.1 1997/09/16 19:25:59 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
|
||||||
*/
|
*/
|
||||||
|
@ -446,7 +446,7 @@ static void str_gsub (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void luaI_addquoted (char *s)
|
static void luaI_addquoted (char *s)
|
||||||
{
|
{
|
||||||
luaI_addchar('"');
|
luaI_addchar('"');
|
||||||
for (; *s; s++) {
|
for (; *s; s++) {
|
||||||
|
|
3
ltable.h
3
ltable.h
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: ltable.h,v 1.3 1997/10/18 16:29:15 roberto Exp roberto $
|
** $Id: ltable.h,v 1.4 1997/11/19 17:29:23 roberto Exp roberto $
|
||||||
** Lua tables (hash)
|
** Lua tables (hash)
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -16,7 +16,6 @@
|
||||||
#define nhash(t) ((t)->nhash)
|
#define nhash(t) ((t)->nhash)
|
||||||
|
|
||||||
Hash *luaH_new (int nhash);
|
Hash *luaH_new (int nhash);
|
||||||
void luaH_callIM (Hash *l);
|
|
||||||
void luaH_free (Hash *frees);
|
void luaH_free (Hash *frees);
|
||||||
TObject *luaH_get (Hash *t, TObject *ref);
|
TObject *luaH_get (Hash *t, TObject *ref);
|
||||||
TObject *luaH_set (Hash *t, TObject *ref);
|
TObject *luaH_set (Hash *t, TObject *ref);
|
||||||
|
|
3
ltm.h
3
ltm.h
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: ltm.h,v 1.2 1997/11/04 15:27:53 roberto Exp roberto $
|
** $Id: ltm.h,v 1.3 1997/11/19 17:29:23 roberto Exp roberto $
|
||||||
** Tag methods
|
** Tag methods
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -51,7 +51,6 @@ extern char *luaT_eventname[];
|
||||||
|
|
||||||
|
|
||||||
void luaT_init (void);
|
void luaT_init (void);
|
||||||
void luaT_settag (int tag, TObject *o);
|
|
||||||
void luaT_realtag (int tag);
|
void luaT_realtag (int tag);
|
||||||
int luaT_efectivetag (TObject *o);
|
int luaT_efectivetag (TObject *o);
|
||||||
void luaT_settagmethod (int t, char *event, TObject *func);
|
void luaT_settagmethod (int t, char *event, TObject *func);
|
||||||
|
|
6
lua.h
6
lua.h
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lua.h,v 1.3 1997/11/04 15:27:53 roberto Exp roberto $
|
** $Id: lua.h,v 1.4 1997/11/19 17:29:23 roberto Exp roberto $
|
||||||
** LUA - An Extensible Extension Language
|
** LUA - An Extensible Extension Language
|
||||||
** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil
|
** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil
|
||||||
** e-mail: lua@tecgraf.puc-rio.br
|
** e-mail: lua@tecgraf.puc-rio.br
|
||||||
|
@ -85,14 +85,14 @@ int lua_isnumber (lua_Object object);
|
||||||
int lua_isstring (lua_Object object);
|
int lua_isstring (lua_Object object);
|
||||||
int lua_isfunction (lua_Object object);
|
int lua_isfunction (lua_Object object);
|
||||||
|
|
||||||
float lua_getnumber (lua_Object object);
|
double lua_getnumber (lua_Object object);
|
||||||
char *lua_getstring (lua_Object object);
|
char *lua_getstring (lua_Object object);
|
||||||
lua_CFunction lua_getcfunction (lua_Object object);
|
lua_CFunction lua_getcfunction (lua_Object object);
|
||||||
void *lua_getuserdata (lua_Object object);
|
void *lua_getuserdata (lua_Object object);
|
||||||
|
|
||||||
|
|
||||||
void lua_pushnil (void);
|
void lua_pushnil (void);
|
||||||
void lua_pushnumber (float n);
|
void lua_pushnumber (double n);
|
||||||
void lua_pushstring (char *s);
|
void lua_pushstring (char *s);
|
||||||
void lua_pushCclosure (lua_CFunction fn, int n);
|
void lua_pushCclosure (lua_CFunction fn, int n);
|
||||||
void lua_pushusertag (void *u, int tag);
|
void lua_pushusertag (void *u, int tag);
|
||||||
|
|
3
lualib.h
3
lualib.h
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: $
|
** $Id: lualib.h,v 1.1 1997/09/16 19:25:59 roberto Exp roberto $
|
||||||
** Lua standard libraries
|
** Lua standard libraries
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -30,7 +30,6 @@ void lua_mathlibopen (void);
|
||||||
|
|
||||||
char *luaI_addchar (int c);
|
char *luaI_addchar (int c);
|
||||||
void luaI_emptybuff (void);
|
void luaI_emptybuff (void);
|
||||||
void luaI_addquoted (char *s);
|
|
||||||
|
|
||||||
int luaI_singlematch (int c, char *p, char **ep);
|
int luaI_singlematch (int c, char *p, char **ep);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue