diff options
author | nigel <nigel@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2007-02-24 21:40:13 +0000 |
---|---|---|
committer | nigel <nigel@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2007-02-24 21:40:13 +0000 |
commit | 19ccd22bd088b5a640d244365ab9025509e678c0 (patch) | |
tree | adf36802d7e2b184a7adb7dc230def65516f0a50 | |
parent | 776635721f3417106a59041ad7e77c4c815e1bd0 (diff) | |
download | pcre-19ccd22bd088b5a640d244365ab9025509e678c0.tar.gz |
Load pcre-4.2 into code/trunk.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@67 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r-- | COPYING | 8 | ||||
-rw-r--r-- | ChangeLog | 54 | ||||
-rw-r--r-- | Makefile.in | 135 | ||||
-rwxr-xr-x | configure | 49 | ||||
-rw-r--r-- | configure.in | 39 | ||||
-rw-r--r-- | doc/html/.html | 0 | ||||
-rw-r--r-- | internal.h | 2 | ||||
-rw-r--r-- | pcre.c | 83 | ||||
-rw-r--r-- | pcregrep.c | 18 | ||||
-rw-r--r-- | pcretest.c | 37 | ||||
-rw-r--r-- | printint.c | 12 | ||||
-rw-r--r-- | testdata/testinput1 | 12 | ||||
-rw-r--r-- | testdata/testinput4 | 13 | ||||
-rw-r--r-- | testdata/testinput5 | 10 | ||||
-rw-r--r-- | testdata/testoutput1 | 22 | ||||
-rw-r--r-- | testdata/testoutput2 | 2 | ||||
-rw-r--r-- | testdata/testoutput3 | 2 | ||||
-rw-r--r-- | testdata/testoutput4 | 20 | ||||
-rw-r--r-- | testdata/testoutput5 | 54 |
19 files changed, 446 insertions, 126 deletions
@@ -21,7 +21,7 @@ restrictions: 2. The origin of this software must not be misrepresented, either by explicit claim or by omission. In practice, this means that if you use - PCRE in software which you distribute to others, commercially or + PCRE in software that you distribute to others, commercially or otherwise, you must put a sentence like this Regular expression support is provided by the PCRE library package, @@ -34,7 +34,11 @@ restrictions: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ - should also be given in the documentation. + should also be given in the documentation. However, this condition is not + intended to apply to whole chains of software. If package A includes PCRE, + it must acknowledge it, but if package B is software that includes package + A, the condition is not imposed on package B (unless it uses PCRE + independently). 3. Altered versions must be plainly marked as such, and must not be misrepresented as being the original software. @@ -1,6 +1,60 @@ ChangeLog for PCRE ------------------ +Version 4.2 14-Apr-03 +--------------------- + +1. Typo "#if SUPPORT_UTF8" instead of "#ifdef SUPPORT_UTF8" fixed. + +2. Changes to the building process, supplied by Ronald Landheer-Cieslak + [ON_WINDOWS]: new variable, "#" on non-Windows platforms + [NOT_ON_WINDOWS]: new variable, "#" on Windows platforms + [WIN_PREFIX]: new variable, "cyg" for Cygwin + * Makefile.in: use autoconf substitution for OBJEXT, EXEEXT, BUILD_OBJEXT + and BUILD_EXEEXT + Note: automatic setting of the BUILD variables is not yet working + set CPPFLAGS and BUILD_CPPFLAGS (but don't use yet) - should be used at + compile-time but not at link-time + [LINK]: use for linking executables only + make different versions for Windows and non-Windows + [LINKLIB]: new variable, copy of UNIX-style LINK, used for linking + libraries + [LINK_FOR_BUILD]: new variable + [OBJEXT]: use throughout + [EXEEXT]: use throughout + <winshared>: new target + <wininstall>: new target + <dftables.o>: use native compiler + <dftables>: use native linker + <install>: handle Windows platform correctly + <clean>: ditto + <check>: ditto + copy DLL to top builddir before testing + + As part of these changes, -no-undefined was removed again. This was reported + to give trouble on HP-UX 11.0, so getting rid of it seems like a good idea + in any case. + +3. Some tidies to get rid of compiler warnings: + + . In the match_data structure, match_limit was an unsigned long int, whereas + match_call_count was an int. I've made them both unsigned long ints. + + . In pcretest the fact that a const uschar * doesn't automatically cast to + a void * provoked a warning. + + . Turning on some more compiler warnings threw up some "shadow" variables + and a few more missing casts. + +4. If PCRE was complied with UTF-8 support, but called without the PCRE_UTF8 + option, a class that contained a single character with a value between 128 + and 255 (e.g. /[\xFF]/) caused PCRE to crash. + +5. If PCRE was compiled with UTF-8 support, but called without the PCRE_UTF8 + option, a class that contained several characters, but with at least one + whose value was between 128 and 255 caused PCRE to crash. + + Version 4.1 12-Mar-03 --------------------- diff --git a/Makefile.in b/Makefile.in index 510d8f1..ee9ca7c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -54,10 +54,25 @@ LIBDIR = @libdir@ INCDIR = @includedir@ MANDIR = @mandir@ +# EXEEXT is set by configure to the extention of an executable file +# OBJEXT is set by configure to the extention of an object file +# The BUILD_* equivalents are the same but for the host we're building on + +EXEEXT = @EXEEXT@ +OBJEXT = @OBJEXT@ +# Note that these are just here to have a convenient place to look at the +# outcome. +BUILD_EXEEXT = @BUILD_EXEEXT@ +BUILD_OBJEXT = @BUILD_OBJEXT@ + +# The compiler, C flags, preprocessor flags, etc + CC = @CC@ CFLAGS = @CFLAGS@ +CPPFLAGS = @CPPFLAGS@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ +CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ UTF8 = @UTF8@ NEWLINE = @NEWLINE@ POSIX_MALLOC_THRESHOLD = @POSIX_MALLOC_THRESHOLD@ @@ -72,7 +87,10 @@ INSTALL_DATA = @INSTALL_DATA@ LIBTOOL = @LIBTOOL@ LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) -I. -I$(top_srcdir) $(NEWLINE) $(LINK_SIZE) $(MATCH_LIMIT) -LINK = $(LIBTOOL) --mode=link $(CC) --no-undefined $(CFLAGS) -I. -I$(top_srcdir) +@ON_WINDOWS@LINK = $(CC) $(CFLAGS) -I. -I$(top_srcdir) -L.libs +@NOT_ON_WINDOWS@LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -I. -I$(top_srcdir) +LINKLIB = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -I. -I$(top_srcdir) +LINK_FOR_BUILD = $(LIBTOOL) --mode=link $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -I. -I$(top_srcdir) # These are the version numbers for the shared libraries @@ -82,76 +100,126 @@ PCREPOSIXLIBVERSION = @PCRE_POSIXLIB_VERSION@ ############################################################################## -OBJ = maketables.o get.o study.o pcre.o @POSIX_OBJ@ +OBJ = maketables.@OBJEXT@ get.@OBJEXT@ study.@OBJEXT@ pcre.@OBJEXT@ @POSIX_OBJ@ LOBJ = maketables.lo get.lo study.lo pcre.lo @POSIX_LOBJ@ -all: libpcre.la @POSIX_LIB@ pcretest pcregrep +all: libpcre.la @POSIX_LIB@ pcretest@EXEEXT@ pcregrep@EXEEXT@ @ON_WINDOWS@ winshared -pcregrep: libpcre.la pcregrep.o - $(LINK) -o pcregrep pcregrep.o libpcre.la +pcregrep@EXEEXT@: libpcre.la pcregrep.@OBJEXT@ @ON_WINDOWS@ winshared + $(LINK) -o pcregrep@EXEEXT@ pcregrep.@OBJEXT@ -lpcre -pcretest: libpcre.la @POSIX_LIB@ pcretest.o - $(LINK) $(PURIFY) $(EFENCE) -o pcretest pcretest.o \ - libpcre.la @POSIX_LIB@ +pcretest@EXEEXT@: libpcre.la @POSIX_LIB@ pcretest.@OBJEXT@ @ON_WINDOWS@ winshared + $(LINK) $(PURIFY) $(EFENCE) -o pcretest@EXEEXT@ pcretest.@OBJEXT@ \ + -lpcre @POSIX_LIB@ libpcre.la: $(OBJ) -rm -f libpcre.la - $(LINK) -rpath $(LIBDIR) -version-info \ + $(LINKLIB) -rpath $(LIBDIR) -version-info \ '$(PCRELIBVERSION)' -o libpcre.la $(LOBJ) -libpcreposix.la: pcreposix.o +libpcreposix.la: pcreposix.@OBJEXT@ -rm -f libpcreposix.la - $(LINK) -rpath $(LIBDIR) -L. -lpcre -version-info \ + $(LINKLIB) -rpath $(LIBDIR) -L. -lpcre -version-info \ '$(PCREPOSIXLIBVERSION)' -o libpcreposix.la pcreposix.lo -pcre.o: $(top_srcdir)/chartables.c $(top_srcdir)/pcre.c \ +pcre.@OBJEXT@: $(top_srcdir)/chartables.c $(top_srcdir)/pcre.c \ $(top_srcdir)/internal.h $(top_srcdir)/printint.c \ pcre.h config.h Makefile $(LTCOMPILE) $(UTF8) $(POSIX_MALLOC_THRESHOLD) $(top_srcdir)/pcre.c -pcreposix.o: $(top_srcdir)/pcreposix.c $(top_srcdir)/pcreposix.h \ +pcreposix.@OBJEXT@: $(top_srcdir)/pcreposix.c $(top_srcdir)/pcreposix.h \ $(top_srcdir)/internal.h pcre.h config.h Makefile $(LTCOMPILE) $(POSIX_MALLOC_THRESHOLD) $(top_srcdir)/pcreposix.c -maketables.o: $(top_srcdir)/maketables.c $(top_srcdir)/internal.h \ +maketables.@OBJEXT@: $(top_srcdir)/maketables.c $(top_srcdir)/internal.h \ pcre.h config.h Makefile $(LTCOMPILE) $(top_srcdir)/maketables.c -get.o: $(top_srcdir)/get.c $(top_srcdir)/internal.h \ +get.@OBJEXT@: $(top_srcdir)/get.c $(top_srcdir)/internal.h \ pcre.h config.h Makefile $(LTCOMPILE) $(top_srcdir)/get.c -study.o: $(top_srcdir)/study.c $(top_srcdir)/internal.h \ +study.@OBJEXT@: $(top_srcdir)/study.c $(top_srcdir)/internal.h \ pcre.h config.h Makefile $(LTCOMPILE) $(UTF8) $(top_srcdir)/study.c -pcretest.o: $(top_srcdir)/pcretest.c $(top_srcdir)/internal.h \ +pcretest.@OBJEXT@: $(top_srcdir)/pcretest.c $(top_srcdir)/internal.h \ $(top_srcdir)/printint.c \ pcre.h config.h Makefile $(CC) -c $(CFLAGS) -I. $(UTF8) $(LINK_SIZE) $(top_srcdir)/pcretest.c -pcregrep.o: $(top_srcdir)/pcregrep.c pcre.h Makefile config.h +pcregrep.@OBJEXT@: $(top_srcdir)/pcregrep.c pcre.h Makefile config.h $(CC) -c $(CFLAGS) -I. $(UTF8) $(PCREGREP_OSTYPE) $(top_srcdir)/pcregrep.c +# Some Windows-specific targets, for Cygwin and MinGW + +winshared : .libs/@WIN_PREFIX@pcre.dll .libs/@WIN_PREFIX@pcreposix.dll + +.libs/@WIN_PREFIX@pcre.dll : libpcre.la + $(CC) $(CFLAGS) -shared -o $@ \ + -Wl,--whole-archive .libs/libpcre.a \ + -Wl,--out-implib,.libs/libpcre.dll.a \ + -Wl,--output-def,.libs/@WIN_PREFIX@pcre.dll-def \ + -Wl,--export-all-symbols \ + -Wl,--no-whole-archive + sed -e "s#dlname=''#dlname='../bin/@WIN_PREFIX@pcre.dll'#" \ + -e "s#library_names=''#library_names='libpcre.dll.a'#" \ + < .libs/libpcre.lai > .libs/libpcre.lai.tmp && \ + mv .libs/libpcre.lai.tmp .libs/libpcre.lai + sed -e "s#dlname=''#dlname='../bin/@WIN_PREFIX@pcre.dll'#" \ + -e "s#library_names=''#library_names='libpcre.dll.a'#" \ + < libpcre.la > libpcre.la.tmp && \ + mv libpcre.la.tmp libpcre.la + + +.libs/@WIN_PREFIX@pcreposix.dll: libpcreposix.la libpcre.la + $(CC) $(CFLAGS) -shared -o $@ \ + -Wl,--whole-archive .libs/libpcreposix.a \ + -Wl,--out-implib,.libs/lib@WIN_PREFIX@pcreposix.dll.a \ + -Wl,--output-def,.libs/@WIN_PREFIX@pcreposix.dll-def \ + -Wl,--export-all-symbols \ + -Wl,--no-whole-archive .libs/libpcre.a + sed -e "s#dlname=''#dlname='../bin/@WIN_PREFIX@pcreposix.dll'#" \ + -e "s#library_names=''#library_names='libpcreposix.dll.a'#"\ + < .libs/libpcreposix.lai > .libs/libpcreposix.lai.tmp && \ + mv .libs/libpcreposix.lai.tmp .libs/libpcreposix.lai + sed -e "s#dlname=''#dlname='../bin/@WIN_PREFIX@pcreposix.dll'#" \ + -e "s#library_names=''#library_names='libpcreposix.dll.a'#"\ + < libpcreposix.la > libpcreposix.la.tmp && \ + mv libpcreposix.la.tmp libpcreposix.la + + +wininstall : winshared + $(mkinstalldirs) $(DESTDIR)$(LIBDIR) + $(mkinstalldirs) $(DESTDIR)$(BINDIR) + $(INSTALL) .libs/@WIN_PREFIX@pcre.dll $(DESTDIR)$(BINDIR)/@WIN_PREFIX@pcre.dll + $(INSTALL) .libs/@WIN_PREFIX@pcreposix.dll $(DESTDIR)$(BINDIR)/@WIN_PREFIX@pcreposix.dll + $(INSTALL) .libs/libpcreposix.dll.a $(DESTDIR)$(LIBDIR)/libpcreposix.dll.a + $(INSTALL) .libs/libpcre.dll.a $(DESTDIR)$(LIBDIR)/libpcre.dll.a + -strip -g $(DESTDIR)$(BINDIR)/@WIN_PREFIX@pcre.dll + -strip -g $(DESTDIR)$(BINDIR)/@WIN_PREFIX@pcreposix.dll + -strip $(DESTDIR)$(BINDIR)/pcregrep@EXEEXT@ + -strip $(DESTDIR)$(BINDIR)/pcretest@EXEEXT@ + # An auxiliary program makes the default character table source $(top_srcdir)/chartables.c: dftables ./dftables >$(top_srcdir)/chartables.c -dftables.o: $(top_srcdir)/dftables.c $(top_srcdir)/maketables.c \ +dftables.@BUILD_OBJEXT@: $(top_srcdir)/dftables.c $(top_srcdir)/maketables.c \ $(top_srcdir)/internal.h pcre.h config.h Makefile $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) -I. $(top_srcdir)/dftables.c -dftables: dftables.o - $(LINK) -o dftables dftables.o +dftables: dftables.@BUILD_OBJEXT@ + $(LINK_FOR_BUILD) -o dftables dftables.@OBJEXT@ -install: all - $(mkinstalldirs) $(DESTDIR)$(LIBDIR) - echo "$(LIBTOOL) --mode=install $(INSTALL) libpcre.la $(DESTDIR)$(LIBDIR)/libpcre.la" - $(LIBTOOL) --mode=install $(INSTALL) libpcre.la $(DESTDIR)$(LIBDIR)/libpcre.la - echo "$(LIBTOOL) --mode=install $(INSTALL) libpcreposix.la $(DESTDIR)$(LIBDIR)/libpcreposix.la" - $(LIBTOOL) --mode=install $(INSTALL) libpcreposix.la $(DESTDIR)$(LIBDIR)/libpcreposix.la - $(LIBTOOL) --finish $(DESTDIR)$(LIBDIR) +install: all @ON_WINDOWS@ wininstall +@NOT_ON_WINDOWS@ $(mkinstalldirs) $(DESTDIR)$(LIBDIR) +@NOT_ON_WINDOWS@ echo "$(LIBTOOL) --mode=install $(INSTALL) libpcre.la $(DESTDIR)$(LIBDIR)/libpcre.la" +@NOT_ON_WINDOWS@ $(LIBTOOL) --mode=install $(INSTALL) libpcre.la $(DESTDIR)$(LIBDIR)/libpcre.la +@NOT_ON_WINDOWS@ echo "$(LIBTOOL) --mode=install $(INSTALL) libpcreposix.la $(DESTDIR)$(LIBDIR)/libpcreposix.la" +@NOT_ON_WINDOWS@ $(LIBTOOL) --mode=install $(INSTALL) libpcreposix.la $(DESTDIR)$(LIBDIR)/libpcreposix.la +@NOT_ON_WINDOWS@ $(LIBTOOL) --finish $(DESTDIR)$(LIBDIR) $(mkinstalldirs) $(DESTDIR)$(INCDIR) $(INSTALL_DATA) pcre.h $(DESTDIR)$(INCDIR)/pcre.h $(INSTALL_DATA) $(top_srcdir)/pcreposix.h $(DESTDIR)$(INCDIR)/pcreposix.h @@ -185,15 +253,15 @@ install: all $(INSTALL_DATA) $(top_srcdir)/doc/pcregrep.1 $(DESTDIR)$(MANDIR)/man1/pcregrep.1 $(INSTALL_DATA) $(top_srcdir)/doc/pcretest.1 $(DESTDIR)$(MANDIR)/man1/pcretest.1 $(mkinstalldirs) $(DESTDIR)$(BINDIR) - $(LIBTOOL) --mode=install $(INSTALL) pcregrep $(DESTDIR)$(BINDIR)/pcregrep - $(LIBTOOL) --mode=install $(INSTALL) pcretest $(DESTDIR)$(BINDIR)/pcretest + $(LIBTOOL) --mode=install $(INSTALL) pcregrep@EXEEXT@ $(DESTDIR)$(BINDIR)/pcregrep@EXEEXT@ + $(LIBTOOL) --mode=install $(INSTALL) pcretest@EXEEXT@ $(DESTDIR)$(BINDIR)/pcretest@EXEEXT@ $(INSTALL) pcre-config $(DESTDIR)$(BINDIR)/pcre-config # We deliberately omit dftables and chartables.c from 'make clean'; once made # chartables.c shouldn't change, and if people have edited the tables by hand, # you don't want to throw them away. -clean:; -rm -rf *.o *.lo *.a *.la .libs pcretest pcregrep testtry +clean:; -rm -rf *.@OBJEXT@ *.lo *.a *.la .libs pcretest@EXEEXT@ pcregrep@EXEEXT@ testtry # But "make distclean" should get back to a virgin distribution @@ -203,9 +271,12 @@ distclean: clean check: runtest +@WIN_PREFIX@pcre.dll : winshared + cp .libs/@WIN_PREFIX@pcre.dll . + test: runtest -runtest: all +runtest: all @ON_WINDOWS@ @WIN_PREFIX@pcre.dll ./RunTest # End @@ -466,7 +466,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 INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA build build_cpu build_vendor build_os host host_cpu host_vendor host_os LN_S ECHO RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP CPP EGREP LIBTOOL CC_FOR_BUILD CFLAGS_FOR_BUILD HAVE_MEMMOVE HAVE_STRERROR LINK_SIZE MATCH_LIMIT NEWLINE PCRE_MAJOR PCRE_MINOR PCRE_DATE PCRE_VERSION PCRE_LIB_VERSION PCRE_POSIXLIB_VERSION POSIX_MALLOC_THRESHOLD UTF8 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 INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA build build_cpu build_vendor build_os host host_cpu host_vendor host_os LN_S ECHO RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP CPP EGREP LIBTOOL BUILD_EXEEXT BUILD_OBJEXT CC_FOR_BUILD CFLAGS_FOR_BUILD HAVE_MEMMOVE HAVE_STRERROR LINK_SIZE MATCH_LIMIT NEWLINE PCRE_MAJOR PCRE_MINOR PCRE_DATE PCRE_VERSION PCRE_LIB_VERSION PCRE_POSIXLIB_VERSION POSIX_MALLOC_THRESHOLD 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. @@ -939,6 +939,12 @@ if test "$ac_init_help" = "long"; then # The list generated by autoconf has been trimmed to remove many # options that are totally irrelevant to PCRE (e.g. relating to X), # or are not supported by its Makefile. + # The list generated by autoconf has been trimmed to remove many + # options that are totally irrelevant to PCRE (e.g. relating to X), + # or are not supported by its Makefile. + # The list generated by autoconf has been trimmed to remove many + # options that are totally irrelevant to PCRE (e.g. relating to X), + # or are not supported by its Makefile. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. @@ -1427,13 +1433,16 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + ac_config_headers="$ac_config_headers config.h:config.in" PCRE_MAJOR=4 -PCRE_MINOR=1 -PCRE_DATE=12-Mar-2003 +PCRE_MINOR=2 +PCRE_DATE=14-Apr-2003 PCRE_VERSION=${PCRE_MAJOR}.${PCRE_MINOR} @@ -3999,7 +4008,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 4009 "configure"' > conftest.$ac_ext + echo '#line 4012 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -4539,7 +4548,7 @@ chmod -w . save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no -if { (eval echo configure:4549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then +if { (eval echo configure:4552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s out/conftest.err; then @@ -6209,7 +6218,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 6209 "configure" +#line 6212 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -6307,7 +6316,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 6307 "configure" +#line 6310 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -7039,6 +7048,8 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' CC_FOR_BUILD=${CC_FOR_BUILD:-'$(CC)'} CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD:-'$(CFLAGS)'} +BUILD_EXEEXT=${BUILD_EXEEXT:-'$(EXEEXT)'} +BUILD_OBJEXT=${BUILD_OBJEXT:-'$(OBJEXT)'} echo "$as_me:$LINENO: checking for ANSI C header files" >&5 @@ -7668,22 +7679,41 @@ fi; + + case $host_os in mingw* ) POSIX_OBJ=pcreposix.o POSIX_LOBJ=pcreposix.lo POSIX_LIB= + ON_WINDOWS= + NOT_ON_WINDOWS="#" + WIN_PREFIX= + ;; +cygwin* ) + ON_WINDOWS= + POSIX_OBJ=pcreposix.o + POSIX_LOBJ=pcreposix.lo + POSIX_LIB= + WIN_PREFIX=cyg + NOT_ON_WINDOWS="#" ;; * ) + ON_WINDOWS="#" + NOT_ON_WINDOWS= POSIX_OBJ= POSIX_LOBJ= POSIX_LIB=libpcreposix.la + WIN_PREFIX= ;; esac + + + if test "x$enable_shared" = "xno" ; then cat >>confdefs.h <<\_ACEOF #define PCRE_STATIC 1 @@ -8338,6 +8368,8 @@ s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t s,@LIBTOOL@,$LIBTOOL,;t t +s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t +s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t s,@CFLAGS_FOR_BUILD@,$CFLAGS_FOR_BUILD,;t t s,@HAVE_MEMMOVE@,$HAVE_MEMMOVE,;t t @@ -8353,6 +8385,9 @@ s,@PCRE_LIB_VERSION@,$PCRE_LIB_VERSION,;t t s,@PCRE_POSIXLIB_VERSION@,$PCRE_POSIXLIB_VERSION,;t t s,@POSIX_MALLOC_THRESHOLD@,$POSIX_MALLOC_THRESHOLD,;t t s,@UTF8@,$UTF8,;t t +s,@WIN_PREFIX@,$WIN_PREFIX,;t t +s,@ON_WINDOWS@,$ON_WINDOWS,;t t +s,@NOT_ON_WINDOWS@,$NOT_ON_WINDOWS,;t t s,@POSIX_OBJ@,$POSIX_OBJ,;t t s,@POSIX_LOBJ@,$POSIX_LOBJ,;t t s,@POSIX_LIB@,$POSIX_LIB,;t t diff --git a/configure.in b/configure.in index 574ad60..56580ee 100644 --- a/configure.in +++ b/configure.in @@ -5,6 +5,10 @@ dnl it should be seeing, to verify it is in the same directory. AC_INIT(dftables.c) +dnl A safety precaution + +AC_PREREQ(2.57) + dnl Arrange to build config.h from config.in. Note that pcre.h is dnl built differently, as it is just a "substitution" file. dnl Manual says this macro should come right after AC_INIT. @@ -17,8 +21,8 @@ dnl digits for minor numbers less than 10. There are unlikely to be dnl that many releases anyway. PCRE_MAJOR=4 -PCRE_MINOR=1 -PCRE_DATE=12-Mar-2003 +PCRE_MINOR=2 +PCRE_DATE=14-Apr-2003 PCRE_VERSION=${PCRE_MAJOR}.${PCRE_MINOR} dnl Default values for miscellaneous macros @@ -38,15 +42,19 @@ AC_PROG_INSTALL AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL -dnl This is the compiler for compiling a program to run on the local host +dnl We need to find a compiler for compiling a program to run on the local host dnl while building. It needs to be different from CC when cross-compiling. dnl There is a macro called AC_PROG_CC_FOR_BUILD in the GNU archive for -dnl figuring this out automatically, but I could not get it to work and I -dnl ran out of time. Therefore, these values will have to be set manually -dnl by people who are cross-compiling. +dnl figuring this out automatically. Unfortunately, it does not work with the +dnl latest versions of autoconf. So for the moment, we just default to the +dnl same values as the "main" compiler. People who are corss-compiling will +dnl just have to adjust the Makefile by hand or set these values when they +dnl run "configure". CC_FOR_BUILD=${CC_FOR_BUILD:-'$(CC)'} CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD:-'$(CFLAGS)'} +BUILD_EXEEXT=${BUILD_EXEEXT:-'$(EXEEXT)'} +BUILD_OBJEXT=${BUILD_OBJEXT:-'$(OBJEXT)'} dnl Checks for header files. @@ -120,6 +128,8 @@ AC_PROG_LIBTOOL dnl "Export" these variables +AC_SUBST(BUILD_EXEEXT) +AC_SUBST(BUILD_OBJEXT) AC_SUBST(CC_FOR_BUILD) AC_SUBST(CFLAGS_FOR_BUILD) AC_SUBST(HAVE_MEMMOVE) @@ -143,13 +153,30 @@ mingw* ) POSIX_OBJ=pcreposix.o POSIX_LOBJ=pcreposix.lo POSIX_LIB= + ON_WINDOWS= + NOT_ON_WINDOWS="#" + WIN_PREFIX= + ;; +cygwin* ) + ON_WINDOWS= + POSIX_OBJ=pcreposix.o + POSIX_LOBJ=pcreposix.lo + POSIX_LIB= + WIN_PREFIX=cyg + NOT_ON_WINDOWS="#" ;; * ) + ON_WINDOWS="#" + NOT_ON_WINDOWS= POSIX_OBJ= POSIX_LOBJ= POSIX_LIB=libpcreposix.la + WIN_PREFIX= ;; esac +AC_SUBST(WIN_PREFIX) +AC_SUBST(ON_WINDOWS) +AC_SUBST(NOT_ON_WINDOWS) AC_SUBST(POSIX_OBJ) AC_SUBST(POSIX_LOBJ) AC_SUBST(POSIX_LIB) diff --git a/doc/html/.html b/doc/html/.html deleted file mode 100644 index e69de29..0000000 --- a/doc/html/.html +++ /dev/null @@ -598,7 +598,7 @@ typedef struct recursion_info { doing the matching, so that they are thread-safe. */ typedef struct match_data { - int match_call_count; /* As it says */ + unsigned long int match_call_count; /* As it says */ unsigned long int match_limit;/* As it says */ int *offset_vector; /* Offset vector */ int offset_end; /* One past the end */ @@ -221,14 +221,14 @@ we know we are in UTF-8 mode. */ c = *eptr; \ if ((c & 0xc0) == 0xc0) \ { \ - int i; \ - int a = utf8_table4[c & 0x3f]; /* Number of additional bytes */ \ - int s = 6*a; \ - c = (c & utf8_table3[a]) << s; \ - for (i = 1; i <= a; i++) \ + int gcii; \ + int gcaa = utf8_table4[c & 0x3f]; /* Number of additional bytes */ \ + int gcss = 6*gcaa; \ + c = (c & utf8_table3[gcaa]) << gcss; \ + for (gcii = 1; gcii <= gcaa; gcii++) \ { \ - s -= 6; \ - c |= (eptr[i] & 0x3f) << s; \ + gcss -= 6; \ + c |= (eptr[gcii] & 0x3f) << gcss; \ } \ } @@ -239,13 +239,13 @@ know we are in UTF-8 mode. */ c = *eptr++; \ if ((c & 0xc0) == 0xc0) \ { \ - int a = utf8_table4[c & 0x3f]; /* Number of additional bytes */ \ - int s = 6*a; \ - c = (c & utf8_table3[a]) << s; \ - while (a-- > 0) \ + int gcaa = utf8_table4[c & 0x3f]; /* Number of additional bytes */ \ + int gcss = 6*gcaa; \ + c = (c & utf8_table3[gcaa]) << gcss; \ + while (gcaa-- > 0) \ { \ - s -= 6; \ - c |= (*eptr++ & 0x3f) << s; \ + gcss -= 6; \ + c |= (*eptr++ & 0x3f) << gcss; \ } \ } @@ -255,13 +255,13 @@ know we are in UTF-8 mode. */ c = *eptr++; \ if (md->utf8 && (c & 0xc0) == 0xc0) \ { \ - int a = utf8_table4[c & 0x3f]; /* Number of additional bytes */ \ - int s = 6*a; \ - c = (c & utf8_table3[a]) << s; \ - while (a-- > 0) \ + int gcaa = utf8_table4[c & 0x3f]; /* Number of additional bytes */ \ + int gcss = 6*gcaa; \ + c = (c & utf8_table3[gcaa]) << gcss; \ + while (gcaa-- > 0) \ { \ - s -= 6; \ - c |= (*eptr++ & 0x3f) << s; \ + gcss -= 6; \ + c |= (*eptr++ & 0x3f) << gcss; \ } \ } @@ -272,16 +272,16 @@ if there are extra bytes. This is called when we know we are in UTF-8 mode. */ c = *eptr; \ if ((c & 0xc0) == 0xc0) \ { \ - int i; \ - int a = utf8_table4[c & 0x3f]; /* Number of additional bytes */ \ - int s = 6*a; \ - c = (c & utf8_table3[a]) << s; \ - for (i = 1; i <= a; i++) \ + int gcii; \ + int gcaa = utf8_table4[c & 0x3f]; /* Number of additional bytes */ \ + int gcss = 6*gcaa; \ + c = (c & utf8_table3[gcaa]) << gcss; \ + for (gcii = 1; gcii <= gcaa; gcii++) \ { \ - s -= 6; \ - c |= (eptr[i] & 0x3f) << s; \ + gcss -= 6; \ + c |= (eptr[gcii] & 0x3f) << gcss; \ } \ - len += a; \ + len += gcaa; \ } /* If the pointer is not at the start of a character, move it back until @@ -1643,7 +1643,10 @@ for (;; ptr++) do { #ifdef SUPPORT_UTF8 - if (utf8 && c > 127) GETCHARLEN(c, ptr, ptr); + if (utf8 && c > 127) + { /* Braces are required because the */ + GETCHARLEN(c, ptr, ptr); /* macro generates multiple statements */ + } #endif /* Inside \Q...\E everything is literal except \E */ @@ -1936,7 +1939,9 @@ for (;; ptr++) reqbyte, save the previous value for reinstating. */ #ifdef SUPPORT_UTF8 - if (!class_utf8 && class_charcount == 1 && class_lastchar < 128) + if (class_charcount == 1 && + (!utf8 || + (!class_utf8 && class_lastchar < 128))) #else if (class_charcount == 1) #endif @@ -2645,17 +2650,17 @@ for (;; ptr++) for (i = 0; i < cd->names_found; i++) { - int c = memcmp(name, slot+2, namelen); - if (c == 0) + int crc = memcmp(name, slot+2, namelen); + if (crc == 0) { if (slot[2+namelen] == 0) { *errorptr = ERR43; goto FAILED; } - c = -1; /* Current name is substring */ + crc = -1; /* Current name is substring */ } - if (c < 0) + if (crc < 0) { memmove(slot + cd->name_entry_size, slot, (cd->names_found - i) * cd->name_entry_size); @@ -3153,7 +3158,7 @@ for (;; ptr++) else { - uschar *t = code - 1; /* After this code, t is at the */ + t = code - 1; /* After this code, t is at the */ while ((*t & 0xc0) == 0x80) t--; /* start of the last character */ /* If no previous first byte, set it from the first character, and @@ -4048,11 +4053,11 @@ while ((c = *(++ptr)) != 0) #ifdef SUPPORT_UTF8 if (utf8) { - int c; + int ch; int extra = 0; - GETCHARLEN(c, ptr, extra); - if (c > 127) class_optcount = 10; /* No optimization possible */ - if (c > 255) + GETCHARLEN(ch, ptr, extra); + if (ch > 127) class_optcount = 10; /* No optimization possible */ + if (ch > 255) { if (!class_utf8) { @@ -5599,7 +5604,7 @@ for (;;) It takes a bit more work in UTF-8 mode. Characters > 255 are assumed to be "non-word" characters. */ -#if SUPPORT_UTF8 +#ifdef SUPPORT_UTF8 if (md->utf8) { if (eptr == md->start_subject) prev_is_word = FALSE; else @@ -45,8 +45,8 @@ static BOOL whole_lines = FALSE; typedef struct option_item { int one_char; - char *long_name; - char *help_text; + const char *long_name; + const char *help_text; } option_item; static option_item optionlist[] = { @@ -85,7 +85,7 @@ recursion support". */ typedef DIR directory_type; -int +static int isdirectory(char *filename) { struct stat statbuf; @@ -94,13 +94,13 @@ if (stat(filename, &statbuf) < 0) return ((statbuf.st_mode & S_IFMT) == S_IFDIR)? '/' : 0; } -directory_type * +static directory_type * opendirectory(char *filename) { return opendir(filename); } -char * +static char * readdirectory(directory_type *dir) { for (;;) @@ -113,7 +113,7 @@ for (;;) return NULL; /* Keep compiler happy; never executed */ } -void +static void closedirectory(directory_type *dir) { closedir(dir); @@ -320,7 +320,7 @@ return rc; *************************************************/ static int -grep_or_recurse(char *filename, BOOL recurse, BOOL show_filenames, +grep_or_recurse(char *filename, BOOL dir_recurse, BOOL show_filenames, BOOL only_one_at_top) { int rc = 1; @@ -330,7 +330,7 @@ FILE *in; /* If the file is a directory and we are recursing, scan each file within it. The scanning code is localized so it can be made system-specific. */ -if ((sep = isdirectory(filename)) != 0 && recurse) +if ((sep = isdirectory(filename)) != 0 && dir_recurse) { char buffer[1024]; char *nextfile; @@ -347,7 +347,7 @@ if ((sep = isdirectory(filename)) != 0 && recurse) { int frc; sprintf(buffer, "%.512s%c%.128s", filename, sep, nextfile); - frc = grep_or_recurse(buffer, recurse, TRUE, FALSE); + frc = grep_or_recurse(buffer, dir_recurse, TRUE, FALSE); if (frc == 0 && rc == 1) rc = 0; } @@ -45,7 +45,7 @@ static int callout_extra; static int callout_fail_count; static int callout_fail_id; static int first_callout; -static int utf8; +static int use_utf8; static size_t gotten_store; @@ -155,7 +155,7 @@ Returns: > 0 => the number of bytes consumed -6 to 0 => malformed UTF-8 character at offset = (-return) */ -int +static int utf82ord(unsigned char *buffer, int *vptr) { int c = *buffer++; @@ -213,7 +213,7 @@ int yield = 0; while (length-- > 0) { - if (utf8) + if (use_utf8) { int rc = utf82ord(p, &c); @@ -270,7 +270,6 @@ int i, pre_start, post_start; if (callout_extra) { - int i; fprintf(f, "Callout %d: last capture = %d\n", cb->callout_number, cb->capture_last); @@ -516,7 +515,7 @@ while (!done) int do_showrest = 0; int erroroffset, len, delimiter; - utf8 = 0; + use_utf8 = 0; if (infile == stdin) printf(" re> "); if (fgets((char *)buffer, sizeof(buffer), infile) == NULL) break; @@ -609,7 +608,7 @@ while (!done) case 'S': do_study = 1; break; case 'U': options |= PCRE_UNGREEDY; break; case 'X': options |= PCRE_EXTRA; break; - case '8': options |= PCRE_UTF8; utf8 = 1; break; + case '8': options |= PCRE_UTF8; use_utf8 = 1; break; case 'L': ppp = pp; @@ -737,7 +736,7 @@ while (!done) new_info(re, NULL, PCRE_INFO_LASTLITERAL, &need_char); new_info(re, NULL, PCRE_INFO_NAMEENTRYSIZE, &nameentrysize); new_info(re, NULL, PCRE_INFO_NAMECOUNT, &namecount); - new_info(re, NULL, PCRE_INFO_NAMETABLE, &nametable); + new_info(re, NULL, PCRE_INFO_NAMETABLE, (void *)&nametable); old_count = pcre_info(re, &old_options, &old_first_char); if (count < 0) fprintf(outfile, @@ -803,7 +802,7 @@ while (!done) else { int ch = first_char & 255; - char *caseless = ((first_char & REQ_CASELESS) == 0)? + const char *caseless = ((first_char & REQ_CASELESS) == 0)? "" : " (caseless)"; if (isprint(ch)) fprintf(outfile, "First char = \'%c\'%s\n", ch, caseless); @@ -818,7 +817,7 @@ while (!done) else { int ch = need_char & 255; - char *caseless = ((need_char & REQ_CASELESS) == 0)? + const char *caseless = ((need_char & REQ_CASELESS) == 0)? "" : " (caseless)"; if (isprint(ch)) fprintf(outfile, "Need char = \'%c\'%s\n", ch, caseless); @@ -973,11 +972,11 @@ while (!done) c = c * 16 + tolower(*pt) - ((isdigit(*pt))? '0' : 'W'); if (*pt == '}') { - unsigned char buffer[8]; + unsigned char buff8[8]; int ii, utn; - utn = ord2utf8(c, buffer); - for (ii = 0; ii < utn - 1; ii++) *q++ = buffer[ii]; - c = buffer[ii]; /* Last byte */ + utn = ord2utf8(c, buff8); + for (ii = 0; ii < utn - 1; ii++) *q++ = buff8[ii]; + c = buff8[ii]; /* Last byte */ p = pt + 1; break; } @@ -1015,9 +1014,9 @@ while (!done) else if (isalnum(*p)) { uschar name[256]; - uschar *pp = name; - while (isalnum(*p)) *pp++ = *p++; - *pp = 0; + uschar *npp = name; + while (isalnum(*p)) *npp++ = *p++; + *npp = 0; n = pcre_get_stringnumber(re, (char *)name); if (n < 0) fprintf(outfile, "no parentheses with name \"%s\"\n", name); @@ -1068,9 +1067,9 @@ while (!done) else if (isalnum(*p)) { uschar name[256]; - uschar *pp = name; - while (isalnum(*p)) *pp++ = *p++; - *pp = 0; + uschar *npp = name; + while (isalnum(*p)) *npp++ = *p++; + *npp = 0; n = pcre_get_stringnumber(re, (char *)name); if (n < 0) fprintf(outfile, "no parentheses with name \"%s\"\n", name); @@ -137,9 +137,9 @@ for(;;) fprintf(f, "%3d ", charlength); while (charlength > 0) { - int extra = print_char(f, ccode, utf8); - ccode += 1 + extra; - charlength -= 1 + extra; + int extrabytes = print_char(f, ccode, utf8); + ccode += 1 + extrabytes; + charlength -= 1 + extrabytes; } } break; @@ -301,11 +301,11 @@ for(;;) if (*code == OP_XCLASS) { - int c; - while ((c = *ccode++) != XCL_END) + int ch; + while ((ch = *ccode++) != XCL_END) { ccode += 1 + print_char(f, ccode, TRUE); - if (c == XCL_RANGE) + if (ch == XCL_RANGE) { fprintf(f, "-"); ccode += 1 + print_char(f, ccode, TRUE); diff --git a/testdata/testinput1 b/testdata/testinput1 index 22bf6b1..137065f 100644 --- a/testdata/testinput1 +++ b/testdata/testinput1 @@ -3823,4 +3823,16 @@ /(a+)*b/ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +/(?i)reg(?:ul(?:[aä]|ae)r|ex)/ + REGular + regulaer + Regex + regulär + +/Åæåä[à-ÿÀ-ß]+/ + Åæåäà + Åæåäÿ + ÅæåäÀ + Åæåäß + / End of testinput1 / diff --git a/testdata/testinput4 b/testdata/testinput4 index 540660f..4d73a15 100644 --- a/testdata/testinput4 +++ b/testdata/testinput4 @@ -482,4 +482,17 @@ \x{101} y +/[\xFF]/ + >\xff< + +/[\xff]/8 + >\x{ff}< + +/[^\xFF]/ + XYZ + +/[^\xff]/8 + XYZ + \x{123} + / End of testinput4 / diff --git a/testdata/testinput5 b/testdata/testinput5 index ec1aa9a..9f07d6e 100644 --- a/testdata/testinput5 +++ b/testdata/testinput5 @@ -182,4 +182,14 @@ \x{100} Ä€ +/[\xFF]/D + >\xff< + +/[\xff]/D8 + >\x{ff}< + +/[^\xFF]/D + +/[^\xff]/8D + / End of testinput5 / diff --git a/testdata/testoutput1 b/testdata/testoutput1 index b5b01ad..a8617af 100644 --- a/testdata/testoutput1 +++ b/testdata/testoutput1 @@ -1,4 +1,4 @@ -PCRE version 4.1 12-Mar-2003 +PCRE version 4.2 14-Apr-2003 /the quick brown fox/ the quick brown fox @@ -6247,5 +6247,25 @@ No match aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa No match +/(?i)reg(?:ul(?:[aä]|ae)r|ex)/ + REGular + 0: REGular + regulaer + 0: regulaer + Regex + 0: Regex + regulär + 0: regul\xe4r + +/Åæåä[à-ÿÀ-ß]+/ + Åæåäà + 0: \xc5\xe6\xe5\xe4\xe0 + Åæåäÿ + 0: \xc5\xe6\xe5\xe4\xff + ÅæåäÀ + 0: \xc5\xe6\xe5\xe4\xc0 + Åæåäß + 0: \xc5\xe6\xe5\xe4\xdf + / End of testinput1 / diff --git a/testdata/testoutput2 b/testdata/testoutput2 index f9bb2ae..e16ccab 100644 --- a/testdata/testoutput2 +++ b/testdata/testoutput2 @@ -1,4 +1,4 @@ -PCRE version 4.1 12-Mar-2003 +PCRE version 4.2 14-Apr-2003 /(a)b|/ Capturing subpattern count = 1 diff --git a/testdata/testoutput3 b/testdata/testoutput3 index 4ec3489..42b62ba 100644 --- a/testdata/testoutput3 +++ b/testdata/testoutput3 @@ -1,4 +1,4 @@ -PCRE version 4.1 12-Mar-2003 +PCRE version 4.2 14-Apr-2003 /^[\w]+/ *** Failers diff --git a/testdata/testoutput4 b/testdata/testoutput4 index 18b4036..939acae 100644 --- a/testdata/testoutput4 +++ b/testdata/testoutput4 @@ -1,4 +1,4 @@ -PCRE version 4.1 12-Mar-2003 +PCRE version 4.2 14-Apr-2003 /-- 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 --/ @@ -836,5 +836,23 @@ No match y No match +/[\xFF]/ + >\xff< + 0: \xff + +/[\xff]/8 + >\x{ff}< + 0: \x{ff} + +/[^\xFF]/ + XYZ + 0: X + +/[^\xff]/8 + XYZ + 0: X + \x{123} + 0: \x{123} + / End of testinput4 / diff --git a/testdata/testoutput5 b/testdata/testoutput5 index c8daba0..b86adb8 100644 --- a/testdata/testoutput5 +++ b/testdata/testoutput5 @@ -1,4 +1,4 @@ -PCRE version 4.1 12-Mar-2003 +PCRE version 4.2 14-Apr-2003 /\x{100}/8DM Memory allocation (code space): 11 @@ -774,5 +774,57 @@ No need char Ä€ 0: \x{100} +/[\xFF]/D +------------------------------------------------------------------ + 0 6 Bra 0 + 3 1 \xff + 6 6 Ket + 9 End +------------------------------------------------------------------ +Capturing subpattern count = 0 +No options +First char = 255 +No need char + >\xff< + 0: \xff + +/[\xff]/D8 +------------------------------------------------------------------ + 0 36 Bra 0 + 3 [\xff] + 36 36 Ket + 39 End +------------------------------------------------------------------ +Capturing subpattern count = 0 +Options: utf8 +No first char +No need char + >\x{ff}< + 0: \x{ff} + +/[^\xFF]/D +------------------------------------------------------------------ + 0 5 Bra 0 + 3 [^\xff] + 5 5 Ket + 8 End +------------------------------------------------------------------ +Capturing subpattern count = 0 +No options +No first char +No need char + +/[^\xff]/8D +------------------------------------------------------------------ + 0 36 Bra 0 + 3 [\x00-\xfe] (neg) + 36 36 Ket + 39 End +------------------------------------------------------------------ +Capturing subpattern count = 0 +Options: utf8 +No first char +No need char + / End of testinput5 / |