X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=sbr%2Fdtimep.lex;h=01910868f37f60f2a4a532559a4ff4b301e01baf;hp=c35c9beffd36cfcbca1d94697c1e4d420330d905;hb=4dd01e6c68874a5fc2988d63d6c26984889310a3;hpb=a4e085dcc682da556af59d8b2c8a0afe44c6f257 diff --git a/sbr/dtimep.lex b/sbr/dtimep.lex index c35c9be..0191086 100644 --- a/sbr/dtimep.lex +++ b/sbr/dtimep.lex @@ -17,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 @@ -398,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); +} +