From: pjfarley AT banet DOT net (Peter J. Farley III) Newsgroups: comp.os.msdos.djgpp Subject: Flex 2.5.4 patch for redefining input() and/or unput() Date: Fri, 31 Mar 2000 03:00:37 GMT Message-ID: <38e41143.3396939@news3.banet.net> X-Newsreader: Forte Free Agent 1.21/32.243 NNTP-Posting-Host: 32.100.250.187 X-Trace: 31 Mar 2000 02:59:25 GMT, 32.100.250.187 Organization: Global Network Services - Remote Access Mail & News Services Lines: 47 X-Complaints-To: abuse AT prserv DOT net To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Eli, Below is a patch for the Flex 2.5.4 skeleton code to allow the input() function to be undefined just as the unput() function can be undefined. The package has to be re-built to include the change. Flex allows the input() and/or unput() functions to be undefined (or more correctly, not defined at all) so that the user can define their own, by using a compile-time flag (-DYY_NO_INPUT and/or -DYY_NO_UNPUT). The flex skeleton correctly tests YY_NO_UNPUT, but it looks like the corresponding test was omitted for YY_NO_INPUT. I will also submit this to the gnu bugs list, but I'm posting it here so that DJGPP users can apply it sooner than the next release, if they want or need to do so. <==============flexskl.dif=========================> *** flex.sk0 Wed Sep 11 02:58:54 1996 --- flex.skl Wed Mar 29 21:39:56 2000 *************** *** 970,975 **** --- 970,976 ---- %- + #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput() #else *************** *** 1045,1050 **** --- 1046,1054 ---- return c; } + %- + #endif /* ifndef YY_NO_INPUT */ + %* %- <==============flexskl.dif=========================> ---------------------------------------------------- Peter J. Farley III (pjfarley AT nospam DOT dorsai DOT org OR pjfarley AT nospam DOT banet DOT net)