diff --git a/lapi.c b/lapi.c index 8a570674..aa6bd324 100644 --- a/lapi.c +++ b/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 ** 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; diff --git a/lbuiltin.c b/lbuiltin.c index 36432add..50183fff 100644 --- a/lbuiltin.c +++ b/lbuiltin.c @@ -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: { diff --git a/llex.h b/llex.h index 4f28cc24..a24fdec1 100644 --- a/llex.h +++ b/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 ** 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); diff --git a/lmem.h b/lmem.h index dcc1c1a4..90111336 100644 --- a/lmem.h +++ b/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 ** 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 diff --git a/lstring.h b/lstring.h index c842afe8..b2c421e2 100644 --- a/lstring.h +++ b/lstring.h @@ -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); diff --git a/lstrlib.c b/lstrlib.c index eba282de..cdd2ffe5 100644 --- a/lstrlib.c +++ b/lstrlib.c @@ -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++) { diff --git a/ltable.h b/ltable.h index 4fb66a91..06cf17c3 100644 --- a/ltable.h +++ b/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) ** 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); diff --git a/ltm.h b/ltm.h index 4b52fe94..9c3ec111 100644 --- a/ltm.h +++ b/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 ** 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); diff --git a/lua.h b/lua.h index 48fd80cf..23a30cbe 100644 --- a/lua.h +++ b/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 ** 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); diff --git a/lualib.h b/lualib.h index 0031de9f..9e9b0193 100644 --- a/lualib.h +++ b/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 ** 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);