From 111dbf8aa2ca776f325a36d40a0133fb1b16227f Mon Sep 17 00:00:00 2001 From: John Millaway Date: Fri, 12 Jul 2002 16:21:55 +0000 Subject: [PATCH] Fixed POSIXLY_CORRECT detection in scanner. --- main.c | 2 +- scan.l | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index c0d2142..7717637 100644 --- a/main.c +++ b/main.c @@ -1427,12 +1427,12 @@ void readin() * posiz, AND check for conflicting options. How far should we go * with this? Should we disable all the neat-o flex features? */ + /* Update: Estes says no, since other flex features don't violate posix. */ } if ( getenv("POSIXLY_CORRECT") ) { posix_compat = true; - /* TODO: See TODO comment above */ } if ( backing_up_report ) diff --git a/scan.l b/scan.l index df8a919..17146c1 100644 --- a/scan.l +++ b/scan.l @@ -66,6 +66,11 @@ #define CHECK_YYMORE(str) \ if ( all_lower( str ) ) \ yymore_used = true; + +#define YY_USER_INIT \ + if ( getenv("POSIXLY_CORRECT") ) \ + posix_compat = true; + %} %option caseless nodefault stack noyy_top_state -- 2.40.0