httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pgollu...@apache.org
Subject svn commit: r598339 [5/37] - in /httpd/httpd/vendor/pcre/current: ./ doc/ doc/html/ testdata/
Date Mon, 26 Nov 2007 16:50:09 GMT
Modified: httpd/httpd/vendor/pcre/current/NON-UNIX-USE
URL: http://svn.apache.org/viewvc/httpd/httpd/vendor/pcre/current/NON-UNIX-USE?rev=598339&r1=598338&r2=598339&view=diff
==============================================================================
--- httpd/httpd/vendor/pcre/current/NON-UNIX-USE (original)
+++ httpd/httpd/vendor/pcre/current/NON-UNIX-USE Mon Nov 26 08:49:53 2007
@@ -1,187 +1,330 @@
 Compiling PCRE on non-Unix systems
 ----------------------------------
 
-See below for comments on Cygwin or MinGW and OpenVMS usage. I (Philip Hazel)
-have no knowledge of Windows or VMS sytems and how their libraries work. The
-items in the PCRE Makefile that relate to anything other than Unix-like systems
-have been contributed by PCRE users. There are some other comments and files in
-the Contrib directory on the ftp site that you may find useful. See
+This document contains the following sections:
+
+  General
+  Generic instructions for the PCRE C library
+  The C++ wrapper functions
+  Building for virtual Pascal
+  Stack size in Windows environments
+  Comments about Win32 builds
+  Building PCRE with CMake
+  Building under Windows with BCC5.5
+  Building PCRE on OpenVMS
+
+
+GENERAL
+
+I (Philip Hazel) have no experience of Windows or VMS sytems and how their
+libraries work. The items in the PCRE distribution and Makefile that relate to
+anything other than Unix-like systems are untested by me.
+
+There are some other comments and files in the Contrib directory on the ftp
+site that you may find useful. See
 
   ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/Contrib
 
-If you want to compile PCRE for a non-Unix system (or perhaps, more strictly,
-for a system that does not support "configure" and "make" files), note that
-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
-
-The following are generic comments about building PCRE. The interspersed
-indented commands are suggestions from Mark Tetrode as to which commands you
-might use on a Windows system to build a static library.
-
-(1) Copy or rename the file config.in as config.h, and change the macros that
-define HAVE_STRERROR and HAVE_MEMMOVE to define them as 1 rather than 0.
-Unfortunately, because of the way Unix autoconf works, the default setting has
-to be 0. You may also want to make changes to other macros in config.h. In
-particular, if you want to force a specific value for newline, you can define
-the NEWLINE macro. The default is to use '\n', thereby using whatever value
-your compiler gives to '\n'.
-
-  rem Mark Tetrode's commands
-  copy config.in config.h
-  rem Use write, because notepad cannot handle UNIX files. Change values.
-  write config.h
-
-(2) Copy or rename the file pcre.in as pcre.h, and change the macro definitions
-for PCRE_MAJOR, PCRE_MINOR, and PCRE_DATE near its start to the values set in
-configure.in.
-
-  rem Mark Tetrode's commands
-  copy pcre.in pcre.h
-  rem Read values from configure.in
-  write configure.in
-  rem Change values
-  write pcre.h
-
-(3) Compile dftables.c as a stand-alone program, and then run it with
-the single argument "chartables.c". This generates a set of standard
-character tables and writes them to that file.
-
-  rem Mark Tetrode's commands
-  rem Compile & run
-  cl -DSUPPORT_UTF8 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.
-
-  rem Mark Tetrode's commands, for a static library
-  rem Compile & lib
-  cl -DSUPPORT_UTF8 -DPOSIX_MALLOC_THRESHOLD=10 /c maketables.c get.c study.c pcre.c
-  lib /OUT:pcre.lib maketables.obj get.obj study.obj pcre.obj
-
-(5) Similarly, compile pcreposix.c and link it (on its own) as the pcreposix
-library.
-
-  rem Mark Tetrode's commands, for a static library
-  rem Compile & lib
-  cl -DSUPPORT_UTF8 -DPOSIX_MALLOC_THRESHOLD=10 /c pcreposix.c
-  lib /OUT:pcreposix.lib pcreposix.obj
-
-(6) Compile the test program pcretest.c. This needs the functions in the
-pcre and pcreposix libraries when linking.
-
-  rem Mark Tetrode's commands
-  rem compile & link
-  cl pcretest.c pcre.lib pcreposix.lib
-
-(7) Run pcretest on the testinput files in the testdata directory, and check
-that the output matches the corresponding testoutput files. You must use the
--i option when checking testinput2. Note that the supplied files are in Unix
-format, with just LF characters as line terminators. You may need to edit them
-to change this if your system uses a different convention.
-
-  rem Mark Tetrode's commands
-  rem Make a change, i.e. space, backspace, and save again - do this for all
-  rem to change UNIX to Win, \n to \n\r
-  write testoutput1
-  write testoutput2
-  write testoutput3
-  write testoutput4
-  write testoutput5
-  pcretest testdata\testinput1 testdata\myoutput1
-  windiff testdata\testoutput1 testdata\myoutput1
-  pcretest -i testdata\testinput2 testdata\myoutput2
-  windiff testdata\testoutput2 testdata\myoutput2
-  pcretest testdata\testinput3 testdata\myoutput3
-  windiff testdata\testoutput3 testdata\myoutput3
-  pcretest testdata\testinput4 testdata\myoutput4
-  windiff testdata\testoutput4 testdata\myoutput4
-  pcretest testdata\testinput5 testdata\myoutput5
-  windiff testdata\testoutput5 testdata\myoutput5
-
-
-FURTHER REMARKS
-
-If you have a system without "configure" but where you can use a Makefile, edit
-Makefile.in to create Makefile, substituting suitable values for the variables
-at the head of the file.
-
-Some help in building a Win32 DLL of PCRE in GnuWin32 environments was
-contributed by Paul Sokolovsky. These environments are Mingw32
-(http://www.xraylith.wisc.edu/~khan/software/gnu-win32/) and CygWin
-(http://sourceware.cygnus.com/cygwin/). Paul comments:
-
-  For CygWin, set CFLAGS=-mno-cygwin, and do 'make dll'. You'll get
-  pcre.dll (containing pcreposix also), libpcre.dll.a, and dynamically
-  linked pgrep and pcretest. If you have /bin/sh, run RunTest (three
-  main test go ok, locale not supported).
-
-Changes to do MinGW with autoconf 2.50 were supplied by Fred Cox
-<sailorFred@yahoo.com>, who comments as follows:
-
-  If you are using the PCRE DLL, the normal Unix style configure && make &&
-  make check && make install should just work[*]. If you want to statically
-  link against the .a file, you must define PCRE_STATIC before including
-  pcre.h, otherwise the pcre_malloc and pcre_free exported functions will be
-  declared __declspec(dllimport), with hilarious results.  See the configure.in
-  and pcretest.c for how it is done for the static test.
-
-  Also, there will only be a libpcre.la, not a libpcreposix.la, as you
-  would expect from the Unix version. The single DLL includes the pcreposix
-  interface.
-
-[*] But note that the supplied test files are in Unix format, with just LF
-characters as line terminators. You will have to edit them to change to CR LF
-terminators.
+If you want to compile PCRE for a non-Unix system (especially for a system that
+does not support "configure" and "make" files), note that the basic PCRE
+library consists entirely of code written in Standard C, and so should compile
+successfully on any system that has a Standard C compiler and library. The C++
+wrapper functions are a separate issue (see below).
+
+The PCRE distribution includes support for CMake. This support is relatively
+new, but has already been used successfully to build PCRE in multiple build
+environments on Windows. There are some instructions in the section entitled
+"Building PCRE with CMake" below.
+
+
+GENERIC INSTRUCTIONS FOR THE PCRE C LIBRARY
+
+The following are generic comments about building the PCRE C library "by hand".
+
+ (1) Copy or rename the file config.h.generic as config.h, and edit the macro
+     settings that it contains to whatever is appropriate for your environment.
+     In particular, if you want to force a specific value for newline, you can
+     define the NEWLINE macro. When you compile any of the PCRE modules, you
+     must specify -DHAVE_CONFIG_H to your compiler so that config.h is included
+     in the sources.
+
+     An alternative approach is not to edit config.h, but to use -D on the
+     compiler command line to make any changes that you need to the
+     configuration options. In this case -DHAVE_CONFIG_H must not be set.
+
+     NOTE: There have been occasions when the way in which certain parameters
+     in config.h are used has changed between releases. (In the configure/make
+     world, this is handled automatically.) When upgrading to a new release,
+     you are strongly advised to review config.h.generic before re-using what
+     you had previously.
+
+ (2) Copy or rename the file pcre.h.generic as pcre.h.
+
+ (3) EITHER:
+       Copy or rename file pcre_chartables.c.dist as pcre_chartables.c.
+
+     OR:
+       Compile dftables.c as a stand-alone program (using -DHAVE_CONFIG_H if
+       you have set up config.h), and then run it with the single argument
+       "pcre_chartables.c". This generates a set of standard character tables
+       and writes them to that file. The tables are generated using the default
+       C locale for your system. If you want to use a locale that is specified
+       by LC_xxx environment variables, add the -L option to the dftables
+       command. You must use this method if you are building on a system that
+       uses EBCDIC code.
+
+     The tables in pcre_chartables.c are defaults. The caller of PCRE can
+     specify alternative tables at run time.
+
+ (4) Ensure that you have the following header files:
+
+       pcre_internal.h
+       ucp.h
+       ucpinternal.h
+       ucptable.h
+
+ (5) Also ensure that you have the following file, which is #included as source
+     when building a debugging version of PCRE and is also used by pcretest.
+
+       pcre_printint.src
+
+ (6) Compile the following source files, setting -DHAVE_CONFIG_H as a compiler
+     option if you have set up config.h with your configuration, or else use
+     other -D settings to change the configuration as required.
+
+       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_newline.c
+       pcre_ord2utf8.c
+       pcre_refcount.c
+       pcre_study.c
+       pcre_tables.c
+       pcre_try_flipped.c
+       pcre_ucp_searchfuncs.c
+       pcre_valid_utf8.c
+       pcre_version.c
+       pcre_xclass.c
+
+     Make sure that you include -I. in the compiler command (or equivalent for
+     an unusual compiler) so that all included PCRE header files are first
+     sought in the current directory. Otherwise you run the risk of picking up
+     a previously-installed file from somewhere else.
+
+ (7) Now link all the compiled code into an object library in whichever form
+     your system keeps such libraries. This is the basic PCRE C library. If
+     your system has static and shared libraries, you may have to do this once
+     for each type.
+
+ (8) Similarly, compile pcreposix.c (remembering -DHAVE_CONFIG_H if necessary)
+     and link the result (on its own) as the pcreposix library.
+
+ (9) Compile the test program pcretest.c (again, don't forget -DHAVE_CONFIG_H).
+     This needs the functions in the pcre and pcreposix libraries when linking.
+     It also needs the pcre_printint.src source file, which it #includes.
+
+(10) Run pcretest on the testinput files in the testdata directory, and check
+     that the output matches the corresponding testoutput files. Note that the
+     supplied files are in Unix format, with just LF characters as line
+     terminators. You may need to edit them to change this if your system uses
+     a different convention. If you are using Windows, you probably should use
+     the wintestinput3 file instead of testinput3 (and the corresponding output
+     file). This is a locale test; wintestinput3 sets the locale to "french"
+     rather than "fr_FR", and there some minor output differences.
+
+(11) If you want to use the pcregrep command, compile and link pcregrep.c; it
+     uses only the basic PCRE library (it does not need the pcreposix library).
+
+
+THE C++ WRAPPER FUNCTIONS
+
+The PCRE distribution also 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.
+
+
+BUILDING FOR VIRTUAL PASCAL
 
 A script for building PCRE using Borland's C++ compiler for use with VPASCAL
-was contributed by Alexander Tokarev. It is called makevp.bat.
+was contributed by Alexander Tokarev. Stefan Weber updated the script and added
+additional files. The following files in the distribution are for building PCRE
+for use with VP/Borland: makevp_c.txt, makevp_l.txt, makevp.bat, pcregexp.pas.
 
-These are some further comments about Win32 builds from Mark Evans. They
-were contributed before Fred Cox's changes were made, so it is possible that
-they may no longer be relevant.
-
-"The documentation for Win32 builds is a bit shy.  Under MSVC6 I
-followed their instructions to the letter, but there were still
-some things missing.
-
-(1) Must #define STATIC for entire project if linking statically.
-    (I see no reason to use DLLs for code this compact.)  This of
-    course is a project setting in MSVC under Preprocessor.
-
-(2) Missing some #ifdefs relating to the function pointers
-    pcre_malloc and pcre_free.  See my solution below.  (The stubs
-    may not be mandatory but they made me feel better.)"
 
-=========================
-#ifdef _WIN32
-#include <malloc.h>
+STACK SIZE IN WINDOWS ENVIRONMENTS
 
-void* malloc_stub(size_t N)
-{ return malloc(N); }
-void free_stub(void* p)
-{ free(p); }
-void *(*pcre_malloc)(size_t) = &malloc_stub;
-void  (*pcre_free)(void *) = &free_stub;
+The default processor stack size of 1Mb in some Windows environments is too
+small for matching patterns that need much recursion. In particular, test 2 may
+fail because of this. Normally, running out of stack causes a crash, but there
+have been cases where the test program has just died silently. See your linker
+documentation for how to increase stack size if you experience problems. The
+Linux default of 8Mb is a reasonable choice for the stack, though even that can
+be too small for some pattern/subject combinations.
 
-#else
+PCRE has a compile configuration option to disable the use of stack for
+recursion so that heap is used instead. However, pattern matching is
+significantly slower when this is done. There is more about stack usage in the
+"pcrestack" documentation.
 
-void *(*pcre_malloc)(size_t) = malloc;
-void  (*pcre_free)(void *) = free;
 
-#endif
-=========================
+COMMENTS ABOUT WIN32 BUILDS (see also "BUILDING PCRE WITH CMAKE" below)
+
+There are two ways of building PCRE using the "configure, make, make install"
+paradigm on Windows systems: using MinGW or using Cygwin. These are not at all
+the same thing; they are completely different from each other. There is also
+some experimental, undocumented support for building using "cmake", which you
+might like to try if you are familiar with "cmake". However, at the present
+time, the "cmake" process builds only a static library (not a dll), and the
+tests are not automatically run.
+
+The MinGW home page (http://www.mingw.org/) says this:
+
+  MinGW: A collection of freely available and freely distributable Windows
+  specific header files and import libraries combined with GNU toolsets that
+  allow one to produce native Windows programs that do not rely on any
+  3rd-party C runtime DLLs.
+
+The Cygwin home page (http://www.cygwin.com/) says this:
+
+  Cygwin is a Linux-like environment for Windows. It consists of two parts:
+
+  . A DLL (cygwin1.dll) which acts as a Linux API emulation layer providing
+    substantial Linux API functionality
+
+  . A collection of tools which provide Linux look and feel.
+
+  The Cygwin DLL currently works with all recent, commercially released x86 32
+  bit and 64 bit versions of Windows, with the exception of Windows CE.
+
+On both MinGW and Cygwin, PCRE should build correctly using:
+
+  ./configure && make && make install
+
+This should create two libraries called libpcre and libpcreposix, and, if you
+have enabled building the C++ wrapper, a third one called libpcrecpp. These are
+independent libraries: when you like with libpcreposix or libpcrecpp you must
+also link with libpcre, which contains the basic functions. (Some earlier
+releases of PCRE included the basic libpcre functions in libpcreposix. This no
+longer happens.)
+
+If you want to statically link your program against a non-dll .a file, you must
+define PCRE_STATIC before including pcre.h, otherwise the pcre_malloc() and
+pcre_free() exported functions will be declared __declspec(dllimport), with
+unwanted results.
+
+Using Cygwin's compiler generates libraries and executables that depend on
+cygwin1.dll. If a library that is generated this way is distributed,
+cygwin1.dll has to be distributed as well. Since cygwin1.dll is under the GPL
+licence, this forces not only PCRE to be under the GPL, but also the entire
+application. A distributor who wants to keep their own code proprietary must
+purchase an appropriate Cygwin licence.
+
+MinGW has no such restrictions. The MinGW compiler generates a library or
+executable that can run standalone on Windows without any third party dll or
+licensing issues.
+
+But there is more complication:
+
+If a Cygwin user uses the -mno-cygwin Cygwin gcc flag, what that really does is
+to tell Cygwin's gcc to use the MinGW gcc. Cygwin's gcc is only acting as a
+front end to MinGW's gcc (if you install Cygwin's gcc, you get both Cygwin's
+gcc and MinGW's gcc). So, a user can:
+
+. Build native binaries by using MinGW or by getting Cygwin and using
+  -mno-cygwin.
+
+. Build binaries that depend on cygwin1.dll by using Cygwin with the normal
+  compiler flags.
+
+The test files that are supplied with PCRE are in Unix format, with LF
+characters as line terminators. It may be necessary to change the line
+terminators in order to get some of the tests to work. We hope to improve
+things in this area in future.
+
+
+BUILDING PCRE WITH CMAKE
+
+CMake is an alternative build facility that can be used instead of the
+traditional Unix "configure". CMake version 2.4.7 supports Borland makefiles,
+MinGW makefiles, MSYS makefiles, NMake makefiles, UNIX makefiles, Visual Studio
+6, Visual Studio 7, Visual Studio 8, and Watcom W8. The following instructions
+were contributed by a PCRE user.
+
+1. Download CMake 2.4.7 or above from http://www.cmake.org/, install and ensure
+   that cmake\bin is on your path.
+
+2. Unzip (retaining folder structure) the PCRE source tree into a source
+   directory such as C:\pcre.
+
+3. Create a new, empty build directory: C:\pcre\build\
+
+4. Run CMakeSetup from the Shell envirornment of your build tool, e.g., Msys
+   for Msys/MinGW or Visual Studio Command Prompt for VC/VC++
+
+5. Enter C:\pcre\pcre-xx and C:\pcre\build for the source and build
+   directories, respectively
+
+6. Hit the "Configure" button.
+
+7. Select the particular IDE / build tool that you are using (Visual Studio,
+   MSYS makefiles, MinGW makefiles, etc.)
+
+8. The GUI will then list several configuration options. This is where you can
+   enable UTF-8 support, etc.
+
+9. Hit "Configure" again. The adjacent "OK" button should now be active.
+
+10. Hit "OK".
+
+11. The build directory should now contain a usable build system, be it a
+    solution file for Visual Studio, makefiles for MinGW, etc.
+
+Testing with RunTest.bat
+
+1. Copy RunTest.bat into the directory where pcretest.exe has been created.
+
+2. Edit RunTest.bat and insert a line that indentifies the relative location of
+   the pcre source, e.g.:
+
+   set srcdir=..\pcre-7.4-RC3
+
+3. Run RunTest.bat from a command shell environment. Test outputs will
+   automatically be compared to expected results, and discrepancies will
+   identified in the console output.
+
+4. To test pcrecpp, run pcrecpp_unittest.exe, pcre_stringpiece_unittest.exe and
+   pcre_scanner_unittest.exe.
+
+
+BUILDING UNDER WINDOWS WITH BCC5.5
+
+Michael Roy sent these comments about building PCRE under Windows with BCC5.5:
+
+  Some of the core BCC libraries have a version of PCRE from 1998 built in,
+  which can lead to pcre_exec() giving an erroneous PCRE_ERROR_NULL from a
+  version mismatch. I'm including an easy workaround below, if you'd like to
+  include it in the non-unix instructions:
+
+  When linking a project with BCC5.5, pcre.lib must be included before any of
+  the libraries cw32.lib, cw32i.lib, cw32mt.lib, and cw32mti.lib on the command
+  line.
 
 
 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
@@ -241,4 +384,5 @@
 $!
 =========================
 
+Last Updated: 21 September 2007
 ****

Added: httpd/httpd/vendor/pcre/current/PrepareRelease
URL: http://svn.apache.org/viewvc/httpd/httpd/vendor/pcre/current/PrepareRelease?rev=598339&view=auto
==============================================================================
--- httpd/httpd/vendor/pcre/current/PrepareRelease (added)
+++ httpd/httpd/vendor/pcre/current/PrepareRelease Mon Nov 26 08:49:53 2007
@@ -0,0 +1,214 @@
+#/bin/sh
+
+# Script to prepare the files for building a PCRE release. It does some
+# processing of the documentation, detrails files, and creates pcre.h.generic
+# and config.h.generic (for use by builders who can't run ./configure).
+
+# You must run this script before runnning "make dist". It makes use of the
+# following files:
+
+# 132html     A Perl script that converts a .1 or .3 man page into HTML. It
+#             is called from MakeRelease. It "knows" the relevant troff
+#             constructs that are used in the PCRE man pages.
+
+# CleanTxt    A Perl script that cleans up the output of "nroff -man" by
+#             removing backspaces and other redundant text so as to produce
+#             a readable .txt file.
+
+# Detrail     A Perl script that removes trailing spaces from files.
+
+# doc/index.html.src
+#             A file that is copied as index.html into the doc/html directory
+#             when the HTML documentation is built. It works like this so that
+#             doc/html can be deleted and re-created from scratch.
+
+
+# First, sort out the documentation
+
+cd doc
+echo Processing documentation
+
+# Make Text form of the documentation. It needs some mangling to make it
+# tidy for online reading. Concatenate all the .3 stuff, but omit the
+# individual function pages.
+
+cat <<End >pcre.txt
+-----------------------------------------------------------------------------
+This file contains a concatenation of the PCRE man pages, converted to plain
+text format for ease of searching with a text editor, or for use on systems
+that do not have a man page processor. The small individual files that give
+synopses of each function in the library have not been included. There are
+separate text files for the pcregrep and pcretest commands.
+-----------------------------------------------------------------------------
+
+
+End
+
+echo "Making pcre.txt"
+for file in pcre pcrebuild pcrematching pcreapi pcrecallout pcrecompat \
+            pcrepattern pcresyntax pcrepartial pcreprecompile \
+            pcreperform pcreposix pcrecpp pcresample pcrestack ; do
+  echo "  Processing $file.3"
+  nroff -c -man $file.3 >$file.rawtxt
+  ../CleanTxt <$file.rawtxt >>pcre.txt
+  /bin/rm $file.rawtxt
+  echo "------------------------------------------------------------------------------" >>pcre.txt
+  if [ "$file" != "pcresample" ] ; then
+    echo " " >>pcre.txt
+    echo " " >>pcre.txt
+  fi
+done
+
+# The three commands
+for file in pcretest pcregrep pcre-config ; do
+  echo Making $file.txt
+  nroff -c -man $file.1 >$file.rawtxt
+  ../CleanTxt <$file.rawtxt >$file.txt
+  /bin/rm $file.rawtxt
+done
+
+
+# Make HTML form of the documentation.
+
+echo "Making HTML documentation"
+/bin/rm html/*
+cp index.html.src html/index.html
+
+for file in *.1 ; do
+  base=`basename $file .1`
+  echo "  Making $base.html"
+  ../132html -toc $base <$file >html/$base.html
+done
+
+# Exclude table of contents for function summaries. It seems that expr
+# forces an anchored regex. Also exclude them for small pages that have
+# only one section.
+for file in *.3 ; do
+  base=`basename $file .3`
+  toc=-toc
+  if [ `expr $base : '.*_'` -ne 0 ] ; then toc="" ; fi
+  if [ "$base" = "pcresample" ] || \
+     [ "$base" = "pcrestack" ]  || \
+     [ "$base" = "pcrecompat" ] || \
+     [ "$base" = "pcreperform" ] ; then
+    toc=""
+  fi
+  echo "  Making $base.html"
+  ../132html $toc $base <$file >html/$base.html
+  if [ $? != 0 ] ; then exit 1; fi
+done
+
+# End of documentation processing
+
+cd ..
+echo Documentation done
+
+# These files are detrailed; do not detrail the test data because there may be
+# significant trailing spaces. The configure files are also omitted from the
+# detrailing.
+
+files="\
+  Makefile.am \
+  Makefile.in \
+  configure.ac \
+  README \
+  LICENCE \
+  COPYING \
+  AUTHORS \
+  NEWS \
+  NON-UNIX-USE \
+  INSTALL \
+  132html \
+  CleanTxt \
+  Detrail \
+  ChangeLog \
+  CMakeLists.txt \
+  RunGrepTest \
+  RunTest \
+  RunTest.bat \
+  pcre-config.in \
+  libpcre.pc.in \
+  libpcrecpp.pc.in \
+  config.h.in \
+  pcre_printint.src \
+  pcre_chartables.c.dist \
+  pcredemo.c \
+  pcregrep.c \
+  pcretest.c \
+  dftables.c \
+  pcreposix.c \
+  pcreposix.h \
+  pcre.h.in \
+  pcre_internal.h
+  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_newline.c \
+  pcre_ord2utf8.c \
+  pcre_refcount.c \
+  pcre_study.c \
+  pcre_tables.c \
+  pcre_try_flipped.c \
+  pcre_ucp_searchfuncs.c \
+  pcre_valid_utf8.c \
+  pcre_version.c \
+  pcre_xclass.c \
+  pcre_scanner.cc \
+  pcre_scanner.h \
+  pcre_scanner_unittest.cc \
+  pcrecpp.cc \
+  pcrecpp.h \
+  pcrecpparg.h.in \
+  pcrecpp_unittest.cc \
+  pcre_stringpiece.cc \
+  pcre_stringpiece.h.in \
+  pcre_stringpiece_unittest.cc \
+  perltest.pl \
+  ucp.h \
+  ucpinternal.h \
+  ucptable.h \
+  makevp.bat \
+  pcre.def \
+  libpcre.def \
+  libpcreposix.def"
+
+echo Detrailing
+./Detrail $files doc/p* doc/html/*
+
+echo Doing basic configure to get default pcre.h and config.h
+# This is in case the caller has set aliases (as I do - PH)
+unset cp ls mv rm
+./configure >/dev/null
+
+echo Converting pcre.h and config.h to generic forms
+cp -f pcre.h pcre.h.generic
+
+perl <<'END'
+  open(IN, "<config.h") || die "Can't open config.h: $!\n";
+  open(OUT, ">config.h.generic") || die "Can't open config.h.generic: $!\n";
+  while (<IN>)
+    {
+    if (/^#define\s(?!PACKAGE)(\w+)/)
+      {
+      print OUT "#ifndef $1\n";
+      print OUT;
+      print OUT "#endif\n";
+      }
+    else
+      {
+      print OUT;
+      }
+    }
+  close IN;
+  close OUT;
+END
+
+echo Done
+
+#End

Propchange: httpd/httpd/vendor/pcre/current/PrepareRelease
------------------------------------------------------------------------------
    svn:executable = *

Modified: httpd/httpd/vendor/pcre/current/README
URL: http://svn.apache.org/viewvc/httpd/httpd/vendor/pcre/current/README?rev=598339&r1=598338&r2=598339&view=diff
==============================================================================
--- httpd/httpd/vendor/pcre/current/README (original)
+++ httpd/httpd/vendor/pcre/current/README Mon Nov 26 08:49:53 2007
@@ -5,43 +5,82 @@
 
   ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-xxx.tar.gz
 
+There is a mailing list for discussion about the development of PCRE at
+
+  pcre-dev@exim.org
+
 Please read the NEWS file if you are upgrading from a previous release.
+The contents of this README file are:
 
-PCRE has its own native API, but a set of "wrapper" functions that are based on
-the POSIX API are also supplied in the library libpcreposix. Note that this
-just provides a POSIX calling interface to PCRE: the regular expressions
-themselves still follow Perl syntax and semantics. The header file
-for the POSIX-style functions is called pcreposix.h. The official POSIX name is
-regex.h, but I didn't want to risk possible problems with existing files of
-that name by distributing it that way. To use it with an existing program that
-uses the POSIX API, it will have to be renamed or pointed at by a link.
+  The PCRE APIs
+  Documentation for PCRE
+  Contributions by users of PCRE
+  Building PCRE on non-Unix systems
+  Building PCRE on Unix-like systems
+  Retrieving configuration information on Unix-like systems
+  Shared libraries on Unix-like systems
+  Cross-compiling on Unix-like systems
+  Using HP's ANSI C++ compiler (aCC)
+  Making new tarballs
+  Testing PCRE
+  Character tables
+  File manifest
+
+
+The PCRE APIs
+-------------
+
+PCRE is written in C, and it has its own API. The distribution also includes a
+set of C++ wrapper functions (see the pcrecpp man page for details), courtesy
+of Google Inc.
+
+In addition, there is a set of C wrapper functions that are based on the POSIX
+regular expression API (see the pcreposix man page). These end up in the
+library called libpcreposix. Note that this just provides a POSIX calling
+interface to PCRE; the regular expressions themselves still follow Perl syntax
+and semantics. The POSIX API is restricted, and does not give full access to
+all of PCRE's facilities.
+
+The header file for the POSIX-style functions is called pcreposix.h. The
+official POSIX name is regex.h, but I did not want to risk possible problems
+with existing files of that name by distributing it that way. To use PCRE with
+an existing program that uses the POSIX API, pcreposix.h will have to be
+renamed or pointed at by a link.
 
 If you are using the POSIX interface to PCRE and there is already a POSIX regex
-library installed on your system, you must take care when linking programs to
+library installed on your system, as well as worrying about the regex.h header
+file (as mentioned above), you must also take care when linking programs to
 ensure that they link with PCRE's libpcreposix library. Otherwise they may pick
-up the "real" POSIX functions of the same name.
+up the POSIX functions of the same name from the other library.
+
+One way of avoiding this confusion is to compile PCRE with the addition of
+-Dregcomp=PCREregcomp (and similarly for the other POSIX functions) to the
+compiler flags (CFLAGS if you are using "configure" -- see below). This has the
+effect of renaming the functions so that the names no longer clash. Of course,
+you have to do the same thing for your applications, or write them using the
+new names.
 
 
 Documentation for PCRE
 ----------------------
 
-If you install PCRE in the normal way, you will end up with an installed set of
-man pages whose names all start with "pcre". The one that is called "pcre"
-lists all the others. In addition to these man pages, the PCRE documentation is
-supplied in two other forms; however, as there is no standard place to install
-them, they are left in the doc directory of the unpacked source distribution.
-These forms are:
-
-  1. Files called doc/pcre.txt, doc/pcregrep.txt, and doc/pcretest.txt. The
-     first of these is a concatenation of the text forms of all the section 3
-     man pages except those that summarize individual functions. The other two
-     are the text forms of the section 1 man pages for the pcregrep and
-     pcretest commands. Text forms are provided for ease of scanning with text
-     editors or similar tools.
-
-  2. A subdirectory called doc/html contains all the documentation in HTML
-     form, hyperlinked in various ways, and rooted in a file called
-     doc/index.html.
+If you install PCRE in the normal way on a Unix-like system, you will end up
+with a set of man pages whose names all start with "pcre". The one that is just
+called "pcre" lists all the others. In addition to these man pages, the PCRE
+documentation is supplied in two other forms:
+
+  1. There are files called doc/pcre.txt, doc/pcregrep.txt, and
+     doc/pcretest.txt in the source distribution. The first of these is a
+     concatenation of the text forms of all the section 3 man pages except
+     those that summarize individual functions. The other two are the text
+     forms of the section 1 man pages for the pcregrep and pcretest commands.
+     These text forms are provided for ease of scanning with text editors or
+     similar tools. They are installed in <prefix>/share/doc/pcre, where
+     <prefix> is the installation prefix (defaulting to /usr/local).
+
+  2. A set of files containing all the documentation in HTML form, hyperlinked
+     in various ways, and rooted in a file called index.html, is distributed in
+     doc/html and installed in <prefix>/share/doc/pcre/html.
 
 
 Contributions by users of PCRE
@@ -51,24 +90,48 @@
 
   ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/Contrib
 
-where there is also a README file giving brief descriptions of what they are.
-Several of them provide support for compiling PCRE on various flavours of
-Windows systems (I myself do not use Windows). Some are complete in themselves;
-others are pointers to URLs containing relevant files.
-
-
-Building PCRE on a Unix-like system
------------------------------------
+There is a README file giving brief descriptions of what they are. Some are
+complete in themselves; others are pointers to URLs containing relevant files.
+Some of this material is likely to be well out-of-date. Several of the earlier
+contributions provided support for compiling PCRE on various flavours of
+Windows (I myself do not use Windows). Nowadays there is more Windows support
+in the standard distribution, so these contibutions have been archived.
+
+
+Building PCRE on non-Unix systems
+---------------------------------
+
+For a non-Unix system, please read the comments in the file NON-UNIX-USE,
+though if your system supports the use of "configure" and "make" you may be
+able to build PCRE in the same way as for Unix-like systems. PCRE can also be
+configured in many platform environments using the GUI facility of CMake's
+CMakeSetup. It creates Makefiles, solution files, etc.
+
+PCRE has been compiled on many different operating systems. It should be
+straightforward to build PCRE on any system that has a Standard C compiler and
+library, because it uses only Standard C functions.
+
+
+Building PCRE on Unix-like systems
+----------------------------------
+
+If you are using HP's ANSI C++ compiler (aCC), please see the special note
+in the section entitled "Using HP's ANSI C++ compiler (aCC)" below.
+
+The following instructions assume the use of the widely used "configure, make,
+make install" process. There is also some experimental support for "cmake" in
+the PCRE distribution, but it is incomplete and not documented. However, if you
+are a "cmake" user, you might want to try it.
 
 To build PCRE on a Unix-like system, first run the "configure" command from the
 PCRE distribution directory, with your current directory set to the directory
 where you want the files to be created. This command is a standard GNU
 "autoconf" configuration script, for which generic instructions are supplied in
-INSTALL.
+the file INSTALL.
 
 Most commonly, people build PCRE within its own distribution directory, and in
-this case, on many systems, just running "./configure" is sufficient, but the
-usual methods of changing standard defaults are available. For example:
+this case, on many systems, just running "./configure" is sufficient. However,
+the usual methods of changing standard defaults are available. For example:
 
 CFLAGS='-O2 -Wall' ./configure --prefix=/opt/local
 
@@ -83,9 +146,18 @@
 cd /build/pcre/pcre-xxx
 /source/pcre/pcre-xxx/configure
 
+PCRE is written in C and is normally compiled as a C library. However, it is
+possible to build it as a C++ library, though the provided building apparatus
+does not have any features to support this.
+
 There are some optional features that can be included or omitted from the PCRE
 library. You can read more about them in the pcrebuild man page.
 
+. If you want to suppress the building of the C++ wrapper library, you can add
+  --disable-cpp to the "configure" command. Otherwise, when "configure" is run,
+  it will try to find a C++ compiler and C++ header files, and if it succeeds,
+  it will try to build the C++ wrapper.
+
 . If you want to make use of the support for UTF-8 character strings in PCRE,
   you must add --enable-utf8 to the "configure" command. Without it, the code
   for handling UTF-8 is not included in the library. (Even when included, it
@@ -94,75 +166,195 @@
 . If, in addition to support for UTF-8 character strings, you want to include
   support for the \P, \p, and \X sequences that recognize Unicode character
   properties, you must add --enable-unicode-properties to the "configure"
-  command. This adds about 90K to the size of the library (in the form of a
+  command. This adds about 30K to the size of the library (in the form of a
   property table); only the basic two-letter properties such as Lu are
   supported.
 
-. You can build PCRE to recognized CR or NL as the newline character, instead
-  of whatever your compiler uses for "\n", by adding --newline-is-cr or
-  --newline-is-nl to the "configure" command, respectively. Only do this if you
-  really understand what you are doing. On traditional Unix-like systems, the
-  newline character is NL.
+. You can build PCRE to recognize either CR or LF or the sequence CRLF or any
+  of the preceding, or any of the Unicode newline sequences as indicating the
+  end of a line. Whatever you specify at build time is the default; the caller
+  of PCRE can change the selection at run time. The default newline indicator
+  is a single LF character (the Unix standard). You can specify the default
+  newline indicator by adding --enable-newline-is-cr or --enable-newline-is-lf
+  or --enable-newline-is-crlf or --enable-newline-is-anycrlf or
+  --enable-newline-is-any to the "configure" command, respectively.
+
+  If you specify --enable-newline-is-cr or --enable-newline-is-crlf, some of
+  the standard tests will fail, because the lines in the test files end with
+  LF. Even if the files are edited to change the line endings, there are likely
+  to be some failures. With --enable-newline-is-anycrlf or
+  --enable-newline-is-any, many tests should succeed, but there may be some
+  failures.
+
+. By default, the sequence \R in a pattern matches any Unicode line ending
+  sequence. This is independent of the option specifying what PCRE considers to
+  be the end of a line (see above). However, the caller of PCRE can restrict \R
+  to match only CR, LF, or CRLF. You can make this the default by adding
+  --enable-bsr-anycrlf to the "configure" command (bsr = "backslash R").
 
 . When called via the POSIX interface, PCRE uses malloc() to get additional
   storage for processing capturing parentheses if there are more than 10 of
-  them. You can increase this threshold by setting, for example,
+  them in a pattern. You can increase this threshold by setting, for example,
 
   --with-posix-malloc-threshold=20
 
   on the "configure" command.
 
-. PCRE has a counter which can be set to limit the amount of resources it uses.
+. PCRE has a counter that can be set to limit the amount of resources it uses.
   If the limit is exceeded during a match, the match fails. The default is ten
   million. You can change the default by setting, for example,
 
   --with-match-limit=500000
 
   on the "configure" command. This is just the default; individual calls to
-  pcre_exec() can supply their own value. There is discussion on the pcreapi
-  man page.
+  pcre_exec() can supply their own value. There is more discussion on the
+  pcreapi man page.
+
+. There is a separate counter that limits the depth of recursive function calls
+  during a matching process. This also has a default of ten million, which is
+  essentially "unlimited". You can change the default by setting, for example,
+
+  --with-match-limit-recursion=500000
+
+  Recursive function calls use up the runtime stack; running out of stack can
+  cause programs to crash in strange ways. There is a discussion about stack
+  sizes in the pcrestack man page.
 
 . The default maximum compiled pattern size is around 64K. You can increase
   this by adding --with-link-size=3 to the "configure" command. You can
   increase it even more by setting --with-link-size=4, but this is unlikely
-  ever to be necessary. If you build PCRE with an increased link size, test 2
-  (and 5 if you are using UTF-8) will fail. Part of the output of these tests
-  is a representation of the compiled pattern, and this changes with the link
-  size.
-
-. You can build PCRE so that its match() function does not call itself
-  recursively. Instead, it uses blocks of data from the heap via special
-  functions pcre_stack_malloc() and pcre_stack_free() to save data that would
-  otherwise be saved on the stack. To build PCRE like this, use
+  ever to be necessary. Increasing the internal link size will reduce
+  performance.
+
+. You can build PCRE so that its internal match() function that is called from
+  pcre_exec() does not call itself recursively. Instead, it uses memory blocks
+  obtained from the heap via the special functions pcre_stack_malloc() and
+  pcre_stack_free() to save data that would otherwise be saved on the stack. To
+  build PCRE like this, use
 
   --disable-stack-for-recursion
 
   on the "configure" command. PCRE runs more slowly in this mode, but it may be
-  necessary in environments with limited stack sizes.
+  necessary in environments with limited stack sizes. This applies only to the
+  pcre_exec() function; it does not apply to pcre_dfa_exec(), which does not
+  use deeply nested recursion. There is a discussion about stack sizes in the
+  pcrestack man page.
+
+. For speed, PCRE uses four tables for manipulating and identifying characters
+  whose code point values are less than 256. By default, it uses a set of
+  tables for ASCII encoding that is part of the distribution. If you specify
+
+  --enable-rebuild-chartables
+
+  a program called dftables is compiled and run in the default C locale when
+  you obey "make". It builds a source file called pcre_chartables.c. If you do
+  not specify this option, pcre_chartables.c is created as a copy of
+  pcre_chartables.c.dist. See "Character tables" below for further information.
 
-The "configure" script builds seven files:
+. It is possible to compile PCRE for use on systems that use EBCDIC as their
+  default character code (as opposed to ASCII) by specifying
 
-. pcre.h is build by copying pcre.in and making substitutions
-. Makefile is built by copying Makefile.in and making substitutions.
-. config.h is built by copying config.in and making substitutions.
-. pcre-config is built by copying pcre-config.in and making substitutions.
-. libpcre.pc is data for the pkg-config command, built from libpcre.pc.in
+  --enable-ebcdic
+
+  This automatically implies --enable-rebuild-chartables (see above).
+
+The "configure" script builds the following files for the basic C library:
+
+. Makefile is the makefile that builds the library
+. config.h contains build-time configuration options for the library
+. pcre.h is the public PCRE header file
+. pcre-config is a script that shows the settings of "configure" options
+. libpcre.pc is data for the pkg-config command
 . libtool is a script that builds shared and/or static libraries
-. RunTest is a script for running tests
+. RunTest is a script for running tests on the basic C library
+. RunGrepTest is a script for running tests on the pcregrep command
 
-Once "configure" has run, you can run "make". It builds two libraries called
-libpcre and libpcreposix, a test program called pcretest, and the pcregrep
-command. You can use "make install" to copy these, the public header files
-pcre.h and pcreposix.h, and the man pages to appropriate live directories on
-your system, in the normal way.
+Versions of config.h and pcre.h are distributed in the PCRE tarballs under
+the names config.h.generic and pcre.h.generic. These are provided for the
+benefit of those who have to built PCRE without the benefit of "configure". If
+you use "configure", the .generic versions are not used.
+
+If a C++ compiler is found, the following files are also built:
+
+. libpcrecpp.pc is data for the pkg-config command
+. pcrecpparg.h is a header file for programs that call PCRE via the C++ wrapper
+. pcre_stringpiece.h is the header for the C++ "stringpiece" functions
+
+The "configure" script also creates config.status, which is an executable
+script that can be run to recreate the configuration, and config.log, which
+contains compiler output from tests that "configure" runs.
+
+Once "configure" has run, you can run "make". It builds two libraries, called
+libpcre and libpcreposix, a test program called pcretest, a demonstration
+program called pcredemo, and the pcregrep command. If a C++ compiler was found
+on your system, "make" also builds the C++ wrapper library, which is called
+libpcrecpp, and some test programs called pcrecpp_unittest,
+pcre_scanner_unittest, and pcre_stringpiece_unittest. Building the C++ wrapper
+can be disabled by adding --disable-cpp to the "configure" command.
+
+The command "make check" runs all the appropriate tests. Details of the PCRE
+tests are given below in a separate section of this document.
+
+You can use "make install" to install PCRE into live directories on your
+system. The following are installed (file names are all relative to the
+<prefix> that is set when "configure" is run):
+
+  Commands (bin):
+    pcretest
+    pcregrep
+    pcre-config
+
+  Libraries (lib):
+    libpcre
+    libpcreposix
+    libpcrecpp (if C++ support is enabled)
+
+  Configuration information (lib/pkgconfig):
+    libpcre.pc
+    libpcrecpp.pc (if C++ support is enabled)
+
+  Header files (include):
+    pcre.h
+    pcreposix.h
+    pcre_scanner.h      )
+    pcre_stringpiece.h  ) if C++ support is enabled
+    pcrecpp.h           )
+    pcrecpparg.h        )
+
+  Man pages (share/man/man{1,3}):
+    pcregrep.1
+    pcretest.1
+    pcre.3
+    pcre*.3 (lots more pages, all starting "pcre")
+
+  HTML documentation (share/doc/pcre/html):
+    index.html
+    *.html (lots more pages, hyperlinked from index.html)
+
+  Text file documentation (share/doc/pcre):
+    AUTHORS
+    COPYING
+    ChangeLog
+    LICENCE
+    NEWS
+    README
+    pcre.txt       (a concatenation of the man(3) pages)
+    pcretest.txt   the pcretest man page
+    pcregrep.txt   the pcregrep man page
+
+Note that the pcredemo program that is built by "configure" is *not* installed
+anywhere. It is a demonstration for programmers wanting to use PCRE.
+
+If you want to remove PCRE from your system, you can run "make uninstall".
+This removes all the files that "make install" installed. However, it does not
+remove any directories, because these are often shared with other programs.
 
 
 Retrieving configuration information on Unix-like systems
 ---------------------------------------------------------
 
-Running "make install" also installs the command pcre-config, which can be used
-to recall information about the PCRE configuration and installation. For
-example:
+Running "make install" installs the command pcre-config, which can be used to
+recall information about the PCRE configuration and installation. For example:
 
   pcre-config --version
 
@@ -181,15 +373,15 @@
   pkg-config --cflags pcre
 
 The data is held in *.pc files that are installed in a directory called
-pkgconfig.
+<prefix>/lib/pkgconfig.
 
 
 Shared libraries on Unix-like systems
 -------------------------------------
 
-The default distribution builds PCRE as two shared libraries and two static
-libraries, as long as the operating system supports shared libraries. Shared
-library support relies on the "libtool" script which is built as part of the
+The default distribution builds PCRE as shared libraries and static libraries,
+as long as the operating system supports shared libraries. Shared library
+support relies on the "libtool" script which is built as part of the
 "configure" process.
 
 The libtool script is used to compile and link both shared and static
@@ -198,7 +390,7 @@
 libraries (by means of wrapper scripts in the case of shared libraries). When
 you use "make install" to install shared libraries, pcregrep and pcretest are
 automatically re-built to use the newly installed shared libraries before being
-installed themselves. However, the versions left in the source directory still
+installed themselves. However, the versions left in the build directory still
 use the uninstalled libraries.
 
 To build PCRE using static libraries only you must use --disable-shared when
@@ -210,56 +402,86 @@
 build only shared libraries.
 
 
-Cross-compiling on a Unix-like system
--------------------------------------
+Cross-compiling on Unix-like systems
+------------------------------------
 
 You can specify CC and CFLAGS in the normal way to the "configure" command, in
-order to cross-compile PCRE for some other host. However, during the building
-process, the dftables.c source file is compiled *and run* on the local host, in
-order to generate the default character tables (the chartables.c file). It
-therefore needs to be compiled with the local compiler, not the cross compiler.
-You can do this by specifying CC_FOR_BUILD (and if necessary CFLAGS_FOR_BUILD)
-when calling the "configure" command. If they are not specified, they default
-to the values of CC and CFLAGS.
-
-
-Building on non-Unix systems
-----------------------------
-
-For a non-Unix system, read the comments in the file NON-UNIX-USE, though if
-the system supports the use of "configure" and "make" you may be able to build
-PCRE in the same way as for Unix systems.
-
-PCRE has been compiled on Windows systems and on Macintoshes, but I don't know
-the details because I don't use those systems. It should be straightforward to
-build PCRE on any system that has a Standard C compiler, because it uses only
-Standard C functions.
+order to cross-compile PCRE for some other host. However, you should NOT
+specify --enable-rebuild-chartables, because if you do, the dftables.c source
+file is compiled and run on the local host, in order to generate the inbuilt
+character tables (the pcre_chartables.c file). This will probably not work,
+because dftables.c needs to be compiled with the local compiler, not the cross
+compiler.
+
+When --enable-rebuild-chartables is not specified, pcre_chartables.c is created
+by making a copy of pcre_chartables.c.dist, which is a default set of tables
+that assumes ASCII code. Cross-compiling with the default tables should not be
+a problem.
+
+If you need to modify the character tables when cross-compiling, you should
+move pcre_chartables.c.dist out of the way, then compile dftables.c by hand and
+run it on the local host to make a new version of pcre_chartables.c.dist.
+Then when you cross-compile PCRE this new version of the tables will be used.
+
+
+Using HP's ANSI C++ compiler (aCC)
+----------------------------------
+
+Unless C++ support is disabled by specifying the "--disable-cpp" option of the
+"configure" script, you must include the "-AA" option in the CXXFLAGS
+environment variable in order for the C++ components to compile correctly.
+
+Also, note that the aCC compiler on PA-RISC platforms may have a defect whereby
+needed libraries fail to get included when specifying the "-AA" compiler
+option. If you experience unresolved symbols when linking the C++ programs,
+use the workaround of specifying the following environment variable prior to
+running the "configure" script:
+
+  CXXLDFLAGS="-lstd_v2 -lCsup_v2"
+
+
+Making new tarballs
+-------------------
+
+The command "make dist" creates three PCRE tarballs, in tar.gz, tar.bz2, and
+zip formats. The command "make distcheck" does the same, but then does a trial
+build of the new distribution to ensure that it works.
+
+If you have modified any of the man page sources in the doc directory, you
+should first run the PrepareRelease script before making a distribution. This
+script creates the .txt and HTML forms of the documentation from the man pages.
 
 
 Testing PCRE
 ------------
 
-To test PCRE on a Unix system, run the RunTest script that is created by the
-configuring process. (This can also be run by "make runtest", "make check", or
-"make test".) For other systems, see the instructions in NON-UNIX-USE.
-
-The script runs the pcretest test program (which is documented in its own man
-page) on each of the testinput files (in the testdata directory) in turn,
-and compares the output with the contents of the corresponding testoutput file.
-A file called testtry is used to hold the main output from pcretest
+To test the basic PCRE library on a Unix system, run the RunTest script that is
+created by the configuring process. There is also a script called RunGrepTest
+that tests the options of the pcregrep command. If the C++ wrapper library is
+built, three test programs called pcrecpp_unittest, pcre_scanner_unittest, and
+pcre_stringpiece_unittest are also built.
+
+Both the scripts and all the program tests are run if you obey "make check" or
+"make test". For other systems, see the instructions in NON-UNIX-USE.
+
+The RunTest script runs the pcretest test program (which is documented in its
+own man page) on each of the testinput files in the testdata directory in
+turn, and compares the output with the contents of the corresponding testoutput
+files. A file called testtry is used to hold the main output from pcretest
 (testsavedregex is also used as a working file). To run pcretest on just one of
 the test files, give its number as an argument to RunTest, for example:
 
   RunTest 2
 
-The first file can also be fed directly into the perltest script to check that
-Perl gives the same results. The only difference you should see is in the first
-few lines, where the Perl version is given instead of the PCRE version.
+The first test file can also be fed directly into the perltest.pl script to
+check that Perl gives the same results. The only difference you should see is
+in the first few lines, where the Perl version is given instead of the PCRE
+version.
 
 The second set of tests check pcre_fullinfo(), pcre_info(), pcre_study(),
 pcre_copy_substring(), pcre_get_substring(), pcre_get_substring_list(), error
 detection, and run-time flags that are specific to PCRE, as well as the POSIX
-wrapper API. It also uses the debugging flag to check some of the internals of
+wrapper API. It also uses the debugging flags to check some of the internals of
 pcre_compile().
 
 If you build PCRE with a locale setting that is not the standard C locale, the
@@ -285,6 +507,12 @@
 in the comparison output, it means that locale is not available on your system,
 despite being listed by "locale". This does not mean that PCRE is broken.
 
+[If you are trying to run this test on Windows, you may be able to get it to
+work by changing "fr_FR" to "french" everywhere it occurs. Alternatively, use
+RunTest.bat. The version of RunTest.bat included with PCRE 7.4 and above uses
+Windows versions of test 2. More info on using RunTest.bat is included in the
+document entitled NON-UNIX-USE.]
+
 The fourth test checks the UTF-8 support. It is not run automatically unless
 PCRE is built with UTF-8 support. To do this you must set --enable-utf8 when
 running "configure". This file can be also fed directly to the perltest script,
@@ -294,35 +522,55 @@
 The fifth test checks error handling with UTF-8 encoding, and internal UTF-8
 features of PCRE that are not relevant to Perl.
 
-The sixth and final test checks the support for Unicode character properties.
-It it not run automatically unless PCRE is built with Unicode property support.
-To to this you must set --enable-unicode-properties when running "configure".
+The sixth test checks the support for Unicode character properties. It it not
+run automatically unless PCRE is built with Unicode property support. To to
+this you must set --enable-unicode-properties when running "configure".
+
+The seventh, eighth, and ninth tests check the pcre_dfa_exec() alternative
+matching function, in non-UTF-8 mode, UTF-8 mode, and UTF-8 mode with Unicode
+property support, respectively. The eighth and ninth tests are not run
+automatically unless PCRE is build with the relevant support.
 
 
 Character tables
 ----------------
 
-PCRE uses four tables for manipulating and identifying characters whose values
-are less than 256. The final argument of the pcre_compile() function is a
-pointer to a block of memory containing the concatenated tables. A call to
-pcre_maketables() can be used to generate a set of tables in the current
-locale. If the final argument for pcre_compile() is passed as NULL, a set of
-default tables that is built into the binary is used.
-
-The source file called chartables.c contains the default set of tables. This is
-not supplied in the distribution, but is built by the program dftables
-(compiled from dftables.c), which uses the ANSI C character handling functions
-such as isalnum(), isalpha(), isupper(), islower(), etc. to build the table
-sources. This means that the default C locale which is set for your system will
-control the contents of these default tables. You can change the default tables
-by editing chartables.c and then re-building PCRE. If you do this, you should
-probably also edit Makefile to ensure that the file doesn't ever get
-re-generated.
+For speed, PCRE uses four tables for manipulating and identifying characters
+whose code point values are less than 256. The final argument of the
+pcre_compile() function is a pointer to a block of memory containing the
+concatenated tables. A call to pcre_maketables() can be used to generate a set
+of tables in the current locale. If the final argument for pcre_compile() is
+passed as NULL, a set of default tables that is built into the binary is used.
+
+The source file called pcre_chartables.c contains the default set of tables. By
+default, this is created as a copy of pcre_chartables.c.dist, which contains
+tables for ASCII coding. However, if --enable-rebuild-chartables is specified
+for ./configure, a different version of pcre_chartables.c is built by the
+program dftables (compiled from dftables.c), which uses the ANSI C character
+handling functions such as isalnum(), isalpha(), isupper(), islower(), etc. to
+build the table sources. This means that the default C locale which is set for
+your system will control the contents of these default tables. You can change
+the default tables by editing pcre_chartables.c and then re-building PCRE. If
+you do this, you should take care to ensure that the file does not get
+automatically re-generated. The best way to do this is to move
+pcre_chartables.c.dist out of the way and replace it with your customized
+tables.
+
+When the dftables program is run as a result of --enable-rebuild-chartables,
+it uses the default C locale that is set on your system. It does not pay
+attention to the LC_xxx environment variables. In other words, it uses the
+system's default locale rather than whatever the compiling user happens to have
+set. If you really do want to build a source set of character tables in a
+locale that is specified by the LC_xxx variables, you can run the dftables
+program by hand with the -L option. For example:
+
+  ./dftables -L pcre_chartables.c.special
 
 The first two 256-byte tables provide lower casing and case flipping functions,
 respectively. The next table consists of three 32-byte bit maps which identify
 digits, "word" characters, and white space, respectively. These are used when
-building 32-byte bit maps that represent character classes.
+building 32-byte bit maps that represent character classes for code points less
+than 256.
 
 The final 256-byte table has bits indicating various character types, as
 follows:
@@ -338,90 +586,143 @@
 will cause PCRE to malfunction.
 
 
-Manifest
---------
+File manifest
+-------------
 
 The distribution should contain the following files:
 
-(A) The actual source files of the PCRE library functions and their
-    headers:
+(A) Source files of the PCRE library functions and their headers:
 
-  dftables.c            auxiliary program for building chartables.c
+  dftables.c              auxiliary program for building pcre_chartables.c
+                            when --enable-rebuild-chartables is specified
 
-  get.c                 )
-  maketables.c          )
-  study.c               ) source of the functions
-  pcre.c                )   in the library
-  pcreposix.c           )
-  printint.c            )
-
-  ucp.c                 )
-  ucp.h                 ) source for the code that is used for
-  ucpinternal.h         )   Unicode property handling
-  ucptable.c            )
-  ucptypetable.c        )
-
-  pcre.in               "source" for the header for the external API; pcre.h
-                          is built from this by "configure"
-  pcreposix.h           header for the external POSIX wrapper API
-  internal.h            header for internal use
-  config.in             template for config.h, which is built by configure
-
-(B) Auxiliary files:
-
-  AUTHORS               information about the author of PCRE
-  ChangeLog             log of changes to the code
-  INSTALL               generic installation instructions
-  LICENCE               conditions for the use of PCRE
-  COPYING               the same, using GNU's standard name
-  Makefile.in           template for Unix Makefile, which is built by configure
-  NEWS                  important changes in this release
-  NON-UNIX-USE          notes on building PCRE on non-Unix systems
-  README                this file
-  RunTest.in            template for a Unix shell script for running tests
-  config.guess          ) files used by libtool,
-  config.sub            )   used only when building a shared library
-  configure             a configuring shell script (built by autoconf)
-  configure.in          the autoconf input used to build configure
-  doc/Tech.Notes        notes on the encoding
-  doc/*.3               man page sources for the PCRE functions
-  doc/*.1               man page sources for pcregrep and pcretest
-  doc/html/*            HTML documentation
-  doc/pcre.txt          plain text version of the man pages
-  doc/pcretest.txt      plain text documentation of test program
-  doc/perltest.txt      plain text documentation of Perl test program
-  install-sh            a shell script for installing files
-  libpcre.pc.in         "source" for libpcre.pc for pkg-config
-  ltmain.sh             file used to build a libtool script
-  mkinstalldirs         script for making install directories
-  pcretest.c            comprehensive test program
-  pcredemo.c            simple demonstration of coding calls to PCRE
-  perltest              Perl test program
-  pcregrep.c            source of a grep utility that uses PCRE
-  pcre-config.in        source of script which retains PCRE information
-  testdata/testinput1   test data, compatible with Perl
-  testdata/testinput2   test data for error messages and non-Perl things
-  testdata/testinput3   test data for locale-specific tests
-  testdata/testinput4   test data for UTF-8 tests compatible with Perl
-  testdata/testinput5   test data for other UTF-8 tests
-  testdata/testinput6   test data for Unicode property support tests
-  testdata/testoutput1  test results corresponding to testinput1
-  testdata/testoutput2  test results corresponding to testinput2
-  testdata/testoutput3  test results corresponding to testinput3
-  testdata/testoutput4  test results corresponding to testinput4
-  testdata/testoutput5  test results corresponding to testinput5
-  testdata/testoutput6  test results corresponding to testinput6
-
-(C) Auxiliary files for Win32 DLL
-
-  dll.mk
-  libpcre.def
-  libpcreposix.def
-  pcre.def
+  pcre_chartables.c.dist  a default set of character tables that assume ASCII
+                            coding; used, unless --enable-rebuild-chartables is
+                            specified, by copying to pcre_chartables.c
+
+  pcreposix.c             )
+  pcre_compile.c          )
+  pcre_config.c           )
+  pcre_dfa_exec.c         )
+  pcre_exec.c             )
+  pcre_fullinfo.c         )
+  pcre_get.c              ) sources for the functions in the library,
+  pcre_globals.c          )   and some internal functions that they use
+  pcre_info.c             )
+  pcre_maketables.c       )
+  pcre_newline.c          )
+  pcre_ord2utf8.c         )
+  pcre_refcount.c         )
+  pcre_study.c            )
+  pcre_tables.c           )
+  pcre_try_flipped.c      )
+  pcre_ucp_searchfuncs.c  )
+  pcre_valid_utf8.c       )
+  pcre_version.c          )
+  pcre_xclass.c           )
+  pcre_printint.src       ) debugging function that is #included in pcretest,
+                          )   and can also be #included in pcre_compile()
+  pcre.h.in               template for pcre.h when built by "configure"
+  pcreposix.h             header for the external POSIX wrapper API
+  pcre_internal.h         header for internal use
+  ucp.h                   ) headers concerned with
+  ucpinternal.h           )   Unicode property handling
+  ucptable.h              ) (this one is the data table)
+
+  config.h.in             template for config.h, which is built by "configure"
+
+  pcrecpp.h               public header file for the C++ wrapper
+  pcrecpparg.h.in         template for another C++ header file
+  pcre_scanner.h          public header file for C++ scanner functions
+  pcrecpp.cc              )
+  pcre_scanner.cc         ) source for the C++ wrapper library
+
+  pcre_stringpiece.h.in   template for pcre_stringpiece.h, the header for the
+                            C++ stringpiece functions
+  pcre_stringpiece.cc     source for the C++ stringpiece functions
+
+(B) Source files for programs that use PCRE:
+
+  pcredemo.c              simple demonstration of coding calls to PCRE
+  pcregrep.c              source of a grep utility that uses PCRE
+  pcretest.c              comprehensive test program
+
+(C) Auxiliary files:
+
+  132html                 script to turn "man" pages into HTML
+  AUTHORS                 information about the author of PCRE
+  ChangeLog               log of changes to the code
+  CleanTxt                script to clean nroff output for txt man pages
+  Detrail                 script to remove trailing spaces
+  HACKING                 some notes about the internals of PCRE
+  INSTALL                 generic installation instructions
+  LICENCE                 conditions for the use of PCRE
+  COPYING                 the same, using GNU's standard name
+  Makefile.in             ) template for Unix Makefile, which is built by
+                          )   "configure"
+  Makefile.am             ) the automake input that was used to create
+                          )   Makefile.in
+  NEWS                    important changes in this release
+  NON-UNIX-USE            notes on building PCRE on non-Unix systems
+  PrepareRelease          script to make preparations for "make dist"
+  README                  this file
+  RunTest                 a Unix shell script for running tests
+  RunGrepTest             a Unix shell script for pcregrep tests
+  aclocal.m4              m4 macros (generated by "aclocal")
+  config.guess            ) files used by libtool,
+  config.sub              )   used only when building a shared library
+  configure               a configuring shell script (built by autoconf)
+  configure.ac            ) the autoconf input that was used to build
+                          )   "configure" and config.h
+  depcomp                 ) script to find program dependencies, generated by
+                          )   automake
+  doc/*.3                 man page sources for the PCRE functions
+  doc/*.1                 man page sources for pcregrep and pcretest
+  doc/index.html.src      the base HTML page
+  doc/html/*              HTML documentation
+  doc/pcre.txt            plain text version of the man pages
+  doc/pcretest.txt        plain text documentation of test program
+  doc/perltest.txt        plain text documentation of Perl test program
+  install-sh              a shell script for installing files
+  libpcre.pc.in           template for libpcre.pc for pkg-config
+  libpcrecpp.pc.in        template for libpcrecpp.pc for pkg-config
+  ltmain.sh               file used to build a libtool script
+  missing                 ) common stub for a few missing GNU programs while
+                          )   installing, generated by automake
+  mkinstalldirs           script for making install directories
+  perltest.pl             Perl test program
+  pcre-config.in          source of script which retains PCRE information
+  pcrecpp_unittest.cc          )
+  pcre_scanner_unittest.cc     ) test programs for the C++ wrapper
+  pcre_stringpiece_unittest.cc )
+  testdata/testinput*     test data for main library tests
+  testdata/testoutput*    expected test results
+  testdata/grep*          input and output for pcregrep tests
 
-(D) Auxiliary file for VPASCAL
+(D) Auxiliary files for cmake support
+
+  CMakeLists.txt
+  config-cmake.h.in
+
+(E) Auxiliary files for VPASCAL
 
   makevp.bat
+  makevp_c.txt
+  makevp_l.txt
+  pcregexp.pas
+
+(F) Auxiliary files for building PCRE "by hand"
+
+  pcre.h.generic          ) a version of the public PCRE header file
+                          )   for use in non-"configure" environments
+  config.h.generic        ) a version of config.h for use in non-"configure"
+                          )   environments
+
+(F) Miscellaneous
+
+  RunTest.bat            a script for running tests under Windows
 
-Philip Hazel <ph10@cam.ac.uk>
-September 2004
+Philip Hazel
+Email local part: ph10
+Email domain: cam.ac.uk
+Last updated: 21 September 2007

Added: httpd/httpd/vendor/pcre/current/RunGrepTest
URL: http://svn.apache.org/viewvc/httpd/httpd/vendor/pcre/current/RunGrepTest?rev=598339&view=auto
==============================================================================
--- httpd/httpd/vendor/pcre/current/RunGrepTest (added)
+++ httpd/httpd/vendor/pcre/current/RunGrepTest Mon Nov 26 08:49:53 2007
@@ -0,0 +1,271 @@
+#! /bin/sh
+
+# Run pcregrep tests. The assumption is that the PCRE tests check the library
+# itself. What we are checking here is the file handling and options that are
+# supported by pcregrep.
+
+# Set the C locale, so that sort(1) behaves predictably.
+LC_ALL=C
+export LC_ALL
+
+pcregrep=`pwd`/pcregrep
+
+echo " "
+echo "Testing pcregrep"
+$pcregrep -V
+
+cf="diff -ub"
+valgrind=
+
+while [ $# -gt 0 ] ; do
+  case $1 in
+    valgrind) valgrind="valgrind -q --leak-check=no";;
+    *) echo "Unknown argument $1"; exit 1;;
+  esac
+  shift
+done
+
+# If PCRE has been built in a directory other than the source directory, and
+# this test is being run from "make check" as usual, then $(srcdir) will be
+# set. If not, set it to the current directory. We then arrange to run the
+# pcregrep command in the source directory so that the file names that appear
+# in the output are always the same.
+
+if [ -z "$srcdir" -o ! -d "$srcdir/testdata" ] ; then
+  srcdir=.
+fi
+
+# Check for the availability of UTF-8 support
+
+./pcretest -C | ./pcregrep "No UTF-8 support" >/dev/null
+utf8=$?
+
+echo "---------------------------- Test 1 ------------------------------" >testtry
+(cd $srcdir; $valgrind $pcregrep PATTERN ./testdata/grepinput) >>testtry
+
+echo "---------------------------- Test 2 ------------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep '^PATTERN' ./testdata/grepinput) >>testtry
+
+echo "---------------------------- Test 3 ------------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -in PATTERN ./testdata/grepinput) >>testtry
+
+echo "---------------------------- Test 4 ------------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -ic PATTERN ./testdata/grepinput) >>testtry
+
+echo "---------------------------- Test 5 ------------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -in PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry
+
+echo "---------------------------- Test 6 ------------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -inh PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry
+
+echo "---------------------------- Test 7 ------------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -il PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry
+
+echo "---------------------------- Test 8 ------------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -l PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry
+
+echo "---------------------------- Test 9 ------------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -q PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry
+echo "RC=$?" >>testtry
+
+echo "---------------------------- Test 10 -----------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -q NEVER-PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry
+echo "RC=$?" >>testtry
+
+echo "---------------------------- Test 11 -----------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -vn pattern ./testdata/grepinputx) >>testtry
+
+echo "---------------------------- Test 12 -----------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -ix pattern ./testdata/grepinputx) >>testtry
+
+echo "---------------------------- Test 13 -----------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -f./testdata/greplist ./testdata/grepinputx) >>testtry
+
+echo "---------------------------- Test 14 -----------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -w pat ./testdata/grepinput ./testdata/grepinputx) >>testtry
+
+echo "---------------------------- Test 15 -----------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep 'abc^*' ./testdata/grepinput) 2>>testtry >>testtry
+
+echo "---------------------------- Test 16 -----------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep abc ./testdata/grepinput ./testdata/nonexistfile) 2>>testtry >>testtry
+
+echo "---------------------------- Test 17 -----------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -M 'the\noutput' ./testdata/grepinput) >>testtry
+
+echo "---------------------------- Test 18 -----------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -Mn '(the\noutput|dog\.\n--)' ./testdata/grepinput) >>testtry
+
+echo "---------------------------- Test 19 -----------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -Mix 'Pattern' ./testdata/grepinputx) >>testtry
+
+echo "---------------------------- Test 20 -----------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -Mixn 'complete pair\nof lines' ./testdata/grepinputx) >>testtry
+
+echo "---------------------------- Test 21 -----------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -nA3 'four' ./testdata/grepinputx) >>testtry
+
+echo "---------------------------- Test 22 -----------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -nB3 'four' ./testdata/grepinputx) >>testtry
+
+echo "---------------------------- Test 23 -----------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -C3 'four' ./testdata/grepinputx) >>testtry
+
+echo "---------------------------- Test 24 -----------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -A9 'four' ./testdata/grepinputx) >>testtry
+
+echo "---------------------------- Test 25 -----------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -nB9 'four' ./testdata/grepinputx) >>testtry
+
+echo "---------------------------- Test 26 -----------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -A9 -B9 'four' ./testdata/grepinputx) >>testtry
+
+echo "---------------------------- Test 27 -----------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -A10 'four' ./testdata/grepinputx) >>testtry
+
+echo "---------------------------- Test 28 -----------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -nB10 'four' ./testdata/grepinputx) >>testtry
+
+echo "---------------------------- Test 29 -----------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -C12 -B10 'four' ./testdata/grepinputx) >>testtry
+
+echo "---------------------------- Test 30 -----------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -inB3 'pattern' ./testdata/grepinput ./testdata/grepinputx) >>testtry
+
+echo "---------------------------- Test 31 -----------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -inA3 'pattern' ./testdata/grepinput ./testdata/grepinputx) >>testtry
+
+echo "---------------------------- Test 32 -----------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -L 'fox' ./testdata/grepinput ./testdata/grepinputx) >>testtry
+
+echo "---------------------------- Test 33 -----------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep 'fox' ./testdata/grepnonexist) >>testtry 2>&1
+echo "RC=$?" >>testtry
+
+echo "---------------------------- Test 34 -----------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -s 'fox' ./testdata/grepnonexist) >>testtry 2>&1
+echo "RC=$?" >>testtry
+
+echo "---------------------------- Test 35 -----------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -L -r --include=grepinputx 'fox' ./testdata) >>testtry
+echo "RC=$?" >>testtry
+
+echo "---------------------------- Test 36 -----------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -L -r --include=grepinput --exclude 'grepinput$' 'fox' ./testdata | sort) >>testtry
+echo "RC=$?" >>testtry
+
+echo "---------------------------- Test 37 -----------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep  '^(a+)*\d' ./testdata/grepinput) >>testtry 2>teststderr
+echo "RC=$?" >>testtry
+echo "======== STDERR ========" >>testtry
+cat teststderr >>testtry
+
+echo "---------------------------- Test 38 ------------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep '>\x00<' ./testdata/grepinput) >>testtry
+
+echo "---------------------------- Test 39 ------------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -A1 'before the binary zero' ./testdata/grepinput) >>testtry
+
+echo "---------------------------- Test 40 ------------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -B1 'after the binary zero' ./testdata/grepinput) >>testtry
+
+echo "---------------------------- Test 41 ------------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -B1 -o '\w+ the binary zero' ./testdata/grepinput) >>testtry
+
+echo "---------------------------- Test 41 ------------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -B1 -onH '\w+ the binary zero' ./testdata/grepinput) >>testtry
+
+echo "---------------------------- Test 42 ------------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -on 'before|zero|after' ./testdata/grepinput) >>testtry
+
+echo "---------------------------- Test 43 ------------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -on -e before -e zero -e after ./testdata/grepinput) >>testtry
+
+echo "---------------------------- Test 44 ------------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -on -f ./testdata/greplist -e binary ./testdata/grepinput) >>testtry
+
+echo "---------------------------- Test 45 ------------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -e abc -e '(unclosed' ./testdata/grepinput) 2>>testtry >>testtry
+
+echo "---------------------------- Test 46 ------------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -Fx "AB.VE
+elephant" ./testdata/grepinput) >>testtry
+
+echo "---------------------------- Test 47 ------------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -F "AB.VE
+elephant" ./testdata/grepinput) >>testtry
+
+echo "---------------------------- Test 48 ------------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -F -e DATA -e "AB.VE
+elephant" ./testdata/grepinput) >>testtry
+
+echo "---------------------------- Test 49 ------------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep "^(abc|def|ghi|jkl)" ./testdata/grepinputx) >>testtry
+
+echo "---------------------------- Test 50 ------------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -Mv "brown\sfox" ./testdata/grepinputv) >>testtry
+
+echo "---------------------------- Test 51 ------------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep --colour=always jumps ./testdata/grepinputv) >>testtry
+
+# Now compare the results.
+
+$cf $srcdir/testdata/grepoutput testtry
+if [ $? != 0 ] ; then exit 1; fi
+
+
+# These tests require UTF-8 support
+
+if [ $utf8 -ne 0 ] ; then
+  echo "Testing pcregrep UTF-8 features"
+
+  echo "---------------------------- Test U1 ------------------------------" >testtry
+  (cd $srcdir; $valgrind $pcregrep -n -u --newline=any "^X" ./testdata/grepinput8) >>testtry
+
+  echo "---------------------------- Test U2 ------------------------------" >>testtry
+  (cd $srcdir; $valgrind $pcregrep -n -u -C 3 --newline=any "Match" ./testdata/grepinput8) >>testtry
+
+  $cf $srcdir/testdata/grepoutput8 testtry
+  if [ $? != 0 ] ; then exit 1; fi
+
+else
+  echo "Skipping pcregrep UTF-8 tests: no UTF-8 support in PCRE library"
+fi
+
+
+# We go to some contortions to try to ensure that the tests for the various
+# newline settings will work in environments where the normal newline sequence
+# is not \n. Do not use exported files, whose line endings might be changed.
+# Instead, create an input file using printf so that its contents are exactly
+# what we want. Note the messy fudge to get printf to write a string that
+# starts with a hyphen.
+
+echo "Testing pcregrep newline settings"
+printf "abc\rdef\r\nghi\njkl" >testNinput
+
+printf "%c--------------------------- Test N1 ------------------------------\r\n" - >testtry
+$valgrind $pcregrep -n -N CR "^(abc|def|ghi|jkl)" testNinput >>testtry
+
+printf "%c--------------------------- Test N2 ------------------------------\r\n" - >>testtry
+$valgrind $pcregrep -n --newline=crlf "^(abc|def|ghi|jkl)" testNinput >>testtry
+
+printf "%c--------------------------- Test N3 ------------------------------\r\n" - >>testtry
+pattern=`printf 'def\rjkl'`
+$valgrind $pcregrep -n --newline=cr -F "$pattern" testNinput >>testtry
+
+printf "%c--------------------------- Test N4 ------------------------------\r\n" - >>testtry
+pattern=`printf 'xxx\r\njkl'`
+$valgrind $pcregrep -n --newline=crlf -F "$pattern" testNinput >>testtry
+
+printf "%c--------------------------- Test N5 ------------------------------\r\n" - >>testtry
+$valgrind $pcregrep -n --newline=any "^(abc|def|ghi|jkl)" testNinput >>testtry
+
+printf "%c--------------------------- Test N6 ------------------------------\r\n" - >>testtry
+$valgrind $pcregrep -n --newline=anycrlf "^(abc|def|ghi|jkl)" testNinput >>testtry
+
+$cf $srcdir/testdata/grepoutputN testtry
+if [ $? != 0 ] ; then exit 1; fi
+
+exit 0
+
+# End

Propchange: httpd/httpd/vendor/pcre/current/RunGrepTest
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message