summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2022-02-22 20:32:05 +0200
committerArnold D. Robbins <arnold@skeeve.com>2022-02-22 20:32:05 +0200
commitd330a2bdc9d6892dc55ce8f5d299196f32ab1003 (patch)
treef5a95b6ab6d34679192183bad8fee26ddf2ca994 /re.c
parentf8f77e08c471d62bb462db5498f1980c564cdc78 (diff)
downloadgawk-d330a2bdc9d6892dc55ce8f5d299196f32ab1003.tar.gz
Enable interval expressions for --traditional. Update docs.
Diffstat (limited to 're.c')
-rw-r--r--re.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/re.c b/re.c
index fd134727..1e959373 100644
--- a/re.c
+++ b/re.c
@@ -478,10 +478,16 @@ resetup()
/*
* Interval expressions are now on by default, as POSIX is
- * wide-spread enough that people want it. The do_intervals
- * variable remains for use with --traditional.
+ * wide-spread enough that people want it.
+ *
+ * 2/2022: BWK awk has supported interval expressions since
+ * March 2019, with an important fix added in Januay 2020.
+ * So we add that support even for --traditional. It's easier to
+ * do it here than to try to get the GLIBC / GNULIB folks to change
+ * the definition of RE_SYNTAX_AWK, which likely would cause
+ * binary compatibility issues.
*/
- if (do_intervals)
+ if (do_traditional)
syn |= RE_INTERVALS | RE_INVALID_INTERVAL_ORD | RE_NO_BK_BRACES;
(void) re_set_syntax(syn);