X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=sbr%2Fdtimep.lex;h=01910868f37f60f2a4a532559a4ff4b301e01baf;hb=4dd01e6c68874a5fc2988d63d6c26984889310a3;hp=a228694940511863cabb3d96e1a8dcadd9d05d0d;hpb=f1f1c819cd3663a9912914d6f9df92ee2cd86a6f;p=mmh diff --git a/sbr/dtimep.lex b/sbr/dtimep.lex index a228694..0191086 100644 --- a/sbr/dtimep.lex +++ b/sbr/dtimep.lex @@ -1,3 +1,12 @@ +/* dtimep.lex exceeds the default table capacities for some old versions + * of lex (and the minimum defaults as specified by POSIX). The following + * choices meet or exceed the lex defaults for older SunOS4.x, Solaris, + * HPUX, and AIX. + */ +%e4000 +%p7000 +%n2500 +%a5000 %{ #include #include @@ -8,7 +17,7 @@ #define yywrap() 1 #define YY_SKIP_YYWRAP -#define YY_NO_UNPUT +#define YY_NO_INPUT /* This is the tricky thing that makes this function cool. We * replace the traditional int yylex(void) declaration with our @@ -227,7 +236,7 @@ nl [ \t\n()] YY_BUFFER_STATE lexhandle; - register char *cp; + register unsigned char *cp; static struct tws tw; memset(&tw,0,sizeof(struct tws)); @@ -389,3 +398,16 @@ nl [ \t\n()] {nl}("hdt"|"HDT") { INIT(); SETDST(); SETZONE(-1000); yyterminate(); } .|\n + +%% +/* This is a portable way to squash a warning about the yyunput() + * function being static but never used. It costs us a tiny amount + * of extra code in the binary but the other options are: + * "%option nounput" which is flex-specific + * makefile hackery just to compile dtimep.c with different flags + */ +void dtimep_yyunput(int c) +{ + unput(c); +} +