diff options
author | Vern Paxson <vern@ee.lbl.gov> | 1995-01-09 12:13:38 +0000 |
---|---|---|
committer | Vern Paxson <vern@ee.lbl.gov> | 1995-01-09 12:13:38 +0000 |
commit | c077dc1fb17745554ca5c6caf73f97f6991d6bdf (patch) | |
tree | cc8ac8155a6dd8921b45418f6321e51f80bda59b /flex.skl | |
parent | 862719e20ac84acb4e5d0455514744db36ba4db0 (diff) |
isatty() extern
Diffstat (limited to 'flex.skl')
-rw-r--r-- | flex.skl | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -1139,6 +1139,12 @@ void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b ) %- +#ifndef YY_ALWAYS_INTERACTIVE +#ifndef YY_NEVER_INTERACTIVE +extern int isatty YY_PROTO(( int )); +#endif +#endif + #ifdef YY_USE_PROTOS void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) #else @@ -1146,9 +1152,12 @@ void yy_init_buffer( b, file ) YY_BUFFER_STATE b; FILE *file; #endif + %+ +extern "C" int isatty YY_PROTO(( int )); void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, istream* file ) %* + { b->yy_input_file = file; b->yy_n_chars = 0; @@ -1169,7 +1178,7 @@ void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, istream* file ) #if YY_NEVER_INTERACTIVE b->yy_is_interactive = 0; #else - b->yy_is_interactive = file ? isatty( fileno(file) ) : 0; + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; #endif #endif %+ |