Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 27779 invoked from network); 26 Nov 2007 16:52:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Nov 2007 16:52:09 -0000 Received: (qmail 65711 invoked by uid 500); 26 Nov 2007 16:51:55 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 65641 invoked by uid 500); 26 Nov 2007 16:51:55 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 65622 invoked by uid 99); 26 Nov 2007 16:51:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Nov 2007 08:51:54 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Nov 2007 16:51:27 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 1AE591A985C; Mon, 26 Nov 2007 08:50:57 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r598339 [10/37] - in /httpd/httpd/vendor/pcre/current: ./ doc/ doc/html/ testdata/ Date: Mon, 26 Nov 2007 16:50:09 -0000 To: cvs@httpd.apache.org From: pgollucci@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071126165057.1AE591A985C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: httpd/httpd/vendor/pcre/current/configure.ac URL: http://svn.apache.org/viewvc/httpd/httpd/vendor/pcre/current/configure.ac?rev=598339&view=auto ============================================================================== --- httpd/httpd/vendor/pcre/current/configure.ac (added) +++ httpd/httpd/vendor/pcre/current/configure.ac Mon Nov 26 08:49:53 2007 @@ -0,0 +1,503 @@ +dnl Process this file with autoconf to produce a configure script. + +dnl NOTE FOR MAINTAINERS: Do not use major or minor version numbers with +dnl leading zeros, because they may be treated as octal constants. The +dnl PCRE_PRERELEASE feature is for identifying release candidates. It might +dnl be defined as -RC2, for example. For real releases, it should be defined +dnl empty. + +m4_define(pcre_major, [7]) +m4_define(pcre_minor, [4]) +m4_define(pcre_prerelease, []) +m4_define(pcre_date, [2007-09-21]) + +# Libtool shared library interface versions (current:revision:age) +m4_define(libpcre_version, [0:1:0]) +m4_define(libpcreposix_version, [0:0:0]) +m4_define(libpcrecpp_version, [0:0:0]) + +AC_PREREQ(2.57) +AC_INIT(PCRE, pcre_major.pcre_minor[]pcre_prerelease, , pcre) +AC_CONFIG_SRCDIR([pcre.h.in]) +AM_INIT_AUTOMAKE([dist-bzip2 dist-zip]) +AC_CONFIG_HEADERS(config.h) + +# The default CFLAGS and CXXFLAGS in Autoconf are "-g -O2" for gcc and just +# "-g" for any other compiler. There doesn't seem to be a standard way of +# getting rid of the -g (which I don't think is needed for a production +# library). This fudge seems to achieve the necessary. First, we remember the +# externally set values of CFLAGS and CXXFLAGS. Then call the AC_PROG_CC and +# AC_PROG_CXX macros to find the compilers - if CFLAGS and CXXFLAGS are not +# set, they will be set to Autoconf's defaults. Afterwards, if the original +# values were not set, remove the -g from the Autoconf defaults. +# (PH 02-May-07) + +remember_set_CFLAGS="$CFLAGS" +remember_set_CXXFLAGS="$CXXFLAGS" + +AC_PROG_CC +AC_PROG_CXX + +if test "x$remember_set_CFLAGS" = "x" +then + if test "$CFLAGS" = "-g -O2" + then + CFLAGS="-O2" + elif test "$CFLAGS" = "-g" + then + CFLAGS="" + fi +fi + +if test "x$remember_set_CXXFLAGS" = "x" +then + if test "$CXXFLAGS" = "-g -O2" + then + CXXFLAGS="-O2" + elif test "$CXXFLAGS" = "-g" + then + CXXFLAGS="" + fi +fi + + +AC_PROG_INSTALL +AC_LIBTOOL_WIN32_DLL +AC_PROG_LIBTOOL +AC_PROG_LN_S + +PCRE_MAJOR="pcre_major" +PCRE_MINOR="pcre_minor" +PCRE_PRERELEASE="pcre_prerelease" +PCRE_DATE="pcre_date" + +AC_SUBST(PCRE_MAJOR) +AC_SUBST(PCRE_MINOR) +AC_SUBST(PCRE_PRERELEASE) +AC_SUBST(PCRE_DATE) + +# Set a more sensible default value for $(htmldir). +if test "x$htmldir" = 'x${docdir}' +then + htmldir='${docdir}/html' +fi + +# Handle --disable-cpp +AC_ARG_ENABLE(cpp, + AS_HELP_STRING([--disable-cpp], + [disable C++ support]), + , enable_cpp=yes) + +# Handle --enable-rebuild-chartables +AC_ARG_ENABLE(rebuild-chartables, + AS_HELP_STRING([--enable-rebuild-chartables], + [rebuild character tables in current locale]), + , enable_rebuild_chartables=no) + +# Handle --enable-utf8 (disabled by default) +AC_ARG_ENABLE(utf8, + AS_HELP_STRING([--enable-utf8], + [enable UTF-8 support]), + , enable_utf8=unset) + +# Handle --enable-unicode-properties +AC_ARG_ENABLE(unicode-properties, + AS_HELP_STRING([--enable-unicode-properties], + [enable Unicode properties support (implies --enable-utf8)]), + , enable_unicode_properties=no) + +# Handle --enable-newline=NL +dnl AC_ARG_ENABLE(newline, +dnl AS_HELP_STRING([--enable-newline=NL], +dnl [use NL as newline (lf, cr, crlf, anycrlf, any; default=lf)]), +dnl , enable_newline=lf) + +# Separate newline options +ac_pcre_newline=lf +AC_ARG_ENABLE(newline-is-cr, + AS_HELP_STRING([--enable-newline-is-cr], + [use CR as newline character]), + ac_pcre_newline=cr) +AC_ARG_ENABLE(newline-is-lf, + AS_HELP_STRING([--enable-newline-is-lf], + [use LF as newline character (default)]), + ac_pcre_newline=lf) +AC_ARG_ENABLE(newline-is-crlf, + AS_HELP_STRING([--enable-newline-is-crlf], + [use CRLF as newline sequence]), + ac_pcre_newline=crlf) +AC_ARG_ENABLE(newline-is-anycrlf, + AS_HELP_STRING([--enable-newline-is-anycrlf], + [use CR, LF, or CRLF as newline sequence]), + ac_pcre_newline=anycrlf) +AC_ARG_ENABLE(newline-is-any, + AS_HELP_STRING([--enable-newline-is-any], + [use any valid Unicode newline sequence]), + ac_pcre_newline=any) +enable_newline="$ac_pcre_newline" + +# Handle --enable-bsr-anycrlf +AC_ARG_ENABLE(bsr-anycrlf, + AS_HELP_STRING([--enable-bsr-anycrlf], + [\R matches only CR, LF, CRLF by default]), + , enable_bsr_anycrlf=no) + +# Handle --enable-ebcdic +AC_ARG_ENABLE(ebcdic, + AS_HELP_STRING([--enable-ebcdic], + [assume EBCDIC coding rather than ASCII; use this only in (uncommon) EBCDIC environments; it implies --enable-rebuild-chartables]), + , enable_ebcdic=no) + +# Handle --disable-stack-for-recursion +AC_ARG_ENABLE(stack-for-recursion, + AS_HELP_STRING([--disable-stack-for-recursion], + [don't use stack recursion when matching]), + , enable_stack_for_recursion=yes) + +# Handle --with-posix-malloc-threshold=NBYTES +AC_ARG_WITH(posix-malloc-threshold, + AS_HELP_STRING([--with-posix-malloc-threshold=NBYTES], + [threshold for POSIX malloc usage (default=10)]), + , with_posix_malloc_threshold=10) + +# Handle --with-link-size=N +AC_ARG_WITH(link-size, + AS_HELP_STRING([--with-link-size=N], + [internal link size (2, 3, or 4 allowed; default=2)]), + , with_link_size=2) + +# Handle --with-match-limit=N +AC_ARG_WITH(match-limit, + AS_HELP_STRING([--with-match-limit=N], + [default limit on internal looping (default=10000000)]), + , with_match_limit=10000000) + +# Handle --with-match-limit_recursion=N +# +# Note: In config.h, the default is to define MATCH_LIMIT_RECURSION +# symbolically as MATCH_LIMIT, which in turn is defined to be some numeric +# value (e.g. 10000000). MATCH_LIMIT_RECURSION can otherwise be set to some +# different numeric value (or even the same numeric value as MATCH_LIMIT, +# though no longer defined in terms of the latter). +# +AC_ARG_WITH(match-limit-recursion, + AS_HELP_STRING([--with-match-limit-recursion=N], + [default limit on internal recursion (default=MATCH_LIMIT)]), + , with_match_limit_recursion=MATCH_LIMIT) + +# Make sure that if enable_unicode_properties was set, that UTF-8 support +# is enabled. +# +if test "x$enable_unicode_properties" = "xyes" +then + if test "x$enable_utf8" = "xno" + then + AC_MSG_ERROR([support for Unicode properties requires UTF-8 support]) + fi + enable_utf8=yes +fi + +if test "x$enable_utf8" = "xunset" +then + enable_utf8=no +fi + +# Make sure that if enable_ebcdic is set, rebuild_chartables is also enabled. +# +if test "x$enable_ebcdic" = "xyes" +then + enable_rebuild_chartables=yes +fi + +# Convert the newline identifier into the appropriate integer value. +case "$enable_newline" in + lf) ac_pcre_newline_value=10 ;; + cr) ac_pcre_newline_value=13 ;; + crlf) ac_pcre_newline_value=3338 ;; + anycrlf) ac_pcre_newline_value=-2 ;; + any) ac_pcre_newline_value=-1 ;; + *) + AC_MSG_ERROR([invalid argument \"$enable_newline\" to --enable-newline option]) + ;; +esac + +# Check argument to --with-link-size +case "$with_link_size" in + 2|3|4) ;; + *) + AC_MSG_ERROR([invalid argument \"$with_link_size\" to --with-link-size option]) + ;; +esac + +AH_TOP([ +/* On Unix-like systems config.h.in is converted by "configure" into config.h. +Some other environments also support the use of "configure". PCRE is written in +Standard C, but there are a few non-standard things it can cope with, allowing +it to run on SunOS4 and other "close to standard" systems. + +If you are going to build PCRE "by hand" on a system without "configure" you +should copy the distributed config.h.generic to config.h, and then set up the +macro definitions the way you need them. You must then add -DHAVE_CONFIG_H to +all of your compile commands, so that config.h is included at the start of +every source. + +Alternatively, you can avoid editing by using -D on the compiler command line +to set the macro values. In this case, you do not have to set -DHAVE_CONFIG_H. + +PCRE uses memmove() if HAVE_MEMMOVE is set to 1; otherwise it uses bcopy() if +HAVE_BCOPY is set to 1. If your system has neither bcopy() nor memmove(), set +them both to 0; an emulation function will be used. */]) + +# Checks for header files. +AC_HEADER_STDC +AC_CHECK_HEADERS(limits.h sys/types.h sys/stat.h dirent.h windows.h) + +# The files below are C++ header files. +pcre_have_type_traits="0" +pcre_have_bits_type_traits="0" +if test "x$enable_cpp" = "xyes" -a -n "$CXX" +then +AC_LANG_PUSH(C++) + +# We could be more clever here, given we're doing AC_SUBST with this +# (eg set a var to be the name of the include file we want). But we're not +# so it's easy to change back to 'regular' autoconf vars if we needed to. +AC_CHECK_HEADERS(string, [pcre_have_cpp_headers="1"], + [pcre_have_cpp_headers="0"]) +AC_CHECK_HEADERS(bits/type_traits.h, [pcre_have_bits_type_traits="1"], + [pcre_have_bits_type_traits="0"]) +AC_CHECK_HEADERS(type_traits.h, [pcre_have_type_traits="1"], + [pcre_have_type_traits="0"]) +AC_LANG_POP +fi +# Using AC_SUBST eliminates the need to include config.h in a public .h file +AC_SUBST(pcre_have_type_traits) +AC_SUBST(pcre_have_bits_type_traits) + +# Conditional compilation +AM_CONDITIONAL(WITH_PCRE_CPP, test "x$enable_cpp" = "xyes") +AM_CONDITIONAL(WITH_REBUILD_CHARTABLES, test "x$enable_rebuild_chartables" = "xyes") + +# Checks for typedefs, structures, and compiler characteristics. + +AC_C_CONST +AC_TYPE_SIZE_T + +AC_CHECK_TYPES([long long], + [pcre_have_long_long="1"], + [pcre_have_long_long="0"]) +AC_CHECK_TYPES([unsigned long long], + [pcre_have_ulong_long="1"], + [pcre_have_ulong_long="0"]) +AC_SUBST(pcre_have_long_long) +AC_SUBST(pcre_have_ulong_long) + +# Checks for library functions. + +AC_CHECK_FUNCS(bcopy memmove strerror strtoq strtoll _strtoi64) + +# This facilitates -ansi builds under Linux +dnl AC_DEFINE([_GNU_SOURCE], [], [Enable GNU extensions in glibc]) + +if test "x$enable_shared" = "xno" ; then + AC_DEFINE([PCRE_STATIC], [1], [ + Define if linking statically (TODO: make nice with Libtool)]) +fi + +# Here is where pcre specific defines are handled + +if test "$enable_utf8" = "yes"; then + AC_DEFINE([SUPPORT_UTF8], [], [ + Define to enable support for the UTF-8 Unicode encoding.]) +fi + +if test "$enable_unicode_properties" = "yes"; then + AC_DEFINE([SUPPORT_UCP], [], [ + Define to enable support for Unicode properties]) +fi + +if test "$enable_stack_for_recursion" = "no"; then + AC_DEFINE([NO_RECURSE], [], [ + PCRE uses recursive function calls to handle backtracking while + matching. This can sometimes be a problem on systems that have + stacks of limited size. Define NO_RECURSE to get a version that + doesn't use recursion in the match() function; instead it creates + its own stack by steam using pcre_recurse_malloc() to obtain memory + from the heap. For more detail, see the comments and other stuff + just above the match() function. On systems that support it, + "configure" can be used to set this in the Makefile + (use --disable-stack-for-recursion).]) +fi + +AC_DEFINE_UNQUOTED([NEWLINE], [$ac_pcre_newline_value], [ + The value of NEWLINE determines the newline character sequence. On + systems that support it, "configure" can be used to override the + default, which is 10. The possible values are 10 (LF), 13 (CR), + 3338 (CRLF), -1 (ANY), or -2 (ANYCRLF).]) + +if test "$enable_bsr_anycrlf" = "yes"; then + AC_DEFINE([BSR_ANYCRLF], [], [ + By default, the \R escape sequence matches any Unicode line ending + character or sequence of characters. If BSR_ANYCRLF is defined, this is + changed so that backslash-R matches only CR, LF, or CRLF. The build- + time default can be overridden by the user of PCRE at runtime. On + systems that support it, "configure" can be used to override the + default.]) +fi + +AC_DEFINE_UNQUOTED([LINK_SIZE], [$with_link_size], [ + The value of LINK_SIZE determines the number of bytes used to store + links as offsets within the compiled regex. The default is 2, which + allows for compiled patterns up to 64K long. This covers the vast + majority of cases. However, PCRE can also be compiled to use 3 or 4 + bytes instead. This allows for longer patterns in extreme cases. On + systems that support it, "configure" can be used to override this default.]) + +AC_DEFINE_UNQUOTED([POSIX_MALLOC_THRESHOLD], [$with_posix_malloc_threshold], [ + When calling PCRE via the POSIX interface, additional working storage + is required for holding the pointers to capturing substrings because + PCRE requires three integers per substring, whereas the POSIX + interface provides only two. If the number of expected substrings is + small, the wrapper function uses space on the stack, because this is + faster than using malloc() for each call. The threshold above which + the stack is no longer used is defined by POSIX_MALLOC_THRESHOLD. On + systems that support it, "configure" can be used to override this + default.]) + +AC_DEFINE_UNQUOTED([MATCH_LIMIT], [$with_match_limit], [ + The value of MATCH_LIMIT determines the default number of times the + internal match() function can be called during a single execution of + pcre_exec(). There is a runtime interface for setting a different + limit. The limit exists in order to catch runaway regular + expressions that take for ever to determine that they do not match. + The default is set very large so that it does not accidentally catch + legitimate cases. On systems that support it, "configure" can be + used to override this default default.]) + +AC_DEFINE_UNQUOTED([MATCH_LIMIT_RECURSION], [$with_match_limit_recursion], [ + The above limit applies to all calls of match(), whether or not they + increase the recursion depth. In some environments it is desirable + to limit the depth of recursive calls of match() more strictly, in + order to restrict the maximum amount of stack (or heap, if + NO_RECURSE is defined) that is used. The value of + MATCH_LIMIT_RECURSION applies only to recursive calls of match(). To + have any useful effect, it must be less than the value of + MATCH_LIMIT. The default is to use the same value as MATCH_LIMIT. + There is a runtime method for setting a different limit. On systems + that support it, "configure" can be used to override the default.]) + +AC_DEFINE([MAX_NAME_SIZE], [32], [ + This limit is parameterized just in case anybody ever wants to + change it. Care must be taken if it is increased, because it guards + against integer overflow caused by enormously large patterns.]) + +AC_DEFINE([MAX_NAME_COUNT], [10000], [ + This limit is parameterized just in case anybody ever wants to + change it. Care must be taken if it is increased, because it guards + against integer overflow caused by enormously large patterns.]) + +AH_VERBATIM([PCRE_EXP_DEFN], [ +/* If you are compiling for a system other than a Unix-like system or + Win32, and it needs some magic to be inserted before the definition + of a function that is exported by the library, define this macro to + contain the relevant magic. If you do not define this macro, it + defaults to "extern" for a C compiler and "extern C" for a C++ + compiler on non-Win32 systems. This macro apears at the start of + every exported function that is part of the external API. It does + not appear on functions that are "external" in the C sense, but + which are internal to the library. */ +#undef PCRE_EXP_DEFN]) + +if test "$enable_ebcdic" = "yes"; then + AC_DEFINE_UNQUOTED([EBCDIC], [], [ + If you are compiling for a system that uses EBCDIC instead of ASCII + character codes, define this macro as 1. On systems that can use + "configure", this can be done via --enable-ebcdic.]) +fi + +# Platform specific issues +NO_UNDEFINED= +EXPORT_ALL_SYMBOLS= +case $host_os in + cygwin* | mingw* ) + if test X"$enable_shared" = Xyes; then + NO_UNDEFINED="-no-undefined" + EXPORT_ALL_SYMBOLS="-Wl,--export-all-symbols" + fi + ;; +esac + +# The extra LDFLAGS for each particular library +# (Note: The libpcre*_version bits are m4 variables, assigned above) + +EXTRA_LIBPCRE_LDFLAGS="$NO_UNDEFINED -version-info libpcre_version" + +EXTRA_LIBPCREPOSIX_LDFLAGS="$NO_UNDEFINED -version-info libpcreposix_version" + +EXTRA_LIBPCRECPP_LDFLAGS="$NO_UNDEFINED $EXPORT_ALL_SYMBOLS -version-info libpcrecpp_version" + +AC_SUBST(EXTRA_LIBPCRE_LDFLAGS) +AC_SUBST(EXTRA_LIBPCREPOSIX_LDFLAGS) +AC_SUBST(EXTRA_LIBPCRECPP_LDFLAGS) + +# When we run 'make distcheck', use these arguments. +DISTCHECK_CONFIGURE_FLAGS="--enable-cpp --enable-unicode-properties" +AC_SUBST(DISTCHECK_CONFIGURE_FLAGS) + +# Produce these files, in addition to config.h. +AC_CONFIG_FILES( + Makefile + libpcre.pc + libpcrecpp.pc + pcre-config + pcre.h + pcre_stringpiece.h + pcrecpparg.h +) + +# Make the generated script files executable. +AC_CONFIG_COMMANDS([script-chmod], [chmod a+x pcre-config]) + +# Make sure that pcre_chartables.c is removed in case the method for +# creating it was changed by reconfiguration. +AC_CONFIG_COMMANDS([delete-old-chartables], [rm -f pcre_chartables.c]) + +AC_OUTPUT + +# Print out a nice little message after configure is run displaying your +# chosen options. +# +cat <. + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by `PROGRAMS ARGS'. + object Object file output by `PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputing dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +## The second -e expression handles DOS-style file names with drive letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the `deleted header file' problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory +## that the space means something, we add a space to the output as +## well. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like `#:fec' to the end of the + # dependency line. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr ' +' ' ' >> $depfile + echo >> $depfile + + # The second pass generates a dummy entry for each header file. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> $depfile + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts `$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` + tmpdepfile="$stripped.u" + if test "$libtool" = yes; then + "$@" -Wc,-M + else + "$@" -M + fi + stat=$? + + if test -f "$tmpdepfile"; then : + else + stripped=`echo "$stripped" | sed 's,^.*/,,'` + tmpdepfile="$stripped.u" + fi + + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + + if test -f "$tmpdepfile"; then + outname="$stripped.o" + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" + sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +icc) + # Intel's C compiler understands `-MD -MF file'. However on + # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # ICC 7.0 will fill foo.d with something like + # foo.o: sub/foo.c + # foo.o: sub/foo.h + # which is wrong. We want: + # sub/foo.o: sub/foo.c + # sub/foo.o: sub/foo.h + # sub/foo.c: + # sub/foo.h: + # ICC 7.1 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using \ : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | + sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add `dependent.h:' lines. + sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in `foo.d' instead, so we check for that too. + # Subdirectories are respected. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + + if test "$libtool" = yes; then + # With Tru64 cc, shared objects can also be used to make a + # static library. This mechanism is used in libtool 1.4 series to + # handle both shared and static libraries in a single compilation. + # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. + # + # With libtool 1.5 this exception was removed, and libtool now + # generates 2 separate objects for the 2 libraries. These two + # compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 + tmpdepfile2=$dir$base.o.d # libtool 1.5 + tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 + tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.o.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + tmpdepfile4=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for `:' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + "$@" $dashmflag | + sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no + for arg in "$@"; do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix="`echo $object | sed 's/^.*\././'`" + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' ' +' | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E | + sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + "$@" || exit $? + IFS=" " + for arg + do + case "$arg" in + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: Propchange: httpd/httpd/vendor/pcre/current/depcomp ------------------------------------------------------------------------------ svn:executable = * Modified: httpd/httpd/vendor/pcre/current/dftables.c URL: http://svn.apache.org/viewvc/httpd/httpd/vendor/pcre/current/dftables.c?rev=598339&r1=598338&r2=598339&view=diff ============================================================================== --- httpd/httpd/vendor/pcre/current/dftables.c (original) +++ httpd/httpd/vendor/pcre/current/dftables.c Mon Nov 26 08:49:53 2007 @@ -2,13 +2,11 @@ * Perl-Compatible Regular Expressions * *************************************************/ -/* -PCRE is a library of functions to support regular expressions whose syntax +/* PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. -Written by: Philip Hazel - - Copyright (c) 1997-2004 University of Cambridge + Written by Philip Hazel + Copyright (c) 1997-2007 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -40,56 +38,83 @@ */ -/* This is a support program to generate the file chartables.c, containing -character tables of various kinds. They are built according to the default C -locale and used as the default tables by PCRE. Now that pcre_maketables is -a function visible to the outside world, we make use of its code from here in -order to be consistent. */ +/* This is a freestanding support program to generate a file containing +character tables for PCRE. The tables are built according to the current +locale. Now that pcre_maketables is a function visible to the outside world, we +make use of its code from here in order to be consistent. */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include +#include -#include "internal.h" +#include "pcre_internal.h" -#define DFTABLES /* maketables.c notices this */ -#include "maketables.c" +#define DFTABLES /* pcre_maketables.c notices this */ +#include "pcre_maketables.c" int main(int argc, char **argv) { -int i; FILE *f; -const unsigned char *tables = pcre_maketables(); +int i = 1; +const unsigned char *tables; +const unsigned char *base_of_tables; + +/* By default, the default C locale is used rather than what the building user +happens to have set. However, if the -L option is given, set the locale from +the LC_xxx environment variables. */ -if (argc != 2) +if (argc > 1 && strcmp(argv[1], "-L") == 0) + { + setlocale(LC_ALL, ""); /* Set from environment variables */ + i++; + } + +if (argc < i + 1) { fprintf(stderr, "dftables: one filename argument is required\n"); return 1; } -f = fopen(argv[1], "w"); +tables = pcre_maketables(); +base_of_tables = tables; + +f = fopen(argv[i], "wb"); if (f == NULL) { fprintf(stderr, "dftables: failed to open %s for writing\n", argv[1]); return 1; } -/* There are two fprintf() calls here, because gcc in pedantic mode complains -about the very long string otherwise. */ +/* There are several fprintf() calls here, because gcc in pedantic mode +complains about the very long string otherwise. */ fprintf(f, "/*************************************************\n" "* Perl-Compatible Regular Expressions *\n" "*************************************************/\n\n" - "/* This file is automatically written by the dftables auxiliary \n" - "program. If you edit it by hand, you might like to edit the Makefile to \n" - "prevent its ever being regenerated.\n\n"); + "/* This file was automatically written by the dftables auxiliary\n" + "program. It contains character tables that are used when no external\n" + "tables are passed to PCRE by the application that calls it. The tables\n" + "are used only for characters whose code values are less than 256.\n\n"); +fprintf(f, + "The following #includes are present because without them gcc 4.x may remove\n" + "the array definition from the final binary if PCRE is built into a static\n" + "library and dead code stripping is activated. This leads to link errors.\n" + "Pulling in the header ensures that the array gets flagged as \"someone\n" + "outside this compilation unit might reference this\" and so it will always\n" + "be supplied to the linker. */\n\n" + "#ifdef HAVE_CONFIG_H\n" + "#include \"config.h\"\n" + "#endif\n\n" + "#include \"pcre_internal.h\"\n\n"); fprintf(f, - "This file is #included in the compilation of pcre.c to build the default\n" - "character tables which are used when no tables are passed to the compile\n" - "function. */\n\n" - "static unsigned char pcre_default_tables[] = {\n\n" + "const unsigned char _pcre_default_tables[] = {\n\n" "/* This table is a lower casing table. */\n\n"); fprintf(f, " "); @@ -164,9 +189,10 @@ else fprintf(f, "%3d-", i-8); if (isprint(i-1)) fprintf(f, " %c ", i-1); else fprintf(f, "%3d", i-1); -fprintf(f, " */\n\n/* End of chartables.c */\n"); +fprintf(f, " */\n\n/* End of pcre_chartables.c */\n"); fclose(f); +free((void *)base_of_tables); return 0; } Modified: httpd/httpd/vendor/pcre/current/doc/html/index.html URL: http://svn.apache.org/viewvc/httpd/httpd/vendor/pcre/current/doc/html/index.html?rev=598339&r1=598338&r2=598339&view=diff ============================================================================== --- httpd/httpd/vendor/pcre/current/doc/html/index.html (original) +++ httpd/httpd/vendor/pcre/current/doc/html/index.html Mon Nov 26 08:49:53 2007 @@ -1,4 +1,10 @@ + PCRE specification @@ -12,6 +18,9 @@ pcre   Introductory page +pcre-config +   Information about the installation configuration + pcreapi   PCRE's native API @@ -24,9 +33,15 @@ pcrecompat   Compability with Perl +pcrecpp +   The C++ wrapper for the PCRE library + pcregrep   The pcregrep command +pcrematching +   Discussion of the two matching algorithms + pcrepartial   Using PCRE for partial matching @@ -45,6 +60,12 @@ pcresample   Description of the sample program +pcrestack +   Discussion of PCRE's stack usage + +pcresyntax +   Syntax quick-reference summary + pcretest   The pcretest command for testing PCRE @@ -59,6 +80,9 @@ pcre_compile   Compile a regular expression +pcre_compile2 +   Compile a regular expression (alternate interface) + pcre_config   Show build-time configuration options @@ -68,8 +92,13 @@ pcre_copy_substring   Extract numbered substring into given buffer +pcre_dfa_exec +   Match a compiled pattern to a subject string + (DFA algorithm; not Perl compatible) + pcre_exec -   Match a compiled pattern to a subject string +   Match a compiled pattern to a subject string + (Perl compatible) pcre_free_substring   Free extracted substring @@ -97,6 +126,9 @@ pcre_maketables   Build character tables in current locale + +pcre_refcount +   Maintain reference count in compiled pattern pcre_study   Study a compiled pattern Added: httpd/httpd/vendor/pcre/current/doc/html/pcre-config.html URL: http://svn.apache.org/viewvc/httpd/httpd/vendor/pcre/current/doc/html/pcre-config.html?rev=598339&view=auto ============================================================================== --- httpd/httpd/vendor/pcre/current/doc/html/pcre-config.html (added) +++ httpd/httpd/vendor/pcre/current/doc/html/pcre-config.html Mon Nov 26 08:49:53 2007 @@ -0,0 +1,88 @@ + + +pcre-config specification + + +

pcre-config man page

+

+Return to the PCRE index page. +

+

+This page is part of the PCRE HTML documentation. It was generated automatically +from the original man page. If there is any nonsense in it, please consult the +man page, in case the conversion went wrong. +
+

+
SYNOPSIS
+

+pcre-config [--prefix] [--exec-prefix] [--version] [--libs] +[--libs-posix] [--cflags] [--cflags-posix] +

+
DESCRIPTION
+

+pcre-config returns the configuration of the installed PCRE +libraries and the options required to compile a program to use them. +

+
OPTIONS
+

+--prefix +Writes the directory prefix used in the PCRE installation for architecture +independent files (/usr on many systems, /usr/local on some +systems) to the standard output. +

+

+--exec-prefix +Writes the directory prefix used in the PCRE installation for architecture +dependent files (normally the same as --prefix) to the standard output. +

+

+--version +Writes the version number of the installed PCRE libraries to the standard +output. +

+

+--libs +Writes to the standard output the command line options required to link +with PCRE (-lpcre on many systems). +

+

+--libs-posix +Writes to the standard output the command line options required to link with +the PCRE posix emulation library (-lpcreposix -lpcre on many +systems). +

+

+--cflags +Writes to the standard output the command line options required to compile +files that use PCRE (this may include some -I options, but is blank on +many systems). +

+

+--cflags-posix +Writes to the standard output the command line options required to compile +files that use the PCRE posix emulation library (this may include some -I +options, but is blank on many systems). +

+
SEE ALSO
+

+pcre(3) +

+
AUTHOR
+

+This manual page was originally written by Mark Baker for the Debian GNU/Linux +system. It has been slightly revised as a generic PCRE man page. +

+
REVISION
+

+Last updated: 18 April 2007 +
+

+Return to the PCRE index page. +

Modified: httpd/httpd/vendor/pcre/current/doc/html/pcre.html URL: http://svn.apache.org/viewvc/httpd/httpd/vendor/pcre/current/doc/html/pcre.html?rev=598339&r1=598338&r2=598339&view=diff ============================================================================== --- httpd/httpd/vendor/pcre/current/doc/html/pcre.html (original) +++ httpd/httpd/vendor/pcre/current/doc/html/pcre.html Mon Nov 26 08:49:53 2007 @@ -18,21 +18,38 @@
  • LIMITATIONS
  • UTF-8 AND UNICODE PROPERTY SUPPORT
  • AUTHOR +
  • REVISION
    INTRODUCTION

    The PCRE library is a set of functions that implement regular expression pattern matching using the same syntax and semantics as Perl, with just a few -differences. The current implementation of PCRE (release 5.x) corresponds -approximately with Perl 5.8, including support for UTF-8 encoded strings and -Unicode general category properties. However, this support has to be explicitly -enabled; it is not the default. +differences. (Certain features that appeared in Python and PCRE before they +appeared in Perl are also available using the Python syntax.) +

    +

    +The current implementation of PCRE (release 7.x) corresponds approximately with +Perl 5.10, including support for UTF-8 encoded strings and Unicode general +category properties. However, UTF-8 and Unicode support has to be explicitly +enabled; it is not the default. The Unicode tables correspond to Unicode +release 5.0.0. +

    +

    +In addition to the Perl-compatible matching function, PCRE contains an +alternative matching function that matches the same compiled patterns in a +different way. In certain circumstances, the alternative function has some +advantages. For a discussion of the two matching algorithms, see the +pcrematching +page.

    PCRE is written in C and released as a C library. A number of people have -written wrappers and interfaces of various kinds. A C++ class is included in -these contributions, which can be found in the Contrib directory at the -primary FTP site, which is: +written wrappers and interfaces of various kinds. In particular, Google Inc. +have provided a comprehensive C++ wrapper. This is now included as part of the +PCRE distribution. The +pcrecpp +page has details of this interface. Other people's contributions can be found +in the Contrib directory at the primary FTP site, which is: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre

    @@ -41,7 +58,9 @@ pcrepattern and pcrecompat -pages. +pages. There is a syntax summary in the +pcresyntax +page.

    Some features of PCRE can be included, excluded, or changed when the library is @@ -53,6 +72,15 @@ page. Documentation about building PCRE for various operating systems can be found in the README file in the source distribution.

    +

    +The library contains a number of undocumented internal functions and data +tables that are used by more than one of the exported external functions, but +which are not intended for use by external callers. Their names all begin with +"_pcre_", which hopefully will not provoke any name clashes. In some +environments, it is possible to control which external symbols are exported +when a shared library is built, and in these cases the undocumented symbols are +not exported. +


    USER DOCUMENTATION

    The user documentation for PCRE comprises a number of different sections. In @@ -62,21 +90,26 @@ follows:

       pcre              this document
    -  pcreapi           details of PCRE's native API
    +  pcre-config       show PCRE installation configuration information
    +  pcreapi           details of PCRE's native C API
       pcrebuild         options for building PCRE
       pcrecallout       details of the callout feature
       pcrecompat        discussion of Perl compatibility
    +  pcrecpp           details of the C++ wrapper
       pcregrep          description of the pcregrep command
    +  pcrematching      discussion of the two matching algorithms
       pcrepartial       details of the partial matching facility
       pcrepattern       syntax and semantics of supported regular expressions
    +  pcresyntax        quick syntax reference
       pcreperform       discussion of performance issues
    -  pcreposix         the POSIX-compatible API
    +  pcreposix         the POSIX-compatible C API
       pcreprecompile    details of saving and re-using precompiled patterns
       pcresample        discussion of the sample program
    +  pcrestack         discussion of stack usage
       pcretest          description of the pcretest testing command
     
    In addition, in the "man" and HTML formats, there is a short page for each -library function, listing its arguments and results. +C library function, listing its arguments and results.


    LIMITATIONS

    @@ -91,22 +124,28 @@ distribution and the pcrebuild documentation for details). In these cases the limit is substantially larger. -However, the speed of execution will be slower. +However, the speed of execution is slower.

    All values in repeating quantifiers must be less than 65536. -The maximum number of capturing subpatterns is 65535.

    -There is no limit to the number of non-capturing subpatterns, but the maximum -depth of nesting of all kinds of parenthesized subpattern, including capturing -subpatterns, assertions, and other types of subpattern, is 200. +There is no limit to the number of parenthesized subpatterns, but there can be +no more than 65535 capturing subpatterns. +

    +

    +The maximum length of name for a named subpattern is 32 characters, and the +maximum number of named subpatterns is 10000.

    The maximum length of a subject string is the largest positive number that an -integer variable can hold. However, PCRE uses recursion to handle subpatterns -and indefinite repetition. This means that the available stack space may limit -the size of a subject string that can be processed by certain patterns. +integer variable can hold. However, when using the traditional matching +function, PCRE uses recursion to handle subpatterns and indefinite repetition. +This means that the available stack space may limit the size of a subject +string that can be processed by certain patterns. For a discussion of stack +issues, see the +pcrestack +documentation.


    UTF-8 AND UNICODE PROPERTY SUPPORT

    @@ -126,58 +165,92 @@

    If you compile PCRE with UTF-8 support, but do not use it at run time, the library will be a bit bigger, but the additional run time overhead is limited -to testing the PCRE_UTF8 flag in several places, so should not be very large. +to testing the PCRE_UTF8 flag occasionally, so should not be very big.

    If PCRE is built with Unicode character property support (which implies UTF-8 support), the escape sequences \p{..}, \P{..}, and \X are supported. The available properties that can be tested are limited to the general category properties such as Lu for an upper case letter or Nd for a decimal -number. A full list is given in the +number, the Unicode script names such as Arabic or Han, and the derived +properties Any and L&. A full list is given in the pcrepattern -documentation. The PCRE library is increased in size by about 90K when Unicode -property support is included. -

    -

    -The following comments apply when PCRE is running in UTF-8 mode: -

    -

    -1. When you set the PCRE_UTF8 flag, the strings passed as patterns and subjects -are checked for validity on entry to the relevant functions. If an invalid -UTF-8 string is passed, an error return is given. In some situations, you may -already know that your strings are valid, and therefore want to skip these -checks in order to improve performance. If you set the PCRE_NO_UTF8_CHECK flag -at compile time or at run time, PCRE assumes that the pattern or subject it -is given (respectively) contains only valid UTF-8 codes. In this case, it does -not diagnose an invalid UTF-8 string. If you pass an invalid UTF-8 string to -PCRE when PCRE_NO_UTF8_CHECK is set, the results are undefined. Your program -may crash. +documentation. Only the short names for properties are supported. For example, +\p{L} matches a letter. Its Perl synonym, \p{Letter}, is not supported. +Furthermore, in Perl, many properties may optionally be prefixed by "Is", for +compatibility with Perl 5.6. PCRE does not support this. +

    +
    +Validity of UTF-8 strings +
    +

    +When you set the PCRE_UTF8 flag, the strings passed as patterns and subjects +are (by default) checked for validity on entry to the relevant functions. From +release 7.3 of PCRE, the check is according the rules of RFC 3629, which are +themselves derived from the Unicode specification. Earlier releases of PCRE +followed the rules of RFC 2279, which allows the full range of 31-bit values (0 +to 0x7FFFFFFF). The current check allows only values in the range U+0 to +U+10FFFF, excluding U+D800 to U+DFFF. +

    +

    +The excluded code points are the "Low Surrogate Area" of Unicode, of which the +Unicode Standard says this: "The Low Surrogate Area does not contain any +character assignments, consequently no character code charts or namelists are +provided for this area. Surrogates are reserved for use with UTF-16 and then +must be used in pairs." The code points that are encoded by UTF-16 pairs are +available as independent code points in the UTF-8 encoding. (In other words, +the whole surrogate thing is a fudge for UTF-16 which unfortunately messes up +UTF-8.) +

    +

    +If an invalid UTF-8 string is passed to PCRE, an error return +(PCRE_ERROR_BADUTF8) is given. In some situations, you may already know that +your strings are valid, and therefore want to skip these checks in order to +improve performance. If you set the PCRE_NO_UTF8_CHECK flag at compile time or +at run time, PCRE assumes that the pattern or subject it is given +(respectively) contains only valid UTF-8 codes. In this case, it does not +diagnose an invalid UTF-8 string. +

    +

    +If you pass an invalid UTF-8 string when PCRE_NO_UTF8_CHECK is set, what +happens depends on why the string is invalid. If the string conforms to the +"old" definition of UTF-8 (RFC 2279), it is processed as a string of characters +in the range 0 to 0x7FFFFFFF. In other words, apart from the initial validity +test, PCRE (when in UTF-8 mode) handles strings according to the more liberal +rules of RFC 2279. However, if the string does not even conform to RFC 2279, +the result is undefined. Your program may crash. +

    +

    +If you want to process strings of values in the full range 0 to 0x7FFFFFFF, +encoded in a UTF-8-like manner as per the old RFC, you can set +PCRE_NO_UTF8_CHECK to bypass the more restrictive test. However, in this +situation, you will have to apply your own validity check. +

    +
    +General comments about UTF-8 mode +
    +

    +1. An unbraced hexadecimal escape sequence (such as \xb3) matches a two-byte +UTF-8 character if the value is greater than 127.

    -2. In a pattern, the escape sequence \x{...}, where the contents of the braces -is a string of hexadecimal digits, is interpreted as a UTF-8 character whose -code number is the given hexadecimal number, for example: \x{1234}. If a -non-hexadecimal digit appears between the braces, the item is not recognized. -This escape sequence can be used either as a literal, or within a character -class. +2. Octal numbers up to \777 are recognized, and match two-byte UTF-8 +characters for values greater than \177.

    -3. The original hexadecimal escape sequence, \xhh, matches a two-byte UTF-8 -character if the value is greater than 127. -

    -

    -4. Repeat quantifiers apply to complete UTF-8 characters, not to individual +3. Repeat quantifiers apply to complete UTF-8 characters, not to individual bytes, for example: \x{100}{3}.

    -5. The dot metacharacter matches one UTF-8 character instead of a single byte. +4. The dot metacharacter matches one UTF-8 character instead of a single byte.

    -6. The escape sequence \C can be used to match a single byte in UTF-8 mode, -but its use can lead to some strange effects. +5. The escape sequence \C can be used to match a single byte in UTF-8 mode, +but its use can lead to some strange effects. This facility is not available in +the alternative matching function, pcre_dfa_exec().

    -7. The character escapes \b, \B, \d, \D, \s, \S, \w, and \W correctly +6. The character escapes \b, \B, \d, \D, \s, \S, \w, and \W correctly test characters of any code value, but the characters that PCRE recognizes as digits, spaces, or word characters remain the same set as before, all with values less than 256. This remains true even when PCRE includes Unicode @@ -186,29 +259,44 @@ must use Unicode property tests such as \p{Nd}.

    -8. Similarly, characters that match the POSIX named character classes are all +7. Similarly, characters that match the POSIX named character classes are all low-valued characters.

    +8. However, the Perl 5.10 horizontal and vertical whitespace matching escapes +(\h, \H, \v, and \V) do match all the appropriate Unicode characters. +

    +

    9. Case-insensitive matching applies only to characters whose values are less than 128, unless PCRE is built with Unicode property support. Even when Unicode property support is available, PCRE still uses its own character tables when checking the case of low-valued characters, so as not to degrade performance. The Unicode property information is used only for characters with higher -values. +values. Even when Unicode property support is available, PCRE supports +case-insensitive matching only when there is a one-to-one mapping between a +letter's cases. There are a small number of many-to-one mappings in Unicode; +these are not supported by PCRE.


    AUTHOR

    -Philip Hazel <ph10@cam.ac.uk> +Philip Hazel +
    +University Computing Service
    -University Computing Service, +Cambridge CB2 3QH, England.
    -Cambridge CB2 3QG, England. +

    +

    +Putting an actual email address here seems to have been a spam magnet, so I've +taken it away. If you want to email me, use my two initials, followed by the +two digits 10, at the domain cam.ac.uk. +

    +
    REVISION
    +

    +Last updated: 09 August 2007
    -Phone: +44 1223 334714 -Last updated: 09 September 2004 +Copyright © 1997-2007 University of Cambridge.
    -Copyright © 1997-2004 University of Cambridge.

    Return to the PCRE index page.

    Modified: httpd/httpd/vendor/pcre/current/doc/html/pcre_compile.html URL: http://svn.apache.org/viewvc/httpd/httpd/vendor/pcre/current/doc/html/pcre_compile.html?rev=598339&r1=598338&r2=598339&view=diff ============================================================================== --- httpd/httpd/vendor/pcre/current/doc/html/pcre_compile.html (original) +++ httpd/httpd/vendor/pcre/current/doc/html/pcre_compile.html Mon Nov 26 08:49:53 2007 @@ -27,8 +27,9 @@ DESCRIPTION

    -This function compiles a regular expression into an internal form. Its -arguments are: +This function compiles a regular expression into an internal form. It is the +same as pcre_compile2(), except for the absence of the errorcodeptr +argument. Its arguments are:

       pattern       A zero-terminated string containing the
                       regular expression to be compiled
    @@ -42,13 +43,22 @@
     
       PCRE_ANCHORED         Force pattern anchoring
       PCRE_AUTO_CALLOUT     Compile automatic callouts
    +  PCRE_BSR_ANYCRLF      \R matches only CR, LF, or CRLF
    +  PCRE_BSR_UNICODE      \R matches all Unicode line endings
       PCRE_CASELESS         Do caseless matching
       PCRE_DOLLAR_ENDONLY   $ not to match newline at end
       PCRE_DOTALL           . matches anything including NL
    +  PCRE_DUPNAMES         Allow duplicate names for subpatterns
       PCRE_EXTENDED         Ignore whitespace and # comments
       PCRE_EXTRA            PCRE extra features
                               (not much use currently)
    +  PCRE_FIRSTLINE        Force matching to be before newline
       PCRE_MULTILINE        ^ and $ match newlines within data
    +  PCRE_NEWLINE_ANY      Recognize any Unicode newline sequence
    +  PCRE_NEWLINE_ANYCRLF  Recognize CR, LF, and CRLF as newline sequences
    +  PCRE_NEWLINE_CR       Set CR as the newline sequence
    +  PCRE_NEWLINE_CRLF     Set CRLF as the newline sequence
    +  PCRE_NEWLINE_LF       Set LF as the newline sequence
       PCRE_NO_AUTO_CAPTURE  Disable numbered capturing paren-
                               theses (named ones available)
       PCRE_UNGREEDY         Invert greediness of quantifiers
    @@ -62,7 +72,9 @@
     

    The yield of the function is a pointer to a private data structure that -contains the compiled pattern, or NULL if an error was detected. +contains the compiled pattern, or NULL if an error was detected. Note that +compiling regular expressions with one version of PCRE for use with a different +version is not guaranteed to work and may cause crashes.

    There is a complete description of the PCRE native API in the Added: httpd/httpd/vendor/pcre/current/doc/html/pcre_compile2.html URL: http://svn.apache.org/viewvc/httpd/httpd/vendor/pcre/current/doc/html/pcre_compile2.html?rev=598339&view=auto ============================================================================== --- httpd/httpd/vendor/pcre/current/doc/html/pcre_compile2.html (added) +++ httpd/httpd/vendor/pcre/current/doc/html/pcre_compile2.html Mon Nov 26 08:49:53 2007 @@ -0,0 +1,89 @@ + + +pcre_compile2 specification + + +

    pcre_compile2 man page

    +

    +Return to the PCRE index page. +

    +

    +This page is part of the PCRE HTML documentation. It was generated automatically +from the original man page. If there is any nonsense in it, please consult the +man page, in case the conversion went wrong. +
    +
    +SYNOPSIS +
    +

    +#include <pcre.h> +

    +

    +pcre *pcre_compile2(const char *pattern, int options, +int *errorcodeptr, +const char **errptr, int *erroffset, +const unsigned char *tableptr); +

    +
    +DESCRIPTION +
    +

    +This function compiles a regular expression into an internal form. It is the +same as pcre_compile(), except for the addition of the errorcodeptr +argument. The arguments are: +

    +

    +

    +  pattern       A zero-terminated string containing the
    +                  regular expression to be compiled
    +  options       Zero or more option bits
    +  errorcodeptr  Where to put an error code
    +  errptr        Where to put an error message
    +  erroffset     Offset in pattern where error was found
    +  tableptr      Pointer to character tables, or NULL to
    +                  use the built-in default
    +
    +The option bits are: +
    +  PCRE_ANCHORED         Force pattern anchoring
    +  PCRE_AUTO_CALLOUT     Compile automatic callouts
    +  PCRE_CASELESS         Do caseless matching
    +  PCRE_DOLLAR_ENDONLY   $ not to match newline at end
    +  PCRE_DOTALL           . matches anything including NL
    +  PCRE_DUPNAMES         Allow duplicate names for subpatterns
    +  PCRE_EXTENDED         Ignore whitespace and # comments
    +  PCRE_EXTRA            PCRE extra features
    +                          (not much use currently)
    +  PCRE_FIRSTLINE        Force matching to be before newline
    +  PCRE_MULTILINE        ^ and $ match newlines within data
    +  PCRE_NEWLINE_ANY      Recognize any Unicode newline sequence
    +  PCRE_NEWLINE_ANYCRLF  Recognize CR, LF, and CRLF as newline sequences
    +  PCRE_NEWLINE_CR       Set CR as the newline sequence
    +  PCRE_NEWLINE_CRLF     Set CRLF as the newline sequence
    +  PCRE_NEWLINE_LF       Set LF as the newline sequence
    +  PCRE_NO_AUTO_CAPTURE  Disable numbered capturing paren-
    +                          theses (named ones available)
    +  PCRE_UNGREEDY         Invert greediness of quantifiers
    +  PCRE_UTF8             Run in UTF-8 mode
    +  PCRE_NO_UTF8_CHECK    Do not check the pattern for UTF-8
    +                          validity (only relevant if
    +                          PCRE_UTF8 is set)
    +
    +PCRE must be built with UTF-8 support in order to use PCRE_UTF8 and +PCRE_NO_UTF8_CHECK. +

    +

    +The yield of the function is a pointer to a private data structure that +contains the compiled pattern, or NULL if an error was detected. Note that +compiling regular expressions with one version of PCRE for use with a different +version is not guaranteed to work and may cause crashes. +

    +

    +There is a complete description of the PCRE native API in the +pcreapi +page and a description of the POSIX API in the +pcreposix +page. +

    +Return to the PCRE index page. +

    Modified: httpd/httpd/vendor/pcre/current/doc/html/pcre_config.html URL: http://svn.apache.org/viewvc/httpd/httpd/vendor/pcre/current/doc/html/pcre_config.html?rev=598339&r1=598338&r2=598339&view=diff ============================================================================== --- httpd/httpd/vendor/pcre/current/doc/html/pcre_config.html (original) +++ httpd/httpd/vendor/pcre/current/doc/html/pcre_config.html Mon Nov 26 08:49:53 2007 @@ -36,7 +36,17 @@
       PCRE_CONFIG_LINK_SIZE     Internal link size: 2, 3, or 4
       PCRE_CONFIG_MATCH_LIMIT   Internal resource limit
    -  PCRE_CONFIG_NEWLINE       Value of the newline character
    +  PCRE_CONFIG_MATCH_LIMIT_RECURSION
    +                            Internal recursion depth limit
    +  PCRE_CONFIG_NEWLINE       Value of the default newline sequence:
    +                                13 (0x000d)    for CR
    +                                10 (0x000a)    for LF
    +                              3338 (0x0d0a)    for CRLF
    +                                -2             for ANYCRLF
    +                                -1             for ANY
    +  PCRE_CONFIG_BSR           Indicates what \R matches by default:
    +                                 0             all Unicode line endings
    +                                 1             CR, LF, or CRLF only
       PCRE_CONFIG_POSIX_MALLOC_THRESHOLD
                                 Threshold of return slots, above
                                   which malloc() is used by
    
    Modified: httpd/httpd/vendor/pcre/current/doc/html/pcre_copy_substring.html
    URL: http://svn.apache.org/viewvc/httpd/httpd/vendor/pcre/current/doc/html/pcre_copy_substring.html?rev=598339&r1=598338&r2=598339&view=diff
    ==============================================================================
    --- httpd/httpd/vendor/pcre/current/doc/html/pcre_copy_substring.html (original)
    +++ httpd/httpd/vendor/pcre/current/doc/html/pcre_copy_substring.html Mon Nov 26 08:49:53 2007
    @@ -37,7 +37,7 @@
       buffer        Buffer to receive the string
       buffersize    Size of buffer
     
    -The yield is the legnth of the string, PCRE_ERROR_NOMEMORY if the buffer was +The yield is the length of the string, PCRE_ERROR_NOMEMORY if the buffer was too small, or PCRE_ERROR_NOSUBSTRING if the string number is invalid.

    Added: httpd/httpd/vendor/pcre/current/doc/html/pcre_dfa_exec.html URL: http://svn.apache.org/viewvc/httpd/httpd/vendor/pcre/current/doc/html/pcre_dfa_exec.html?rev=598339&view=auto ============================================================================== --- httpd/httpd/vendor/pcre/current/doc/html/pcre_dfa_exec.html (added) +++ httpd/httpd/vendor/pcre/current/doc/html/pcre_dfa_exec.html Mon Nov 26 08:49:53 2007 @@ -0,0 +1,97 @@ + + +pcre_dfa_exec specification + + +

    pcre_dfa_exec man page

    +

    +Return to the PCRE index page. +

    +

    +This page is part of the PCRE HTML documentation. It was generated automatically +from the original man page. If there is any nonsense in it, please consult the +man page, in case the conversion went wrong. +
    +
    +SYNOPSIS +
    +

    +#include <pcre.h> +

    +

    +int pcre_dfa_exec(const pcre *code, const pcre_extra *extra, +const char *subject, int length, int startoffset, +int options, int *ovector, int ovecsize, +int *workspace, int wscount); +

    +
    +DESCRIPTION +
    +

    +This function matches a compiled regular expression against a given subject +string, using an alternative matching algorithm that scans the subject string +just once (not Perl-compatible). Note that the main, Perl-compatible, +matching function is pcre_exec(). The arguments for this function are: +

    +  code         Points to the compiled pattern
    +  extra        Points to an associated pcre_extra structure,
    +                 or is NULL
    +  subject      Points to the subject string
    +  length       Length of the subject string, in bytes
    +  startoffset  Offset in bytes in the subject at which to
    +                 start matching
    +  options      Option bits
    +  ovector      Points to a vector of ints for result offsets
    +  ovecsize     Number of elements in the vector
    +  workspace    Points to a vector of ints used as working space
    +  wscount      Number of elements in the vector
    +
    +The options are: +
    +  PCRE_ANCHORED      Match only at the first position
    +  PCRE_BSR_ANYCRLF   \R matches only CR, LF, or CRLF
    +  PCRE_BSR_UNICODE   \R matches all Unicode line endings
    +  PCRE_NEWLINE_ANY   Recognize any Unicode newline sequence
    +  PCRE_NEWLINE_ANYCRLF  Recognize CR, LF, and CRLF as newline sequences
    +  PCRE_NEWLINE_CR    Set CR as the newline sequence
    +  PCRE_NEWLINE_CRLF  Set CRLF as the newline sequence
    +  PCRE_NEWLINE_LF    Set LF as the newline sequence
    +  PCRE_NOTBOL        Subject is not the beginning of a line
    +  PCRE_NOTEOL        Subject is not the end of a line
    +  PCRE_NOTEMPTY      An empty string is not a valid match
    +  PCRE_NO_UTF8_CHECK Do not check the subject for UTF-8
    +                       validity (only relevant if PCRE_UTF8
    +                       was set at compile time)
    +  PCRE_PARTIAL       Return PCRE_ERROR_PARTIAL for a partial match
    +  PCRE_DFA_SHORTEST  Return only the shortest match
    +  PCRE_DFA_RESTART   This is a restart after a partial match
    +
    +There are restrictions on what may appear in a pattern when using this matching +function. Details are given in the +pcrematching +documentation. +

    +

    +A pcre_extra structure contains the following fields: +

    +  flags        Bits indicating which fields are set
    +  study_data   Opaque data from pcre_study()
    +  match_limit  Limit on internal resource use
    +  match_limit_recursion  Limit on internal recursion depth
    +  callout_data Opaque data passed back to callouts
    +  tables       Points to character tables or is NULL
    +
    +The flag bits are PCRE_EXTRA_STUDY_DATA, PCRE_EXTRA_MATCH_LIMIT, +PCRE_EXTRA_MATCH_LIMIT_RECURSION, PCRE_EXTRA_CALLOUT_DATA, and +PCRE_EXTRA_TABLES. For this matching function, the match_limit and +match_limit_recursion fields are not used, and must not be set. +

    +

    +There is a complete description of the PCRE native API in the +pcreapi +page and a description of the POSIX API in the +pcreposix +page. +

    +Return to the PCRE index page. +

    Modified: httpd/httpd/vendor/pcre/current/doc/html/pcre_exec.html URL: http://svn.apache.org/viewvc/httpd/httpd/vendor/pcre/current/doc/html/pcre_exec.html?rev=598339&r1=598338&r2=598339&view=diff ============================================================================== --- httpd/httpd/vendor/pcre/current/doc/html/pcre_exec.html (original) +++ httpd/httpd/vendor/pcre/current/doc/html/pcre_exec.html Mon Nov 26 08:49:53 2007 @@ -28,7 +28,8 @@

    This function matches a compiled regular expression against a given subject -string, and returns offsets to capturing subexpressions. Its arguments are: +string, using a matching algorithm that is similar to Perl's. It returns +offsets to captured substrings. Its arguments are:

       code         Points to the compiled pattern
       extra        Points to an associated pcre_extra structure,
    @@ -44,6 +45,13 @@
     The options are:
     
       PCRE_ANCHORED      Match only at the first position
    +  PCRE_BSR_ANYCRLF   \R matches only CR, LF, or CRLF
    +  PCRE_BSR_UNICODE   \R matches all Unicode line endings
    +  PCRE_NEWLINE_ANY   Recognize any Unicode newline sequence
    +  PCRE_NEWLINE_ANYCRLF  Recognize CR, LF, and CRLF as newline sequences
    +  PCRE_NEWLINE_CR    Set CR as the newline sequence
    +  PCRE_NEWLINE_CRLF  Set CRLF as the newline sequence
    +  PCRE_NEWLINE_LF    Set LF as the newline sequence
       PCRE_NOTBOL        Subject is not the beginning of a line
       PCRE_NOTEOL        Subject is not the end of a line
       PCRE_NOTEMPTY      An empty string is not a valid match
    @@ -53,19 +61,23 @@
       PCRE_PARTIAL       Return PCRE_ERROR_PARTIAL for a partial match
     
    There are restrictions on what may appear in a pattern when partial matching is -requested. +requested. For details, see the +pcrepartial +page.

    A pcre_extra structure contains the following fields:

       flags        Bits indicating which fields are set
       study_data   Opaque data from pcre_study()
    -  match_limit  Limit on internal recursion
    +  match_limit  Limit on internal resource use
    +  match_limit_recursion  Limit on internal recursion depth
       callout_data Opaque data passed back to callouts
       tables       Points to character tables or is NULL
     
    The flag bits are PCRE_EXTRA_STUDY_DATA, PCRE_EXTRA_MATCH_LIMIT, -PCRE_EXTRA_CALLOUT_DATA, and PCRE_EXTRA_TABLES. +PCRE_EXTRA_MATCH_LIMIT_RECURSION, PCRE_EXTRA_CALLOUT_DATA, and +PCRE_EXTRA_TABLES.

    There is a complete description of the PCRE native API in the Modified: httpd/httpd/vendor/pcre/current/doc/html/pcre_fullinfo.html URL: http://svn.apache.org/viewvc/httpd/httpd/vendor/pcre/current/doc/html/pcre_fullinfo.html?rev=598339&r1=598338&r2=598339&view=diff ============================================================================== --- httpd/httpd/vendor/pcre/current/doc/html/pcre_fullinfo.html (original) +++ httpd/httpd/vendor/pcre/current/doc/html/pcre_fullinfo.html Mon Nov 26 08:49:53 2007 @@ -42,13 +42,14 @@ -1 for start of string or after newline, or -2 otherwise - PCRE_INFO_FIRSTTABLE Table of first bytes - (after studying) + PCRE_INFO_FIRSTTABLE Table of first bytes (after studying) + PCRE_INFO_JCHANGED Return 1 if (?J) was used PCRE_INFO_LASTLITERAL Literal last byte required PCRE_INFO_NAMECOUNT Number of named subpatterns PCRE_INFO_NAMEENTRYSIZE Size of name table entry PCRE_INFO_NAMETABLE Pointer to name table - PCRE_INFO_OPTIONS Options used for compilation + PCRE_INFO_OKPARTIAL Return 1 if partial matching can be tried + PCRE_INFO_OPTIONS Option bits used for compilation PCRE_INFO_SIZE Size of compiled pattern PCRE_INFO_STUDYSIZE Size of study data

    Modified: httpd/httpd/vendor/pcre/current/doc/html/pcre_get_named_substring.html URL: http://svn.apache.org/viewvc/httpd/httpd/vendor/pcre/current/doc/html/pcre_get_named_substring.html?rev=598339&r1=598338&r2=598339&view=diff ============================================================================== --- httpd/httpd/vendor/pcre/current/doc/html/pcre_get_named_substring.html (original) +++ httpd/httpd/vendor/pcre/current/doc/html/pcre_get_named_substring.html Mon Nov 26 08:49:53 2007 @@ -39,9 +39,10 @@ stringptr Where to put the string pointer
    The memory in which the substring is placed is obtained by calling -pcre_malloc(). The yield of the function is the length of the extracted -substring, PCRE_ERROR_NOMEMORY if sufficient memory could not be obtained, or -PCRE_ERROR_NOSUBSTRING if the string name is invalid. +pcre_malloc(). The convenience function pcre_free_substring() can +be used to free it when it is no longer needed. The yield of the function is +the length of the extracted substring, PCRE_ERROR_NOMEMORY if sufficient memory +could not be obtained, or PCRE_ERROR_NOSUBSTRING if the string name is invalid.

    There is a complete description of the PCRE native API in the Modified: httpd/httpd/vendor/pcre/current/doc/html/pcre_get_stringnumber.html URL: http://svn.apache.org/viewvc/httpd/httpd/vendor/pcre/current/doc/html/pcre_get_stringnumber.html?rev=598339&r1=598338&r2=598339&view=diff ============================================================================== --- httpd/httpd/vendor/pcre/current/doc/html/pcre_get_stringnumber.html (original) +++ httpd/httpd/vendor/pcre/current/doc/html/pcre_get_stringnumber.html Mon Nov 26 08:49:53 2007 @@ -33,7 +33,10 @@ name Name whose number is required

    The yield of the function is the number of the parenthesis if the name is -found, or PCRE_ERROR_NOSUBSTRING otherwise. +found, or PCRE_ERROR_NOSUBSTRING otherwise. When duplicate names are allowed +(PCRE_DUPNAMES is set), it is not defined which of the numbers is returned by +pcre_get_stringnumber(). You can obtain the complete list by calling +pcre_get_stringtable_entries().

    There is a complete description of the PCRE native API in the Added: httpd/httpd/vendor/pcre/current/doc/html/pcre_get_stringtable_entries.html URL: http://svn.apache.org/viewvc/httpd/httpd/vendor/pcre/current/doc/html/pcre_get_stringtable_entries.html?rev=598339&view=auto ============================================================================== --- httpd/httpd/vendor/pcre/current/doc/html/pcre_get_stringtable_entries.html (added) +++ httpd/httpd/vendor/pcre/current/doc/html/pcre_get_stringtable_entries.html Mon Nov 26 08:49:53 2007 @@ -0,0 +1,52 @@ + + +pcre_get_stringtable_entries specification + + +

    pcre_get_stringtable_entries man page

    +

    +Return to the PCRE index page. +

    +

    +This page is part of the PCRE HTML documentation. It was generated automatically +from the original man page. If there is any nonsense in it, please consult the +man page, in case the conversion went wrong. +
    +
    +SYNOPSIS +
    +

    +#include <pcre.h> +

    +

    +int pcre_get_stringtable_entries(const pcre *code, +const char *name, char **first, char **last); +

    +
    +DESCRIPTION +
    +

    +This convenience function finds, for a compiled pattern, the first and last +entries for a given name in the table that translates capturing parenthesis +names into numbers. When names are required to be unique (PCRE_DUPNAMES is +not set), it is usually easier to use pcre_get_stringnumber() +instead. +

    +  code    Compiled regular expression
    +  name    Name whose entries required
    +  first   Where to return a pointer to the first entry
    +  last    Where to return a pointer to the last entry
    +
    +The yield of the function is the length of each entry, or +PCRE_ERROR_NOSUBSTRING if none are found. +

    +

    +There is a complete description of the PCRE native API, including the format of +the table entries, in the +pcreapi +page, and a description of the POSIX API in the +pcreposix +page. +

    +Return to the PCRE index page. +

    Modified: httpd/httpd/vendor/pcre/current/doc/html/pcre_get_substring.html URL: http://svn.apache.org/viewvc/httpd/httpd/vendor/pcre/current/doc/html/pcre_get_substring.html?rev=598339&r1=598338&r2=598339&view=diff ============================================================================== --- httpd/httpd/vendor/pcre/current/doc/html/pcre_get_substring.html (original) +++ httpd/httpd/vendor/pcre/current/doc/html/pcre_get_substring.html Mon Nov 26 08:49:53 2007 @@ -37,9 +37,10 @@ stringptr Where to put the string pointer The memory in which the substring is placed is obtained by calling -pcre_malloc(). The yield of the function is the length of the substring, -PCRE_ERROR_NOMEMORY if sufficient memory could not be obtained, or -PCRE_ERROR_NOSUBSTRING if the string number is invalid. +pcre_malloc(). The convenience function pcre_free_substring() can +be used to free it when it is no longer needed. The yield of the function is +the length of the substring, PCRE_ERROR_NOMEMORY if sufficient memory could not +be obtained, or PCRE_ERROR_NOSUBSTRING if the string number is invalid.

    There is a complete description of the PCRE native API in the