diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2024-03-05 04:17:19 -0500 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2024-03-05 05:33:33 -0500 |
commit | c2833e0c97f491a1acc87abe09adcd2b3f937688 (patch) | |
tree | a28eb2c45e8f967456b0dce130bb3771d73bcecf | |
parent | cebd6e2bab56c12d48ed3aa3c562bf9661595394 (diff) |
improve declaration of yylex()
Replace the extern declaration of yylex() in gram.y with a
definition/use in parse.h, improving portability.
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
-rw-r--r-- | src/gram.y | 1 | ||||
-rw-r--r-- | src/parse.h | 3 |
2 files changed, 3 insertions, 1 deletions
@@ -100,7 +100,6 @@ static int color; int mods = 0; unsigned int mods_used = (ShiftMask | ControlMask | Mod1Mask); -extern int yylex(void); static void yyerror(const char *s); %} diff --git a/src/parse.h b/src/parse.h index 2327ab1..f66bf06 100644 --- a/src/parse.h +++ b/src/parse.h @@ -63,6 +63,9 @@ in this Software without prior written authorization from The Open Group. #include "list.h" #include "gram.h" +#define YY_DECL int yylex (void) +YY_DECL; + extern void assign_var_savecolor(void); extern int do_single_keyword(int keyword); extern int do_string_keyword(int keyword, char *s); |