small details by lint.

This commit is contained in:
Roberto Ierusalimschy 1997-11-26 16:53:45 -02:00
parent accd7bc253
commit 9ae0c082a3
10 changed files with 20 additions and 25 deletions

6
lapi.c
View File

@ -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
** 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 (tonumber(Address(object))) return 0.0;
@ -302,7 +302,7 @@ void lua_pushnil (void)
incr_top;
}
void lua_pushnumber (real n)
void lua_pushnumber (double n)
{
ttype(L->stack.top) = LUA_T_NUMBER;
nvalue(L->stack.top) = n;

View File

@ -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
** 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:
return lua_getstring(obj);
case LUA_T_ARRAY: {
sprintf(buff, "table: %p", o->value.a);
sprintf(buff, "table: %p", (void *)o->value.a);
return buff;
}
case LUA_T_FUNCTION: {
sprintf(buff, "function: %p", o->value.cl);
sprintf(buff, "function: %p", (void *)o->value.cl);
return buff;
}
case LUA_T_USERDATA: {

5
llex.h
View File

@ -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
** See Copyright Notice in lua.h
*/
@ -40,9 +40,6 @@ typedef struct LexState {
} LexState;
extern int luaX_linenumber;
void luaX_init (void);
void luaX_setinput (ZIO *z);
char *luaX_lasttoken (void);

6
lmem.h
View File

@ -1,5 +1,5 @@
/*
** $Id: $
** $Id: lmem.h,v 1.1 1997/09/16 19:25:59 roberto Exp roberto $
** Interface to Memory Manager
** 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)))
void luaM_query (void); /* only ifdef DEBUG */
#ifdef DEBUG
void luaM_query (void);
#endif
#endif

View File

@ -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)
** See Copyright Notice in lua.h
*/
@ -15,7 +15,6 @@ void luaS_init (void);
TaggedString *luaS_createudata (void *udata, int tag);
TaggedString *luaS_collector (void);
void luaS_free (TaggedString *l);
void luaS_callIM (TaggedString *l);
TaggedString *luaS_new (char *str);
TaggedString *luaS_newfixedstring (char *str);
void luaS_rawsetglobal (TaggedString *ts, TObject *newval);

View File

@ -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
** 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('"');
for (; *s; s++) {

View File

@ -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)
** See Copyright Notice in lua.h
*/
@ -16,7 +16,6 @@
#define nhash(t) ((t)->nhash)
Hash *luaH_new (int nhash);
void luaH_callIM (Hash *l);
void luaH_free (Hash *frees);
TObject *luaH_get (Hash *t, TObject *ref);
TObject *luaH_set (Hash *t, TObject *ref);

3
ltm.h
View File

@ -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
** See Copyright Notice in lua.h
*/
@ -51,7 +51,6 @@ extern char *luaT_eventname[];
void luaT_init (void);
void luaT_settag (int tag, TObject *o);
void luaT_realtag (int tag);
int luaT_efectivetag (TObject *o);
void luaT_settagmethod (int t, char *event, TObject *func);

6
lua.h
View File

@ -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
** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil
** 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_isfunction (lua_Object object);
float lua_getnumber (lua_Object object);
double lua_getnumber (lua_Object object);
char *lua_getstring (lua_Object object);
lua_CFunction lua_getcfunction (lua_Object object);
void *lua_getuserdata (lua_Object object);
void lua_pushnil (void);
void lua_pushnumber (float n);
void lua_pushnumber (double n);
void lua_pushstring (char *s);
void lua_pushCclosure (lua_CFunction fn, int n);
void lua_pushusertag (void *u, int tag);

View File

@ -1,5 +1,5 @@
/*
** $Id: $
** $Id: lualib.h,v 1.1 1997/09/16 19:25:59 roberto Exp roberto $
** Lua standard libraries
** See Copyright Notice in lua.h
*/
@ -30,7 +30,6 @@ void lua_mathlibopen (void);
char *luaI_addchar (int c);
void luaI_emptybuff (void);
void luaI_addquoted (char *s);
int luaI_singlematch (int c, char *p, char **ep);