summaryrefslogtreecommitdiff
path: root/cpp/demo/book/lifecycle/Scanner.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2009-02-12 15:41:33 -0330
committerDwayne Boone <dwayne@zeroc.com>2009-02-12 15:41:33 -0330
commit3e5de32f7619fee9b643f53f26af65e5071586dc (patch)
treea8f91cca2d75d18dc66096a3740d47b1dc0821c6 /cpp/demo/book/lifecycle/Scanner.cpp
parentFixed 3728 - Freeze::MapDb::~MapDb can throw (diff)
downloadice-3e5de32f7619fee9b643f53f26af65e5071586dc.tar.bz2
ice-3e5de32f7619fee9b643f53f26af65e5071586dc.tar.xz
ice-3e5de32f7619fee9b643f53f26af65e5071586dc.zip
Fixed project names to work with VS2008 as well
Diffstat (limited to 'cpp/demo/book/lifecycle/Scanner.cpp')
-rwxr-xr-x[-rw-r--r--]cpp/demo/book/lifecycle/Scanner.cpp46
1 files changed, 34 insertions, 12 deletions
diff --git a/cpp/demo/book/lifecycle/Scanner.cpp b/cpp/demo/book/lifecycle/Scanner.cpp
index 6cc5ce4d919..ca387ed1b56 100644..100755
--- a/cpp/demo/book/lifecycle/Scanner.cpp
+++ b/cpp/demo/book/lifecycle/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
@@ -427,7 +430,7 @@ using namespace std;
#define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize)
#define YY_ALWAYS_INTERACTIVE 1
-#line 430 "lex.yy.c"
+#line 433 "lex.yy.c"
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -527,9 +530,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();" -
@@ -575,13 +589,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 584 "lex.yy.c"
+#line 598 "lex.yy.c"
if ( yy_init )
{
@@ -940,7 +954,7 @@ YY_RULE_SETUP
#line 254 "Scanner.l"
ECHO;
YY_BREAK
-#line 943 "lex.yy.c"
+#line 957 "lex.yy.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1322,7 +1336,6 @@ register char *yy_bp;
#endif /* ifndef YY_NO_UNPUT */
-#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput()
#else
@@ -1394,7 +1407,7 @@ static int input()
return c;
}
-#endif /* YY_NO_INPUT */
+
#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
@@ -1505,6 +1518,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 )