From c06a6956a40a878fdbe319e4688196e7c990bf7a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 18 Nov 2004 23:57:34 +0000 Subject: [BZ #544] Update. 2004-11-18 Jakub Jelinek [BZ #544] * posix/regex.h (RE_NO_SUB): New define. * posix/regex_internal.h (OP_DELETED_SUBEXP): New. (re_dfa_t): Add subexp_map. * posix/regcomp.c (struct subexp_optimize): New type. (optimize_subexps): New routine. (re_compile_internal): Call it. (re_compile_pattern): Set preg->no_sub to 1 if RE_NO_SUB. (free_dfa_content): Free subexp_map. (calc_inveclosure, calc_eclosure): Skip OP_DELETED_SUBEXP nodes. * posix/regexec.c (re_search_internal): If subexp_map is not NULL, duplicate registers as needed. * posix/Makefile: Add rules to build and run tst-regex2. * posix/tst-regex2.c: New test. * posix/rxspencer/tests: Fix last two tests (\0 -> \1). Add some new tests for nested subexpressions. --- posix/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'posix/Makefile') diff --git a/posix/Makefile b/posix/Makefile index 744f49f5b3..c89cfc0b41 100644 --- a/posix/Makefile +++ b/posix/Makefile @@ -80,7 +80,7 @@ tests := tstgetopt testfnm runtests runptests \ bug-regex13 bug-regex14 bug-regex15 bug-regex16 \ bug-regex17 bug-regex18 bug-regex19 bug-regex20 \ bug-regex21 bug-regex22 bug-regex23 bug-regex24 \ - tst-nice tst-nanosleep \ + tst-nice tst-nanosleep tst-regex2 \ transbug tst-rxspencer tst-pcre tst-boost \ bug-ga1 tst-vfork1 tst-vfork2 tst-waitid \ tst-getaddrinfo2 bug-glob1 bug-glob2 @@ -160,6 +160,7 @@ tst-fnmatch-ENV = LOCPATH=$(common-objpfx)localedata tst-regexloc-ENV = LOCPATH=$(common-objpfx)localedata bug-regex1-ENV = LOCPATH=$(common-objpfx)localedata tst-regex-ENV = LOCPATH=$(common-objpfx)localedata +tst-regex2-ENV = LOCPATH=$(common-objpfx)localedata bug-regex5-ENV = LOCPATH=$(common-objpfx)localedata bug-regex6-ENV = LOCPATH=$(common-objpfx)localedata bug-regex17-ENV = LOCPATH=$(common-objpfx)localedata @@ -244,8 +245,10 @@ $(objpfx)tst-getconf.out: tst-getconf.sh $(objpfx)getconf ifeq (yes,$(build-shared)) $(objpfx)tst-regex: $(common-objpfx)rt/librt.so +$(objpfx)tst-regex2: $(common-objpfx)rt/librt.so else $(objpfx)tst-regex: $(common-objpfx)rt/librt.a +$(objpfx)tst-regex2: $(common-objpfx)rt/librt.a endif $(objpfx)bug-ga2-mem: $(objpfx)bug-ga2.out -- cgit 1.4.1