mirror of
https://github.com/amiwm/amiwm.git
synced 2026-04-14 11:04:18 +00:00
Use the noyywrap lex option instead of adding hacky yywrap functions
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
%option noyywrap
|
||||||
%{
|
%{
|
||||||
#include <X11/Xmu/CharSet.h>
|
#include <X11/Xmu/CharSet.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -139,9 +140,6 @@ int parse_keyword(char *str, YYSTYPE *val)
|
|||||||
progname, yytext); }
|
progname, yytext); }
|
||||||
%%
|
%%
|
||||||
|
|
||||||
#ifndef yywrap
|
|
||||||
int yywrap() { return 1; }
|
|
||||||
#endif
|
|
||||||
#undef input
|
#undef input
|
||||||
#define input() ((*inptr)?(*inptr++):0)
|
#define input() ((*inptr)?(*inptr++):0)
|
||||||
#undef unput
|
#undef unput
|
||||||
|
|||||||
2
lex.l
2
lex.l
@@ -1,3 +1,4 @@
|
|||||||
|
%option noyywrap
|
||||||
%{
|
%{
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "gram.h"
|
#include "gram.h"
|
||||||
@@ -6,7 +7,6 @@ extern int ParseError;
|
|||||||
extern FILE *rcfile;
|
extern FILE *rcfile;
|
||||||
#undef yyin
|
#undef yyin
|
||||||
#define yyin rcfile
|
#define yyin rcfile
|
||||||
#define yywrap() 1
|
|
||||||
extern int parse_keyword(char *);
|
extern int parse_keyword(char *);
|
||||||
void fixup_string(char *, char *);
|
void fixup_string(char *, char *);
|
||||||
#define YY_SKIP_YYWRAP
|
#define YY_SKIP_YYWRAP
|
||||||
|
|||||||
Reference in New Issue
Block a user