regcomp.c: make non-_LIBC implementation of build_range_exp consistent
authorJim Meyering <meyering@redhat.com>
Fri, 19 Mar 2010 20:26:36 +0000 (21:26 +0100)
committerJim Meyering <meyering@redhat.com>
Sat, 20 Mar 2010 07:37:35 +0000 (08:37 +0100)
commit602e3e6b709592f883ebb7bf58df1f955ea4b8f2
tree4095869d849078168d4ae7d48053211c5c72873a
parentb187ff0528e2a081392a834e684d1d0c161708a7
regcomp.c: make non-_LIBC implementation of build_range_exp consistent

The _LIBC implementation of build_range_exp correctly honors the
RE_NO_EMPTY_RANGES flag when checking for reversed range endpoints.
However, the non-_LIBC implementation would ignore that syntax-bit
flag and return REG_ERANGE unconditionally.
This change makes it honor that flag.
* lib/regcomp.c (build_range_exp) [!_LIBC]: Add a parameter: "syntax".
Make two pointer parameters "const".
Use "syntax" bits in order to honor RE_NO_EMPTY_RANGES.
(parse_bracket_exp): Update caller.
ChangeLog
lib/regcomp.c