lua

A copy of the Lua development repository
Log | Files | Refs | README

commit e901e0feaee4a32e81dbc1e595c2527f329d40e8
parent d490555ec9d5efb886211f735694d4e7dd0c166d
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Wed, 23 Nov 1994 12:39:33 -0200

modifications to avoid warnings when compiling yacc code

Diffstat:
Mlua.stx | 14+++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/lua.stx b/lua.stx @@ -1,6 +1,6 @@ %{ -char *rcs_luastx = "$Id: lua.stx,v 3.9 1994/11/17 21:11:37 roberto Exp roberto $"; +char *rcs_luastx = "$Id: lua.stx,v 3.10 1994/11/22 15:50:46 roberto Exp roberto $"; #include <stdio.h> #include <stdlib.h> @@ -14,6 +14,14 @@ char *rcs_luastx = "$Id: lua.stx,v 3.9 1994/11/17 21:11:37 roberto Exp roberto $ #include "table.h" #include "lua.h" + +/* to avoid warnings generated by yacc */ +int yyparse (void); +#define malloc luaI_malloc +#define realloc luaI_realloc +#define free luaI_free + + #ifndef LISTING #define LISTING 0 #endif @@ -701,7 +709,7 @@ static void codeIf (Long thenAdd, Long elseAdd) code_word_at(basepc+thenAdd+1,elseinit-(thenAdd+sizeof(Word)+1)); } -void yyerror (char *s) +static void yyerror (char *s) { static char msg[256]; sprintf (msg,"%s near \"%s\" at line %d in file \"%s\"", @@ -709,7 +717,7 @@ void yyerror (char *s) lua_error (msg); } -int yywrap (void) +static int yywrap (void) { return 1; }