summaryrefslogtreecommitdiff
path: root/src/nl.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-04-12 07:37:11 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-04-12 07:37:11 +0000
commit7e17831f0a03acc9a92dcc73ed525ab2e61e706f (patch)
treeafe5aa997246596869303358d119fe7a9d040f29 /src/nl.c
parent79b051c610335a6a5c450ab941e51457e70e9d79 (diff)
downloadcoreutils-7e17831f0a03acc9a92dcc73ed525ab2e61e706f.tar.xz
Clear the RE_NO_EMPTY_RANGES re syntax option, as this is a less intrusive
change from the old (Emacs) behavior, and POSIX allows us to treat [z-a] as an empty range.
Diffstat (limited to 'src/nl.c')
-rw-r--r--src/nl.c3
1 files changed, 2 insertions, 1 deletions
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);