summaryrefslogtreecommitdiff
path: root/usr.bin/lex
diff options
context:
space:
mode:
authorMarc Aurele La France <tsi@cvs.openbsd.org>2007-01-26 14:38:20 +0000
committerMarc Aurele La France <tsi@cvs.openbsd.org>2007-01-26 14:38:20 +0000
commit3b7376f73f4bf83023b8165f9dc4f2721bbf2998 (patch)
tree879b398036dfbefd67326b7d45649c957486a32e /usr.bin/lex
parent1a021ee8e2e3af50c1309ca1a10e7c21f6fecb21 (diff)
Fix flex bug introduced by my prior commit.
Problem reported by STeve Andre' via jakob@
Diffstat (limited to 'usr.bin/lex')
-rw-r--r--usr.bin/lex/flex.skl12
-rw-r--r--usr.bin/lex/initscan.c14
2 files changed, 13 insertions, 13 deletions
diff --git a/usr.bin/lex/flex.skl b/usr.bin/lex/flex.skl
index f337ae8dbb9..ec563eb0944 100644
--- a/usr.bin/lex/flex.skl
+++ b/usr.bin/lex/flex.skl
@@ -1,9 +1,9 @@
-/* $OpenBSD: flex.skl,v 1.9 2007/01/16 14:43:28 tsi Exp $ */
+/* $OpenBSD: flex.skl,v 1.10 2007/01/26 14:38:19 tsi Exp $ */
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
- * $Header: /cvs/OpenBSD/src/usr.bin/lex/flex.skl,v 1.9 2007/01/16 14:43:28 tsi Exp $
+ * $Header: /cvs/OpenBSD/src/usr.bin/lex/flex.skl,v 1.10 2007/01/26 14:38:19 tsi Exp $
*/
#define FLEX_SCANNER
@@ -339,7 +339,7 @@ static int input YY_PROTO(( void ));
%*
#endif
-#ifdef YY_STACK_USED
+#if defined(YY_STACK_USED) && YY_STACK_USED
static int yy_start_stack_ptr = 0;
static int yy_start_stack_depth = 0;
static int *yy_start_stack = 0;
@@ -1210,10 +1210,10 @@ void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream* file )
b->yy_fill_buffer = 1;
%-
-#ifdef YY_ALWAYS_INTERACTIVE
+#if defined(YY_ALWAYS_INTERACTIVE) && YY_ALWAYS_INTERACTIVE
b->yy_is_interactive = 1;
#else
-#ifdef YY_NEVER_INTERACTIVE
+#if defined(YY_NEVER_INTERACTIVE) && YY_NEVER_INTERACTIVE
b->yy_is_interactive = 0;
#else
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
@@ -1540,7 +1540,7 @@ void *ptr;
free( ptr );
}
-#ifdef YY_MAIN
+#if defined(YY_MAIN) && YY_MAIN
int main()
{
yylex();
diff --git a/usr.bin/lex/initscan.c b/usr.bin/lex/initscan.c
index 66ca6f2c75c..be7e68bdd22 100644
--- a/usr.bin/lex/initscan.c
+++ b/usr.bin/lex/initscan.c
@@ -1,10 +1,10 @@
-/* $OpenBSD: initscan.c,v 1.12 2007/01/16 14:43:28 tsi Exp $ */
+/* $OpenBSD: initscan.c,v 1.13 2007/01/26 14:38:19 tsi Exp $ */
#line 2 "scan.c"
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
- * $Header: /cvs/OpenBSD/src/usr.bin/lex/initscan.c,v 1.12 2007/01/16 14:43:28 tsi Exp $
+ * $Header: /cvs/OpenBSD/src/usr.bin/lex/initscan.c,v 1.13 2007/01/26 14:38:19 tsi Exp $
*/
#define FLEX_SCANNER
@@ -1277,7 +1277,7 @@ char *yytext;
* PURPOSE.
*/
-/* $Header: /cvs/OpenBSD/src/usr.bin/lex/initscan.c,v 1.12 2007/01/16 14:43:28 tsi Exp $ */
+/* $Header: /cvs/OpenBSD/src/usr.bin/lex/initscan.c,v 1.13 2007/01/26 14:38:19 tsi Exp $ */
#include "flexdef.h"
#include "parse.h"
@@ -1362,7 +1362,7 @@ static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
static int yy_flex_strlen YY_PROTO(( yyconst char * ));
#endif
-#ifndef YY_NO_INPUT
+#if defined(YY_NO_INPUT) && YY_NO_INPUT
#ifdef __cplusplus
static int yyinput YY_PROTO(( void ));
#else
@@ -3340,10 +3340,10 @@ FILE *file;
b->yy_input_file = file;
b->yy_fill_buffer = 1;
-#ifdef YY_ALWAYS_INTERACTIVE
+#if defined(YY_ALWAYS_INTERACTIVE) && YY_ALWAYS_INTERACTIVE
b->yy_is_interactive = 1;
#else
-#ifdef YY_NEVER_INTERACTIVE
+#if defined(YY_NEVER_INTERACTIVE) && YY_NEVER_INTERACTIVE
b->yy_is_interactive = 0;
#else
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
@@ -3634,7 +3634,7 @@ void *ptr;
free( ptr );
}
-#ifdef YY_MAIN
+#if defined(YY_MAIN) && YY_MAIN
int main()
{
yylex();