use fread(), not read(), pending Vern Paxson's decision of what
to do in the next version of flex. bug reported by klier@cs.tu-berlin.de.
This commit is contained in:
parent
ce351a47d2
commit
57d09332b9
@ -1,7 +1,7 @@
|
||||
/* A lexical scanner generated by flex */
|
||||
|
||||
/* scanner skeleton version:
|
||||
* $Header: /cvsroot/src/gnu/usr.bin/lex/Attic/lex.skel,v 1.2 1993/05/04 07:45:02 cgd Exp $
|
||||
* $Header: /cvsroot/src/gnu/usr.bin/lex/Attic/lex.skel,v 1.3 1993/11/19 05:11:46 cgd Exp $
|
||||
*/
|
||||
|
||||
#define FLEX_SCANNER
|
||||
@ -67,7 +67,6 @@ void free( void* );
|
||||
*/
|
||||
char *malloc();
|
||||
int free();
|
||||
int read();
|
||||
#endif
|
||||
|
||||
|
||||
@ -91,8 +90,9 @@ int read();
|
||||
* is returned in "result".
|
||||
*/
|
||||
#define YY_INPUT(buf,result,max_size) \
|
||||
if ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \
|
||||
YY_FATAL_ERROR( "read() in flex scanner failed" );
|
||||
if ( ((result = fread( (char *) buf, 1, max_size, yyin )) == 0 ) && \
|
||||
ferror(yyin) ) \
|
||||
YY_FATAL_ERROR( "fread() in flex scanner failed" );
|
||||
#define YY_NULL 0
|
||||
|
||||
/* no semi-colon after return; correct usage is to write "yyterminate();" -
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* A lexical scanner generated by flex */
|
||||
|
||||
/* scanner skeleton version:
|
||||
* $Header: /cvsroot/src/usr.bin/lex/Attic/lex.skel,v 1.2 1993/05/04 07:45:02 cgd Exp $
|
||||
* $Header: /cvsroot/src/usr.bin/lex/Attic/lex.skel,v 1.3 1993/11/19 05:11:46 cgd Exp $
|
||||
*/
|
||||
|
||||
#define FLEX_SCANNER
|
||||
@ -67,7 +67,6 @@ void free( void* );
|
||||
*/
|
||||
char *malloc();
|
||||
int free();
|
||||
int read();
|
||||
#endif
|
||||
|
||||
|
||||
@ -91,8 +90,9 @@ int read();
|
||||
* is returned in "result".
|
||||
*/
|
||||
#define YY_INPUT(buf,result,max_size) \
|
||||
if ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \
|
||||
YY_FATAL_ERROR( "read() in flex scanner failed" );
|
||||
if ( ((result = fread( (char *) buf, 1, max_size, yyin )) == 0 ) && \
|
||||
ferror(yyin) ) \
|
||||
YY_FATAL_ERROR( "fread() in flex scanner failed" );
|
||||
#define YY_NULL 0
|
||||
|
||||
/* no semi-colon after return; correct usage is to write "yyterminate();" -
|
||||
|
Loading…
x
Reference in New Issue
Block a user