X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=gedcom%2Fgedcom_1byte.lex;h=938a97c476ed63b396be602ae07d56a03ec298e0;hb=c4ab7521ddeb958a1476377d88883ea0579bd3ab;hp=6fa1d6b0293089b3f4573f8482d7ecd1e1d6eb4e;hpb=e6cd9cd58e0e23f70e75b140d16354af665d7b43;p=gedcom-parse.git diff --git a/gedcom/gedcom_1byte.lex b/gedcom/gedcom_1byte.lex index 6fa1d6b..938a97c 100644 --- a/gedcom/gedcom_1byte.lex +++ b/gedcom/gedcom_1byte.lex @@ -22,7 +22,8 @@ /* $Name$ */ %{ -#undef IN_LEX /* include only a specific part of the following file */ +#define LEX_SECTION 1 /* include only a specific part of the following file */ +#define yymyinit gedcom_1byte_myinit #include "gedcom_lex_common.c" static size_t encoding_width = 1; @@ -53,7 +54,8 @@ pointer @{alphanum}{non_at}+@ %% %{ -#define IN_LEX /* include only a specific part of the following file */ +#undef LEX_SECTION +#define LEX_SECTION 2 /* include only a specific part of the following file */ #include "gedcom_lex_common.c" ACTION_BEFORE_REGEXPS @@ -215,15 +217,9 @@ ACTION_BEFORE_REGEXPS . ACTION_UNEXPECTED %% - -static int exitfuncregistered = 0; - -int yywrap() -{ - if (! exitfuncregistered && atexit(yylex_cleanup) == 0) - exitfuncregistered = 1; - return 1; -} +#undef LEX_SECTION +#define LEX_SECTION 3 /* include only a specific part of the following file */ +#include "gedcom_lex_common.c" #ifdef LEXER_TEST int gedcom_lex()