mirror of https://github.com/rusefi/lua.git
modifications to avoid warnings when compiling yacc code
This commit is contained in:
parent
d490555ec9
commit
e901e0feae
14
lua.stx
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 <stdio.h>
|
||||||
#include <stdlib.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 "table.h"
|
||||||
#include "lua.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
|
#ifndef LISTING
|
||||||
#define LISTING 0
|
#define LISTING 0
|
||||||
#endif
|
#endif
|
||||||
|
@ -701,7 +709,7 @@ static void codeIf (Long thenAdd, Long elseAdd)
|
||||||
code_word_at(basepc+thenAdd+1,elseinit-(thenAdd+sizeof(Word)+1));
|
code_word_at(basepc+thenAdd+1,elseinit-(thenAdd+sizeof(Word)+1));
|
||||||
}
|
}
|
||||||
|
|
||||||
void yyerror (char *s)
|
static void yyerror (char *s)
|
||||||
{
|
{
|
||||||
static char msg[256];
|
static char msg[256];
|
||||||
sprintf (msg,"%s near \"%s\" at line %d in file \"%s\"",
|
sprintf (msg,"%s near \"%s\" at line %d in file \"%s\"",
|
||||||
|
@ -709,7 +717,7 @@ void yyerror (char *s)
|
||||||
lua_error (msg);
|
lua_error (msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
int yywrap (void)
|
static int yywrap (void)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue