musl/src/regex
Rich Felker d7a90b35b9 fix ugly bugs in TRE regex parser
1. * in BRE is not special at the beginning of the regex or a
subexpression. this broke ncurses' build scripts.

2. \\( in BRE is a literal \ followed by a literal (, not a literal \
followed by a subexpression opener.

3. the ^ in \\(^ in BRE is a literal ^ only at the beginning of the
entire BRE. POSIX allows treating it as an anchor at the beginning of
a subexpression, but TRE's code for checking if it was at the
beginning of a subexpression was wrong, and fixing it for the sake of
supporting a non-portable usage was too much trouble when just
removing this non-portable behavior was much easier.

this patch also moved lots of the ugly logic for empty atom checking
out of the default/literal case and into new cases for the relevant
characters. this should make parsing faster and make the code smaller.
if nothing else it's a lot more readable/logical.

at some point i'd like to revisit and overhaul lots of this code...
2012-05-07 14:50:49 -04:00
..
fnmatch.c new fnmatch implementation 2012-04-28 18:05:29 -04:00
glob.c make glob mark symlinks-to-directories with the GLOB_MARK flag 2012-01-23 19:51:34 -05:00
regcomp.c fix ugly bugs in TRE regex parser 2012-05-07 14:50:49 -04:00
regerror.c fix broken regerror (typo) and missing message 2012-04-13 18:40:38 -04:00
regexec.c fix signedness error handling invalid multibyte sequences in regexec 2012-04-14 22:32:42 -04:00
tre-mem.c upgrade to latest upstream TRE regex code (0.8.0) 2012-03-20 19:44:05 -04:00
tre.h upgrade to latest upstream TRE regex code (0.8.0) 2012-03-20 19:44:05 -04:00