diff options
Diffstat (limited to 'cpp/demo/Freeze/phonebook/Scanner.cpp')
-rwxr-xr-x[-rw-r--r--] | cpp/demo/Freeze/phonebook/Scanner.cpp | 46 |
1 files changed, 34 insertions, 12 deletions
diff --git a/cpp/demo/Freeze/phonebook/Scanner.cpp b/cpp/demo/Freeze/phonebook/Scanner.cpp index b66053b29ae..98a62c610e1 100644..100755 --- a/cpp/demo/Freeze/phonebook/Scanner.cpp +++ b/cpp/demo/Freeze/phonebook/Scanner.cpp @@ -1,4 +1,4 @@ -#include <IceUtil/Config.h> +#include "IceUtil/Config.h"
/* A lexical scanner generated by flex */ /* Scanner skeleton version: @@ -10,8 +10,7 @@ #define YY_FLEX_MINOR_VERSION 5 #include <stdio.h> -#include <unistd.h> - +#include <errno.h> /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ #ifdef c_plusplus @@ -24,6 +23,9 @@ #ifdef __cplusplus #include <stdlib.h> +#ifndef _WIN32 +#include <unistd.h> +#endif /* Use prototypes in function declarations. */ #define YY_USE_PROTOS @@ -63,6 +65,7 @@ #define YY_PROTO(proto) () #endif + /* Returned upon end-of-file. */ #define YY_NULL 0 @@ -439,7 +442,7 @@ using namespace std; #define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize) #define YY_ALWAYS_INTERACTIVE 1 -#line 442 "lex.yy.c" +#line 445 "lex.yy.c" /* Macros after this point can all be overridden by user definitions in * section 1. @@ -539,9 +542,20 @@ YY_MALLOC_DECL YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ - else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ - && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); + else \ + { \ + errno=0; \ + while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + } #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - @@ -587,13 +601,13 @@ YY_MALLOC_DECL YY_DECL { register yy_state_type yy_current_state; - register char *yy_cp = NULL, *yy_bp = NULL; + register char *yy_cp, *yy_bp; register int yy_act; #line 35 "Scanner.l" -#line 596 "lex.yy.c" +#line 610 "lex.yy.c" if ( yy_init ) { @@ -959,7 +973,7 @@ YY_RULE_SETUP #line 258 "Scanner.l" ECHO; YY_BREAK -#line 962 "lex.yy.c" +#line 976 "lex.yy.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1341,7 +1355,6 @@ register char *yy_bp; #endif /* ifndef YY_NO_UNPUT */ -#ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput() #else @@ -1413,7 +1426,7 @@ static int input() return c; } -#endif /* YY_NO_INPUT */ + #ifdef YY_USE_PROTOS void yyrestart( FILE *input_file ) @@ -1524,6 +1537,15 @@ YY_BUFFER_STATE b; } +#ifndef _WIN32 +#include <unistd.h> +#else +#ifndef YY_ALWAYS_INTERACTIVE +#ifndef YY_NEVER_INTERACTIVE +extern int isatty YY_PROTO(( int )); +#endif +#endif +#endif #ifdef YY_USE_PROTOS void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) |