summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/csplit.c3
-rw-r--r--src/expr.c3
-rw-r--r--src/nl.c3
3 files changed, 6 insertions, 3 deletions
diff --git a/src/csplit.c b/src/csplit.c
index 4544a3ed1..3fdc3f061 100644
--- a/src/csplit.c
+++ b/src/csplit.c
@@ -1121,7 +1121,8 @@ extract_regexp (int argnum, bool ignore, char const *str)
p->re_compiled.allocated = 0;
p->re_compiled.fastmap = p->fastmap;
p->re_compiled.translate = NULL;
- re_syntax_options = RE_SYNTAX_POSIX_BASIC & ~RE_CONTEXT_INVALID_DUP;
+ re_syntax_options =
+ RE_SYNTAX_POSIX_BASIC & ~RE_CONTEXT_INVALID_DUP & ~RE_NO_EMPTY_RANGES;
err = re_compile_pattern (str + 1, len, &p->re_compiled);
if (err)
{
diff --git a/src/expr.c b/src/expr.c
index 0e2549f00..c5b1ae87b 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -424,7 +424,8 @@ docolon (VALUE *sv, VALUE *pv)
re_buffer.allocated = 0;
re_buffer.fastmap = fastmap;
re_buffer.translate = NULL;
- re_syntax_options = RE_SYNTAX_POSIX_BASIC & ~RE_CONTEXT_INVALID_DUP;
+ re_syntax_options =
+ RE_SYNTAX_POSIX_BASIC & ~RE_CONTEXT_INVALID_DUP & ~RE_NO_EMPTY_RANGES;
errmsg = re_compile_pattern (pv->u.s, strlen (pv->u.s), &re_buffer);
if (errmsg)
error (EXPR_INVALID, 0, "%s", errmsg);
diff --git a/src/nl.c b/src/nl.c
index 7aad2e8f2..7ee57b77d 100644
--- a/src/nl.c
+++ b/src/nl.c
@@ -253,7 +253,8 @@ build_type_arg (char **typep, struct re_pattern_buffer *regexp, char *fastmap)
regexp->allocated = 0;
regexp->fastmap = fastmap;
regexp->translate = NULL;
- re_syntax_options = RE_SYNTAX_POSIX_BASIC & ~RE_CONTEXT_INVALID_DUP;
+ re_syntax_options =
+ RE_SYNTAX_POSIX_BASIC & ~RE_CONTEXT_INVALID_DUP & ~RE_NO_EMPTY_RANGES;
errmsg = re_compile_pattern (optarg, strlen (optarg), regexp);
if (errmsg)
error (EXIT_FAILURE, 0, "%s", errmsg);