=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/parse/lex.c,v retrieving revision 1.5 retrieving revision 1.8 diff -u -p -r1.5 -r1.8 --- OpenXM_contrib2/asir2000/parse/lex.c 2000/08/22 05:04:27 1.5 +++ OpenXM_contrib2/asir2000/parse/lex.c 2000/12/05 01:24:57 1.8 @@ -45,17 +45,15 @@ * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. * - * $OpenXM: OpenXM_contrib2/asir2000/parse/lex.c,v 1.4 2000/08/21 08:31:47 noro Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/parse/lex.c,v 1.7 2000/12/01 04:34:01 noro Exp $ */ #include #include "ca.h" #include "al.h" #include "base.h" #include "parse.h" -#if !defined(THINK_C) #include #include -#endif #include "y.tab.h" extern IN asir_infile; @@ -397,6 +395,22 @@ yylex() } } else return ( c ); +} + +void purge_stdin() +{ +#if defined(__FreeBSD__) + fpurge(stdin); +#elif defined(linux) + stdin->_IO_read_end = stdin->_IO_read_base; + stdin->_IO_read_ptr = stdin->_IO_read_base; +#elif defined(sparc) || defined(__alpha) || defined(__SVR4) || defined(mips) + stdin->_ptr = stdin->_base; stdin->_cnt = 0; +#elif defined(VISUAL) + w_purge_stdin(); +#else +--->FIXIT +#endif } static int skipspace() {