summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJohn Millaway <john43@users.sourceforge.net>2002-07-17 06:46:23 +0000
committerJohn Millaway <john43@users.sourceforge.net>2002-07-17 06:46:23 +0000
commit58d399341dc4d8a1da79a3636fb823e92b82c912 (patch)
tree6688a3617266590bac71c152b650bd072e3c81a3 /tests
parenta336daae24c230b9c5fbc82b5d5f8f10d90b6f6d (diff)
Fixed prototype/definition conflicts with "traditional" C in skeleton at request of gcc developer.
Removed duplicate prototypes in gen.c, sym.c, main.c. Added missing prototypes where needed. All functions in skeleton follow ISO C style protos and defs, instead of BOTH ISO and new-style. Skeleton now compiles cleanly under super-strict gcc flags. Flex itself almost compiles cleanly under strict flags.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-mem-nr/scanner.l6
-rw-r--r--tests/test-mem-r/scanner.l6
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/test-mem-nr/scanner.l b/tests/test-mem-nr/scanner.l
index 75a29c9..7741f1d 100644
--- a/tests/test-mem-nr/scanner.l
+++ b/tests/test-mem-nr/scanner.l
@@ -82,7 +82,7 @@ static void dump_mem(FILE* fp){
fprintf(fp,"}\n");
}
-void * yyalloc(size_t n YY_LAST_ARG)
+void * yyalloc(size_t n )
{
void * p;
struct memsz * old;
@@ -112,7 +112,7 @@ void * yyalloc(size_t n YY_LAST_ARG)
return p;
}
-void * yyrealloc(void* p, size_t n YY_LAST_ARG)
+void * yyrealloc(void* p, size_t n )
{
int i;
for (i=0; i < arrsz; i++)
@@ -133,7 +133,7 @@ void * yyrealloc(void* p, size_t n YY_LAST_ARG)
exit(1);
}
-void yyfree(void* p YY_LAST_ARG)
+void yyfree(void* p )
{
int i;
for (i=0; i < arrsz; i++)
diff --git a/tests/test-mem-r/scanner.l b/tests/test-mem-r/scanner.l
index 10acd9a..01ac9de 100644
--- a/tests/test-mem-r/scanner.l
+++ b/tests/test-mem-r/scanner.l
@@ -82,7 +82,7 @@ static void dump_mem(FILE* fp){
fprintf(fp,"}\n");
}
-void * yyalloc(size_t n YY_LAST_ARG)
+void * yyalloc(size_t n , void* yy_globals)
{
void * p;
struct memsz * old;
@@ -112,7 +112,7 @@ void * yyalloc(size_t n YY_LAST_ARG)
return p;
}
-void * yyrealloc(void* p, size_t n YY_LAST_ARG)
+void * yyrealloc(void* p, size_t n , void* yy_globals)
{
int i;
for (i=0; i < arrsz; i++)
@@ -133,7 +133,7 @@ void * yyrealloc(void* p, size_t n YY_LAST_ARG)
exit(1);
}
-void yyfree(void* p YY_LAST_ARG)
+void yyfree(void* p , void* yy_globals)
{
int i;
for (i=0; i < arrsz; i++)