--- laygram.y.old 1996-10-15 16:41:26.000000000 +0200 +++ laygram.y 2009-10-25 02:39:38.000000000 +0100 @@ -1,3 +1,5 @@ +%name-prefix "LayYY" +%defines %{ #include #include @@ -9,6 +11,8 @@ #include #include #include "LayoutP.h" +#define yysetdest LayYYsetdest +#define yywrap LayYYwrap static LayoutPtr *dest; @@ -251,13 +255,12 @@ ; %% -int yywrap () +int yywrap (void) { return 1; } -void yysetdest (c) - LayoutPtr *c; +void yysetdest (LayoutPtr *c) { dest = c; } --- laylex.l.old 1996-10-15 16:41:26.000000000 +0200 +++ laylex.l 2009-10-25 02:35:41.000000000 +0100 @@ -13,6 +13,9 @@ #include "LayoutP.h" #include "laygram.h" static char *yysourcebase, *yysource; +#define yylval LayYYlval +#define yyerror LayYYerror +#define yysetsource LayYYsetsource #ifndef FLEX_SCANNER #define input() (*yysource++) @@ -23,9 +26,7 @@ #define YY_INPUT(buf, res, max) my_yyinput(buf, &(res), max) #endif -#ifdef __STDC__ -static int count (); -#endif +static int count (char* s, char c); %} %% vertical return VERTICAL; @@ -75,9 +76,7 @@ %% static int -count (s, c) - char *s; - char c; +count (char *s, char c) { int i = 0; while (*s) @@ -86,14 +85,12 @@ return i; } -yysetsource(s) - char *s; +void yysetsource(char *s) { yysourcebase = yysource = s; } -yyerror(s) - char *s; +void yyerror(char *s) { char *t; @@ -115,8 +112,7 @@ #ifdef FLEX_SCANNER static void -my_yyinput(buf, result, max_size) - char *buf; int *result; int max_size; +my_yyinput(char *buf, int *result, int max_size) { int size = max_size < strlen(yysource) ? max_size : strlen(yysource);