1
0
mirror of https://github.com/lua/lua synced 2025-03-22 13:42:51 +03:00

modifications to avoid warnings when compiling yacc code

This commit is contained in:
Roberto Ierusalimschy 1994-11-23 12:39:52 -02:00
parent d490555ec9
commit e901e0feae

14
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;
}