summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornigel <nigel@2f5784b3-3f2a-0410-8824-cb99058d5e15>2007-02-24 21:40:52 +0000
committernigel <nigel@2f5784b3-3f2a-0410-8824-cb99058d5e15>2007-02-24 21:40:52 +0000
commit477806cfbeb607865593eb63f0216d854a2bbf6f (patch)
treee814dc28df610463270b8e01f5da095660452f72
parent97cb05691b9cabed35f1a853c74d48c692aaabcf (diff)
downloadpcre-477806cfbeb607865593eb63f0216d854a2bbf6f.tar.gz
Load pcre-6.1 into code/trunk.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@79 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r--ChangeLog34
-rw-r--r--Makefile.in50
-rw-r--r--NON-UNIX-USE54
-rwxr-xr-xconfigure228
-rw-r--r--configure.in19
-rw-r--r--doc/html/pcreapi.html2
-rw-r--r--doc/html/pcreprecompile.html2
-rw-r--r--doc/pcre.txt57
-rw-r--r--doc/pcre_compile.32
-rw-r--r--doc/pcre_compile2.32
-rw-r--r--doc/pcre_config.32
-rw-r--r--doc/pcre_copy_named_substring.32
-rw-r--r--doc/pcre_copy_substring.32
-rw-r--r--doc/pcre_dfa_exec.32
-rw-r--r--doc/pcre_exec.32
-rw-r--r--doc/pcre_free_substring.32
-rw-r--r--doc/pcre_free_substring_list.32
-rw-r--r--doc/pcre_fullinfo.32
-rw-r--r--doc/pcre_get_named_substring.32
-rw-r--r--doc/pcre_get_stringnumber.32
-rw-r--r--doc/pcre_get_substring.32
-rw-r--r--doc/pcre_get_substring_list.32
-rw-r--r--doc/pcre_info.32
-rw-r--r--doc/pcre_maketables.32
-rw-r--r--doc/pcre_refcount.32
-rw-r--r--doc/pcre_study.32
-rw-r--r--doc/pcre_version.32
-rw-r--r--doc/pcreapi.34
-rw-r--r--doc/pcrebuild.32
-rw-r--r--doc/pcrecallout.32
-rw-r--r--doc/pcrecompat.32
-rw-r--r--doc/pcrecpp.32
-rw-r--r--doc/pcregrep.txt2
-rw-r--r--doc/pcrematching.32
-rw-r--r--doc/pcrepartial.32
-rw-r--r--doc/pcrepattern.32
-rw-r--r--doc/pcreperform.32
-rw-r--r--doc/pcreposix.32
-rw-r--r--doc/pcreprecompile.34
-rw-r--r--doc/pcresample.32
-rw-r--r--doc/pcretest.txt2
-rw-r--r--pcre_compile.c9
-rw-r--r--pcretest.c34
-rw-r--r--testdata/grepoutput2
-rw-r--r--testdata/testinput25
-rw-r--r--testdata/testoutput12
-rw-r--r--testdata/testoutput214
-rw-r--r--testdata/testoutput32
-rw-r--r--testdata/testoutput42
-rw-r--r--testdata/testoutput52
-rw-r--r--testdata/testoutput62
-rw-r--r--testdata/testoutput72
-rw-r--r--testdata/testoutput82
-rw-r--r--testdata/testoutput92
54 files changed, 454 insertions, 142 deletions
diff --git a/ChangeLog b/ChangeLog
index 5dc20f9..0513429 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,40 @@
ChangeLog for PCRE
------------------
+Version 6.1 21-Jun-05
+---------------------
+
+ 1. There was one reference to the variable "posix" in pcretest.c that was not
+ surrounded by "#if !defined NOPOSIX".
+
+ 2. Make it possible to compile pcretest without DFA support, UTF8 support, or
+ the cross-check on the old pcre_info() function, for the benefit of the
+ cut-down version of PCRE that is currently imported into Exim.
+
+ 3. A (silly) pattern starting with (?i)(?-i) caused an internal space
+ allocation error. I've done the easy fix, which wastes 2 bytes for sensible
+ patterns that start (?i) but I don't think that matters. The use of (?i) is
+ just an example; this all applies to the other options as well.
+
+ 4. Since libtool seems to echo the compile commands it is issuing, the output
+ from "make" can be reduced a bit by putting "@" in front of each libtool
+ compile command.
+
+ 5. Patch from the folks at Google for configure.in to be a bit more thorough
+ in checking for a suitable C++ installation before trying to compile the
+ C++ stuff. This should fix a reported problem when a compiler was present,
+ but no suitable headers.
+
+ 6. The man pages all had just "PCRE" as their title. I have changed them to
+ be the relevant file name. I have also arranged that these names are
+ retained in the file doc/pcre.txt, which is a concatenation in text format
+ of all the man pages except the little individual ones for each function.
+
+ 7. The NON-UNIX-USE file had not been updated for the different set of source
+ files that come with release 6. I also added a few comments about the C++
+ wrapper.
+
+
Version 6.0 07-Jun-05
---------------------
diff --git a/Makefile.in b/Makefile.in
index 5af2cd2..74121ea 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -171,7 +171,7 @@ CPP_TARGETS = libpcrecpp.la \
pcre_scanner_unittest@EXEEXT@ \
pcre_stringpiece_unittest@EXEEXT@
-all: libpcre.la @POSIX_LIB@ @MAYBE_CPP_TARGETS@ pcretest@EXEEXT@ pcregrep@EXEEXT@ @ON_WINDOWS@ winshared
+all: libpcre.la @POSIX_LIB@ pcretest@EXEEXT@ pcregrep@EXEEXT@ @MAYBE_CPP_TARGETS@ @ON_WINDOWS@ winshared
pcregrep@EXEEXT@: libpcre.la pcregrep.@OBJEXT@ @ON_WINDOWS@ winshared
$(LINK) -o pcregrep@EXEEXT@ pcregrep.@OBJEXT@ libpcre.la
@@ -211,120 +211,120 @@ libpcrecpp.la: libpcre.la $(CPPOBJ)
# directory, not the source directory.
pcre_chartables.@OBJEXT@: pcre_chartables.c
- $(LTCOMPILE) $(top_srcdir)/pcre_chartables.c
+ @$(LTCOMPILE) $(top_srcdir)/pcre_chartables.c
pcre_compile.@OBJEXT@: Makefile config.h pcre.h \
$(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_compile.c
- $(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
+ @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
$(top_srcdir)/pcre_compile.c
pcre_config.@OBJEXT@: Makefile config.h pcre.h \
$(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_config.c
- $(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
+ @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
$(top_srcdir)/pcre_config.c
pcre_dfa_exec.@OBJEXT@: Makefile config.h pcre.h \
$(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_dfa_exec.c
- $(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
+ @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
$(top_srcdir)/pcre_dfa_exec.c
pcre_exec.@OBJEXT@: Makefile config.h pcre.h \
$(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_exec.c
- $(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
+ @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
$(top_srcdir)/pcre_exec.c
pcre_fullinfo.@OBJEXT@: Makefile config.h pcre.h \
$(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_fullinfo.c
- $(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
+ @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
$(top_srcdir)/pcre_fullinfo.c
pcre_get.@OBJEXT@: Makefile config.h pcre.h \
$(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_get.c
- $(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
+ @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
$(top_srcdir)/pcre_get.c
pcre_globals.@OBJEXT@: Makefile config.h pcre.h \
$(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_globals.c
- $(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
+ @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
$(top_srcdir)/pcre_globals.c
pcre_info.@OBJEXT@: Makefile config.h pcre.h \
$(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_info.c
- $(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
+ @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
$(top_srcdir)/pcre_info.c
pcre_maketables.@OBJEXT@: Makefile config.h pcre.h \
$(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_maketables.c
- $(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
+ @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
$(top_srcdir)/pcre_maketables.c
pcre_ord2utf8.@OBJEXT@: Makefile config.h pcre.h \
$(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_ord2utf8.c
- $(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
+ @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
$(top_srcdir)/pcre_ord2utf8.c
pcre_printint.@OBJEXT@: Makefile config.h pcre.h \
$(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_printint.c
- $(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
+ @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
$(top_srcdir)/pcre_printint.c
pcre_refcount.@OBJEXT@: Makefile config.h pcre.h \
$(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_refcount.c
- $(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
+ @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
$(top_srcdir)/pcre_refcount.c
pcre_study.@OBJEXT@: Makefile config.h pcre.h \
$(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_study.c
- $(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
+ @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
$(top_srcdir)/pcre_study.c
pcre_tables.@OBJEXT@: Makefile config.h pcre.h \
$(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_tables.c
- $(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
+ @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
$(top_srcdir)/pcre_tables.c
pcre_try_flipped.@OBJEXT@: Makefile config.h pcre.h \
$(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_try_flipped.c
- $(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
+ @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
$(top_srcdir)/pcre_try_flipped.c
pcre_ucp_findchar.@OBJEXT@: Makefile config.h pcre.h \
$(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_ucp_findchar.c
- $(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
+ @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
$(top_srcdir)/pcre_ucp_findchar.c
pcre_valid_utf8.@OBJEXT@: Makefile config.h pcre.h \
$(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_valid_utf8.c
- $(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
+ @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
$(top_srcdir)/pcre_valid_utf8.c
pcre_version.@OBJEXT@: Makefile config.h pcre.h \
$(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_version.c
- $(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
+ @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
$(top_srcdir)/pcre_version.c
pcre_xclass.@OBJEXT@: Makefile config.h pcre.h \
$(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_xclass.c
- $(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
+ @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
$(top_srcdir)/pcre_xclass.c
pcreposix.@OBJEXT@: $(top_srcdir)/pcreposix.c $(top_srcdir)/pcreposix.h \
$(top_srcdir)/pcre_internal.h pcre.h config.h Makefile
- $(LTCOMPILE) $(POSIX_MALLOC_THRESHOLD) $(top_srcdir)/pcreposix.c
+ @$(LTCOMPILE) $(POSIX_MALLOC_THRESHOLD) $(top_srcdir)/pcreposix.c
pcrecpp.@OBJEXT@: $(top_srcdir)/pcrecpp.cc pcrecpp.h \
pcre_stringpiece.h pcre.h config.h Makefile
- $(LTCXXCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
+ @$(LTCXXCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
$(top_srcdir)/pcrecpp.cc
pcre_scanner.@OBJEXT@: $(top_srcdir)/pcre_scanner.cc $(top_srcdir)/pcre_scanner.h \
pcrecpp.h pcre_stringpiece.h pcre.h config.h Makefile
- $(LTCXXCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
+ @$(LTCXXCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
$(top_srcdir)/pcre_scanner.cc
pcre_stringpiece.@OBJEXT@: $(top_srcdir)/pcre_stringpiece.cc pcre_stringpiece.h \
config.h Makefile
- $(LTCXXCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
+ @$(LTCXXCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \
$(top_srcdir)/pcre_stringpiece.cc
pcretest.@OBJEXT@: $(top_srcdir)/pcretest.c $(top_srcdir)/pcre_internal.h \
diff --git a/NON-UNIX-USE b/NON-UNIX-USE
index 6612ab2..b7fe430 100644
--- a/NON-UNIX-USE
+++ b/NON-UNIX-USE
@@ -15,7 +15,7 @@ PCRE consists entirely of code written in Standard C, and so should compile
successfully on any system that has a Standard C compiler and library.
-GENERIC INSTRUCTIONS
+GENERIC INSTRUCTIONS FOR THE C LIBRARY
The following are generic comments about building PCRE. The interspersed
indented commands are suggestions from Mark Tetrode as to which commands you
@@ -54,12 +54,35 @@ character tables and writes them to that file.
cl -DSUPPORT_UTF8 -DSUPPORT_UCP dftables.c
dftables.exe chartables.c
-(4) Compile maketables.c, get.c, study.c and pcre.c and link them all
-together into an object library in whichever form your system keeps such
-libraries. This is the pcre library (chartables.c is included by means of an
-#include directive). If your system has static and shared libraries, you may
-have to do this once for each type.
-
+(4) Compile the following source files:
+
+ pcre_chartables.c
+ pcre_compile.c
+ pcre_config.c
+ pcre_dfa_exec.c
+ pcre_exec.c
+ pcre_fullinfo.c
+ pcre_get.c
+ pcre_globals.c
+ pcre_info.c
+ pcre_maketables.c
+ pcre_ord2utf8.c
+ pcre_printint.c
+ pcre_refcount.c
+ pcre_study.c
+ pcre_tables.c
+ pcre_try_flipped.c
+ pcre_ucp_findchar.c
+ pcre_valid_utf8.c
+ pcre_version.c
+ pcre_xclass.c
+
+and link them all together into an object library in whichever form your system
+keeps such libraries. This is the pcre C library. If your system has static and
+shared libraries, you may have to do this once for each type.
+
+ rem These comments are out-of-date, referring to a previous release which
+ rem had fewer source files. Replace with the file names from above.
rem Mark Tetrode's commands, for a static library
rem Compile & lib
cl -DSUPPORT_UTF8 -DSUPPORT_UCP -DPOSIX_MALLOC_THRESHOLD=10 /c maketables.c get.c study.c pcre.c
@@ -100,6 +123,19 @@ to change this if your system uses a different convention.
pcretest testdata\testinput6 testdata\myoutput6
windiff testdata\testoutput6 testdata\myoutput6
+Note that there are now three more tests (7, 8, 9) that did not exist when Mark
+wrote those comments. The test the new pcre_dfa_exec() function.
+
+
+THE C++ WRAPPER FUNCTIONS
+
+The PCRE distribution now contains some C++ wrapper functions and tests,
+contributed by Google Inc. On a system that can use "configure" and "make",
+the functions are automatically built into a library called pcrecpp. It should
+be straightforward to compile the .cc files manually on other systems. The
+files called xxx_unittest.cc are test programs for each of the corresponding
+xxx.cc files.
+
FURTHER REMARKS
@@ -176,7 +212,9 @@ void (*pcre_free)(void *) = free;
BUILDING PCRE ON OPENVMS
-Dan Mooney sent the following comments about building PCRE on OpenVMS:
+Dan Mooney sent the following comments about building PCRE on OpenVMS. They
+relate to an older version of PCRE that used fewer source files, so the exact
+commands will need changing. See the current list of source files above.
"It was quite easy to compile and link the library. I don't have a formal
make file but the attached file [reproduced below] contains the OpenVMS DCL
diff --git a/configure b/configure
index 2ecd565..c23f6ff 100755
--- a/configure
+++ b/configure
@@ -463,7 +463,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX MAYBE_CPP_TARGETS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP DLLTOOL ac_ct_DLLTOOL AS ac_ct_AS OBJDUMP ac_ct_OBJDUMP CPP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL pcre_has_bits_type_traits pcre_has_type_traits pcre_has_long_long pcre_has_ulong_long BUILD_EXEEXT BUILD_OBJEXT CC_FOR_BUILD CXX_FOR_BUILD CFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD EBCDIC HAVE_MEMMOVE HAVE_STRERROR LINK_SIZE MATCH_LIMIT NEWLINE NO_RECURSE PCRE_MAJOR PCRE_MINOR PCRE_DATE PCRE_VERSION PCRE_LIB_VERSION PCRE_POSIXLIB_VERSION PCRE_CPPLIB_VERSION POSIX_MALLOC_THRESHOLD UCP UTF8 WIN_PREFIX ON_WINDOWS NOT_ON_WINDOWS POSIX_OBJ POSIX_LOBJ POSIX_LIB LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP DLLTOOL ac_ct_DLLTOOL AS ac_ct_AS OBJDUMP ac_ct_OBJDUMP CPP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL pcre_has_bits_type_traits pcre_has_type_traits MAYBE_CPP_TARGETS pcre_has_long_long pcre_has_ulong_long BUILD_EXEEXT BUILD_OBJEXT CC_FOR_BUILD CXX_FOR_BUILD CFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD EBCDIC HAVE_MEMMOVE HAVE_STRERROR LINK_SIZE MATCH_LIMIT NEWLINE NO_RECURSE PCRE_MAJOR PCRE_MINOR PCRE_DATE PCRE_VERSION PCRE_LIB_VERSION PCRE_POSIXLIB_VERSION PCRE_CPPLIB_VERSION POSIX_MALLOC_THRESHOLD UCP UTF8 WIN_PREFIX ON_WINDOWS NOT_ON_WINDOWS POSIX_OBJ POSIX_LOBJ POSIX_LIB LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -1505,8 +1505,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
PCRE_MAJOR=6
-PCRE_MINOR=0
-PCRE_DATE=07-Jun-2005
+PCRE_MINOR=1
+PCRE_DATE=21-Jun-2005
PCRE_VERSION=${PCRE_MAJOR}.${PCRE_MINOR}
@@ -2806,12 +2806,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_cv_prog_ac_ct_CXX"; then
- MAYBE_CPP_TARGETS='$(CPP_TARGETS)'
-fi
-echo "Maybe-cpp-targets: '$ac_cv_prog_CXX' '$MAYBE_CPP_TARGETS'" #!!
-
-
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
@@ -3534,7 +3528,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 3537 "configure"' > conftest.$ac_ext
+ echo '#line 3531 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -4884,7 +4878,7 @@ fi
# Provide some information about the compiler.
-echo "$as_me:4887:" \
+echo "$as_me:4881:" \
"checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@@ -5938,11 +5932,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:5941: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:5935: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:5945: \$? = $ac_status" >&5
+ echo "$as_me:5939: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -6181,11 +6175,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6184: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6178: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6188: \$? = $ac_status" >&5
+ echo "$as_me:6182: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -6241,11 +6235,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6244: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6238: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:6248: \$? = $ac_status" >&5
+ echo "$as_me:6242: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -8426,7 +8420,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 8429 "configure"
+#line 8423 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -8524,7 +8518,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 8527 "configure"
+#line 8521 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -10717,11 +10711,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10720: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:10714: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:10724: \$? = $ac_status" >&5
+ echo "$as_me:10718: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -10777,11 +10771,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10780: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:10774: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:10784: \$? = $ac_status" >&5
+ echo "$as_me:10778: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -12138,7 +12132,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 12141 "configure"
+#line 12135 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12236,7 +12230,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 12239 "configure"
+#line 12233 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -13073,11 +13067,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13076: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13070: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13080: \$? = $ac_status" >&5
+ echo "$as_me:13074: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -13133,11 +13127,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13136: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13130: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13140: \$? = $ac_status" >&5
+ echo "$as_me:13134: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -15172,11 +15166,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15175: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15169: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15179: \$? = $ac_status" >&5
+ echo "$as_me:15173: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -15415,11 +15409,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15418: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15412: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15422: \$? = $ac_status" >&5
+ echo "$as_me:15416: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -15475,11 +15469,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15478: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15472: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:15482: \$? = $ac_status" >&5
+ echo "$as_me:15476: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -17660,7 +17654,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 17663 "configure"
+#line 17657 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -17758,7 +17752,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 17761 "configure"
+#line 17755 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -19111,6 +19105,158 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+for ac_header in string
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_cxx_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ pcre_has_cpp_headers="1"
+else
+ pcre_has_cpp_headers="0"
+fi
+
+done
+
+
for ac_header in bits/type_traits.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -19423,6 +19569,12 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_cv_prog_ac_ct_CXX" -a "$pcre_has_cpp_headers" = 1; then
+ MAYBE_CPP_TARGETS='$(CPP_TARGETS)'
+fi
+
+
+
echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
@@ -20630,7 +20782,6 @@ s,@OBJEXT@,$OBJEXT,;t t
s,@CXX@,$CXX,;t t
s,@CXXFLAGS@,$CXXFLAGS,;t t
s,@ac_ct_CXX@,$ac_ct_CXX,;t t
-s,@MAYBE_CPP_TARGETS@,$MAYBE_CPP_TARGETS,;t t
s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
s,@INSTALL_DATA@,$INSTALL_DATA,;t t
@@ -20665,6 +20816,7 @@ s,@ac_ct_F77@,$ac_ct_F77,;t t
s,@LIBTOOL@,$LIBTOOL,;t t
s,@pcre_has_bits_type_traits@,$pcre_has_bits_type_traits,;t t
s,@pcre_has_type_traits@,$pcre_has_type_traits,;t t
+s,@MAYBE_CPP_TARGETS@,$MAYBE_CPP_TARGETS,;t t
s,@pcre_has_long_long@,$pcre_has_long_long,;t t
s,@pcre_has_ulong_long@,$pcre_has_ulong_long,;t t
s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
diff --git a/configure.in b/configure.in
index 0bbee9a..4f8c6ee 100644
--- a/configure.in
+++ b/configure.in
@@ -21,8 +21,8 @@ dnl digits for minor numbers less than 10. There are unlikely to be
dnl that many releases anyway.
PCRE_MAJOR=6
-PCRE_MINOR=0
-PCRE_DATE=07-Jun-2005
+PCRE_MINOR=1
+PCRE_DATE=21-Jun-2005
PCRE_VERSION=${PCRE_MAJOR}.${PCRE_MINOR}
dnl Default values for miscellaneous macros
@@ -44,12 +44,6 @@ dnl For the C++ wrapper libpcrecpp.
AC_PROG_CXX
-if test -n "$ac_cv_prog_ac_ct_CXX"; then
- MAYBE_CPP_TARGETS='$(CPP_TARGETS)'
-fi
-echo "Maybe-cpp-targets: '$ac_cv_prog_CXX' '$MAYBE_CPP_TARGETS'" #!!
-AC_SUBST(MAYBE_CPP_TARGETS)
-
dnl The icc compiler has the same options as gcc, so let the rest of the
dnl configure script think it has gcc when setting up dnl options etc.
dnl This is a nasty hack which no longer seems necessary with the update
@@ -90,6 +84,8 @@ AC_LANG_CPLUSPLUS
dnl I could be more clever here, given I'm doing AC_SUBST with this
dnl (eg set a var to be the name of the include file I want). But I'm not
dnl so it's easy to change back to 'regular' autoconf vars if we needed to.
+AC_CHECK_HEADERS(string, [pcre_has_cpp_headers="1"],
+ [pcre_has_cpp_headers="0"])
AC_CHECK_HEADERS(bits/type_traits.h, [pcre_has_bits_type_traits="1"],
[pcre_has_bits_type_traits="0"])
AC_CHECK_HEADERS(type_traits.h, [pcre_has_type_traits="1"],
@@ -99,6 +95,13 @@ AC_SUBST(pcre_has_bits_type_traits)
AC_SUBST(pcre_has_type_traits)
AC_LANG_RESTORE
+dnl From the above, we now have enough info to know if C++ is fully installed
+if test -n "$ac_cv_prog_ac_ct_CXX" -a "$pcre_has_cpp_headers" = 1; then
+ MAYBE_CPP_TARGETS='$(CPP_TARGETS)'
+fi
+AC_SUBST(MAYBE_CPP_TARGETS)
+
+
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
diff --git a/doc/html/pcreapi.html b/doc/html/pcreapi.html
index 4d5f866..29492a7 100644
--- a/doc/html/pcreapi.html
+++ b/doc/html/pcreapi.html
@@ -1398,7 +1398,7 @@ provided.
To extract a substring by name, you first have to find associated number.
For example, for this pattern
<pre>
- (a+)b(?&#60;xxx&#62;\d+)...
+ (a+)b(?P&#60;xxx&#62;\d+)...
</pre>
the number of the subpattern called "xxx" is 2. You can find the number from
the name by calling <b>pcre_get_stringnumber()</b>. The first argument is the
diff --git a/doc/html/pcreprecompile.html b/doc/html/pcreprecompile.html
index 10be496..4cf8add 100644
--- a/doc/html/pcreprecompile.html
+++ b/doc/html/pcreprecompile.html
@@ -124,7 +124,7 @@ The layout of the control block that is at the start of the data that makes up
a compiled pattern was changed for release 5.0. If you have any saved patterns
that were compiled with previous releases (not a facility that was previously
advertised), you will have to recompile them for release 5.0. However, from now
-on, it should be possible to make changes in a compabible manner.
+on, it should be possible to make changes in a compatible manner.
</P>
<P>
Last updated: 28 February 2005
diff --git a/doc/pcre.txt b/doc/pcre.txt
index 9de0d62..735f504 100644
--- a/doc/pcre.txt
+++ b/doc/pcre.txt
@@ -7,6 +7,8 @@ separate text files for the pcregrep and pcretest commands.
-----------------------------------------------------------------------------
+PCRE(3) PCRE(3)
+
NAME
PCRE - Perl-compatible regular expressions
@@ -203,9 +205,11 @@ AUTHOR
Last updated: 07 March 2005
Copyright (c) 1997-2005 University of Cambridge.
------------------------------------------------------------------------------
+------------------------------------------------------------------------------
+PCREBUILD(3) PCREBUILD(3)
+
NAME
PCRE - Perl-compatible regular expressions
@@ -379,9 +383,11 @@ USING EBCDIC CODE
Last updated: 28 February 2005
Copyright (c) 1997-2005 University of Cambridge.
------------------------------------------------------------------------------
+------------------------------------------------------------------------------
+PCREMATCHING(3) PCREMATCHING(3)
+
NAME
PCRE - Perl-compatible regular expressions
@@ -545,8 +551,10 @@ DISADVANTAGES OF THE DFA ALGORITHM
Last updated: 28 February 2005
Copyright (c) 1997-2005 University of Cambridge.
------------------------------------------------------------------------------
+------------------------------------------------------------------------------
+
+PCREAPI(3) PCREAPI(3)
NAME
@@ -1833,7 +1841,7 @@ EXTRACTING CAPTURED SUBSTRINGS BY NAME
To extract a substring by name, you first have to find associated num-
ber. For example, for this pattern
- (a+)b(?<xxx>\d+)...
+ (a+)b(?P<xxx>\d+)...
the number of the subpattern called "xxx" is 2. You can find the number
from the name by calling pcre_get_stringnumber(). The first argument is
@@ -2033,8 +2041,10 @@ MATCHING A PATTERN: THE ALTERNATIVE FUNCTION
Last updated: 16 May 2005
Copyright (c) 1997-2005 University of Cambridge.
------------------------------------------------------------------------------
+------------------------------------------------------------------------------
+
+PCRECALLOUT(3) PCRECALLOUT(3)
NAME
@@ -2190,8 +2200,10 @@ RETURN VALUES
Last updated: 28 February 2005
Copyright (c) 1997-2005 University of Cambridge.
------------------------------------------------------------------------------
+------------------------------------------------------------------------------
+
+PCRECOMPAT(3) PCRECOMPAT(3)
NAME
@@ -2307,8 +2319,10 @@ DIFFERENCES BETWEEN PCRE AND PERL
Last updated: 28 February 2005
Copyright (c) 1997-2005 University of Cambridge.
------------------------------------------------------------------------------
+------------------------------------------------------------------------------
+
+PCREPATTERN(3) PCREPATTERN(3)
NAME
@@ -3735,9 +3749,11 @@ CALLOUTS
Last updated: 28 February 2005
Copyright (c) 1997-2005 University of Cambridge.
------------------------------------------------------------------------------
+------------------------------------------------------------------------------
+PCREPARTIAL(3) PCREPARTIAL(3)
+
NAME
PCRE - Perl-compatible regular expressions
@@ -3923,9 +3939,11 @@ MULTI-SEGMENT MATCHING WITH pcre_dfa_exec()
Last updated: 28 February 2005
Copyright (c) 1997-2005 University of Cambridge.
------------------------------------------------------------------------------
+------------------------------------------------------------------------------
+PCREPRECOMPILE(3) PCREPRECOMPILE(3)
+
NAME
PCRE - Perl-compatible regular expressions
@@ -4032,13 +4050,15 @@ COMPATIBILITY WITH DIFFERENT PCRE RELEASES
any saved patterns that were compiled with previous releases (not a
facility that was previously advertised), you will have to recompile
them for release 5.0. However, from now on, it should be possible to
- make changes in a compabible manner.
+ make changes in a compatible manner.
Last updated: 28 February 2005
Copyright (c) 1997-2005 University of Cambridge.
------------------------------------------------------------------------------
+------------------------------------------------------------------------------
+PCREPERFORM(3) PCREPERFORM(3)
+
NAME
PCRE - Perl-compatible regular expressions
@@ -4118,8 +4138,10 @@ PCRE PERFORMANCE
Last updated: 28 February 2005
Copyright (c) 1997-2005 University of Cambridge.
------------------------------------------------------------------------------
+------------------------------------------------------------------------------
+
+PCREPOSIX(3) PCREPOSIX(3)
NAME
@@ -4313,8 +4335,10 @@ AUTHOR
Last updated: 28 February 2005
Copyright (c) 1997-2005 University of Cambridge.
------------------------------------------------------------------------------
+------------------------------------------------------------------------------
+
+PCRECPP(3) PCRECPP(3)
NAME
@@ -4528,9 +4552,11 @@ AUTHOR
The C++ wrapper was contributed by Google Inc.
Copyright (c) 2005 Google Inc.
------------------------------------------------------------------------------
+------------------------------------------------------------------------------
+PCRESAMPLE(3) PCRESAMPLE(3)
+
NAME
PCRE - Perl-compatible regular expressions
@@ -4594,5 +4620,4 @@ PCRE SAMPLE PROGRAM
Last updated: 09 September 2004
Copyright (c) 1997-2004 University of Cambridge.
------------------------------------------------------------------------------
-
+------------------------------------------------------------------------------
diff --git a/doc/pcre_compile.3 b/doc/pcre_compile.3
index 4d4cb5a..4244698 100644
--- a/doc/pcre_compile.3
+++ b/doc/pcre_compile.3
@@ -1,4 +1,4 @@
-.TH PCRE 3
+.TH PCRE_COMPILE 3
.SH NAME
PCRE - Perl-compatible regular expressions
.SH SYNOPSIS
diff --git a/doc/pcre_compile2.3 b/doc/pcre_compile2.3
index 1c2d704..d67583c 100644
--- a/doc/pcre_compile2.3
+++ b/doc/pcre_compile2.3
@@ -1,4 +1,4 @@
-.TH PCRE 3
+.TH PCRE_COMPILE2 3
.SH NAME
PCRE - Perl-compatible regular expressions
.SH SYNOPSIS
diff --git a/doc/pcre_config.3 b/doc/pcre_config.3
index 1ba9344..5f51a46 100644
--- a/doc/pcre_config.3
+++ b/doc/pcre_config.3
@@ -1,4 +1,4 @@
-.TH PCRE 3
+.TH PCRE_CONFIG 3
.SH NAME
PCRE - Perl-compatible regular expressions
.SH SYNOPSIS
diff --git a/doc/pcre_copy_named_substring.3 b/doc/pcre_copy_named_substring.3
index 92e47be..f6c9233 100644
--- a/doc/pcre_copy_named_substring.3
+++ b/doc/pcre_copy_named_substring.3
@@ -1,4 +1,4 @@
-.TH PCRE 3
+.TH PCRE_COPY_NAMED_SUBSTRING 3
.SH NAME
PCRE - Perl-compatible regular expressions
.SH SYNOPSIS
diff --git a/doc/pcre_copy_substring.3 b/doc/pcre_copy_substring.3
index c467b50..41c8dc3 100644
--- a/doc/pcre_copy_substring.3
+++ b/doc/pcre_copy_substring.3
@@ -1,4 +1,4 @@
-.TH PCRE 3
+.TH PCRE_COPY_SUBSTRING 3
.SH NAME
PCRE - Perl-compatible regular expressions
.SH SYNOPSIS
diff --git a/doc/pcre_dfa_exec.3 b/doc/pcre_dfa_exec.3
index 277c2e1..a661fe2 100644
--- a/doc/pcre_dfa_exec.3
+++ b/doc/pcre_dfa_exec.3
@@ -1,4 +1,4 @@
-.TH PCRE 3
+.TH PCRE_DFA_EXEC 3
.SH NAME
PCRE - Perl-compatible regular expressions
.SH SYNOPSIS
diff --git a/doc/pcre_exec.3 b/doc/pcre_exec.3
index 113a632..78ce188 100644
--- a/doc/pcre_exec.3
+++ b/doc/pcre_exec.3
@@ -1,4 +1,4 @@
-.TH PCRE 3
+.TH PCRE_EXEC 3
.SH NAME
PCRE - Perl-compatible regular expressions
.SH SYNOPSIS
diff --git a/doc/pcre_free_substring.3 b/doc/pcre_free_substring.3
index 1aafd87..3628c26 100644
--- a/doc/pcre_free_substring.3
+++ b/doc/pcre_free_substring.3
@@ -1,4 +1,4 @@
-.TH PCRE 3
+.TH PCRE_FREE_SUBSTRING 3
.SH NAME
PCRE - Perl-compatible regular expressions
.SH SYNOPSIS
diff --git a/doc/pcre_free_substring_list.3 b/doc/pcre_free_substring_list.3
index d68c3a1..9365d36 100644
--- a/doc/pcre_free_substring_list.3
+++ b/doc/pcre_free_substring_list.3
@@ -1,4 +1,4 @@
-.TH PCRE 3
+.TH PCRE_FREE_SUBSTRING_LIST 3
.SH NAME
PCRE - Perl-compatible regular expressions
.SH SYNOPSIS
diff --git a/doc/pcre_fullinfo.3 b/doc/pcre_fullinfo.3
index 4738127..4b528e2 100644
--- a/doc/pcre_fullinfo.3
+++ b/doc/pcre_fullinfo.3
@@ -1,4 +1,4 @@
-.TH PCRE 3
+.TH PCRE_FULLINFO 3
.SH NAME
PCRE - Perl-compatible regular expressions
.SH SYNOPSIS
diff --git a/doc/pcre_get_named_substring.3 b/doc/pcre_get_named_substring.3
index 9ce27ba..2a1043d 100644
--- a/doc/pcre_get_named_substring.3
+++ b/doc/pcre_get_named_substring.3
@@ -1,4 +1,4 @@
-.TH PCRE 3
+.TH PCRE_GET_NAMED_SUBSTRING 3
.SH NAME
PCRE - Perl-compatible regular expressions
.SH SYNOPSIS
diff --git a/doc/pcre_get_stringnumber.3 b/doc/pcre_get_stringnumber.3
index 8c72894..f6f46de 100644
--- a/doc/pcre_get_stringnumber.3
+++ b/doc/pcre_get_stringnumber.3
@@ -1,4 +1,4 @@
-.TH PCRE 3
+.TH PCRE_GET_STRINGNUMBER 3
.SH NAME
PCRE - Perl-compatible regular expressions
.SH SYNOPSIS
diff --git a/doc/pcre_get_substring.3 b/doc/pcre_get_substring.3
index 9bef5d3..cc35e4a 100644
--- a/doc/pcre_get_substring.3
+++ b/doc/pcre_get_substring.3
@@ -1,4 +1,4 @@
-.TH PCRE 3
+.TH PCRE_GET_SUBSTRING 3
.SH NAME
PCRE - Perl-compatible regular expressions
.SH SYNOPSIS
diff --git a/doc/pcre_get_substring_list.3 b/doc/pcre_get_substring_list.3
index 29ae442..51d8ba5 100644
--- a/doc/pcre_get_substring_list.3
+++ b/doc/pcre_get_substring_list.3
@@ -1,4 +1,4 @@
-.TH PCRE 3
+.TH PCRE_GET_SUBSTRING_LIST 3
.SH NAME
PCRE - Perl-compatible regular expressions
.SH SYNOPSIS
diff --git a/doc/pcre_info.3 b/doc/pcre_info.3
index 540c152..5974067 100644
--- a/doc/pcre_info.3
+++ b/doc/pcre_info.3
@@ -1,4 +1,4 @@
-.TH PCRE 3
+.TH PCRE_INFO 3
.SH NAME
PCRE - Perl-compatible regular expressions
.SH SYNOPSIS
diff --git a/doc/pcre_maketables.3 b/doc/pcre_maketables.3
index fdc5914..45a9dd9 100644
--- a/doc/pcre_maketables.3
+++ b/doc/pcre_maketables.3
@@ -1,4 +1,4 @@
-.TH PCRE 3
+.TH PCRE_MAKETABLES 3
.SH NAME
PCRE - Perl-compatible regular expressions
.SH SYNOPSIS
diff --git a/doc/pcre_refcount.3 b/doc/pcre_refcount.3
index 0b94068..61fe55f 100644
--- a/doc/pcre_refcount.3
+++ b/doc/pcre_refcount.3
@@ -1,4 +1,4 @@
-.TH PCRE 3
+.TH PCRE_REFCOUNT 3
.SH NAME
PCRE - Perl-compatible regular expressions
.SH SYNOPSIS
diff --git a/doc/pcre_study.3 b/doc/pcre_study.3
index df428d0..eafc910 100644
--- a/doc/pcre_study.3
+++ b/doc/pcre_study.3
@@ -1,4 +1,4 @@
-.TH PCRE 3
+.TH PCRE_STUDY 3
.SH NAME
PCRE - Perl-compatible regular expressions
.SH SYNOPSIS
diff --git a/doc/pcre_version.3 b/doc/pcre_version.3
index 9b07407..e48a0e9 100644
--- a/doc/pcre_version.3
+++ b/doc/pcre_version.3
@@ -1,4 +1,4 @@
-.TH PCRE 3
+.TH PCRE_VERSION 3
.SH NAME
PCRE - Perl-compatible regular expressions
.SH SYNOPSIS
diff --git a/doc/pcreapi.3 b/doc/pcreapi.3
index 9fc8182..4f8114a 100644
--- a/doc/pcreapi.3
+++ b/doc/pcreapi.3
@@ -1,4 +1,4 @@
-.TH PCRE 3
+.TH PCREAPI 3
.SH NAME
PCRE - Perl-compatible regular expressions
.SH "PCRE NATIVE API"
@@ -1416,7 +1416,7 @@ provided.
To extract a substring by name, you first have to find associated number.
For example, for this pattern
.sp
- (a+)b(?<xxx>\ed+)...
+ (a+)b(?P<xxx>\ed+)...
.sp
the number of the subpattern called "xxx" is 2. You can find the number from
the name by calling \fBpcre_get_stringnumber()\fP. The first argument is the
diff --git a/doc/pcrebuild.3 b/doc/pcrebuild.3
index 62c4ea2..0fc6a5c 100644
--- a/doc/pcrebuild.3
+++ b/doc/pcrebuild.3
@@ -1,4 +1,4 @@
-.TH PCRE 3
+.TH PCREBUILD 3
.SH NAME
PCRE - Perl-compatible regular expressions
.SH "PCRE BUILD-TIME OPTIONS"
diff --git a/doc/pcrecallout.3 b/doc/pcrecallout.3
index 6155d43..e7fec00 100644
--- a/doc/pcrecallout.3
+++ b/doc/pcrecallout.3
@@ -1,4 +1,4 @@
-.TH PCRE 3
+.TH PCRECALLOUT 3
.SH NAME
PCRE - Perl-compatible regular expressions
.SH "PCRE CALLOUTS"
diff --git a/doc/pcrecompat.3 b/doc/pcrecompat.3
index 05ed3cb..9594fa9 100644
--- a/doc/pcrecompat.3
+++ b/doc/pcrecompat.3
@@ -1,4 +1,4 @@
-.TH PCRE 3
+.TH PCRECOMPAT 3
.SH NAME
PCRE - Perl-compatible regular expressions
.SH "DIFFERENCES BETWEEN PCRE AND PERL"
diff --git a/doc/pcrecpp.3 b/doc/pcrecpp.3
index 01eb028..abf7334 100644
--- a/doc/pcrecpp.3
+++ b/doc/pcrecpp.3
@@ -1,4 +1,4 @@
-.TH PCRE 3
+.TH PCRECPP 3
.SH NAME
PCRE - Perl-compatible regular expressions.
.SH "SYNOPSIS OF C++ WRAPPER"
diff --git a/doc/pcregrep.txt b/doc/pcregrep.txt
index c2374e1..e8083a1 100644
--- a/doc/pcregrep.txt
+++ b/doc/pcregrep.txt
@@ -1,10 +1,10 @@
PCREGREP(1) PCREGREP(1)
-
NAME
pcregrep - a grep with Perl-compatible regular expressions.
+
SYNOPSIS
pcregrep [options] [long options] [pattern] [file1 file2 ...]
diff --git a/doc/pcrematching.3 b/doc/pcrematching.3
index 4524701..931fdd6 100644
--- a/doc/pcrematching.3
+++ b/doc/pcrematching.3
@@ -1,4 +1,4 @@
-.TH PCRE 3
+.TH PCREMATCHING 3
.SH NAME
PCRE - Perl-compatible regular expressions
.SH "PCRE MATCHING ALGORITHMS"
diff --git a/doc/pcrepartial.3 b/doc/pcrepartial.3
index ffc0c6e..66fd18d 100644
--- a/doc/pcrepartial.3
+++ b/doc/pcrepartial.3
@@ -1,4 +1,4 @@
-.TH PCRE 3
+.TH PCREPARTIAL 3
.SH NAME
PCRE - Perl-compatible regular expressions
.SH "PARTIAL MATCHING IN PCRE"
diff --git a/doc/pcrepattern.3 b/doc/pcrepattern.3
index fa39e53..84c2ee5 100644
--- a/doc/pcrepattern.3
+++ b/doc/pcrepattern.3
@@ -1,4 +1,4 @@
-.TH PCRE 3
+.TH PCREPATTERN 3
.SH NAME
PCRE - Perl-compatible regular expressions
.SH "PCRE REGULAR EXPRESSION DETAILS"
diff --git a/doc/pcreperform.3 b/doc/pcreperform.3
index 82e454c..75e8a16 100644
--- a/doc/pcreperform.3
+++ b/doc/pcreperform.3
@@ -1,4 +1,4 @@
-.TH PCRE 3
+.TH PCREPERFORM 3
.SH NAME
PCRE - Perl-compatible regular expressions
.SH "PCRE PERFORMANCE"
diff --git a/doc/pcreposix.3 b/doc/pcreposix.3
index b67d6ff..173ef03 100644
--- a/doc/pcreposix.3
+++ b/doc/pcreposix.3
@@ -1,4 +1,4 @@
-.TH PCRE 3
+.TH PCREPOSIX 3
.SH NAME
PCRE - Perl-compatible regular expressions.
.SH "SYNOPSIS OF POSIX API"
diff --git a/doc/pcreprecompile.3 b/doc/pcreprecompile.3
index f359b96..7cf89de 100644
--- a/doc/pcreprecompile.3
+++ b/doc/pcreprecompile.3
@@ -1,4 +1,4 @@
-.TH PCRE 3
+.TH PCREPRECOMPILE 3
.SH NAME
PCRE - Perl-compatible regular expressions
.SH "SAVING AND RE-USING PRECOMPILED PCRE PATTERNS"
@@ -119,7 +119,7 @@ The layout of the control block that is at the start of the data that makes up
a compiled pattern was changed for release 5.0. If you have any saved patterns
that were compiled with previous releases (not a facility that was previously
advertised), you will have to recompile them for release 5.0. However, from now
-on, it should be possible to make changes in a compabible manner.
+on, it should be possible to make changes in a compatible manner.
.P
.in 0
Last updated: 28 February 2005
diff --git a/doc/pcresample.3 b/doc/pcresample.3
index 8d949a6..7f82979 100644
--- a/doc/pcresample.3
+++ b/doc/pcresample.3
@@ -1,4 +1,4 @@
-.TH PCRE 3
+.TH PCRESAMPLE 3
.SH NAME
PCRE - Perl-compatible regular expressions
.SH "PCRE SAMPLE PROGRAM"
diff --git a/doc/pcretest.txt b/doc/pcretest.txt
index 2badffa..2af49e7 100644
--- a/doc/pcretest.txt
+++ b/doc/pcretest.txt
@@ -1,10 +1,10 @@
PCRETEST(1) PCRETEST(1)
-
NAME
pcretest - a program for testing Perl-compatible regular expressions.
+
SYNOPSIS
pcretest [-C] [-d] [-dfa] [-i] [-m] [-o osize] [-p] [-t] [source]
diff --git a/pcre_compile.c b/pcre_compile.c
index 92b9f30..c592a49 100644
--- a/pcre_compile.c
+++ b/pcre_compile.c
@@ -4625,6 +4625,14 @@ while ((c = *(++ptr)) != 0)
nothing is done here and it is handled during the compiling
process.
+ We allow for more than one options setting at the start. If such
+ settings do not change the existing options, nothing is compiled.
+ However, we must leave space just in case something is compiled.
+ This can happen for pathological sequences such as (?i)(?-i)
+ because the global options will end up with -i set. The space is
+ small and not significant. (Before I did this there was a reported
+ bug with (?i)(?-i) in a machine-generated pattern.)
+
[Historical note: Up to Perl 5.8, options settings at top level
were always global settings, wherever they appeared in the pattern.
That is, they were equivalent to an external setting. From 5.8
@@ -4637,6 +4645,7 @@ while ((c = *(++ptr)) != 0)
options = (options | set) & (~unset);
set = unset = 0; /* To save length */
item_count--; /* To allow for several */
+ length += 2;
}
/* Fall through */
diff --git a/pcretest.c b/pcretest.c
index 0e9a38f..9b63470 100644
--- a/pcretest.c
+++ b/pcretest.c
@@ -62,6 +62,12 @@ Makefile. */
#include "pcreposix.h"
#endif
+/* It is also possible, for the benefit of the version imported into Exim, to
+build pcretest without support for UTF8 (define NOUTF8), without the interface
+to the DFA matcher (NODFA), and without the doublecheck of the old "info"
+function (define NOINFOCHECK). */
+
+
#ifndef CLOCKS_PER_SEC
#ifdef CLK_TCK
#define CLOCKS_PER_SEC CLK_TCK
@@ -135,6 +141,8 @@ Returns: > 0 => the number of bytes consumed
-6 to 0 => malformed UTF-8 character at offset = (-return)
*/
+#if !defined NOUTF8
+
static int
utf82ord(unsigned char *buffer, int *vptr)
{
@@ -176,6 +184,8 @@ if (j != i) return -(i+1);
return i+1;
}
+#endif
+
/*************************************************
@@ -193,6 +203,7 @@ int yield = 0;
while (length-- > 0)
{
+#if !defined NOUTF8
if (use_utf8)
{
int rc = utf82ord(p, &c);
@@ -215,6 +226,7 @@ while (length-- > 0)
continue;
}
}
+#endif
/* Not UTF-8, or malformed UTF-8 */
@@ -464,7 +476,9 @@ while (argc > 1 && argv[op][0] == '-')
else if (strcmp(argv[op], "-t") == 0) timeit = 1;
else if (strcmp(argv[op], "-i") == 0) showinfo = 1;
else if (strcmp(argv[op], "-d") == 0) showinfo = debug = 1;
+#if !defined NODFA
else if (strcmp(argv[op], "-dfa") == 0) all_use_dfa = 1;
+#endif
else if (strcmp(argv[op], "-o") == 0 && argc > 2 &&
((size_offsets = get_value((unsigned char *)argv[op+1], &endptr)),
*endptr == 0))
@@ -502,7 +516,9 @@ while (argc > 1 && argv[op][0] == '-')
printf("Usage: pcretest [-d] [-i] [-o <n>] [-p] [-s] [-t] [<input> [<output>]]\n");
printf(" -C show PCRE compile-time options and exit\n");
printf(" -d debug: show compiled code; implies -i\n");
+#if !defined NODFA
printf(" -dfa force DFA matching for all subjects\n");
+#endif
printf(" -i show information about compiled pattern\n"
" -m output memory used information\n"
" -o <n> set size of offsets vector to <n>\n");
@@ -962,7 +978,9 @@ while (!done)
if (do_showinfo)
{
unsigned long int get_options, all_options;
+#if !defined NOINFOCHECK
int old_first_char, old_options, old_count;
+#endif
int count, backrefmax, first_char, need_char;
int nameentrysize, namecount;
const uschar *nametable;
@@ -983,6 +1001,7 @@ while (!done)
new_info(re, NULL, PCRE_INFO_NAMECOUNT, &namecount);
new_info(re, NULL, PCRE_INFO_NAMETABLE, (void *)&nametable);
+#if !defined NOINFOCHECK
old_count = pcre_info(re, &old_options, &old_first_char);
if (count < 0) fprintf(outfile,
"Error %d from pcre_info()\n", count);
@@ -1000,6 +1019,7 @@ while (!done)
"Options disagreement: pcre_fullinfo=%ld pcre_info=%d\n",
get_options, old_options);
}
+#endif
if (size != regex_gotten_store) fprintf(outfile,
"Size disagreement: pcre_fullinfo=%d call to malloc for %d\n",
@@ -1259,6 +1279,7 @@ while (!done)
/* Handle \x{..} specially - new Perl thing for utf8 */
+#if !defined NOUTF8
if (*p == '{')
{
unsigned char *pt = p;
@@ -1277,6 +1298,7 @@ while (!done)
}
/* Not correct form; fall through */
}
+#endif
/* Ordinary \x */
@@ -1357,16 +1379,20 @@ while (!done)
}
continue;
+#if !defined NODFA
case 'D':
+#if !defined NOPOSIX
if (posix || do_posix)
printf("** Can't use dfa matching in POSIX mode: \\D ignored\n");
else
+#endif
use_dfa = 1;
continue;
case 'F':
options |= PCRE_DFA_SHORTEST;
continue;
+#endif
case 'G':
if (isdigit(*p))
@@ -1422,9 +1448,11 @@ while (!done)
options |= PCRE_PARTIAL;
continue;
+#if !defined NODFA
case 'R':
options |= PCRE_DFA_RESTART;
continue;
+#endif
case 'S':
show_malloc = 1;
@@ -1507,6 +1535,7 @@ while (!done)
clock_t time_taken;
clock_t start_time = clock();
+#if !defined NODFA
if (all_use_dfa || use_dfa)
{
int workspace[1000];
@@ -1516,6 +1545,7 @@ while (!done)
sizeof(workspace)/sizeof(int));
}
else
+#endif
for (i = 0; i < LOOPREPEAT; i++)
count = pcre_exec(re, extra, (char *)bptr, len,
@@ -1591,6 +1621,7 @@ while (!done)
/* The normal case is just to do the match once, with the default
value of match_limit. */
+#if !defined NODFA
else if (all_use_dfa || use_dfa)
{
int workspace[1000];
@@ -1603,6 +1634,7 @@ while (!done)
count = use_size_offsets/2;
}
}
+#endif
else
{
@@ -1699,9 +1731,11 @@ while (!done)
else if (count == PCRE_ERROR_PARTIAL)
{
fprintf(outfile, "Partial match");
+#if !defined NODFA
if ((all_use_dfa || use_dfa) && use_size_offsets > 2)
fprintf(outfile, ": %.*s", use_offsets[1] - use_offsets[0],
bptr + use_offsets[0]);
+#endif
fprintf(outfile, "\n");
break; /* Out of the /g loop */
}
diff --git a/testdata/grepoutput b/testdata/grepoutput
index e72bdff..20a6f79 100644
--- a/testdata/grepoutput
+++ b/testdata/grepoutput
@@ -1,4 +1,4 @@
-pcregrep version 4.0 07-Jun-2005 using PCRE version 6.0 07-Jun-2005
+pcregrep version 4.0 07-Jun-2005 using PCRE version 6.1 21-Jun-2005
---------------------------- Test 1 ------------------------------
PATTERN at the start of a line.
In the middle of a line, PATTERN appears.
diff --git a/testdata/testinput2 b/testdata/testinput2
index f59ad22..dcb5609 100644
--- a/testdata/testinput2
+++ b/testdata/testinput2
@@ -1424,4 +1424,9 @@
ab=cd
ab\ncd
+/(?i)(?-i)AbCd/
+ AbCd
+ ** Failers
+ abcd
+
/ End of testinput2 /
diff --git a/testdata/testoutput1 b/testdata/testoutput1
index dc0575e..0eef50e 100644
--- a/testdata/testoutput1
+++ b/testdata/testoutput1
@@ -1,4 +1,4 @@
-PCRE version 6.0 07-Jun-2005
+PCRE version 6.1 21-Jun-2005
/the quick brown fox/
the quick brown fox
diff --git a/testdata/testoutput2 b/testdata/testoutput2
index 63abb14..823c67a 100644
--- a/testdata/testoutput2
+++ b/testdata/testoutput2
@@ -1,4 +1,4 @@
-PCRE version 6.0 07-Jun-2005
+PCRE version 6.1 21-Jun-2005
/(a)b|/
Capturing subpattern count = 1
@@ -5704,6 +5704,18 @@ No match: POSIX code 17: match failed
ab\ncd
0: ab\x0acd
+/(?i)(?-i)AbCd/
+Capturing subpattern count = 0
+No options
+First char = 'A'
+Need char = 'd'
+ AbCd
+ 0: AbCd
+ ** Failers
+No match
+ abcd
+No match
+
/ End of testinput2 /
Capturing subpattern count = 0
No options
diff --git a/testdata/testoutput3 b/testdata/testoutput3
index d025d7a..e58c9c7 100644
--- a/testdata/testoutput3
+++ b/testdata/testoutput3
@@ -1,4 +1,4 @@
-PCRE version 6.0 07-Jun-2005
+PCRE version 6.1 21-Jun-2005
/^[\w]+/
*** Failers
diff --git a/testdata/testoutput4 b/testdata/testoutput4
index 51fc085..af4a821 100644
--- a/testdata/testoutput4
+++ b/testdata/testoutput4
@@ -1,4 +1,4 @@
-PCRE version 6.0 07-Jun-2005
+PCRE version 6.1 21-Jun-2005
/-- Do not use the \x{} construct except with patterns that have the --/
/-- /8 option set, because PCRE doesn't recognize them as UTF-8 unless --/
diff --git a/testdata/testoutput5 b/testdata/testoutput5
index ec31cf9..6b694a7 100644
--- a/testdata/testoutput5
+++ b/testdata/testoutput5
@@ -1,4 +1,4 @@
-PCRE version 6.0 07-Jun-2005
+PCRE version 6.1 21-Jun-2005
/\x{100}/8DM
Memory allocation (code space): 10
diff --git a/testdata/testoutput6 b/testdata/testoutput6
index 3a75a7f..8889b05 100644
--- a/testdata/testoutput6
+++ b/testdata/testoutput6
@@ -1,4 +1,4 @@
-PCRE version 6.0 07-Jun-2005
+PCRE version 6.1 21-Jun-2005
/^\pC\pL\pM\pN\pP\pS\pZ</8
\x7f\x{c0}\x{30f}\x{660}\x{66c}\x{f01}\x{1680}<
diff --git a/testdata/testoutput7 b/testdata/testoutput7
index 24ec615..421efb2 100644
--- a/testdata/testoutput7
+++ b/testdata/testoutput7
@@ -1,4 +1,4 @@
-PCRE version 6.0 07-Jun-2005
+PCRE version 6.1 21-Jun-2005
/abc/
abc
diff --git a/testdata/testoutput8 b/testdata/testoutput8
index 25cde8d..6425f00 100644
--- a/testdata/testoutput8
+++ b/testdata/testoutput8
@@ -1,4 +1,4 @@
-PCRE version 6.0 07-Jun-2005
+PCRE version 6.1 21-Jun-2005
/-- Do not use the \x{} construct except with patterns that have the --/
/-- /8 option set, because PCRE doesn't recognize them as UTF-8 unless --/
diff --git a/testdata/testoutput9 b/testdata/testoutput9
index 1b77a98..4d2a41f 100644
--- a/testdata/testoutput9
+++ b/testdata/testoutput9
@@ -1,4 +1,4 @@
-PCRE version 6.0 07-Jun-2005
+PCRE version 6.1 21-Jun-2005
/\pL\P{Nd}/8
AB