diff options
Diffstat (limited to 'converter/pbm/thinkjettopbm.l')
-rw-r--r-- | converter/pbm/thinkjettopbm.l | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/converter/pbm/thinkjettopbm.l b/converter/pbm/thinkjettopbm.l index 71501596..5de4f2bb 100644 --- a/converter/pbm/thinkjettopbm.l +++ b/converter/pbm/thinkjettopbm.l @@ -47,8 +47,15 @@ undefined. (Simply leaving them undefined typically works anyway, but it is a problem if you use compiler options that say to fail when someone uses a macro he failed to define). + + We'd like to define YY_NO_UNPUT so as not to generate the unput function, + which we don't use, and avoid a compiler warning about defining and not + using it. Alas, Flex 2.5.35 ignores YY_NO_UNPUT and generates the unput + function anyway. So we have to have a bogus reference to silence the + unused function compiler warning. And that means we have to generate + the function always. Flex 2.5.4 does respect YY_NO_UNPUT. */ -#define YY_NO_UNPUT +#define YY_NO_INPUT 1 #define YY_STACK_USED 0 #define YY_ALWAYS_INTERACTIVE 0 #define YY_NEVER_INTERACTIVE 0 @@ -151,7 +158,7 @@ parseCommandLine(int argc, char ** const argv, was passed to us as the argv array. -----------------------------------------------------------------------------*/ optEntry *option_def = malloc(100*sizeof(optEntry)); - /* Instructions to OptParseOptions3 on how to parse our options. + /* Instructions to pm_OptParseOptions3 on how to parse our options. */ optStruct3 opt; @@ -164,7 +171,7 @@ parseCommandLine(int argc, char ** const argv, opt.short_allowed = FALSE; /* We have no short (old-fashioned) options */ opt.allowNegNum = FALSE; /* We have no parms that are negative numbers */ - optParseOptions3(&argc, argv, opt, sizeof(opt), 0); + pm_optParseOptions3(&argc, argv, opt, sizeof(opt), 0); /* Uses and sets argc, argv, and some of *cmdlineP and others. */ @@ -200,6 +207,8 @@ main (int argc, char **argv) } debugFlag = cmdline.debug; yylex (); + if (0) + yyunput(0, NULL); /* defeat compiler warning about unused fn */ return 0; } |