summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/Pcre16/docs/COPYING5
-rw-r--r--libs/Pcre16/docs/ChangeLog6157
-rw-r--r--libs/Pcre16/docs/HACKING528
-rw-r--r--libs/Pcre16/docs/INSTALL368
-rw-r--r--libs/Pcre16/docs/NON-AUTOTOOLS-BUILD773
-rw-r--r--libs/Pcre16/docs/NON-UNIX-USE7
-rw-r--r--libs/Pcre16/docs/README1002
-rw-r--r--libs/Pcre16/docs/doc/html/NON-AUTOTOOLS-BUILD.txt773
-rw-r--r--libs/Pcre16/docs/doc/html/README.txt1002
-rw-r--r--libs/Pcre16/docs/doc/html/index.html185
-rw-r--r--libs/Pcre16/docs/doc/html/pcre-config.html109
-rw-r--r--libs/Pcre16/docs/doc/html/pcre.html224
-rw-r--r--libs/Pcre16/docs/doc/html/pcre16.html384
-rw-r--r--libs/Pcre16/docs/doc/html/pcre32.html382
-rw-r--r--libs/Pcre16/docs/doc/html/pcre_assign_jit_stack.html76
-rw-r--r--libs/Pcre16/docs/doc/html/pcre_compile.html111
-rw-r--r--libs/Pcre16/docs/doc/html/pcre_compile2.html115
-rw-r--r--libs/Pcre16/docs/doc/html/pcre_config.html94
-rw-r--r--libs/Pcre16/docs/doc/html/pcre_copy_named_substring.html65
-rw-r--r--libs/Pcre16/docs/doc/html/pcre_copy_substring.html61
-rw-r--r--libs/Pcre16/docs/doc/html/pcre_dfa_exec.html129
-rw-r--r--libs/Pcre16/docs/doc/html/pcre_exec.html111
-rw-r--r--libs/Pcre16/docs/doc/html/pcre_free_study.html46
-rw-r--r--libs/Pcre16/docs/doc/html/pcre_free_substring.html46
-rw-r--r--libs/Pcre16/docs/doc/html/pcre_free_substring_list.html46
-rw-r--r--libs/Pcre16/docs/doc/html/pcre_fullinfo.html118
-rw-r--r--libs/Pcre16/docs/doc/html/pcre_get_named_substring.html68
-rw-r--r--libs/Pcre16/docs/doc/html/pcre_get_stringnumber.html57
-rw-r--r--libs/Pcre16/docs/doc/html/pcre_get_stringtable_entries.html60
-rw-r--r--libs/Pcre16/docs/doc/html/pcre_get_substring.html64
-rw-r--r--libs/Pcre16/docs/doc/html/pcre_get_substring_list.html61
-rw-r--r--libs/Pcre16/docs/doc/html/pcre_jit_exec.html108
-rw-r--r--libs/Pcre16/docs/doc/html/pcre_jit_stack_alloc.html55
-rw-r--r--libs/Pcre16/docs/doc/html/pcre_jit_stack_free.html48
-rw-r--r--libs/Pcre16/docs/doc/html/pcre_maketables.html48
-rw-r--r--libs/Pcre16/docs/doc/html/pcre_pattern_to_host_byte_order.html58
-rw-r--r--libs/Pcre16/docs/doc/html/pcre_refcount.html51
-rw-r--r--libs/Pcre16/docs/doc/html/pcre_study.html68
-rw-r--r--libs/Pcre16/docs/doc/html/pcre_utf16_to_host_byte_order.html57
-rw-r--r--libs/Pcre16/docs/doc/html/pcre_utf32_to_host_byte_order.html57
-rw-r--r--libs/Pcre16/docs/doc/html/pcre_version.html46
-rw-r--r--libs/Pcre16/docs/doc/html/pcreapi.html2921
-rw-r--r--libs/Pcre16/docs/doc/html/pcrebuild.html534
-rw-r--r--libs/Pcre16/docs/doc/html/pcrecallout.html286
-rw-r--r--libs/Pcre16/docs/doc/html/pcrecompat.html235
-rw-r--r--libs/Pcre16/docs/doc/html/pcrecpp.html368
-rw-r--r--libs/Pcre16/docs/doc/html/pcredemo.html426
-rw-r--r--libs/Pcre16/docs/doc/html/pcregrep.html759
-rw-r--r--libs/Pcre16/docs/doc/html/pcrejit.html499
-rw-r--r--libs/Pcre16/docs/doc/html/pcrelimits.html90
-rw-r--r--libs/Pcre16/docs/doc/html/pcrematching.html242
-rw-r--r--libs/Pcre16/docs/doc/html/pcrepartial.html509
-rw-r--r--libs/Pcre16/docs/doc/html/pcrepattern.html3276
-rw-r--r--libs/Pcre16/docs/doc/html/pcreperform.html195
-rw-r--r--libs/Pcre16/docs/doc/html/pcreposix.html290
-rw-r--r--libs/Pcre16/docs/doc/html/pcreprecompile.html163
-rw-r--r--libs/Pcre16/docs/doc/html/pcresample.html110
-rw-r--r--libs/Pcre16/docs/doc/html/pcrestack.html225
-rw-r--r--libs/Pcre16/docs/doc/html/pcresyntax.html561
-rw-r--r--libs/Pcre16/docs/doc/html/pcretest.html1163
-rw-r--r--libs/Pcre16/docs/doc/html/pcreunicode.html262
-rw-r--r--libs/Pcre16/docs/doc/index.html.src185
-rw-r--r--libs/Pcre16/docs/doc/pcre-config.192
-rw-r--r--libs/Pcre16/docs/doc/pcre-config.txt86
-rw-r--r--libs/Pcre16/docs/doc/pcre.3230
-rw-r--r--libs/Pcre16/docs/doc/pcre.txt10502
-rw-r--r--libs/Pcre16/docs/doc/pcre16.3371
-rw-r--r--libs/Pcre16/docs/doc/pcre32.3369
-rw-r--r--libs/Pcre16/docs/doc/pcre_assign_jit_stack.359
-rw-r--r--libs/Pcre16/docs/doc/pcre_compile.396
-rw-r--r--libs/Pcre16/docs/doc/pcre_compile2.3101
-rw-r--r--libs/Pcre16/docs/doc/pcre_config.379
-rw-r--r--libs/Pcre16/docs/doc/pcre_copy_named_substring.351
-rw-r--r--libs/Pcre16/docs/doc/pcre_copy_substring.347
-rw-r--r--libs/Pcre16/docs/doc/pcre_dfa_exec.3118
-rw-r--r--libs/Pcre16/docs/doc/pcre_exec.399
-rw-r--r--libs/Pcre16/docs/doc/pcre_free_study.331
-rw-r--r--libs/Pcre16/docs/doc/pcre_free_substring.331
-rw-r--r--libs/Pcre16/docs/doc/pcre_free_substring_list.331
-rw-r--r--libs/Pcre16/docs/doc/pcre_fullinfo.3103
-rw-r--r--libs/Pcre16/docs/doc/pcre_get_named_substring.354
-rw-r--r--libs/Pcre16/docs/doc/pcre_get_stringnumber.343
-rw-r--r--libs/Pcre16/docs/doc/pcre_get_stringtable_entries.346
-rw-r--r--libs/Pcre16/docs/doc/pcre_get_substring.350
-rw-r--r--libs/Pcre16/docs/doc/pcre_get_substring_list.347
-rw-r--r--libs/Pcre16/docs/doc/pcre_jit_exec.396
-rw-r--r--libs/Pcre16/docs/doc/pcre_jit_stack_alloc.343
-rw-r--r--libs/Pcre16/docs/doc/pcre_jit_stack_free.335
-rw-r--r--libs/Pcre16/docs/doc/pcre_maketables.333
-rw-r--r--libs/Pcre16/docs/doc/pcre_pattern_to_host_byte_order.344
-rw-r--r--libs/Pcre16/docs/doc/pcre_refcount.336
-rw-r--r--libs/Pcre16/docs/doc/pcre_study.354
-rw-r--r--libs/Pcre16/docs/doc/pcre_utf16_to_host_byte_order.345
-rw-r--r--libs/Pcre16/docs/doc/pcre_utf32_to_host_byte_order.345
-rw-r--r--libs/Pcre16/docs/doc/pcre_version.331
-rw-r--r--libs/Pcre16/docs/doc/pcreapi.32918
-rw-r--r--libs/Pcre16/docs/doc/pcrebuild.3550
-rw-r--r--libs/Pcre16/docs/doc/pcrecallout.3255
-rw-r--r--libs/Pcre16/docs/doc/pcrecompat.3200
-rw-r--r--libs/Pcre16/docs/doc/pcrecpp.3348
-rw-r--r--libs/Pcre16/docs/doc/pcredemo.3424
-rw-r--r--libs/Pcre16/docs/doc/pcregrep.1683
-rw-r--r--libs/Pcre16/docs/doc/pcregrep.txt741
-rw-r--r--libs/Pcre16/docs/doc/pcrejit.3473
-rw-r--r--libs/Pcre16/docs/doc/pcrelimits.371
-rw-r--r--libs/Pcre16/docs/doc/pcrematching.3214
-rw-r--r--libs/Pcre16/docs/doc/pcrepartial.3476
-rw-r--r--libs/Pcre16/docs/doc/pcrepattern.33304
-rw-r--r--libs/Pcre16/docs/doc/pcreperform.3177
-rw-r--r--libs/Pcre16/docs/doc/pcreposix.3267
-rw-r--r--libs/Pcre16/docs/doc/pcreprecompile.3155
-rw-r--r--libs/Pcre16/docs/doc/pcresample.399
-rw-r--r--libs/Pcre16/docs/doc/pcrestack.3215
-rw-r--r--libs/Pcre16/docs/doc/pcresyntax.3540
-rw-r--r--libs/Pcre16/docs/doc/pcretest.11160
-rw-r--r--libs/Pcre16/docs/doc/pcretest.txt1091
-rw-r--r--libs/Pcre16/docs/doc/pcreunicode.3249
-rw-r--r--libs/Pcre16/docs/doc/perltest.txt42
-rw-r--r--libs/hunspell/docs/ABOUT-NLS1379
-rw-r--r--libs/hunspell/docs/BUGS5
-rw-r--r--libs/hunspell/docs/ChangeLog1993
-rw-r--r--libs/hunspell/docs/ChangeLog.O524
-rw-r--r--libs/hunspell/docs/HACKING10
-rw-r--r--libs/hunspell/docs/INSTALL370
-rw-r--r--libs/hunspell/docs/README1
-rw-r--r--libs/hunspell/docs/README.md182
-rw-r--r--libs/hunspell/docs/README.myspell69
-rw-r--r--libs/hunspell/docs/TODO4
-rw-r--r--libs/libaxolotl/README.md211
-rw-r--r--libs/libaxolotl/docs/LICENSE (renamed from libs/libaxolotl/LICENSE)0
-rw-r--r--libs/libcurl/docs/BINDINGS242
-rw-r--r--libs/libcurl/docs/BUGS148
-rw-r--r--libs/libcurl/docs/CONTRIBUTE310
-rw-r--r--libs/libcurl/docs/DISTRO-DILEMMA176
-rw-r--r--libs/libcurl/docs/FAQ1476
-rw-r--r--libs/libcurl/docs/FEATURES196
-rw-r--r--libs/libcurl/docs/HISTORY244
-rw-r--r--libs/libcurl/docs/HTTP-COOKIES123
-rw-r--r--libs/libcurl/docs/INSTALL1131
-rw-r--r--libs/libcurl/docs/INSTALL.devcpp302
-rw-r--r--libs/libcurl/docs/INTERNALS471
-rw-r--r--libs/libcurl/docs/KNOWN_BUGS250
-rw-r--r--libs/libcurl/docs/MAIL-ETIQUETTE228
-rw-r--r--libs/libcurl/docs/MANUAL1023
-rw-r--r--libs/libcurl/docs/Makefile.am61
-rw-r--r--libs/libcurl/docs/Makefile.in819
-rw-r--r--libs/libcurl/docs/README49
-rw-r--r--libs/libcurl/docs/README.netware27
-rw-r--r--libs/libcurl/docs/README.win3226
-rw-r--r--libs/libcurl/docs/RELEASE-NOTES111
-rw-r--r--libs/libcurl/docs/RESOURCES83
-rw-r--r--libs/libcurl/docs/SSLCERTS138
-rw-r--r--libs/libcurl/docs/TODO700
-rw-r--r--libs/libcurl/docs/TheArtOfHttpScripting507
-rw-r--r--libs/libcurl/docs/VERSIONS60
-rw-r--r--libs/libcurl/docs/curl-config.198
-rw-r--r--libs/libcurl/docs/curl-config.html91
-rw-r--r--libs/libcurl/docs/curl-config.pdfbin6016 -> 0 bytes
-rw-r--r--libs/libcurl/docs/curl.12070
-rw-r--r--libs/libcurl/docs/curl.html961
-rw-r--r--libs/libcurl/docs/curl.pdfbin96907 -> 0 bytes
-rw-r--r--libs/libcurl/docs/index.html20
-rw-r--r--libs/libcurl/docs/mk-ca-bundle.170
-rw-r--r--libs/libcurl/docs/mk-ca-bundle.html82
-rw-r--r--libs/libcurl/docs/mk-ca-bundle.pdfbin4957 -> 0 bytes
-rw-r--r--libs/liblua/docs/logo.gifbin0 -> 9893 bytes
-rw-r--r--libs/liblua/docs/lua.css164
-rw-r--r--libs/liblua/docs/osi-certified-72x60.pngbin0 -> 3774 bytes
-rw-r--r--libs/liblua/docs/readme.html365
-rw-r--r--libs/libsodium/docs/README.markdown46
-rw-r--r--libs/libsodium/docs/THANKS91
-rw-r--r--libs/pthreads/docs/ANNOUNCE483
-rw-r--r--libs/pthreads/docs/BUGS141
-rw-r--r--libs/pthreads/docs/Bmakefile268
-rw-r--r--libs/pthreads/docs/ChangeLog5211
-rw-r--r--libs/pthreads/docs/FAQ451
-rw-r--r--libs/pthreads/docs/GNUmakefile593
-rw-r--r--libs/pthreads/docs/MAINTAINERS4
-rw-r--r--libs/pthreads/docs/Makefile514
-rw-r--r--libs/pthreads/docs/Nmakefile24
-rw-r--r--libs/pthreads/docs/PROGRESS4
-rw-r--r--libs/pthreads/docs/README601
-rw-r--r--libs/pthreads/docs/TODO7
-rw-r--r--libs/pthreads/docs/WinCE-PORT222
-rw-r--r--libs/zlib/docs/FAQ368
-rw-r--r--libs/zlib/docs/INDEX68
186 files changed, 529 insertions, 81109 deletions
diff --git a/libs/Pcre16/docs/COPYING b/libs/Pcre16/docs/COPYING
deleted file mode 100644
index 58eed01b61..0000000000
--- a/libs/Pcre16/docs/COPYING
+++ /dev/null
@@ -1,5 +0,0 @@
-PCRE LICENCE
-
-Please see the file LICENCE in the PCRE distribution for licensing details.
-
-End
diff --git a/libs/Pcre16/docs/ChangeLog b/libs/Pcre16/docs/ChangeLog
deleted file mode 100644
index 7b53195f6a..0000000000
--- a/libs/Pcre16/docs/ChangeLog
+++ /dev/null
@@ -1,6157 +0,0 @@
-ChangeLog for PCRE
-------------------
-
-Note that the PCRE 8.xx series (PCRE1) is now in a bugfix-only state. All
-development is happening in the PCRE2 10.xx series.
-
-
-Version 8.42 20-March-2018
---------------------------
-
-1. Fixed a MIPS issue in the JIT compiler reported by Joshua Kinard.
-
-2. Fixed outdated real_pcre definitions in pcre.h.in (patch by Evgeny Kotkov).
-
-3. pcregrep was truncating components of file names to 128 characters when
-processing files with the -r option, and also (some very odd code) truncating
-path names to 512 characters. There is now a check on the absolute length of
-full path file names, which may be up to 2047 characters long.
-
-4. Using pcre_dfa_exec(), in UTF mode when UCP support was not defined, there
-was the possibility of a false positive match when caselessly matching a "not
-this character" item such as [^\x{1234}] (with a code point greater than 127)
-because the "other case" variable was not being initialized.
-
-5. Although pcre_jit_exec checks whether the pattern is compiled
-in a given mode, it was also expected that at least one mode is available.
-This is fixed and pcre_jit_exec returns with PCRE_ERROR_JIT_BADOPTION
-when the pattern is not optimized by JIT at all.
-
-6. The line number and related variables such as match counts in pcregrep
-were all int variables, causing overflow when files with more than 2147483647
-lines were processed (assuming 32-bit ints). They have all been changed to
-unsigned long ints.
-
-7. If a backreference with a minimum repeat count of zero was first in a
-pattern, apart from assertions, an incorrect first matching character could be
-recorded. For example, for the pattern /(?=(a))\1?b/, "b" was incorrectly set
-as the first character of a match.
-
-8. Fix out-of-bounds read for partial matching of /./ against an empty string
-when the newline type is CRLF.
-
-9. When matching using the the REG_STARTEND feature of the POSIX API with a
-non-zero starting offset, unset capturing groups with lower numbers than a
-group that did capture something were not being correctly returned as "unset"
-(that is, with offset values of -1).
-
-10. Matching the pattern /(*UTF)\C[^\v]+\x80/ against an 8-bit string
-containing multi-code-unit characters caused bad behaviour and possibly a
-crash. This issue was fixed for other kinds of repeat in release 8.37 by change
-38, but repeating character classes were overlooked.
-
-11. A small fix to pcregrep to avoid compiler warnings for -Wformat-overflow=2.
-
-12. Added --enable-jit=auto support to configure.ac.
-
-13. Fix misleading error message in configure.ac.
-
-
-Version 8.41 05-July-2017
--------------------------
-
-1. Fixed typo in CMakeLists.txt (wrong number of arguments for
-PCRE_STATIC_RUNTIME (affects MSVC only).
-
-2. Issue 1 for 8.40 below was not correctly fixed. If pcregrep in multiline
-mode with --only-matching matched several lines, it restarted scanning at the
-next line instead of moving on to the end of the matched string, which can be
-several lines after the start.
-
-3. Fix a missing else in the JIT compiler reported by 'idaifish'.
-
-4. A (?# style comment is now ignored between a basic quantifier and a
-following '+' or '?' (example: /X+(?#comment)?Y/.
-
-5. Avoid use of a potentially overflowing buffer in pcregrep (patch by Petr
-Pisar).
-
-6. Fuzzers have reported issues in pcretest. These are NOT serious (it is,
-after all, just a test program). However, to stop the reports, some easy ones
-are fixed:
-
- (a) Check for values < 256 when calling isprint() in pcretest.
- (b) Give an error for too big a number after \O.
-
-7. In the 32-bit library in non-UTF mode, an attempt to find a Unicode
-property for a character with a code point greater than 0x10ffff (the Unicode
-maximum) caused a crash.
-
-8. The alternative matching function, pcre_dfa_exec() misbehaved if it
-encountered a character class with a possessive repeat, for example [a-f]{3}+.
-
-9. When pcretest called pcre_copy_substring() in 32-bit mode, it set the buffer
-length incorrectly, which could result in buffer overflow.
-
-10. Remove redundant line of code (accidentally left in ages ago).
-
-11. Applied C++ patch from Irfan Adilovic to guard 'using std::' directives
-with namespace pcrecpp (Bugzilla #2084).
-
-12. Remove a duplication typo in pcre_tables.c.
-
-13. Fix returned offsets from regexec() when REG_STARTEND is used with a
-starting offset greater than zero.
-
-
-Version 8.40 11-January-2017
-----------------------------
-
-1. Using -o with -M in pcregrep could cause unnecessary repeated output when
- the match extended over a line boundary.
-
-2. Applied Chris Wilson's second patch (Bugzilla #1681) to CMakeLists.txt for
- MSVC static compilation, putting the first patch under a new option.
-
-3. Fix register overwite in JIT when SSE2 acceleration is enabled.
-
-4. Ignore "show all captures" (/=) for DFA matching.
-
-5. Fix JIT unaligned accesses on x86. Patch by Marc Mutz.
-
-6. In any wide-character mode (8-bit UTF or any 16-bit or 32-bit mode),
- without PCRE_UCP set, a negative character type such as \D in a positive
- class should cause all characters greater than 255 to match, whatever else
- is in the class. There was a bug that caused this not to happen if a
- Unicode property item was added to such a class, for example [\D\P{Nd}] or
- [\W\pL].
-
-7. When pcretest was outputing information from a callout, the caret indicator
- for the current position in the subject line was incorrect if it was after
- an escape sequence for a character whose code point was greater than
- \x{ff}.
-
-8. A pattern such as (?<RA>abc)(?(R)xyz) was incorrectly compiled such that
- the conditional was interpreted as a reference to capturing group 1 instead
- of a test for recursion. Any group whose name began with R was
- misinterpreted in this way. (The reference interpretation should only
- happen if the group's name is precisely "R".)
-
-9. A number of bugs have been mended relating to match start-up optimizations
- when the first thing in a pattern is a positive lookahead. These all
- applied only when PCRE_NO_START_OPTIMIZE was *not* set:
-
- (a) A pattern such as (?=.*X)X$ was incorrectly optimized as if it needed
- both an initial 'X' and a following 'X'.
- (b) Some patterns starting with an assertion that started with .* were
- incorrectly optimized as having to match at the start of the subject or
- after a newline. There are cases where this is not true, for example,
- (?=.*[A-Z])(?=.{8,16})(?!.*[\s]) matches after the start in lines that
- start with spaces. Starting .* in an assertion is no longer taken as an
- indication of matching at the start (or after a newline).
-
-
-Version 8.39 14-June-2016
--------------------------
-
-1. If PCRE_AUTO_CALLOUT was set on a pattern that had a (?# comment between
- an item and its qualifier (for example, A(?#comment)?B) pcre_compile()
- misbehaved. This bug was found by the LLVM fuzzer.
-
-2. Similar to the above, if an isolated \E was present between an item and its
- qualifier when PCRE_AUTO_CALLOUT was set, pcre_compile() misbehaved. This
- bug was found by the LLVM fuzzer.
-
-3. Further to 8.38/46, negated classes such as [^[:^ascii:]\d] were also not
- working correctly in UCP mode.
-
-4. The POSIX wrapper function regexec() crashed if the option REG_STARTEND
- was set when the pmatch argument was NULL. It now returns REG_INVARG.
-
-5. Allow for up to 32-bit numbers in the ordin() function in pcregrep.
-
-6. An empty \Q\E sequence between an item and its qualifier caused
- pcre_compile() to misbehave when auto callouts were enabled. This bug was
- found by the LLVM fuzzer.
-
-7. If a pattern that was compiled with PCRE_EXTENDED started with white
- space or a #-type comment that was followed by (?-x), which turns off
- PCRE_EXTENDED, and there was no subsequent (?x) to turn it on again,
- pcre_compile() assumed that (?-x) applied to the whole pattern and
- consequently mis-compiled it. This bug was found by the LLVM fuzzer.
-
-8. A call of pcre_copy_named_substring() for a named substring whose number
- was greater than the space in the ovector could cause a crash.
-
-9. Yet another buffer overflow bug involved duplicate named groups with a
- group that reset capture numbers (compare 8.38/7 below). Once again, I have
- just allowed for more memory, even if not needed. (A proper fix is
- implemented in PCRE2, but it involves a lot of refactoring.)
-
-10. pcre_get_substring_list() crashed if the use of \K in a match caused the
- start of the match to be earlier than the end.
-
-11. Migrating appropriate PCRE2 JIT improvements to PCRE.
-
-12. A pattern such as /(?<=((?C)0))/, which has a callout inside a lookbehind
- assertion, caused pcretest to generate incorrect output, and also to read
- uninitialized memory (detected by ASAN or valgrind).
-
-13. A pattern that included (*ACCEPT) in the middle of a sufficiently deeply
- nested set of parentheses of sufficient size caused an overflow of the
- compiling workspace (which was diagnosed, but of course is not desirable).
-
-14. And yet another buffer overflow bug involving duplicate named groups, this
- time nested, with a nested back reference. Yet again, I have just allowed
- for more memory, because anything more needs all the refactoring that has
- been done for PCRE2. An example pattern that provoked this bug is:
- /((?J)(?'R'(?'R'(?'R'(?'R'(?'R'(?|(\k'R'))))))))/ and the bug was
- registered as CVE-2016-1283.
-
-15. pcretest went into a loop if global matching was requested with an ovector
- size less than 2. It now gives an error message. This bug was found by
- afl-fuzz.
-
-16. An invalid pattern fragment such as (?(?C)0 was not diagnosing an error
- ("assertion expected") when (?(?C) was not followed by an opening
- parenthesis.
-
-17. Fixed typo ("&&" for "&") in pcre_study(). Fortunately, this could not
- actually affect anything, by sheer luck.
-
-18. Applied Chris Wilson's patch (Bugzilla #1681) to CMakeLists.txt for MSVC
- static compilation.
-
-19. Modified the RunTest script to incorporate a valgrind suppressions file so
- that certain errors, provoked by the SSE2 instruction set when JIT is used,
- are ignored.
-
-20. A racing condition is fixed in JIT reported by Mozilla.
-
-21. Minor code refactor to avoid "array subscript is below array bounds"
- compiler warning.
-
-22. Minor code refactor to avoid "left shift of negative number" warning.
-
-23. Fix typo causing compile error when 16- or 32-bit JIT is compiled without
- UCP support.
-
-24. Refactor to avoid compiler warnings in pcrecpp.cc.
-
-25. Refactor to fix a typo in pcre_jit_test.c
-
-26. Patch to support compiling pcrecpp.cc with Intel compiler.
-
-
-Version 8.38 23-November-2015
------------------------------
-
-1. If a group that contained a recursive back reference also contained a
- forward reference subroutine call followed by a non-forward-reference
- subroutine call, for example /.((?2)(?R)\1)()/, pcre_compile() failed to
- compile correct code, leading to undefined behaviour or an internally
- detected error. This bug was discovered by the LLVM fuzzer.
-
-2. Quantification of certain items (e.g. atomic back references) could cause
- incorrect code to be compiled when recursive forward references were
- involved. For example, in this pattern: /(?1)()((((((\1++))\x85)+)|))/.
- This bug was discovered by the LLVM fuzzer.
-
-3. A repeated conditional group whose condition was a reference by name caused
- a buffer overflow if there was more than one group with the given name.
- This bug was discovered by the LLVM fuzzer.
-
-4. A recursive back reference by name within a group that had the same name as
- another group caused a buffer overflow. For example:
- /(?J)(?'d'(?'d'\g{d}))/. This bug was discovered by the LLVM fuzzer.
-
-5. A forward reference by name to a group whose number is the same as the
- current group, for example in this pattern: /(?|(\k'Pm')|(?'Pm'))/, caused
- a buffer overflow at compile time. This bug was discovered by the LLVM
- fuzzer.
-
-6. A lookbehind assertion within a set of mutually recursive subpatterns could
- provoke a buffer overflow. This bug was discovered by the LLVM fuzzer.
-
-7. Another buffer overflow bug involved duplicate named groups with a
- reference between their definition, with a group that reset capture
- numbers, for example: /(?J:(?|(?'R')(\k'R')|((?'R'))))/. This has been
- fixed by always allowing for more memory, even if not needed. (A proper fix
- is implemented in PCRE2, but it involves more refactoring.)
-
-8. There was no check for integer overflow in subroutine calls such as (?123).
-
-9. The table entry for \l in EBCDIC environments was incorrect, leading to its
- being treated as a literal 'l' instead of causing an error.
-
-10. There was a buffer overflow if pcre_exec() was called with an ovector of
- size 1. This bug was found by american fuzzy lop.
-
-11. If a non-capturing group containing a conditional group that could match
- an empty string was repeated, it was not identified as matching an empty
- string itself. For example: /^(?:(?(1)x|)+)+$()/.
-
-12. In an EBCDIC environment, pcretest was mishandling the escape sequences
- \a and \e in test subject lines.
-
-13. In an EBCDIC environment, \a in a pattern was converted to the ASCII
- instead of the EBCDIC value.
-
-14. The handling of \c in an EBCDIC environment has been revised so that it is
- now compatible with the specification in Perl's perlebcdic page.
-
-15. The EBCDIC character 0x41 is a non-breaking space, equivalent to 0xa0 in
- ASCII/Unicode. This has now been added to the list of characters that are
- recognized as white space in EBCDIC.
-
-16. When PCRE was compiled without UCP support, the use of \p and \P gave an
- error (correctly) when used outside a class, but did not give an error
- within a class.
-
-17. \h within a class was incorrectly compiled in EBCDIC environments.
-
-18. A pattern with an unmatched closing parenthesis that contained a backward
- assertion which itself contained a forward reference caused buffer
- overflow. And example pattern is: /(?=di(?<=(?1))|(?=(.))))/.
-
-19. JIT should return with error when the compiled pattern requires more stack
- space than the maximum.
-
-20. A possessively repeated conditional group that could match an empty string,
- for example, /(?(R))*+/, was incorrectly compiled.
-
-21. Fix infinite recursion in the JIT compiler when certain patterns such as
- /(?:|a|){100}x/ are analysed.
-
-22. Some patterns with character classes involving [: and \\ were incorrectly
- compiled and could cause reading from uninitialized memory or an incorrect
- error diagnosis.
-
-23. Pathological patterns containing many nested occurrences of [: caused
- pcre_compile() to run for a very long time.
-
-24. A conditional group with only one branch has an implicit empty alternative
- branch and must therefore be treated as potentially matching an empty
- string.
-
-25. If (?R was followed by - or + incorrect behaviour happened instead of a
- diagnostic.
-
-26. Arrange to give up on finding the minimum matching length for overly
- complex patterns.
-
-27. Similar to (4) above: in a pattern with duplicated named groups and an
- occurrence of (?| it is possible for an apparently non-recursive back
- reference to become recursive if a later named group with the relevant
- number is encountered. This could lead to a buffer overflow. Wen Guanxing
- from Venustech ADLAB discovered this bug.
-
-28. If pcregrep was given the -q option with -c or -l, or when handling a
- binary file, it incorrectly wrote output to stdout.
-
-29. The JIT compiler did not restore the control verb head in case of *THEN
- control verbs. This issue was found by Karl Skomski with a custom LLVM
- fuzzer.
-
-30. Error messages for syntax errors following \g and \k were giving inaccurate
- offsets in the pattern.
-
-31. Added a check for integer overflow in conditions (?(<digits>) and
- (?(R<digits>). This omission was discovered by Karl Skomski with the LLVM
- fuzzer.
-
-32. Handling recursive references such as (?2) when the reference is to a group
- later in the pattern uses code that is very hacked about and error-prone.
- It has been re-written for PCRE2. Here in PCRE1, a check has been added to
- give an internal error if it is obvious that compiling has gone wrong.
-
-33. The JIT compiler should not check repeats after a {0,1} repeat byte code.
- This issue was found by Karl Skomski with a custom LLVM fuzzer.
-
-34. The JIT compiler should restore the control chain for empty possessive
- repeats. This issue was found by Karl Skomski with a custom LLVM fuzzer.
-
-35. Match limit check added to JIT recursion. This issue was found by Karl
- Skomski with a custom LLVM fuzzer.
-
-36. Yet another case similar to 27 above has been circumvented by an
- unconditional allocation of extra memory. This issue is fixed "properly" in
- PCRE2 by refactoring the way references are handled. Wen Guanxing
- from Venustech ADLAB discovered this bug.
-
-37. Fix two assertion fails in JIT. These issues were found by Karl Skomski
- with a custom LLVM fuzzer.
-
-38. Fixed a corner case of range optimization in JIT.
-
-39. An incorrect error "overran compiling workspace" was given if there were
- exactly enough group forward references such that the last one extended
- into the workspace safety margin. The next one would have expanded the
- workspace. The test for overflow was not including the safety margin.
-
-40. A match limit issue is fixed in JIT which was found by Karl Skomski
- with a custom LLVM fuzzer.
-
-41. Remove the use of /dev/null in testdata/testinput2, because it doesn't
- work under Windows. (Why has it taken so long for anyone to notice?)
-
-42. In a character class such as [\W\p{Any}] where both a negative-type escape
- ("not a word character") and a property escape were present, the property
- escape was being ignored.
-
-43. Fix crash caused by very long (*MARK) or (*THEN) names.
-
-44. A sequence such as [[:punct:]b] that is, a POSIX character class followed
- by a single ASCII character in a class item, was incorrectly compiled in
- UCP mode. The POSIX class got lost, but only if the single character
- followed it.
-
-45. [:punct:] in UCP mode was matching some characters in the range 128-255
- that should not have been matched.
-
-46. If [:^ascii:] or [:^xdigit:] or [:^cntrl:] are present in a non-negated
- class, all characters with code points greater than 255 are in the class.
- When a Unicode property was also in the class (if PCRE_UCP is set, escapes
- such as \w are turned into Unicode properties), wide characters were not
- correctly handled, and could fail to match.
-
-
-Version 8.37 28-April-2015
---------------------------
-
-1. When an (*ACCEPT) is triggered inside capturing parentheses, it arranges
- for those parentheses to be closed with whatever has been captured so far.
- However, it was failing to mark any other groups between the hightest
- capture so far and the currrent group as "unset". Thus, the ovector for
- those groups contained whatever was previously there. An example is the
- pattern /(x)|((*ACCEPT))/ when matched against "abcd".
-
-2. If an assertion condition was quantified with a minimum of zero (an odd
- thing to do, but it happened), SIGSEGV or other misbehaviour could occur.
-
-3. If a pattern in pcretest input had the P (POSIX) modifier followed by an
- unrecognized modifier, a crash could occur.
-
-4. An attempt to do global matching in pcretest with a zero-length ovector
- caused a crash.
-
-5. Fixed a memory leak during matching that could occur for a subpattern
- subroutine call (recursive or otherwise) if the number of captured groups
- that had to be saved was greater than ten.
-
-6. Catch a bad opcode during auto-possessification after compiling a bad UTF
- string with NO_UTF_CHECK. This is a tidyup, not a bug fix, as passing bad
- UTF with NO_UTF_CHECK is documented as having an undefined outcome.
-
-7. A UTF pattern containing a "not" match of a non-ASCII character and a
- subroutine reference could loop at compile time. Example: /[^\xff]((?1))/.
-
-8. When a pattern is compiled, it remembers the highest back reference so that
- when matching, if the ovector is too small, extra memory can be obtained to
- use instead. A conditional subpattern whose condition is a check on a
- capture having happened, such as, for example in the pattern
- /^(?:(a)|b)(?(1)A|B)/, is another kind of back reference, but it was not
- setting the highest backreference number. This mattered only if pcre_exec()
- was called with an ovector that was too small to hold the capture, and there
- was no other kind of back reference (a situation which is probably quite
- rare). The effect of the bug was that the condition was always treated as
- FALSE when the capture could not be consulted, leading to a incorrect
- behaviour by pcre_exec(). This bug has been fixed.
-
-9. A reference to a duplicated named group (either a back reference or a test
- for being set in a conditional) that occurred in a part of the pattern where
- PCRE_DUPNAMES was not set caused the amount of memory needed for the pattern
- to be incorrectly calculated, leading to overwriting.
-
-10. A mutually recursive set of back references such as (\2)(\1) caused a
- segfault at study time (while trying to find the minimum matching length).
- The infinite loop is now broken (with the minimum length unset, that is,
- zero).
-
-11. If an assertion that was used as a condition was quantified with a minimum
- of zero, matching went wrong. In particular, if the whole group had
- unlimited repetition and could match an empty string, a segfault was
- likely. The pattern (?(?=0)?)+ is an example that caused this. Perl allows
- assertions to be quantified, but not if they are being used as conditions,
- so the above pattern is faulted by Perl. PCRE has now been changed so that
- it also rejects such patterns.
-
-12. A possessive capturing group such as (a)*+ with a minimum repeat of zero
- failed to allow the zero-repeat case if pcre2_exec() was called with an
- ovector too small to capture the group.
-
-13. Fixed two bugs in pcretest that were discovered by fuzzing and reported by
- Red Hat Product Security:
-
- (a) A crash if /K and /F were both set with the option to save the compiled
- pattern.
-
- (b) Another crash if the option to print captured substrings in a callout
- was combined with setting a null ovector, for example \O\C+ as a subject
- string.
-
-14. A pattern such as "((?2){0,1999}())?", which has a group containing a
- forward reference repeated a large (but limited) number of times within a
- repeated outer group that has a zero minimum quantifier, caused incorrect
- code to be compiled, leading to the error "internal error:
- previously-checked referenced subpattern not found" when an incorrect
- memory address was read. This bug was reported as "heap overflow",
- discovered by Kai Lu of Fortinet's FortiGuard Labs and given the CVE number
- CVE-2015-2325.
-
-23. A pattern such as "((?+1)(\1))/" containing a forward reference subroutine
- call within a group that also contained a recursive back reference caused
- incorrect code to be compiled. This bug was reported as "heap overflow",
- discovered by Kai Lu of Fortinet's FortiGuard Labs, and given the CVE
- number CVE-2015-2326.
-
-24. Computing the size of the JIT read-only data in advance has been a source
- of various issues, and new ones are still appear unfortunately. To fix
- existing and future issues, size computation is eliminated from the code,
- and replaced by on-demand memory allocation.
-
-25. A pattern such as /(?i)[A-`]/, where characters in the other case are
- adjacent to the end of the range, and the range contained characters with
- more than one other case, caused incorrect behaviour when compiled in UTF
- mode. In that example, the range a-j was left out of the class.
-
-26. Fix JIT compilation of conditional blocks, which assertion
- is converted to (*FAIL). E.g: /(?(?!))/.
-
-27. The pattern /(?(?!)^)/ caused references to random memory. This bug was
- discovered by the LLVM fuzzer.
-
-28. The assertion (?!) is optimized to (*FAIL). This was not handled correctly
- when this assertion was used as a condition, for example (?(?!)a|b). In
- pcre2_match() it worked by luck; in pcre2_dfa_match() it gave an incorrect
- error about an unsupported item.
-
-29. For some types of pattern, for example /Z*(|d*){216}/, the auto-
- possessification code could take exponential time to complete. A recursion
- depth limit of 1000 has been imposed to limit the resources used by this
- optimization.
-
-30. A pattern such as /(*UTF)[\S\V\H]/, which contains a negated special class
- such as \S in non-UCP mode, explicit wide characters (> 255) can be ignored
- because \S ensures they are all in the class. The code for doing this was
- interacting badly with the code for computing the amount of space needed to
- compile the pattern, leading to a buffer overflow. This bug was discovered
- by the LLVM fuzzer.
-
-31. A pattern such as /((?2)+)((?1))/ which has mutual recursion nested inside
- other kinds of group caused stack overflow at compile time. This bug was
- discovered by the LLVM fuzzer.
-
-32. A pattern such as /(?1)(?#?'){8}(a)/ which had a parenthesized comment
- between a subroutine call and its quantifier was incorrectly compiled,
- leading to buffer overflow or other errors. This bug was discovered by the
- LLVM fuzzer.
-
-33. The illegal pattern /(?(?<E>.*!.*)?)/ was not being diagnosed as missing an
- assertion after (?(. The code was failing to check the character after
- (?(?< for the ! or = that would indicate a lookbehind assertion. This bug
- was discovered by the LLVM fuzzer.
-
-34. A pattern such as /X((?2)()*+){2}+/ which has a possessive quantifier with
- a fixed maximum following a group that contains a subroutine reference was
- incorrectly compiled and could trigger buffer overflow. This bug was
- discovered by the LLVM fuzzer.
-
-35. A mutual recursion within a lookbehind assertion such as (?<=((?2))((?1)))
- caused a stack overflow instead of the diagnosis of a non-fixed length
- lookbehind assertion. This bug was discovered by the LLVM fuzzer.
-
-36. The use of \K in a positive lookbehind assertion in a non-anchored pattern
- (e.g. /(?<=\Ka)/) could make pcregrep loop.
-
-37. There was a similar problem to 36 in pcretest for global matches.
-
-38. If a greedy quantified \X was preceded by \C in UTF mode (e.g. \C\X*),
- and a subsequent item in the pattern caused a non-match, backtracking over
- the repeated \X did not stop, but carried on past the start of the subject,
- causing reference to random memory and/or a segfault. There were also some
- other cases where backtracking after \C could crash. This set of bugs was
- discovered by the LLVM fuzzer.
-
-39. The function for finding the minimum length of a matching string could take
- a very long time if mutual recursion was present many times in a pattern,
- for example, /((?2){73}(?2))((?1))/. A better mutual recursion detection
- method has been implemented. This infelicity was discovered by the LLVM
- fuzzer.
-
-40. Static linking against the PCRE library using the pkg-config module was
- failing on missing pthread symbols.
-
-
-Version 8.36 26-September-2014
-------------------------------
-
-1. Got rid of some compiler warnings in the C++ modules that were shown up by
- -Wmissing-field-initializers and -Wunused-parameter.
-
-2. The tests for quantifiers being too big (greater than 65535) were being
- applied after reading the number, and stupidly assuming that integer
- overflow would give a negative number. The tests are now applied as the
- numbers are read.
-
-3. Tidy code in pcre_exec.c where two branches that used to be different are
- now the same.
-
-4. The JIT compiler did not generate match limit checks for certain
- bracketed expressions with quantifiers. This may lead to exponential
- backtracking, instead of returning with PCRE_ERROR_MATCHLIMIT. This
- issue should be resolved now.
-
-5. Fixed an issue, which occures when nested alternatives are optimized
- with table jumps.
-
-6. Inserted two casts and changed some ints to size_t in the light of some
- reported 64-bit compiler warnings (Bugzilla 1477).
-
-7. Fixed a bug concerned with zero-minimum possessive groups that could match
- an empty string, which sometimes were behaving incorrectly in the
- interpreter (though correctly in the JIT matcher). This pcretest input is
- an example:
-
- '\A(?:[^"]++|"(?:[^"]*+|"")*+")++'
- NON QUOTED "QUOT""ED" AFTER "NOT MATCHED
-
- the interpreter was reporting a match of 'NON QUOTED ' only, whereas the
- JIT matcher and Perl both matched 'NON QUOTED "QUOT""ED" AFTER '. The test
- for an empty string was breaking the inner loop and carrying on at a lower
- level, when possessive repeated groups should always return to a higher
- level as they have no backtrack points in them. The empty string test now
- occurs at the outer level.
-
-8. Fixed a bug that was incorrectly auto-possessifying \w+ in the pattern
- ^\w+(?>\s*)(?<=\w) which caused it not to match "test test".
-
-9. Give a compile-time error for \o{} (as Perl does) and for \x{} (which Perl
- doesn't).
-
-10. Change 8.34/15 introduced a bug that caused the amount of memory needed
- to hold a pattern to be incorrectly computed (too small) when there were
- named back references to duplicated names. This could cause "internal
- error: code overflow" or "double free or corruption" or other memory
- handling errors.
-
-11. When named subpatterns had the same prefixes, back references could be
- confused. For example, in this pattern:
-
- /(?P<Name>a)?(?P<Name2>b)?(?(<Name>)c|d)*l/
-
- the reference to 'Name' was incorrectly treated as a reference to a
- duplicate name.
-
-12. A pattern such as /^s?c/mi8 where the optional character has more than
- one "other case" was incorrectly compiled such that it would only try to
- match starting at "c".
-
-13. When a pattern starting with \s was studied, VT was not included in the
- list of possible starting characters; this should have been part of the
- 8.34/18 patch.
-
-14. If a character class started [\Qx]... where x is any character, the class
- was incorrectly terminated at the ].
-
-15. If a pattern that started with a caseless match for a character with more
- than one "other case" was studied, PCRE did not set up the starting code
- unit bit map for the list of possible characters. Now it does. This is an
- optimization improvement, not a bug fix.
-
-16. The Unicode data tables have been updated to Unicode 7.0.0.
-
-17. Fixed a number of memory leaks in pcregrep.
-
-18. Avoid a compiler warning (from some compilers) for a function call with
- a cast that removes "const" from an lvalue by using an intermediate
- variable (to which the compiler does not object).
-
-19. Incorrect code was compiled if a group that contained an internal recursive
- back reference was optional (had quantifier with a minimum of zero). This
- example compiled incorrect code: /(((a\2)|(a*)\g<-1>))*/ and other examples
- caused segmentation faults because of stack overflows at compile time.
-
-20. A pattern such as /((?(R)a|(?1)))+/, which contains a recursion within a
- group that is quantified with an indefinite repeat, caused a compile-time
- loop which used up all the system stack and provoked a segmentation fault.
- This was not the same bug as 19 above.
-
-21. Add PCRECPP_EXP_DECL declaration to operator<< in pcre_stringpiece.h.
- Patch by Mike Frysinger.
-
-
-Version 8.35 04-April-2014
---------------------------
-
-1. A new flag is set, when property checks are present in an XCLASS.
- When this flag is not set, PCRE can perform certain optimizations
- such as studying these XCLASS-es.
-
-2. The auto-possessification of character sets were improved: a normal
- and an extended character set can be compared now. Furthermore
- the JIT compiler optimizes more character set checks.
-
-3. Got rid of some compiler warnings for potentially uninitialized variables
- that show up only when compiled with -O2.
-
-4. A pattern such as (?=ab\K) that uses \K in an assertion can set the start
- of a match later then the end of the match. The pcretest program was not
- handling the case sensibly - it was outputting from the start to the next
- binary zero. It now reports this situation in a message, and outputs the
- text from the end to the start.
-
-5. Fast forward search is improved in JIT. Instead of the first three
- characters, any three characters with fixed position can be searched.
- Search order: first, last, middle.
-
-6. Improve character range checks in JIT. Characters are read by an inprecise
- function now, which returns with an unknown value if the character code is
- above a certain threshold (e.g: 256). The only limitation is that the value
- must be bigger than the threshold as well. This function is useful when
- the characters above the threshold are handled in the same way.
-
-7. The macros whose names start with RAWUCHAR are placeholders for a future
- mode in which only the bottom 21 bits of 32-bit data items are used. To
- make this more memorable for those maintaining the code, the names have
- been changed to start with UCHAR21, and an extensive comment has been added
- to their definition.
-
-8. Add missing (new) files sljitNativeTILEGX.c and sljitNativeTILEGX-encoder.c
- to the export list in Makefile.am (they were accidentally omitted from the
- 8.34 tarball).
-
-9. The informational output from pcretest used the phrase "starting byte set"
- which is inappropriate for the 16-bit and 32-bit libraries. As the output
- for "first char" and "need char" really means "non-UTF-char", I've changed
- "byte" to "char", and slightly reworded the output. The documentation about
- these values has also been (I hope) clarified.
-
-10. Another JIT related optimization: use table jumps for selecting the correct
- backtracking path, when more than four alternatives are present inside a
- bracket.
-
-11. Empty match is not possible, when the minimum length is greater than zero,
- and there is no \K in the pattern. JIT should avoid empty match checks in
- such cases.
-
-12. In a caseless character class with UCP support, when a character with more
- than one alternative case was not the first character of a range, not all
- the alternative cases were added to the class. For example, s and \x{17f}
- are both alternative cases for S: the class [RST] was handled correctly,
- but [R-T] was not.
-
-13. The configure.ac file always checked for pthread support when JIT was
- enabled. This is not used in Windows, so I have put this test inside a
- check for the presence of windows.h (which was already tested for).
-
-14. Improve pattern prefix search by a simplified Boyer-Moore algorithm in JIT.
- The algorithm provides a way to skip certain starting offsets, and usually
- faster than linear prefix searches.
-
-15. Change 13 for 8.20 updated RunTest to check for the 'fr' locale as well
- as for 'fr_FR' and 'french'. For some reason, however, it then used the
- Windows-specific input and output files, which have 'french' screwed in.
- So this could never have worked. One of the problems with locales is that
- they aren't always the same. I have now updated RunTest so that it checks
- the output of the locale test (test 3) against three different output
- files, and it allows the test to pass if any one of them matches. With luck
- this should make the test pass on some versions of Solaris where it was
- failing. Because of the uncertainty, the script did not used to stop if
- test 3 failed; it now does. If further versions of a French locale ever
- come to light, they can now easily be added.
-
-16. If --with-pcregrep-bufsize was given a non-integer value such as "50K",
- there was a message during ./configure, but it did not stop. This now
- provokes an error. The invalid example in README has been corrected.
- If a value less than the minimum is given, the minimum value has always
- been used, but now a warning is given.
-
-17. If --enable-bsr-anycrlf was set, the special 16/32-bit test failed. This
- was a bug in the test system, which is now fixed. Also, the list of various
- configurations that are tested for each release did not have one with both
- 16/32 bits and --enable-bar-anycrlf. It now does.
-
-18. pcretest was missing "-C bsr" for displaying the \R default setting.
-
-19. Little endian PowerPC systems are supported now by the JIT compiler.
-
-20. The fast forward newline mechanism could enter to an infinite loop on
- certain invalid UTF-8 input. Although we don't support these cases
- this issue can be fixed by a performance optimization.
-
-21. Change 33 of 8.34 is not sufficient to ensure stack safety because it does
- not take account if existing stack usage. There is now a new global
- variable called pcre_stack_guard that can be set to point to an external
- function to check stack availability. It is called at the start of
- processing every parenthesized group.
-
-22. A typo in the code meant that in ungreedy mode the max/min qualifier
- behaved like a min-possessive qualifier, and, for example, /a{1,3}b/U did
- not match "ab".
-
-23. When UTF was disabled, the JIT program reported some incorrect compile
- errors. These messages are silenced now.
-
-24. Experimental support for ARM-64 and MIPS-64 has been added to the JIT
- compiler.
-
-25. Change all the temporary files used in RunGrepTest to be different to those
- used by RunTest so that the tests can be run simultaneously, for example by
- "make -j check".
-
-
-Version 8.34 15-December-2013
------------------------------
-
-1. Add pcre[16|32]_jit_free_unused_memory to forcibly free unused JIT
- executable memory. Patch inspired by Carsten Klein.
-
-2. ./configure --enable-coverage defined SUPPORT_GCOV in config.h, although
- this macro is never tested and has no effect, because the work to support
- coverage involves only compiling and linking options and special targets in
- the Makefile. The comment in config.h implied that defining the macro would
- enable coverage support, which is totally false. There was also support for
- setting this macro in the CMake files (my fault, I just copied it from
- configure). SUPPORT_GCOV has now been removed.
-
-3. Make a small performance improvement in strlen16() and strlen32() in
- pcretest.
-
-4. Change 36 for 8.33 left some unreachable statements in pcre_exec.c,
- detected by the Solaris compiler (gcc doesn't seem to be able to diagnose
- these cases). There was also one in pcretest.c.
-
-5. Cleaned up a "may be uninitialized" compiler warning in pcre_exec.c.
-
-6. In UTF mode, the code for checking whether a group could match an empty
- string (which is used for indefinitely repeated groups to allow for
- breaking an infinite loop) was broken when the group contained a repeated
- negated single-character class with a character that occupied more than one
- data item and had a minimum repetition of zero (for example, [^\x{100}]* in
- UTF-8 mode). The effect was undefined: the group might or might not be
- deemed as matching an empty string, or the program might have crashed.
-
-7. The code for checking whether a group could match an empty string was not
- recognizing that \h, \H, \v, \V, and \R must match a character.
-
-8. Implemented PCRE_INFO_MATCH_EMPTY, which yields 1 if the pattern can match
- an empty string. If it can, pcretest shows this in its information output.
-
-9. Fixed two related bugs that applied to Unicode extended grapheme clusters
- that were repeated with a maximizing qualifier (e.g. \X* or \X{2,5}) when
- matched by pcre_exec() without using JIT:
-
- (a) If the rest of the pattern did not match after a maximal run of
- grapheme clusters, the code for backing up to try with fewer of them
- did not always back up over a full grapheme when characters that do not
- have the modifier quality were involved, e.g. Hangul syllables.
-
- (b) If the match point in a subject started with modifier character, and
- there was no match, the code could incorrectly back up beyond the match
- point, and potentially beyond the first character in the subject,
- leading to a segfault or an incorrect match result.
-
-10. A conditional group with an assertion condition could lead to PCRE
- recording an incorrect first data item for a match if no other first data
- item was recorded. For example, the pattern (?(?=ab)ab) recorded "a" as a
- first data item, and therefore matched "ca" after "c" instead of at the
- start.
-
-11. Change 40 for 8.33 (allowing pcregrep to find empty strings) showed up a
- bug that caused the command "echo a | ./pcregrep -M '|a'" to loop.
-
-12. The source of pcregrep now includes z/OS-specific code so that it can be
- compiled for z/OS as part of the special z/OS distribution.
-
-13. Added the -T and -TM options to pcretest.
-
-14. The code in pcre_compile.c for creating the table of named capturing groups
- has been refactored. Instead of creating the table dynamically during the
- actual compiling pass, the information is remembered during the pre-compile
- pass (on the stack unless there are more than 20 named groups, in which
- case malloc() is used) and the whole table is created before the actual
- compile happens. This has simplified the code (it is now nearly 150 lines
- shorter) and prepared the way for better handling of references to groups
- with duplicate names.
-
-15. A back reference to a named subpattern when there is more than one of the
- same name now checks them in the order in which they appear in the pattern.
- The first one that is set is used for the reference. Previously only the
- first one was inspected. This change makes PCRE more compatible with Perl.
-
-16. Unicode character properties were updated from Unicode 6.3.0.
-
-17. The compile-time code for auto-possessification has been refactored, based
- on a patch by Zoltan Herczeg. It now happens after instead of during
- compilation. The code is cleaner, and more cases are handled. The option
- PCRE_NO_AUTO_POSSESS is added for testing purposes, and the -O and /O
- options in pcretest are provided to set it. It can also be set by
- (*NO_AUTO_POSSESS) at the start of a pattern.
-
-18. The character VT has been added to the default ("C" locale) set of
- characters that match \s and are generally treated as white space,
- following this same change in Perl 5.18. There is now no difference between
- "Perl space" and "POSIX space". Whether VT is treated as white space in
- other locales depends on the locale.
-
-19. The code for checking named groups as conditions, either for being set or
- for being recursed, has been refactored (this is related to 14 and 15
- above). Processing unduplicated named groups should now be as fast at
- numerical groups, and processing duplicated groups should be faster than
- before.
-
-20. Two patches to the CMake build system, by Alexander Barkov:
-
- (1) Replace the "source" command by "." in CMakeLists.txt because
- "source" is a bash-ism.
-
- (2) Add missing HAVE_STDINT_H and HAVE_INTTYPES_H to config-cmake.h.in;
- without these the CMake build does not work on Solaris.
-
-21. Perl has changed its handling of \8 and \9. If there is no previously
- encountered capturing group of those numbers, they are treated as the
- literal characters 8 and 9 instead of a binary zero followed by the
- literals. PCRE now does the same.
-
-22. Following Perl, added \o{} to specify codepoints in octal, making it
- possible to specify values greater than 0777 and also making them
- unambiguous.
-
-23. Perl now gives an error for missing closing braces after \x{... instead of
- treating the string as literal. PCRE now does the same.
-
-24. RunTest used to grumble if an inappropriate test was selected explicitly,
- but just skip it when running all tests. This make it awkward to run ranges
- of tests when one of them was inappropriate. Now it just skips any
- inappropriate tests, as it always did when running all tests.
-
-25. If PCRE_AUTO_CALLOUT and PCRE_UCP were set for a pattern that contained
- character types such as \d or \w, too many callouts were inserted, and the
- data that they returned was rubbish.
-
-26. In UCP mode, \s was not matching two of the characters that Perl matches,
- namely NEL (U+0085) and MONGOLIAN VOWEL SEPARATOR (U+180E), though they
- were matched by \h. The code has now been refactored so that the lists of
- the horizontal and vertical whitespace characters used for \h and \v (which
- are defined only in one place) are now also used for \s.
-
-27. Add JIT support for the 64 bit TileGX architecture.
- Patch by Jiong Wang (Tilera Corporation).
-
-28. Possessive quantifiers for classes (both explicit and automatically
- generated) now use special opcodes instead of wrapping in ONCE brackets.
-
-29. Whereas an item such as A{4}+ ignored the possessivenes of the quantifier
- (because it's meaningless), this was not happening when PCRE_CASELESS was
- set. Not wrong, but inefficient.
-
-30. Updated perltest.pl to add /u (force Unicode mode) when /W (use Unicode
- properties for \w, \d, etc) is present in a test regex. Otherwise if the
- test contains no characters greater than 255, Perl doesn't realise it
- should be using Unicode semantics.
-
-31. Upgraded the handling of the POSIX classes [:graph:], [:print:], and
- [:punct:] when PCRE_UCP is set so as to include the same characters as Perl
- does in Unicode mode.
-
-32. Added the "forbid" facility to pcretest so that putting tests into the
- wrong test files can sometimes be quickly detected.
-
-33. There is now a limit (default 250) on the depth of nesting of parentheses.
- This limit is imposed to control the amount of system stack used at compile
- time. It can be changed at build time by --with-parens-nest-limit=xxx or
- the equivalent in CMake.
-
-34. Character classes such as [A-\d] or [a-[:digit:]] now cause compile-time
- errors. Perl warns for these when in warning mode, but PCRE has no facility
- for giving warnings.
-
-35. Change 34 for 8.13 allowed quantifiers on assertions, because Perl does.
- However, this was not working for (?!) because it is optimized to (*FAIL),
- for which PCRE does not allow quantifiers. The optimization is now disabled
- when a quantifier follows (?!). I can't see any use for this, but it makes
- things uniform.
-
-36. Perl no longer allows group names to start with digits, so I have made this
- change also in PCRE. It simplifies the code a bit.
-
-37. In extended mode, Perl ignores spaces before a + that indicates a
- possessive quantifier. PCRE allowed a space before the quantifier, but not
- before the possessive +. It now does.
-
-38. The use of \K (reset reported match start) within a repeated possessive
- group such as (a\Kb)*+ was not working.
-
-40. Document that the same character tables must be used at compile time and
- run time, and that the facility to pass tables to pcre_exec() and
- pcre_dfa_exec() is for use only with saved/restored patterns.
-
-41. Applied Jeff Trawick's patch CMakeLists.txt, which "provides two new
- features for Builds with MSVC:
-
- 1. Support pcre.rc and/or pcreposix.rc (as is already done for MinGW
- builds). The .rc files can be used to set FileDescription and many other
- attributes.
-
- 2. Add an option (-DINSTALL_MSVC_PDB) to enable installation of .pdb files.
- This allows higher-level build scripts which want .pdb files to avoid
- hard-coding the exact files needed."
-
-42. Added support for [[:<:]] and [[:>:]] as used in the BSD POSIX library to
- mean "start of word" and "end of word", respectively, as a transition aid.
-
-43. A minimizing repeat of a class containing codepoints greater than 255 in
- non-UTF 16-bit or 32-bit modes caused an internal error when PCRE was
- compiled to use the heap for recursion.
-
-44. Got rid of some compiler warnings for unused variables when UTF but not UCP
- is configured.
-
-
-Version 8.33 28-May-2013
-------------------------
-
-1. Added 'U' to some constants that are compared to unsigned integers, to
- avoid compiler signed/unsigned warnings. Added (int) casts to unsigned
- variables that are added to signed variables, to ensure the result is
- signed and can be negated.
-
-2. Applied patch by Daniel Richard G for quashing MSVC warnings to the
- CMake config files.
-
-3. Revise the creation of config.h.generic so that all boolean macros are
- #undefined, whereas non-boolean macros are #ifndef/#endif-ed. This makes
- overriding via -D on the command line possible.
-
-4. Changing the definition of the variable "op" in pcre_exec.c from pcre_uchar
- to unsigned int is reported to make a quite noticeable speed difference in
- a specific Windows environment. Testing on Linux did also appear to show
- some benefit (and it is clearly not harmful). Also fixed the definition of
- Xop which should be unsigned.
-
-5. Related to (4), changing the definition of the intermediate variable cc
- in repeated character loops from pcre_uchar to pcre_uint32 also gave speed
- improvements.
-
-6. Fix forward search in JIT when link size is 3 or greater. Also removed some
- unnecessary spaces.
-
-7. Adjust autogen.sh and configure.ac to lose warnings given by automake 1.12
- and later.
-
-8. Fix two buffer over read issues in 16 and 32 bit modes. Affects JIT only.
-
-9. Optimizing fast_forward_start_bits in JIT.
-
-10. Adding support for callouts in JIT, and fixing some issues revealed
- during this work. Namely:
-
- (a) Unoptimized capturing brackets incorrectly reset on backtrack.
-
- (b) Minimum length was not checked before the matching is started.
-
-11. The value of capture_last that is passed to callouts was incorrect in some
- cases when there was a capture on one path that was subsequently abandoned
- after a backtrack. Also, the capture_last value is now reset after a
- recursion, since all captures are also reset in this case.
-
-12. The interpreter no longer returns the "too many substrings" error in the
- case when an overflowing capture is in a branch that is subsequently
- abandoned after a backtrack.
-
-13. In the pathological case when an offset vector of size 2 is used, pcretest
- now prints out the matched string after a yield of 0 or 1.
-
-14. Inlining subpatterns in recursions, when certain conditions are fulfilled.
- Only supported by the JIT compiler at the moment.
-
-15. JIT compiler now supports 32 bit Macs thanks to Lawrence Velazquez.
-
-16. Partial matches now set offsets[2] to the "bumpalong" value, that is, the
- offset of the starting point of the matching process, provided the offsets
- vector is large enough.
-
-17. The \A escape now records a lookbehind value of 1, though its execution
- does not actually inspect the previous character. This is to ensure that,
- in partial multi-segment matching, at least one character from the old
- segment is retained when a new segment is processed. Otherwise, if there
- are no lookbehinds in the pattern, \A might match incorrectly at the start
- of a new segment.
-
-18. Added some #ifdef __VMS code into pcretest.c to help VMS implementations.
-
-19. Redefined some pcre_uchar variables in pcre_exec.c as pcre_uint32; this
- gives some modest performance improvement in 8-bit mode.
-
-20. Added the PCRE-specific property \p{Xuc} for matching characters that can
- be expressed in certain programming languages using Universal Character
- Names.
-
-21. Unicode validation has been updated in the light of Unicode Corrigendum #9,
- which points out that "non characters" are not "characters that may not
- appear in Unicode strings" but rather "characters that are reserved for
- internal use and have only local meaning".
-
-22. When a pattern was compiled with automatic callouts (PCRE_AUTO_CALLOUT) and
- there was a conditional group that depended on an assertion, if the
- assertion was false, the callout that immediately followed the alternation
- in the condition was skipped when pcre_exec() was used for matching.
-
-23. Allow an explicit callout to be inserted before an assertion that is the
- condition for a conditional group, for compatibility with automatic
- callouts, which always insert a callout at this point.
-
-24. In 8.31, (*COMMIT) was confined to within a recursive subpattern. Perl also
- confines (*SKIP) and (*PRUNE) in the same way, and this has now been done.
-
-25. (*PRUNE) is now supported by the JIT compiler.
-
-26. Fix infinite loop when /(?<=(*SKIP)ac)a/ is matched against aa.
-
-27. Fix the case where there are two or more SKIPs with arguments that may be
- ignored.
-
-28. (*SKIP) is now supported by the JIT compiler.
-
-29. (*THEN) is now supported by the JIT compiler.
-
-30. Update RunTest with additional test selector options.
-
-31. The way PCRE handles backtracking verbs has been changed in two ways.
-
- (1) Previously, in something like (*COMMIT)(*SKIP), COMMIT would override
- SKIP. Now, PCRE acts on whichever backtracking verb is reached first by
- backtracking. In some cases this makes it more Perl-compatible, but Perl's
- rather obscure rules do not always do the same thing.
-
- (2) Previously, backtracking verbs were confined within assertions. This is
- no longer the case for positive assertions, except for (*ACCEPT). Again,
- this sometimes improves Perl compatibility, and sometimes does not.
-
-32. A number of tests that were in test 2 because Perl did things differently
- have been moved to test 1, because either Perl or PCRE has changed, and
- these tests are now compatible.
-
-32. Backtracking control verbs are now handled in the same way in JIT and
- interpreter.
-
-33. An opening parenthesis in a MARK/PRUNE/SKIP/THEN name in a pattern that
- contained a forward subroutine reference caused a compile error.
-
-34. Auto-detect and optimize limited repetitions in JIT.
-
-35. Implement PCRE_NEVER_UTF to lock out the use of UTF, in particular,
- blocking (*UTF) etc.
-
-36. In the interpreter, maximizing pattern repetitions for characters and
- character types now use tail recursion, which reduces stack usage.
-
-37. The value of the max lookbehind was not correctly preserved if a compiled
- and saved regex was reloaded on a host of different endianness.
-
-38. Implemented (*LIMIT_MATCH) and (*LIMIT_RECURSION). As part of the extension
- of the compiled pattern block, expand the flags field from 16 to 32 bits
- because it was almost full.
-
-39. Try madvise first before posix_madvise.
-
-40. Change 7 for PCRE 7.9 made it impossible for pcregrep to find empty lines
- with a pattern such as ^$. It has taken 4 years for anybody to notice! The
- original change locked out all matches of empty strings. This has been
- changed so that one match of an empty string per line is recognized.
- Subsequent searches on the same line (for colouring or for --only-matching,
- for example) do not recognize empty strings.
-
-41. Applied a user patch to fix a number of spelling mistakes in comments.
-
-42. Data lines longer than 65536 caused pcretest to crash.
-
-43. Clarified the data type for length and startoffset arguments for pcre_exec
- and pcre_dfa_exec in the function-specific man pages, where they were
- explicitly stated to be in bytes, never having been updated. I also added
- some clarification to the pcreapi man page.
-
-44. A call to pcre_dfa_exec() with an output vector size less than 2 caused
- a segmentation fault.
-
-
-Version 8.32 30-November-2012
------------------------------
-
-1. Improved JIT compiler optimizations for first character search and single
- character iterators.
-
-2. Supporting IBM XL C compilers for PPC architectures in the JIT compiler.
- Patch by Daniel Richard G.
-
-3. Single character iterator optimizations in the JIT compiler.
-
-4. Improved JIT compiler optimizations for character ranges.
-
-5. Rename the "leave" variable names to "quit" to improve WinCE compatibility.
- Reported by Giuseppe D'Angelo.
-
-6. The PCRE_STARTLINE bit, indicating that a match can occur only at the start
- of a line, was being set incorrectly in cases where .* appeared inside
- atomic brackets at the start of a pattern, or where there was a subsequent
- *PRUNE or *SKIP.
-
-7. Improved instruction cache flush for POWER/PowerPC.
- Patch by Daniel Richard G.
-
-8. Fixed a number of issues in pcregrep, making it more compatible with GNU
- grep:
-
- (a) There is now no limit to the number of patterns to be matched.
-
- (b) An error is given if a pattern is too long.
-
- (c) Multiple uses of --exclude, --exclude-dir, --include, and --include-dir
- are now supported.
-
- (d) --exclude-from and --include-from (multiple use) have been added.
-
- (e) Exclusions and inclusions now apply to all files and directories, not
- just to those obtained from scanning a directory recursively.
-
- (f) Multiple uses of -f and --file-list are now supported.
-
- (g) In a Windows environment, the default for -d has been changed from
- "read" (the GNU grep default) to "skip", because otherwise the presence
- of a directory in the file list provokes an error.
-
- (h) The documentation has been revised and clarified in places.
-
-9. Improve the matching speed of capturing brackets.
-
-10. Changed the meaning of \X so that it now matches a Unicode extended
- grapheme cluster.
-
-11. Patch by Daniel Richard G to the autoconf files to add a macro for sorting
- out POSIX threads when JIT support is configured.
-
-12. Added support for PCRE_STUDY_EXTRA_NEEDED.
-
-13. In the POSIX wrapper regcomp() function, setting re_nsub field in the preg
- structure could go wrong in environments where size_t is not the same size
- as int.
-
-14. Applied user-supplied patch to pcrecpp.cc to allow PCRE_NO_UTF8_CHECK to be
- set.
-
-15. The EBCDIC support had decayed; later updates to the code had included
- explicit references to (e.g.) \x0a instead of CHAR_LF. There has been a
- general tidy up of EBCDIC-related issues, and the documentation was also
- not quite right. There is now a test that can be run on ASCII systems to
- check some of the EBCDIC-related things (but is it not a full test).
-
-16. The new PCRE_STUDY_EXTRA_NEEDED option is now used by pcregrep, resulting
- in a small tidy to the code.
-
-17. Fix JIT tests when UTF is disabled and both 8 and 16 bit mode are enabled.
-
-18. If the --only-matching (-o) option in pcregrep is specified multiple
- times, each one causes appropriate output. For example, -o1 -o2 outputs the
- substrings matched by the 1st and 2nd capturing parentheses. A separating
- string can be specified by --om-separator (default empty).
-
-19. Improving the first n character searches.
-
-20. Turn case lists for horizontal and vertical white space into macros so that
- they are defined only once.
-
-21. This set of changes together give more compatible Unicode case-folding
- behaviour for characters that have more than one other case when UCP
- support is available.
-
- (a) The Unicode property table now has offsets into a new table of sets of
- three or more characters that are case-equivalent. The MultiStage2.py
- script that generates these tables (the pcre_ucd.c file) now scans
- CaseFolding.txt instead of UnicodeData.txt for character case
- information.
-
- (b) The code for adding characters or ranges of characters to a character
- class has been abstracted into a generalized function that also handles
- case-independence. In UTF-mode with UCP support, this uses the new data
- to handle characters with more than one other case.
-
- (c) A bug that is fixed as a result of (b) is that codepoints less than 256
- whose other case is greater than 256 are now correctly matched
- caselessly. Previously, the high codepoint matched the low one, but not
- vice versa.
-
- (d) The processing of \h, \H, \v, and \ in character classes now makes use
- of the new class addition function, using character lists defined as
- macros alongside the case definitions of 20 above.
-
- (e) Caseless back references now work with characters that have more than
- one other case.
-
- (f) General caseless matching of characters with more than one other case
- is supported.
-
-22. Unicode character properties were updated from Unicode 6.2.0
-
-23. Improved CMake support under Windows. Patch by Daniel Richard G.
-
-24. Add support for 32-bit character strings, and UTF-32
-
-25. Major JIT compiler update (code refactoring and bugfixing).
- Experimental Sparc 32 support is added.
-
-26. Applied a modified version of Daniel Richard G's patch to create
- pcre.h.generic and config.h.generic by "make" instead of in the
- PrepareRelease script.
-
-27. Added a definition for CHAR_NULL (helpful for the z/OS port), and use it in
- pcre_compile.c when checking for a zero character.
-
-28. Introducing a native interface for JIT. Through this interface, the compiled
- machine code can be directly executed. The purpose of this interface is to
- provide fast pattern matching, so several sanity checks are not performed.
- However, feature tests are still performed. The new interface provides
- 1.4x speedup compared to the old one.
-
-29. If pcre_exec() or pcre_dfa_exec() was called with a negative value for
- the subject string length, the error given was PCRE_ERROR_BADOFFSET, which
- was confusing. There is now a new error PCRE_ERROR_BADLENGTH for this case.
-
-30. In 8-bit UTF-8 mode, pcretest failed to give an error for data codepoints
- greater than 0x7fffffff (which cannot be represented in UTF-8, even under
- the "old" RFC 2279). Instead, it ended up passing a negative length to
- pcre_exec().
-
-31. Add support for GCC's visibility feature to hide internal functions.
-
-32. Running "pcretest -C pcre8" or "pcretest -C pcre16" gave a spurious error
- "unknown -C option" after outputting 0 or 1.
-
-33. There is now support for generating a code coverage report for the test
- suite in environments where gcc is the compiler and lcov is installed. This
- is mainly for the benefit of the developers.
-
-34. If PCRE is built with --enable-valgrind, certain memory regions are marked
- unaddressable using valgrind annotations, allowing valgrind to detect
- invalid memory accesses. This is mainly for the benefit of the developers.
-
-25. (*UTF) can now be used to start a pattern in any of the three libraries.
-
-26. Give configure error if --enable-cpp but no C++ compiler found.
-
-
-Version 8.31 06-July-2012
--------------------------
-
-1. Fixing a wrong JIT test case and some compiler warnings.
-
-2. Removed a bashism from the RunTest script.
-
-3. Add a cast to pcre_exec.c to fix the warning "unary minus operator applied
- to unsigned type, result still unsigned" that was given by an MS compiler
- on encountering the code "-sizeof(xxx)".
-
-4. Partial matching support is added to the JIT compiler.
-
-5. Fixed several bugs concerned with partial matching of items that consist
- of more than one character:
-
- (a) /^(..)\1/ did not partially match "aba" because checking references was
- done on an "all or nothing" basis. This also applied to repeated
- references.
-
- (b) \R did not give a hard partial match if \r was found at the end of the
- subject.
-
- (c) \X did not give a hard partial match after matching one or more
- characters at the end of the subject.
-
- (d) When newline was set to CRLF, a pattern such as /a$/ did not recognize
- a partial match for the string "\r".
-
- (e) When newline was set to CRLF, the metacharacter "." did not recognize
- a partial match for a CR character at the end of the subject string.
-
-6. If JIT is requested using /S++ or -s++ (instead of just /S+ or -s+) when
- running pcretest, the text "(JIT)" added to the output whenever JIT is
- actually used to run the match.
-
-7. Individual JIT compile options can be set in pcretest by following -s+[+]
- or /S+[+] with a digit between 1 and 7.
-
-8. OP_NOT now supports any UTF character not just single-byte ones.
-
-9. (*MARK) control verb is now supported by the JIT compiler.
-
-10. The command "./RunTest list" lists the available tests without actually
- running any of them. (Because I keep forgetting what they all are.)
-
-11. Add PCRE_INFO_MAXLOOKBEHIND.
-
-12. Applied a (slightly modified) user-supplied patch that improves performance
- when the heap is used for recursion (compiled with --disable-stack-for-
- recursion). Instead of malloc and free for each heap frame each time a
- logical recursion happens, frames are retained on a chain and re-used where
- possible. This sometimes gives as much as 30% improvement.
-
-13. As documented, (*COMMIT) is now confined to within a recursive subpattern
- call.
-
-14. As documented, (*COMMIT) is now confined to within a positive assertion.
-
-15. It is now possible to link pcretest with libedit as an alternative to
- libreadline.
-
-16. (*COMMIT) control verb is now supported by the JIT compiler.
-
-17. The Unicode data tables have been updated to Unicode 6.1.0.
-
-18. Added --file-list option to pcregrep.
-
-19. Added binary file support to pcregrep, including the -a, --binary-files,
- -I, and --text options.
-
-20. The madvise function is renamed for posix_madvise for QNX compatibility
- reasons. Fixed by Giuseppe D'Angelo.
-
-21. Fixed a bug for backward assertions with REVERSE 0 in the JIT compiler.
-
-22. Changed the option for creating symbolic links for 16-bit man pages from
- -s to -sf so that re-installing does not cause issues.
-
-23. Support PCRE_NO_START_OPTIMIZE in JIT as (*MARK) support requires it.
-
-24. Fixed a very old bug in pcretest that caused errors with restarted DFA
- matches in certain environments (the workspace was not being correctly
- retained). Also added to pcre_dfa_exec() a simple plausibility check on
- some of the workspace data at the beginning of a restart.
-
-25. \s*\R was auto-possessifying the \s* when it should not, whereas \S*\R
- was not doing so when it should - probably a typo introduced by SVN 528
- (change 8.10/14).
-
-26. When PCRE_UCP was not set, \w+\x{c4} was incorrectly auto-possessifying the
- \w+ when the character tables indicated that \x{c4} was a word character.
- There were several related cases, all because the tests for doing a table
- lookup were testing for characters less than 127 instead of 255.
-
-27. If a pattern contains capturing parentheses that are not used in a match,
- their slots in the ovector are set to -1. For those that are higher than
- any matched groups, this happens at the end of processing. In the case when
- there were back references that the ovector was too small to contain
- (causing temporary malloc'd memory to be used during matching), and the
- highest capturing number was not used, memory off the end of the ovector
- was incorrectly being set to -1. (It was using the size of the temporary
- memory instead of the true size.)
-
-28. To catch bugs like 27 using valgrind, when pcretest is asked to specify an
- ovector size, it uses memory at the end of the block that it has got.
-
-29. Check for an overlong MARK name and give an error at compile time. The
- limit is 255 for the 8-bit library and 65535 for the 16-bit library.
-
-30. JIT compiler update.
-
-31. JIT is now supported on jailbroken iOS devices. Thanks for Ruiger
- Rill for the patch.
-
-32. Put spaces around SLJIT_PRINT_D in the JIT compiler. Required by CXX11.
-
-33. Variable renamings in the PCRE-JIT compiler. No functionality change.
-
-34. Fixed typos in pcregrep: in two places there was SUPPORT_LIBZ2 instead of
- SUPPORT_LIBBZ2. This caused a build problem when bzip2 but not gzip (zlib)
- was enabled.
-
-35. Improve JIT code generation for greedy plus quantifier.
-
-36. When /((?:a?)*)*c/ or /((?>a?)*)*c/ was matched against "aac", it set group
- 1 to "aa" instead of to an empty string. The bug affected repeated groups
- that could potentially match an empty string.
-
-37. Optimizing single character iterators in JIT.
-
-38. Wide characters specified with \uxxxx in JavaScript mode are now subject to
- the same checks as \x{...} characters in non-JavaScript mode. Specifically,
- codepoints that are too big for the mode are faulted, and in a UTF mode,
- disallowed codepoints are also faulted.
-
-39. If PCRE was compiled with UTF support, in three places in the DFA
- matcher there was code that should only have been obeyed in UTF mode, but
- was being obeyed unconditionally. In 8-bit mode this could cause incorrect
- processing when bytes with values greater than 127 were present. In 16-bit
- mode the bug would be provoked by values in the range 0xfc00 to 0xdc00. In
- both cases the values are those that cannot be the first data item in a UTF
- character. The three items that might have provoked this were recursions,
- possessively repeated groups, and atomic groups.
-
-40. Ensure that libpcre is explicitly listed in the link commands for pcretest
- and pcregrep, because some OS require shared objects to be explicitly
- passed to ld, causing the link step to fail if they are not.
-
-41. There were two incorrect #ifdefs in pcre_study.c, meaning that, in 16-bit
- mode, patterns that started with \h* or \R* might be incorrectly matched.
-
-
-Version 8.30 04-February-2012
------------------------------
-
-1. Renamed "isnumber" as "is_a_number" because in some Mac environments this
- name is defined in ctype.h.
-
-2. Fixed a bug in fixed-length calculation for lookbehinds that would show up
- only in quite long subpatterns.
-
-3. Removed the function pcre_info(), which has been obsolete and deprecated
- since it was replaced by pcre_fullinfo() in February 2000.
-
-4. For a non-anchored pattern, if (*SKIP) was given with a name that did not
- match a (*MARK), and the match failed at the start of the subject, a
- reference to memory before the start of the subject could occur. This bug
- was introduced by fix 17 of release 8.21.
-
-5. A reference to an unset group with zero minimum repetition was giving
- totally wrong answers (in non-JavaScript-compatibility mode). For example,
- /(another)?(\1?)test/ matched against "hello world test". This bug was
- introduced in release 8.13.
-
-6. Add support for 16-bit character strings (a large amount of work involving
- many changes and refactorings).
-
-7. RunGrepTest failed on msys because \r\n was replaced by whitespace when the
- command "pattern=`printf 'xxx\r\njkl'`" was run. The pattern is now taken
- from a file.
-
-8. Ovector size of 2 is also supported by JIT based pcre_exec (the ovector size
- rounding is not applied in this particular case).
-
-9. The invalid Unicode surrogate codepoints U+D800 to U+DFFF are now rejected
- if they appear, or are escaped, in patterns.
-
-10. Get rid of a number of -Wunused-but-set-variable warnings.
-
-11. The pattern /(?=(*:x))(q|)/ matches an empty string, and returns the mark
- "x". The similar pattern /(?=(*:x))((*:y)q|)/ did not return a mark at all.
- Oddly, Perl behaves the same way. PCRE has been fixed so that this pattern
- also returns the mark "x". This bug applied to capturing parentheses,
- non-capturing parentheses, and atomic parentheses. It also applied to some
- assertions.
-
-12. Stephen Kelly's patch to CMakeLists.txt allows it to parse the version
- information out of configure.ac instead of relying on pcre.h.generic, which
- is not stored in the repository.
-
-13. Applied Dmitry V. Levin's patch for a more portable method for linking with
- -lreadline.
-
-14. ZH added PCRE_CONFIG_JITTARGET; added its output to pcretest -C.
-
-15. Applied Graycode's patch to put the top-level frame on the stack rather
- than the heap when not using the stack for recursion. This gives a
- performance improvement in many cases when recursion is not deep.
-
-16. Experimental code added to "pcretest -C" to output the stack frame size.
-
-
-Version 8.21 12-Dec-2011
-------------------------
-
-1. Updating the JIT compiler.
-
-2. JIT compiler now supports OP_NCREF, OP_RREF and OP_NRREF. New test cases
- are added as well.
-
-3. Fix cache-flush issue on PowerPC (It is still an experimental JIT port).
- PCRE_EXTRA_TABLES is not suported by JIT, and should be checked before
- calling _pcre_jit_exec. Some extra comments are added.
-
-4. (*MARK) settings inside atomic groups that do not contain any capturing
- parentheses, for example, (?>a(*:m)), were not being passed out. This bug
- was introduced by change 18 for 8.20.
-
-5. Supporting of \x, \U and \u in JavaScript compatibility mode based on the
- ECMA-262 standard.
-
-6. Lookbehinds such as (?<=a{2}b) that contained a fixed repetition were
- erroneously being rejected as "not fixed length" if PCRE_CASELESS was set.
- This bug was probably introduced by change 9 of 8.13.
-
-7. While fixing 6 above, I noticed that a number of other items were being
- incorrectly rejected as "not fixed length". This arose partly because newer
- opcodes had not been added to the fixed-length checking code. I have (a)
- corrected the bug and added tests for these items, and (b) arranged for an
- error to occur if an unknown opcode is encountered while checking for fixed
- length instead of just assuming "not fixed length". The items that were
- rejected were: (*ACCEPT), (*COMMIT), (*FAIL), (*MARK), (*PRUNE), (*SKIP),
- (*THEN), \h, \H, \v, \V, and single character negative classes with fixed
- repetitions, e.g. [^a]{3}, with and without PCRE_CASELESS.
-
-8. A possessively repeated conditional subpattern such as (?(?=c)c|d)++ was
- being incorrectly compiled and would have given unpredicatble results.
-
-9. A possessively repeated subpattern with minimum repeat count greater than
- one behaved incorrectly. For example, (A){2,}+ behaved as if it was
- (A)(A)++ which meant that, after a subsequent mismatch, backtracking into
- the first (A) could occur when it should not.
-
-10. Add a cast and remove a redundant test from the code.
-
-11. JIT should use pcre_malloc/pcre_free for allocation.
-
-12. Updated pcre-config so that it no longer shows -L/usr/lib, which seems
- best practice nowadays, and helps with cross-compiling. (If the exec_prefix
- is anything other than /usr, -L is still shown).
-
-13. In non-UTF-8 mode, \C is now supported in lookbehinds and DFA matching.
-
-14. Perl does not support \N without a following name in a [] class; PCRE now
- also gives an error.
-
-15. If a forward reference was repeated with an upper limit of around 2000,
- it caused the error "internal error: overran compiling workspace". The
- maximum number of forward references (including repeats) was limited by the
- internal workspace, and dependent on the LINK_SIZE. The code has been
- rewritten so that the workspace expands (via pcre_malloc) if necessary, and
- the default depends on LINK_SIZE. There is a new upper limit (for safety)
- of around 200,000 forward references. While doing this, I also speeded up
- the filling in of repeated forward references.
-
-16. A repeated forward reference in a pattern such as (a)(?2){2}(.) was
- incorrectly expecting the subject to contain another "a" after the start.
-
-17. When (*SKIP:name) is activated without a corresponding (*MARK:name) earlier
- in the match, the SKIP should be ignored. This was not happening; instead
- the SKIP was being treated as NOMATCH. For patterns such as
- /A(*MARK:A)A+(*SKIP:B)Z|AAC/ this meant that the AAC branch was never
- tested.
-
-18. The behaviour of (*MARK), (*PRUNE), and (*THEN) has been reworked and is
- now much more compatible with Perl, in particular in cases where the result
- is a non-match for a non-anchored pattern. For example, if
- /b(*:m)f|a(*:n)w/ is matched against "abc", the non-match returns the name
- "m", where previously it did not return a name. A side effect of this
- change is that for partial matches, the last encountered mark name is
- returned, as for non matches. A number of tests that were previously not
- Perl-compatible have been moved into the Perl-compatible test files. The
- refactoring has had the pleasing side effect of removing one argument from
- the match() function, thus reducing its stack requirements.
-
-19. If the /S+ option was used in pcretest to study a pattern using JIT,
- subsequent uses of /S (without +) incorrectly behaved like /S+.
-
-21. Retrieve executable code size support for the JIT compiler and fixing
- some warnings.
-
-22. A caseless match of a UTF-8 character whose other case uses fewer bytes did
- not work when the shorter character appeared right at the end of the
- subject string.
-
-23. Added some (int) casts to non-JIT modules to reduce warnings on 64-bit
- systems.
-
-24. Added PCRE_INFO_JITSIZE to pass on the value from (21) above, and also
- output it when the /M option is used in pcretest.
-
-25. The CheckMan script was not being included in the distribution. Also, added
- an explicit "perl" to run Perl scripts from the PrepareRelease script
- because this is reportedly needed in Windows.
-
-26. If study data was being save in a file and studying had not found a set of
- "starts with" bytes for the pattern, the data written to the file (though
- never used) was taken from uninitialized memory and so caused valgrind to
- complain.
-
-27. Updated RunTest.bat as provided by Sheri Pierce.
-
-28. Fixed a possible uninitialized memory bug in pcre_jit_compile.c.
-
-29. Computation of memory usage for the table of capturing group names was
- giving an unnecessarily large value.
-
-
-Version 8.20 21-Oct-2011
-------------------------
-
-1. Change 37 of 8.13 broke patterns like [:a]...[b:] because it thought it had
- a POSIX class. After further experiments with Perl, which convinced me that
- Perl has bugs and confusions, a closing square bracket is no longer allowed
- in a POSIX name. This bug also affected patterns with classes that started
- with full stops.
-
-2. If a pattern such as /(a)b|ac/ is matched against "ac", there is no
- captured substring, but while checking the failing first alternative,
- substring 1 is temporarily captured. If the output vector supplied to
- pcre_exec() was not big enough for this capture, the yield of the function
- was still zero ("insufficient space for captured substrings"). This cannot
- be totally fixed without adding another stack variable, which seems a lot
- of expense for a edge case. However, I have improved the situation in cases
- such as /(a)(b)x|abc/ matched against "abc", where the return code
- indicates that fewer than the maximum number of slots in the ovector have
- been set.
-
-3. Related to (2) above: when there are more back references in a pattern than
- slots in the output vector, pcre_exec() uses temporary memory during
- matching, and copies in the captures as far as possible afterwards. It was
- using the entire output vector, but this conflicts with the specification
- that only 2/3 is used for passing back captured substrings. Now it uses
- only the first 2/3, for compatibility. This is, of course, another edge
- case.
-
-4. Zoltan Herczeg's just-in-time compiler support has been integrated into the
- main code base, and can be used by building with --enable-jit. When this is
- done, pcregrep automatically uses it unless --disable-pcregrep-jit or the
- runtime --no-jit option is given.
-
-5. When the number of matches in a pcre_dfa_exec() run exactly filled the
- ovector, the return from the function was zero, implying that there were
- other matches that did not fit. The correct "exactly full" value is now
- returned.
-
-6. If a subpattern that was called recursively or as a subroutine contained
- (*PRUNE) or any other control that caused it to give a non-standard return,
- invalid errors such as "Error -26 (nested recursion at the same subject
- position)" or even infinite loops could occur.
-
-7. If a pattern such as /a(*SKIP)c|b(*ACCEPT)|/ was studied, it stopped
- computing the minimum length on reaching *ACCEPT, and so ended up with the
- wrong value of 1 rather than 0. Further investigation indicates that
- computing a minimum subject length in the presence of *ACCEPT is difficult
- (think back references, subroutine calls), and so I have changed the code
- so that no minimum is registered for a pattern that contains *ACCEPT.
-
-8. If (*THEN) was present in the first (true) branch of a conditional group,
- it was not handled as intended. [But see 16 below.]
-
-9. Replaced RunTest.bat and CMakeLists.txt with improved versions provided by
- Sheri Pierce.
-
-10. A pathological pattern such as /(*ACCEPT)a/ was miscompiled, thinking that
- the first byte in a match must be "a".
-
-11. Change 17 for 8.13 increased the recursion depth for patterns like
- /a(?:.)*?a/ drastically. I've improved things by remembering whether a
- pattern contains any instances of (*THEN). If it does not, the old
- optimizations are restored. It would be nice to do this on a per-group
- basis, but at the moment that is not feasible.
-
-12. In some environments, the output of pcretest -C is CRLF terminated. This
- broke RunTest's code that checks for the link size. A single white space
- character after the value is now allowed for.
-
-13. RunTest now checks for the "fr" locale as well as for "fr_FR" and "french".
- For "fr", it uses the Windows-specific input and output files.
-
-14. If (*THEN) appeared in a group that was called recursively or as a
- subroutine, it did not work as intended. [But see next item.]
-
-15. Consider the pattern /A (B(*THEN)C) | D/ where A, B, C, and D are complex
- pattern fragments (but not containing any | characters). If A and B are
- matched, but there is a failure in C so that it backtracks to (*THEN), PCRE
- was behaving differently to Perl. PCRE backtracked into A, but Perl goes to
- D. In other words, Perl considers parentheses that do not contain any |
- characters to be part of a surrounding alternative, whereas PCRE was
- treading (B(*THEN)C) the same as (B(*THEN)C|(*FAIL)) -- which Perl handles
- differently. PCRE now behaves in the same way as Perl, except in the case
- of subroutine/recursion calls such as (?1) which have in any case always
- been different (but PCRE had them first :-).
-
-16. Related to 15 above: Perl does not treat the | in a conditional group as
- creating alternatives. Such a group is treated in the same way as an
- ordinary group without any | characters when processing (*THEN). PCRE has
- been changed to match Perl's behaviour.
-
-17. If a user had set PCREGREP_COLO(U)R to something other than 1:31, the
- RunGrepTest script failed.
-
-18. Change 22 for version 13 caused atomic groups to use more stack. This is
- inevitable for groups that contain captures, but it can lead to a lot of
- stack use in large patterns. The old behaviour has been restored for atomic
- groups that do not contain any capturing parentheses.
-
-19. If the PCRE_NO_START_OPTIMIZE option was set for pcre_compile(), it did not
- suppress the check for a minimum subject length at run time. (If it was
- given to pcre_exec() or pcre_dfa_exec() it did work.)
-
-20. Fixed an ASCII-dependent infelicity in pcretest that would have made it
- fail to work when decoding hex characters in data strings in EBCDIC
- environments.
-
-21. It appears that in at least one Mac OS environment, the isxdigit() function
- is implemented as a macro that evaluates to its argument more than once,
- contravening the C 90 Standard (I haven't checked a later standard). There
- was an instance in pcretest which caused it to go wrong when processing
- \x{...} escapes in subject strings. The has been rewritten to avoid using
- things like p++ in the argument of isxdigit().
-
-
-Version 8.13 16-Aug-2011
-------------------------
-
-1. The Unicode data tables have been updated to Unicode 6.0.0.
-
-2. Two minor typos in pcre_internal.h have been fixed.
-
-3. Added #include <string.h> to pcre_scanner_unittest.cc, pcrecpp.cc, and
- pcrecpp_unittest.cc. They are needed for strcmp(), memset(), and strchr()
- in some environments (e.g. Solaris 10/SPARC using Sun Studio 12U2).
-
-4. There were a number of related bugs in the code for matching backrefences
- caselessly in UTF-8 mode when codes for the characters concerned were
- different numbers of bytes. For example, U+023A and U+2C65 are an upper
- and lower case pair, using 2 and 3 bytes, respectively. The main bugs were:
- (a) A reference to 3 copies of a 2-byte code matched only 2 of a 3-byte
- code. (b) A reference to 2 copies of a 3-byte code would not match 2 of a
- 2-byte code at the end of the subject (it thought there wasn't enough data
- left).
-
-5. Comprehensive information about what went wrong is now returned by
- pcre_exec() and pcre_dfa_exec() when the UTF-8 string check fails, as long
- as the output vector has at least 2 elements. The offset of the start of
- the failing character and a reason code are placed in the vector.
-
-6. When the UTF-8 string check fails for pcre_compile(), the offset that is
- now returned is for the first byte of the failing character, instead of the
- last byte inspected. This is an incompatible change, but I hope it is small
- enough not to be a problem. It makes the returned offset consistent with
- pcre_exec() and pcre_dfa_exec().
-
-7. pcretest now gives a text phrase as well as the error number when
- pcre_exec() or pcre_dfa_exec() fails; if the error is a UTF-8 check
- failure, the offset and reason code are output.
-
-8. When \R was used with a maximizing quantifier it failed to skip backwards
- over a \r\n pair if the subsequent match failed. Instead, it just skipped
- back over a single character (\n). This seems wrong (because it treated the
- two characters as a single entity when going forwards), conflicts with the
- documentation that \R is equivalent to (?>\r\n|\n|...etc), and makes the
- behaviour of \R* different to (\R)*, which also seems wrong. The behaviour
- has been changed.
-
-9. Some internal refactoring has changed the processing so that the handling
- of the PCRE_CASELESS and PCRE_MULTILINE options is done entirely at compile
- time (the PCRE_DOTALL option was changed this way some time ago: version
- 7.7 change 16). This has made it possible to abolish the OP_OPT op code,
- which was always a bit of a fudge. It also means that there is one less
- argument for the match() function, which reduces its stack requirements
- slightly. This change also fixes an incompatibility with Perl: the pattern
- (?i:([^b]))(?1) should not match "ab", but previously PCRE gave a match.
-
-10. More internal refactoring has drastically reduced the number of recursive
- calls to match() for possessively repeated groups such as (abc)++ when
- using pcre_exec().
-
-11. While implementing 10, a number of bugs in the handling of groups were
- discovered and fixed:
-
- (?<=(a)+) was not diagnosed as invalid (non-fixed-length lookbehind).
- (a|)*(?1) gave a compile-time internal error.
- ((a|)+)+ did not notice that the outer group could match an empty string.
- (^a|^)+ was not marked as anchored.
- (.*a|.*)+ was not marked as matching at start or after a newline.
-
-12. Yet more internal refactoring has removed another argument from the match()
- function. Special calls to this function are now indicated by setting a
- value in a variable in the "match data" data block.
-
-13. Be more explicit in pcre_study() instead of relying on "default" for
- opcodes that mean there is no starting character; this means that when new
- ones are added and accidentally left out of pcre_study(), testing should
- pick them up.
-
-14. The -s option of pcretest has been documented for ages as being an old
- synonym of -m (show memory usage). I have changed it to mean "force study
- for every regex", that is, assume /S for every regex. This is similar to -i
- and -d etc. It's slightly incompatible, but I'm hoping nobody is still
- using it. It makes it easier to run collections of tests with and without
- study enabled, and thereby test pcre_study() more easily. All the standard
- tests are now run with and without -s (but some patterns can be marked as
- "never study" - see 20 below).
-
-15. When (*ACCEPT) was used in a subpattern that was called recursively, the
- restoration of the capturing data to the outer values was not happening
- correctly.
-
-16. If a recursively called subpattern ended with (*ACCEPT) and matched an
- empty string, and PCRE_NOTEMPTY was set, pcre_exec() thought the whole
- pattern had matched an empty string, and so incorrectly returned a no
- match.
-
-17. There was optimizing code for the last branch of non-capturing parentheses,
- and also for the obeyed branch of a conditional subexpression, which used
- tail recursion to cut down on stack usage. Unfortunately, now that there is
- the possibility of (*THEN) occurring in these branches, tail recursion is
- no longer possible because the return has to be checked for (*THEN). These
- two optimizations have therefore been removed. [But see 8.20/11 above.]
-
-18. If a pattern containing \R was studied, it was assumed that \R always
- matched two bytes, thus causing the minimum subject length to be
- incorrectly computed because \R can also match just one byte.
-
-19. If a pattern containing (*ACCEPT) was studied, the minimum subject length
- was incorrectly computed.
-
-20. If /S is present twice on a test pattern in pcretest input, it now
- *disables* studying, thereby overriding the use of -s on the command line
- (see 14 above). This is necessary for one or two tests to keep the output
- identical in both cases.
-
-21. When (*ACCEPT) was used in an assertion that matched an empty string and
- PCRE_NOTEMPTY was set, PCRE applied the non-empty test to the assertion.
-
-22. When an atomic group that contained a capturing parenthesis was
- successfully matched, but the branch in which it appeared failed, the
- capturing was not being forgotten if a higher numbered group was later
- captured. For example, /(?>(a))b|(a)c/ when matching "ac" set capturing
- group 1 to "a", when in fact it should be unset. This applied to multi-
- branched capturing and non-capturing groups, repeated or not, and also to
- positive assertions (capturing in negative assertions does not happen
- in PCRE) and also to nested atomic groups.
-
-23. Add the ++ qualifier feature to pcretest, to show the remainder of the
- subject after a captured substring, to make it easier to tell which of a
- number of identical substrings has been captured.
-
-24. The way atomic groups are processed by pcre_exec() has been changed so that
- if they are repeated, backtracking one repetition now resets captured
- values correctly. For example, if ((?>(a+)b)+aabab) is matched against
- "aaaabaaabaabab" the value of captured group 2 is now correctly recorded as
- "aaa". Previously, it would have been "a". As part of this code
- refactoring, the way recursive calls are handled has also been changed.
-
-25. If an assertion condition captured any substrings, they were not passed
- back unless some other capturing happened later. For example, if
- (?(?=(a))a) was matched against "a", no capturing was returned.
-
-26. When studying a pattern that contained subroutine calls or assertions,
- the code for finding the minimum length of a possible match was handling
- direct recursions such as (xxx(?1)|yyy) but not mutual recursions (where
- group 1 called group 2 while simultaneously a separate group 2 called group
- 1). A stack overflow occurred in this case. I have fixed this by limiting
- the recursion depth to 10.
-
-27. Updated RunTest.bat in the distribution to the version supplied by Tom
- Fortmann. This supports explicit test numbers on the command line, and has
- argument validation and error reporting.
-
-28. An instance of \X with an unlimited repeat could fail if at any point the
- first character it looked at was a mark character.
-
-29. Some minor code refactoring concerning Unicode properties and scripts
- should reduce the stack requirement of match() slightly.
-
-30. Added the '=' option to pcretest to check the setting of unused capturing
- slots at the end of the pattern, which are documented as being -1, but are
- not included in the return count.
-
-31. If \k was not followed by a braced, angle-bracketed, or quoted name, PCRE
- compiled something random. Now it gives a compile-time error (as does
- Perl).
-
-32. A *MARK encountered during the processing of a positive assertion is now
- recorded and passed back (compatible with Perl).
-
-33. If --only-matching or --colour was set on a pcregrep call whose pattern
- had alternative anchored branches, the search for a second match in a line
- was done as if at the line start. Thus, for example, /^01|^02/ incorrectly
- matched the line "0102" twice. The same bug affected patterns that started
- with a backwards assertion. For example /\b01|\b02/ also matched "0102"
- twice.
-
-34. Previously, PCRE did not allow quantification of assertions. However, Perl
- does, and because of capturing effects, quantifying parenthesized
- assertions may at times be useful. Quantifiers are now allowed for
- parenthesized assertions.
-
-35. A minor code tidy in pcre_compile() when checking options for \R usage.
-
-36. \g was being checked for fancy things in a character class, when it should
- just be a literal "g".
-
-37. PCRE was rejecting [:a[:digit:]] whereas Perl was not. It seems that the
- appearance of a nested POSIX class supersedes an apparent external class.
- For example, [:a[:digit:]b:] matches "a", "b", ":", or a digit. Also,
- unescaped square brackets may also appear as part of class names. For
- example, [:a[:abc]b:] gives unknown class "[:abc]b:]". PCRE now behaves
- more like Perl. (But see 8.20/1 above.)
-
-38. PCRE was giving an error for \N with a braced quantifier such as {1,} (this
- was because it thought it was \N{name}, which is not supported).
-
-39. Add minix to OS list not supporting the -S option in pcretest.
-
-40. PCRE tries to detect cases of infinite recursion at compile time, but it
- cannot analyze patterns in sufficient detail to catch mutual recursions
- such as ((?1))((?2)). There is now a runtime test that gives an error if a
- subgroup is called recursively as a subpattern for a second time at the
- same position in the subject string. In previous releases this might have
- been caught by the recursion limit, or it might have run out of stack.
-
-41. A pattern such as /(?(R)a+|(?R)b)/ is quite safe, as the recursion can
- happen only once. PCRE was, however incorrectly giving a compile time error
- "recursive call could loop indefinitely" because it cannot analyze the
- pattern in sufficient detail. The compile time test no longer happens when
- PCRE is compiling a conditional subpattern, but actual runaway loops are
- now caught at runtime (see 40 above).
-
-42. It seems that Perl allows any characters other than a closing parenthesis
- to be part of the NAME in (*MARK:NAME) and other backtracking verbs. PCRE
- has been changed to be the same.
-
-43. Updated configure.ac to put in more quoting round AC_LANG_PROGRAM etc. so
- as not to get warnings when autogen.sh is called. Also changed
- AC_PROG_LIBTOOL (deprecated) to LT_INIT (the current macro).
-
-44. To help people who use pcregrep to scan files containing exceedingly long
- lines, the following changes have been made:
-
- (a) The default value of the buffer size parameter has been increased from
- 8K to 20K. (The actual buffer used is three times this size.)
-
- (b) The default can be changed by ./configure --with-pcregrep-bufsize when
- PCRE is built.
-
- (c) A --buffer-size=n option has been added to pcregrep, to allow the size
- to be set at run time.
-
- (d) Numerical values in pcregrep options can be followed by K or M, for
- example --buffer-size=50K.
-
- (e) If a line being scanned overflows pcregrep's buffer, an error is now
- given and the return code is set to 2.
-
-45. Add a pointer to the latest mark to the callout data block.
-
-46. The pattern /.(*F)/, when applied to "abc" with PCRE_PARTIAL_HARD, gave a
- partial match of an empty string instead of no match. This was specific to
- the use of ".".
-
-47. The pattern /f.*/8s, when applied to "for" with PCRE_PARTIAL_HARD, gave a
- complete match instead of a partial match. This bug was dependent on both
- the PCRE_UTF8 and PCRE_DOTALL options being set.
-
-48. For a pattern such as /\babc|\bdef/ pcre_study() was failing to set up the
- starting byte set, because \b was not being ignored.
-
-
-Version 8.12 15-Jan-2011
-------------------------
-
-1. Fixed some typos in the markup of the man pages, and wrote a script that
- checks for such things as part of the documentation building process.
-
-2. On a big-endian 64-bit system, pcregrep did not correctly process the
- --match-limit and --recursion-limit options (added for 8.11). In
- particular, this made one of the standard tests fail. (The integer value
- went into the wrong half of a long int.)
-
-3. If the --colour option was given to pcregrep with -v (invert match), it
- did strange things, either producing crazy output, or crashing. It should,
- of course, ignore a request for colour when reporting lines that do not
- match.
-
-4. Another pcregrep bug caused similar problems if --colour was specified with
- -M (multiline) and the pattern match finished with a line ending.
-
-5. In pcregrep, when a pattern that ended with a literal newline sequence was
- matched in multiline mode, the following line was shown as part of the
- match. This seems wrong, so I have changed it.
-
-6. Another pcregrep bug in multiline mode, when --colour was specified, caused
- the check for further matches in the same line (so they could be coloured)
- to overrun the end of the current line. If another match was found, it was
- incorrectly shown (and then shown again when found in the next line).
-
-7. If pcregrep was compiled under Windows, there was a reference to the
- function pcregrep_exit() before it was defined. I am assuming this was
- the cause of the "error C2371: 'pcregrep_exit' : redefinition;" that was
- reported by a user. I've moved the definition above the reference.
-
-
-Version 8.11 10-Dec-2010
-------------------------
-
-1. (*THEN) was not working properly if there were untried alternatives prior
- to it in the current branch. For example, in ((a|b)(*THEN)(*F)|c..) it
- backtracked to try for "b" instead of moving to the next alternative branch
- at the same level (in this case, to look for "c"). The Perl documentation
- is clear that when (*THEN) is backtracked onto, it goes to the "next
- alternative in the innermost enclosing group".
-
-2. (*COMMIT) was not overriding (*THEN), as it does in Perl. In a pattern
- such as (A(*COMMIT)B(*THEN)C|D) any failure after matching A should
- result in overall failure. Similarly, (*COMMIT) now overrides (*PRUNE) and
- (*SKIP), (*SKIP) overrides (*PRUNE) and (*THEN), and (*PRUNE) overrides
- (*THEN).
-
-3. If \s appeared in a character class, it removed the VT character from
- the class, even if it had been included by some previous item, for example
- in [\x00-\xff\s]. (This was a bug related to the fact that VT is not part
- of \s, but is part of the POSIX "space" class.)
-
-4. A partial match never returns an empty string (because you can always
- match an empty string at the end of the subject); however the checking for
- an empty string was starting at the "start of match" point. This has been
- changed to the "earliest inspected character" point, because the returned
- data for a partial match starts at this character. This means that, for
- example, /(?<=abc)def/ gives a partial match for the subject "abc"
- (previously it gave "no match").
-
-5. Changes have been made to the way PCRE_PARTIAL_HARD affects the matching
- of $, \z, \Z, \b, and \B. If the match point is at the end of the string,
- previously a full match would be given. However, setting PCRE_PARTIAL_HARD
- has an implication that the given string is incomplete (because a partial
- match is preferred over a full match). For this reason, these items now
- give a partial match in this situation. [Aside: previously, the one case
- /t\b/ matched against "cat" with PCRE_PARTIAL_HARD set did return a partial
- match rather than a full match, which was wrong by the old rules, but is
- now correct.]
-
-6. There was a bug in the handling of #-introduced comments, recognized when
- PCRE_EXTENDED is set, when PCRE_NEWLINE_ANY and PCRE_UTF8 were also set.
- If a UTF-8 multi-byte character included the byte 0x85 (e.g. +U0445, whose
- UTF-8 encoding is 0xd1,0x85), this was misinterpreted as a newline when
- scanning for the end of the comment. (*Character* 0x85 is an "any" newline,
- but *byte* 0x85 is not, in UTF-8 mode). This bug was present in several
- places in pcre_compile().
-
-7. Related to (6) above, when pcre_compile() was skipping #-introduced
- comments when looking ahead for named forward references to subpatterns,
- the only newline sequence it recognized was NL. It now handles newlines
- according to the set newline convention.
-
-8. SunOS4 doesn't have strerror() or strtoul(); pcregrep dealt with the
- former, but used strtoul(), whereas pcretest avoided strtoul() but did not
- cater for a lack of strerror(). These oversights have been fixed.
-
-9. Added --match-limit and --recursion-limit to pcregrep.
-
-10. Added two casts needed to build with Visual Studio when NO_RECURSE is set.
-
-11. When the -o option was used, pcregrep was setting a return code of 1, even
- when matches were found, and --line-buffered was not being honoured.
-
-12. Added an optional parentheses number to the -o and --only-matching options
- of pcregrep.
-
-13. Imitating Perl's /g action for multiple matches is tricky when the pattern
- can match an empty string. The code to do it in pcretest and pcredemo
- needed fixing:
-
- (a) When the newline convention was "crlf", pcretest got it wrong, skipping
- only one byte after an empty string match just before CRLF (this case
- just got forgotten; "any" and "anycrlf" were OK).
-
- (b) The pcretest code also had a bug, causing it to loop forever in UTF-8
- mode when an empty string match preceded an ASCII character followed by
- a non-ASCII character. (The code for advancing by one character rather
- than one byte was nonsense.)
-
- (c) The pcredemo.c sample program did not have any code at all to handle
- the cases when CRLF is a valid newline sequence.
-
-14. Neither pcre_exec() nor pcre_dfa_exec() was checking that the value given
- as a starting offset was within the subject string. There is now a new
- error, PCRE_ERROR_BADOFFSET, which is returned if the starting offset is
- negative or greater than the length of the string. In order to test this,
- pcretest is extended to allow the setting of negative starting offsets.
-
-15. In both pcre_exec() and pcre_dfa_exec() the code for checking that the
- starting offset points to the beginning of a UTF-8 character was
- unnecessarily clumsy. I tidied it up.
-
-16. Added PCRE_ERROR_SHORTUTF8 to make it possible to distinguish between a
- bad UTF-8 sequence and one that is incomplete when using PCRE_PARTIAL_HARD.
-
-17. Nobody had reported that the --include_dir option, which was added in
- release 7.7 should have been called --include-dir (hyphen, not underscore)
- for compatibility with GNU grep. I have changed it to --include-dir, but
- left --include_dir as an undocumented synonym, and the same for
- --exclude-dir, though that is not available in GNU grep, at least as of
- release 2.5.4.
-
-18. At a user's suggestion, the macros GETCHAR and friends (which pick up UTF-8
- characters from a string of bytes) have been redefined so as not to use
- loops, in order to improve performance in some environments. At the same
- time, I abstracted some of the common code into auxiliary macros to save
- repetition (this should not affect the compiled code).
-
-19. If \c was followed by a multibyte UTF-8 character, bad things happened. A
- compile-time error is now given if \c is not followed by an ASCII
- character, that is, a byte less than 128. (In EBCDIC mode, the code is
- different, and any byte value is allowed.)
-
-20. Recognize (*NO_START_OPT) at the start of a pattern to set the PCRE_NO_
- START_OPTIMIZE option, which is now allowed at compile time - but just
- passed through to pcre_exec() or pcre_dfa_exec(). This makes it available
- to pcregrep and other applications that have no direct access to PCRE
- options. The new /Y option in pcretest sets this option when calling
- pcre_compile().
-
-21. Change 18 of release 8.01 broke the use of named subpatterns for recursive
- back references. Groups containing recursive back references were forced to
- be atomic by that change, but in the case of named groups, the amount of
- memory required was incorrectly computed, leading to "Failed: internal
- error: code overflow". This has been fixed.
-
-22. Some patches to pcre_stringpiece.h, pcre_stringpiece_unittest.cc, and
- pcretest.c, to avoid build problems in some Borland environments.
-
-
-Version 8.10 25-Jun-2010
-------------------------
-
-1. Added support for (*MARK:ARG) and for ARG additions to PRUNE, SKIP, and
- THEN.
-
-2. (*ACCEPT) was not working when inside an atomic group.
-
-3. Inside a character class, \B is treated as a literal by default, but
- faulted if PCRE_EXTRA is set. This mimics Perl's behaviour (the -w option
- causes the error). The code is unchanged, but I tidied the documentation.
-
-4. Inside a character class, PCRE always treated \R and \X as literals,
- whereas Perl faults them if its -w option is set. I have changed PCRE so
- that it faults them when PCRE_EXTRA is set.
-
-5. Added support for \N, which always matches any character other than
- newline. (It is the same as "." when PCRE_DOTALL is not set.)
-
-6. When compiling pcregrep with newer versions of gcc which may have
- FORTIFY_SOURCE set, several warnings "ignoring return value of 'fwrite',
- declared with attribute warn_unused_result" were given. Just casting the
- result to (void) does not stop the warnings; a more elaborate fudge is
- needed. I've used a macro to implement this.
-
-7. Minor change to pcretest.c to avoid a compiler warning.
-
-8. Added four artifical Unicode properties to help with an option to make
- \s etc use properties (see next item). The new properties are: Xan
- (alphanumeric), Xsp (Perl space), Xps (POSIX space), and Xwd (word).
-
-9. Added PCRE_UCP to make \b, \d, \s, \w, and certain POSIX character classes
- use Unicode properties. (*UCP) at the start of a pattern can be used to set
- this option. Modified pcretest to add /W to test this facility. Added
- REG_UCP to make it available via the POSIX interface.
-
-10. Added --line-buffered to pcregrep.
-
-11. In UTF-8 mode, if a pattern that was compiled with PCRE_CASELESS was
- studied, and the match started with a letter with a code point greater than
- 127 whose first byte was different to the first byte of the other case of
- the letter, the other case of this starting letter was not recognized
- (#976).
-
-12. If a pattern that was studied started with a repeated Unicode property
- test, for example, \p{Nd}+, there was the theoretical possibility of
- setting up an incorrect bitmap of starting bytes, but fortunately it could
- not have actually happened in practice until change 8 above was made (it
- added property types that matched character-matching opcodes).
-
-13. pcre_study() now recognizes \h, \v, and \R when constructing a bit map of
- possible starting bytes for non-anchored patterns.
-
-14. Extended the "auto-possessify" feature of pcre_compile(). It now recognizes
- \R, and also a number of cases that involve Unicode properties, both
- explicit and implicit when PCRE_UCP is set.
-
-15. If a repeated Unicode property match (e.g. \p{Lu}*) was used with non-UTF-8
- input, it could crash or give wrong results if characters with values
- greater than 0xc0 were present in the subject string. (Detail: it assumed
- UTF-8 input when processing these items.)
-
-16. Added a lot of (int) casts to avoid compiler warnings in systems where
- size_t is 64-bit (#991).
-
-17. Added a check for running out of memory when PCRE is compiled with
- --disable-stack-for-recursion (#990).
-
-18. If the last data line in a file for pcretest does not have a newline on
- the end, a newline was missing in the output.
-
-19. The default pcre_chartables.c file recognizes only ASCII characters (values
- less than 128) in its various bitmaps. However, there is a facility for
- generating tables according to the current locale when PCRE is compiled. It
- turns out that in some environments, 0x85 and 0xa0, which are Unicode space
- characters, are recognized by isspace() and therefore were getting set in
- these tables, and indeed these tables seem to approximate to ISO 8859. This
- caused a problem in UTF-8 mode when pcre_study() was used to create a list
- of bytes that can start a match. For \s, it was including 0x85 and 0xa0,
- which of course cannot start UTF-8 characters. I have changed the code so
- that only real ASCII characters (less than 128) and the correct starting
- bytes for UTF-8 encodings are set for characters greater than 127 when in
- UTF-8 mode. (When PCRE_UCP is set - see 9 above - the code is different
- altogether.)
-
-20. Added the /T option to pcretest so as to be able to run tests with non-
- standard character tables, thus making it possible to include the tests
- used for 19 above in the standard set of tests.
-
-21. A pattern such as (?&t)(?#()(?(DEFINE)(?<t>a)) which has a forward
- reference to a subpattern the other side of a comment that contains an
- opening parenthesis caused either an internal compiling error, or a
- reference to the wrong subpattern.
-
-
-Version 8.02 19-Mar-2010
-------------------------
-
-1. The Unicode data tables have been updated to Unicode 5.2.0.
-
-2. Added the option --libs-cpp to pcre-config, but only when C++ support is
- configured.
-
-3. Updated the licensing terms in the pcregexp.pas file, as agreed with the
- original author of that file, following a query about its status.
-
-4. On systems that do not have stdint.h (e.g. Solaris), check for and include
- inttypes.h instead. This fixes a bug that was introduced by change 8.01/8.
-
-5. A pattern such as (?&t)*+(?(DEFINE)(?<t>.)) which has a possessive
- quantifier applied to a forward-referencing subroutine call, could compile
- incorrect code or give the error "internal error: previously-checked
- referenced subpattern not found".
-
-6. Both MS Visual Studio and Symbian OS have problems with initializing
- variables to point to external functions. For these systems, therefore,
- pcre_malloc etc. are now initialized to local functions that call the
- relevant global functions.
-
-7. There were two entries missing in the vectors called coptable and poptable
- in pcre_dfa_exec.c. This could lead to memory accesses outsize the vectors.
- I've fixed the data, and added a kludgy way of testing at compile time that
- the lengths are correct (equal to the number of opcodes).
-
-8. Following on from 7, I added a similar kludge to check the length of the
- eint vector in pcreposix.c.
-
-9. Error texts for pcre_compile() are held as one long string to avoid too
- much relocation at load time. To find a text, the string is searched,
- counting zeros. There was no check for running off the end of the string,
- which could happen if a new error number was added without updating the
- string.
-
-10. \K gave a compile-time error if it appeared in a lookbehind assersion.
-
-11. \K was not working if it appeared in an atomic group or in a group that
- was called as a "subroutine", or in an assertion. Perl 5.11 documents that
- \K is "not well defined" if used in an assertion. PCRE now accepts it if
- the assertion is positive, but not if it is negative.
-
-12. Change 11 fortuitously reduced the size of the stack frame used in the
- "match()" function of pcre_exec.c by one pointer. Forthcoming
- implementation of support for (*MARK) will need an extra pointer on the
- stack; I have reserved it now, so that the stack frame size does not
- decrease.
-
-13. A pattern such as (?P<L1>(?P<L2>0)|(?P>L2)(?P>L1)) in which the only other
- item in branch that calls a recursion is a subroutine call - as in the
- second branch in the above example - was incorrectly given the compile-
- time error "recursive call could loop indefinitely" because pcre_compile()
- was not correctly checking the subroutine for matching a non-empty string.
-
-14. The checks for overrunning compiling workspace could trigger after an
- overrun had occurred. This is a "should never occur" error, but it can be
- triggered by pathological patterns such as hundreds of nested parentheses.
- The checks now trigger 100 bytes before the end of the workspace.
-
-15. Fix typo in configure.ac: "srtoq" should be "strtoq".
-
-
-Version 8.01 19-Jan-2010
-------------------------
-
-1. If a pattern contained a conditional subpattern with only one branch (in
- particular, this includes all (*DEFINE) patterns), a call to pcre_study()
- computed the wrong minimum data length (which is of course zero for such
- subpatterns). This could cause incorrect "no match" results.
-
-2. For patterns such as (?i)a(?-i)b|c where an option setting at the start of
- the pattern is reset in the first branch, pcre_compile() failed with
- "internal error: code overflow at offset...". This happened only when
- the reset was to the original external option setting. (An optimization
- abstracts leading options settings into an external setting, which was the
- cause of this.)
-
-3. A pattern such as ^(?!a(*SKIP)b) where a negative assertion contained one
- of the verbs SKIP, PRUNE, or COMMIT, did not work correctly. When the
- assertion pattern did not match (meaning that the assertion was true), it
- was incorrectly treated as false if the SKIP had been reached during the
- matching. This also applied to assertions used as conditions.
-
-4. If an item that is not supported by pcre_dfa_exec() was encountered in an
- assertion subpattern, including such a pattern used as a condition,
- unpredictable results occurred, instead of the error return
- PCRE_ERROR_DFA_UITEM.
-
-5. The C++ GlobalReplace function was not working like Perl for the special
- situation when an empty string is matched. It now does the fancy magic
- stuff that is necessary.
-
-6. In pcre_internal.h, obsolete includes to setjmp.h and stdarg.h have been
- removed. (These were left over from very, very early versions of PCRE.)
-
-7. Some cosmetic changes to the code to make life easier when compiling it
- as part of something else:
-
- (a) Change DEBUG to PCRE_DEBUG.
-
- (b) In pcre_compile(), rename the member of the "branch_chain" structure
- called "current" as "current_branch", to prevent a collision with the
- Linux macro when compiled as a kernel module.
-
- (c) In pcre_study(), rename the function set_bit() as set_table_bit(), to
- prevent a collision with the Linux macro when compiled as a kernel
- module.
-
-8. In pcre_compile() there are some checks for integer overflows that used to
- cast potentially large values to (double). This has been changed to that
- when building, a check for int64_t is made, and if it is found, it is used
- instead, thus avoiding the use of floating point arithmetic. (There is no
- other use of FP in PCRE.) If int64_t is not found, the fallback is to
- double.
-
-9. Added two casts to avoid signed/unsigned warnings from VS Studio Express
- 2005 (difference between two addresses compared to an unsigned value).
-
-10. Change the standard AC_CHECK_LIB test for libbz2 in configure.ac to a
- custom one, because of the following reported problem in Windows:
-
- - libbz2 uses the Pascal calling convention (WINAPI) for the functions
- under Win32.
- - The standard autoconf AC_CHECK_LIB fails to include "bzlib.h",
- therefore missing the function definition.
- - The compiler thus generates a "C" signature for the test function.
- - The linker fails to find the "C" function.
- - PCRE fails to configure if asked to do so against libbz2.
-
-11. When running libtoolize from libtool-2.2.6b as part of autogen.sh, these
- messages were output:
-
- Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
- rerunning libtoolize, to keep the correct libtool macros in-tree.
- Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
-
- I have done both of these things.
-
-12. Although pcre_dfa_exec() does not use nearly as much stack as pcre_exec()
- most of the time, it *can* run out if it is given a pattern that contains a
- runaway infinite recursion. I updated the discussion in the pcrestack man
- page.
-
-13. Now that we have gone to the x.xx style of version numbers, the minor
- version may start with zero. Using 08 or 09 is a bad idea because users
- might check the value of PCRE_MINOR in their code, and 08 or 09 may be
- interpreted as invalid octal numbers. I've updated the previous comment in
- configure.ac, and also added a check that gives an error if 08 or 09 are
- used.
-
-14. Change 8.00/11 was not quite complete: code had been accidentally omitted,
- causing partial matching to fail when the end of the subject matched \W
- in a UTF-8 pattern where \W was quantified with a minimum of 3.
-
-15. There were some discrepancies between the declarations in pcre_internal.h
- of _pcre_is_newline(), _pcre_was_newline(), and _pcre_valid_utf8() and
- their definitions. The declarations used "const uschar *" and the
- definitions used USPTR. Even though USPTR is normally defined as "const
- unsigned char *" (and uschar is typedeffed as "unsigned char"), it was
- reported that: "This difference in casting confuses some C++ compilers, for
- example, SunCC recognizes above declarations as different functions and
- generates broken code for hbpcre." I have changed the declarations to use
- USPTR.
-
-16. GNU libtool is named differently on some systems. The autogen.sh script now
- tries several variants such as glibtoolize (MacOSX) and libtoolize1x
- (FreeBSD).
-
-17. Applied Craig's patch that fixes an HP aCC compile error in pcre 8.00
- (strtoXX undefined when compiling pcrecpp.cc). The patch contains this
- comment: "Figure out how to create a longlong from a string: strtoll and
- equivalent. It's not enough to call AC_CHECK_FUNCS: hpux has a strtoll, for
- instance, but it only takes 2 args instead of 3!"
-
-18. A subtle bug concerned with back references has been fixed by a change of
- specification, with a corresponding code fix. A pattern such as
- ^(xa|=?\1a)+$ which contains a back reference inside the group to which it
- refers, was giving matches when it shouldn't. For example, xa=xaaa would
- match that pattern. Interestingly, Perl (at least up to 5.11.3) has the
- same bug. Such groups have to be quantified to be useful, or contained
- inside another quantified group. (If there's no repetition, the reference
- can never match.) The problem arises because, having left the group and
- moved on to the rest of the pattern, a later failure that backtracks into
- the group uses the captured value from the final iteration of the group
- rather than the correct earlier one. I have fixed this in PCRE by forcing
- any group that contains a reference to itself to be an atomic group; that
- is, there cannot be any backtracking into it once it has completed. This is
- similar to recursive and subroutine calls.
-
-
-Version 8.00 19-Oct-09
-----------------------
-
-1. The table for translating pcre_compile() error codes into POSIX error codes
- was out-of-date, and there was no check on the pcre_compile() error code
- being within the table. This could lead to an OK return being given in
- error.
-
-2. Changed the call to open a subject file in pcregrep from fopen(pathname,
- "r") to fopen(pathname, "rb"), which fixed a problem with some of the tests
- in a Windows environment.
-
-3. The pcregrep --count option prints the count for each file even when it is
- zero, as does GNU grep. However, pcregrep was also printing all files when
- --files-with-matches was added. Now, when both options are given, it prints
- counts only for those files that have at least one match. (GNU grep just
- prints the file name in this circumstance, but including the count seems
- more useful - otherwise, why use --count?) Also ensured that the
- combination -clh just lists non-zero counts, with no names.
-
-4. The long form of the pcregrep -F option was incorrectly implemented as
- --fixed_strings instead of --fixed-strings. This is an incompatible change,
- but it seems right to fix it, and I didn't think it was worth preserving
- the old behaviour.
-
-5. The command line items --regex=pattern and --regexp=pattern were not
- recognized by pcregrep, which required --regex pattern or --regexp pattern
- (with a space rather than an '='). The man page documented the '=' forms,
- which are compatible with GNU grep; these now work.
-
-6. No libpcreposix.pc file was created for pkg-config; there was just
- libpcre.pc and libpcrecpp.pc. The omission has been rectified.
-
-7. Added #ifndef SUPPORT_UCP into the pcre_ucd.c module, to reduce its size
- when UCP support is not needed, by modifying the Python script that
- generates it from Unicode data files. This should not matter if the module
- is correctly used as a library, but I received one complaint about 50K of
- unwanted data. My guess is that the person linked everything into his
- program rather than using a library. Anyway, it does no harm.
-
-8. A pattern such as /\x{123}{2,2}+/8 was incorrectly compiled; the trigger
- was a minimum greater than 1 for a wide character in a possessive
- repetition. The same bug could also affect patterns like /(\x{ff}{0,2})*/8
- which had an unlimited repeat of a nested, fixed maximum repeat of a wide
- character. Chaos in the form of incorrect output or a compiling loop could
- result.
-
-9. The restrictions on what a pattern can contain when partial matching is
- requested for pcre_exec() have been removed. All patterns can now be
- partially matched by this function. In addition, if there are at least two
- slots in the offset vector, the offset of the earliest inspected character
- for the match and the offset of the end of the subject are set in them when
- PCRE_ERROR_PARTIAL is returned.
-
-10. Partial matching has been split into two forms: PCRE_PARTIAL_SOFT, which is
- synonymous with PCRE_PARTIAL, for backwards compatibility, and
- PCRE_PARTIAL_HARD, which causes a partial match to supersede a full match,
- and may be more useful for multi-segment matching.
-
-11. Partial matching with pcre_exec() is now more intuitive. A partial match
- used to be given if ever the end of the subject was reached; now it is
- given only if matching could not proceed because another character was
- needed. This makes a difference in some odd cases such as Z(*FAIL) with the
- string "Z", which now yields "no match" instead of "partial match". In the
- case of pcre_dfa_exec(), "no match" is given if every matching path for the
- final character ended with (*FAIL).
-
-12. Restarting a match using pcre_dfa_exec() after a partial match did not work
- if the pattern had a "must contain" character that was already found in the
- earlier partial match, unless partial matching was again requested. For
- example, with the pattern /dog.(body)?/, the "must contain" character is
- "g". If the first part-match was for the string "dog", restarting with
- "sbody" failed. This bug has been fixed.
-
-13. The string returned by pcre_dfa_exec() after a partial match has been
- changed so that it starts at the first inspected character rather than the
- first character of the match. This makes a difference only if the pattern
- starts with a lookbehind assertion or \b or \B (\K is not supported by
- pcre_dfa_exec()). It's an incompatible change, but it makes the two
- matching functions compatible, and I think it's the right thing to do.
-
-14. Added a pcredemo man page, created automatically from the pcredemo.c file,
- so that the demonstration program is easily available in environments where
- PCRE has not been installed from source.
-
-15. Arranged to add -DPCRE_STATIC to cflags in libpcre.pc, libpcreposix.cp,
- libpcrecpp.pc and pcre-config when PCRE is not compiled as a shared
- library.
-
-16. Added REG_UNGREEDY to the pcreposix interface, at the request of a user.
- It maps to PCRE_UNGREEDY. It is not, of course, POSIX-compatible, but it
- is not the first non-POSIX option to be added. Clearly some people find
- these options useful.
-
-17. If a caller to the POSIX matching function regexec() passes a non-zero
- value for nmatch with a NULL value for pmatch, the value of
- nmatch is forced to zero.
-
-18. RunGrepTest did not have a test for the availability of the -u option of
- the diff command, as RunTest does. It now checks in the same way as
- RunTest, and also checks for the -b option.
-
-19. If an odd number of negated classes containing just a single character
- interposed, within parentheses, between a forward reference to a named
- subpattern and the definition of the subpattern, compilation crashed with
- an internal error, complaining that it could not find the referenced
- subpattern. An example of a crashing pattern is /(?&A)(([^m])(?<A>))/.
- [The bug was that it was starting one character too far in when skipping
- over the character class, thus treating the ] as data rather than
- terminating the class. This meant it could skip too much.]
-
-20. Added PCRE_NOTEMPTY_ATSTART in order to be able to correctly implement the
- /g option in pcretest when the pattern contains \K, which makes it possible
- to have an empty string match not at the start, even when the pattern is
- anchored. Updated pcretest and pcredemo to use this option.
-
-21. If the maximum number of capturing subpatterns in a recursion was greater
- than the maximum at the outer level, the higher number was returned, but
- with unset values at the outer level. The correct (outer level) value is
- now given.
-
-22. If (*ACCEPT) appeared inside capturing parentheses, previous releases of
- PCRE did not set those parentheses (unlike Perl). I have now found a way to
- make it do so. The string so far is captured, making this feature
- compatible with Perl.
-
-23. The tests have been re-organized, adding tests 11 and 12, to make it
- possible to check the Perl 5.10 features against Perl 5.10.
-
-24. Perl 5.10 allows subroutine calls in lookbehinds, as long as the subroutine
- pattern matches a fixed length string. PCRE did not allow this; now it
- does. Neither allows recursion.
-
-25. I finally figured out how to implement a request to provide the minimum
- length of subject string that was needed in order to match a given pattern.
- (It was back references and recursion that I had previously got hung up
- on.) This code has now been added to pcre_study(); it finds a lower bound
- to the length of subject needed. It is not necessarily the greatest lower
- bound, but using it to avoid searching strings that are too short does give
- some useful speed-ups. The value is available to calling programs via
- pcre_fullinfo().
-
-26. While implementing 25, I discovered to my embarrassment that pcretest had
- not been passing the result of pcre_study() to pcre_dfa_exec(), so the
- study optimizations had never been tested with that matching function.
- Oops. What is worse, even when it was passed study data, there was a bug in
- pcre_dfa_exec() that meant it never actually used it. Double oops. There
- were also very few tests of studied patterns with pcre_dfa_exec().
-
-27. If (?| is used to create subpatterns with duplicate numbers, they are now
- allowed to have the same name, even if PCRE_DUPNAMES is not set. However,
- on the other side of the coin, they are no longer allowed to have different
- names, because these cannot be distinguished in PCRE, and this has caused
- confusion. (This is a difference from Perl.)
-
-28. When duplicate subpattern names are present (necessarily with different
- numbers, as required by 27 above), and a test is made by name in a
- conditional pattern, either for a subpattern having been matched, or for
- recursion in such a pattern, all the associated numbered subpatterns are
- tested, and the overall condition is true if the condition is true for any
- one of them. This is the way Perl works, and is also more like the way
- testing by number works.
-
-
-Version 7.9 11-Apr-09
----------------------
-
-1. When building with support for bzlib/zlib (pcregrep) and/or readline
- (pcretest), all targets were linked against these libraries. This included
- libpcre, libpcreposix, and libpcrecpp, even though they do not use these
- libraries. This caused unwanted dependencies to be created. This problem
- has been fixed, and now only pcregrep is linked with bzlib/zlib and only
- pcretest is linked with readline.
-
-2. The "typedef int BOOL" in pcre_internal.h that was included inside the
- "#ifndef FALSE" condition by an earlier change (probably 7.8/18) has been
- moved outside it again, because FALSE and TRUE are already defined in AIX,
- but BOOL is not.
-
-3. The pcre_config() function was treating the PCRE_MATCH_LIMIT and
- PCRE_MATCH_LIMIT_RECURSION values as ints, when they should be long ints.
-
-4. The pcregrep documentation said spaces were inserted as well as colons (or
- hyphens) following file names and line numbers when outputting matching
- lines. This is not true; no spaces are inserted. I have also clarified the
- wording for the --colour (or --color) option.
-
-5. In pcregrep, when --colour was used with -o, the list of matching strings
- was not coloured; this is different to GNU grep, so I have changed it to be
- the same.
-
-6. When --colo(u)r was used in pcregrep, only the first matching substring in
- each matching line was coloured. Now it goes on to look for further matches
- of any of the test patterns, which is the same behaviour as GNU grep.
-
-7. A pattern that could match an empty string could cause pcregrep to loop; it
- doesn't make sense to accept an empty string match in pcregrep, so I have
- locked it out (using PCRE's PCRE_NOTEMPTY option). By experiment, this
- seems to be how GNU grep behaves. [But see later change 40 for release
- 8.33.]
-
-8. The pattern (?(?=.*b)b|^) was incorrectly compiled as "match must be at
- start or after a newline", because the conditional assertion was not being
- correctly handled. The rule now is that both the assertion and what follows
- in the first alternative must satisfy the test.
-
-9. If auto-callout was enabled in a pattern with a conditional group whose
- condition was an assertion, PCRE could crash during matching, both with
- pcre_exec() and pcre_dfa_exec().
-
-10. The PCRE_DOLLAR_ENDONLY option was not working when pcre_dfa_exec() was
- used for matching.
-
-11. Unicode property support in character classes was not working for
- characters (bytes) greater than 127 when not in UTF-8 mode.
-
-12. Added the -M command line option to pcretest.
-
-14. Added the non-standard REG_NOTEMPTY option to the POSIX interface.
-
-15. Added the PCRE_NO_START_OPTIMIZE match-time option.
-
-16. Added comments and documentation about mis-use of no_arg in the C++
- wrapper.
-
-17. Implemented support for UTF-8 encoding in EBCDIC environments, a patch
- from Martin Jerabek that uses macro names for all relevant character and
- string constants.
-
-18. Added to pcre_internal.h two configuration checks: (a) If both EBCDIC and
- SUPPORT_UTF8 are set, give an error; (b) If SUPPORT_UCP is set without
- SUPPORT_UTF8, define SUPPORT_UTF8. The "configure" script handles both of
- these, but not everybody uses configure.
-
-19. A conditional group that had only one branch was not being correctly
- recognized as an item that could match an empty string. This meant that an
- enclosing group might also not be so recognized, causing infinite looping
- (and probably a segfault) for patterns such as ^"((?(?=[a])[^"])|b)*"$
- with the subject "ab", where knowledge that the repeated group can match
- nothing is needed in order to break the loop.
-
-20. If a pattern that was compiled with callouts was matched using pcre_dfa_
- exec(), but without supplying a callout function, matching went wrong.
-
-21. If PCRE_ERROR_MATCHLIMIT occurred during a recursion, there was a memory
- leak if the size of the offset vector was greater than 30. When the vector
- is smaller, the saved offsets during recursion go onto a local stack
- vector, but for larger vectors malloc() is used. It was failing to free
- when the recursion yielded PCRE_ERROR_MATCH_LIMIT (or any other "abnormal"
- error, in fact).
-
-22. There was a missing #ifdef SUPPORT_UTF8 round one of the variables in the
- heapframe that is used only when UTF-8 support is enabled. This caused no
- problem, but was untidy.
-
-23. Steven Van Ingelgem's patch to CMakeLists.txt to change the name
- CMAKE_BINARY_DIR to PROJECT_BINARY_DIR so that it works when PCRE is
- included within another project.
-
-24. Steven Van Ingelgem's patches to add more options to the CMake support,
- slightly modified by me:
-
- (a) PCRE_BUILD_TESTS can be set OFF not to build the tests, including
- not building pcregrep.
-
- (b) PCRE_BUILD_PCREGREP can be see OFF not to build pcregrep, but only
- if PCRE_BUILD_TESTS is also set OFF, because the tests use pcregrep.
-
-25. Forward references, both numeric and by name, in patterns that made use of
- duplicate group numbers, could behave incorrectly or give incorrect errors,
- because when scanning forward to find the reference group, PCRE was not
- taking into account the duplicate group numbers. A pattern such as
- ^X(?3)(a)(?|(b)|(q))(Y) is an example.
-
-26. Changed a few more instances of "const unsigned char *" to USPTR, making
- the feature of a custom pointer more persuasive (as requested by a user).
-
-27. Wrapped the definitions of fileno and isatty for Windows, which appear in
- pcretest.c, inside #ifndefs, because it seems they are sometimes already
- pre-defined.
-
-28. Added support for (*UTF8) at the start of a pattern.
-
-29. Arrange for flags added by the "release type" setting in CMake to be shown
- in the configuration summary.
-
-
-Version 7.8 05-Sep-08
----------------------
-
-1. Replaced UCP searching code with optimized version as implemented for Ad
- Muncher (http://www.admuncher.com/) by Peter Kankowski. This uses a two-
- stage table and inline lookup instead of a function, giving speed ups of 2
- to 5 times on some simple patterns that I tested. Permission was given to
- distribute the MultiStage2.py script that generates the tables (it's not in
- the tarball, but is in the Subversion repository).
-
-2. Updated the Unicode datatables to Unicode 5.1.0. This adds yet more
- scripts.
-
-3. Change 12 for 7.7 introduced a bug in pcre_study() when a pattern contained
- a group with a zero qualifier. The result of the study could be incorrect,
- or the function might crash, depending on the pattern.
-
-4. Caseless matching was not working for non-ASCII characters in back
- references. For example, /(\x{de})\1/8i was not matching \x{de}\x{fe}.
- It now works when Unicode Property Support is available.
-
-5. In pcretest, an escape such as \x{de} in the data was always generating
- a UTF-8 string, even in non-UTF-8 mode. Now it generates a single byte in
- non-UTF-8 mode. If the value is greater than 255, it gives a warning about
- truncation.
-
-6. Minor bugfix in pcrecpp.cc (change "" == ... to NULL == ...).
-
-7. Added two (int) casts to pcregrep when printing the difference of two
- pointers, in case they are 64-bit values.
-
-8. Added comments about Mac OS X stack usage to the pcrestack man page and to
- test 2 if it fails.
-
-9. Added PCRE_CALL_CONVENTION just before the names of all exported functions,
- and a #define of that name to empty if it is not externally set. This is to
- allow users of MSVC to set it if necessary.
-
-10. The PCRE_EXP_DEFN macro which precedes exported functions was missing from
- the convenience functions in the pcre_get.c source file.
-
-11. An option change at the start of a pattern that had top-level alternatives
- could cause overwriting and/or a crash. This command provoked a crash in
- some environments:
-
- printf "/(?i)[\xc3\xa9\xc3\xbd]|[\xc3\xa9\xc3\xbdA]/8\n" | pcretest
-
- This potential security problem was recorded as CVE-2008-2371.
-
-12. For a pattern where the match had to start at the beginning or immediately
- after a newline (e.g /.*anything/ without the DOTALL flag), pcre_exec() and
- pcre_dfa_exec() could read past the end of the passed subject if there was
- no match. To help with detecting such bugs (e.g. with valgrind), I modified
- pcretest so that it places the subject at the end of its malloc-ed buffer.
-
-13. The change to pcretest in 12 above threw up a couple more cases when pcre_
- exec() might read past the end of the data buffer in UTF-8 mode.
-
-14. A similar bug to 7.3/2 existed when the PCRE_FIRSTLINE option was set and
- the data contained the byte 0x85 as part of a UTF-8 character within its
- first line. This applied both to normal and DFA matching.
-
-15. Lazy qualifiers were not working in some cases in UTF-8 mode. For example,
- /^[^d]*?$/8 failed to match "abc".
-
-16. Added a missing copyright notice to pcrecpp_internal.h.
-
-17. Make it more clear in the documentation that values returned from
- pcre_exec() in ovector are byte offsets, not character counts.
-
-18. Tidied a few places to stop certain compilers from issuing warnings.
-
-19. Updated the Virtual Pascal + BCC files to compile the latest v7.7, as
- supplied by Stefan Weber. I made a further small update for 7.8 because
- there is a change of source arrangements: the pcre_searchfuncs.c module is
- replaced by pcre_ucd.c.
-
-
-Version 7.7 07-May-08
----------------------
-
-1. Applied Craig's patch to sort out a long long problem: "If we can't convert
- a string to a long long, pretend we don't even have a long long." This is
- done by checking for the strtoq, strtoll, and _strtoi64 functions.
-
-2. Applied Craig's patch to pcrecpp.cc to restore ABI compatibility with
- pre-7.6 versions, which defined a global no_arg variable instead of putting
- it in the RE class. (See also #8 below.)
-
-3. Remove a line of dead code, identified by coverity and reported by Nuno
- Lopes.
-
-4. Fixed two related pcregrep bugs involving -r with --include or --exclude:
-
- (1) The include/exclude patterns were being applied to the whole pathnames
- of files, instead of just to the final components.
-
- (2) If there was more than one level of directory, the subdirectories were
- skipped unless they satisfied the include/exclude conditions. This is
- inconsistent with GNU grep (and could even be seen as contrary to the
- pcregrep specification - which I improved to make it absolutely clear).
- The action now is always to scan all levels of directory, and just
- apply the include/exclude patterns to regular files.
-
-5. Added the --include_dir and --exclude_dir patterns to pcregrep, and used
- --exclude_dir in the tests to avoid scanning .svn directories.
-
-6. Applied Craig's patch to the QuoteMeta function so that it escapes the
- NUL character as backslash + 0 rather than backslash + NUL, because PCRE
- doesn't support NULs in patterns.
-
-7. Added some missing "const"s to declarations of static tables in
- pcre_compile.c and pcre_dfa_exec.c.
-
-8. Applied Craig's patch to pcrecpp.cc to fix a problem in OS X that was
- caused by fix #2 above. (Subsequently also a second patch to fix the
- first patch. And a third patch - this was a messy problem.)
-
-9. Applied Craig's patch to remove the use of push_back().
-
-10. Applied Alan Lehotsky's patch to add REG_STARTEND support to the POSIX
- matching function regexec().
-
-11. Added support for the Oniguruma syntax \g<name>, \g<n>, \g'name', \g'n',
- which, however, unlike Perl's \g{...}, are subroutine calls, not back
- references. PCRE supports relative numbers with this syntax (I don't think
- Oniguruma does).
-
-12. Previously, a group with a zero repeat such as (...){0} was completely
- omitted from the compiled regex. However, this means that if the group
- was called as a subroutine from elsewhere in the pattern, things went wrong
- (an internal error was given). Such groups are now left in the compiled
- pattern, with a new opcode that causes them to be skipped at execution
- time.
-
-13. Added the PCRE_JAVASCRIPT_COMPAT option. This makes the following changes
- to the way PCRE behaves:
-
- (a) A lone ] character is dis-allowed (Perl treats it as data).
-
- (b) A back reference to an unmatched subpattern matches an empty string
- (Perl fails the current match path).
-
- (c) A data ] in a character class must be notated as \] because if the
- first data character in a class is ], it defines an empty class. (In
- Perl it is not possible to have an empty class.) The empty class []
- never matches; it forces failure and is equivalent to (*FAIL) or (?!).
- The negative empty class [^] matches any one character, independently
- of the DOTALL setting.
-
-14. A pattern such as /(?2)[]a()b](abc)/ which had a forward reference to a
- non-existent subpattern following a character class starting with ']' and
- containing () gave an internal compiling error instead of "reference to
- non-existent subpattern". Fortunately, when the pattern did exist, the
- compiled code was correct. (When scanning forwards to check for the
- existence of the subpattern, it was treating the data ']' as terminating
- the class, so got the count wrong. When actually compiling, the reference
- was subsequently set up correctly.)
-
-15. The "always fail" assertion (?!) is optimzed to (*FAIL) by pcre_compile;
- it was being rejected as not supported by pcre_dfa_exec(), even though
- other assertions are supported. I have made pcre_dfa_exec() support
- (*FAIL).
-
-16. The implementation of 13c above involved the invention of a new opcode,
- OP_ALLANY, which is like OP_ANY but doesn't check the /s flag. Since /s
- cannot be changed at match time, I realized I could make a small
- improvement to matching performance by compiling OP_ALLANY instead of
- OP_ANY for "." when DOTALL was set, and then removing the runtime tests
- on the OP_ANY path.
-
-17. Compiling pcretest on Windows with readline support failed without the
- following two fixes: (1) Make the unistd.h include conditional on
- HAVE_UNISTD_H; (2) #define isatty and fileno as _isatty and _fileno.
-
-18. Changed CMakeLists.txt and cmake/FindReadline.cmake to arrange for the
- ncurses library to be included for pcretest when ReadLine support is
- requested, but also to allow for it to be overridden. This patch came from
- Daniel Bergström.
-
-19. There was a typo in the file ucpinternal.h where f0_rangeflag was defined
- as 0x00f00000 instead of 0x00800000. Luckily, this would not have caused
- any errors with the current Unicode tables. Thanks to Peter Kankowski for
- spotting this.
-
-
-Version 7.6 28-Jan-08
----------------------
-
-1. A character class containing a very large number of characters with
- codepoints greater than 255 (in UTF-8 mode, of course) caused a buffer
- overflow.
-
-2. Patch to cut out the "long long" test in pcrecpp_unittest when
- HAVE_LONG_LONG is not defined.
-
-3. Applied Christian Ehrlicher's patch to update the CMake build files to
- bring them up to date and include new features. This patch includes:
-
- - Fixed PH's badly added libz and libbz2 support.
- - Fixed a problem with static linking.
- - Added pcredemo. [But later removed - see 7 below.]
- - Fixed dftables problem and added an option.
- - Added a number of HAVE_XXX tests, including HAVE_WINDOWS_H and
- HAVE_LONG_LONG.
- - Added readline support for pcretest.
- - Added an listing of the option settings after cmake has run.
-
-4. A user submitted a patch to Makefile that makes it easy to create
- "pcre.dll" under mingw when using Configure/Make. I added stuff to
- Makefile.am that cause it to include this special target, without
- affecting anything else. Note that the same mingw target plus all
- the other distribution libraries and programs are now supported
- when configuring with CMake (see 6 below) instead of with
- Configure/Make.
-
-5. Applied Craig's patch that moves no_arg into the RE class in the C++ code.
- This is an attempt to solve the reported problem "pcrecpp::no_arg is not
- exported in the Windows port". It has not yet been confirmed that the patch
- solves the problem, but it does no harm.
-
-6. Applied Sheri's patch to CMakeLists.txt to add NON_STANDARD_LIB_PREFIX and
- NON_STANDARD_LIB_SUFFIX for dll names built with mingw when configured
- with CMake, and also correct the comment about stack recursion.
-
-7. Remove the automatic building of pcredemo from the ./configure system and
- from CMakeLists.txt. The whole idea of pcredemo.c is that it is an example
- of a program that users should build themselves after PCRE is installed, so
- building it automatically is not really right. What is more, it gave
- trouble in some build environments.
-
-8. Further tidies to CMakeLists.txt from Sheri and Christian.
-
-
-Version 7.5 10-Jan-08
----------------------
-
-1. Applied a patch from Craig: "This patch makes it possible to 'ignore'
- values in parens when parsing an RE using the C++ wrapper."
-
-2. Negative specials like \S did not work in character classes in UTF-8 mode.
- Characters greater than 255 were excluded from the class instead of being
- included.
-
-3. The same bug as (2) above applied to negated POSIX classes such as
- [:^space:].
-
-4. PCRECPP_STATIC was referenced in pcrecpp_internal.h, but nowhere was it
- defined or documented. It seems to have been a typo for PCRE_STATIC, so
- I have changed it.
-
-5. The construct (?&) was not diagnosed as a syntax error (it referenced the
- first named subpattern) and a construct such as (?&a) would reference the
- first named subpattern whose name started with "a" (in other words, the
- length check was missing). Both these problems are fixed. "Subpattern name
- expected" is now given for (?&) (a zero-length name), and this patch also
- makes it give the same error for \k'' (previously it complained that that
- was a reference to a non-existent subpattern).
-
-6. The erroneous patterns (?+-a) and (?-+a) give different error messages;
- this is right because (?- can be followed by option settings as well as by
- digits. I have, however, made the messages clearer.
-
-7. Patterns such as (?(1)a|b) (a pattern that contains fewer subpatterns
- than the number used in the conditional) now cause a compile-time error.
- This is actually not compatible with Perl, which accepts such patterns, but
- treats the conditional as always being FALSE (as PCRE used to), but it
- seems to me that giving a diagnostic is better.
-
-8. Change "alphameric" to the more common word "alphanumeric" in comments
- and messages.
-
-9. Fix two occurrences of "backslash" in comments that should have been
- "backspace".
-
-10. Remove two redundant lines of code that can never be obeyed (their function
- was moved elsewhere).
-
-11. The program that makes PCRE's Unicode character property table had a bug
- which caused it to generate incorrect table entries for sequences of
- characters that have the same character type, but are in different scripts.
- It amalgamated them into a single range, with the script of the first of
- them. In other words, some characters were in the wrong script. There were
- thirteen such cases, affecting characters in the following ranges:
-
- U+002b0 - U+002c1
- U+0060c - U+0060d
- U+0061e - U+00612
- U+0064b - U+0065e
- U+0074d - U+0076d
- U+01800 - U+01805
- U+01d00 - U+01d77
- U+01d9b - U+01dbf
- U+0200b - U+0200f
- U+030fc - U+030fe
- U+03260 - U+0327f
- U+0fb46 - U+0fbb1
- U+10450 - U+1049d
-
-12. The -o option (show only the matching part of a line) for pcregrep was not
- compatible with GNU grep in that, if there was more than one match in a
- line, it showed only the first of them. It now behaves in the same way as
- GNU grep.
-
-13. If the -o and -v options were combined for pcregrep, it printed a blank
- line for every non-matching line. GNU grep prints nothing, and pcregrep now
- does the same. The return code can be used to tell if there were any
- non-matching lines.
-
-14. Added --file-offsets and --line-offsets to pcregrep.
-
-15. The pattern (?=something)(?R) was not being diagnosed as a potentially
- infinitely looping recursion. The bug was that positive lookaheads were not
- being skipped when checking for a possible empty match (negative lookaheads
- and both kinds of lookbehind were skipped).
-
-16. Fixed two typos in the Windows-only code in pcregrep.c, and moved the
- inclusion of <windows.h> to before rather than after the definition of
- INVALID_FILE_ATTRIBUTES (patch from David Byron).
-
-17. Specifying a possessive quantifier with a specific limit for a Unicode
- character property caused pcre_compile() to compile bad code, which led at
- runtime to PCRE_ERROR_INTERNAL (-14). Examples of patterns that caused this
- are: /\p{Zl}{2,3}+/8 and /\p{Cc}{2}+/8. It was the possessive "+" that
- caused the error; without that there was no problem.
-
-18. Added --enable-pcregrep-libz and --enable-pcregrep-libbz2.
-
-19. Added --enable-pcretest-libreadline.
-
-20. In pcrecpp.cc, the variable 'count' was incremented twice in
- RE::GlobalReplace(). As a result, the number of replacements returned was
- double what it should be. I removed one of the increments, but Craig sent a
- later patch that removed the other one (the right fix) and added unit tests
- that check the return values (which was not done before).
-
-21. Several CMake things:
-
- (1) Arranged that, when cmake is used on Unix, the libraries end up with
- the names libpcre and libpcreposix, not just pcre and pcreposix.
-
- (2) The above change means that pcretest and pcregrep are now correctly
- linked with the newly-built libraries, not previously installed ones.
-
- (3) Added PCRE_SUPPORT_LIBREADLINE, PCRE_SUPPORT_LIBZ, PCRE_SUPPORT_LIBBZ2.
-
-22. In UTF-8 mode, with newline set to "any", a pattern such as .*a.*=.b.*
- crashed when matching a string such as a\x{2029}b (note that \x{2029} is a
- UTF-8 newline character). The key issue is that the pattern starts .*;
- this means that the match must be either at the beginning, or after a
- newline. The bug was in the code for advancing after a failed match and
- checking that the new position followed a newline. It was not taking
- account of UTF-8 characters correctly.
-
-23. PCRE was behaving differently from Perl in the way it recognized POSIX
- character classes. PCRE was not treating the sequence [:...:] as a
- character class unless the ... were all letters. Perl, however, seems to
- allow any characters between [: and :], though of course it rejects as
- unknown any "names" that contain non-letters, because all the known class
- names consist only of letters. Thus, Perl gives an error for [[:1234:]],
- for example, whereas PCRE did not - it did not recognize a POSIX character
- class. This seemed a bit dangerous, so the code has been changed to be
- closer to Perl. The behaviour is not identical to Perl, because PCRE will
- diagnose an unknown class for, for example, [[:l\ower:]] where Perl will
- treat it as [[:lower:]]. However, PCRE does now give "unknown" errors where
- Perl does, and where it didn't before.
-
-24. Rewrite so as to remove the single use of %n from pcregrep because in some
- Windows environments %n is disabled by default.
-
-
-Version 7.4 21-Sep-07
----------------------
-
-1. Change 7.3/28 was implemented for classes by looking at the bitmap. This
- means that a class such as [\s] counted as "explicit reference to CR or
- LF". That isn't really right - the whole point of the change was to try to
- help when there was an actual mention of one of the two characters. So now
- the change happens only if \r or \n (or a literal CR or LF) character is
- encountered.
-
-2. The 32-bit options word was also used for 6 internal flags, but the numbers
- of both had grown to the point where there were only 3 bits left.
- Fortunately, there was spare space in the data structure, and so I have
- moved the internal flags into a new 16-bit field to free up more option
- bits.
-
-3. The appearance of (?J) at the start of a pattern set the DUPNAMES option,
- but did not set the internal JCHANGED flag - either of these is enough to
- control the way the "get" function works - but the PCRE_INFO_JCHANGED
- facility is supposed to tell if (?J) was ever used, so now (?J) at the
- start sets both bits.
-
-4. Added options (at build time, compile time, exec time) to change \R from
- matching any Unicode line ending sequence to just matching CR, LF, or CRLF.
-
-5. doc/pcresyntax.html was missing from the distribution.
-
-6. Put back the definition of PCRE_ERROR_NULLWSLIMIT, for backward
- compatibility, even though it is no longer used.
-
-7. Added macro for snprintf to pcrecpp_unittest.cc and also for strtoll and
- strtoull to pcrecpp.cc to select the available functions in WIN32 when the
- windows.h file is present (where different names are used). [This was
- reversed later after testing - see 16 below.]
-
-8. Changed all #include <config.h> to #include "config.h". There were also
- some further <pcre.h> cases that I changed to "pcre.h".
-
-9. When pcregrep was used with the --colour option, it missed the line ending
- sequence off the lines that it output.
-
-10. It was pointed out to me that arrays of string pointers cause lots of
- relocations when a shared library is dynamically loaded. A technique of
- using a single long string with a table of offsets can drastically reduce
- these. I have refactored PCRE in four places to do this. The result is
- dramatic:
-
- Originally: 290
- After changing UCP table: 187
- After changing error message table: 43
- After changing table of "verbs" 36
- After changing table of Posix names 22
-
- Thanks to the folks working on Gregex for glib for this insight.
-
-11. --disable-stack-for-recursion caused compiling to fail unless -enable-
- unicode-properties was also set.
-
-12. Updated the tests so that they work when \R is defaulted to ANYCRLF.
-
-13. Added checks for ANY and ANYCRLF to pcrecpp.cc where it previously
- checked only for CRLF.
-
-14. Added casts to pcretest.c to avoid compiler warnings.
-
-15. Added Craig's patch to various pcrecpp modules to avoid compiler warnings.
-
-16. Added Craig's patch to remove the WINDOWS_H tests, that were not working,
- and instead check for _strtoi64 explicitly, and avoid the use of snprintf()
- entirely. This removes changes made in 7 above.
-
-17. The CMake files have been updated, and there is now more information about
- building with CMake in the NON-UNIX-USE document.
-
-
-Version 7.3 28-Aug-07
----------------------
-
- 1. In the rejigging of the build system that eventually resulted in 7.1, the
- line "#include <pcre.h>" was included in pcre_internal.h. The use of angle
- brackets there is not right, since it causes compilers to look for an
- installed pcre.h, not the version that is in the source that is being
- compiled (which of course may be different). I have changed it back to:
-
- #include "pcre.h"
-
- I have a vague recollection that the change was concerned with compiling in
- different directories, but in the new build system, that is taken care of
- by the VPATH setting the Makefile.
-
- 2. The pattern .*$ when run in not-DOTALL UTF-8 mode with newline=any failed
- when the subject happened to end in the byte 0x85 (e.g. if the last
- character was \x{1ec5}). *Character* 0x85 is one of the "any" newline
- characters but of course it shouldn't be taken as a newline when it is part
- of another character. The bug was that, for an unlimited repeat of . in
- not-DOTALL UTF-8 mode, PCRE was advancing by bytes rather than by
- characters when looking for a newline.
-
- 3. A small performance improvement in the DOTALL UTF-8 mode .* case.
-
- 4. Debugging: adjusted the names of opcodes for different kinds of parentheses
- in debug output.
-
- 5. Arrange to use "%I64d" instead of "%lld" and "%I64u" instead of "%llu" for
- long printing in the pcrecpp unittest when running under MinGW.
-
- 6. ESC_K was left out of the EBCDIC table.
-
- 7. Change 7.0/38 introduced a new limit on the number of nested non-capturing
- parentheses; I made it 1000, which seemed large enough. Unfortunately, the
- limit also applies to "virtual nesting" when a pattern is recursive, and in
- this case 1000 isn't so big. I have been able to remove this limit at the
- expense of backing off one optimization in certain circumstances. Normally,
- when pcre_exec() would call its internal match() function recursively and
- immediately return the result unconditionally, it uses a "tail recursion"
- feature to save stack. However, when a subpattern that can match an empty
- string has an unlimited repetition quantifier, it no longer makes this
- optimization. That gives it a stack frame in which to save the data for
- checking that an empty string has been matched. Previously this was taken
- from the 1000-entry workspace that had been reserved. So now there is no
- explicit limit, but more stack is used.
-
- 8. Applied Daniel's patches to solve problems with the import/export magic
- syntax that is required for Windows, and which was going wrong for the
- pcreposix and pcrecpp parts of the library. These were overlooked when this
- problem was solved for the main library.
-
- 9. There were some crude static tests to avoid integer overflow when computing
- the size of patterns that contain repeated groups with explicit upper
- limits. As the maximum quantifier is 65535, the maximum group length was
- set at 30,000 so that the product of these two numbers did not overflow a
- 32-bit integer. However, it turns out that people want to use groups that
- are longer than 30,000 bytes (though not repeat them that many times).
- Change 7.0/17 (the refactoring of the way the pattern size is computed) has
- made it possible to implement the integer overflow checks in a much more
- dynamic way, which I have now done. The artificial limitation on group
- length has been removed - we now have only the limit on the total length of
- the compiled pattern, which depends on the LINK_SIZE setting.
-
-10. Fixed a bug in the documentation for get/copy named substring when
- duplicate names are permitted. If none of the named substrings are set, the
- functions return PCRE_ERROR_NOSUBSTRING (7); the doc said they returned an
- empty string.
-
-11. Because Perl interprets \Q...\E at a high level, and ignores orphan \E
- instances, patterns such as [\Q\E] or [\E] or even [^\E] cause an error,
- because the ] is interpreted as the first data character and the
- terminating ] is not found. PCRE has been made compatible with Perl in this
- regard. Previously, it interpreted [\Q\E] as an empty class, and [\E] could
- cause memory overwriting.
-
-10. Like Perl, PCRE automatically breaks an unlimited repeat after an empty
- string has been matched (to stop an infinite loop). It was not recognizing
- a conditional subpattern that could match an empty string if that
- subpattern was within another subpattern. For example, it looped when
- trying to match (((?(1)X|))*) but it was OK with ((?(1)X|)*) where the
- condition was not nested. This bug has been fixed.
-
-12. A pattern like \X?\d or \P{L}?\d in non-UTF-8 mode could cause a backtrack
- past the start of the subject in the presence of bytes with the top bit
- set, for example "\x8aBCD".
-
-13. Added Perl 5.10 experimental backtracking controls (*FAIL), (*F), (*PRUNE),
- (*SKIP), (*THEN), (*COMMIT), and (*ACCEPT).
-
-14. Optimized (?!) to (*FAIL).
-
-15. Updated the test for a valid UTF-8 string to conform to the later RFC 3629.
- This restricts code points to be within the range 0 to 0x10FFFF, excluding
- the "low surrogate" sequence 0xD800 to 0xDFFF. Previously, PCRE allowed the
- full range 0 to 0x7FFFFFFF, as defined by RFC 2279. Internally, it still
- does: it's just the validity check that is more restrictive.
-
-16. Inserted checks for integer overflows during escape sequence (backslash)
- processing, and also fixed erroneous offset values for syntax errors during
- backslash processing.
-
-17. Fixed another case of looking too far back in non-UTF-8 mode (cf 12 above)
- for patterns like [\PPP\x8a]{1,}\x80 with the subject "A\x80".
-
-18. An unterminated class in a pattern like (?1)\c[ with a "forward reference"
- caused an overrun.
-
-19. A pattern like (?:[\PPa*]*){8,} which had an "extended class" (one with
- something other than just ASCII characters) inside a group that had an
- unlimited repeat caused a loop at compile time (while checking to see
- whether the group could match an empty string).
-
-20. Debugging a pattern containing \p or \P could cause a crash. For example,
- [\P{Any}] did so. (Error in the code for printing property names.)
-
-21. An orphan \E inside a character class could cause a crash.
-
-22. A repeated capturing bracket such as (A)? could cause a wild memory
- reference during compilation.
-
-23. There are several functions in pcre_compile() that scan along a compiled
- expression for various reasons (e.g. to see if it's fixed length for look
- behind). There were bugs in these functions when a repeated \p or \P was
- present in the pattern. These operators have additional parameters compared
- with \d, etc, and these were not being taken into account when moving along
- the compiled data. Specifically:
-
- (a) A item such as \p{Yi}{3} in a lookbehind was not treated as fixed
- length.
-
- (b) An item such as \pL+ within a repeated group could cause crashes or
- loops.
-
- (c) A pattern such as \p{Yi}+(\P{Yi}+)(?1) could give an incorrect
- "reference to non-existent subpattern" error.
-
- (d) A pattern like (\P{Yi}{2}\277)? could loop at compile time.
-
-24. A repeated \S or \W in UTF-8 mode could give wrong answers when multibyte
- characters were involved (for example /\S{2}/8g with "A\x{a3}BC").
-
-25. Using pcregrep in multiline, inverted mode (-Mv) caused it to loop.
-
-26. Patterns such as [\P{Yi}A] which include \p or \P and just one other
- character were causing crashes (broken optimization).
-
-27. Patterns such as (\P{Yi}*\277)* (group with possible zero repeat containing
- \p or \P) caused a compile-time loop.
-
-28. More problems have arisen in unanchored patterns when CRLF is a valid line
- break. For example, the unstudied pattern [\r\n]A does not match the string
- "\r\nA" because change 7.0/46 below moves the current point on by two
- characters after failing to match at the start. However, the pattern \nA
- *does* match, because it doesn't start till \n, and if [\r\n]A is studied,
- the same is true. There doesn't seem any very clean way out of this, but
- what I have chosen to do makes the common cases work: PCRE now takes note
- of whether there can be an explicit match for \r or \n anywhere in the
- pattern, and if so, 7.0/46 no longer applies. As part of this change,
- there's a new PCRE_INFO_HASCRORLF option for finding out whether a compiled
- pattern has explicit CR or LF references.
-
-29. Added (*CR) etc for changing newline setting at start of pattern.
-
-
-Version 7.2 19-Jun-07
----------------------
-
- 1. If the fr_FR locale cannot be found for test 3, try the "french" locale,
- which is apparently normally available under Windows.
-
- 2. Re-jig the pcregrep tests with different newline settings in an attempt
- to make them independent of the local environment's newline setting.
-
- 3. Add code to configure.ac to remove -g from the CFLAGS default settings.
-
- 4. Some of the "internals" tests were previously cut out when the link size
- was not 2, because the output contained actual offsets. The recent new
- "Z" feature of pcretest means that these can be cut out, making the tests
- usable with all link sizes.
-
- 5. Implemented Stan Switzer's goto replacement for longjmp() when not using
- stack recursion. This gives a massive performance boost under BSD, but just
- a small improvement under Linux. However, it saves one field in the frame
- in all cases.
-
- 6. Added more features from the forthcoming Perl 5.10:
-
- (a) (?-n) (where n is a string of digits) is a relative subroutine or
- recursion call. It refers to the nth most recently opened parentheses.
-
- (b) (?+n) is also a relative subroutine call; it refers to the nth next
- to be opened parentheses.
-
- (c) Conditions that refer to capturing parentheses can be specified
- relatively, for example, (?(-2)... or (?(+3)...
-
- (d) \K resets the start of the current match so that everything before
- is not part of it.
-
- (e) \k{name} is synonymous with \k<name> and \k'name' (.NET compatible).
-
- (f) \g{name} is another synonym - part of Perl 5.10's unification of
- reference syntax.
-
- (g) (?| introduces a group in which the numbering of parentheses in each
- alternative starts with the same number.
-
- (h) \h, \H, \v, and \V match horizontal and vertical whitespace.
-
- 7. Added two new calls to pcre_fullinfo(): PCRE_INFO_OKPARTIAL and
- PCRE_INFO_JCHANGED.
-
- 8. A pattern such as (.*(.)?)* caused pcre_exec() to fail by either not
- terminating or by crashing. Diagnosed by Viktor Griph; it was in the code
- for detecting groups that can match an empty string.
-
- 9. A pattern with a very large number of alternatives (more than several
- hundred) was running out of internal workspace during the pre-compile
- phase, where pcre_compile() figures out how much memory will be needed. A
- bit of new cunning has reduced the workspace needed for groups with
- alternatives. The 1000-alternative test pattern now uses 12 bytes of
- workspace instead of running out of the 4096 that are available.
-
-10. Inserted some missing (unsigned int) casts to get rid of compiler warnings.
-
-11. Applied patch from Google to remove an optimization that didn't quite work.
- The report of the bug said:
-
- pcrecpp::RE("a*").FullMatch("aaa") matches, while
- pcrecpp::RE("a*?").FullMatch("aaa") does not, and
- pcrecpp::RE("a*?\\z").FullMatch("aaa") does again.
-
-12. If \p or \P was used in non-UTF-8 mode on a character greater than 127
- it matched the wrong number of bytes.
-
-
-Version 7.1 24-Apr-07
----------------------
-
- 1. Applied Bob Rossi and Daniel G's patches to convert the build system to one
- that is more "standard", making use of automake and other Autotools. There
- is some re-arrangement of the files and adjustment of comments consequent
- on this.
-
- 2. Part of the patch fixed a problem with the pcregrep tests. The test of -r
- for recursive directory scanning broke on some systems because the files
- are not scanned in any specific order and on different systems the order
- was different. A call to "sort" has been inserted into RunGrepTest for the
- approprate test as a short-term fix. In the longer term there may be an
- alternative.
-
- 3. I had an email from Eric Raymond about problems translating some of PCRE's
- man pages to HTML (despite the fact that I distribute HTML pages, some
- people do their own conversions for various reasons). The problems
- concerned the use of low-level troff macros .br and .in. I have therefore
- removed all such uses from the man pages (some were redundant, some could
- be replaced by .nf/.fi pairs). The 132html script that I use to generate
- HTML has been updated to handle .nf/.fi and to complain if it encounters
- .br or .in.
-
- 4. Updated comments in configure.ac that get placed in config.h.in and also
- arranged for config.h to be included in the distribution, with the name
- config.h.generic, for the benefit of those who have to compile without
- Autotools (compare pcre.h, which is now distributed as pcre.h.generic).
-
- 5. Updated the support (such as it is) for Virtual Pascal, thanks to Stefan
- Weber: (1) pcre_internal.h was missing some function renames; (2) updated
- makevp.bat for the current PCRE, using the additional files
- makevp_c.txt, makevp_l.txt, and pcregexp.pas.
-
- 6. A Windows user reported a minor discrepancy with test 2, which turned out
- to be caused by a trailing space on an input line that had got lost in his
- copy. The trailing space was an accident, so I've just removed it.
-
- 7. Add -Wl,-R... flags in pcre-config.in for *BSD* systems, as I'm told
- that is needed.
-
- 8. Mark ucp_table (in ucptable.h) and ucp_gentype (in pcre_ucp_searchfuncs.c)
- as "const" (a) because they are and (b) because it helps the PHP
- maintainers who have recently made a script to detect big data structures
- in the php code that should be moved to the .rodata section. I remembered
- to update Builducptable as well, so it won't revert if ucptable.h is ever
- re-created.
-
- 9. Added some extra #ifdef SUPPORT_UTF8 conditionals into pcretest.c,
- pcre_printint.src, pcre_compile.c, pcre_study.c, and pcre_tables.c, in
- order to be able to cut out the UTF-8 tables in the latter when UTF-8
- support is not required. This saves 1.5-2K of code, which is important in
- some applications.
-
- Later: more #ifdefs are needed in pcre_ord2utf8.c and pcre_valid_utf8.c
- so as not to refer to the tables, even though these functions will never be
- called when UTF-8 support is disabled. Otherwise there are problems with a
- shared library.
-
-10. Fixed two bugs in the emulated memmove() function in pcre_internal.h:
-
- (a) It was defining its arguments as char * instead of void *.
-
- (b) It was assuming that all moves were upwards in memory; this was true
- a long time ago when I wrote it, but is no longer the case.
-
- The emulated memove() is provided for those environments that have neither
- memmove() nor bcopy(). I didn't think anyone used it these days, but that
- is clearly not the case, as these two bugs were recently reported.
-
-11. The script PrepareRelease is now distributed: it calls 132html, CleanTxt,
- and Detrail to create the HTML documentation, the .txt form of the man
- pages, and it removes trailing spaces from listed files. It also creates
- pcre.h.generic and config.h.generic from pcre.h and config.h. In the latter
- case, it wraps all the #defines with #ifndefs. This script should be run
- before "make dist".
-
-12. Fixed two fairly obscure bugs concerned with quantified caseless matching
- with Unicode property support.
-
- (a) For a maximizing quantifier, if the two different cases of the
- character were of different lengths in their UTF-8 codings (there are
- some cases like this - I found 11), and the matching function had to
- back up over a mixture of the two cases, it incorrectly assumed they
- were both the same length.
-
- (b) When PCRE was configured to use the heap rather than the stack for
- recursion during matching, it was not correctly preserving the data for
- the other case of a UTF-8 character when checking ahead for a match
- while processing a minimizing repeat. If the check also involved
- matching a wide character, but failed, corruption could cause an
- erroneous result when trying to check for a repeat of the original
- character.
-
-13. Some tidying changes to the testing mechanism:
-
- (a) The RunTest script now detects the internal link size and whether there
- is UTF-8 and UCP support by running ./pcretest -C instead of relying on
- values substituted by "configure". (The RunGrepTest script already did
- this for UTF-8.) The configure.ac script no longer substitutes the
- relevant variables.
-
- (b) The debugging options /B and /D in pcretest show the compiled bytecode
- with length and offset values. This means that the output is different
- for different internal link sizes. Test 2 is skipped for link sizes
- other than 2 because of this, bypassing the problem. Unfortunately,
- there was also a test in test 3 (the locale tests) that used /B and
- failed for link sizes other than 2. Rather than cut the whole test out,
- I have added a new /Z option to pcretest that replaces the length and
- offset values with spaces. This is now used to make test 3 independent
- of link size. (Test 2 will be tidied up later.)
-
-14. If erroroffset was passed as NULL to pcre_compile, it provoked a
- segmentation fault instead of returning the appropriate error message.
-
-15. In multiline mode when the newline sequence was set to "any", the pattern
- ^$ would give a match between the \r and \n of a subject such as "A\r\nB".
- This doesn't seem right; it now treats the CRLF combination as the line
- ending, and so does not match in that case. It's only a pattern such as ^$
- that would hit this one: something like ^ABC$ would have failed after \r
- and then tried again after \r\n.
-
-16. Changed the comparison command for RunGrepTest from "diff -u" to "diff -ub"
- in an attempt to make files that differ only in their line terminators
- compare equal. This works on Linux.
-
-17. Under certain error circumstances pcregrep might try to free random memory
- as it exited. This is now fixed, thanks to valgrind.
-
-19. In pcretest, if the pattern /(?m)^$/g<any> was matched against the string
- "abc\r\n\r\n", it found an unwanted second match after the second \r. This
- was because its rules for how to advance for /g after matching an empty
- string at the end of a line did not allow for this case. They now check for
- it specially.
-
-20. pcretest is supposed to handle patterns and data of any length, by
- extending its buffers when necessary. It was getting this wrong when the
- buffer for a data line had to be extended.
-
-21. Added PCRE_NEWLINE_ANYCRLF which is like ANY, but matches only CR, LF, or
- CRLF as a newline sequence.
-
-22. Code for handling Unicode properties in pcre_dfa_exec() wasn't being cut
- out by #ifdef SUPPORT_UCP. This did no harm, as it could never be used, but
- I have nevertheless tidied it up.
-
-23. Added some casts to kill warnings from HP-UX ia64 compiler.
-
-24. Added a man page for pcre-config.
-
-
-Version 7.0 19-Dec-06
----------------------
-
- 1. Fixed a signed/unsigned compiler warning in pcre_compile.c, shown up by
- moving to gcc 4.1.1.
-
- 2. The -S option for pcretest uses setrlimit(); I had omitted to #include
- sys/time.h, which is documented as needed for this function. It doesn't
- seem to matter on Linux, but it showed up on some releases of OS X.
-
- 3. It seems that there are systems where bytes whose values are greater than
- 127 match isprint() in the "C" locale. The "C" locale should be the
- default when a C program starts up. In most systems, only ASCII printing
- characters match isprint(). This difference caused the output from pcretest
- to vary, making some of the tests fail. I have changed pcretest so that:
-
- (a) When it is outputting text in the compiled version of a pattern, bytes
- other than 32-126 are always shown as hex escapes.
-
- (b) When it is outputting text that is a matched part of a subject string,
- it does the same, unless a different locale has been set for the match
- (using the /L modifier). In this case, it uses isprint() to decide.
-
- 4. Fixed a major bug that caused incorrect computation of the amount of memory
- required for a compiled pattern when options that changed within the
- pattern affected the logic of the preliminary scan that determines the
- length. The relevant options are -x, and -i in UTF-8 mode. The result was
- that the computed length was too small. The symptoms of this bug were
- either the PCRE error "internal error: code overflow" from pcre_compile(),
- or a glibc crash with a message such as "pcretest: free(): invalid next
- size (fast)". Examples of patterns that provoked this bug (shown in
- pcretest format) are:
-
- /(?-x: )/x
- /(?x)(?-x: \s*#\s*)/
- /((?i)[\x{c0}])/8
- /(?i:[\x{c0}])/8
-
- HOWEVER: Change 17 below makes this fix obsolete as the memory computation
- is now done differently.
-
- 5. Applied patches from Google to: (a) add a QuoteMeta function to the C++
- wrapper classes; (b) implement a new function in the C++ scanner that is
- more efficient than the old way of doing things because it avoids levels of
- recursion in the regex matching; (c) add a paragraph to the documentation
- for the FullMatch() function.
-
- 6. The escape sequence \n was being treated as whatever was defined as
- "newline". Not only was this contrary to the documentation, which states
- that \n is character 10 (hex 0A), but it also went horribly wrong when
- "newline" was defined as CRLF. This has been fixed.
-
- 7. In pcre_dfa_exec.c the value of an unsigned integer (the variable called c)
- was being set to -1 for the "end of line" case (supposedly a value that no
- character can have). Though this value is never used (the check for end of
- line is "zero bytes in current character"), it caused compiler complaints.
- I've changed it to 0xffffffff.
-
- 8. In pcre_version.c, the version string was being built by a sequence of
- C macros that, in the event of PCRE_PRERELEASE being defined as an empty
- string (as it is for production releases) called a macro with an empty
- argument. The C standard says the result of this is undefined. The gcc
- compiler treats it as an empty string (which was what was wanted) but it is
- reported that Visual C gives an error. The source has been hacked around to
- avoid this problem.
-
- 9. On the advice of a Windows user, included <io.h> and <fcntl.h> in Windows
- builds of pcretest, and changed the call to _setmode() to use _O_BINARY
- instead of 0x8000. Made all the #ifdefs test both _WIN32 and WIN32 (not all
- of them did).
-
-10. Originally, pcretest opened its input and output without "b"; then I was
- told that "b" was needed in some environments, so it was added for release
- 5.0 to both the input and output. (It makes no difference on Unix-like
- systems.) Later I was told that it is wrong for the input on Windows. I've
- now abstracted the modes into two macros, to make it easier to fiddle with
- them, and removed "b" from the input mode under Windows.
-
-11. Added pkgconfig support for the C++ wrapper library, libpcrecpp.
-
-12. Added -help and --help to pcretest as an official way of being reminded
- of the options.
-
-13. Removed some redundant semicolons after macro calls in pcrecpparg.h.in
- and pcrecpp.cc because they annoy compilers at high warning levels.
-
-14. A bit of tidying/refactoring in pcre_exec.c in the main bumpalong loop.
-
-15. Fixed an occurrence of == in configure.ac that should have been = (shell
- scripts are not C programs :-) and which was not noticed because it works
- on Linux.
-
-16. pcretest is supposed to handle any length of pattern and data line (as one
- line or as a continued sequence of lines) by extending its input buffer if
- necessary. This feature was broken for very long pattern lines, leading to
- a string of junk being passed to pcre_compile() if the pattern was longer
- than about 50K.
-
-17. I have done a major re-factoring of the way pcre_compile() computes the
- amount of memory needed for a compiled pattern. Previously, there was code
- that made a preliminary scan of the pattern in order to do this. That was
- OK when PCRE was new, but as the facilities have expanded, it has become
- harder and harder to keep it in step with the real compile phase, and there
- have been a number of bugs (see for example, 4 above). I have now found a
- cunning way of running the real compile function in a "fake" mode that
- enables it to compute how much memory it would need, while actually only
- ever using a few hundred bytes of working memory and without too many
- tests of the mode. This should make future maintenance and development
- easier. A side effect of this work is that the limit of 200 on the nesting
- depth of parentheses has been removed (though this was never a serious
- limitation, I suspect). However, there is a downside: pcre_compile() now
- runs more slowly than before (30% or more, depending on the pattern). I
- hope this isn't a big issue. There is no effect on runtime performance.
-
-18. Fixed a minor bug in pcretest: if a pattern line was not terminated by a
- newline (only possible for the last line of a file) and it was a
- pattern that set a locale (followed by /Lsomething), pcretest crashed.
-
-19. Added additional timing features to pcretest. (1) The -tm option now times
- matching only, not compiling. (2) Both -t and -tm can be followed, as a
- separate command line item, by a number that specifies the number of
- repeats to use when timing. The default is 50000; this gives better
- precision, but takes uncomfortably long for very large patterns.
-
-20. Extended pcre_study() to be more clever in cases where a branch of a
- subpattern has no definite first character. For example, (a*|b*)[cd] would
- previously give no result from pcre_study(). Now it recognizes that the
- first character must be a, b, c, or d.
-
-21. There was an incorrect error "recursive call could loop indefinitely" if
- a subpattern (or the entire pattern) that was being tested for matching an
- empty string contained only one non-empty item after a nested subpattern.
- For example, the pattern (?>\x{100}*)\d(?R) provoked this error
- incorrectly, because the \d was being skipped in the check.
-
-22. The pcretest program now has a new pattern option /B and a command line
- option -b, which is equivalent to adding /B to every pattern. This causes
- it to show the compiled bytecode, without the additional information that
- -d shows. The effect of -d is now the same as -b with -i (and similarly, /D
- is the same as /B/I).
-
-23. A new optimization is now able automatically to treat some sequences such
- as a*b as a*+b. More specifically, if something simple (such as a character
- or a simple class like \d) has an unlimited quantifier, and is followed by
- something that cannot possibly match the quantified thing, the quantifier
- is automatically "possessified".
-
-24. A recursive reference to a subpattern whose number was greater than 39
- went wrong under certain circumstances in UTF-8 mode. This bug could also
- have affected the operation of pcre_study().
-
-25. Realized that a little bit of performance could be had by replacing
- (c & 0xc0) == 0xc0 with c >= 0xc0 when processing UTF-8 characters.
-
-26. Timing data from pcretest is now shown to 4 decimal places instead of 3.
-
-27. Possessive quantifiers such as a++ were previously implemented by turning
- them into atomic groups such as ($>a+). Now they have their own opcodes,
- which improves performance. This includes the automatically created ones
- from 23 above.
-
-28. A pattern such as (?=(\w+))\1: which simulates an atomic group using a
- lookahead was broken if it was not anchored. PCRE was mistakenly expecting
- the first matched character to be a colon. This applied both to named and
- numbered groups.
-
-29. The ucpinternal.h header file was missing its idempotency #ifdef.
-
-30. I was sent a "project" file called libpcre.a.dev which I understand makes
- building PCRE on Windows easier, so I have included it in the distribution.
-
-31. There is now a check in pcretest against a ridiculously large number being
- returned by pcre_exec() or pcre_dfa_exec(). If this happens in a /g or /G
- loop, the loop is abandoned.
-
-32. Forward references to subpatterns in conditions such as (?(2)...) where
- subpattern 2 is defined later cause pcre_compile() to search forwards in
- the pattern for the relevant set of parentheses. This search went wrong
- when there were unescaped parentheses in a character class, parentheses
- escaped with \Q...\E, or parentheses in a #-comment in /x mode.
-
-33. "Subroutine" calls and backreferences were previously restricted to
- referencing subpatterns earlier in the regex. This restriction has now
- been removed.
-
-34. Added a number of extra features that are going to be in Perl 5.10. On the
- whole, these are just syntactic alternatives for features that PCRE had
- previously implemented using the Python syntax or my own invention. The
- other formats are all retained for compatibility.
-
- (a) Named groups can now be defined as (?<name>...) or (?'name'...) as well
- as (?P<name>...). The new forms, as well as being in Perl 5.10, are
- also .NET compatible.
-
- (b) A recursion or subroutine call to a named group can now be defined as
- (?&name) as well as (?P>name).
-
- (c) A backreference to a named group can now be defined as \k<name> or
- \k'name' as well as (?P=name). The new forms, as well as being in Perl
- 5.10, are also .NET compatible.
-
- (d) A conditional reference to a named group can now use the syntax
- (?(<name>) or (?('name') as well as (?(name).
-
- (e) A "conditional group" of the form (?(DEFINE)...) can be used to define
- groups (named and numbered) that are never evaluated inline, but can be
- called as "subroutines" from elsewhere. In effect, the DEFINE condition
- is always false. There may be only one alternative in such a group.
-
- (f) A test for recursion can be given as (?(R1).. or (?(R&name)... as well
- as the simple (?(R). The condition is true only if the most recent
- recursion is that of the given number or name. It does not search out
- through the entire recursion stack.
-
- (g) The escape \gN or \g{N} has been added, where N is a positive or
- negative number, specifying an absolute or relative reference.
-
-35. Tidied to get rid of some further signed/unsigned compiler warnings and
- some "unreachable code" warnings.
-
-36. Updated the Unicode property tables to Unicode version 5.0.0. Amongst other
- things, this adds five new scripts.
-
-37. Perl ignores orphaned \E escapes completely. PCRE now does the same.
- There were also incompatibilities regarding the handling of \Q..\E inside
- character classes, for example with patterns like [\Qa\E-\Qz\E] where the
- hyphen was adjacent to \Q or \E. I hope I've cleared all this up now.
-
-38. Like Perl, PCRE detects when an indefinitely repeated parenthesized group
- matches an empty string, and forcibly breaks the loop. There were bugs in
- this code in non-simple cases. For a pattern such as ^(a()*)* matched
- against aaaa the result was just "a" rather than "aaaa", for example. Two
- separate and independent bugs (that affected different cases) have been
- fixed.
-
-39. Refactored the code to abolish the use of different opcodes for small
- capturing bracket numbers. This is a tidy that I avoided doing when I
- removed the limit on the number of capturing brackets for 3.5 back in 2001.
- The new approach is not only tidier, it makes it possible to reduce the
- memory needed to fix the previous bug (38).
-
-40. Implemented PCRE_NEWLINE_ANY to recognize any of the Unicode newline
- sequences (http://unicode.org/unicode/reports/tr18/) as "newline" when
- processing dot, circumflex, or dollar metacharacters, or #-comments in /x
- mode.
-
-41. Add \R to match any Unicode newline sequence, as suggested in the Unicode
- report.
-
-42. Applied patch, originally from Ari Pollak, modified by Google, to allow
- copy construction and assignment in the C++ wrapper.
-
-43. Updated pcregrep to support "--newline=any". In the process, I fixed a
- couple of bugs that could have given wrong results in the "--newline=crlf"
- case.
-
-44. Added a number of casts and did some reorganization of signed/unsigned int
- variables following suggestions from Dair Grant. Also renamed the variable
- "this" as "item" because it is a C++ keyword.
-
-45. Arranged for dftables to add
-
- #include "pcre_internal.h"
-
- to pcre_chartables.c because without it, gcc 4.x may remove the array
- definition from the final binary if PCRE is built into a static library and
- dead code stripping is activated.
-
-46. For an unanchored pattern, if a match attempt fails at the start of a
- newline sequence, and the newline setting is CRLF or ANY, and the next two
- characters are CRLF, advance by two characters instead of one.
-
-
-Version 6.7 04-Jul-06
----------------------
-
- 1. In order to handle tests when input lines are enormously long, pcretest has
- been re-factored so that it automatically extends its buffers when
- necessary. The code is crude, but this _is_ just a test program. The
- default size has been increased from 32K to 50K.
-
- 2. The code in pcre_study() was using the value of the re argument before
- testing it for NULL. (Of course, in any sensible call of the function, it
- won't be NULL.)
-
- 3. The memmove() emulation function in pcre_internal.h, which is used on
- systems that lack both memmove() and bcopy() - that is, hardly ever -
- was missing a "static" storage class specifier.
-
- 4. When UTF-8 mode was not set, PCRE looped when compiling certain patterns
- containing an extended class (one that cannot be represented by a bitmap
- because it contains high-valued characters or Unicode property items, e.g.
- [\pZ]). Almost always one would set UTF-8 mode when processing such a
- pattern, but PCRE should not loop if you do not (it no longer does).
- [Detail: two cases were found: (a) a repeated subpattern containing an
- extended class; (b) a recursive reference to a subpattern that followed a
- previous extended class. It wasn't skipping over the extended class
- correctly when UTF-8 mode was not set.]
-
- 5. A negated single-character class was not being recognized as fixed-length
- in lookbehind assertions such as (?<=[^f]), leading to an incorrect
- compile error "lookbehind assertion is not fixed length".
-
- 6. The RunPerlTest auxiliary script was showing an unexpected difference
- between PCRE and Perl for UTF-8 tests. It turns out that it is hard to
- write a Perl script that can interpret lines of an input file either as
- byte characters or as UTF-8, which is what "perltest" was being required to
- do for the non-UTF-8 and UTF-8 tests, respectively. Essentially what you
- can't do is switch easily at run time between having the "use utf8;" pragma
- or not. In the end, I fudged it by using the RunPerlTest script to insert
- "use utf8;" explicitly for the UTF-8 tests.
-
- 7. In multiline (/m) mode, PCRE was matching ^ after a terminating newline at
- the end of the subject string, contrary to the documentation and to what
- Perl does. This was true of both matching functions. Now it matches only at
- the start of the subject and immediately after *internal* newlines.
-
- 8. A call of pcre_fullinfo() from pcretest to get the option bits was passing
- a pointer to an int instead of a pointer to an unsigned long int. This
- caused problems on 64-bit systems.
-
- 9. Applied a patch from the folks at Google to pcrecpp.cc, to fix "another
- instance of the 'standard' template library not being so standard".
-
-10. There was no check on the number of named subpatterns nor the maximum
- length of a subpattern name. The product of these values is used to compute
- the size of the memory block for a compiled pattern. By supplying a very
- long subpattern name and a large number of named subpatterns, the size
- computation could be caused to overflow. This is now prevented by limiting
- the length of names to 32 characters, and the number of named subpatterns
- to 10,000.
-
-11. Subpatterns that are repeated with specific counts have to be replicated in
- the compiled pattern. The size of memory for this was computed from the
- length of the subpattern and the repeat count. The latter is limited to
- 65535, but there was no limit on the former, meaning that integer overflow
- could in principle occur. The compiled length of a repeated subpattern is
- now limited to 30,000 bytes in order to prevent this.
-
-12. Added the optional facility to have named substrings with the same name.
-
-13. Added the ability to use a named substring as a condition, using the
- Python syntax: (?(name)yes|no). This overloads (?(R)... and names that
- are numbers (not recommended). Forward references are permitted.
-
-14. Added forward references in named backreferences (if you see what I mean).
-
-15. In UTF-8 mode, with the PCRE_DOTALL option set, a quantified dot in the
- pattern could run off the end of the subject. For example, the pattern
- "(?s)(.{1,5})"8 did this with the subject "ab".
-
-16. If PCRE_DOTALL or PCRE_MULTILINE were set, pcre_dfa_exec() behaved as if
- PCRE_CASELESS was set when matching characters that were quantified with ?
- or *.
-
-17. A character class other than a single negated character that had a minimum
- but no maximum quantifier - for example [ab]{6,} - was not handled
- correctly by pce_dfa_exec(). It would match only one character.
-
-18. A valid (though odd) pattern that looked like a POSIX character
- class but used an invalid character after [ (for example [[,abc,]]) caused
- pcre_compile() to give the error "Failed: internal error: code overflow" or
- in some cases to crash with a glibc free() error. This could even happen if
- the pattern terminated after [[ but there just happened to be a sequence of
- letters, a binary zero, and a closing ] in the memory that followed.
-
-19. Perl's treatment of octal escapes in the range \400 to \777 has changed
- over the years. Originally (before any Unicode support), just the bottom 8
- bits were taken. Thus, for example, \500 really meant \100. Nowadays the
- output from "man perlunicode" includes this:
-
- The regular expression compiler produces polymorphic opcodes. That
- is, the pattern adapts to the data and automatically switches to
- the Unicode character scheme when presented with Unicode data--or
- instead uses a traditional byte scheme when presented with byte
- data.
-
- Sadly, a wide octal escape does not cause a switch, and in a string with
- no other multibyte characters, these octal escapes are treated as before.
- Thus, in Perl, the pattern /\500/ actually matches \100 but the pattern
- /\500|\x{1ff}/ matches \500 or \777 because the whole thing is treated as a
- Unicode string.
-
- I have not perpetrated such confusion in PCRE. Up till now, it took just
- the bottom 8 bits, as in old Perl. I have now made octal escapes with
- values greater than \377 illegal in non-UTF-8 mode. In UTF-8 mode they
- translate to the appropriate multibyte character.
-
-29. Applied some refactoring to reduce the number of warnings from Microsoft
- and Borland compilers. This has included removing the fudge introduced
- seven years ago for the OS/2 compiler (see 2.02/2 below) because it caused
- a warning about an unused variable.
-
-21. PCRE has not included VT (character 0x0b) in the set of whitespace
- characters since release 4.0, because Perl (from release 5.004) does not.
- [Or at least, is documented not to: some releases seem to be in conflict
- with the documentation.] However, when a pattern was studied with
- pcre_study() and all its branches started with \s, PCRE still included VT
- as a possible starting character. Of course, this did no harm; it just
- caused an unnecessary match attempt.
-
-22. Removed a now-redundant internal flag bit that recorded the fact that case
- dependency changed within the pattern. This was once needed for "required
- byte" processing, but is no longer used. This recovers a now-scarce options
- bit. Also moved the least significant internal flag bit to the most-
- significant bit of the word, which was not previously used (hangover from
- the days when it was an int rather than a uint) to free up another bit for
- the future.
-
-23. Added support for CRLF line endings as well as CR and LF. As well as the
- default being selectable at build time, it can now be changed at runtime
- via the PCRE_NEWLINE_xxx flags. There are now options for pcregrep to
- specify that it is scanning data with non-default line endings.
-
-24. Changed the definition of CXXLINK to make it agree with the definition of
- LINK in the Makefile, by replacing LDFLAGS to CXXFLAGS.
-
-25. Applied Ian Taylor's patches to avoid using another stack frame for tail
- recursions. This makes a big different to stack usage for some patterns.
-
-26. If a subpattern containing a named recursion or subroutine reference such
- as (?P>B) was quantified, for example (xxx(?P>B)){3}, the calculation of
- the space required for the compiled pattern went wrong and gave too small a
- value. Depending on the environment, this could lead to "Failed: internal
- error: code overflow at offset 49" or "glibc detected double free or
- corruption" errors.
-
-27. Applied patches from Google (a) to support the new newline modes and (b) to
- advance over multibyte UTF-8 characters in GlobalReplace.
-
-28. Change free() to pcre_free() in pcredemo.c. Apparently this makes a
- difference for some implementation of PCRE in some Windows version.
-
-29. Added some extra testing facilities to pcretest:
-
- \q<number> in a data line sets the "match limit" value
- \Q<number> in a data line sets the "match recursion limt" value
- -S <number> sets the stack size, where <number> is in megabytes
-
- The -S option isn't available for Windows.
-
-
-Version 6.6 06-Feb-06
----------------------
-
- 1. Change 16(a) for 6.5 broke things, because PCRE_DATA_SCOPE was not defined
- in pcreposix.h. I have copied the definition from pcre.h.
-
- 2. Change 25 for 6.5 broke compilation in a build directory out-of-tree
- because pcre.h is no longer a built file.
-
- 3. Added Jeff Friedl's additional debugging patches to pcregrep. These are
- not normally included in the compiled code.
-
-
-Version 6.5 01-Feb-06
----------------------
-
- 1. When using the partial match feature with pcre_dfa_exec(), it was not
- anchoring the second and subsequent partial matches at the new starting
- point. This could lead to incorrect results. For example, with the pattern
- /1234/, partially matching against "123" and then "a4" gave a match.
-
- 2. Changes to pcregrep:
-
- (a) All non-match returns from pcre_exec() were being treated as failures
- to match the line. Now, unless the error is PCRE_ERROR_NOMATCH, an
- error message is output. Some extra information is given for the
- PCRE_ERROR_MATCHLIMIT and PCRE_ERROR_RECURSIONLIMIT errors, which are
- probably the only errors that are likely to be caused by users (by
- specifying a regex that has nested indefinite repeats, for instance).
- If there are more than 20 of these errors, pcregrep is abandoned.
-
- (b) A binary zero was treated as data while matching, but terminated the
- output line if it was written out. This has been fixed: binary zeroes
- are now no different to any other data bytes.
-
- (c) Whichever of the LC_ALL or LC_CTYPE environment variables is set is
- used to set a locale for matching. The --locale=xxxx long option has
- been added (no short equivalent) to specify a locale explicitly on the
- pcregrep command, overriding the environment variables.
-
- (d) When -B was used with -n, some line numbers in the output were one less
- than they should have been.
-
- (e) Added the -o (--only-matching) option.
-
- (f) If -A or -C was used with -c (count only), some lines of context were
- accidentally printed for the final match.
-
- (g) Added the -H (--with-filename) option.
-
- (h) The combination of options -rh failed to suppress file names for files
- that were found from directory arguments.
-
- (i) Added the -D (--devices) and -d (--directories) options.
-
- (j) Added the -F (--fixed-strings) option.
-
- (k) Allow "-" to be used as a file name for -f as well as for a data file.
-
- (l) Added the --colo(u)r option.
-
- (m) Added Jeffrey Friedl's -S testing option, but within #ifdefs so that it
- is not present by default.
-
- 3. A nasty bug was discovered in the handling of recursive patterns, that is,
- items such as (?R) or (?1), when the recursion could match a number of
- alternatives. If it matched one of the alternatives, but subsequently,
- outside the recursion, there was a failure, the code tried to back up into
- the recursion. However, because of the way PCRE is implemented, this is not
- possible, and the result was an incorrect result from the match.
-
- In order to prevent this happening, the specification of recursion has
- been changed so that all such subpatterns are automatically treated as
- atomic groups. Thus, for example, (?R) is treated as if it were (?>(?R)).
-
- 4. I had overlooked the fact that, in some locales, there are characters for
- which isalpha() is true but neither isupper() nor islower() are true. In
- the fr_FR locale, for instance, the \xAA and \xBA characters (ordmasculine
- and ordfeminine) are like this. This affected the treatment of \w and \W
- when they appeared in character classes, but not when they appeared outside
- a character class. The bit map for "word" characters is now created
- separately from the results of isalnum() instead of just taking it from the
- upper, lower, and digit maps. (Plus the underscore character, of course.)
-
- 5. The above bug also affected the handling of POSIX character classes such as
- [[:alpha:]] and [[:alnum:]]. These do not have their own bit maps in PCRE's
- permanent tables. Instead, the bit maps for such a class were previously
- created as the appropriate unions of the upper, lower, and digit bitmaps.
- Now they are created by subtraction from the [[:word:]] class, which has
- its own bitmap.
-
- 6. The [[:blank:]] character class matches horizontal, but not vertical space.
- It is created by subtracting the vertical space characters (\x09, \x0a,
- \x0b, \x0c) from the [[:space:]] bitmap. Previously, however, the
- subtraction was done in the overall bitmap for a character class, meaning
- that a class such as [\x0c[:blank:]] was incorrect because \x0c would not
- be recognized. This bug has been fixed.
-
- 7. Patches from the folks at Google:
-
- (a) pcrecpp.cc: "to handle a corner case that may or may not happen in
- real life, but is still worth protecting against".
-
- (b) pcrecpp.cc: "corrects a bug when negative radixes are used with
- regular expressions".
-
- (c) pcre_scanner.cc: avoid use of std::count() because not all systems
- have it.
-
- (d) Split off pcrecpparg.h from pcrecpp.h and had the former built by
- "configure" and the latter not, in order to fix a problem somebody had
- with compiling the Arg class on HP-UX.
-
- (e) Improve the error-handling of the C++ wrapper a little bit.
-
- (f) New tests for checking recursion limiting.
-
- 8. The pcre_memmove() function, which is used only if the environment does not
- have a standard memmove() function (and is therefore rarely compiled),
- contained two bugs: (a) use of int instead of size_t, and (b) it was not
- returning a result (though PCRE never actually uses the result).
-
- 9. In the POSIX regexec() interface, if nmatch is specified as a ridiculously
- large number - greater than INT_MAX/(3*sizeof(int)) - REG_ESPACE is
- returned instead of calling malloc() with an overflowing number that would
- most likely cause subsequent chaos.
-
-10. The debugging option of pcretest was not showing the NO_AUTO_CAPTURE flag.
-
-11. The POSIX flag REG_NOSUB is now supported. When a pattern that was compiled
- with this option is matched, the nmatch and pmatch options of regexec() are
- ignored.
-
-12. Added REG_UTF8 to the POSIX interface. This is not defined by POSIX, but is
- provided in case anyone wants to the the POSIX interface with UTF-8
- strings.
-
-13. Added CXXLDFLAGS to the Makefile parameters to provide settings only on the
- C++ linking (needed for some HP-UX environments).
-
-14. Avoid compiler warnings in get_ucpname() when compiled without UCP support
- (unused parameter) and in the pcre_printint() function (omitted "default"
- switch label when the default is to do nothing).
-
-15. Added some code to make it possible, when PCRE is compiled as a C++
- library, to replace subject pointers for pcre_exec() with a smart pointer
- class, thus making it possible to process discontinuous strings.
-
-16. The two macros PCRE_EXPORT and PCRE_DATA_SCOPE are confusing, and perform
- much the same function. They were added by different people who were trying
- to make PCRE easy to compile on non-Unix systems. It has been suggested
- that PCRE_EXPORT be abolished now that there is more automatic apparatus
- for compiling on Windows systems. I have therefore replaced it with
- PCRE_DATA_SCOPE. This is set automatically for Windows; if not set it
- defaults to "extern" for C or "extern C" for C++, which works fine on
- Unix-like systems. It is now possible to override the value of PCRE_DATA_
- SCOPE with something explicit in config.h. In addition:
-
- (a) pcreposix.h still had just "extern" instead of either of these macros;
- I have replaced it with PCRE_DATA_SCOPE.
-
- (b) Functions such as _pcre_xclass(), which are internal to the library,
- but external in the C sense, all had PCRE_EXPORT in their definitions.
- This is apparently wrong for the Windows case, so I have removed it.
- (It makes no difference on Unix-like systems.)
-
-17. Added a new limit, MATCH_LIMIT_RECURSION, which limits the depth of nesting
- of recursive calls to match(). This is different to MATCH_LIMIT because
- that limits the total number of calls to match(), not all of which increase
- the depth of recursion. Limiting the recursion depth limits the amount of
- stack (or heap if NO_RECURSE is set) that is used. The default can be set
- when PCRE is compiled, and changed at run time. A patch from Google adds
- this functionality to the C++ interface.
-
-18. Changes to the handling of Unicode character properties:
-
- (a) Updated the table to Unicode 4.1.0.
-
- (b) Recognize characters that are not in the table as "Cn" (undefined).
-
- (c) I revised the way the table is implemented to a much improved format
- which includes recognition of ranges. It now supports the ranges that
- are defined in UnicodeData.txt, and it also amalgamates other
- characters into ranges. This has reduced the number of entries in the
- table from around 16,000 to around 3,000, thus reducing its size
- considerably. I realized I did not need to use a tree structure after
- all - a binary chop search is just as efficient. Having reduced the
- number of entries, I extended their size from 6 bytes to 8 bytes to
- allow for more data.
-
- (d) Added support for Unicode script names via properties such as \p{Han}.
-
-19. In UTF-8 mode, a backslash followed by a non-Ascii character was not
- matching that character.
-
-20. When matching a repeated Unicode property with a minimum greater than zero,
- (for example \pL{2,}), PCRE could look past the end of the subject if it
- reached it while seeking the minimum number of characters. This could
- happen only if some of the characters were more than one byte long, because
- there is a check for at least the minimum number of bytes.
-
-21. Refactored the implementation of \p and \P so as to be more general, to
- allow for more different types of property in future. This has changed the
- compiled form incompatibly. Anybody with saved compiled patterns that use
- \p or \P will have to recompile them.
-
-22. Added "Any" and "L&" to the supported property types.
-
-23. Recognize \x{...} as a code point specifier, even when not in UTF-8 mode,
- but give a compile time error if the value is greater than 0xff.
-
-24. The man pages for pcrepartial, pcreprecompile, and pcre_compile2 were
- accidentally not being installed or uninstalled.
-
-25. The pcre.h file was built from pcre.h.in, but the only changes that were
- made were to insert the current release number. This seemed silly, because
- it made things harder for people building PCRE on systems that don't run
- "configure". I have turned pcre.h into a distributed file, no longer built
- by "configure", with the version identification directly included. There is
- no longer a pcre.h.in file.
-
- However, this change necessitated a change to the pcre-config script as
- well. It is built from pcre-config.in, and one of the substitutions was the
- release number. I have updated configure.ac so that ./configure now finds
- the release number by grepping pcre.h.
-
-26. Added the ability to run the tests under valgrind.
-
-
-Version 6.4 05-Sep-05
----------------------
-
- 1. Change 6.0/10/(l) to pcregrep introduced a bug that caused separator lines
- "--" to be printed when multiple files were scanned, even when none of the
- -A, -B, or -C options were used. This is not compatible with Gnu grep, so I
- consider it to be a bug, and have restored the previous behaviour.
-
- 2. A couple of code tidies to get rid of compiler warnings.
-
- 3. The pcretest program used to cheat by referring to symbols in the library
- whose names begin with _pcre_. These are internal symbols that are not
- really supposed to be visible externally, and in some environments it is
- possible to suppress them. The cheating is now confined to including
- certain files from the library's source, which is a bit cleaner.
-
- 4. Renamed pcre.in as pcre.h.in to go with pcrecpp.h.in; it also makes the
- file's purpose clearer.
-
- 5. Reorganized pcre_ucp_findchar().
-
-
-Version 6.3 15-Aug-05
----------------------
-
- 1. The file libpcre.pc.in did not have general read permission in the tarball.
-
- 2. There were some problems when building without C++ support:
-
- (a) If C++ support was not built, "make install" and "make test" still
- tried to test it.
-
- (b) There were problems when the value of CXX was explicitly set. Some
- changes have been made to try to fix these, and ...
-
- (c) --disable-cpp can now be used to explicitly disable C++ support.
-
- (d) The use of @CPP_OBJ@ directly caused a blank line preceded by a
- backslash in a target when C++ was disabled. This confuses some
- versions of "make", apparently. Using an intermediate variable solves
- this. (Same for CPP_LOBJ.)
-
- 3. $(LINK_FOR_BUILD) now includes $(CFLAGS_FOR_BUILD) and $(LINK)
- (non-Windows) now includes $(CFLAGS) because these flags are sometimes
- necessary on certain architectures.
-
- 4. Added a setting of -export-symbols-regex to the link command to remove
- those symbols that are exported in the C sense, but actually are local
- within the library, and not documented. Their names all begin with
- "_pcre_". This is not a perfect job, because (a) we have to except some
- symbols that pcretest ("illegally") uses, and (b) the facility isn't always
- available (and never for static libraries). I have made a note to try to
- find a way round (a) in the future.
-
-
-Version 6.2 01-Aug-05
----------------------
-
- 1. There was no test for integer overflow of quantifier values. A construction
- such as {1111111111111111} would give undefined results. What is worse, if
- a minimum quantifier for a parenthesized subpattern overflowed and became
- negative, the calculation of the memory size went wrong. This could have
- led to memory overwriting.
-
- 2. Building PCRE using VPATH was broken. Hopefully it is now fixed.
-
- 3. Added "b" to the 2nd argument of fopen() in dftables.c, for non-Unix-like
- operating environments where this matters.
-
- 4. Applied Giuseppe Maxia's patch to add additional features for controlling
- PCRE options from within the C++ wrapper.
-
- 5. Named capturing subpatterns were not being correctly counted when a pattern
- was compiled. This caused two problems: (a) If there were more than 100
- such subpatterns, the calculation of the memory needed for the whole
- compiled pattern went wrong, leading to an overflow error. (b) Numerical
- back references of the form \12, where the number was greater than 9, were
- not recognized as back references, even though there were sufficient
- previous subpatterns.
-
- 6. Two minor patches to pcrecpp.cc in order to allow it to compile on older
- versions of gcc, e.g. 2.95.4.
-
-
-Version 6.1 21-Jun-05
----------------------
-
- 1. There was one reference to the variable "posix" in pcretest.c that was not
- surrounded by "#if !defined NOPOSIX".
-
- 2. Make it possible to compile pcretest without DFA support, UTF8 support, or
- the cross-check on the old pcre_info() function, for the benefit of the
- cut-down version of PCRE that is currently imported into Exim.
-
- 3. A (silly) pattern starting with (?i)(?-i) caused an internal space
- allocation error. I've done the easy fix, which wastes 2 bytes for sensible
- patterns that start (?i) but I don't think that matters. The use of (?i) is
- just an example; this all applies to the other options as well.
-
- 4. Since libtool seems to echo the compile commands it is issuing, the output
- from "make" can be reduced a bit by putting "@" in front of each libtool
- compile command.
-
- 5. Patch from the folks at Google for configure.in to be a bit more thorough
- in checking for a suitable C++ installation before trying to compile the
- C++ stuff. This should fix a reported problem when a compiler was present,
- but no suitable headers.
-
- 6. The man pages all had just "PCRE" as their title. I have changed them to
- be the relevant file name. I have also arranged that these names are
- retained in the file doc/pcre.txt, which is a concatenation in text format
- of all the man pages except the little individual ones for each function.
-
- 7. The NON-UNIX-USE file had not been updated for the different set of source
- files that come with release 6. I also added a few comments about the C++
- wrapper.
-
-
-Version 6.0 07-Jun-05
----------------------
-
- 1. Some minor internal re-organization to help with my DFA experiments.
-
- 2. Some missing #ifdef SUPPORT_UCP conditionals in pcretest and printint that
- didn't matter for the library itself when fully configured, but did matter
- when compiling without UCP support, or within Exim, where the ucp files are
- not imported.
-
- 3. Refactoring of the library code to split up the various functions into
- different source modules. The addition of the new DFA matching code (see
- below) to a single monolithic source would have made it really too
- unwieldy, quite apart from causing all the code to be include in a
- statically linked application, when only some functions are used. This is
- relevant even without the DFA addition now that patterns can be compiled in
- one application and matched in another.
-
- The downside of splitting up is that there have to be some external
- functions and data tables that are used internally in different modules of
- the library but which are not part of the API. These have all had their
- names changed to start with "_pcre_" so that they are unlikely to clash
- with other external names.
-
- 4. Added an alternate matching function, pcre_dfa_exec(), which matches using
- a different (DFA) algorithm. Although it is slower than the original
- function, it does have some advantages for certain types of matching
- problem.
-
- 5. Upgrades to pcretest in order to test the features of pcre_dfa_exec(),
- including restarting after a partial match.
-
- 6. A patch for pcregrep that defines INVALID_FILE_ATTRIBUTES if it is not
- defined when compiling for Windows was sent to me. I have put it into the
- code, though I have no means of testing or verifying it.
-
- 7. Added the pcre_refcount() auxiliary function.
-
- 8. Added the PCRE_FIRSTLINE option. This constrains an unanchored pattern to
- match before or at the first newline in the subject string. In pcretest,
- the /f option on a pattern can be used to set this.
-
- 9. A repeated \w when used in UTF-8 mode with characters greater than 256
- would behave wrongly. This has been present in PCRE since release 4.0.
-
-10. A number of changes to the pcregrep command:
-
- (a) Refactored how -x works; insert ^(...)$ instead of setting
- PCRE_ANCHORED and checking the length, in preparation for adding
- something similar for -w.
-
- (b) Added the -w (match as a word) option.
-
- (c) Refactored the way lines are read and buffered so as to have more
- than one at a time available.
-
- (d) Implemented a pcregrep test script.
-
- (e) Added the -M (multiline match) option. This allows patterns to match
- over several lines of the subject. The buffering ensures that at least
- 8K, or the rest of the document (whichever is the shorter) is available
- for matching (and similarly the previous 8K for lookbehind assertions).
-
- (f) Changed the --help output so that it now says
-
- -w, --word-regex(p)
-
- instead of two lines, one with "regex" and the other with "regexp"
- because that confused at least one person since the short forms are the
- same. (This required a bit of code, as the output is generated
- automatically from a table. It wasn't just a text change.)
-
- (g) -- can be used to terminate pcregrep options if the next thing isn't an
- option but starts with a hyphen. Could be a pattern or a path name
- starting with a hyphen, for instance.
-
- (h) "-" can be given as a file name to represent stdin.
-
- (i) When file names are being printed, "(standard input)" is used for
- the standard input, for compatibility with GNU grep. Previously
- "<stdin>" was used.
-
- (j) The option --label=xxx can be used to supply a name to be used for
- stdin when file names are being printed. There is no short form.
-
- (k) Re-factored the options decoding logic because we are going to add
- two more options that take data. Such options can now be given in four
- different ways, e.g. "-fname", "-f name", "--file=name", "--file name".
-
- (l) Added the -A, -B, and -C options for requesting that lines of context
- around matches be printed.
-
- (m) Added the -L option to print the names of files that do not contain
- any matching lines, that is, the complement of -l.
-
- (n) The return code is 2 if any file cannot be opened, but pcregrep does
- continue to scan other files.
-
- (o) The -s option was incorrectly implemented. For compatibility with other
- greps, it now suppresses the error message for a non-existent or non-
- accessible file (but not the return code). There is a new option called
- -q that suppresses the output of matching lines, which was what -s was
- previously doing.
-
- (p) Added --include and --exclude options to specify files for inclusion
- and exclusion when recursing.
-
-11. The Makefile was not using the Autoconf-supported LDFLAGS macro properly.
- Hopefully, it now does.
-
-12. Missing cast in pcre_study().
-
-13. Added an "uninstall" target to the makefile.
-
-14. Replaced "extern" in the function prototypes in Makefile.in with
- "PCRE_DATA_SCOPE", which defaults to 'extern' or 'extern "C"' in the Unix
- world, but is set differently for Windows.
-
-15. Added a second compiling function called pcre_compile2(). The only
- difference is that it has an extra argument, which is a pointer to an
- integer error code. When there is a compile-time failure, this is set
- non-zero, in addition to the error test pointer being set to point to an
- error message. The new argument may be NULL if no error number is required
- (but then you may as well call pcre_compile(), which is now just a
- wrapper). This facility is provided because some applications need a
- numeric error indication, but it has also enabled me to tidy up the way
- compile-time errors are handled in the POSIX wrapper.
-
-16. Added VPATH=.libs to the makefile; this should help when building with one
- prefix path and installing with another. (Or so I'm told by someone who
- knows more about this stuff than I do.)
-
-17. Added a new option, REG_DOTALL, to the POSIX function regcomp(). This
- passes PCRE_DOTALL to the pcre_compile() function, making the "." character
- match everything, including newlines. This is not POSIX-compatible, but
- somebody wanted the feature. From pcretest it can be activated by using
- both the P and the s flags.
-
-18. AC_PROG_LIBTOOL appeared twice in Makefile.in. Removed one.
-
-19. libpcre.pc was being incorrectly installed as executable.
-
-20. A couple of places in pcretest check for end-of-line by looking for '\n';
- it now also looks for '\r' so that it will work unmodified on Windows.
-
-21. Added Google's contributed C++ wrapper to the distribution.
-
-22. Added some untidy missing memory free() calls in pcretest, to keep
- Electric Fence happy when testing.
-
-
-
-Version 5.0 13-Sep-04
----------------------
-
- 1. Internal change: literal characters are no longer packed up into items
- containing multiple characters in a single byte-string. Each character
- is now matched using a separate opcode. However, there may be more than one
- byte in the character in UTF-8 mode.
-
- 2. The pcre_callout_block structure has two new fields: pattern_position and
- next_item_length. These contain the offset in the pattern to the next match
- item, and its length, respectively.
-
- 3. The PCRE_AUTO_CALLOUT option for pcre_compile() requests the automatic
- insertion of callouts before each pattern item. Added the /C option to
- pcretest to make use of this.
-
- 4. On the advice of a Windows user, the lines
-
- #if defined(_WIN32) || defined(WIN32)
- _setmode( _fileno( stdout ), 0x8000 );
- #endif /* defined(_WIN32) || defined(WIN32) */
-
- have been added to the source of pcretest. This apparently does useful
- magic in relation to line terminators.
-
- 5. Changed "r" and "w" in the calls to fopen() in pcretest to "rb" and "wb"
- for the benefit of those environments where the "b" makes a difference.
-
- 6. The icc compiler has the same options as gcc, but "configure" doesn't seem
- to know about it. I have put a hack into configure.in that adds in code
- to set GCC=yes if CC=icc. This seems to end up at a point in the
- generated configure script that is early enough to affect the setting of
- compiler options, which is what is needed, but I have no means of testing
- whether it really works. (The user who reported this had patched the
- generated configure script, which of course I cannot do.)
-
- LATER: After change 22 below (new libtool files), the configure script
- seems to know about icc (and also ecc). Therefore, I have commented out
- this hack in configure.in.
-
- 7. Added support for pkg-config (2 patches were sent in).
-
- 8. Negated POSIX character classes that used a combination of internal tables
- were completely broken. These were [[:^alpha:]], [[:^alnum:]], and
- [[:^ascii]]. Typically, they would match almost any characters. The other
- POSIX classes were not broken in this way.
-
- 9. Matching the pattern "\b.*?" against "ab cd", starting at offset 1, failed
- to find the match, as PCRE was deluded into thinking that the match had to
- start at the start point or following a newline. The same bug applied to
- patterns with negative forward assertions or any backward assertions
- preceding ".*" at the start, unless the pattern required a fixed first
- character. This was a failing pattern: "(?!.bcd).*". The bug is now fixed.
-
-10. In UTF-8 mode, when moving forwards in the subject after a failed match
- starting at the last subject character, bytes beyond the end of the subject
- string were read.
-
-11. Renamed the variable "class" as "classbits" to make life easier for C++
- users. (Previously there was a macro definition, but it apparently wasn't
- enough.)
-
-12. Added the new field "tables" to the extra data so that tables can be passed
- in at exec time, or the internal tables can be re-selected. This allows
- a compiled regex to be saved and re-used at a later time by a different
- program that might have everything at different addresses.
-
-13. Modified the pcre-config script so that, when run on Solaris, it shows a
- -R library as well as a -L library.
-
-14. The debugging options of pcretest (-d on the command line or D on a
- pattern) showed incorrect output for anything following an extended class
- that contained multibyte characters and which was followed by a quantifier.
-
-15. Added optional support for general category Unicode character properties
- via the \p, \P, and \X escapes. Unicode property support implies UTF-8
- support. It adds about 90K to the size of the library. The meanings of the
- inbuilt class escapes such as \d and \s have NOT been changed.
-
-16. Updated pcredemo.c to include calls to free() to release the memory for the
- compiled pattern.
-
-17. The generated file chartables.c was being created in the source directory
- instead of in the building directory. This caused the build to fail if the
- source directory was different from the building directory, and was
- read-only.
-
-18. Added some sample Win commands from Mark Tetrode into the NON-UNIX-USE
- file. No doubt somebody will tell me if they don't make sense... Also added
- Dan Mooney's comments about building on OpenVMS.
-
-19. Added support for partial matching via the PCRE_PARTIAL option for
- pcre_exec() and the \P data escape in pcretest.
-
-20. Extended pcretest with 3 new pattern features:
-
- (i) A pattern option of the form ">rest-of-line" causes pcretest to
- write the compiled pattern to the file whose name is "rest-of-line".
- This is a straight binary dump of the data, with the saved pointer to
- the character tables forced to be NULL. The study data, if any, is
- written too. After writing, pcretest reads a new pattern.
-
- (ii) If, instead of a pattern, "<rest-of-line" is given, pcretest reads a
- compiled pattern from the given file. There must not be any
- occurrences of "<" in the file name (pretty unlikely); if there are,
- pcretest will instead treat the initial "<" as a pattern delimiter.
- After reading in the pattern, pcretest goes on to read data lines as
- usual.
-
- (iii) The F pattern option causes pcretest to flip the bytes in the 32-bit
- and 16-bit fields in a compiled pattern, to simulate a pattern that
- was compiled on a host of opposite endianness.
-
-21. The pcre-exec() function can now cope with patterns that were compiled on
- hosts of opposite endianness, with this restriction:
-
- As for any compiled expression that is saved and used later, the tables
- pointer field cannot be preserved; the extra_data field in the arguments
- to pcre_exec() should be used to pass in a tables address if a value
- other than the default internal tables were used at compile time.
-
-22. Calling pcre_exec() with a negative value of the "ovecsize" parameter is
- now diagnosed as an error. Previously, most of the time, a negative number
- would have been treated as zero, but if in addition "ovector" was passed as
- NULL, a crash could occur.
-
-23. Updated the files ltmain.sh, config.sub, config.guess, and aclocal.m4 with
- new versions from the libtool 1.5 distribution (the last one is a copy of
- a file called libtool.m4). This seems to have fixed the need to patch
- "configure" to support Darwin 1.3 (which I used to do). However, I still
- had to patch ltmain.sh to ensure that ${SED} is set (it isn't on my
- workstation).
-
-24. Changed the PCRE licence to be the more standard "BSD" licence.
-
-
-Version 4.5 01-Dec-03
----------------------
-
- 1. There has been some re-arrangement of the code for the match() function so
- that it can be compiled in a version that does not call itself recursively.
- Instead, it keeps those local variables that need separate instances for
- each "recursion" in a frame on the heap, and gets/frees frames whenever it
- needs to "recurse". Keeping track of where control must go is done by means
- of setjmp/longjmp. The whole thing is implemented by a set of macros that
- hide most of the details from the main code, and operates only if
- NO_RECURSE is defined while compiling pcre.c. If PCRE is built using the
- "configure" mechanism, "--disable-stack-for-recursion" turns on this way of
- operating.
-
- To make it easier for callers to provide specially tailored get/free
- functions for this usage, two new functions, pcre_stack_malloc, and
- pcre_stack_free, are used. They are always called in strict stacking order,
- and the size of block requested is always the same.
-
- The PCRE_CONFIG_STACKRECURSE info parameter can be used to find out whether
- PCRE has been compiled to use the stack or the heap for recursion. The
- -C option of pcretest uses this to show which version is compiled.
-
- A new data escape \S, is added to pcretest; it causes the amounts of store
- obtained and freed by both kinds of malloc/free at match time to be added
- to the output.
-
- 2. Changed the locale test to use "fr_FR" instead of "fr" because that's
- what's available on my current Linux desktop machine.
-
- 3. When matching a UTF-8 string, the test for a valid string at the start has
- been extended. If start_offset is not zero, PCRE now checks that it points
- to a byte that is the start of a UTF-8 character. If not, it returns
- PCRE_ERROR_BADUTF8_OFFSET (-11). Note: the whole string is still checked;
- this is necessary because there may be backward assertions in the pattern.
- When matching the same subject several times, it may save resources to use
- PCRE_NO_UTF8_CHECK on all but the first call if the string is long.
-
- 4. The code for checking the validity of UTF-8 strings has been tightened so
- that it rejects (a) strings containing 0xfe or 0xff bytes and (b) strings
- containing "overlong sequences".
-
- 5. Fixed a bug (appearing twice) that I could not find any way of exploiting!
- I had written "if ((digitab[*p++] && chtab_digit) == 0)" where the "&&"
- should have been "&", but it just so happened that all the cases this let
- through by mistake were picked up later in the function.
-
- 6. I had used a variable called "isblank" - this is a C99 function, causing
- some compilers to warn. To avoid this, I renamed it (as "blankclass").
-
- 7. Cosmetic: (a) only output another newline at the end of pcretest if it is
- prompting; (b) run "./pcretest /dev/null" at the start of the test script
- so the version is shown; (c) stop "make test" echoing "./RunTest".
-
- 8. Added patches from David Burgess to enable PCRE to run on EBCDIC systems.
-
- 9. The prototype for memmove() for systems that don't have it was using
- size_t, but the inclusion of the header that defines size_t was later. I've
- moved the #includes for the C headers earlier to avoid this.
-
-10. Added some adjustments to the code to make it easier to compiler on certain
- special systems:
-
- (a) Some "const" qualifiers were missing.
- (b) Added the macro EXPORT before all exported functions; by default this
- is defined to be empty.
- (c) Changed the dftables auxiliary program (that builds chartables.c) so
- that it reads its output file name as an argument instead of writing
- to the standard output and assuming this can be redirected.
-
-11. In UTF-8 mode, if a recursive reference (e.g. (?1)) followed a character
- class containing characters with values greater than 255, PCRE compilation
- went into a loop.
-
-12. A recursive reference to a subpattern that was within another subpattern
- that had a minimum quantifier of zero caused PCRE to crash. For example,
- (x(y(?2))z)? provoked this bug with a subject that got as far as the
- recursion. If the recursively-called subpattern itself had a zero repeat,
- that was OK.
-
-13. In pcretest, the buffer for reading a data line was set at 30K, but the
- buffer into which it was copied (for escape processing) was still set at
- 1024, so long lines caused crashes.
-
-14. A pattern such as /[ab]{1,3}+/ failed to compile, giving the error
- "internal error: code overflow...". This applied to any character class
- that was followed by a possessive quantifier.
-
-15. Modified the Makefile to add libpcre.la as a prerequisite for
- libpcreposix.la because I was told this is needed for a parallel build to
- work.
-
-16. If a pattern that contained .* following optional items at the start was
- studied, the wrong optimizing data was generated, leading to matching
- errors. For example, studying /[ab]*.*c/ concluded, erroneously, that any
- matching string must start with a or b or c. The correct conclusion for
- this pattern is that a match can start with any character.
-
-
-Version 4.4 13-Aug-03
----------------------
-
- 1. In UTF-8 mode, a character class containing characters with values between
- 127 and 255 was not handled correctly if the compiled pattern was studied.
- In fixing this, I have also improved the studying algorithm for such
- classes (slightly).
-
- 2. Three internal functions had redundant arguments passed to them. Removal
- might give a very teeny performance improvement.
-
- 3. Documentation bug: the value of the capture_top field in a callout is *one
- more than* the number of the hightest numbered captured substring.
-
- 4. The Makefile linked pcretest and pcregrep with -lpcre, which could result
- in incorrectly linking with a previously installed version. They now link
- explicitly with libpcre.la.
-
- 5. configure.in no longer needs to recognize Cygwin specially.
-
- 6. A problem in pcre.in for Windows platforms is fixed.
-
- 7. If a pattern was successfully studied, and the -d (or /D) flag was given to
- pcretest, it used to include the size of the study block as part of its
- output. Unfortunately, the structure contains a field that has a different
- size on different hardware architectures. This meant that the tests that
- showed this size failed. As the block is currently always of a fixed size,
- this information isn't actually particularly useful in pcretest output, so
- I have just removed it.
-
- 8. Three pre-processor statements accidentally did not start in column 1.
- Sadly, there are *still* compilers around that complain, even though
- standard C has not required this for well over a decade. Sigh.
-
- 9. In pcretest, the code for checking callouts passed small integers in the
- callout_data field, which is a void * field. However, some picky compilers
- complained about the casts involved for this on 64-bit systems. Now
- pcretest passes the address of the small integer instead, which should get
- rid of the warnings.
-
-10. By default, when in UTF-8 mode, PCRE now checks for valid UTF-8 strings at
- both compile and run time, and gives an error if an invalid UTF-8 sequence
- is found. There is a option for disabling this check in cases where the
- string is known to be correct and/or the maximum performance is wanted.
-
-11. In response to a bug report, I changed one line in Makefile.in from
-
- -Wl,--out-implib,.libs/lib@WIN_PREFIX@pcreposix.dll.a \
- to
- -Wl,--out-implib,.libs/@WIN_PREFIX@libpcreposix.dll.a \
-
- to look similar to other lines, but I have no way of telling whether this
- is the right thing to do, as I do not use Windows. No doubt I'll get told
- if it's wrong...
-
-
-Version 4.3 21-May-03
----------------------
-
-1. Two instances of @WIN_PREFIX@ omitted from the Windows targets in the
- Makefile.
-
-2. Some refactoring to improve the quality of the code:
-
- (i) The utf8_table... variables are now declared "const".
-
- (ii) The code for \cx, which used the "case flipping" table to upper case
- lower case letters, now just substracts 32. This is ASCII-specific,
- but the whole concept of \cx is ASCII-specific, so it seems
- reasonable.
-
- (iii) PCRE was using its character types table to recognize decimal and
- hexadecimal digits in the pattern. This is silly, because it handles
- only 0-9, a-f, and A-F, but the character types table is locale-
- specific, which means strange things might happen. A private
- table is now used for this - though it costs 256 bytes, a table is
- much faster than multiple explicit tests. Of course, the standard
- character types table is still used for matching digits in subject
- strings against \d.
-
- (iv) Strictly, the identifier ESC_t is reserved by POSIX (all identifiers
- ending in _t are). So I've renamed it as ESC_tee.
-
-3. The first argument for regexec() in the POSIX wrapper should have been
- defined as "const".
-
-4. Changed pcretest to use malloc() for its buffers so that they can be
- Electric Fenced for debugging.
-
-5. There were several places in the code where, in UTF-8 mode, PCRE would try
- to read one or more bytes before the start of the subject string. Often this
- had no effect on PCRE's behaviour, but in some circumstances it could
- provoke a segmentation fault.
-
-6. A lookbehind at the start of a pattern in UTF-8 mode could also cause PCRE
- to try to read one or more bytes before the start of the subject string.
-
-7. A lookbehind in a pattern matched in non-UTF-8 mode on a PCRE compiled with
- UTF-8 support could misbehave in various ways if the subject string
- contained bytes with the 0x80 bit set and the 0x40 bit unset in a lookbehind
- area. (PCRE was not checking for the UTF-8 mode flag, and trying to move
- back over UTF-8 characters.)
-
-
-Version 4.2 14-Apr-03
----------------------
-
-1. Typo "#if SUPPORT_UTF8" instead of "#ifdef SUPPORT_UTF8" fixed.
-
-2. Changes to the building process, supplied by Ronald Landheer-Cieslak
- [ON_WINDOWS]: new variable, "#" on non-Windows platforms
- [NOT_ON_WINDOWS]: new variable, "#" on Windows platforms
- [WIN_PREFIX]: new variable, "cyg" for Cygwin
- * Makefile.in: use autoconf substitution for OBJEXT, EXEEXT, BUILD_OBJEXT
- and BUILD_EXEEXT
- Note: automatic setting of the BUILD variables is not yet working
- set CPPFLAGS and BUILD_CPPFLAGS (but don't use yet) - should be used at
- compile-time but not at link-time
- [LINK]: use for linking executables only
- make different versions for Windows and non-Windows
- [LINKLIB]: new variable, copy of UNIX-style LINK, used for linking
- libraries
- [LINK_FOR_BUILD]: new variable
- [OBJEXT]: use throughout
- [EXEEXT]: use throughout
- <winshared>: new target
- <wininstall>: new target
- <dftables.o>: use native compiler
- <dftables>: use native linker
- <install>: handle Windows platform correctly
- <clean>: ditto
- <check>: ditto
- copy DLL to top builddir before testing
-
- As part of these changes, -no-undefined was removed again. This was reported
- to give trouble on HP-UX 11.0, so getting rid of it seems like a good idea
- in any case.
-
-3. Some tidies to get rid of compiler warnings:
-
- . In the match_data structure, match_limit was an unsigned long int, whereas
- match_call_count was an int. I've made them both unsigned long ints.
-
- . In pcretest the fact that a const uschar * doesn't automatically cast to
- a void * provoked a warning.
-
- . Turning on some more compiler warnings threw up some "shadow" variables
- and a few more missing casts.
-
-4. If PCRE was complied with UTF-8 support, but called without the PCRE_UTF8
- option, a class that contained a single character with a value between 128
- and 255 (e.g. /[\xFF]/) caused PCRE to crash.
-
-5. If PCRE was compiled with UTF-8 support, but called without the PCRE_UTF8
- option, a class that contained several characters, but with at least one
- whose value was between 128 and 255 caused PCRE to crash.
-
-
-Version 4.1 12-Mar-03
----------------------
-
-1. Compiling with gcc -pedantic found a couple of places where casts were
-needed, and a string in dftables.c that was longer than standard compilers are
-required to support.
-
-2. Compiling with Sun's compiler found a few more places where the code could
-be tidied up in order to avoid warnings.
-
-3. The variables for cross-compiling were called HOST_CC and HOST_CFLAGS; the
-first of these names is deprecated in the latest Autoconf in favour of the name
-CC_FOR_BUILD, because "host" is typically used to mean the system on which the
-compiled code will be run. I can't find a reference for HOST_CFLAGS, but by
-analogy I have changed it to CFLAGS_FOR_BUILD.
-
-4. Added -no-undefined to the linking command in the Makefile, because this is
-apparently helpful for Windows. To make it work, also added "-L. -lpcre" to the
-linking step for the pcreposix library.
-
-5. PCRE was failing to diagnose the case of two named groups with the same
-name.
-
-6. A problem with one of PCRE's optimizations was discovered. PCRE remembers a
-literal character that is needed in the subject for a match, and scans along to
-ensure that it is present before embarking on the full matching process. This
-saves time in cases of nested unlimited repeats that are never going to match.
-Problem: the scan can take a lot of time if the subject is very long (e.g.
-megabytes), thus penalizing straightforward matches. It is now done only if the
-amount of subject to be scanned is less than 1000 bytes.
-
-7. A lesser problem with the same optimization is that it was recording the
-first character of an anchored pattern as "needed", thus provoking a search
-right along the subject, even when the first match of the pattern was going to
-fail. The "needed" character is now not set for anchored patterns, unless it
-follows something in the pattern that is of non-fixed length. Thus, it still
-fulfils its original purpose of finding quick non-matches in cases of nested
-unlimited repeats, but isn't used for simple anchored patterns such as /^abc/.
-
-
-Version 4.0 17-Feb-03
----------------------
-
-1. If a comment in an extended regex that started immediately after a meta-item
-extended to the end of string, PCRE compiled incorrect data. This could lead to
-all kinds of weird effects. Example: /#/ was bad; /()#/ was bad; /a#/ was not.
-
-2. Moved to autoconf 2.53 and libtool 1.4.2.
-
-3. Perl 5.8 no longer needs "use utf8" for doing UTF-8 things. Consequently,
-the special perltest8 script is no longer needed - all the tests can be run
-from a single perltest script.
-
-4. From 5.004, Perl has not included the VT character (0x0b) in the set defined
-by \s. It has now been removed in PCRE. This means it isn't recognized as
-whitespace in /x regexes too, which is the same as Perl. Note that the POSIX
-class [:space:] *does* include VT, thereby creating a mess.
-
-5. Added the class [:blank:] (a GNU extension from Perl 5.8) to match only
-space and tab.
-
-6. Perl 5.005 was a long time ago. It's time to amalgamate the tests that use
-its new features into the main test script, reducing the number of scripts.
-
-7. Perl 5.8 has changed the meaning of patterns like /a(?i)b/. Earlier versions
-were backward compatible, and made the (?i) apply to the whole pattern, as if
-/i were given. Now it behaves more logically, and applies the option setting
-only to what follows. PCRE has been changed to follow suit. However, if it
-finds options settings right at the start of the pattern, it extracts them into
-the global options, as before. Thus, they show up in the info data.
-
-8. Added support for the \Q...\E escape sequence. Characters in between are
-treated as literals. This is slightly different from Perl in that $ and @ are
-also handled as literals inside the quotes. In Perl, they will cause variable
-interpolation. Note the following examples:
-
- Pattern PCRE matches Perl matches
-
- \Qabc$xyz\E abc$xyz abc followed by the contents of $xyz
- \Qabc\$xyz\E abc\$xyz abc\$xyz
- \Qabc\E\$\Qxyz\E abc$xyz abc$xyz
-
-For compatibility with Perl, \Q...\E sequences are recognized inside character
-classes as well as outside them.
-
-9. Re-organized 3 code statements in pcretest to avoid "overflow in
-floating-point constant arithmetic" warnings from a Microsoft compiler. Added a
-(size_t) cast to one statement in pcretest and one in pcreposix to avoid
-signed/unsigned warnings.
-
-10. SunOS4 doesn't have strtoul(). This was used only for unpicking the -o
-option for pcretest, so I've replaced it by a simple function that does just
-that job.
-
-11. pcregrep was ending with code 0 instead of 2 for the commands "pcregrep" or
-"pcregrep -".
-
-12. Added "possessive quantifiers" ?+, *+, ++, and {,}+ which come from Sun's
-Java package. This provides some syntactic sugar for simple cases of what my
-documentation calls "once-only subpatterns". A pattern such as x*+ is the same
-as (?>x*). In other words, if what is inside (?>...) is just a single repeated
-item, you can use this simplified notation. Note that only makes sense with
-greedy quantifiers. Consequently, the use of the possessive quantifier forces
-greediness, whatever the setting of the PCRE_UNGREEDY option.
-
-13. A change of greediness default within a pattern was not taking effect at
-the current level for patterns like /(b+(?U)a+)/. It did apply to parenthesized
-subpatterns that followed. Patterns like /b+(?U)a+/ worked because the option
-was abstracted outside.
-
-14. PCRE now supports the \G assertion. It is true when the current matching
-position is at the start point of the match. This differs from \A when the
-starting offset is non-zero. Used with the /g option of pcretest (or similar
-code), it works in the same way as it does for Perl's /g option. If all
-alternatives of a regex begin with \G, the expression is anchored to the start
-match position, and the "anchored" flag is set in the compiled expression.
-
-15. Some bugs concerning the handling of certain option changes within patterns
-have been fixed. These applied to options other than (?ims). For example,
-"a(?x: b c )d" did not match "XabcdY" but did match "Xa b c dY". It should have
-been the other way round. Some of this was related to change 7 above.
-
-16. PCRE now gives errors for /[.x.]/ and /[=x=]/ as unsupported POSIX
-features, as Perl does. Previously, PCRE gave the warnings only for /[[.x.]]/
-and /[[=x=]]/. PCRE now also gives an error for /[:name:]/ because it supports
-POSIX classes only within a class (e.g. /[[:alpha:]]/).
-
-17. Added support for Perl's \C escape. This matches one byte, even in UTF8
-mode. Unlike ".", it always matches newline, whatever the setting of
-PCRE_DOTALL. However, PCRE does not permit \C to appear in lookbehind
-assertions. Perl allows it, but it doesn't (in general) work because it can't
-calculate the length of the lookbehind. At least, that's the case for Perl
-5.8.0 - I've been told they are going to document that it doesn't work in
-future.
-
-18. Added an error diagnosis for escapes that PCRE does not support: these are
-\L, \l, \N, \P, \p, \U, \u, and \X.
-
-19. Although correctly diagnosing a missing ']' in a character class, PCRE was
-reading past the end of the pattern in cases such as /[abcd/.
-
-20. PCRE was getting more memory than necessary for patterns with classes that
-contained both POSIX named classes and other characters, e.g. /[[:space:]abc/.
-
-21. Added some code, conditional on #ifdef VPCOMPAT, to make life easier for
-compiling PCRE for use with Virtual Pascal.
-
-22. Small fix to the Makefile to make it work properly if the build is done
-outside the source tree.
-
-23. Added a new extension: a condition to go with recursion. If a conditional
-subpattern starts with (?(R) the "true" branch is used if recursion has
-happened, whereas the "false" branch is used only at the top level.
-
-24. When there was a very long string of literal characters (over 255 bytes
-without UTF support, over 250 bytes with UTF support), the computation of how
-much memory was required could be incorrect, leading to segfaults or other
-strange effects.
-
-25. PCRE was incorrectly assuming anchoring (either to start of subject or to
-start of line for a non-DOTALL pattern) when a pattern started with (.*) and
-there was a subsequent back reference to those brackets. This meant that, for
-example, /(.*)\d+\1/ failed to match "abc123bc". Unfortunately, it isn't
-possible to check for precisely this case. All we can do is abandon the
-optimization if .* occurs inside capturing brackets when there are any back
-references whatsoever. (See below for a better fix that came later.)
-
-26. The handling of the optimization for finding the first character of a
-non-anchored pattern, and for finding a character that is required later in the
-match were failing in some cases. This didn't break the matching; it just
-failed to optimize when it could. The way this is done has been re-implemented.
-
-27. Fixed typo in error message for invalid (?R item (it said "(?p").
-
-28. Added a new feature that provides some of the functionality that Perl
-provides with (?{...}). The facility is termed a "callout". The way it is done
-in PCRE is for the caller to provide an optional function, by setting
-pcre_callout to its entry point. Like pcre_malloc and pcre_free, this is a
-global variable. By default it is unset, which disables all calling out. To get
-the function called, the regex must include (?C) at appropriate points. This
-is, in fact, equivalent to (?C0), and any number <= 255 may be given with (?C).
-This provides a means of identifying different callout points. When PCRE
-reaches such a point in the regex, if pcre_callout has been set, the external
-function is called. It is provided with data in a structure called
-pcre_callout_block, which is defined in pcre.h. If the function returns 0,
-matching continues; if it returns a non-zero value, the match at the current
-point fails. However, backtracking will occur if possible. [This was changed
-later and other features added - see item 49 below.]
-
-29. pcretest is upgraded to test the callout functionality. It provides a
-callout function that displays information. By default, it shows the start of
-the match and the current position in the text. There are some new data escapes
-to vary what happens:
-
- \C+ in addition, show current contents of captured substrings
- \C- do not supply a callout function
- \C!n return 1 when callout number n is reached
- \C!n!m return 1 when callout number n is reached for the mth time
-
-30. If pcregrep was called with the -l option and just a single file name, it
-output "<stdin>" if a match was found, instead of the file name.
-
-31. Improve the efficiency of the POSIX API to PCRE. If the number of capturing
-slots is less than POSIX_MALLOC_THRESHOLD, use a block on the stack to pass to
-pcre_exec(). This saves a malloc/free per call. The default value of
-POSIX_MALLOC_THRESHOLD is 10; it can be changed by --with-posix-malloc-threshold
-when configuring.
-
-32. The default maximum size of a compiled pattern is 64K. There have been a
-few cases of people hitting this limit. The code now uses macros to handle the
-storing of links as offsets within the compiled pattern. It defaults to 2-byte
-links, but this can be changed to 3 or 4 bytes by --with-link-size when
-configuring. Tests 2 and 5 work only with 2-byte links because they output
-debugging information about compiled patterns.
-
-33. Internal code re-arrangements:
-
-(a) Moved the debugging function for printing out a compiled regex into
- its own source file (printint.c) and used #include to pull it into
- pcretest.c and, when DEBUG is defined, into pcre.c, instead of having two
- separate copies.
-
-(b) Defined the list of op-code names for debugging as a macro in
- internal.h so that it is next to the definition of the opcodes.
-
-(c) Defined a table of op-code lengths for simpler skipping along compiled
- code. This is again a macro in internal.h so that it is next to the
- definition of the opcodes.
-
-34. Added support for recursive calls to individual subpatterns, along the
-lines of Robin Houston's patch (but implemented somewhat differently).
-
-35. Further mods to the Makefile to help Win32. Also, added code to pcregrep to
-allow it to read and process whole directories in Win32. This code was
-contributed by Lionel Fourquaux; it has not been tested by me.
-
-36. Added support for named subpatterns. The Python syntax (?P<name>...) is
-used to name a group. Names consist of alphanumerics and underscores, and must
-be unique. Back references use the syntax (?P=name) and recursive calls use
-(?P>name) which is a PCRE extension to the Python extension. Groups still have
-numbers. The function pcre_fullinfo() can be used after compilation to extract
-a name/number map. There are three relevant calls:
-
- PCRE_INFO_NAMEENTRYSIZE yields the size of each entry in the map
- PCRE_INFO_NAMECOUNT yields the number of entries
- PCRE_INFO_NAMETABLE yields a pointer to the map.
-
-The map is a vector of fixed-size entries. The size of each entry depends on
-the length of the longest name used. The first two bytes of each entry are the
-group number, most significant byte first. There follows the corresponding
-name, zero terminated. The names are in alphabetical order.
-
-37. Make the maximum literal string in the compiled code 250 for the non-UTF-8
-case instead of 255. Making it the same both with and without UTF-8 support
-means that the same test output works with both.
-
-38. There was a case of malloc(0) in the POSIX testing code in pcretest. Avoid
-calling malloc() with a zero argument.
-
-39. Change 25 above had to resort to a heavy-handed test for the .* anchoring
-optimization. I've improved things by keeping a bitmap of backreferences with
-numbers 1-31 so that if .* occurs inside capturing brackets that are not in
-fact referenced, the optimization can be applied. It is unlikely that a
-relevant occurrence of .* (i.e. one which might indicate anchoring or forcing
-the match to follow \n) will appear inside brackets with a number greater than
-31, but if it does, any back reference > 31 suppresses the optimization.
-
-40. Added a new compile-time option PCRE_NO_AUTO_CAPTURE. This has the effect
-of disabling numbered capturing parentheses. Any opening parenthesis that is
-not followed by ? behaves as if it were followed by ?: but named parentheses
-can still be used for capturing (and they will acquire numbers in the usual
-way).
-
-41. Redesigned the return codes from the match() function into yes/no/error so
-that errors can be passed back from deep inside the nested calls. A malloc
-failure while inside a recursive subpattern call now causes the
-PCRE_ERROR_NOMEMORY return instead of quietly going wrong.
-
-42. It is now possible to set a limit on the number of times the match()
-function is called in a call to pcre_exec(). This facility makes it possible to
-limit the amount of recursion and backtracking, though not in a directly
-obvious way, because the match() function is used in a number of different
-circumstances. The count starts from zero for each position in the subject
-string (for non-anchored patterns). The default limit is, for compatibility, a
-large number, namely 10 000 000. You can change this in two ways:
-
-(a) When configuring PCRE before making, you can use --with-match-limit=n
- to set a default value for the compiled library.
-
-(b) For each call to pcre_exec(), you can pass a pcre_extra block in which
- a different value is set. See 45 below.
-
-If the limit is exceeded, pcre_exec() returns PCRE_ERROR_MATCHLIMIT.
-
-43. Added a new function pcre_config(int, void *) to enable run-time extraction
-of things that can be changed at compile time. The first argument specifies
-what is wanted and the second points to where the information is to be placed.
-The current list of available information is:
-
- PCRE_CONFIG_UTF8
-
-The output is an integer that is set to one if UTF-8 support is available;
-otherwise it is set to zero.
-
- PCRE_CONFIG_NEWLINE
-
-The output is an integer that it set to the value of the code that is used for
-newline. It is either LF (10) or CR (13).
-
- PCRE_CONFIG_LINK_SIZE
-
-The output is an integer that contains the number of bytes used for internal
-linkage in compiled expressions. The value is 2, 3, or 4. See item 32 above.
-
- PCRE_CONFIG_POSIX_MALLOC_THRESHOLD
-
-The output is an integer that contains the threshold above which the POSIX
-interface uses malloc() for output vectors. See item 31 above.
-
- PCRE_CONFIG_MATCH_LIMIT
-
-The output is an unsigned integer that contains the default limit of the number
-of match() calls in a pcre_exec() execution. See 42 above.
-
-44. pcretest has been upgraded by the addition of the -C option. This causes it
-to extract all the available output from the new pcre_config() function, and to
-output it. The program then exits immediately.
-
-45. A need has arisen to pass over additional data with calls to pcre_exec() in
-order to support additional features. One way would have been to define
-pcre_exec2() (for example) with extra arguments, but this would not have been
-extensible, and would also have required all calls to the original function to
-be mapped to the new one. Instead, I have chosen to extend the mechanism that
-is used for passing in "extra" data from pcre_study().
-
-The pcre_extra structure is now exposed and defined in pcre.h. It currently
-contains the following fields:
-
- flags a bitmap indicating which of the following fields are set
- study_data opaque data from pcre_study()
- match_limit a way of specifying a limit on match() calls for a specific
- call to pcre_exec()
- callout_data data for callouts (see 49 below)
-
-The flag bits are also defined in pcre.h, and are
-
- PCRE_EXTRA_STUDY_DATA
- PCRE_EXTRA_MATCH_LIMIT
- PCRE_EXTRA_CALLOUT_DATA
-
-The pcre_study() function now returns one of these new pcre_extra blocks, with
-the actual study data pointed to by the study_data field, and the
-PCRE_EXTRA_STUDY_DATA flag set. This can be passed directly to pcre_exec() as
-before. That is, this change is entirely upwards-compatible and requires no
-change to existing code.
-
-If you want to pass in additional data to pcre_exec(), you can either place it
-in a pcre_extra block provided by pcre_study(), or create your own pcre_extra
-block.
-
-46. pcretest has been extended to test the PCRE_EXTRA_MATCH_LIMIT feature. If a
-data string contains the escape sequence \M, pcretest calls pcre_exec() several
-times with different match limits, until it finds the minimum value needed for
-pcre_exec() to complete. The value is then output. This can be instructive; for
-most simple matches the number is quite small, but for pathological cases it
-gets very large very quickly.
-
-47. There's a new option for pcre_fullinfo() called PCRE_INFO_STUDYSIZE. It
-returns the size of the data block pointed to by the study_data field in a
-pcre_extra block, that is, the value that was passed as the argument to
-pcre_malloc() when PCRE was getting memory in which to place the information
-created by pcre_study(). The fourth argument should point to a size_t variable.
-pcretest has been extended so that this information is shown after a successful
-pcre_study() call when information about the compiled regex is being displayed.
-
-48. Cosmetic change to Makefile: there's no need to have / after $(DESTDIR)
-because what follows is always an absolute path. (Later: it turns out that this
-is more than cosmetic for MinGW, because it doesn't like empty path
-components.)
-
-49. Some changes have been made to the callout feature (see 28 above):
-
-(i) A callout function now has three choices for what it returns:
-
- 0 => success, carry on matching
- > 0 => failure at this point, but backtrack if possible
- < 0 => serious error, return this value from pcre_exec()
-
- Negative values should normally be chosen from the set of PCRE_ERROR_xxx
- values. In particular, returning PCRE_ERROR_NOMATCH forces a standard
- "match failed" error. The error number PCRE_ERROR_CALLOUT is reserved for
- use by callout functions. It will never be used by PCRE itself.
-
-(ii) The pcre_extra structure (see 45 above) has a void * field called
- callout_data, with corresponding flag bit PCRE_EXTRA_CALLOUT_DATA. The
- pcre_callout_block structure has a field of the same name. The contents of
- the field passed in the pcre_extra structure are passed to the callout
- function in the corresponding field in the callout block. This makes it
- easier to use the same callout-containing regex from multiple threads. For
- testing, the pcretest program has a new data escape
-
- \C*n pass the number n (may be negative) as callout_data
-
- If the callout function in pcretest receives a non-zero value as
- callout_data, it returns that value.
-
-50. Makefile wasn't handling CFLAGS properly when compiling dftables. Also,
-there were some redundant $(CFLAGS) in commands that are now specified as
-$(LINK), which already includes $(CFLAGS).
-
-51. Extensions to UTF-8 support are listed below. These all apply when (a) PCRE
-has been compiled with UTF-8 support *and* pcre_compile() has been compiled
-with the PCRE_UTF8 flag. Patterns that are compiled without that flag assume
-one-byte characters throughout. Note that case-insensitive matching applies
-only to characters whose values are less than 256. PCRE doesn't support the
-notion of cases for higher-valued characters.
-
-(i) A character class whose characters are all within 0-255 is handled as
- a bit map, and the map is inverted for negative classes. Previously, a
- character > 255 always failed to match such a class; however it should
- match if the class was a negative one (e.g. [^ab]). This has been fixed.
-
-(ii) A negated character class with a single character < 255 is coded as
- "not this character" (OP_NOT). This wasn't working properly when the test
- character was multibyte, either singly or repeated.
-
-(iii) Repeats of multibyte characters are now handled correctly in UTF-8
- mode, for example: \x{100}{2,3}.
-
-(iv) The character escapes \b, \B, \d, \D, \s, \S, \w, and \W (either
- singly or repeated) now correctly test multibyte characters. However,
- PCRE doesn't recognize any characters with values greater than 255 as
- digits, spaces, or word characters. Such characters always match \D, \S,
- and \W, and never match \d, \s, or \w.
-
-(v) Classes may now contain characters and character ranges with values
- greater than 255. For example: [ab\x{100}-\x{400}].
-
-(vi) pcregrep now has a --utf-8 option (synonym -u) which makes it call
- PCRE in UTF-8 mode.
-
-52. The info request value PCRE_INFO_FIRSTCHAR has been renamed
-PCRE_INFO_FIRSTBYTE because it is a byte value. However, the old name is
-retained for backwards compatibility. (Note that LASTLITERAL is also a byte
-value.)
-
-53. The single man page has become too large. I have therefore split it up into
-a number of separate man pages. These also give rise to individual HTML pages;
-these are now put in a separate directory, and there is an index.html page that
-lists them all. Some hyperlinking between the pages has been installed.
-
-54. Added convenience functions for handling named capturing parentheses.
-
-55. Unknown escapes inside character classes (e.g. [\M]) and escapes that
-aren't interpreted therein (e.g. [\C]) are literals in Perl. This is now also
-true in PCRE, except when the PCRE_EXTENDED option is set, in which case they
-are faulted.
-
-56. Introduced HOST_CC and HOST_CFLAGS which can be set in the environment when
-calling configure. These values are used when compiling the dftables.c program
-which is run to generate the source of the default character tables. They
-default to the values of CC and CFLAGS. If you are cross-compiling PCRE,
-you will need to set these values.
-
-57. Updated the building process for Windows DLL, as provided by Fred Cox.
-
-
-Version 3.9 02-Jan-02
----------------------
-
-1. A bit of extraneous text had somehow crept into the pcregrep documentation.
-
-2. If --disable-static was given, the building process failed when trying to
-build pcretest and pcregrep. (For some reason it was using libtool to compile
-them, which is not right, as they aren't part of the library.)
-
-
-Version 3.8 18-Dec-01
----------------------
-
-1. The experimental UTF-8 code was completely screwed up. It was packing the
-bytes in the wrong order. How dumb can you get?
-
-
-Version 3.7 29-Oct-01
----------------------
-
-1. In updating pcretest to check change 1 of version 3.6, I screwed up.
-This caused pcretest, when used on the test data, to segfault. Unfortunately,
-this didn't happen under Solaris 8, where I normally test things.
-
-2. The Makefile had to be changed to make it work on BSD systems, where 'make'
-doesn't seem to recognize that ./xxx and xxx are the same file. (This entry
-isn't in ChangeLog distributed with 3.7 because I forgot when I hastily made
-this fix an hour or so after the initial 3.7 release.)
-
-
-Version 3.6 23-Oct-01
----------------------
-
-1. Crashed with /(sens|respons)e and \1ibility/ and "sense and sensibility" if
-offsets passed as NULL with zero offset count.
-
-2. The config.guess and config.sub files had not been updated when I moved to
-the latest autoconf.
-
-
-Version 3.5 15-Aug-01
----------------------
-
-1. Added some missing #if !defined NOPOSIX conditionals in pcretest.c that
-had been forgotten.
-
-2. By using declared but undefined structures, we can avoid using "void"
-definitions in pcre.h while keeping the internal definitions of the structures
-private.
-
-3. The distribution is now built using autoconf 2.50 and libtool 1.4. From a
-user point of view, this means that both static and shared libraries are built
-by default, but this can be individually controlled. More of the work of
-handling this static/shared cases is now inside libtool instead of PCRE's make
-file.
-
-4. The pcretest utility is now installed along with pcregrep because it is
-useful for users (to test regexs) and by doing this, it automatically gets
-relinked by libtool. The documentation has been turned into a man page, so
-there are now .1, .txt, and .html versions in /doc.
-
-5. Upgrades to pcregrep:
- (i) Added long-form option names like gnu grep.
- (ii) Added --help to list all options with an explanatory phrase.
- (iii) Added -r, --recursive to recurse into sub-directories.
- (iv) Added -f, --file to read patterns from a file.
-
-6. pcre_exec() was referring to its "code" argument before testing that
-argument for NULL (and giving an error if it was NULL).
-
-7. Upgraded Makefile.in to allow for compiling in a different directory from
-the source directory.
-
-8. Tiny buglet in pcretest: when pcre_fullinfo() was called to retrieve the
-options bits, the pointer it was passed was to an int instead of to an unsigned
-long int. This mattered only on 64-bit systems.
-
-9. Fixed typo (3.4/1) in pcre.h again. Sigh. I had changed pcre.h (which is
-generated) instead of pcre.in, which it its source. Also made the same change
-in several of the .c files.
-
-10. A new release of gcc defines printf() as a macro, which broke pcretest
-because it had an ifdef in the middle of a string argument for printf(). Fixed
-by using separate calls to printf().
-
-11. Added --enable-newline-is-cr and --enable-newline-is-lf to the configure
-script, to force use of CR or LF instead of \n in the source. On non-Unix
-systems, the value can be set in config.h.
-
-12. The limit of 200 on non-capturing parentheses is a _nesting_ limit, not an
-absolute limit. Changed the text of the error message to make this clear, and
-likewise updated the man page.
-
-13. The limit of 99 on the number of capturing subpatterns has been removed.
-The new limit is 65535, which I hope will not be a "real" limit.
-
-
-Version 3.4 22-Aug-00
----------------------
-
-1. Fixed typo in pcre.h: unsigned const char * changed to const unsigned char *.
-
-2. Diagnose condition (?(0) as an error instead of crashing on matching.
-
-
-Version 3.3 01-Aug-00
----------------------
-
-1. If an octal character was given, but the value was greater than \377, it
-was not getting masked to the least significant bits, as documented. This could
-lead to crashes in some systems.
-
-2. Perl 5.6 (if not earlier versions) accepts classes like [a-\d] and treats
-the hyphen as a literal. PCRE used to give an error; it now behaves like Perl.
-
-3. Added the functions pcre_free_substring() and pcre_free_substring_list().
-These just pass their arguments on to (pcre_free)(), but they are provided
-because some uses of PCRE bind it to non-C systems that can call its functions,
-but cannot call free() or pcre_free() directly.
-
-4. Add "make test" as a synonym for "make check". Corrected some comments in
-the Makefile.
-
-5. Add $(DESTDIR)/ in front of all the paths in the "install" target in the
-Makefile.
-
-6. Changed the name of pgrep to pcregrep, because Solaris has introduced a
-command called pgrep for grepping around the active processes.
-
-7. Added the beginnings of support for UTF-8 character strings.
-
-8. Arranged for the Makefile to pass over the settings of CC, CFLAGS, and
-RANLIB to ./ltconfig so that they are used by libtool. I think these are all
-the relevant ones. (AR is not passed because ./ltconfig does its own figuring
-out for the ar command.)
-
-
-Version 3.2 12-May-00
----------------------
-
-This is purely a bug fixing release.
-
-1. If the pattern /((Z)+|A)*/ was matched agained ZABCDEFG it matched Z instead
-of ZA. This was just one example of several cases that could provoke this bug,
-which was introduced by change 9 of version 2.00. The code for breaking
-infinite loops after an iteration that matches an empty string was't working
-correctly.
-
-2. The pcretest program was not imitating Perl correctly for the pattern /a*/g
-when matched against abbab (for example). After matching an empty string, it
-wasn't forcing anchoring when setting PCRE_NOTEMPTY for the next attempt; this
-caused it to match further down the string than it should.
-
-3. The code contained an inclusion of sys/types.h. It isn't clear why this
-was there because it doesn't seem to be needed, and it causes trouble on some
-systems, as it is not a Standard C header. It has been removed.
-
-4. Made 4 silly changes to the source to avoid stupid compiler warnings that
-were reported on the Macintosh. The changes were from
-
- while ((c = *(++ptr)) != 0 && c != '\n');
-to
- while ((c = *(++ptr)) != 0 && c != '\n') ;
-
-Totally extraordinary, but if that's what it takes...
-
-5. PCRE is being used in one environment where neither memmove() nor bcopy() is
-available. Added HAVE_BCOPY and an autoconf test for it; if neither
-HAVE_MEMMOVE nor HAVE_BCOPY is set, use a built-in emulation function which
-assumes the way PCRE uses memmove() (always moving upwards).
-
-6. PCRE is being used in one environment where strchr() is not available. There
-was only one use in pcre.c, and writing it out to avoid strchr() probably gives
-faster code anyway.
-
-
-Version 3.1 09-Feb-00
----------------------
-
-The only change in this release is the fixing of some bugs in Makefile.in for
-the "install" target:
-
-(1) It was failing to install pcreposix.h.
-
-(2) It was overwriting the pcre.3 man page with the pcreposix.3 man page.
-
-
-Version 3.0 01-Feb-00
----------------------
-
-1. Add support for the /+ modifier to perltest (to output $` like it does in
-pcretest).
-
-2. Add support for the /g modifier to perltest.
-
-3. Fix pcretest so that it behaves even more like Perl for /g when the pattern
-matches null strings.
-
-4. Fix perltest so that it doesn't do unwanted things when fed an empty
-pattern. Perl treats empty patterns specially - it reuses the most recent
-pattern, which is not what we want. Replace // by /(?#)/ in order to avoid this
-effect.
-
-5. The POSIX interface was broken in that it was just handing over the POSIX
-captured string vector to pcre_exec(), but (since release 2.00) PCRE has
-required a bigger vector, with some working space on the end. This means that
-the POSIX wrapper now has to get and free some memory, and copy the results.
-
-6. Added some simple autoconf support, placing the test data and the
-documentation in separate directories, re-organizing some of the
-information files, and making it build pcre-config (a GNU standard). Also added
-libtool support for building PCRE as a shared library, which is now the
-default.
-
-7. Got rid of the leading zero in the definition of PCRE_MINOR because 08 and
-09 are not valid octal constants. Single digits will be used for minor values
-less than 10.
-
-8. Defined REG_EXTENDED and REG_NOSUB as zero in the POSIX header, so that
-existing programs that set these in the POSIX interface can use PCRE without
-modification.
-
-9. Added a new function, pcre_fullinfo() with an extensible interface. It can
-return all that pcre_info() returns, plus additional data. The pcre_info()
-function is retained for compatibility, but is considered to be obsolete.
-
-10. Added experimental recursion feature (?R) to handle one common case that
-Perl 5.6 will be able to do with (?p{...}).
-
-11. Added support for POSIX character classes like [:alpha:], which Perl is
-adopting.
-
-
-Version 2.08 31-Aug-99
-----------------------
-
-1. When startoffset was not zero and the pattern began with ".*", PCRE was not
-trying to match at the startoffset position, but instead was moving forward to
-the next newline as if a previous match had failed.
-
-2. pcretest was not making use of PCRE_NOTEMPTY when repeating for /g and /G,
-and could get into a loop if a null string was matched other than at the start
-of the subject.
-
-3. Added definitions of PCRE_MAJOR and PCRE_MINOR to pcre.h so the version can
-be distinguished at compile time, and for completeness also added PCRE_DATE.
-
-5. Added Paul Sokolovsky's minor changes to make it easy to compile a Win32 DLL
-in GnuWin32 environments.
-
-
-Version 2.07 29-Jul-99
-----------------------
-
-1. The documentation is now supplied in plain text form and HTML as well as in
-the form of man page sources.
-
-2. C++ compilers don't like assigning (void *) values to other pointer types.
-In particular this affects malloc(). Although there is no problem in Standard
-C, I've put in casts to keep C++ compilers happy.
-
-3. Typo on pcretest.c; a cast of (unsigned char *) in the POSIX regexec() call
-should be (const char *).
-
-4. If NOPOSIX is defined, pcretest.c compiles without POSIX support. This may
-be useful for non-Unix systems who don't want to bother with the POSIX stuff.
-However, I haven't made this a standard facility. The documentation doesn't
-mention it, and the Makefile doesn't support it.
-
-5. The Makefile now contains an "install" target, with editable destinations at
-the top of the file. The pcretest program is not installed.
-
-6. pgrep -V now gives the PCRE version number and date.
-
-7. Fixed bug: a zero repetition after a literal string (e.g. /abcde{0}/) was
-causing the entire string to be ignored, instead of just the last character.
-
-8. If a pattern like /"([^\\"]+|\\.)*"/ is applied in the normal way to a
-non-matching string, it can take a very, very long time, even for strings of
-quite modest length, because of the nested recursion. PCRE now does better in
-some of these cases. It does this by remembering the last required literal
-character in the pattern, and pre-searching the subject to ensure it is present
-before running the real match. In other words, it applies a heuristic to detect
-some types of certain failure quickly, and in the above example, if presented
-with a string that has no trailing " it gives "no match" very quickly.
-
-9. A new runtime option PCRE_NOTEMPTY causes null string matches to be ignored;
-other alternatives are tried instead.
-
-
-Version 2.06 09-Jun-99
-----------------------
-
-1. Change pcretest's output for amount of store used to show just the code
-space, because the remainder (the data block) varies in size between 32-bit and
-64-bit systems.
-
-2. Added an extra argument to pcre_exec() to supply an offset in the subject to
-start matching at. This allows lookbehinds to work when searching for multiple
-occurrences in a string.
-
-3. Added additional options to pcretest for testing multiple occurrences:
-
- /+ outputs the rest of the string that follows a match
- /g loops for multiple occurrences, using the new startoffset argument
- /G loops for multiple occurrences by passing an incremented pointer
-
-4. PCRE wasn't doing the "first character" optimization for patterns starting
-with \b or \B, though it was doing it for other lookbehind assertions. That is,
-it wasn't noticing that a match for a pattern such as /\bxyz/ has to start with
-the letter 'x'. On long subject strings, this gives a significant speed-up.
-
-
-Version 2.05 21-Apr-99
-----------------------
-
-1. Changed the type of magic_number from int to long int so that it works
-properly on 16-bit systems.
-
-2. Fixed a bug which caused patterns starting with .* not to work correctly
-when the subject string contained newline characters. PCRE was assuming
-anchoring for such patterns in all cases, which is not correct because .* will
-not pass a newline unless PCRE_DOTALL is set. It now assumes anchoring only if
-DOTALL is set at top level; otherwise it knows that patterns starting with .*
-must be retried after every newline in the subject.
-
-
-Version 2.04 18-Feb-99
-----------------------
-
-1. For parenthesized subpatterns with repeats whose minimum was zero, the
-computation of the store needed to hold the pattern was incorrect (too large).
-If such patterns were nested a few deep, this could multiply and become a real
-problem.
-
-2. Added /M option to pcretest to show the memory requirement of a specific
-pattern. Made -m a synonym of -s (which does this globally) for compatibility.
-
-3. Subpatterns of the form (regex){n,m} (i.e. limited maximum) were being
-compiled in such a way that the backtracking after subsequent failure was
-pessimal. Something like (a){0,3} was compiled as (a)?(a)?(a)? instead of
-((a)((a)(a)?)?)? with disastrous performance if the maximum was of any size.
-
-
-Version 2.03 02-Feb-99
-----------------------
-
-1. Fixed typo and small mistake in man page.
-
-2. Added 4th condition (GPL supersedes if conflict) and created separate
-LICENCE file containing the conditions.
-
-3. Updated pcretest so that patterns such as /abc\/def/ work like they do in
-Perl, that is the internal \ allows the delimiter to be included in the
-pattern. Locked out the use of \ as a delimiter. If \ immediately follows
-the final delimiter, add \ to the end of the pattern (to test the error).
-
-4. Added the convenience functions for extracting substrings after a successful
-match. Updated pcretest to make it able to test these functions.
-
-
-Version 2.02 14-Jan-99
-----------------------
-
-1. Initialized the working variables associated with each extraction so that
-their saving and restoring doesn't refer to uninitialized store.
-
-2. Put dummy code into study.c in order to trick the optimizer of the IBM C
-compiler for OS/2 into generating correct code. Apparently IBM isn't going to
-fix the problem.
-
-3. Pcretest: the timing code wasn't using LOOPREPEAT for timing execution
-calls, and wasn't printing the correct value for compiling calls. Increased the
-default value of LOOPREPEAT, and the number of significant figures in the
-times.
-
-4. Changed "/bin/rm" in the Makefile to "-rm" so it works on Windows NT.
-
-5. Renamed "deftables" as "dftables" to get it down to 8 characters, to avoid
-a building problem on Windows NT with a FAT file system.
-
-
-Version 2.01 21-Oct-98
-----------------------
-
-1. Changed the API for pcre_compile() to allow for the provision of a pointer
-to character tables built by pcre_maketables() in the current locale. If NULL
-is passed, the default tables are used.
-
-
-Version 2.00 24-Sep-98
-----------------------
-
-1. Since the (>?) facility is in Perl 5.005, don't require PCRE_EXTRA to enable
-it any more.
-
-2. Allow quantification of (?>) groups, and make it work correctly.
-
-3. The first character computation wasn't working for (?>) groups.
-
-4. Correct the implementation of \Z (it is permitted to match on the \n at the
-end of the subject) and add 5.005's \z, which really does match only at the
-very end of the subject.
-
-5. Remove the \X "cut" facility; Perl doesn't have it, and (?> is neater.
-
-6. Remove the ability to specify CASELESS, MULTILINE, DOTALL, and
-DOLLAR_END_ONLY at runtime, to make it possible to implement the Perl 5.005
-localized options. All options to pcre_study() were also removed.
-
-7. Add other new features from 5.005:
-
- $(?<= positive lookbehind
- $(?<! negative lookbehind
- (?imsx-imsx) added the unsetting capability
- such a setting is global if at outer level; local otherwise
- (?imsx-imsx:) non-capturing groups with option setting
- (?(cond)re|re) conditional pattern matching
-
- A backreference to itself in a repeated group matches the previous
- captured string.
-
-8. General tidying up of studying (both automatic and via "study")
-consequential on the addition of new assertions.
-
-9. As in 5.005, unlimited repeated groups that could match an empty substring
-are no longer faulted at compile time. Instead, the loop is forcibly broken at
-runtime if any iteration does actually match an empty substring.
-
-10. Include the RunTest script in the distribution.
-
-11. Added tests from the Perl 5.005_02 distribution. This showed up a few
-discrepancies, some of which were old and were also with respect to 5.004. They
-have now been fixed.
-
-
-Version 1.09 28-Apr-98
-----------------------
-
-1. A negated single character class followed by a quantifier with a minimum
-value of one (e.g. [^x]{1,6} ) was not compiled correctly. This could lead to
-program crashes, or just wrong answers. This did not apply to negated classes
-containing more than one character, or to minima other than one.
-
-
-Version 1.08 27-Mar-98
-----------------------
-
-1. Add PCRE_UNGREEDY to invert the greediness of quantifiers.
-
-2. Add (?U) and (?X) to set PCRE_UNGREEDY and PCRE_EXTRA respectively. The
-latter must appear before anything that relies on it in the pattern.
-
-
-Version 1.07 16-Feb-98
-----------------------
-
-1. A pattern such as /((a)*)*/ was not being diagnosed as in error (unlimited
-repeat of a potentially empty string).
-
-
-Version 1.06 23-Jan-98
-----------------------
-
-1. Added Markus Oberhumer's little patches for C++.
-
-2. Literal strings longer than 255 characters were broken.
-
-
-Version 1.05 23-Dec-97
-----------------------
-
-1. Negated character classes containing more than one character were failing if
-PCRE_CASELESS was set at run time.
-
-
-Version 1.04 19-Dec-97
-----------------------
-
-1. Corrected the man page, where some "const" qualifiers had been omitted.
-
-2. Made debugging output print "{0,xxx}" instead of just "{,xxx}" to agree with
-input syntax.
-
-3. Fixed memory leak which occurred when a regex with back references was
-matched with an offsets vector that wasn't big enough. The temporary memory
-that is used in this case wasn't being freed if the match failed.
-
-4. Tidied pcretest to ensure it frees memory that it gets.
-
-5. Temporary memory was being obtained in the case where the passed offsets
-vector was exactly big enough.
-
-6. Corrected definition of offsetof() from change 5 below.
-
-7. I had screwed up change 6 below and broken the rules for the use of
-setjmp(). Now fixed.
-
-
-Version 1.03 18-Dec-97
-----------------------
-
-1. A erroneous regex with a missing opening parenthesis was correctly
-diagnosed, but PCRE attempted to access brastack[-1], which could cause crashes
-on some systems.
-
-2. Replaced offsetof(real_pcre, code) by offsetof(real_pcre, code[0]) because
-it was reported that one broken compiler failed on the former because "code" is
-also an independent variable.
-
-3. The erroneous regex a[]b caused an array overrun reference.
-
-4. A regex ending with a one-character negative class (e.g. /[^k]$/) did not
-fail on data ending with that character. (It was going on too far, and checking
-the next character, typically a binary zero.) This was specific to the
-optimized code for single-character negative classes.
-
-5. Added a contributed patch from the TIN world which does the following:
-
- + Add an undef for memmove, in case the the system defines a macro for it.
-
- + Add a definition of offsetof(), in case there isn't one. (I don't know
- the reason behind this - offsetof() is part of the ANSI standard - but
- it does no harm).
-
- + Reduce the ifdef's in pcre.c using macro DPRINTF, thereby eliminating
- most of the places where whitespace preceded '#'. I have given up and
- allowed the remaining 2 cases to be at the margin.
-
- + Rename some variables in pcre to eliminate shadowing. This seems very
- pedantic, but does no harm, of course.
-
-6. Moved the call to setjmp() into its own function, to get rid of warnings
-from gcc -Wall, and avoided calling it at all unless PCRE_EXTRA is used.
-
-7. Constructs such as \d{8,} were compiling into the equivalent of
-\d{8}\d{0,65527} instead of \d{8}\d* which didn't make much difference to the
-outcome, but in this particular case used more store than had been allocated,
-which caused the bug to be discovered because it threw up an internal error.
-
-8. The debugging code in both pcre and pcretest for outputting the compiled
-form of a regex was going wrong in the case of back references followed by
-curly-bracketed repeats.
-
-
-Version 1.02 12-Dec-97
-----------------------
-
-1. Typos in pcre.3 and comments in the source fixed.
-
-2. Applied a contributed patch to get rid of places where it used to remove
-'const' from variables, and fixed some signed/unsigned and uninitialized
-variable warnings.
-
-3. Added the "runtest" target to Makefile.
-
-4. Set default compiler flag to -O2 rather than just -O.
-
-
-Version 1.01 19-Nov-97
-----------------------
-
-1. PCRE was failing to diagnose unlimited repeat of empty string for patterns
-like /([ab]*)*/, that is, for classes with more than one character in them.
-
-2. Likewise, it wasn't diagnosing patterns with "once-only" subpatterns, such
-as /((?>a*))*/ (a PCRE_EXTRA facility).
-
-
-Version 1.00 18-Nov-97
-----------------------
-
-1. Added compile-time macros to support systems such as SunOS4 which don't have
-memmove() or strerror() but have other things that can be used instead.
-
-2. Arranged that "make clean" removes the executables.
-
-
-Version 0.99 27-Oct-97
-----------------------
-
-1. Fixed bug in code for optimizing classes with only one character. It was
-initializing a 32-byte map regardless, which could cause it to run off the end
-of the memory it had got.
-
-2. Added, conditional on PCRE_EXTRA, the proposed (?>REGEX) construction.
-
-
-Version 0.98 22-Oct-97
-----------------------
-
-1. Fixed bug in code for handling temporary memory usage when there are more
-back references than supplied space in the ovector. This could cause segfaults.
-
-
-Version 0.97 21-Oct-97
-----------------------
-
-1. Added the \X "cut" facility, conditional on PCRE_EXTRA.
-
-2. Optimized negated single characters not to use a bit map.
-
-3. Brought error texts together as macro definitions; clarified some of them;
-fixed one that was wrong - it said "range out of order" when it meant "invalid
-escape sequence".
-
-4. Changed some char * arguments to const char *.
-
-5. Added PCRE_NOTBOL and PCRE_NOTEOL (from POSIX).
-
-6. Added the POSIX-style API wrapper in pcreposix.a and testing facilities in
-pcretest.
-
-
-Version 0.96 16-Oct-97
-----------------------
-
-1. Added a simple "pgrep" utility to the distribution.
-
-2. Fixed an incompatibility with Perl: "{" is now treated as a normal character
-unless it appears in one of the precise forms "{ddd}", "{ddd,}", or "{ddd,ddd}"
-where "ddd" means "one or more decimal digits".
-
-3. Fixed serious bug. If a pattern had a back reference, but the call to
-pcre_exec() didn't supply a large enough ovector to record the related
-identifying subpattern, the match always failed. PCRE now remembers the number
-of the largest back reference, and gets some temporary memory in which to save
-the offsets during matching if necessary, in order to ensure that
-backreferences always work.
-
-4. Increased the compatibility with Perl in a number of ways:
-
- (a) . no longer matches \n by default; an option PCRE_DOTALL is provided
- to request this handling. The option can be set at compile or exec time.
-
- (b) $ matches before a terminating newline by default; an option
- PCRE_DOLLAR_ENDONLY is provided to override this (but not in multiline
- mode). The option can be set at compile or exec time.
-
- (c) The handling of \ followed by a digit other than 0 is now supposed to be
- the same as Perl's. If the decimal number it represents is less than 10
- or there aren't that many previous left capturing parentheses, an octal
- escape is read. Inside a character class, it's always an octal escape,
- even if it is a single digit.
-
- (d) An escaped but undefined alphabetic character is taken as a literal,
- unless PCRE_EXTRA is set. Currently this just reserves the remaining
- escapes.
-
- (e) {0} is now permitted. (The previous item is removed from the compiled
- pattern).
-
-5. Changed all the names of code files so that the basic parts are no longer
-than 10 characters, and abolished the teeny "globals.c" file.
-
-6. Changed the handling of character classes; they are now done with a 32-byte
-bit map always.
-
-7. Added the -d and /D options to pcretest to make it possible to look at the
-internals of compilation without having to recompile pcre.
-
-
-Version 0.95 23-Sep-97
-----------------------
-
-1. Fixed bug in pre-pass concerning escaped "normal" characters such as \x5c or
-\x20 at the start of a run of normal characters. These were being treated as
-real characters, instead of the source characters being re-checked.
-
-
-Version 0.94 18-Sep-97
-----------------------
-
-1. The functions are now thread-safe, with the caveat that the global variables
-containing pointers to malloc() and free() or alternative functions are the
-same for all threads.
-
-2. Get pcre_study() to generate a bitmap of initial characters for non-
-anchored patterns when this is possible, and use it if passed to pcre_exec().
-
-
-Version 0.93 15-Sep-97
-----------------------
-
-1. /(b)|(:+)/ was computing an incorrect first character.
-
-2. Add pcre_study() to the API and the passing of pcre_extra to pcre_exec(),
-but not actually doing anything yet.
-
-3. Treat "-" characters in classes that cannot be part of ranges as literals,
-as Perl does (e.g. [-az] or [az-]).
-
-4. Set the anchored flag if a branch starts with .* or .*? because that tests
-all possible positions.
-
-5. Split up into different modules to avoid including unneeded functions in a
-compiled binary. However, compile and exec are still in one module. The "study"
-function is split off.
-
-6. The character tables are now in a separate module whose source is generated
-by an auxiliary program - but can then be edited by hand if required. There are
-now no calls to isalnum(), isspace(), isdigit(), isxdigit(), tolower() or
-toupper() in the code.
-
-7. Turn the malloc/free funtions variables into pcre_malloc and pcre_free and
-make them global. Abolish the function for setting them, as the caller can now
-set them directly.
-
-
-Version 0.92 11-Sep-97
-----------------------
-
-1. A repeat with a fixed maximum and a minimum of 1 for an ordinary character
-(e.g. /a{1,3}/) was broken (I mis-optimized it).
-
-2. Caseless matching was not working in character classes if the characters in
-the pattern were in upper case.
-
-3. Make ranges like [W-c] work in the same way as Perl for caseless matching.
-
-4. Make PCRE_ANCHORED public and accept as a compile option.
-
-5. Add an options word to pcre_exec() and accept PCRE_ANCHORED and
-PCRE_CASELESS at run time. Add escapes \A and \I to pcretest to cause it to
-pass them.
-
-6. Give an error if bad option bits passed at compile or run time.
-
-7. Add PCRE_MULTILINE at compile and exec time, and (?m) as well. Add \M to
-pcretest to cause it to pass that flag.
-
-8. Add pcre_info(), to get the number of identifying subpatterns, the stored
-options, and the first character, if set.
-
-9. Recognize C+ or C{n,m} where n >= 1 as providing a fixed starting character.
-
-
-Version 0.91 10-Sep-97
-----------------------
-
-1. PCRE was failing to diagnose unlimited repeats of subpatterns that could
-match the empty string as in /(a*)*/. It was looping and ultimately crashing.
-
-2. PCRE was looping on encountering an indefinitely repeated back reference to
-a subpattern that had matched an empty string, e.g. /(a|)\1*/. It now does what
-Perl does - treats the match as successful.
-
-****
diff --git a/libs/Pcre16/docs/HACKING b/libs/Pcre16/docs/HACKING
deleted file mode 100644
index 691b7a14e5..0000000000
--- a/libs/Pcre16/docs/HACKING
+++ /dev/null
@@ -1,528 +0,0 @@
-Technical Notes about PCRE
---------------------------
-
-These are very rough technical notes that record potentially useful information
-about PCRE internals. For information about testing PCRE, see the pcretest
-documentation and the comment at the head of the RunTest file.
-
-
-Historical note 1
------------------
-
-Many years ago I implemented some regular expression functions to an algorithm
-suggested by Martin Richards. These were not Unix-like in form, and were quite
-restricted in what they could do by comparison with Perl. The interesting part
-about the algorithm was that the amount of space required to hold the compiled
-form of an expression was known in advance. The code to apply an expression did
-not operate by backtracking, as the original Henry Spencer code and current
-Perl code does, but instead checked all possibilities simultaneously by keeping
-a list of current states and checking all of them as it advanced through the
-subject string. In the terminology of Jeffrey Friedl's book, it was a "DFA
-algorithm", though it was not a traditional Finite State Machine (FSM). When
-the pattern was all used up, all remaining states were possible matches, and
-the one matching the longest subset of the subject string was chosen. This did
-not necessarily maximize the individual wild portions of the pattern, as is
-expected in Unix and Perl-style regular expressions.
-
-
-Historical note 2
------------------
-
-By contrast, the code originally written by Henry Spencer (which was
-subsequently heavily modified for Perl) compiles the expression twice: once in
-a dummy mode in order to find out how much store will be needed, and then for
-real. (The Perl version probably doesn't do this any more; I'm talking about
-the original library.) The execution function operates by backtracking and
-maximizing (or, optionally, minimizing in Perl) the amount of the subject that
-matches individual wild portions of the pattern. This is an "NFA algorithm" in
-Friedl's terminology.
-
-
-OK, here's the real stuff
--------------------------
-
-For the set of functions that form the "basic" PCRE library (which are
-unrelated to those mentioned above), I tried at first to invent an algorithm
-that used an amount of store bounded by a multiple of the number of characters
-in the pattern, to save on compiling time. However, because of the greater
-complexity in Perl regular expressions, I couldn't do this. In any case, a
-first pass through the pattern is helpful for other reasons.
-
-
-Support for 16-bit and 32-bit data strings
--------------------------------------------
-
-From release 8.30, PCRE supports 16-bit as well as 8-bit data strings; and from
-release 8.32, PCRE supports 32-bit data strings. The library can be compiled
-in any combination of 8-bit, 16-bit or 32-bit modes, creating up to three
-different libraries. In the description that follows, the word "short" is used
-for a 16-bit data quantity, and the word "unit" is used for a quantity that is
-a byte in 8-bit mode, a short in 16-bit mode and a 32-bit word in 32-bit mode.
-However, so as not to over-complicate the text, the names of PCRE functions are
-given in 8-bit form only.
-
-
-Computing the memory requirement: how it was
---------------------------------------------
-
-Up to and including release 6.7, PCRE worked by running a very degenerate first
-pass to calculate a maximum store size, and then a second pass to do the real
-compile - which might use a bit less than the predicted amount of memory. The
-idea was that this would turn out faster than the Henry Spencer code because
-the first pass is degenerate and the second pass can just store stuff straight
-into the vector, which it knows is big enough.
-
-
-Computing the memory requirement: how it is
--------------------------------------------
-
-By the time I was working on a potential 6.8 release, the degenerate first pass
-had become very complicated and hard to maintain. Indeed one of the early
-things I did for 6.8 was to fix Yet Another Bug in the memory computation. Then
-I had a flash of inspiration as to how I could run the real compile function in
-a "fake" mode that enables it to compute how much memory it would need, while
-actually only ever using a few hundred bytes of working memory, and without too
-many tests of the mode that might slow it down. So I refactored the compiling
-functions to work this way. This got rid of about 600 lines of source. It
-should make future maintenance and development easier. As this was such a major
-change, I never released 6.8, instead upping the number to 7.0 (other quite
-major changes were also present in the 7.0 release).
-
-A side effect of this work was that the previous limit of 200 on the nesting
-depth of parentheses was removed. However, there is a downside: pcre_compile()
-runs more slowly than before (30% or more, depending on the pattern) because it
-is doing a full analysis of the pattern. My hope was that this would not be a
-big issue, and in the event, nobody has commented on it.
-
-At release 8.34, a limit on the nesting depth of parentheses was re-introduced
-(default 250, settable at build time) so as to put a limit on the amount of
-system stack used by pcre_compile(). This is a safety feature for environments
-with small stacks where the patterns are provided by users.
-
-
-Traditional matching function
------------------------------
-
-The "traditional", and original, matching function is called pcre_exec(), and
-it implements an NFA algorithm, similar to the original Henry Spencer algorithm
-and the way that Perl works. This is not surprising, since it is intended to be
-as compatible with Perl as possible. This is the function most users of PCRE
-will use most of the time. From release 8.20, if PCRE is compiled with
-just-in-time (JIT) support, and studying a compiled pattern with JIT is
-successful, the JIT code is run instead of the normal pcre_exec() code, but the
-result is the same.
-
-
-Supplementary matching function
--------------------------------
-
-From PCRE 6.0, there is also a supplementary matching function called
-pcre_dfa_exec(). This implements a DFA matching algorithm that searches
-simultaneously for all possible matches that start at one point in the subject
-string. (Going back to my roots: see Historical Note 1 above.) This function
-intreprets the same compiled pattern data as pcre_exec(); however, not all the
-facilities are available, and those that are do not always work in quite the
-same way. See the user documentation for details.
-
-The algorithm that is used for pcre_dfa_exec() is not a traditional FSM,
-because it may have a number of states active at one time. More work would be
-needed at compile time to produce a traditional FSM where only one state is
-ever active at once. I believe some other regex matchers work this way. JIT
-support is not available for this kind of matching.
-
-
-Changeable options
-------------------
-
-The /i, /m, or /s options (PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL, and some
-others) may change in the middle of patterns. From PCRE 8.13, their processing
-is handled entirely at compile time by generating different opcodes for the
-different settings. The runtime functions do not need to keep track of an
-options state any more.
-
-
-Format of compiled patterns
----------------------------
-
-The compiled form of a pattern is a vector of unsigned units (bytes in 8-bit
-mode, shorts in 16-bit mode, 32-bit words in 32-bit mode), containing items of
-variable length. The first unit in an item contains an opcode, and the length
-of the item is either implicit in the opcode or contained in the data that
-follows it.
-
-In many cases listed below, LINK_SIZE data values are specified for offsets
-within the compiled pattern. LINK_SIZE always specifies a number of bytes. The
-default value for LINK_SIZE is 2, but PCRE can be compiled to use 3-byte or
-4-byte values for these offsets, although this impairs the performance. (3-byte
-LINK_SIZE values are available only in 8-bit mode.) Specifing a LINK_SIZE
-larger than 2 is necessary only when patterns whose compiled length is greater
-than 64K are going to be processed. In this description, we assume the "normal"
-compilation options. Data values that are counts (e.g. quantifiers) are two
-bytes long in 8-bit mode (most significant byte first), or one unit in 16-bit
-and 32-bit modes.
-
-
-Opcodes with no following data
-------------------------------
-
-These items are all just one unit long
-
- OP_END end of pattern
- OP_ANY match any one character other than newline
- OP_ALLANY match any one character, including newline
- OP_ANYBYTE match any single unit, even in UTF-8/16 mode
- OP_SOD match start of data: \A
- OP_SOM, start of match (subject + offset): \G
- OP_SET_SOM, set start of match (\K)
- OP_CIRC ^ (start of data)
- OP_CIRCM ^ multiline mode (start of data or after newline)
- OP_NOT_WORD_BOUNDARY \W
- OP_WORD_BOUNDARY \w
- OP_NOT_DIGIT \D
- OP_DIGIT \d
- OP_NOT_HSPACE \H
- OP_HSPACE \h
- OP_NOT_WHITESPACE \S
- OP_WHITESPACE \s
- OP_NOT_VSPACE \V
- OP_VSPACE \v
- OP_NOT_WORDCHAR \W
- OP_WORDCHAR \w
- OP_EODN match end of data or newline at end: \Z
- OP_EOD match end of data: \z
- OP_DOLL $ (end of data, or before final newline)
- OP_DOLLM $ multiline mode (end of data or before newline)
- OP_EXTUNI match an extended Unicode grapheme cluster
- OP_ANYNL match any Unicode newline sequence
-
- OP_ASSERT_ACCEPT )
- OP_ACCEPT ) These are Perl 5.10's "backtracking control
- OP_COMMIT ) verbs". If OP_ACCEPT is inside capturing
- OP_FAIL ) parentheses, it may be preceded by one or more
- OP_PRUNE ) OP_CLOSE, each followed by a count that
- OP_SKIP ) indicates which parentheses must be closed.
- OP_THEN )
-
-OP_ASSERT_ACCEPT is used when (*ACCEPT) is encountered within an assertion.
-This ends the assertion, not the entire pattern match.
-
-
-Backtracking control verbs with optional data
----------------------------------------------
-
-(*THEN) without an argument generates the opcode OP_THEN and no following data.
-OP_MARK is followed by the mark name, preceded by a one-unit length, and
-followed by a binary zero. For (*PRUNE), (*SKIP), and (*THEN) with arguments,
-the opcodes OP_PRUNE_ARG, OP_SKIP_ARG, and OP_THEN_ARG are used, with the name
-following in the same format as OP_MARK.
-
-
-Matching literal characters
----------------------------
-
-The OP_CHAR opcode is followed by a single character that is to be matched
-casefully. For caseless matching, OP_CHARI is used. In UTF-8 or UTF-16 modes,
-the character may be more than one unit long. In UTF-32 mode, characters
-are always exactly one unit long.
-
-If there is only one character in a character class, OP_CHAR or OP_CHARI is
-used for a positive class, and OP_NOT or OP_NOTI for a negative one (that is,
-for something like [^a]).
-
-
-Repeating single characters
----------------------------
-
-The common repeats (*, +, ?), when applied to a single character, use the
-following opcodes, which come in caseful and caseless versions:
-
- Caseful Caseless
- OP_STAR OP_STARI
- OP_MINSTAR OP_MINSTARI
- OP_POSSTAR OP_POSSTARI
- OP_PLUS OP_PLUSI
- OP_MINPLUS OP_MINPLUSI
- OP_POSPLUS OP_POSPLUSI
- OP_QUERY OP_QUERYI
- OP_MINQUERY OP_MINQUERYI
- OP_POSQUERY OP_POSQUERYI
-
-Each opcode is followed by the character that is to be repeated. In ASCII mode,
-these are two-unit items; in UTF-8 or UTF-16 modes, the length is variable; in
-UTF-32 mode these are one-unit items. Those with "MIN" in their names are the
-minimizing versions. Those with "POS" in their names are possessive versions.
-Other repeats make use of these opcodes:
-
- Caseful Caseless
- OP_UPTO OP_UPTOI
- OP_MINUPTO OP_MINUPTOI
- OP_POSUPTO OP_POSUPTOI
- OP_EXACT OP_EXACTI
-
-Each of these is followed by a count and then the repeated character. OP_UPTO
-matches from 0 to the given number. A repeat with a non-zero minimum and a
-fixed maximum is coded as an OP_EXACT followed by an OP_UPTO (or OP_MINUPTO or
-OPT_POSUPTO).
-
-Another set of matching repeating opcodes (called OP_NOTSTAR, OP_NOTSTARI,
-etc.) are used for repeated, negated, single-character classes such as [^a]*.
-The normal single-character opcodes (OP_STAR, etc.) are used for repeated
-positive single-character classes.
-
-
-Repeating character types
--------------------------
-
-Repeats of things like \d are done exactly as for single characters, except
-that instead of a character, the opcode for the type is stored in the data
-unit. The opcodes are:
-
- OP_TYPESTAR
- OP_TYPEMINSTAR
- OP_TYPEPOSSTAR
- OP_TYPEPLUS
- OP_TYPEMINPLUS
- OP_TYPEPOSPLUS
- OP_TYPEQUERY
- OP_TYPEMINQUERY
- OP_TYPEPOSQUERY
- OP_TYPEUPTO
- OP_TYPEMINUPTO
- OP_TYPEPOSUPTO
- OP_TYPEEXACT
-
-
-Match by Unicode property
--------------------------
-
-OP_PROP and OP_NOTPROP are used for positive and negative matches of a
-character by testing its Unicode property (the \p and \P escape sequences).
-Each is followed by two units that encode the desired property as a type and a
-value. The types are a set of #defines of the form PT_xxx, and the values are
-enumerations of the form ucp_xx, defined in the ucp.h source file. The value is
-relevant only for PT_GC (General Category), PT_PC (Particular Category), and
-PT_SC (Script).
-
-Repeats of these items use the OP_TYPESTAR etc. set of opcodes, followed by
-three units: OP_PROP or OP_NOTPROP, and then the desired property type and
-value.
-
-
-Character classes
------------------
-
-If there is only one character in a class, OP_CHAR or OP_CHARI is used for a
-positive class, and OP_NOT or OP_NOTI for a negative one (that is, for
-something like [^a]).
-
-A set of repeating opcodes (called OP_NOTSTAR etc.) are used for repeated,
-negated, single-character classes. The normal single-character opcodes
-(OP_STAR, etc.) are used for repeated positive single-character classes.
-
-When there is more than one character in a class, and all the code points are
-less than 256, OP_CLASS is used for a positive class, and OP_NCLASS for a
-negative one. In either case, the opcode is followed by a 32-byte (16-short,
-8-word) bit map containing a 1 bit for every character that is acceptable. The
-bits are counted from the least significant end of each unit. In caseless mode,
-bits for both cases are set.
-
-The reason for having both OP_CLASS and OP_NCLASS is so that, in UTF-8/16/32
-mode, subject characters with values greater than 255 can be handled correctly.
-For OP_CLASS they do not match, whereas for OP_NCLASS they do.
-
-For classes containing characters with values greater than 255 or that contain
-\p or \P, OP_XCLASS is used. It optionally uses a bit map if any code points
-are less than 256, followed by a list of pairs (for a range) and single
-characters. In caseless mode, both cases are explicitly listed.
-
-OP_XCLASS is followed by a unit containing flag bits: XCL_NOT indicates that
-this is a negative class, and XCL_MAP indicates that a bit map is present.
-There follows the bit map, if XCL_MAP is set, and then a sequence of items
-coded as follows:
-
- XCL_END marks the end of the list
- XCL_SINGLE one character follows
- XCL_RANGE two characters follow
- XCL_PROP a Unicode property (type, value) follows
- XCL_NOTPROP a Unicode property (type, value) follows
-
-If a range starts with a code point less than 256 and ends with one greater
-than 256, an XCL_RANGE item is used, without setting any bits in the bit map.
-This means that if no other items in the class set bits in the map, a map is
-not needed.
-
-
-Back references
----------------
-
-OP_REF (caseful) or OP_REFI (caseless) is followed by a count containing the
-reference number if the reference is to a unique capturing group (either by
-number or by name). When named groups are used, there may be more than one
-group with the same name. In this case, a reference by name generates OP_DNREF
-or OP_DNREFI. These are followed by two counts: the index (not the byte offset)
-in the group name table of the first entry for the requred name, followed by
-the number of groups with the same name.
-
-
-Repeating character classes and back references
------------------------------------------------
-
-Single-character classes are handled specially (see above). This section
-applies to other classes and also to back references. In both cases, the repeat
-information follows the base item. The matching code looks at the following
-opcode to see if it is one of
-
- OP_CRSTAR
- OP_CRMINSTAR
- OP_CRPOSSTAR
- OP_CRPLUS
- OP_CRMINPLUS
- OP_CRPOSPLUS
- OP_CRQUERY
- OP_CRMINQUERY
- OP_CRPOSQUERY
- OP_CRRANGE
- OP_CRMINRANGE
- OP_CRPOSRANGE
-
-All but the last three are single-unit items, with no data. The others are
-followed by the minimum and maximum repeat counts.
-
-
-Brackets and alternation
-------------------------
-
-A pair of non-capturing round brackets is wrapped round each expression at
-compile time, so alternation always happens in the context of brackets.
-
-[Note for North Americans: "bracket" to some English speakers, including
-myself, can be round, square, curly, or pointy. Hence this usage rather than
-"parentheses".]
-
-Non-capturing brackets use the opcode OP_BRA. Originally PCRE was limited to 99
-capturing brackets and it used a different opcode for each one. From release
-3.5, the limit was removed by putting the bracket number into the data for
-higher-numbered brackets. From release 7.0 all capturing brackets are handled
-this way, using the single opcode OP_CBRA.
-
-A bracket opcode is followed by LINK_SIZE bytes which give the offset to the
-next alternative OP_ALT or, if there aren't any branches, to the matching
-OP_KET opcode. Each OP_ALT is followed by LINK_SIZE bytes giving the offset to
-the next one, or to the OP_KET opcode. For capturing brackets, the bracket
-number is a count that immediately follows the offset.
-
-OP_KET is used for subpatterns that do not repeat indefinitely, and OP_KETRMIN
-and OP_KETRMAX are used for indefinite repetitions, minimally or maximally
-respectively (see below for possessive repetitions). All three are followed by
-LINK_SIZE bytes giving (as a positive number) the offset back to the matching
-bracket opcode.
-
-If a subpattern is quantified such that it is permitted to match zero times, it
-is preceded by one of OP_BRAZERO, OP_BRAMINZERO, or OP_SKIPZERO. These are
-single-unit opcodes that tell the matcher that skipping the following
-subpattern entirely is a valid branch. In the case of the first two, not
-skipping the pattern is also valid (greedy and non-greedy). The third is used
-when a pattern has the quantifier {0,0}. It cannot be entirely discarded,
-because it may be called as a subroutine from elsewhere in the regex.
-
-A subpattern with an indefinite maximum repetition is replicated in the
-compiled data its minimum number of times (or once with OP_BRAZERO if the
-minimum is zero), with the final copy terminating with OP_KETRMIN or OP_KETRMAX
-as appropriate.
-
-A subpattern with a bounded maximum repetition is replicated in a nested
-fashion up to the maximum number of times, with OP_BRAZERO or OP_BRAMINZERO
-before each replication after the minimum, so that, for example, (abc){2,5} is
-compiled as (abc)(abc)((abc)((abc)(abc)?)?)?, except that each bracketed group
-has the same number.
-
-When a repeated subpattern has an unbounded upper limit, it is checked to see
-whether it could match an empty string. If this is the case, the opcode in the
-final replication is changed to OP_SBRA or OP_SCBRA. This tells the matcher
-that it needs to check for matching an empty string when it hits OP_KETRMIN or
-OP_KETRMAX, and if so, to break the loop.
-
-
-Possessive brackets
--------------------
-
-When a repeated group (capturing or non-capturing) is marked as possessive by
-the "+" notation, e.g. (abc)++, different opcodes are used. Their names all
-have POS on the end, e.g. OP_BRAPOS instead of OP_BRA and OP_SCPBRPOS instead
-of OP_SCBRA. The end of such a group is marked by OP_KETRPOS. If the minimum
-repetition is zero, the group is preceded by OP_BRAPOSZERO.
-
-
-Once-only (atomic) groups
--------------------------
-
-These are just like other subpatterns, but they start with the opcode
-OP_ONCE or OP_ONCE_NC. The former is used when there are no capturing brackets
-within the atomic group; the latter when there are. The distinction is needed
-for when there is a backtrack to before the group - any captures within the
-group must be reset, so it is necessary to retain backtracking points inside
-the group even after it is complete in order to do this. When there are no
-captures in an atomic group, all the backtracking can be discarded when it is
-complete. This is more efficient, and also uses less stack.
-
-The check for matching an empty string in an unbounded repeat is handled
-entirely at runtime, so there are just these two opcodes for atomic groups.
-
-
-Assertions
-----------
-
-Forward assertions are also just like other subpatterns, but starting with one
-of the opcodes OP_ASSERT or OP_ASSERT_NOT. Backward assertions use the opcodes
-OP_ASSERTBACK and OP_ASSERTBACK_NOT, and the first opcode inside the assertion
-is OP_REVERSE, followed by a count of the number of characters to move back the
-pointer in the subject string. In ASCII mode, the count is a number of units,
-but in UTF-8/16 mode each character may occupy more than one unit; in UTF-32
-mode each character occupies exactly one unit. A separate count is present in
-each alternative of a lookbehind assertion, allowing them to have different
-fixed lengths.
-
-
-Conditional subpatterns
------------------------
-
-These are like other subpatterns, but they start with the opcode OP_COND, or
-OP_SCOND for one that might match an empty string in an unbounded repeat. If
-the condition is a back reference, this is stored at the start of the
-subpattern using the opcode OP_CREF followed by a count containing the
-reference number, provided that the reference is to a unique capturing group.
-If the reference was by name and there is more than one group with that name,
-OP_DNCREF is used instead. It is followed by two counts: the index in the group
-names table, and the number of groups with the same name.
-
-If the condition is "in recursion" (coded as "(?(R)"), or "in recursion of
-group x" (coded as "(?(Rx)"), the group number is stored at the start of the
-subpattern using the opcode OP_RREF (with a value of zero for "the whole
-pattern") or OP_DNRREF (with data as for OP_DNCREF). For a DEFINE condition,
-just the single unit OP_DEF is used (it has no associated data). Otherwise, a
-conditional subpattern always starts with one of the assertions.
-
-
-Recursion
----------
-
-Recursion either matches the current regex, or some subexpression. The opcode
-OP_RECURSE is followed by aLINK_SIZE value that is the offset to the starting
-bracket from the start of the whole pattern. From release 6.5, OP_RECURSE is
-automatically wrapped inside OP_ONCE brackets, because otherwise some patterns
-broke it. OP_RECURSE is also used for "subroutine" calls, even though they are
-not strictly a recursion.
-
-
-Callout
--------
-
-OP_CALLOUT is followed by one unit of data that holds a callout number in the
-range 0 to 254 for manual callouts, or 255 for an automatic callout. In both
-cases there follows a count giving the offset in the pattern string to the
-start of the following item, and another count giving the length of this item.
-These values make is possible for pcretest to output useful tracing information
-using automatic callouts.
-
-Philip Hazel
-November 2013
diff --git a/libs/Pcre16/docs/INSTALL b/libs/Pcre16/docs/INSTALL
deleted file mode 100644
index 8865734f81..0000000000
--- a/libs/Pcre16/docs/INSTALL
+++ /dev/null
@@ -1,368 +0,0 @@
-Installation Instructions
-*************************
-
- Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software
-Foundation, Inc.
-
- Copying and distribution of this file, with or without modification,
-are permitted in any medium without royalty provided the copyright
-notice and this notice are preserved. This file is offered as-is,
-without warranty of any kind.
-
-Basic Installation
-==================
-
- Briefly, the shell command './configure && make && make install'
-should configure, build, and install this package. The following
-more-detailed instructions are generic; see the 'README' file for
-instructions specific to this package. Some packages provide this
-'INSTALL' file but do not implement all of the features documented
-below. The lack of an optional feature in a given package is not
-necessarily a bug. More recommendations for GNU packages can be found
-in *note Makefile Conventions: (standards)Makefile Conventions.
-
- The 'configure' shell script attempts to guess correct values for
-various system-dependent variables used during compilation. It uses
-those values to create a 'Makefile' in each directory of the package.
-It may also create one or more '.h' files containing system-dependent
-definitions. Finally, it creates a shell script 'config.status' that
-you can run in the future to recreate the current configuration, and a
-file 'config.log' containing compiler output (useful mainly for
-debugging 'configure').
-
- It can also use an optional file (typically called 'config.cache' and
-enabled with '--cache-file=config.cache' or simply '-C') that saves the
-results of its tests to speed up reconfiguring. Caching is disabled by
-default to prevent problems with accidental use of stale cache files.
-
- If you need to do unusual things to compile the package, please try
-to figure out how 'configure' could check whether to do them, and mail
-diffs or instructions to the address given in the 'README' so they can
-be considered for the next release. If you are using the cache, and at
-some point 'config.cache' contains results you don't want to keep, you
-may remove or edit it.
-
- The file 'configure.ac' (or 'configure.in') is used to create
-'configure' by a program called 'autoconf'. You need 'configure.ac' if
-you want to change it or regenerate 'configure' using a newer version of
-'autoconf'.
-
- The simplest way to compile this package is:
-
- 1. 'cd' to the directory containing the package's source code and type
- './configure' to configure the package for your system.
-
- Running 'configure' might take a while. While running, it prints
- some messages telling which features it is checking for.
-
- 2. Type 'make' to compile the package.
-
- 3. Optionally, type 'make check' to run any self-tests that come with
- the package, generally using the just-built uninstalled binaries.
-
- 4. Type 'make install' to install the programs and any data files and
- documentation. When installing into a prefix owned by root, it is
- recommended that the package be configured and built as a regular
- user, and only the 'make install' phase executed with root
- privileges.
-
- 5. Optionally, type 'make installcheck' to repeat any self-tests, but
- this time using the binaries in their final installed location.
- This target does not install anything. Running this target as a
- regular user, particularly if the prior 'make install' required
- root privileges, verifies that the installation completed
- correctly.
-
- 6. You can remove the program binaries and object files from the
- source code directory by typing 'make clean'. To also remove the
- files that 'configure' created (so you can compile the package for
- a different kind of computer), type 'make distclean'. There is
- also a 'make maintainer-clean' target, but that is intended mainly
- for the package's developers. If you use it, you may have to get
- all sorts of other programs in order to regenerate files that came
- with the distribution.
-
- 7. Often, you can also type 'make uninstall' to remove the installed
- files again. In practice, not all packages have tested that
- uninstallation works correctly, even though it is required by the
- GNU Coding Standards.
-
- 8. Some packages, particularly those that use Automake, provide 'make
- distcheck', which can by used by developers to test that all other
- targets like 'make install' and 'make uninstall' work correctly.
- This target is generally not run by end users.
-
-Compilers and Options
-=====================
-
- Some systems require unusual options for compilation or linking that
-the 'configure' script does not know about. Run './configure --help'
-for details on some of the pertinent environment variables.
-
- You can give 'configure' initial values for configuration parameters
-by setting variables in the command line or in the environment. Here is
-an example:
-
- ./configure CC=c99 CFLAGS=-g LIBS=-lposix
-
- *Note Defining Variables::, for more details.
-
-Compiling For Multiple Architectures
-====================================
-
- You can compile the package for more than one kind of computer at the
-same time, by placing the object files for each architecture in their
-own directory. To do this, you can use GNU 'make'. 'cd' to the
-directory where you want the object files and executables to go and run
-the 'configure' script. 'configure' automatically checks for the source
-code in the directory that 'configure' is in and in '..'. This is known
-as a "VPATH" build.
-
- With a non-GNU 'make', it is safer to compile the package for one
-architecture at a time in the source code directory. After you have
-installed the package for one architecture, use 'make distclean' before
-reconfiguring for another architecture.
-
- On MacOS X 10.5 and later systems, you can create libraries and
-executables that work on multiple system types--known as "fat" or
-"universal" binaries--by specifying multiple '-arch' options to the
-compiler but only a single '-arch' option to the preprocessor. Like
-this:
-
- ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
- CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
- CPP="gcc -E" CXXCPP="g++ -E"
-
- This is not guaranteed to produce working output in all cases, you
-may have to build one architecture at a time and combine the results
-using the 'lipo' tool if you have problems.
-
-Installation Names
-==================
-
- By default, 'make install' installs the package's commands under
-'/usr/local/bin', include files under '/usr/local/include', etc. You
-can specify an installation prefix other than '/usr/local' by giving
-'configure' the option '--prefix=PREFIX', where PREFIX must be an
-absolute file name.
-
- You can specify separate installation prefixes for
-architecture-specific files and architecture-independent files. If you
-pass the option '--exec-prefix=PREFIX' to 'configure', the package uses
-PREFIX as the prefix for installing programs and libraries.
-Documentation and other data files still use the regular prefix.
-
- In addition, if you use an unusual directory layout you can give
-options like '--bindir=DIR' to specify different values for particular
-kinds of files. Run 'configure --help' for a list of the directories
-you can set and what kinds of files go in them. In general, the default
-for these options is expressed in terms of '${prefix}', so that
-specifying just '--prefix' will affect all of the other directory
-specifications that were not explicitly provided.
-
- The most portable way to affect installation locations is to pass the
-correct locations to 'configure'; however, many packages provide one or
-both of the following shortcuts of passing variable assignments to the
-'make install' command line to change installation locations without
-having to reconfigure or recompile.
-
- The first method involves providing an override variable for each
-affected directory. For example, 'make install
-prefix=/alternate/directory' will choose an alternate location for all
-directory configuration variables that were expressed in terms of
-'${prefix}'. Any directories that were specified during 'configure',
-but not in terms of '${prefix}', must each be overridden at install time
-for the entire installation to be relocated. The approach of makefile
-variable overrides for each directory variable is required by the GNU
-Coding Standards, and ideally causes no recompilation. However, some
-platforms have known limitations with the semantics of shared libraries
-that end up requiring recompilation when using this method, particularly
-noticeable in packages that use GNU Libtool.
-
- The second method involves providing the 'DESTDIR' variable. For
-example, 'make install DESTDIR=/alternate/directory' will prepend
-'/alternate/directory' before all installation names. The approach of
-'DESTDIR' overrides is not required by the GNU Coding Standards, and
-does not work on platforms that have drive letters. On the other hand,
-it does better at avoiding recompilation issues, and works well even
-when some directory options were not specified in terms of '${prefix}'
-at 'configure' time.
-
-Optional Features
-=================
-
- If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving 'configure' the
-option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'.
-
- Some packages pay attention to '--enable-FEATURE' options to
-'configure', where FEATURE indicates an optional part of the package.
-They may also pay attention to '--with-PACKAGE' options, where PACKAGE
-is something like 'gnu-as' or 'x' (for the X Window System). The
-'README' should mention any '--enable-' and '--with-' options that the
-package recognizes.
-
- For packages that use the X Window System, 'configure' can usually
-find the X include and library files automatically, but if it doesn't,
-you can use the 'configure' options '--x-includes=DIR' and
-'--x-libraries=DIR' to specify their locations.
-
- Some packages offer the ability to configure how verbose the
-execution of 'make' will be. For these packages, running './configure
---enable-silent-rules' sets the default to minimal output, which can be
-overridden with 'make V=1'; while running './configure
---disable-silent-rules' sets the default to verbose, which can be
-overridden with 'make V=0'.
-
-Particular systems
-==================
-
- On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC
-is not installed, it is recommended to use the following options in
-order to use an ANSI C compiler:
-
- ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
-
-and if that doesn't work, install pre-built binaries of GCC for HP-UX.
-
- HP-UX 'make' updates targets which have the same time stamps as their
-prerequisites, which makes it generally unusable when shipped generated
-files such as 'configure' are involved. Use GNU 'make' instead.
-
- On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
-parse its '<wchar.h>' header file. The option '-nodtk' can be used as a
-workaround. If GNU CC is not installed, it is therefore recommended to
-try
-
- ./configure CC="cc"
-
-and if that doesn't work, try
-
- ./configure CC="cc -nodtk"
-
- On Solaris, don't put '/usr/ucb' early in your 'PATH'. This
-directory contains several dysfunctional programs; working variants of
-these programs are available in '/usr/bin'. So, if you need '/usr/ucb'
-in your 'PATH', put it _after_ '/usr/bin'.
-
- On Haiku, software installed for all users goes in '/boot/common',
-not '/usr/local'. It is recommended to use the following options:
-
- ./configure --prefix=/boot/common
-
-Specifying the System Type
-==========================
-
- There may be some features 'configure' cannot figure out
-automatically, but needs to determine by the type of machine the package
-will run on. Usually, assuming the package is built to be run on the
-_same_ architectures, 'configure' can figure that out, but if it prints
-a message saying it cannot guess the machine type, give it the
-'--build=TYPE' option. TYPE can either be a short name for the system
-type, such as 'sun4', or a canonical name which has the form:
-
- CPU-COMPANY-SYSTEM
-
-where SYSTEM can have one of these forms:
-
- OS
- KERNEL-OS
-
- See the file 'config.sub' for the possible values of each field. If
-'config.sub' isn't included in this package, then this package doesn't
-need to know the machine type.
-
- If you are _building_ compiler tools for cross-compiling, you should
-use the option '--target=TYPE' to select the type of system they will
-produce code for.
-
- If you want to _use_ a cross compiler, that generates code for a
-platform different from the build platform, you should specify the
-"host" platform (i.e., that on which the generated programs will
-eventually be run) with '--host=TYPE'.
-
-Sharing Defaults
-================
-
- If you want to set default values for 'configure' scripts to share,
-you can create a site shell script called 'config.site' that gives
-default values for variables like 'CC', 'cache_file', and 'prefix'.
-'configure' looks for 'PREFIX/share/config.site' if it exists, then
-'PREFIX/etc/config.site' if it exists. Or, you can set the
-'CONFIG_SITE' environment variable to the location of the site script.
-A warning: not all 'configure' scripts look for a site script.
-
-Defining Variables
-==================
-
- Variables not defined in a site shell script can be set in the
-environment passed to 'configure'. However, some packages may run
-configure again during the build, and the customized values of these
-variables may be lost. In order to avoid this problem, you should set
-them in the 'configure' command line, using 'VAR=value'. For example:
-
- ./configure CC=/usr/local2/bin/gcc
-
-causes the specified 'gcc' to be used as the C compiler (unless it is
-overridden in the site shell script).
-
-Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an
-Autoconf limitation. Until the limitation is lifted, you can use this
-workaround:
-
- CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
-
-'configure' Invocation
-======================
-
- 'configure' recognizes the following options to control how it
-operates.
-
-'--help'
-'-h'
- Print a summary of all of the options to 'configure', and exit.
-
-'--help=short'
-'--help=recursive'
- Print a summary of the options unique to this package's
- 'configure', and exit. The 'short' variant lists options used only
- in the top level, while the 'recursive' variant lists options also
- present in any nested packages.
-
-'--version'
-'-V'
- Print the version of Autoconf used to generate the 'configure'
- script, and exit.
-
-'--cache-file=FILE'
- Enable the cache: use and save the results of the tests in FILE,
- traditionally 'config.cache'. FILE defaults to '/dev/null' to
- disable caching.
-
-'--config-cache'
-'-C'
- Alias for '--cache-file=config.cache'.
-
-'--quiet'
-'--silent'
-'-q'
- Do not print messages saying which checks are being made. To
- suppress all normal output, redirect it to '/dev/null' (any error
- messages will still be shown).
-
-'--srcdir=DIR'
- Look for the package's source code in directory DIR. Usually
- 'configure' can determine that directory automatically.
-
-'--prefix=DIR'
- Use DIR as the installation prefix. *note Installation Names:: for
- more details, including other options available for fine-tuning the
- installation locations.
-
-'--no-create'
-'-n'
- Run the configure checks, but stop before creating any output
- files.
-
-'configure' also accepts some other, not widely useful, options. Run
-'configure --help' for more details.
diff --git a/libs/Pcre16/docs/NON-AUTOTOOLS-BUILD b/libs/Pcre16/docs/NON-AUTOTOOLS-BUILD
deleted file mode 100644
index 37f6164475..0000000000
--- a/libs/Pcre16/docs/NON-AUTOTOOLS-BUILD
+++ /dev/null
@@ -1,773 +0,0 @@
-Building PCRE without using autotools
--------------------------------------
-
-NOTE: This document relates to PCRE releases that use the original API, with
-library names libpcre, libpcre16, and libpcre32. January 2015 saw the first
-release of a new API, known as PCRE2, with release numbers starting at 10.00
-and library names libpcre2-8, libpcre2-16, and libpcre2-32. The old libraries
-(now called PCRE1) are still being maintained for bug fixes, but there will be
-no new development. New projects are advised to use the new PCRE2 libraries.
-
-
-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
- Linking programs in Windows environments
- Calling conventions in Windows environments
- Comments about Win32 builds
- Building PCRE on Windows with CMake
- Use of relative paths with CMake on Windows
- Testing with RunTest.bat
- Building under Windows CE with Visual Studio 200x
- Building under Windows with BCC5.5
- Building using Borland C++ Builder 2007 (CB2007) and higher
- Building PCRE on OpenVMS
- Building PCRE on Stratus OpenVOS
- Building PCRE on native z/OS and z/VM
-
-
-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 Linux systems are untested by me.
-
-There are some other comments and files (including some documentation in CHM
-format) in the Contrib directory on the FTP site:
-
- ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/Contrib
-
-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 a "configure" file for use by the configure/make
-(autotools) build system, as found in many Unix-like environments. The README
-file contains information about the options for "configure".
-
-There is also support for CMake, which some users prefer, especially in Windows
-environments, though it can also be run in Unix-like environments. See the
-section entitled "Building PCRE on Windows with CMake" below.
-
-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 those who
-build PCRE without using "configure" or CMake. If you use "configure" or CMake,
-the .generic versions are not used.
-
-
-GENERIC INSTRUCTIONS FOR THE PCRE C LIBRARY
-
-The following are generic instructions for building the PCRE C library "by
-hand". If you are going to use CMake, this section does not apply to you; you
-can skip ahead to the CMake section.
-
- (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, you can alter the definition of the NEWLINE macro to
- specify what character(s) you want to be interpreted as line terminators.
- In an EBCDIC environment, you MUST change NEWLINE, because its default
- value is 10, an ASCII LF. The usual EBCDIC newline character is 21 (0x15,
- NL), though in some cases it may be 37 (0x25).
-
- 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
-
- (5) For an 8-bit library, 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_byte_order.c
- 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_jit_compile.c
- pcre_maketables.c
- pcre_newline.c
- pcre_ord2utf8.c
- pcre_refcount.c
- pcre_string_utils.c
- pcre_study.c
- pcre_tables.c
- pcre_ucd.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.
-
- Note that you must still compile pcre_jit_compile.c, even if you have not
- defined SUPPORT_JIT in config.h, because when JIT support is not
- configured, dummy functions are compiled. When JIT support IS configured,
- pcre_jit_compile.c #includes sources from the sljit subdirectory, where
- there should be 16 files, all of whose names begin with "sljit".
-
- (6) Now link all the compiled code into an object library in whichever form
- your system keeps such libraries. This is the basic PCRE C 8-bit library.
- If your system has static and shared libraries, you may have to do this
- once for each type.
-
- (7) If you want to build a 16-bit library (as well as, or instead of the 8-bit
- or 32-bit libraries) repeat steps 5-6 with the following files:
-
- pcre16_byte_order.c
- pcre16_chartables.c
- pcre16_compile.c
- pcre16_config.c
- pcre16_dfa_exec.c
- pcre16_exec.c
- pcre16_fullinfo.c
- pcre16_get.c
- pcre16_globals.c
- pcre16_jit_compile.c
- pcre16_maketables.c
- pcre16_newline.c
- pcre16_ord2utf16.c
- pcre16_refcount.c
- pcre16_string_utils.c
- pcre16_study.c
- pcre16_tables.c
- pcre16_ucd.c
- pcre16_utf16_utils.c
- pcre16_valid_utf16.c
- pcre16_version.c
- pcre16_xclass.c
-
- (8) If you want to build a 32-bit library (as well as, or instead of the 8-bit
- or 16-bit libraries) repeat steps 5-6 with the following files:
-
- pcre32_byte_order.c
- pcre32_chartables.c
- pcre32_compile.c
- pcre32_config.c
- pcre32_dfa_exec.c
- pcre32_exec.c
- pcre32_fullinfo.c
- pcre32_get.c
- pcre32_globals.c
- pcre32_jit_compile.c
- pcre32_maketables.c
- pcre32_newline.c
- pcre32_ord2utf32.c
- pcre32_refcount.c
- pcre32_string_utils.c
- pcre32_study.c
- pcre32_tables.c
- pcre32_ucd.c
- pcre32_utf32_utils.c
- pcre32_valid_utf32.c
- pcre32_version.c
- pcre32_xclass.c
-
- (9) If you want to build the POSIX wrapper functions (which apply only to the
- 8-bit library), ensure that you have the pcreposix.h file and then compile
- pcreposix.c (remembering -DHAVE_CONFIG_H if necessary). Link the result
- (on its own) as the pcreposix library.
-
-(10) The pcretest program can be linked with any combination of the 8-bit,
- 16-bit and 32-bit libraries (depending on what you selected in config.h).
- Compile pcretest.c and pcre_printint.c (again, don't forget
- -DHAVE_CONFIG_H) and link them together with the appropriate library/ies.
- If you compiled an 8-bit library, pcretest also needs the pcreposix
- wrapper library unless you compiled it with -DNOPOSIX.
-
-(11) Run pcretest on the testinput files in the testdata directory, and check
- that the output matches the corresponding testoutput files. There are
- comments about what each test does in the section entitled "Testing PCRE"
- in the README file. If you compiled more than one of the 8-bit, 16-bit and
- 32-bit libraries, you need to run pcretest with the -16 option to do
- 16-bit tests and with the -32 option to do 32-bit tests.
-
- Some tests are relevant only when certain build-time options are selected.
- For example, test 4 is for UTF-8/UTF-16/UTF-32 support, and will not run
- if you have built PCRE without it. See the comments at the start of each
- testinput file. If you have a suitable Unix-like shell, the RunTest script
- will run the appropriate tests for you. The command "RunTest list" will
- output a list of all the tests.
-
- 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.
-
-(12) If you have built PCRE with SUPPORT_JIT, the JIT features will be tested
- by the testdata files. However, you might also like to build and run
- the freestanding JIT test program, pcre_jit_test.c.
-
-(13) If you want to use the pcregrep command, compile and link pcregrep.c; it
- uses only the basic 8-bit PCRE library (it does not need the pcreposix
- library).
-
-
-THE C++ WRAPPER FUNCTIONS
-
-The PCRE distribution also contains some C++ wrapper functions and tests,
-applicable to the 8-bit library, which were 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. 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.
-
-
-STACK SIZE IN WINDOWS ENVIRONMENTS
-
-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.
-
-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.
-
-
-LINKING PROGRAMS IN WINDOWS ENVIRONMENTS
-
-If you want to statically link a program against a PCRE library in the form of
-a non-dll .a file, you must define PCRE_STATIC before including pcre.h or
-pcrecpp.h, otherwise the pcre_malloc() and pcre_free() exported functions will
-be declared __declspec(dllimport), with unwanted results.
-
-
-CALLING CONVENTIONS IN WINDOWS ENVIRONMENTS
-
-It is possible to compile programs to use different calling conventions using
-MSVC. Search the web for "calling conventions" for more information. To make it
-easier to change the calling convention for the exported functions in the
-PCRE library, the macro PCRE_CALL_CONVENTION is present in all the external
-definitions. It can be set externally when compiling (e.g. in CFLAGS). If it is
-not set, it defaults to empty; the default calling convention is then used
-(which is what is wanted most of the time).
-
-
-COMMENTS ABOUT WIN32 BUILDS (see also "BUILDING PCRE ON WINDOWS WITH CMAKE")
-
-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
-support for building using CMake, which some users find a more straightforward
-way of building PCRE under Windows.
-
-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 link 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.)
-
-A user submitted a special-purpose patch that makes it easy to create
-"pcre.dll" under mingw32 using the "msys" environment. It provides "pcre.dll"
-as a special target. If you use this target, no other files are built, and in
-particular, the pcretest and pcregrep programs are not built. An example of how
-this might be used is:
-
- ./configure --enable-utf --disable-cpp CFLAGS="-03 -s"; make pcre.dll
-
-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. Unless your PCRE library uses a default newline
-option that includes LF as a valid newline, it may be necessary to change the
-line terminators in the test files to get some of the tests to work.
-
-
-BUILDING PCRE ON WINDOWS WITH CMAKE
-
-CMake is an alternative configuration facility that can be used instead of
-"configure". CMake creates project files (make files, solution files, etc.)
-tailored to numerous development environments, including Visual Studio,
-Borland, Msys, MinGW, NMake, and Unix. If possible, use short paths with no
-spaces in the names for your CMake installation and your PCRE source and build
-directories.
-
-The following instructions were contributed by a PCRE user. If they are not
-followed exactly, errors may occur. In the event that errors do occur, it is
-recommended that you delete the CMake cache before attempting to repeat the
-CMake build process. In the CMake GUI, the cache can be deleted by selecting
-"File > Delete Cache".
-
-1. Install the latest CMake version available from http://www.cmake.org/, 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. You should ensure your local date and time
- is not earlier than the file dates in your source dir if the release is
- very new.
-
-3. Create a new, empty build directory, preferably a subdirectory of the
- source dir. For example, C:\pcre\pcre-xx\build.
-
-4. Run cmake-gui from the Shell envirornment of your build tool, for example,
- Msys for Msys/MinGW or Visual Studio Command Prompt for VC/VC++. Do not try
- to start Cmake from the Windows Start menu, as this can lead to errors.
-
-5. Enter C:\pcre\pcre-xx and C:\pcre\pcre-xx\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 or other PCRE optional features.
-
-9. Hit "Configure" again. The adjacent "Generate" button should now be
- active.
-
-10. Hit "Generate".
-
-11. The build directory should now contain a usable build system, be it a
- solution file for Visual Studio, makefiles for MinGW, etc. Exit from
- cmake-gui and use the generated build system with your compiler or IDE.
- E.g., for MinGW you can run "make", or for Visual Studio, open the PCRE
- solution, select the desired configuration (Debug, or Release, etc.) and
- build the ALL_BUILD project.
-
-12. If during configuration with cmake-gui you've elected to build the test
- programs, you can execute them by building the test project. E.g., for
- MinGW: "make test"; for Visual Studio build the RUN_TESTS project. The
- most recent build configuration is targeted by the tests. A summary of
- test results is presented. Complete test output is subsequently
- available for review in Testing\Temporary under your build dir.
-
-
-USE OF RELATIVE PATHS WITH CMAKE ON WINDOWS
-
-A PCRE user comments as follows: I thought that others may want to know the
-current state of CMAKE_USE_RELATIVE_PATHS support on Windows. Here it is:
-
--- AdditionalIncludeDirectories is only partially modified (only the
- first path - see below)
--- Only some of the contained file paths are modified - shown below for
- pcre.vcproj
--- It properly modifies
-
-I am sure CMake people can fix that if they want to. Until then one will
-need to replace existing absolute paths in project files with relative
-paths manually (e.g. from VS) - relative to project file location. I did
-just that before being told to try CMAKE_USE_RELATIVE_PATHS. Not a big
-deal.
-
-AdditionalIncludeDirectories="E:\builds\pcre\build;E:\builds\pcre\pcre-7.5;"
-AdditionalIncludeDirectories=".;E:\builds\pcre\pcre-7.5;"
-
-RelativePath="pcre.h"
-RelativePath="pcre_chartables.c"
-RelativePath="pcre_chartables.c.rule"
-
-
-TESTING WITH RUNTEST.BAT
-
-If configured with CMake, building the test project ("make test" or building
-ALL_TESTS in Visual Studio) creates (and runs) pcre_test.bat (and depending
-on your configuration options, possibly other test programs) in the build
-directory. Pcre_test.bat runs RunTest.Bat with correct source and exe paths.
-
-For manual testing with RunTest.bat, provided the build dir is a subdirectory
-of the source directory: Open command shell window. Chdir to the location
-of your pcretest.exe and pcregrep.exe programs. Call RunTest.bat with
-"..\RunTest.Bat" or "..\..\RunTest.bat" as appropriate.
-
-To run only a particular test with RunTest.Bat provide a test number argument.
-
-Otherwise:
-
-1. Copy RunTest.bat into the directory where pcretest.exe and pcregrep.exe
- have been created.
-
-2. Edit RunTest.bat to indentify the full or relative location of
- the pcre source (wherein which the testdata folder resides), e.g.:
-
- set srcdir=C:\pcre\pcre-8.20
-
-3. In a Windows command environment, chdir to the location of your bat and
- exe programs.
-
-4. Run RunTest.bat. Test outputs will automatically be compared to expected
- results, and discrepancies will be identified in the console output.
-
-To independently test the just-in-time compiler, run pcre_jit_test.exe.
-To test pcrecpp, run pcrecpp_unittest.exe, pcre_stringpiece_unittest.exe and
-pcre_scanner_unittest.exe.
-
-
-BUILDING UNDER WINDOWS CE WITH VISUAL STUDIO 200x
-
-Vincent Richomme sent a zip archive of files to help with this process. They
-can be found in the file "pcre-vsbuild.zip" in the Contrib directory of the FTP
-site.
-
-
-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 USING BORLAND C++ BUILDER 2007 (CB2007) AND HIGHER
-
-A PCRE user sent these comments about this environment (see also the comment
-from another user that follows them):
-
-The XE versions of C++ Builder come with a RegularExpressionsCore class which
-contain a version of TPerlRegEx. However, direct use of the C PCRE library may
-be desirable.
-
-The default makevp.bat, however, supplied with PCRE builds a version of PCRE
-that is not usable with any version of C++ Builder because the compiler ships
-with an embedded version of PCRE, version 2.01 from 1998! [See also the note
-about BCC5.5 above.] If you want to use PCRE you'll need to rename the
-functions (pcre_compile to pcre_compile_bcc, etc) or do as I have done and just
-use the 16 bit versions. I'm using std::wstring everywhere anyway. Since the
-embedded version of PCRE does not have the 16 bit function names, there is no
-conflict.
-
-Building PCRE using a C++ Builder static library project file (recommended):
-
-1. Rename or remove pcre.h, pcreposi.h, and pcreposix.h from your C++ Builder
-original include path.
-
-2. Download PCRE from pcre.org and extract to a directory.
-
-3. Rename pcre_chartables.c.dist to pcre_chartables.c, pcre.h.generic to
-pcre.h, and config.h.generic to config.h.
-
-4. Edit pcre.h and pcre_config.c so that they include config.h.
-
-5. Edit config.h like so:
-
-Comment out the following lines:
-#define PACKAGE "pcre"
-#define PACKAGE_BUGREPORT ""
-#define PACKAGE_NAME "PCRE"
-#define PACKAGE_STRING "PCRE 8.32"
-#define PACKAGE_TARNAME "pcre"
-#define PACKAGE_URL ""
-#define PACKAGE_VERSION "8.32"
-
-Add the following lines:
-#ifndef SUPPORT_UTF
-#define SUPPORT_UTF 100 // any value is fine
-#endif
-
-#ifndef SUPPORT_UCP
-#define SUPPORT_UCP 101 // any value is fine
-#endif
-
-#ifndef SUPPORT_UCP
-#define SUPPORT_PCRE16 102 // any value is fine
-#endif
-
-#ifndef SUPPORT_UTF8
-#define SUPPORT_UTF8 103 // any value is fine
-#endif
-
-6. Build a C++ Builder project using the IDE. Go to File / New / Other and
-choose Static Library. You can name it pcre.cbproj or whatever. Now set your
-paths by going to Project / Options. Set the Include path. Do this from the
-"Base" option to apply to both Release and Debug builds. Now add the following
-files to the project:
-
-pcre.h
-pcre16_byte_order.c
-pcre16_chartables.c
-pcre16_compile.c
-pcre16_config.c
-pcre16_dfa_exec.c
-pcre16_exec.c
-pcre16_fullinfo.c
-pcre16_get.c
-pcre16_globals.c
-pcre16_maketables.c
-pcre16_newline.c
-pcre16_ord2utf16.c
-pcre16_printint.c
-pcre16_refcount.c
-pcre16_string_utils.c
-pcre16_study.c
-pcre16_tables.c
-pcre16_ucd.c
-pcre16_utf16_utils.c
-pcre16_valid_utf16.c
-pcre16_version.c
-pcre16_xclass.c
-
-//Optional
-pcre_version.c
-
-7. After compiling the .lib file, copy the .lib and header files to a project
-you want to use PCRE with. Enjoy.
-
-Optional ... Building PCRE using the makevp.bat file:
-
-1. Edit makevp_c.txt and makevp_l.txt and change all the names to the 16 bit
-versions.
-
-2. Edit makevp.bat and set the path to C++ Builder. Run makevp.bat.
-
-Another PCRE user added this comment:
-
-Another approach I successfully used for some years with BCB 5 and 6 was to
-make sure that include and library paths of PCRE are configured before the
-default paths of the IDE in the dialogs where one can manage those paths.
-Afterwards one can open the project files using a text editor and manually add
-the self created library for pcre itself, pcrecpp doesn't ship with the IDE, in
-the library nodes where the IDE manages its own libraries to link against in
-front of the IDE-own libraries. This way one can use the default PCRE function
-names without getting access violations on runtime.
-
- <ALLLIB value="libpcre.lib $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib"/>
-
-
-BUILDING PCRE ON OPENVMS
-
-Stephen Hoffman sent the following, in December 2012:
-
-"Here <http://labs.hoffmanlabs.com/node/1847> is a very short write-up on the
-OpenVMS port and here
-
-<http://labs.hoffmanlabs.com/labsnotes/pcre-vms-8_32.zip>
-
-is a zip with the OpenVMS files, and with one modified testing-related PCRE
-file." This is a port of PCRE 8.32.
-
-Earlier, 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
-commands I used to build the library. I had to add #define
-POSIX_MALLOC_THRESHOLD 10 to pcre.h since it was not defined anywhere.
-
-The library was built on:
-O/S: HP OpenVMS v7.3-1
-Compiler: Compaq C v6.5-001-48BCD
-Linker: vA13-01
-
-The test results did not match 100% due to the issues you mention in your
-documentation regarding isprint(), iscntrl(), isgraph() and ispunct(). I
-modified some of the character tables temporarily and was able to get the
-results to match. Tests using the fr locale did not match since I don't have
-that locale loaded. The study size was always reported to be 3 less than the
-value in the standard test output files."
-
-=========================
-$! This DCL procedure builds PCRE on OpenVMS
-$!
-$! I followed the instructions in the non-unix-use file in the distribution.
-$!
-$ COMPILE == "CC/LIST/NOMEMBER_ALIGNMENT/PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES
-$ COMPILE DFTABLES.C
-$ LINK/EXE=DFTABLES.EXE DFTABLES.OBJ
-$ RUN DFTABLES.EXE/OUTPUT=CHARTABLES.C
-$ COMPILE MAKETABLES.C
-$ COMPILE GET.C
-$ COMPILE STUDY.C
-$! I had to set POSIX_MALLOC_THRESHOLD to 10 in PCRE.H since the symbol
-$! did not seem to be defined anywhere.
-$! I edited pcre.h and added #DEFINE SUPPORT_UTF8 to enable UTF8 support.
-$ COMPILE PCRE.C
-$ LIB/CREATE PCRE MAKETABLES.OBJ, GET.OBJ, STUDY.OBJ, PCRE.OBJ
-$! I had to set POSIX_MALLOC_THRESHOLD to 10 in PCRE.H since the symbol
-$! did not seem to be defined anywhere.
-$ COMPILE PCREPOSIX.C
-$ LIB/CREATE PCREPOSIX PCREPOSIX.OBJ
-$ COMPILE PCRETEST.C
-$ LINK/EXE=PCRETEST.EXE PCRETEST.OBJ, PCRE/LIB, PCREPOSIX/LIB
-$! C programs that want access to command line arguments must be
-$! defined as a symbol
-$ PCRETEST :== "$ SYS$ROADSUSERS:[DMOONEY.REGEXP]PCRETEST.EXE"
-$! Arguments must be enclosed in quotes.
-$ PCRETEST "-C"
-$! Test results:
-$!
-$! The test results did not match 100%. The functions isprint(), iscntrl(),
-$! isgraph() and ispunct() on OpenVMS must not produce the same results
-$! as the system that built the test output files provided with the
-$! distribution.
-$!
-$! The study size did not match and was always 3 less on OpenVMS.
-$!
-$! Locale could not be set to fr
-$!
-=========================
-
-
-BUILDING PCRE ON STRATUS OPENVOS
-
-These notes on the port of PCRE to VOS (lightly edited) were supplied by
-Ashutosh Warikoo, whose email address has the local part awarikoo and the
-domain nse.co.in. The port was for version 7.9 in August 2009.
-
-1. Building PCRE
-
-I built pcre on OpenVOS Release 17.0.1at using GNU Tools 3.4a without any
-problems. I used the following packages to build PCRE:
-
- ftp://ftp.stratus.com/pub/vos/posix/ga/posix.save.evf.gz
-
-Please read and follow the instructions that come with these packages. To start
-the build of pcre, from the root of the package type:
-
- ./build.sh
-
-2. Installing PCRE
-
-Once you have successfully built PCRE, login to the SysAdmin group, switch to
-the root user, and type
-
- [ !create_dir (master_disk)>usr --if needed ]
- [ !create_dir (master_disk)>usr>local --if needed ]
- !gmake install
-
-This installs PCRE and its man pages into /usr/local. You can add
-(master_disk)>usr>local>bin to your command search paths, or if you are in
-BASH, add /usr/local/bin to the PATH environment variable.
-
-4. Restrictions
-
-This port requires readline library optionally. However during the build I
-faced some yet unexplored errors while linking with readline. As it was an
-optional component I chose to disable it.
-
-5. Known Problems
-
-I ran the test suite, but you will have to be your own judge of whether this
-command, and this port, suits your purposes. If you find any problems that
-appear to be related to the port itself, please let me know. Please see the
-build.log file in the root of the package also.
-
-
-BUILDING PCRE ON NATIVE Z/OS AND Z/VM
-
-z/OS and z/VM are operating systems for mainframe computers, produced by IBM.
-The character code used is EBCDIC, not ASCII or Unicode. In z/OS, UNIX APIs and
-applications can be supported through UNIX System Services, and in such an
-environment PCRE can be built in the same way as in other systems. However, in
-native z/OS (without UNIX System Services) and in z/VM, special ports are
-required. PCRE1 version 8.39 is available in file 882 on this site:
-
- http://www.cbttape.org
-
-Everything, source and executable, is in EBCDIC and native z/OS file formats.
-However, this software is not maintained and will not be upgraded. If you are
-new to PCRE you should be looking at PCRE2 (version 10.30 or later).
-
-===============================
-Last Updated: 13 September 2017
-===============================
diff --git a/libs/Pcre16/docs/NON-UNIX-USE b/libs/Pcre16/docs/NON-UNIX-USE
deleted file mode 100644
index a25546b6ff..0000000000
--- a/libs/Pcre16/docs/NON-UNIX-USE
+++ /dev/null
@@ -1,7 +0,0 @@
-Compiling PCRE on non-Unix systems
-----------------------------------
-
-This has been renamed to better reflect its contents. Please see the file
-NON-AUTOTOOLS-BUILD for details of how to build PCRE without using autotools.
-
-####
diff --git a/libs/Pcre16/docs/README b/libs/Pcre16/docs/README
deleted file mode 100644
index 4887ebf350..0000000000
--- a/libs/Pcre16/docs/README
+++ /dev/null
@@ -1,1002 +0,0 @@
-README file for PCRE (Perl-compatible regular expression library)
------------------------------------------------------------------
-
-NOTE: This set of files relates to PCRE releases that use the original API,
-with library names libpcre, libpcre16, and libpcre32. January 2015 saw the
-first release of a new API, known as PCRE2, with release numbers starting at
-10.00 and library names libpcre2-8, libpcre2-16, and libpcre2-32. The old
-libraries (now called PCRE1) are still being maintained for bug fixes, but
-there will be no new development. New projects are advised to use the new PCRE2
-libraries.
-
-
-The latest release of PCRE1 is always available in three alternative formats
-from:
-
- ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-xxx.tar.gz
- ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-xxx.tar.bz2
- ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-xxx.zip
-
-There is a mailing list for discussion about the development of PCRE at
-pcre-dev@exim.org. You can access the archives and subscribe or manage your
-subscription here:
-
- https://lists.exim.org/mailman/listinfo/pcre-dev
-
-Please read the NEWS file if you are upgrading from a previous release.
-The contents of this README file are:
-
- The PCRE APIs
- Documentation for PCRE
- Contributions by users of PCRE
- Building PCRE on non-Unix-like systems
- Building PCRE without using autotools
- Building PCRE using autotools
- Retrieving configuration information
- Shared libraries
- Cross-compiling using autotools
- Using HP's ANSI C++ compiler (aCC)
- Compiling in Tru64 using native compilers
- Using Sun's compilers for Solaris
- Using PCRE from MySQL
- Making new tarballs
- Testing PCRE
- Character tables
- File manifest
-
-
-The PCRE APIs
--------------
-
-PCRE is written in C, and it has its own API. There are three sets of
-functions, one for the 8-bit library, which processes strings of bytes, one for
-the 16-bit library, which processes strings of 16-bit values, and one for the
-32-bit library, which processes strings of 32-bit values. The distribution also
-includes a set of C++ wrapper functions (see the pcrecpp man page for details),
-courtesy of Google Inc., which can be used to call the 8-bit PCRE library from
-C++. Other C++ wrappers have been created from time to time. See, for example:
-https://github.com/YasserAsmi/regexp, which aims to be simple and similar in
-style to the C API.
-
-The distribution also contains a set of C wrapper functions (again, just for
-the 8-bit library) 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, 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 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 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
- the listing of pcredemo.c and 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.
-
-Users of PCRE have contributed files containing the documentation for various
-releases in CHM format. These can be found in the Contrib directory of the FTP
-site (see next section).
-
-
-Contributions by users of PCRE
-------------------------------
-
-You can find contributions from PCRE users in the directory
-
- ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/Contrib
-
-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.
-
-A PCRE user maintains downloadable Windows binaries of the pcregrep and
-pcretest programs here:
-
- http://www.rexegg.com/pcregrep-pcretest.html
-
-
-Building PCRE on non-Unix-like systems
---------------------------------------
-
-For a non-Unix-like system, please read the comments in the file
-NON-AUTOTOOLS-BUILD, though if your system supports the use of "configure" and
-"make" you may be able to build PCRE using autotools in the same way as for
-many Unix-like systems.
-
-PCRE can also be configured using the GUI facility provided by CMake's
-cmake-gui command. This creates Makefiles, solution files, etc. The file
-NON-AUTOTOOLS-BUILD has information about CMake.
-
-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 without using autotools
--------------------------------------
-
-The use of autotools (in particular, libtool) is problematic in some
-environments, even some that are Unix or Unix-like. See the NON-AUTOTOOLS-BUILD
-file for ways of building PCRE without using autotools.
-
-
-Building PCRE using autotools
------------------------------
-
-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" (autotools) process.
-
-To build PCRE on system that supports autotools, 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 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. However,
-the usual methods of changing standard defaults are available. For example:
-
-CFLAGS='-O2 -Wall' ./configure --prefix=/opt/local
-
-This command specifies that the C compiler should be run with the flags '-O2
--Wall' instead of the default, and that "make install" should install PCRE
-under /opt/local instead of the default /usr/local.
-
-If you want to build in a different directory, just run "configure" with that
-directory as current. For example, suppose you have unpacked the PCRE source
-into /source/pcre/pcre-xxx, but you want to build it in /build/pcre/pcre-xxx:
-
-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. They are also documented in the pcrebuild man page.
-
-. By default, both shared and static libraries are built. You can change this
- by adding one of these options to the "configure" command:
-
- --disable-shared
- --disable-static
-
- (See also "Shared libraries on Unix-like systems" below.)
-
-. By default, only the 8-bit library is built. If you add --enable-pcre16 to
- the "configure" command, the 16-bit library is also built. If you add
- --enable-pcre32 to the "configure" command, the 32-bit library is also built.
- If you want only the 16-bit or 32-bit library, use --disable-pcre8 to disable
- building the 8-bit library.
-
-. If you are building the 8-bit library and want to suppress the building of
- the C++ wrapper library, you can add --disable-cpp to the "configure"
- command. Otherwise, when "configure" is run without --disable-pcre8, 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 include support for just-in-time compiling, which can give
- large performance improvements on certain platforms, add --enable-jit to the
- "configure" command. This support is available only for certain hardware
- architectures. If you try to enable it on an unsupported architecture, there
- will be a compile time error.
-
-. When JIT support is enabled, pcregrep automatically makes use of it, unless
- you add --disable-pcregrep-jit to the "configure" command.
-
-. If you want to make use of the support for UTF-8 Unicode character strings in
- the 8-bit library, or UTF-16 Unicode character strings in the 16-bit library,
- or UTF-32 Unicode character strings in the 32-bit library, you must add
- --enable-utf to the "configure" command. Without it, the code for handling
- UTF-8, UTF-16 and UTF-8 is not included in the relevant library. Even
- when --enable-utf is included, the use of a UTF encoding still has to be
- enabled by an option at run time. When PCRE is compiled with this option, its
- input can only either be ASCII or UTF-8/16/32, even when running on EBCDIC
- platforms. It is not possible to use both --enable-utf and --enable-ebcdic at
- the same time.
-
-. There are no separate options for enabling UTF-8, UTF-16 and UTF-32
- independently because that would allow ridiculous settings such as requesting
- UTF-16 support while building only the 8-bit library. However, the option
- --enable-utf8 is retained for backwards compatibility with earlier releases
- that did not support 16-bit or 32-bit character strings. It is synonymous with
- --enable-utf. It is not possible to configure one library with UTF support
- and the other without in the same configuration.
-
-. If, in addition to support for UTF-8/16/32 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 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 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 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 that limits the depth of nesting of parentheses in a
- pattern. This limits the amount of system stack that a pattern uses when it
- is compiled. The default is 250, but you can change it by setting, for
- example,
-
- --with-parens-nest-limit=500
-
-. PCRE has a counter that can be set to limit the amount of resources it uses
- when matching a pattern. 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 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. In the 8-bit
- library, PCRE then uses three bytes instead of two for offsets to different
- parts of the compiled pattern. In the 16-bit library, --with-link-size=3 is
- the same as --with-link-size=4, which (in both libraries) uses four-byte
- offsets. Increasing the internal link size reduces performance. In the 32-bit
- library, the only supported link size is 4.
-
-. 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. This applies only to the
- normal execution of the pcre_exec() function; if JIT support is being
- successfully used, it is not relevant. Equally, 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.
-
-. It is possible to compile PCRE for use on systems that use EBCDIC as their
- character code (as opposed to ASCII/Unicode) by specifying
-
- --enable-ebcdic
-
- This automatically implies --enable-rebuild-chartables (see above). However,
- when PCRE is built this way, it always operates in EBCDIC. It cannot support
- both EBCDIC and UTF-8/16/32. There is a second option, --enable-ebcdic-nl25,
- which specifies that the code value for the EBCDIC NL character is 0x25
- instead of the default 0x15.
-
-. In environments where valgrind is installed, if you specify
-
- --enable-valgrind
-
- PCRE will use valgrind annotations to mark certain memory regions as
- unaddressable. This allows it to detect invalid memory accesses, and is
- mostly useful for debugging PCRE itself.
-
-. In environments where the gcc compiler is used and lcov version 1.6 or above
- is installed, if you specify
-
- --enable-coverage
-
- the build process implements a code coverage report for the test suite. The
- report is generated by running "make coverage". If ccache is installed on
- your system, it must be disabled when building PCRE for coverage reporting.
- You can do this by setting the environment variable CCACHE_DISABLE=1 before
- running "make" to build PCRE. There is more information about coverage
- reporting in the "pcrebuild" documentation.
-
-. The pcregrep program currently supports only 8-bit data files, and so
- requires the 8-bit PCRE library. It is possible to compile pcregrep to use
- libz and/or libbz2, in order to read .gz and .bz2 files (respectively), by
- specifying one or both of
-
- --enable-pcregrep-libz
- --enable-pcregrep-libbz2
-
- Of course, the relevant libraries must be installed on your system.
-
-. The default size (in bytes) of the internal buffer used by pcregrep can be
- set by, for example:
-
- --with-pcregrep-bufsize=51200
-
- The value must be a plain integer. The default is 20480.
-
-. It is possible to compile pcretest so that it links with the libreadline
- or libedit libraries, by specifying, respectively,
-
- --enable-pcretest-libreadline or --enable-pcretest-libedit
-
- If this is done, when pcretest's input is from a terminal, it reads it using
- the readline() function. This provides line-editing and history facilities.
- Note that libreadline is GPL-licenced, so if you distribute a binary of
- pcretest linked in this way, there may be licensing issues. These can be
- avoided by linking with libedit (which has a BSD licence) instead.
-
- Enabling libreadline causes the -lreadline option to be added to the pcretest
- build. In many operating environments with a sytem-installed readline
- library this is sufficient. However, in some environments (e.g. if an
- unmodified distribution version of readline is in use), it may be necessary
- to specify something like LIBS="-lncurses" as well. This is because, to quote
- the readline INSTALL, "Readline uses the termcap functions, but does not link
- with the termcap or curses library itself, allowing applications which link
- with readline the to choose an appropriate library." If you get error
- messages about missing functions tgetstr, tgetent, tputs, tgetflag, or tgoto,
- this is the problem, and linking with the ncurses library should fix it.
-
-The "configure" script builds the following files for the basic C library:
-
-. Makefile the makefile that builds the library
-. config.h build-time configuration options for the library
-. pcre.h the public PCRE header file
-. pcre-config script that shows the building settings such as CFLAGS
- that were set for "configure"
-. libpcre.pc ) data for the pkg-config command
-. libpcre16.pc )
-. libpcre32.pc )
-. libpcreposix.pc )
-. libtool script that builds shared and/or static libraries
-
-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 those who
-have to built PCRE without using "configure" or CMake. If you use "configure"
-or CMake, the .generic versions are not used.
-
-When building the 8-bit library, if a C++ compiler is found, the following
-files are also built:
-
-. libpcrecpp.pc data for the pkg-config command
-. pcrecpparg.h header file for calling PCRE via the C++ wrapper
-. pcre_stringpiece.h 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". This builds the the libraries
-libpcre, libpcre16 and/or libpcre32, and a test program called pcretest. If you
-enabled JIT support with --enable-jit, a test program called pcre_jit_test is
-built as well.
-
-If the 8-bit library is built, libpcreposix and the pcregrep command are also
-built, and if a C++ compiler was found on your system, and you did not disable
-it with --disable-cpp, "make" builds the C++ wrapper library, which is called
-libpcrecpp, as well as some test programs called pcrecpp_unittest,
-pcre_scanner_unittest, and pcre_stringpiece_unittest.
-
-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 (if 8-bit support is enabled)
- pcre-config
-
- Libraries (lib):
- libpcre16 (if 16-bit support is enabled)
- libpcre32 (if 32-bit support is enabled)
- libpcre (if 8-bit support is enabled)
- libpcreposix (if 8-bit support is enabled)
- libpcrecpp (if 8-bit and C++ support is enabled)
-
- Configuration information (lib/pkgconfig):
- libpcre16.pc
- libpcre32.pc
- libpcre.pc
- libpcreposix.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-config.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
- pcre-config.txt the pcre-config man page
-
-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
-------------------------------------
-
-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
-
-prints the version number, and
-
- pcre-config --libs
-
-outputs information about where the library is installed. This command can be
-included in makefiles for programs that use PCRE, saving the programmer from
-having to remember too many details.
-
-The pkg-config command is another system for saving and retrieving information
-about installed libraries. Instead of separate commands for each library, a
-single command is used. For example:
-
- pkg-config --cflags pcre
-
-The data is held in *.pc files that are installed in a directory called
-<prefix>/lib/pkgconfig.
-
-
-Shared libraries
-----------------
-
-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
-libraries. They are placed in a subdirectory called .libs when they are newly
-built. The programs pcretest and pcregrep are built to use these uninstalled
-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 build directory still
-use the uninstalled libraries.
-
-To build PCRE using static libraries only you must use --disable-shared when
-configuring it. For example:
-
-./configure --prefix=/usr/gnu --disable-shared
-
-Then run "make" in the usual way. Similarly, you can use --disable-static to
-build only shared libraries.
-
-
-Cross-compiling using autotools
--------------------------------
-
-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, 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"
-
-
-Compiling in Tru64 using native compilers
------------------------------------------
-
-The following error may occur when compiling with native compilers in the Tru64
-operating system:
-
- CXX libpcrecpp_la-pcrecpp.lo
-cxx: Error: /usr/lib/cmplrs/cxx/V7.1-006/include/cxx/iosfwd, line 58: #error
- directive: "cannot include iosfwd -- define __USE_STD_IOSTREAM to
- override default - see section 7.1.2 of the C++ Using Guide"
-#error "cannot include iosfwd -- define __USE_STD_IOSTREAM to override default
-- see section 7.1.2 of the C++ Using Guide"
-
-This may be followed by other errors, complaining that 'namespace "std" has no
-member'. The solution to this is to add the line
-
-#define __USE_STD_IOSTREAM 1
-
-to the config.h file.
-
-
-Using Sun's compilers for Solaris
----------------------------------
-
-A user reports that the following configurations work on Solaris 9 sparcv9 and
-Solaris 9 x86 (32-bit):
-
- Solaris 9 sparcv9: ./configure --disable-cpp CC=/bin/cc CFLAGS="-m64 -g"
- Solaris 9 x86: ./configure --disable-cpp CC=/bin/cc CFLAGS="-g"
-
-
-Using PCRE from MySQL
----------------------
-
-On systems where both PCRE and MySQL are installed, it is possible to make use
-of PCRE from within MySQL, as an alternative to the built-in pattern matching.
-There is a web page that tells you how to do this:
-
- http://www.mysqludf.org/lib_mysqludf_preg/index.php
-
-
-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 the basic PCRE library on a Unix-like system, run the RunTest script.
-There is another 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. When JIT support is enabled, another test program called
-pcre_jit_test is built.
-
-Both the scripts and all the program tests are run if you obey "make check" or
-"make test". For other environments, see the instructions in
-NON-AUTOTOOLS-BUILD.
-
-The RunTest script runs the pcretest test program (which is documented in its
-own man page) on each of the relevant testinput files in the testdata
-directory, and compares the output with the contents of the corresponding
-testoutput files. RunTest uses a file called testtry to hold the main output
-from pcretest. Other files whose names begin with "test" are used as working
-files in some tests.
-
-Some tests are relevant only when certain build-time options were selected. For
-example, the tests for UTF-8/16/32 support are run only if --enable-utf was
-used. RunTest outputs a comment when it skips a test.
-
-Many of the tests that are not skipped are run up to three times. The second
-run forces pcre_study() to be called for all patterns except for a few in some
-tests that are marked "never study" (see the pcretest program for how this is
-done). If JIT support is available, the non-DFA tests are run a third time,
-this time with a forced pcre_study() with the PCRE_STUDY_JIT_COMPILE option.
-This testing can be suppressed by putting "nojit" on the RunTest command line.
-
-The entire set of tests is run once for each of the 8-bit, 16-bit and 32-bit
-libraries that are enabled. If you want to run just one set of tests, call
-RunTest with either the -8, -16 or -32 option.
-
-If valgrind is installed, you can run the tests under it by putting "valgrind"
-on the RunTest command line. To run pcretest on just one or more specific test
-files, give their numbers as arguments to RunTest, for example:
-
- RunTest 2 7 11
-
-You can also specify ranges of tests such as 3-6 or 3- (meaning 3 to the
-end), or a number preceded by ~ to exclude a test. For example:
-
- Runtest 3-15 ~10
-
-This runs tests 3 to 15, excluding test 10, and just ~13 runs all the tests
-except test 13. Whatever order the arguments are in, the tests are always run
-in numerical order.
-
-You can also call RunTest with the single argument "list" to cause it to output
-a list of tests.
-
-The first test file can 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_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 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
-character tables may be different (see next paragraph). In some cases, this may
-cause failures in the second set of tests. For example, in a locale where the
-isprint() function yields TRUE for characters in the range 128-255, the use of
-[:isascii:] inside a character class defines a different set of characters, and
-this shows up in this test as a difference in the compiled code, which is being
-listed for checking. Where the comparison test output contains [\x00-\x7f] the
-test will contain [\x00-\xff], and similarly in some other cases. This is not a
-bug in PCRE.
-
-The third set of tests checks pcre_maketables(), the facility for building a
-set of character tables for a specific locale and using them instead of the
-default tables. The tests make use of the "fr_FR" (French) locale. Before
-running the test, the script checks for the presence of this locale by running
-the "locale" command. If that command fails, or if it doesn't include "fr_FR"
-in the list of available locales, the third test cannot be run, and a comment
-is output to say why. If running this test produces instances of the error
-
- ** Failed to set locale "fr_FR"
-
-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 and fifth tests check the UTF-8/16/32 support and error handling and
-internal UTF features of PCRE that are not relevant to Perl, respectively. The
-sixth and seventh tests do the same for Unicode character properties support.
-
-The eighth, ninth, and tenth tests check the pcre_dfa_exec() alternative
-matching function, in non-UTF-8/16/32 mode, UTF-8/16/32 mode, and UTF-8/16/32
-mode with Unicode property support, respectively.
-
-The eleventh test checks some internal offsets and code size features; it is
-run only when the default "link size" of 2 is set (in other cases the sizes
-change) and when Unicode property support is enabled.
-
-The twelfth test is run only when JIT support is available, and the thirteenth
-test is run only when JIT support is not available. They test some JIT-specific
-features such as information output from pcretest about JIT compilation.
-
-The fourteenth, fifteenth, and sixteenth tests are run only in 8-bit mode, and
-the seventeenth, eighteenth, and nineteenth tests are run only in 16/32-bit
-mode. These are tests that generate different output in the two modes. They are
-for general cases, UTF-8/16/32 support, and Unicode property support,
-respectively.
-
-The twentieth test is run only in 16/32-bit mode. It tests some specific
-16/32-bit features of the DFA matching engine.
-
-The twenty-first and twenty-second tests are run only in 16/32-bit mode, when
-the link size is set to 2 for the 16-bit library. They test reloading
-pre-compiled patterns.
-
-The twenty-third and twenty-fourth tests are run only in 16-bit mode. They are
-for general cases, and UTF-16 support, respectively.
-
-The twenty-fifth and twenty-sixth tests are run only in 32-bit mode. They are
-for general cases, and UTF-32 support, respectively.
-
-
-Character tables
-----------------
-
-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 for code points less
-than 256.
-
-The final 256-byte table has bits indicating various character types, as
-follows:
-
- 1 white space character
- 2 letter
- 4 decimal digit
- 8 hexadecimal digit
- 16 alphanumeric or '_'
- 128 regular expression metacharacter or binary zero
-
-You should not alter the set of characters that contain the 128 bit, as that
-will cause PCRE to malfunction.
-
-
-File manifest
--------------
-
-The distribution should contain the files listed below. Where a file name is
-given as pcre[16|32]_xxx it means that there are three files, one with the name
-pcre_xxx, one with the name pcre16_xx, and a third with the name pcre32_xxx.
-
-(A) Source files of the PCRE library functions and their headers:
-
- dftables.c auxiliary program for building pcre_chartables.c
- when --enable-rebuild-chartables is specified
-
- 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[16]_chartables.c
-
- pcreposix.c )
- pcre[16|32]_byte_order.c )
- pcre[16|32]_compile.c )
- pcre[16|32]_config.c )
- pcre[16|32]_dfa_exec.c )
- pcre[16|32]_exec.c )
- pcre[16|32]_fullinfo.c )
- pcre[16|32]_get.c ) sources for the functions in the library,
- pcre[16|32]_globals.c ) and some internal functions that they use
- pcre[16|32]_jit_compile.c )
- pcre[16|32]_maketables.c )
- pcre[16|32]_newline.c )
- pcre[16|32]_refcount.c )
- pcre[16|32]_string_utils.c )
- pcre[16|32]_study.c )
- pcre[16|32]_tables.c )
- pcre[16|32]_ucd.c )
- pcre[16|32]_version.c )
- pcre[16|32]_xclass.c )
- pcre_ord2utf8.c )
- pcre_valid_utf8.c )
- pcre16_ord2utf16.c )
- pcre16_utf16_utils.c )
- pcre16_valid_utf16.c )
- pcre32_utf32_utils.c )
- pcre32_valid_utf32.c )
-
- pcre[16|32]_printint.c ) debugging function that is used by 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
- sljit/* 16 files that make up the JIT compiler
- ucp.h header for Unicode property handling
-
- 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 the previous name for NON-AUTOTOOLS-BUILD
- NON-AUTOTOOLS-BUILD notes on building PCRE without using autotools
- 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 PCRE
- 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
- libpcre16.pc.in template for libpcre16.pc for pkg-config
- libpcre32.pc.in template for libpcre32.pc for pkg-config
- libpcre.pc.in template for libpcre.pc for pkg-config
- libpcreposix.pc.in template for libpcreposix.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
- pcre_jit_test.c test program for the JIT compiler
- 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
- testdata/* other supporting test files
-
-(D) Auxiliary files for cmake support
-
- cmake/COPYING-CMAKE-SCRIPTS
- cmake/FindPackageHandleStandardArgs.cmake
- cmake/FindEditline.cmake
- cmake/FindReadline.cmake
- 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
-Email local part: ph10
-Email domain: cam.ac.uk
-Last updated: 10 February 2015
diff --git a/libs/Pcre16/docs/doc/html/NON-AUTOTOOLS-BUILD.txt b/libs/Pcre16/docs/doc/html/NON-AUTOTOOLS-BUILD.txt
deleted file mode 100644
index 37f6164475..0000000000
--- a/libs/Pcre16/docs/doc/html/NON-AUTOTOOLS-BUILD.txt
+++ /dev/null
@@ -1,773 +0,0 @@
-Building PCRE without using autotools
--------------------------------------
-
-NOTE: This document relates to PCRE releases that use the original API, with
-library names libpcre, libpcre16, and libpcre32. January 2015 saw the first
-release of a new API, known as PCRE2, with release numbers starting at 10.00
-and library names libpcre2-8, libpcre2-16, and libpcre2-32. The old libraries
-(now called PCRE1) are still being maintained for bug fixes, but there will be
-no new development. New projects are advised to use the new PCRE2 libraries.
-
-
-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
- Linking programs in Windows environments
- Calling conventions in Windows environments
- Comments about Win32 builds
- Building PCRE on Windows with CMake
- Use of relative paths with CMake on Windows
- Testing with RunTest.bat
- Building under Windows CE with Visual Studio 200x
- Building under Windows with BCC5.5
- Building using Borland C++ Builder 2007 (CB2007) and higher
- Building PCRE on OpenVMS
- Building PCRE on Stratus OpenVOS
- Building PCRE on native z/OS and z/VM
-
-
-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 Linux systems are untested by me.
-
-There are some other comments and files (including some documentation in CHM
-format) in the Contrib directory on the FTP site:
-
- ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/Contrib
-
-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 a "configure" file for use by the configure/make
-(autotools) build system, as found in many Unix-like environments. The README
-file contains information about the options for "configure".
-
-There is also support for CMake, which some users prefer, especially in Windows
-environments, though it can also be run in Unix-like environments. See the
-section entitled "Building PCRE on Windows with CMake" below.
-
-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 those who
-build PCRE without using "configure" or CMake. If you use "configure" or CMake,
-the .generic versions are not used.
-
-
-GENERIC INSTRUCTIONS FOR THE PCRE C LIBRARY
-
-The following are generic instructions for building the PCRE C library "by
-hand". If you are going to use CMake, this section does not apply to you; you
-can skip ahead to the CMake section.
-
- (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, you can alter the definition of the NEWLINE macro to
- specify what character(s) you want to be interpreted as line terminators.
- In an EBCDIC environment, you MUST change NEWLINE, because its default
- value is 10, an ASCII LF. The usual EBCDIC newline character is 21 (0x15,
- NL), though in some cases it may be 37 (0x25).
-
- 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
-
- (5) For an 8-bit library, 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_byte_order.c
- 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_jit_compile.c
- pcre_maketables.c
- pcre_newline.c
- pcre_ord2utf8.c
- pcre_refcount.c
- pcre_string_utils.c
- pcre_study.c
- pcre_tables.c
- pcre_ucd.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.
-
- Note that you must still compile pcre_jit_compile.c, even if you have not
- defined SUPPORT_JIT in config.h, because when JIT support is not
- configured, dummy functions are compiled. When JIT support IS configured,
- pcre_jit_compile.c #includes sources from the sljit subdirectory, where
- there should be 16 files, all of whose names begin with "sljit".
-
- (6) Now link all the compiled code into an object library in whichever form
- your system keeps such libraries. This is the basic PCRE C 8-bit library.
- If your system has static and shared libraries, you may have to do this
- once for each type.
-
- (7) If you want to build a 16-bit library (as well as, or instead of the 8-bit
- or 32-bit libraries) repeat steps 5-6 with the following files:
-
- pcre16_byte_order.c
- pcre16_chartables.c
- pcre16_compile.c
- pcre16_config.c
- pcre16_dfa_exec.c
- pcre16_exec.c
- pcre16_fullinfo.c
- pcre16_get.c
- pcre16_globals.c
- pcre16_jit_compile.c
- pcre16_maketables.c
- pcre16_newline.c
- pcre16_ord2utf16.c
- pcre16_refcount.c
- pcre16_string_utils.c
- pcre16_study.c
- pcre16_tables.c
- pcre16_ucd.c
- pcre16_utf16_utils.c
- pcre16_valid_utf16.c
- pcre16_version.c
- pcre16_xclass.c
-
- (8) If you want to build a 32-bit library (as well as, or instead of the 8-bit
- or 16-bit libraries) repeat steps 5-6 with the following files:
-
- pcre32_byte_order.c
- pcre32_chartables.c
- pcre32_compile.c
- pcre32_config.c
- pcre32_dfa_exec.c
- pcre32_exec.c
- pcre32_fullinfo.c
- pcre32_get.c
- pcre32_globals.c
- pcre32_jit_compile.c
- pcre32_maketables.c
- pcre32_newline.c
- pcre32_ord2utf32.c
- pcre32_refcount.c
- pcre32_string_utils.c
- pcre32_study.c
- pcre32_tables.c
- pcre32_ucd.c
- pcre32_utf32_utils.c
- pcre32_valid_utf32.c
- pcre32_version.c
- pcre32_xclass.c
-
- (9) If you want to build the POSIX wrapper functions (which apply only to the
- 8-bit library), ensure that you have the pcreposix.h file and then compile
- pcreposix.c (remembering -DHAVE_CONFIG_H if necessary). Link the result
- (on its own) as the pcreposix library.
-
-(10) The pcretest program can be linked with any combination of the 8-bit,
- 16-bit and 32-bit libraries (depending on what you selected in config.h).
- Compile pcretest.c and pcre_printint.c (again, don't forget
- -DHAVE_CONFIG_H) and link them together with the appropriate library/ies.
- If you compiled an 8-bit library, pcretest also needs the pcreposix
- wrapper library unless you compiled it with -DNOPOSIX.
-
-(11) Run pcretest on the testinput files in the testdata directory, and check
- that the output matches the corresponding testoutput files. There are
- comments about what each test does in the section entitled "Testing PCRE"
- in the README file. If you compiled more than one of the 8-bit, 16-bit and
- 32-bit libraries, you need to run pcretest with the -16 option to do
- 16-bit tests and with the -32 option to do 32-bit tests.
-
- Some tests are relevant only when certain build-time options are selected.
- For example, test 4 is for UTF-8/UTF-16/UTF-32 support, and will not run
- if you have built PCRE without it. See the comments at the start of each
- testinput file. If you have a suitable Unix-like shell, the RunTest script
- will run the appropriate tests for you. The command "RunTest list" will
- output a list of all the tests.
-
- 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.
-
-(12) If you have built PCRE with SUPPORT_JIT, the JIT features will be tested
- by the testdata files. However, you might also like to build and run
- the freestanding JIT test program, pcre_jit_test.c.
-
-(13) If you want to use the pcregrep command, compile and link pcregrep.c; it
- uses only the basic 8-bit PCRE library (it does not need the pcreposix
- library).
-
-
-THE C++ WRAPPER FUNCTIONS
-
-The PCRE distribution also contains some C++ wrapper functions and tests,
-applicable to the 8-bit library, which were 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. 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.
-
-
-STACK SIZE IN WINDOWS ENVIRONMENTS
-
-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.
-
-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.
-
-
-LINKING PROGRAMS IN WINDOWS ENVIRONMENTS
-
-If you want to statically link a program against a PCRE library in the form of
-a non-dll .a file, you must define PCRE_STATIC before including pcre.h or
-pcrecpp.h, otherwise the pcre_malloc() and pcre_free() exported functions will
-be declared __declspec(dllimport), with unwanted results.
-
-
-CALLING CONVENTIONS IN WINDOWS ENVIRONMENTS
-
-It is possible to compile programs to use different calling conventions using
-MSVC. Search the web for "calling conventions" for more information. To make it
-easier to change the calling convention for the exported functions in the
-PCRE library, the macro PCRE_CALL_CONVENTION is present in all the external
-definitions. It can be set externally when compiling (e.g. in CFLAGS). If it is
-not set, it defaults to empty; the default calling convention is then used
-(which is what is wanted most of the time).
-
-
-COMMENTS ABOUT WIN32 BUILDS (see also "BUILDING PCRE ON WINDOWS WITH CMAKE")
-
-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
-support for building using CMake, which some users find a more straightforward
-way of building PCRE under Windows.
-
-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 link 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.)
-
-A user submitted a special-purpose patch that makes it easy to create
-"pcre.dll" under mingw32 using the "msys" environment. It provides "pcre.dll"
-as a special target. If you use this target, no other files are built, and in
-particular, the pcretest and pcregrep programs are not built. An example of how
-this might be used is:
-
- ./configure --enable-utf --disable-cpp CFLAGS="-03 -s"; make pcre.dll
-
-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. Unless your PCRE library uses a default newline
-option that includes LF as a valid newline, it may be necessary to change the
-line terminators in the test files to get some of the tests to work.
-
-
-BUILDING PCRE ON WINDOWS WITH CMAKE
-
-CMake is an alternative configuration facility that can be used instead of
-"configure". CMake creates project files (make files, solution files, etc.)
-tailored to numerous development environments, including Visual Studio,
-Borland, Msys, MinGW, NMake, and Unix. If possible, use short paths with no
-spaces in the names for your CMake installation and your PCRE source and build
-directories.
-
-The following instructions were contributed by a PCRE user. If they are not
-followed exactly, errors may occur. In the event that errors do occur, it is
-recommended that you delete the CMake cache before attempting to repeat the
-CMake build process. In the CMake GUI, the cache can be deleted by selecting
-"File > Delete Cache".
-
-1. Install the latest CMake version available from http://www.cmake.org/, 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. You should ensure your local date and time
- is not earlier than the file dates in your source dir if the release is
- very new.
-
-3. Create a new, empty build directory, preferably a subdirectory of the
- source dir. For example, C:\pcre\pcre-xx\build.
-
-4. Run cmake-gui from the Shell envirornment of your build tool, for example,
- Msys for Msys/MinGW or Visual Studio Command Prompt for VC/VC++. Do not try
- to start Cmake from the Windows Start menu, as this can lead to errors.
-
-5. Enter C:\pcre\pcre-xx and C:\pcre\pcre-xx\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 or other PCRE optional features.
-
-9. Hit "Configure" again. The adjacent "Generate" button should now be
- active.
-
-10. Hit "Generate".
-
-11. The build directory should now contain a usable build system, be it a
- solution file for Visual Studio, makefiles for MinGW, etc. Exit from
- cmake-gui and use the generated build system with your compiler or IDE.
- E.g., for MinGW you can run "make", or for Visual Studio, open the PCRE
- solution, select the desired configuration (Debug, or Release, etc.) and
- build the ALL_BUILD project.
-
-12. If during configuration with cmake-gui you've elected to build the test
- programs, you can execute them by building the test project. E.g., for
- MinGW: "make test"; for Visual Studio build the RUN_TESTS project. The
- most recent build configuration is targeted by the tests. A summary of
- test results is presented. Complete test output is subsequently
- available for review in Testing\Temporary under your build dir.
-
-
-USE OF RELATIVE PATHS WITH CMAKE ON WINDOWS
-
-A PCRE user comments as follows: I thought that others may want to know the
-current state of CMAKE_USE_RELATIVE_PATHS support on Windows. Here it is:
-
--- AdditionalIncludeDirectories is only partially modified (only the
- first path - see below)
--- Only some of the contained file paths are modified - shown below for
- pcre.vcproj
--- It properly modifies
-
-I am sure CMake people can fix that if they want to. Until then one will
-need to replace existing absolute paths in project files with relative
-paths manually (e.g. from VS) - relative to project file location. I did
-just that before being told to try CMAKE_USE_RELATIVE_PATHS. Not a big
-deal.
-
-AdditionalIncludeDirectories="E:\builds\pcre\build;E:\builds\pcre\pcre-7.5;"
-AdditionalIncludeDirectories=".;E:\builds\pcre\pcre-7.5;"
-
-RelativePath="pcre.h"
-RelativePath="pcre_chartables.c"
-RelativePath="pcre_chartables.c.rule"
-
-
-TESTING WITH RUNTEST.BAT
-
-If configured with CMake, building the test project ("make test" or building
-ALL_TESTS in Visual Studio) creates (and runs) pcre_test.bat (and depending
-on your configuration options, possibly other test programs) in the build
-directory. Pcre_test.bat runs RunTest.Bat with correct source and exe paths.
-
-For manual testing with RunTest.bat, provided the build dir is a subdirectory
-of the source directory: Open command shell window. Chdir to the location
-of your pcretest.exe and pcregrep.exe programs. Call RunTest.bat with
-"..\RunTest.Bat" or "..\..\RunTest.bat" as appropriate.
-
-To run only a particular test with RunTest.Bat provide a test number argument.
-
-Otherwise:
-
-1. Copy RunTest.bat into the directory where pcretest.exe and pcregrep.exe
- have been created.
-
-2. Edit RunTest.bat to indentify the full or relative location of
- the pcre source (wherein which the testdata folder resides), e.g.:
-
- set srcdir=C:\pcre\pcre-8.20
-
-3. In a Windows command environment, chdir to the location of your bat and
- exe programs.
-
-4. Run RunTest.bat. Test outputs will automatically be compared to expected
- results, and discrepancies will be identified in the console output.
-
-To independently test the just-in-time compiler, run pcre_jit_test.exe.
-To test pcrecpp, run pcrecpp_unittest.exe, pcre_stringpiece_unittest.exe and
-pcre_scanner_unittest.exe.
-
-
-BUILDING UNDER WINDOWS CE WITH VISUAL STUDIO 200x
-
-Vincent Richomme sent a zip archive of files to help with this process. They
-can be found in the file "pcre-vsbuild.zip" in the Contrib directory of the FTP
-site.
-
-
-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 USING BORLAND C++ BUILDER 2007 (CB2007) AND HIGHER
-
-A PCRE user sent these comments about this environment (see also the comment
-from another user that follows them):
-
-The XE versions of C++ Builder come with a RegularExpressionsCore class which
-contain a version of TPerlRegEx. However, direct use of the C PCRE library may
-be desirable.
-
-The default makevp.bat, however, supplied with PCRE builds a version of PCRE
-that is not usable with any version of C++ Builder because the compiler ships
-with an embedded version of PCRE, version 2.01 from 1998! [See also the note
-about BCC5.5 above.] If you want to use PCRE you'll need to rename the
-functions (pcre_compile to pcre_compile_bcc, etc) or do as I have done and just
-use the 16 bit versions. I'm using std::wstring everywhere anyway. Since the
-embedded version of PCRE does not have the 16 bit function names, there is no
-conflict.
-
-Building PCRE using a C++ Builder static library project file (recommended):
-
-1. Rename or remove pcre.h, pcreposi.h, and pcreposix.h from your C++ Builder
-original include path.
-
-2. Download PCRE from pcre.org and extract to a directory.
-
-3. Rename pcre_chartables.c.dist to pcre_chartables.c, pcre.h.generic to
-pcre.h, and config.h.generic to config.h.
-
-4. Edit pcre.h and pcre_config.c so that they include config.h.
-
-5. Edit config.h like so:
-
-Comment out the following lines:
-#define PACKAGE "pcre"
-#define PACKAGE_BUGREPORT ""
-#define PACKAGE_NAME "PCRE"
-#define PACKAGE_STRING "PCRE 8.32"
-#define PACKAGE_TARNAME "pcre"
-#define PACKAGE_URL ""
-#define PACKAGE_VERSION "8.32"
-
-Add the following lines:
-#ifndef SUPPORT_UTF
-#define SUPPORT_UTF 100 // any value is fine
-#endif
-
-#ifndef SUPPORT_UCP
-#define SUPPORT_UCP 101 // any value is fine
-#endif
-
-#ifndef SUPPORT_UCP
-#define SUPPORT_PCRE16 102 // any value is fine
-#endif
-
-#ifndef SUPPORT_UTF8
-#define SUPPORT_UTF8 103 // any value is fine
-#endif
-
-6. Build a C++ Builder project using the IDE. Go to File / New / Other and
-choose Static Library. You can name it pcre.cbproj or whatever. Now set your
-paths by going to Project / Options. Set the Include path. Do this from the
-"Base" option to apply to both Release and Debug builds. Now add the following
-files to the project:
-
-pcre.h
-pcre16_byte_order.c
-pcre16_chartables.c
-pcre16_compile.c
-pcre16_config.c
-pcre16_dfa_exec.c
-pcre16_exec.c
-pcre16_fullinfo.c
-pcre16_get.c
-pcre16_globals.c
-pcre16_maketables.c
-pcre16_newline.c
-pcre16_ord2utf16.c
-pcre16_printint.c
-pcre16_refcount.c
-pcre16_string_utils.c
-pcre16_study.c
-pcre16_tables.c
-pcre16_ucd.c
-pcre16_utf16_utils.c
-pcre16_valid_utf16.c
-pcre16_version.c
-pcre16_xclass.c
-
-//Optional
-pcre_version.c
-
-7. After compiling the .lib file, copy the .lib and header files to a project
-you want to use PCRE with. Enjoy.
-
-Optional ... Building PCRE using the makevp.bat file:
-
-1. Edit makevp_c.txt and makevp_l.txt and change all the names to the 16 bit
-versions.
-
-2. Edit makevp.bat and set the path to C++ Builder. Run makevp.bat.
-
-Another PCRE user added this comment:
-
-Another approach I successfully used for some years with BCB 5 and 6 was to
-make sure that include and library paths of PCRE are configured before the
-default paths of the IDE in the dialogs where one can manage those paths.
-Afterwards one can open the project files using a text editor and manually add
-the self created library for pcre itself, pcrecpp doesn't ship with the IDE, in
-the library nodes where the IDE manages its own libraries to link against in
-front of the IDE-own libraries. This way one can use the default PCRE function
-names without getting access violations on runtime.
-
- <ALLLIB value="libpcre.lib $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib"/>
-
-
-BUILDING PCRE ON OPENVMS
-
-Stephen Hoffman sent the following, in December 2012:
-
-"Here <http://labs.hoffmanlabs.com/node/1847> is a very short write-up on the
-OpenVMS port and here
-
-<http://labs.hoffmanlabs.com/labsnotes/pcre-vms-8_32.zip>
-
-is a zip with the OpenVMS files, and with one modified testing-related PCRE
-file." This is a port of PCRE 8.32.
-
-Earlier, 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
-commands I used to build the library. I had to add #define
-POSIX_MALLOC_THRESHOLD 10 to pcre.h since it was not defined anywhere.
-
-The library was built on:
-O/S: HP OpenVMS v7.3-1
-Compiler: Compaq C v6.5-001-48BCD
-Linker: vA13-01
-
-The test results did not match 100% due to the issues you mention in your
-documentation regarding isprint(), iscntrl(), isgraph() and ispunct(). I
-modified some of the character tables temporarily and was able to get the
-results to match. Tests using the fr locale did not match since I don't have
-that locale loaded. The study size was always reported to be 3 less than the
-value in the standard test output files."
-
-=========================
-$! This DCL procedure builds PCRE on OpenVMS
-$!
-$! I followed the instructions in the non-unix-use file in the distribution.
-$!
-$ COMPILE == "CC/LIST/NOMEMBER_ALIGNMENT/PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES
-$ COMPILE DFTABLES.C
-$ LINK/EXE=DFTABLES.EXE DFTABLES.OBJ
-$ RUN DFTABLES.EXE/OUTPUT=CHARTABLES.C
-$ COMPILE MAKETABLES.C
-$ COMPILE GET.C
-$ COMPILE STUDY.C
-$! I had to set POSIX_MALLOC_THRESHOLD to 10 in PCRE.H since the symbol
-$! did not seem to be defined anywhere.
-$! I edited pcre.h and added #DEFINE SUPPORT_UTF8 to enable UTF8 support.
-$ COMPILE PCRE.C
-$ LIB/CREATE PCRE MAKETABLES.OBJ, GET.OBJ, STUDY.OBJ, PCRE.OBJ
-$! I had to set POSIX_MALLOC_THRESHOLD to 10 in PCRE.H since the symbol
-$! did not seem to be defined anywhere.
-$ COMPILE PCREPOSIX.C
-$ LIB/CREATE PCREPOSIX PCREPOSIX.OBJ
-$ COMPILE PCRETEST.C
-$ LINK/EXE=PCRETEST.EXE PCRETEST.OBJ, PCRE/LIB, PCREPOSIX/LIB
-$! C programs that want access to command line arguments must be
-$! defined as a symbol
-$ PCRETEST :== "$ SYS$ROADSUSERS:[DMOONEY.REGEXP]PCRETEST.EXE"
-$! Arguments must be enclosed in quotes.
-$ PCRETEST "-C"
-$! Test results:
-$!
-$! The test results did not match 100%. The functions isprint(), iscntrl(),
-$! isgraph() and ispunct() on OpenVMS must not produce the same results
-$! as the system that built the test output files provided with the
-$! distribution.
-$!
-$! The study size did not match and was always 3 less on OpenVMS.
-$!
-$! Locale could not be set to fr
-$!
-=========================
-
-
-BUILDING PCRE ON STRATUS OPENVOS
-
-These notes on the port of PCRE to VOS (lightly edited) were supplied by
-Ashutosh Warikoo, whose email address has the local part awarikoo and the
-domain nse.co.in. The port was for version 7.9 in August 2009.
-
-1. Building PCRE
-
-I built pcre on OpenVOS Release 17.0.1at using GNU Tools 3.4a without any
-problems. I used the following packages to build PCRE:
-
- ftp://ftp.stratus.com/pub/vos/posix/ga/posix.save.evf.gz
-
-Please read and follow the instructions that come with these packages. To start
-the build of pcre, from the root of the package type:
-
- ./build.sh
-
-2. Installing PCRE
-
-Once you have successfully built PCRE, login to the SysAdmin group, switch to
-the root user, and type
-
- [ !create_dir (master_disk)>usr --if needed ]
- [ !create_dir (master_disk)>usr>local --if needed ]
- !gmake install
-
-This installs PCRE and its man pages into /usr/local. You can add
-(master_disk)>usr>local>bin to your command search paths, or if you are in
-BASH, add /usr/local/bin to the PATH environment variable.
-
-4. Restrictions
-
-This port requires readline library optionally. However during the build I
-faced some yet unexplored errors while linking with readline. As it was an
-optional component I chose to disable it.
-
-5. Known Problems
-
-I ran the test suite, but you will have to be your own judge of whether this
-command, and this port, suits your purposes. If you find any problems that
-appear to be related to the port itself, please let me know. Please see the
-build.log file in the root of the package also.
-
-
-BUILDING PCRE ON NATIVE Z/OS AND Z/VM
-
-z/OS and z/VM are operating systems for mainframe computers, produced by IBM.
-The character code used is EBCDIC, not ASCII or Unicode. In z/OS, UNIX APIs and
-applications can be supported through UNIX System Services, and in such an
-environment PCRE can be built in the same way as in other systems. However, in
-native z/OS (without UNIX System Services) and in z/VM, special ports are
-required. PCRE1 version 8.39 is available in file 882 on this site:
-
- http://www.cbttape.org
-
-Everything, source and executable, is in EBCDIC and native z/OS file formats.
-However, this software is not maintained and will not be upgraded. If you are
-new to PCRE you should be looking at PCRE2 (version 10.30 or later).
-
-===============================
-Last Updated: 13 September 2017
-===============================
diff --git a/libs/Pcre16/docs/doc/html/README.txt b/libs/Pcre16/docs/doc/html/README.txt
deleted file mode 100644
index 4887ebf350..0000000000
--- a/libs/Pcre16/docs/doc/html/README.txt
+++ /dev/null
@@ -1,1002 +0,0 @@
-README file for PCRE (Perl-compatible regular expression library)
------------------------------------------------------------------
-
-NOTE: This set of files relates to PCRE releases that use the original API,
-with library names libpcre, libpcre16, and libpcre32. January 2015 saw the
-first release of a new API, known as PCRE2, with release numbers starting at
-10.00 and library names libpcre2-8, libpcre2-16, and libpcre2-32. The old
-libraries (now called PCRE1) are still being maintained for bug fixes, but
-there will be no new development. New projects are advised to use the new PCRE2
-libraries.
-
-
-The latest release of PCRE1 is always available in three alternative formats
-from:
-
- ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-xxx.tar.gz
- ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-xxx.tar.bz2
- ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-xxx.zip
-
-There is a mailing list for discussion about the development of PCRE at
-pcre-dev@exim.org. You can access the archives and subscribe or manage your
-subscription here:
-
- https://lists.exim.org/mailman/listinfo/pcre-dev
-
-Please read the NEWS file if you are upgrading from a previous release.
-The contents of this README file are:
-
- The PCRE APIs
- Documentation for PCRE
- Contributions by users of PCRE
- Building PCRE on non-Unix-like systems
- Building PCRE without using autotools
- Building PCRE using autotools
- Retrieving configuration information
- Shared libraries
- Cross-compiling using autotools
- Using HP's ANSI C++ compiler (aCC)
- Compiling in Tru64 using native compilers
- Using Sun's compilers for Solaris
- Using PCRE from MySQL
- Making new tarballs
- Testing PCRE
- Character tables
- File manifest
-
-
-The PCRE APIs
--------------
-
-PCRE is written in C, and it has its own API. There are three sets of
-functions, one for the 8-bit library, which processes strings of bytes, one for
-the 16-bit library, which processes strings of 16-bit values, and one for the
-32-bit library, which processes strings of 32-bit values. The distribution also
-includes a set of C++ wrapper functions (see the pcrecpp man page for details),
-courtesy of Google Inc., which can be used to call the 8-bit PCRE library from
-C++. Other C++ wrappers have been created from time to time. See, for example:
-https://github.com/YasserAsmi/regexp, which aims to be simple and similar in
-style to the C API.
-
-The distribution also contains a set of C wrapper functions (again, just for
-the 8-bit library) 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, 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 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 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
- the listing of pcredemo.c and 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.
-
-Users of PCRE have contributed files containing the documentation for various
-releases in CHM format. These can be found in the Contrib directory of the FTP
-site (see next section).
-
-
-Contributions by users of PCRE
-------------------------------
-
-You can find contributions from PCRE users in the directory
-
- ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/Contrib
-
-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.
-
-A PCRE user maintains downloadable Windows binaries of the pcregrep and
-pcretest programs here:
-
- http://www.rexegg.com/pcregrep-pcretest.html
-
-
-Building PCRE on non-Unix-like systems
---------------------------------------
-
-For a non-Unix-like system, please read the comments in the file
-NON-AUTOTOOLS-BUILD, though if your system supports the use of "configure" and
-"make" you may be able to build PCRE using autotools in the same way as for
-many Unix-like systems.
-
-PCRE can also be configured using the GUI facility provided by CMake's
-cmake-gui command. This creates Makefiles, solution files, etc. The file
-NON-AUTOTOOLS-BUILD has information about CMake.
-
-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 without using autotools
--------------------------------------
-
-The use of autotools (in particular, libtool) is problematic in some
-environments, even some that are Unix or Unix-like. See the NON-AUTOTOOLS-BUILD
-file for ways of building PCRE without using autotools.
-
-
-Building PCRE using autotools
------------------------------
-
-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" (autotools) process.
-
-To build PCRE on system that supports autotools, 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 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. However,
-the usual methods of changing standard defaults are available. For example:
-
-CFLAGS='-O2 -Wall' ./configure --prefix=/opt/local
-
-This command specifies that the C compiler should be run with the flags '-O2
--Wall' instead of the default, and that "make install" should install PCRE
-under /opt/local instead of the default /usr/local.
-
-If you want to build in a different directory, just run "configure" with that
-directory as current. For example, suppose you have unpacked the PCRE source
-into /source/pcre/pcre-xxx, but you want to build it in /build/pcre/pcre-xxx:
-
-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. They are also documented in the pcrebuild man page.
-
-. By default, both shared and static libraries are built. You can change this
- by adding one of these options to the "configure" command:
-
- --disable-shared
- --disable-static
-
- (See also "Shared libraries on Unix-like systems" below.)
-
-. By default, only the 8-bit library is built. If you add --enable-pcre16 to
- the "configure" command, the 16-bit library is also built. If you add
- --enable-pcre32 to the "configure" command, the 32-bit library is also built.
- If you want only the 16-bit or 32-bit library, use --disable-pcre8 to disable
- building the 8-bit library.
-
-. If you are building the 8-bit library and want to suppress the building of
- the C++ wrapper library, you can add --disable-cpp to the "configure"
- command. Otherwise, when "configure" is run without --disable-pcre8, 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 include support for just-in-time compiling, which can give
- large performance improvements on certain platforms, add --enable-jit to the
- "configure" command. This support is available only for certain hardware
- architectures. If you try to enable it on an unsupported architecture, there
- will be a compile time error.
-
-. When JIT support is enabled, pcregrep automatically makes use of it, unless
- you add --disable-pcregrep-jit to the "configure" command.
-
-. If you want to make use of the support for UTF-8 Unicode character strings in
- the 8-bit library, or UTF-16 Unicode character strings in the 16-bit library,
- or UTF-32 Unicode character strings in the 32-bit library, you must add
- --enable-utf to the "configure" command. Without it, the code for handling
- UTF-8, UTF-16 and UTF-8 is not included in the relevant library. Even
- when --enable-utf is included, the use of a UTF encoding still has to be
- enabled by an option at run time. When PCRE is compiled with this option, its
- input can only either be ASCII or UTF-8/16/32, even when running on EBCDIC
- platforms. It is not possible to use both --enable-utf and --enable-ebcdic at
- the same time.
-
-. There are no separate options for enabling UTF-8, UTF-16 and UTF-32
- independently because that would allow ridiculous settings such as requesting
- UTF-16 support while building only the 8-bit library. However, the option
- --enable-utf8 is retained for backwards compatibility with earlier releases
- that did not support 16-bit or 32-bit character strings. It is synonymous with
- --enable-utf. It is not possible to configure one library with UTF support
- and the other without in the same configuration.
-
-. If, in addition to support for UTF-8/16/32 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 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 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 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 that limits the depth of nesting of parentheses in a
- pattern. This limits the amount of system stack that a pattern uses when it
- is compiled. The default is 250, but you can change it by setting, for
- example,
-
- --with-parens-nest-limit=500
-
-. PCRE has a counter that can be set to limit the amount of resources it uses
- when matching a pattern. 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 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. In the 8-bit
- library, PCRE then uses three bytes instead of two for offsets to different
- parts of the compiled pattern. In the 16-bit library, --with-link-size=3 is
- the same as --with-link-size=4, which (in both libraries) uses four-byte
- offsets. Increasing the internal link size reduces performance. In the 32-bit
- library, the only supported link size is 4.
-
-. 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. This applies only to the
- normal execution of the pcre_exec() function; if JIT support is being
- successfully used, it is not relevant. Equally, 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.
-
-. It is possible to compile PCRE for use on systems that use EBCDIC as their
- character code (as opposed to ASCII/Unicode) by specifying
-
- --enable-ebcdic
-
- This automatically implies --enable-rebuild-chartables (see above). However,
- when PCRE is built this way, it always operates in EBCDIC. It cannot support
- both EBCDIC and UTF-8/16/32. There is a second option, --enable-ebcdic-nl25,
- which specifies that the code value for the EBCDIC NL character is 0x25
- instead of the default 0x15.
-
-. In environments where valgrind is installed, if you specify
-
- --enable-valgrind
-
- PCRE will use valgrind annotations to mark certain memory regions as
- unaddressable. This allows it to detect invalid memory accesses, and is
- mostly useful for debugging PCRE itself.
-
-. In environments where the gcc compiler is used and lcov version 1.6 or above
- is installed, if you specify
-
- --enable-coverage
-
- the build process implements a code coverage report for the test suite. The
- report is generated by running "make coverage". If ccache is installed on
- your system, it must be disabled when building PCRE for coverage reporting.
- You can do this by setting the environment variable CCACHE_DISABLE=1 before
- running "make" to build PCRE. There is more information about coverage
- reporting in the "pcrebuild" documentation.
-
-. The pcregrep program currently supports only 8-bit data files, and so
- requires the 8-bit PCRE library. It is possible to compile pcregrep to use
- libz and/or libbz2, in order to read .gz and .bz2 files (respectively), by
- specifying one or both of
-
- --enable-pcregrep-libz
- --enable-pcregrep-libbz2
-
- Of course, the relevant libraries must be installed on your system.
-
-. The default size (in bytes) of the internal buffer used by pcregrep can be
- set by, for example:
-
- --with-pcregrep-bufsize=51200
-
- The value must be a plain integer. The default is 20480.
-
-. It is possible to compile pcretest so that it links with the libreadline
- or libedit libraries, by specifying, respectively,
-
- --enable-pcretest-libreadline or --enable-pcretest-libedit
-
- If this is done, when pcretest's input is from a terminal, it reads it using
- the readline() function. This provides line-editing and history facilities.
- Note that libreadline is GPL-licenced, so if you distribute a binary of
- pcretest linked in this way, there may be licensing issues. These can be
- avoided by linking with libedit (which has a BSD licence) instead.
-
- Enabling libreadline causes the -lreadline option to be added to the pcretest
- build. In many operating environments with a sytem-installed readline
- library this is sufficient. However, in some environments (e.g. if an
- unmodified distribution version of readline is in use), it may be necessary
- to specify something like LIBS="-lncurses" as well. This is because, to quote
- the readline INSTALL, "Readline uses the termcap functions, but does not link
- with the termcap or curses library itself, allowing applications which link
- with readline the to choose an appropriate library." If you get error
- messages about missing functions tgetstr, tgetent, tputs, tgetflag, or tgoto,
- this is the problem, and linking with the ncurses library should fix it.
-
-The "configure" script builds the following files for the basic C library:
-
-. Makefile the makefile that builds the library
-. config.h build-time configuration options for the library
-. pcre.h the public PCRE header file
-. pcre-config script that shows the building settings such as CFLAGS
- that were set for "configure"
-. libpcre.pc ) data for the pkg-config command
-. libpcre16.pc )
-. libpcre32.pc )
-. libpcreposix.pc )
-. libtool script that builds shared and/or static libraries
-
-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 those who
-have to built PCRE without using "configure" or CMake. If you use "configure"
-or CMake, the .generic versions are not used.
-
-When building the 8-bit library, if a C++ compiler is found, the following
-files are also built:
-
-. libpcrecpp.pc data for the pkg-config command
-. pcrecpparg.h header file for calling PCRE via the C++ wrapper
-. pcre_stringpiece.h 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". This builds the the libraries
-libpcre, libpcre16 and/or libpcre32, and a test program called pcretest. If you
-enabled JIT support with --enable-jit, a test program called pcre_jit_test is
-built as well.
-
-If the 8-bit library is built, libpcreposix and the pcregrep command are also
-built, and if a C++ compiler was found on your system, and you did not disable
-it with --disable-cpp, "make" builds the C++ wrapper library, which is called
-libpcrecpp, as well as some test programs called pcrecpp_unittest,
-pcre_scanner_unittest, and pcre_stringpiece_unittest.
-
-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 (if 8-bit support is enabled)
- pcre-config
-
- Libraries (lib):
- libpcre16 (if 16-bit support is enabled)
- libpcre32 (if 32-bit support is enabled)
- libpcre (if 8-bit support is enabled)
- libpcreposix (if 8-bit support is enabled)
- libpcrecpp (if 8-bit and C++ support is enabled)
-
- Configuration information (lib/pkgconfig):
- libpcre16.pc
- libpcre32.pc
- libpcre.pc
- libpcreposix.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-config.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
- pcre-config.txt the pcre-config man page
-
-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
-------------------------------------
-
-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
-
-prints the version number, and
-
- pcre-config --libs
-
-outputs information about where the library is installed. This command can be
-included in makefiles for programs that use PCRE, saving the programmer from
-having to remember too many details.
-
-The pkg-config command is another system for saving and retrieving information
-about installed libraries. Instead of separate commands for each library, a
-single command is used. For example:
-
- pkg-config --cflags pcre
-
-The data is held in *.pc files that are installed in a directory called
-<prefix>/lib/pkgconfig.
-
-
-Shared libraries
-----------------
-
-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
-libraries. They are placed in a subdirectory called .libs when they are newly
-built. The programs pcretest and pcregrep are built to use these uninstalled
-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 build directory still
-use the uninstalled libraries.
-
-To build PCRE using static libraries only you must use --disable-shared when
-configuring it. For example:
-
-./configure --prefix=/usr/gnu --disable-shared
-
-Then run "make" in the usual way. Similarly, you can use --disable-static to
-build only shared libraries.
-
-
-Cross-compiling using autotools
--------------------------------
-
-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, 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"
-
-
-Compiling in Tru64 using native compilers
------------------------------------------
-
-The following error may occur when compiling with native compilers in the Tru64
-operating system:
-
- CXX libpcrecpp_la-pcrecpp.lo
-cxx: Error: /usr/lib/cmplrs/cxx/V7.1-006/include/cxx/iosfwd, line 58: #error
- directive: "cannot include iosfwd -- define __USE_STD_IOSTREAM to
- override default - see section 7.1.2 of the C++ Using Guide"
-#error "cannot include iosfwd -- define __USE_STD_IOSTREAM to override default
-- see section 7.1.2 of the C++ Using Guide"
-
-This may be followed by other errors, complaining that 'namespace "std" has no
-member'. The solution to this is to add the line
-
-#define __USE_STD_IOSTREAM 1
-
-to the config.h file.
-
-
-Using Sun's compilers for Solaris
----------------------------------
-
-A user reports that the following configurations work on Solaris 9 sparcv9 and
-Solaris 9 x86 (32-bit):
-
- Solaris 9 sparcv9: ./configure --disable-cpp CC=/bin/cc CFLAGS="-m64 -g"
- Solaris 9 x86: ./configure --disable-cpp CC=/bin/cc CFLAGS="-g"
-
-
-Using PCRE from MySQL
----------------------
-
-On systems where both PCRE and MySQL are installed, it is possible to make use
-of PCRE from within MySQL, as an alternative to the built-in pattern matching.
-There is a web page that tells you how to do this:
-
- http://www.mysqludf.org/lib_mysqludf_preg/index.php
-
-
-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 the basic PCRE library on a Unix-like system, run the RunTest script.
-There is another 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. When JIT support is enabled, another test program called
-pcre_jit_test is built.
-
-Both the scripts and all the program tests are run if you obey "make check" or
-"make test". For other environments, see the instructions in
-NON-AUTOTOOLS-BUILD.
-
-The RunTest script runs the pcretest test program (which is documented in its
-own man page) on each of the relevant testinput files in the testdata
-directory, and compares the output with the contents of the corresponding
-testoutput files. RunTest uses a file called testtry to hold the main output
-from pcretest. Other files whose names begin with "test" are used as working
-files in some tests.
-
-Some tests are relevant only when certain build-time options were selected. For
-example, the tests for UTF-8/16/32 support are run only if --enable-utf was
-used. RunTest outputs a comment when it skips a test.
-
-Many of the tests that are not skipped are run up to three times. The second
-run forces pcre_study() to be called for all patterns except for a few in some
-tests that are marked "never study" (see the pcretest program for how this is
-done). If JIT support is available, the non-DFA tests are run a third time,
-this time with a forced pcre_study() with the PCRE_STUDY_JIT_COMPILE option.
-This testing can be suppressed by putting "nojit" on the RunTest command line.
-
-The entire set of tests is run once for each of the 8-bit, 16-bit and 32-bit
-libraries that are enabled. If you want to run just one set of tests, call
-RunTest with either the -8, -16 or -32 option.
-
-If valgrind is installed, you can run the tests under it by putting "valgrind"
-on the RunTest command line. To run pcretest on just one or more specific test
-files, give their numbers as arguments to RunTest, for example:
-
- RunTest 2 7 11
-
-You can also specify ranges of tests such as 3-6 or 3- (meaning 3 to the
-end), or a number preceded by ~ to exclude a test. For example:
-
- Runtest 3-15 ~10
-
-This runs tests 3 to 15, excluding test 10, and just ~13 runs all the tests
-except test 13. Whatever order the arguments are in, the tests are always run
-in numerical order.
-
-You can also call RunTest with the single argument "list" to cause it to output
-a list of tests.
-
-The first test file can 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_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 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
-character tables may be different (see next paragraph). In some cases, this may
-cause failures in the second set of tests. For example, in a locale where the
-isprint() function yields TRUE for characters in the range 128-255, the use of
-[:isascii:] inside a character class defines a different set of characters, and
-this shows up in this test as a difference in the compiled code, which is being
-listed for checking. Where the comparison test output contains [\x00-\x7f] the
-test will contain [\x00-\xff], and similarly in some other cases. This is not a
-bug in PCRE.
-
-The third set of tests checks pcre_maketables(), the facility for building a
-set of character tables for a specific locale and using them instead of the
-default tables. The tests make use of the "fr_FR" (French) locale. Before
-running the test, the script checks for the presence of this locale by running
-the "locale" command. If that command fails, or if it doesn't include "fr_FR"
-in the list of available locales, the third test cannot be run, and a comment
-is output to say why. If running this test produces instances of the error
-
- ** Failed to set locale "fr_FR"
-
-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 and fifth tests check the UTF-8/16/32 support and error handling and
-internal UTF features of PCRE that are not relevant to Perl, respectively. The
-sixth and seventh tests do the same for Unicode character properties support.
-
-The eighth, ninth, and tenth tests check the pcre_dfa_exec() alternative
-matching function, in non-UTF-8/16/32 mode, UTF-8/16/32 mode, and UTF-8/16/32
-mode with Unicode property support, respectively.
-
-The eleventh test checks some internal offsets and code size features; it is
-run only when the default "link size" of 2 is set (in other cases the sizes
-change) and when Unicode property support is enabled.
-
-The twelfth test is run only when JIT support is available, and the thirteenth
-test is run only when JIT support is not available. They test some JIT-specific
-features such as information output from pcretest about JIT compilation.
-
-The fourteenth, fifteenth, and sixteenth tests are run only in 8-bit mode, and
-the seventeenth, eighteenth, and nineteenth tests are run only in 16/32-bit
-mode. These are tests that generate different output in the two modes. They are
-for general cases, UTF-8/16/32 support, and Unicode property support,
-respectively.
-
-The twentieth test is run only in 16/32-bit mode. It tests some specific
-16/32-bit features of the DFA matching engine.
-
-The twenty-first and twenty-second tests are run only in 16/32-bit mode, when
-the link size is set to 2 for the 16-bit library. They test reloading
-pre-compiled patterns.
-
-The twenty-third and twenty-fourth tests are run only in 16-bit mode. They are
-for general cases, and UTF-16 support, respectively.
-
-The twenty-fifth and twenty-sixth tests are run only in 32-bit mode. They are
-for general cases, and UTF-32 support, respectively.
-
-
-Character tables
-----------------
-
-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 for code points less
-than 256.
-
-The final 256-byte table has bits indicating various character types, as
-follows:
-
- 1 white space character
- 2 letter
- 4 decimal digit
- 8 hexadecimal digit
- 16 alphanumeric or '_'
- 128 regular expression metacharacter or binary zero
-
-You should not alter the set of characters that contain the 128 bit, as that
-will cause PCRE to malfunction.
-
-
-File manifest
--------------
-
-The distribution should contain the files listed below. Where a file name is
-given as pcre[16|32]_xxx it means that there are three files, one with the name
-pcre_xxx, one with the name pcre16_xx, and a third with the name pcre32_xxx.
-
-(A) Source files of the PCRE library functions and their headers:
-
- dftables.c auxiliary program for building pcre_chartables.c
- when --enable-rebuild-chartables is specified
-
- 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[16]_chartables.c
-
- pcreposix.c )
- pcre[16|32]_byte_order.c )
- pcre[16|32]_compile.c )
- pcre[16|32]_config.c )
- pcre[16|32]_dfa_exec.c )
- pcre[16|32]_exec.c )
- pcre[16|32]_fullinfo.c )
- pcre[16|32]_get.c ) sources for the functions in the library,
- pcre[16|32]_globals.c ) and some internal functions that they use
- pcre[16|32]_jit_compile.c )
- pcre[16|32]_maketables.c )
- pcre[16|32]_newline.c )
- pcre[16|32]_refcount.c )
- pcre[16|32]_string_utils.c )
- pcre[16|32]_study.c )
- pcre[16|32]_tables.c )
- pcre[16|32]_ucd.c )
- pcre[16|32]_version.c )
- pcre[16|32]_xclass.c )
- pcre_ord2utf8.c )
- pcre_valid_utf8.c )
- pcre16_ord2utf16.c )
- pcre16_utf16_utils.c )
- pcre16_valid_utf16.c )
- pcre32_utf32_utils.c )
- pcre32_valid_utf32.c )
-
- pcre[16|32]_printint.c ) debugging function that is used by 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
- sljit/* 16 files that make up the JIT compiler
- ucp.h header for Unicode property handling
-
- 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 the previous name for NON-AUTOTOOLS-BUILD
- NON-AUTOTOOLS-BUILD notes on building PCRE without using autotools
- 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 PCRE
- 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
- libpcre16.pc.in template for libpcre16.pc for pkg-config
- libpcre32.pc.in template for libpcre32.pc for pkg-config
- libpcre.pc.in template for libpcre.pc for pkg-config
- libpcreposix.pc.in template for libpcreposix.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
- pcre_jit_test.c test program for the JIT compiler
- 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
- testdata/* other supporting test files
-
-(D) Auxiliary files for cmake support
-
- cmake/COPYING-CMAKE-SCRIPTS
- cmake/FindPackageHandleStandardArgs.cmake
- cmake/FindEditline.cmake
- cmake/FindReadline.cmake
- 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
-Email local part: ph10
-Email domain: cam.ac.uk
-Last updated: 10 February 2015
diff --git a/libs/Pcre16/docs/doc/html/index.html b/libs/Pcre16/docs/doc/html/index.html
deleted file mode 100644
index 352c55df2f..0000000000
--- a/libs/Pcre16/docs/doc/html/index.html
+++ /dev/null
@@ -1,185 +0,0 @@
-<html>
-<!-- This is a manually maintained file that is the root of the HTML version of
- the PCRE documentation. When the HTML documents are built from the man
- page versions, the entire doc/html directory is emptied, this file is then
- copied into doc/html/index.html, and the remaining files therein are
- created by the 132html script.
--->
-<head>
-<title>PCRE specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>Perl-compatible Regular Expressions (PCRE)</h1>
-<p>
-The HTML documentation for PCRE consists of a number of pages that are listed
-below in alphabetical order. If you are new to PCRE, please read the first one
-first.
-</p>
-
-<table>
-<tr><td><a href="pcre.html">pcre</a></td>
- <td>&nbsp;&nbsp;Introductory page</td></tr>
-
-<tr><td><a href="pcre-config.html">pcre-config</a></td>
- <td>&nbsp;&nbsp;Information about the installation configuration</td></tr>
-
-<tr><td><a href="pcre16.html">pcre16</a></td>
- <td>&nbsp;&nbsp;Discussion of the 16-bit PCRE library</td></tr>
-
-<tr><td><a href="pcre32.html">pcre32</a></td>
- <td>&nbsp;&nbsp;Discussion of the 32-bit PCRE library</td></tr>
-
-<tr><td><a href="pcreapi.html">pcreapi</a></td>
- <td>&nbsp;&nbsp;PCRE's native API</td></tr>
-
-<tr><td><a href="pcrebuild.html">pcrebuild</a></td>
- <td>&nbsp;&nbsp;Building PCRE</td></tr>
-
-<tr><td><a href="pcrecallout.html">pcrecallout</a></td>
- <td>&nbsp;&nbsp;The <i>callout</i> facility</td></tr>
-
-<tr><td><a href="pcrecompat.html">pcrecompat</a></td>
- <td>&nbsp;&nbsp;Compability with Perl</td></tr>
-
-<tr><td><a href="pcrecpp.html">pcrecpp</a></td>
- <td>&nbsp;&nbsp;The C++ wrapper for the PCRE library</td></tr>
-
-<tr><td><a href="pcredemo.html">pcredemo</a></td>
- <td>&nbsp;&nbsp;A demonstration C program that uses the PCRE library</td></tr>
-
-<tr><td><a href="pcregrep.html">pcregrep</a></td>
- <td>&nbsp;&nbsp;The <b>pcregrep</b> command</td></tr>
-
-<tr><td><a href="pcrejit.html">pcrejit</a></td>
- <td>&nbsp;&nbsp;Discussion of the just-in-time optimization support</td></tr>
-
-<tr><td><a href="pcrelimits.html">pcrelimits</a></td>
- <td>&nbsp;&nbsp;Details of size and other limits</td></tr>
-
-<tr><td><a href="pcrematching.html">pcrematching</a></td>
- <td>&nbsp;&nbsp;Discussion of the two matching algorithms</td></tr>
-
-<tr><td><a href="pcrepartial.html">pcrepartial</a></td>
- <td>&nbsp;&nbsp;Using PCRE for partial matching</td></tr>
-
-<tr><td><a href="pcrepattern.html">pcrepattern</a></td>
- <td>&nbsp;&nbsp;Specification of the regular expressions supported by PCRE</td></tr>
-
-<tr><td><a href="pcreperform.html">pcreperform</a></td>
- <td>&nbsp;&nbsp;Some comments on performance</td></tr>
-
-<tr><td><a href="pcreposix.html">pcreposix</a></td>
- <td>&nbsp;&nbsp;The POSIX API to the PCRE 8-bit library</td></tr>
-
-<tr><td><a href="pcreprecompile.html">pcreprecompile</a></td>
- <td>&nbsp;&nbsp;How to save and re-use compiled patterns</td></tr>
-
-<tr><td><a href="pcresample.html">pcresample</a></td>
- <td>&nbsp;&nbsp;Discussion of the pcredemo program</td></tr>
-
-<tr><td><a href="pcrestack.html">pcrestack</a></td>
- <td>&nbsp;&nbsp;Discussion of PCRE's stack usage</td></tr>
-
-<tr><td><a href="pcresyntax.html">pcresyntax</a></td>
- <td>&nbsp;&nbsp;Syntax quick-reference summary</td></tr>
-
-<tr><td><a href="pcretest.html">pcretest</a></td>
- <td>&nbsp;&nbsp;The <b>pcretest</b> command for testing PCRE</td></tr>
-
-<tr><td><a href="pcreunicode.html">pcreunicode</a></td>
- <td>&nbsp;&nbsp;Discussion of Unicode and UTF-8/UTF-16/UTF-32 support</td></tr>
-</table>
-
-<p>
-There are also individual pages that summarize the interface for each function
-in the library. There is a single page for each triple of 8-bit/16-bit/32-bit
-functions.
-</p>
-
-<table>
-
-<tr><td><a href="pcre_assign_jit_stack.html">pcre_assign_jit_stack</a></td>
- <td>&nbsp;&nbsp;Assign stack for JIT matching</td></tr>
-
-<tr><td><a href="pcre_compile.html">pcre_compile</a></td>
- <td>&nbsp;&nbsp;Compile a regular expression</td></tr>
-
-<tr><td><a href="pcre_compile2.html">pcre_compile2</a></td>
- <td>&nbsp;&nbsp;Compile a regular expression (alternate interface)</td></tr>
-
-<tr><td><a href="pcre_config.html">pcre_config</a></td>
- <td>&nbsp;&nbsp;Show build-time configuration options</td></tr>
-
-<tr><td><a href="pcre_copy_named_substring.html">pcre_copy_named_substring</a></td>
- <td>&nbsp;&nbsp;Extract named substring into given buffer</td></tr>
-
-<tr><td><a href="pcre_copy_substring.html">pcre_copy_substring</a></td>
- <td>&nbsp;&nbsp;Extract numbered substring into given buffer</td></tr>
-
-<tr><td><a href="pcre_dfa_exec.html">pcre_dfa_exec</a></td>
- <td>&nbsp;&nbsp;Match a compiled pattern to a subject string
- (DFA algorithm; <i>not</i> Perl compatible)</td></tr>
-
-<tr><td><a href="pcre_exec.html">pcre_exec</a></td>
- <td>&nbsp;&nbsp;Match a compiled pattern to a subject string
- (Perl compatible)</td></tr>
-
-<tr><td><a href="pcre_free_study.html">pcre_free_study</a></td>
- <td>&nbsp;&nbsp;Free study data</td></tr>
-
-<tr><td><a href="pcre_free_substring.html">pcre_free_substring</a></td>
- <td>&nbsp;&nbsp;Free extracted substring</td></tr>
-
-<tr><td><a href="pcre_free_substring_list.html">pcre_free_substring_list</a></td>
- <td>&nbsp;&nbsp;Free list of extracted substrings</td></tr>
-
-<tr><td><a href="pcre_fullinfo.html">pcre_fullinfo</a></td>
- <td>&nbsp;&nbsp;Extract information about a pattern</td></tr>
-
-<tr><td><a href="pcre_get_named_substring.html">pcre_get_named_substring</a></td>
- <td>&nbsp;&nbsp;Extract named substring into new memory</td></tr>
-
-<tr><td><a href="pcre_get_stringnumber.html">pcre_get_stringnumber</a></td>
- <td>&nbsp;&nbsp;Convert captured string name to number</td></tr>
-
-<tr><td><a href="pcre_get_stringtable_entries.html">pcre_get_stringtable_entries</a></td>
- <td>&nbsp;&nbsp;Find table entries for given string name</td></tr>
-
-<tr><td><a href="pcre_get_substring.html">pcre_get_substring</a></td>
- <td>&nbsp;&nbsp;Extract numbered substring into new memory</td></tr>
-
-<tr><td><a href="pcre_get_substring_list.html">pcre_get_substring_list</a></td>
- <td>&nbsp;&nbsp;Extract all substrings into new memory</td></tr>
-
-<tr><td><a href="pcre_jit_exec.html">pcre_jit_exec</a></td>
- <td>&nbsp;&nbsp;Fast path interface to JIT matching</td></tr>
-
-<tr><td><a href="pcre_jit_stack_alloc.html">pcre_jit_stack_alloc</a></td>
- <td>&nbsp;&nbsp;Create a stack for JIT matching</td></tr>
-
-<tr><td><a href="pcre_jit_stack_free.html">pcre_jit_stack_free</a></td>
- <td>&nbsp;&nbsp;Free a JIT matching stack</td></tr>
-
-<tr><td><a href="pcre_maketables.html">pcre_maketables</a></td>
- <td>&nbsp;&nbsp;Build character tables in current locale</td></tr>
-
-<tr><td><a href="pcre_pattern_to_host_byte_order.html">pcre_pattern_to_host_byte_order</a></td>
- <td>&nbsp;&nbsp;Convert compiled pattern to host byte order if necessary</td></tr>
-
-<tr><td><a href="pcre_refcount.html">pcre_refcount</a></td>
- <td>&nbsp;&nbsp;Maintain reference count in compiled pattern</td></tr>
-
-<tr><td><a href="pcre_study.html">pcre_study</a></td>
- <td>&nbsp;&nbsp;Study a compiled pattern</td></tr>
-
-<tr><td><a href="pcre_utf16_to_host_byte_order.html">pcre_utf16_to_host_byte_order</a></td>
- <td>&nbsp;&nbsp;Convert UTF-16 string to host byte order if necessary</td></tr>
-
-<tr><td><a href="pcre_utf32_to_host_byte_order.html">pcre_utf32_to_host_byte_order</a></td>
- <td>&nbsp;&nbsp;Convert UTF-32 string to host byte order if necessary</td></tr>
-
-<tr><td><a href="pcre_version.html">pcre_version</a></td>
- <td>&nbsp;&nbsp;Return PCRE version and release date</td></tr>
-</table>
-
-</html>
diff --git a/libs/Pcre16/docs/doc/html/pcre-config.html b/libs/Pcre16/docs/doc/html/pcre-config.html
deleted file mode 100644
index 56a8060492..0000000000
--- a/libs/Pcre16/docs/doc/html/pcre-config.html
+++ /dev/null
@@ -1,109 +0,0 @@
-<html>
-<head>
-<title>pcre-config specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre-config man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">SYNOPSIS</a>
-<li><a name="TOC2" href="#SEC2">DESCRIPTION</a>
-<li><a name="TOC3" href="#SEC3">OPTIONS</a>
-<li><a name="TOC4" href="#SEC4">SEE ALSO</a>
-<li><a name="TOC5" href="#SEC5">AUTHOR</a>
-<li><a name="TOC6" href="#SEC6">REVISION</a>
-</ul>
-<br><a name="SEC1" href="#TOC1">SYNOPSIS</a><br>
-<P>
-<b>pcre-config [--prefix] [--exec-prefix] [--version] [--libs]</b>
-<b> [--libs16] [--libs32] [--libs-cpp] [--libs-posix]</b>
-<b> [--cflags] [--cflags-posix]</b>
-</P>
-<br><a name="SEC2" href="#TOC1">DESCRIPTION</a><br>
-<P>
-<b>pcre-config</b> returns the configuration of the installed PCRE
-libraries and the options required to compile a program to use them. Some of
-the options apply only to the 8-bit, or 16-bit, or 32-bit libraries,
-respectively, and are
-not available if only one of those libraries has been built. If an unavailable
-option is encountered, the "usage" information is output.
-</P>
-<br><a name="SEC3" href="#TOC1">OPTIONS</a><br>
-<P>
-<b>--prefix</b>
-Writes the directory prefix used in the PCRE installation for architecture
-independent files (<i>/usr</i> on many systems, <i>/usr/local</i> on some
-systems) to the standard output.
-</P>
-<P>
-<b>--exec-prefix</b>
-Writes the directory prefix used in the PCRE installation for architecture
-dependent files (normally the same as <b>--prefix</b>) to the standard output.
-</P>
-<P>
-<b>--version</b>
-Writes the version number of the installed PCRE libraries to the standard
-output.
-</P>
-<P>
-<b>--libs</b>
-Writes to the standard output the command line options required to link
-with the 8-bit PCRE library (<b>-lpcre</b> on many systems).
-</P>
-<P>
-<b>--libs16</b>
-Writes to the standard output the command line options required to link
-with the 16-bit PCRE library (<b>-lpcre16</b> on many systems).
-</P>
-<P>
-<b>--libs32</b>
-Writes to the standard output the command line options required to link
-with the 32-bit PCRE library (<b>-lpcre32</b> on many systems).
-</P>
-<P>
-<b>--libs-cpp</b>
-Writes to the standard output the command line options required to link with
-PCRE's C++ wrapper library (<b>-lpcrecpp</b> <b>-lpcre</b> on many
-systems).
-</P>
-<P>
-<b>--libs-posix</b>
-Writes to the standard output the command line options required to link with
-PCRE's POSIX API wrapper library (<b>-lpcreposix</b> <b>-lpcre</b> on many
-systems).
-</P>
-<P>
-<b>--cflags</b>
-Writes to the standard output the command line options required to compile
-files that use PCRE (this may include some <b>-I</b> options, but is blank on
-many systems).
-</P>
-<P>
-<b>--cflags-posix</b>
-Writes to the standard output the command line options required to compile
-files that use PCRE's POSIX API wrapper library (this may include some <b>-I</b>
-options, but is blank on many systems).
-</P>
-<br><a name="SEC4" href="#TOC1">SEE ALSO</a><br>
-<P>
-<b>pcre(3)</b>
-</P>
-<br><a name="SEC5" href="#TOC1">AUTHOR</a><br>
-<P>
-This manual page was originally written by Mark Baker for the Debian GNU/Linux
-system. It has been subsequently revised as a generic PCRE man page.
-</P>
-<br><a name="SEC6" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 24 June 2012
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcre.html b/libs/Pcre16/docs/doc/html/pcre.html
deleted file mode 100644
index c87b106642..0000000000
--- a/libs/Pcre16/docs/doc/html/pcre.html
+++ /dev/null
@@ -1,224 +0,0 @@
-<html>
-<head>
-<title>pcre specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">PLEASE TAKE NOTE</a>
-<li><a name="TOC2" href="#SEC2">INTRODUCTION</a>
-<li><a name="TOC3" href="#SEC3">SECURITY CONSIDERATIONS</a>
-<li><a name="TOC4" href="#SEC4">USER DOCUMENTATION</a>
-<li><a name="TOC5" href="#SEC5">AUTHOR</a>
-<li><a name="TOC6" href="#SEC6">REVISION</a>
-</ul>
-<br><a name="SEC1" href="#TOC1">PLEASE TAKE NOTE</a><br>
-<P>
-This document relates to PCRE releases that use the original API,
-with library names libpcre, libpcre16, and libpcre32. January 2015 saw the
-first release of a new API, known as PCRE2, with release numbers starting at
-10.00 and library names libpcre2-8, libpcre2-16, and libpcre2-32. The old
-libraries (now called PCRE1) are still being maintained for bug fixes, but
-there will be no new development. New projects are advised to use the new PCRE2
-libraries.
-</P>
-<br><a name="SEC2" href="#TOC1">INTRODUCTION</a><br>
-<P>
-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. Some features that appeared in Python and PCRE before they
-appeared in Perl are also available using the Python syntax, there is some
-support for one or two .NET and Oniguruma syntax items, and there is an option
-for requesting some minor changes that give better JavaScript compatibility.
-</P>
-<P>
-Starting with release 8.30, it is possible to compile two separate PCRE
-libraries: the original, which supports 8-bit character strings (including
-UTF-8 strings), and a second library that supports 16-bit character strings
-(including UTF-16 strings). The build process allows either one or both to be
-built. The majority of the work to make this possible was done by Zoltan
-Herczeg.
-</P>
-<P>
-Starting with release 8.32 it is possible to compile a third separate PCRE
-library that supports 32-bit character strings (including UTF-32 strings). The
-build process allows any combination of the 8-, 16- and 32-bit libraries. The
-work to make this possible was done by Christian Persch.
-</P>
-<P>
-The three libraries contain identical sets of functions, except that the names
-in the 16-bit library start with <b>pcre16_</b> instead of <b>pcre_</b>, and the
-names in the 32-bit library start with <b>pcre32_</b> instead of <b>pcre_</b>. To
-avoid over-complication and reduce the documentation maintenance load, most of
-the documentation describes the 8-bit library, with the differences for the
-16-bit and 32-bit libraries described separately in the
-<a href="pcre16.html"><b>pcre16</b></a>
-and
-<a href="pcre32.html"><b>pcre32</b></a>
-pages. References to functions or structures of the form <i>pcre[16|32]_xxx</i>
-should be read as meaning "<i>pcre_xxx</i> when using the 8-bit library,
-<i>pcre16_xxx</i> when using the 16-bit library, or <i>pcre32_xxx</i> when using
-the 32-bit library".
-</P>
-<P>
-The current implementation of PCRE corresponds approximately with Perl 5.12,
-including support for UTF-8/16/32 encoded strings and Unicode general category
-properties. However, UTF-8/16/32 and Unicode support has to be explicitly
-enabled; it is not the default. The Unicode tables correspond to Unicode
-release 6.3.0.
-</P>
-<P>
-In addition to the Perl-compatible matching function, PCRE contains an
-alternative 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
-<a href="pcrematching.html"><b>pcrematching</b></a>
-page.
-</P>
-<P>
-PCRE is written in C and released as a C library. A number of people have
-written wrappers and interfaces of various kinds. In particular, Google Inc.
-have provided a comprehensive C++ wrapper for the 8-bit library. This is now
-included as part of the PCRE distribution. The
-<a href="pcrecpp.html"><b>pcrecpp</b></a>
-page has details of this interface. Other people's contributions can be found
-in the <i>Contrib</i> directory at the primary FTP site, which is:
-<a href="ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre">ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre</a>
-</P>
-<P>
-Details of exactly which Perl regular expression features are and are not
-supported by PCRE are given in separate documents. See the
-<a href="pcrepattern.html"><b>pcrepattern</b></a>
-and
-<a href="pcrecompat.html"><b>pcrecompat</b></a>
-pages. There is a syntax summary in the
-<a href="pcresyntax.html"><b>pcresyntax</b></a>
-page.
-</P>
-<P>
-Some features of PCRE can be included, excluded, or changed when the library is
-built. The
-<a href="pcre_config.html"><b>pcre_config()</b></a>
-function makes it possible for a client to discover which features are
-available. The features themselves are described in the
-<a href="pcrebuild.html"><b>pcrebuild</b></a>
-page. Documentation about building PCRE for various operating systems can be
-found in the
-<a href="README.txt"><b>README</b></a>
-and
-<a href="NON-AUTOTOOLS-BUILD.txt"><b>NON-AUTOTOOLS_BUILD</b></a>
-files in the source distribution.
-</P>
-<P>
-The libraries 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_" or "_pcre16_" or "_pcre32_", 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.
-</P>
-<br><a name="SEC3" href="#TOC1">SECURITY CONSIDERATIONS</a><br>
-<P>
-If you are using PCRE in a non-UTF application that permits users to supply
-arbitrary patterns for compilation, you should be aware of a feature that
-allows users to turn on UTF support from within a pattern, provided that PCRE
-was built with UTF support. For example, an 8-bit pattern that begins with
-"(*UTF8)" or "(*UTF)" turns on UTF-8 mode, which interprets patterns and
-subjects as strings of UTF-8 characters instead of individual 8-bit characters.
-This causes both the pattern and any data against which it is matched to be
-checked for UTF-8 validity. If the data string is very long, such a check might
-use sufficiently many resources as to cause your application to lose
-performance.
-</P>
-<P>
-One way of guarding against this possibility is to use the
-<b>pcre_fullinfo()</b> function to check the compiled pattern's options for UTF.
-Alternatively, from release 8.33, you can set the PCRE_NEVER_UTF option at
-compile time. This causes an compile time error if a pattern contains a
-UTF-setting sequence.
-</P>
-<P>
-If your application is one that supports UTF, be aware that validity checking
-can take time. If the same data string is to be matched many times, you can use
-the PCRE_NO_UTF[8|16|32]_CHECK option for the second and subsequent matches to
-save redundant checks.
-</P>
-<P>
-Another way that performance can be hit is by running a pattern that has a very
-large search tree against a string that will never match. Nested unlimited
-repeats in a pattern are a common example. PCRE provides some protection
-against this: see the PCRE_EXTRA_MATCH_LIMIT feature in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page.
-</P>
-<br><a name="SEC4" href="#TOC1">USER DOCUMENTATION</a><br>
-<P>
-The user documentation for PCRE comprises a number of different sections. In
-the "man" format, each of these is a separate "man page". In the HTML format,
-each is a separate page, linked from the index page. In the plain text format,
-the descriptions of the <b>pcregrep</b> and <b>pcretest</b> programs are in files
-called <b>pcregrep.txt</b> and <b>pcretest.txt</b>, respectively. The remaining
-sections, except for the <b>pcredemo</b> section (which is a program listing),
-are concatenated in <b>pcre.txt</b>, for ease of searching. The sections are as
-follows:
-<pre>
- pcre this document
- pcre-config show PCRE installation configuration information
- pcre16 details of the 16-bit library
- pcre32 details of the 32-bit library
- pcreapi details of PCRE's native C API
- pcrebuild building PCRE
- pcrecallout details of the callout feature
- pcrecompat discussion of Perl compatibility
- pcrecpp details of the C++ wrapper for the 8-bit library
- pcredemo a demonstration C program that uses PCRE
- pcregrep description of the <b>pcregrep</b> command (8-bit only)
- pcrejit discussion of the just-in-time optimization support
- pcrelimits details of size and other limits
- pcrematching discussion of the two matching algorithms
- pcrepartial details of the partial matching facility
- pcrepattern syntax and semantics of supported regular expressions
- pcreperform discussion of performance issues
- pcreposix the POSIX-compatible C API for the 8-bit library
- pcreprecompile details of saving and re-using precompiled patterns
- pcresample discussion of the pcredemo program
- pcrestack discussion of stack usage
- pcresyntax quick syntax reference
- pcretest description of the <b>pcretest</b> testing command
- pcreunicode discussion of Unicode and UTF-8/16/32 support
-</pre>
-In the "man" and HTML formats, there is also a short page for each C library
-function, listing its arguments and results.
-</P>
-<br><a name="SEC5" href="#TOC1">AUTHOR</a><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<P>
-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.
-</P>
-<br><a name="SEC6" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 10 February 2015
-<br>
-Copyright &copy; 1997-2015 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcre16.html b/libs/Pcre16/docs/doc/html/pcre16.html
deleted file mode 100644
index f00859f052..0000000000
--- a/libs/Pcre16/docs/doc/html/pcre16.html
+++ /dev/null
@@ -1,384 +0,0 @@
-<html>
-<head>
-<title>pcre16 specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre16 man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">PCRE 16-BIT API BASIC FUNCTIONS</a>
-<li><a name="TOC2" href="#SEC2">PCRE 16-BIT API STRING EXTRACTION FUNCTIONS</a>
-<li><a name="TOC3" href="#SEC3">PCRE 16-BIT API AUXILIARY FUNCTIONS</a>
-<li><a name="TOC4" href="#SEC4">PCRE 16-BIT API INDIRECTED FUNCTIONS</a>
-<li><a name="TOC5" href="#SEC5">PCRE 16-BIT API 16-BIT-ONLY FUNCTION</a>
-<li><a name="TOC6" href="#SEC6">THE PCRE 16-BIT LIBRARY</a>
-<li><a name="TOC7" href="#SEC7">THE HEADER FILE</a>
-<li><a name="TOC8" href="#SEC8">THE LIBRARY NAME</a>
-<li><a name="TOC9" href="#SEC9">STRING TYPES</a>
-<li><a name="TOC10" href="#SEC10">STRUCTURE TYPES</a>
-<li><a name="TOC11" href="#SEC11">16-BIT FUNCTIONS</a>
-<li><a name="TOC12" href="#SEC12">SUBJECT STRING OFFSETS</a>
-<li><a name="TOC13" href="#SEC13">NAMED SUBPATTERNS</a>
-<li><a name="TOC14" href="#SEC14">OPTION NAMES</a>
-<li><a name="TOC15" href="#SEC15">CHARACTER CODES</a>
-<li><a name="TOC16" href="#SEC16">ERROR NAMES</a>
-<li><a name="TOC17" href="#SEC17">ERROR TEXTS</a>
-<li><a name="TOC18" href="#SEC18">CALLOUTS</a>
-<li><a name="TOC19" href="#SEC19">TESTING</a>
-<li><a name="TOC20" href="#SEC20">NOT SUPPORTED IN 16-BIT MODE</a>
-<li><a name="TOC21" href="#SEC21">AUTHOR</a>
-<li><a name="TOC22" href="#SEC22">REVISION</a>
-</ul>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<br><a name="SEC1" href="#TOC1">PCRE 16-BIT API BASIC FUNCTIONS</a><br>
-<P>
-<b>pcre16 *pcre16_compile(PCRE_SPTR16 <i>pattern</i>, int <i>options</i>,</b>
-<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
-<b> const unsigned char *<i>tableptr</i>);</b>
-<br>
-<br>
-<b>pcre16 *pcre16_compile2(PCRE_SPTR16 <i>pattern</i>, int <i>options</i>,</b>
-<b> int *<i>errorcodeptr</i>,</b>
-<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
-<b> const unsigned char *<i>tableptr</i>);</b>
-<br>
-<br>
-<b>pcre16_extra *pcre16_study(const pcre16 *<i>code</i>, int <i>options</i>,</b>
-<b> const char **<i>errptr</i>);</b>
-<br>
-<br>
-<b>void pcre16_free_study(pcre16_extra *<i>extra</i>);</b>
-<br>
-<br>
-<b>int pcre16_exec(const pcre16 *<i>code</i>, const pcre16_extra *<i>extra</i>,</b>
-<b> PCRE_SPTR16 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
-<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b>
-<br>
-<br>
-<b>int pcre16_dfa_exec(const pcre16 *<i>code</i>, const pcre16_extra *<i>extra</i>,</b>
-<b> PCRE_SPTR16 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
-<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
-<b> int *<i>workspace</i>, int <i>wscount</i>);</b>
-</P>
-<br><a name="SEC2" href="#TOC1">PCRE 16-BIT API STRING EXTRACTION FUNCTIONS</a><br>
-<P>
-<b>int pcre16_copy_named_substring(const pcre16 *<i>code</i>,</b>
-<b> PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b>
-<b> int <i>stringcount</i>, PCRE_SPTR16 <i>stringname</i>,</b>
-<b> PCRE_UCHAR16 *<i>buffer</i>, int <i>buffersize</i>);</b>
-<br>
-<br>
-<b>int pcre16_copy_substring(PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b>
-<b> int <i>stringcount</i>, int <i>stringnumber</i>, PCRE_UCHAR16 *<i>buffer</i>,</b>
-<b> int <i>buffersize</i>);</b>
-<br>
-<br>
-<b>int pcre16_get_named_substring(const pcre16 *<i>code</i>,</b>
-<b> PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b>
-<b> int <i>stringcount</i>, PCRE_SPTR16 <i>stringname</i>,</b>
-<b> PCRE_SPTR16 *<i>stringptr</i>);</b>
-<br>
-<br>
-<b>int pcre16_get_stringnumber(const pcre16 *<i>code</i>,</b>
-<b>" PCRE_SPTR16 <i>name</i>);</b>
-<br>
-<br>
-<b>int pcre16_get_stringtable_entries(const pcre16 *<i>code</i>,</b>
-<b> PCRE_SPTR16 <i>name</i>, PCRE_UCHAR16 **<i>first</i>, PCRE_UCHAR16 **<i>last</i>);</b>
-<br>
-<br>
-<b>int pcre16_get_substring(PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b>
-<b> int <i>stringcount</i>, int <i>stringnumber</i>,</b>
-<b> PCRE_SPTR16 *<i>stringptr</i>);</b>
-<br>
-<br>
-<b>int pcre16_get_substring_list(PCRE_SPTR16 <i>subject</i>,</b>
-<b> int *<i>ovector</i>, int <i>stringcount</i>, PCRE_SPTR16 **<i>listptr</i>);</b>
-<br>
-<br>
-<b>void pcre16_free_substring(PCRE_SPTR16 <i>stringptr</i>);</b>
-<br>
-<br>
-<b>void pcre16_free_substring_list(PCRE_SPTR16 *<i>stringptr</i>);</b>
-</P>
-<br><a name="SEC3" href="#TOC1">PCRE 16-BIT API AUXILIARY FUNCTIONS</a><br>
-<P>
-<b>pcre16_jit_stack *pcre16_jit_stack_alloc(int <i>startsize</i>, int <i>maxsize</i>);</b>
-<br>
-<br>
-<b>void pcre16_jit_stack_free(pcre16_jit_stack *<i>stack</i>);</b>
-<br>
-<br>
-<b>void pcre16_assign_jit_stack(pcre16_extra *<i>extra</i>,</b>
-<b> pcre16_jit_callback <i>callback</i>, void *<i>data</i>);</b>
-<br>
-<br>
-<b>const unsigned char *pcre16_maketables(void);</b>
-<br>
-<br>
-<b>int pcre16_fullinfo(const pcre16 *<i>code</i>, const pcre16_extra *<i>extra</i>,</b>
-<b> int <i>what</i>, void *<i>where</i>);</b>
-<br>
-<br>
-<b>int pcre16_refcount(pcre16 *<i>code</i>, int <i>adjust</i>);</b>
-<br>
-<br>
-<b>int pcre16_config(int <i>what</i>, void *<i>where</i>);</b>
-<br>
-<br>
-<b>const char *pcre16_version(void);</b>
-<br>
-<br>
-<b>int pcre16_pattern_to_host_byte_order(pcre16 *<i>code</i>,</b>
-<b> pcre16_extra *<i>extra</i>, const unsigned char *<i>tables</i>);</b>
-</P>
-<br><a name="SEC4" href="#TOC1">PCRE 16-BIT API INDIRECTED FUNCTIONS</a><br>
-<P>
-<b>void *(*pcre16_malloc)(size_t);</b>
-<br>
-<br>
-<b>void (*pcre16_free)(void *);</b>
-<br>
-<br>
-<b>void *(*pcre16_stack_malloc)(size_t);</b>
-<br>
-<br>
-<b>void (*pcre16_stack_free)(void *);</b>
-<br>
-<br>
-<b>int (*pcre16_callout)(pcre16_callout_block *);</b>
-</P>
-<br><a name="SEC5" href="#TOC1">PCRE 16-BIT API 16-BIT-ONLY FUNCTION</a><br>
-<P>
-<b>int pcre16_utf16_to_host_byte_order(PCRE_UCHAR16 *<i>output</i>,</b>
-<b> PCRE_SPTR16 <i>input</i>, int <i>length</i>, int *<i>byte_order</i>,</b>
-<b> int <i>keep_boms</i>);</b>
-</P>
-<br><a name="SEC6" href="#TOC1">THE PCRE 16-BIT LIBRARY</a><br>
-<P>
-Starting with release 8.30, it is possible to compile a PCRE library that
-supports 16-bit character strings, including UTF-16 strings, as well as or
-instead of the original 8-bit library. The majority of the work to make this
-possible was done by Zoltan Herczeg. The two libraries contain identical sets
-of functions, used in exactly the same way. Only the names of the functions and
-the data types of their arguments and results are different. To avoid
-over-complication and reduce the documentation maintenance load, most of the
-PCRE documentation describes the 8-bit library, with only occasional references
-to the 16-bit library. This page describes what is different when you use the
-16-bit library.
-</P>
-<P>
-WARNING: A single application can be linked with both libraries, but you must
-take care when processing any particular pattern to use functions from just one
-library. For example, if you want to study a pattern that was compiled with
-<b>pcre16_compile()</b>, you must do so with <b>pcre16_study()</b>, not
-<b>pcre_study()</b>, and you must free the study data with
-<b>pcre16_free_study()</b>.
-</P>
-<br><a name="SEC7" href="#TOC1">THE HEADER FILE</a><br>
-<P>
-There is only one header file, <b>pcre.h</b>. It contains prototypes for all the
-functions in all libraries, as well as definitions of flags, structures, error
-codes, etc.
-</P>
-<br><a name="SEC8" href="#TOC1">THE LIBRARY NAME</a><br>
-<P>
-In Unix-like systems, the 16-bit library is called <b>libpcre16</b>, and can
-normally be accesss by adding <b>-lpcre16</b> to the command for linking an
-application that uses PCRE.
-</P>
-<br><a name="SEC9" href="#TOC1">STRING TYPES</a><br>
-<P>
-In the 8-bit library, strings are passed to PCRE library functions as vectors
-of bytes with the C type "char *". In the 16-bit library, strings are passed as
-vectors of unsigned 16-bit quantities. The macro PCRE_UCHAR16 specifies an
-appropriate data type, and PCRE_SPTR16 is defined as "const PCRE_UCHAR16 *". In
-very many environments, "short int" is a 16-bit data type. When PCRE is built,
-it defines PCRE_UCHAR16 as "unsigned short int", but checks that it really is a
-16-bit data type. If it is not, the build fails with an error message telling
-the maintainer to modify the definition appropriately.
-</P>
-<br><a name="SEC10" href="#TOC1">STRUCTURE TYPES</a><br>
-<P>
-The types of the opaque structures that are used for compiled 16-bit patterns
-and JIT stacks are <b>pcre16</b> and <b>pcre16_jit_stack</b> respectively. The
-type of the user-accessible structure that is returned by <b>pcre16_study()</b>
-is <b>pcre16_extra</b>, and the type of the structure that is used for passing
-data to a callout function is <b>pcre16_callout_block</b>. These structures
-contain the same fields, with the same names, as their 8-bit counterparts. The
-only difference is that pointers to character strings are 16-bit instead of
-8-bit types.
-</P>
-<br><a name="SEC11" href="#TOC1">16-BIT FUNCTIONS</a><br>
-<P>
-For every function in the 8-bit library there is a corresponding function in
-the 16-bit library with a name that starts with <b>pcre16_</b> instead of
-<b>pcre_</b>. The prototypes are listed above. In addition, there is one extra
-function, <b>pcre16_utf16_to_host_byte_order()</b>. This is a utility function
-that converts a UTF-16 character string to host byte order if necessary. The
-other 16-bit functions expect the strings they are passed to be in host byte
-order.
-</P>
-<P>
-The <i>input</i> and <i>output</i> arguments of
-<b>pcre16_utf16_to_host_byte_order()</b> may point to the same address, that is,
-conversion in place is supported. The output buffer must be at least as long as
-the input.
-</P>
-<P>
-The <i>length</i> argument specifies the number of 16-bit data units in the
-input string; a negative value specifies a zero-terminated string.
-</P>
-<P>
-If <i>byte_order</i> is NULL, it is assumed that the string starts off in host
-byte order. This may be changed by byte-order marks (BOMs) anywhere in the
-string (commonly as the first character).
-</P>
-<P>
-If <i>byte_order</i> is not NULL, a non-zero value of the integer to which it
-points means that the input starts off in host byte order, otherwise the
-opposite order is assumed. Again, BOMs in the string can change this. The final
-byte order is passed back at the end of processing.
-</P>
-<P>
-If <i>keep_boms</i> is not zero, byte-order mark characters (0xfeff) are copied
-into the output string. Otherwise they are discarded.
-</P>
-<P>
-The result of the function is the number of 16-bit units placed into the output
-buffer, including the zero terminator if the string was zero-terminated.
-</P>
-<br><a name="SEC12" href="#TOC1">SUBJECT STRING OFFSETS</a><br>
-<P>
-The lengths and starting offsets of subject strings must be specified in 16-bit
-data units, and the offsets within subject strings that are returned by the
-matching functions are in also 16-bit units rather than bytes.
-</P>
-<br><a name="SEC13" href="#TOC1">NAMED SUBPATTERNS</a><br>
-<P>
-The name-to-number translation table that is maintained for named subpatterns
-uses 16-bit characters. The <b>pcre16_get_stringtable_entries()</b> function
-returns the length of each entry in the table as the number of 16-bit data
-units.
-</P>
-<br><a name="SEC14" href="#TOC1">OPTION NAMES</a><br>
-<P>
-There are two new general option names, PCRE_UTF16 and PCRE_NO_UTF16_CHECK,
-which correspond to PCRE_UTF8 and PCRE_NO_UTF8_CHECK in the 8-bit library. In
-fact, these new options define the same bits in the options word. There is a
-discussion about the
-<a href="pcreunicode.html#utf16strings">validity of UTF-16 strings</a>
-in the
-<a href="pcreunicode.html"><b>pcreunicode</b></a>
-page.
-</P>
-<P>
-For the <b>pcre16_config()</b> function there is an option PCRE_CONFIG_UTF16
-that returns 1 if UTF-16 support is configured, otherwise 0. If this option is
-given to <b>pcre_config()</b> or <b>pcre32_config()</b>, or if the
-PCRE_CONFIG_UTF8 or PCRE_CONFIG_UTF32 option is given to <b>pcre16_config()</b>,
-the result is the PCRE_ERROR_BADOPTION error.
-</P>
-<br><a name="SEC15" href="#TOC1">CHARACTER CODES</a><br>
-<P>
-In 16-bit mode, when PCRE_UTF16 is not set, character values are treated in the
-same way as in 8-bit, non UTF-8 mode, except, of course, that they can range
-from 0 to 0xffff instead of 0 to 0xff. Character types for characters less than
-0xff can therefore be influenced by the locale in the same way as before.
-Characters greater than 0xff have only one case, and no "type" (such as letter
-or digit).
-</P>
-<P>
-In UTF-16 mode, the character code is Unicode, in the range 0 to 0x10ffff, with
-the exception of values in the range 0xd800 to 0xdfff because those are
-"surrogate" values that are used in pairs to encode values greater than 0xffff.
-</P>
-<P>
-A UTF-16 string can indicate its endianness by special code knows as a
-byte-order mark (BOM). The PCRE functions do not handle this, expecting strings
-to be in host byte order. A utility function called
-<b>pcre16_utf16_to_host_byte_order()</b> is provided to help with this (see
-above).
-</P>
-<br><a name="SEC16" href="#TOC1">ERROR NAMES</a><br>
-<P>
-The errors PCRE_ERROR_BADUTF16_OFFSET and PCRE_ERROR_SHORTUTF16 correspond to
-their 8-bit counterparts. The error PCRE_ERROR_BADMODE is given when a compiled
-pattern is passed to a function that processes patterns in the other
-mode, for example, if a pattern compiled with <b>pcre_compile()</b> is passed to
-<b>pcre16_exec()</b>.
-</P>
-<P>
-There are new error codes whose names begin with PCRE_UTF16_ERR for invalid
-UTF-16 strings, corresponding to the PCRE_UTF8_ERR codes for UTF-8 strings that
-are described in the section entitled
-<a href="pcreapi.html#badutf8reasons">"Reason codes for invalid UTF-8 strings"</a>
-in the main
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page. The UTF-16 errors are:
-<pre>
- PCRE_UTF16_ERR1 Missing low surrogate at end of string
- PCRE_UTF16_ERR2 Invalid low surrogate follows high surrogate
- PCRE_UTF16_ERR3 Isolated low surrogate
- PCRE_UTF16_ERR4 Non-character
-</PRE>
-</P>
-<br><a name="SEC17" href="#TOC1">ERROR TEXTS</a><br>
-<P>
-If there is an error while compiling a pattern, the error text that is passed
-back by <b>pcre16_compile()</b> or <b>pcre16_compile2()</b> is still an 8-bit
-character string, zero-terminated.
-</P>
-<br><a name="SEC18" href="#TOC1">CALLOUTS</a><br>
-<P>
-The <i>subject</i> and <i>mark</i> fields in the callout block that is passed to
-a callout function point to 16-bit vectors.
-</P>
-<br><a name="SEC19" href="#TOC1">TESTING</a><br>
-<P>
-The <b>pcretest</b> program continues to operate with 8-bit input and output
-files, but it can be used for testing the 16-bit library. If it is run with the
-command line option <b>-16</b>, patterns and subject strings are converted from
-8-bit to 16-bit before being passed to PCRE, and the 16-bit library functions
-are used instead of the 8-bit ones. Returned 16-bit strings are converted to
-8-bit for output. If both the 8-bit and the 32-bit libraries were not compiled,
-<b>pcretest</b> defaults to 16-bit and the <b>-16</b> option is ignored.
-</P>
-<P>
-When PCRE is being built, the <b>RunTest</b> script that is called by "make
-check" uses the <b>pcretest</b> <b>-C</b> option to discover which of the 8-bit,
-16-bit and 32-bit libraries has been built, and runs the tests appropriately.
-</P>
-<br><a name="SEC20" href="#TOC1">NOT SUPPORTED IN 16-BIT MODE</a><br>
-<P>
-Not all the features of the 8-bit library are available with the 16-bit
-library. The C++ and POSIX wrapper functions support only the 8-bit library,
-and the <b>pcregrep</b> program is at present 8-bit only.
-</P>
-<br><a name="SEC21" href="#TOC1">AUTHOR</a><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><a name="SEC22" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 12 May 2013
-<br>
-Copyright &copy; 1997-2013 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcre32.html b/libs/Pcre16/docs/doc/html/pcre32.html
deleted file mode 100644
index f96876e750..0000000000
--- a/libs/Pcre16/docs/doc/html/pcre32.html
+++ /dev/null
@@ -1,382 +0,0 @@
-<html>
-<head>
-<title>pcre32 specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre32 man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">PCRE 32-BIT API BASIC FUNCTIONS</a>
-<li><a name="TOC2" href="#SEC2">PCRE 32-BIT API STRING EXTRACTION FUNCTIONS</a>
-<li><a name="TOC3" href="#SEC3">PCRE 32-BIT API AUXILIARY FUNCTIONS</a>
-<li><a name="TOC4" href="#SEC4">PCRE 32-BIT API INDIRECTED FUNCTIONS</a>
-<li><a name="TOC5" href="#SEC5">PCRE 32-BIT API 32-BIT-ONLY FUNCTION</a>
-<li><a name="TOC6" href="#SEC6">THE PCRE 32-BIT LIBRARY</a>
-<li><a name="TOC7" href="#SEC7">THE HEADER FILE</a>
-<li><a name="TOC8" href="#SEC8">THE LIBRARY NAME</a>
-<li><a name="TOC9" href="#SEC9">STRING TYPES</a>
-<li><a name="TOC10" href="#SEC10">STRUCTURE TYPES</a>
-<li><a name="TOC11" href="#SEC11">32-BIT FUNCTIONS</a>
-<li><a name="TOC12" href="#SEC12">SUBJECT STRING OFFSETS</a>
-<li><a name="TOC13" href="#SEC13">NAMED SUBPATTERNS</a>
-<li><a name="TOC14" href="#SEC14">OPTION NAMES</a>
-<li><a name="TOC15" href="#SEC15">CHARACTER CODES</a>
-<li><a name="TOC16" href="#SEC16">ERROR NAMES</a>
-<li><a name="TOC17" href="#SEC17">ERROR TEXTS</a>
-<li><a name="TOC18" href="#SEC18">CALLOUTS</a>
-<li><a name="TOC19" href="#SEC19">TESTING</a>
-<li><a name="TOC20" href="#SEC20">NOT SUPPORTED IN 32-BIT MODE</a>
-<li><a name="TOC21" href="#SEC21">AUTHOR</a>
-<li><a name="TOC22" href="#SEC22">REVISION</a>
-</ul>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<br><a name="SEC1" href="#TOC1">PCRE 32-BIT API BASIC FUNCTIONS</a><br>
-<P>
-<b>pcre32 *pcre32_compile(PCRE_SPTR32 <i>pattern</i>, int <i>options</i>,</b>
-<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
-<b> const unsigned char *<i>tableptr</i>);</b>
-<br>
-<br>
-<b>pcre32 *pcre32_compile2(PCRE_SPTR32 <i>pattern</i>, int <i>options</i>,</b>
-<b> int *<i>errorcodeptr</i>,</b>
-<b> const unsigned char *<i>tableptr</i>);</b>
-<br>
-<br>
-<b>pcre32_extra *pcre32_study(const pcre32 *<i>code</i>, int <i>options</i>,</b>
-<b> const char **<i>errptr</i>);</b>
-<br>
-<br>
-<b>void pcre32_free_study(pcre32_extra *<i>extra</i>);</b>
-<br>
-<br>
-<b>int pcre32_exec(const pcre32 *<i>code</i>, const pcre32_extra *<i>extra</i>,</b>
-<b> PCRE_SPTR32 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
-<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b>
-<br>
-<br>
-<b>int pcre32_dfa_exec(const pcre32 *<i>code</i>, const pcre32_extra *<i>extra</i>,</b>
-<b> PCRE_SPTR32 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
-<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
-<b> int *<i>workspace</i>, int <i>wscount</i>);</b>
-</P>
-<br><a name="SEC2" href="#TOC1">PCRE 32-BIT API STRING EXTRACTION FUNCTIONS</a><br>
-<P>
-<b>int pcre32_copy_named_substring(const pcre32 *<i>code</i>,</b>
-<b> PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b>
-<b> int <i>stringcount</i>, PCRE_SPTR32 <i>stringname</i>,</b>
-<b> PCRE_UCHAR32 *<i>buffer</i>, int <i>buffersize</i>);</b>
-<br>
-<br>
-<b>int pcre32_copy_substring(PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b>
-<b> int <i>stringcount</i>, int <i>stringnumber</i>, PCRE_UCHAR32 *<i>buffer</i>,</b>
-<b> int <i>buffersize</i>);</b>
-<br>
-<br>
-<b>int pcre32_get_named_substring(const pcre32 *<i>code</i>,</b>
-<b> PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b>
-<b> int <i>stringcount</i>, PCRE_SPTR32 <i>stringname</i>,</b>
-<b> PCRE_SPTR32 *<i>stringptr</i>);</b>
-<br>
-<br>
-<b>int pcre32_get_stringnumber(const pcre32 *<i>code</i>,</b>
-<b> PCRE_SPTR32 <i>name</i>);</b>
-<br>
-<br>
-<b>int pcre32_get_stringtable_entries(const pcre32 *<i>code</i>,</b>
-<b> PCRE_SPTR32 <i>name</i>, PCRE_UCHAR32 **<i>first</i>, PCRE_UCHAR32 **<i>last</i>);</b>
-<br>
-<br>
-<b>int pcre32_get_substring(PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b>
-<b> int <i>stringcount</i>, int <i>stringnumber</i>,</b>
-<b> PCRE_SPTR32 *<i>stringptr</i>);</b>
-<br>
-<br>
-<b>int pcre32_get_substring_list(PCRE_SPTR32 <i>subject</i>,</b>
-<b> int *<i>ovector</i>, int <i>stringcount</i>, PCRE_SPTR32 **<i>listptr</i>);</b>
-<br>
-<br>
-<b>void pcre32_free_substring(PCRE_SPTR32 <i>stringptr</i>);</b>
-<br>
-<br>
-<b>void pcre32_free_substring_list(PCRE_SPTR32 *<i>stringptr</i>);</b>
-</P>
-<br><a name="SEC3" href="#TOC1">PCRE 32-BIT API AUXILIARY FUNCTIONS</a><br>
-<P>
-<b>pcre32_jit_stack *pcre32_jit_stack_alloc(int <i>startsize</i>, int <i>maxsize</i>);</b>
-<br>
-<br>
-<b>void pcre32_jit_stack_free(pcre32_jit_stack *<i>stack</i>);</b>
-<br>
-<br>
-<b>void pcre32_assign_jit_stack(pcre32_extra *<i>extra</i>,</b>
-<b> pcre32_jit_callback <i>callback</i>, void *<i>data</i>);</b>
-<br>
-<br>
-<b>const unsigned char *pcre32_maketables(void);</b>
-<br>
-<br>
-<b>int pcre32_fullinfo(const pcre32 *<i>code</i>, const pcre32_extra *<i>extra</i>,</b>
-<b> int <i>what</i>, void *<i>where</i>);</b>
-<br>
-<br>
-<b>int pcre32_refcount(pcre32 *<i>code</i>, int <i>adjust</i>);</b>
-<br>
-<br>
-<b>int pcre32_config(int <i>what</i>, void *<i>where</i>);</b>
-<br>
-<br>
-<b>const char *pcre32_version(void);</b>
-<br>
-<br>
-<b>int pcre32_pattern_to_host_byte_order(pcre32 *<i>code</i>,</b>
-<b> pcre32_extra *<i>extra</i>, const unsigned char *<i>tables</i>);</b>
-</P>
-<br><a name="SEC4" href="#TOC1">PCRE 32-BIT API INDIRECTED FUNCTIONS</a><br>
-<P>
-<b>void *(*pcre32_malloc)(size_t);</b>
-<br>
-<br>
-<b>void (*pcre32_free)(void *);</b>
-<br>
-<br>
-<b>void *(*pcre32_stack_malloc)(size_t);</b>
-<br>
-<br>
-<b>void (*pcre32_stack_free)(void *);</b>
-<br>
-<br>
-<b>int (*pcre32_callout)(pcre32_callout_block *);</b>
-</P>
-<br><a name="SEC5" href="#TOC1">PCRE 32-BIT API 32-BIT-ONLY FUNCTION</a><br>
-<P>
-<b>int pcre32_utf32_to_host_byte_order(PCRE_UCHAR32 *<i>output</i>,</b>
-<b> PCRE_SPTR32 <i>input</i>, int <i>length</i>, int *<i>byte_order</i>,</b>
-<b> int <i>keep_boms</i>);</b>
-</P>
-<br><a name="SEC6" href="#TOC1">THE PCRE 32-BIT LIBRARY</a><br>
-<P>
-Starting with release 8.32, it is possible to compile a PCRE library that
-supports 32-bit character strings, including UTF-32 strings, as well as or
-instead of the original 8-bit library. This work was done by Christian Persch,
-based on the work done by Zoltan Herczeg for the 16-bit library. All three
-libraries contain identical sets of functions, used in exactly the same way.
-Only the names of the functions and the data types of their arguments and
-results are different. To avoid over-complication and reduce the documentation
-maintenance load, most of the PCRE documentation describes the 8-bit library,
-with only occasional references to the 16-bit and 32-bit libraries. This page
-describes what is different when you use the 32-bit library.
-</P>
-<P>
-WARNING: A single application can be linked with all or any of the three
-libraries, but you must take care when processing any particular pattern
-to use functions from just one library. For example, if you want to study
-a pattern that was compiled with <b>pcre32_compile()</b>, you must do so
-with <b>pcre32_study()</b>, not <b>pcre_study()</b>, and you must free the
-study data with <b>pcre32_free_study()</b>.
-</P>
-<br><a name="SEC7" href="#TOC1">THE HEADER FILE</a><br>
-<P>
-There is only one header file, <b>pcre.h</b>. It contains prototypes for all the
-functions in all libraries, as well as definitions of flags, structures, error
-codes, etc.
-</P>
-<br><a name="SEC8" href="#TOC1">THE LIBRARY NAME</a><br>
-<P>
-In Unix-like systems, the 32-bit library is called <b>libpcre32</b>, and can
-normally be accesss by adding <b>-lpcre32</b> to the command for linking an
-application that uses PCRE.
-</P>
-<br><a name="SEC9" href="#TOC1">STRING TYPES</a><br>
-<P>
-In the 8-bit library, strings are passed to PCRE library functions as vectors
-of bytes with the C type "char *". In the 32-bit library, strings are passed as
-vectors of unsigned 32-bit quantities. The macro PCRE_UCHAR32 specifies an
-appropriate data type, and PCRE_SPTR32 is defined as "const PCRE_UCHAR32 *". In
-very many environments, "unsigned int" is a 32-bit data type. When PCRE is
-built, it defines PCRE_UCHAR32 as "unsigned int", but checks that it really is
-a 32-bit data type. If it is not, the build fails with an error message telling
-the maintainer to modify the definition appropriately.
-</P>
-<br><a name="SEC10" href="#TOC1">STRUCTURE TYPES</a><br>
-<P>
-The types of the opaque structures that are used for compiled 32-bit patterns
-and JIT stacks are <b>pcre32</b> and <b>pcre32_jit_stack</b> respectively. The
-type of the user-accessible structure that is returned by <b>pcre32_study()</b>
-is <b>pcre32_extra</b>, and the type of the structure that is used for passing
-data to a callout function is <b>pcre32_callout_block</b>. These structures
-contain the same fields, with the same names, as their 8-bit counterparts. The
-only difference is that pointers to character strings are 32-bit instead of
-8-bit types.
-</P>
-<br><a name="SEC11" href="#TOC1">32-BIT FUNCTIONS</a><br>
-<P>
-For every function in the 8-bit library there is a corresponding function in
-the 32-bit library with a name that starts with <b>pcre32_</b> instead of
-<b>pcre_</b>. The prototypes are listed above. In addition, there is one extra
-function, <b>pcre32_utf32_to_host_byte_order()</b>. This is a utility function
-that converts a UTF-32 character string to host byte order if necessary. The
-other 32-bit functions expect the strings they are passed to be in host byte
-order.
-</P>
-<P>
-The <i>input</i> and <i>output</i> arguments of
-<b>pcre32_utf32_to_host_byte_order()</b> may point to the same address, that is,
-conversion in place is supported. The output buffer must be at least as long as
-the input.
-</P>
-<P>
-The <i>length</i> argument specifies the number of 32-bit data units in the
-input string; a negative value specifies a zero-terminated string.
-</P>
-<P>
-If <i>byte_order</i> is NULL, it is assumed that the string starts off in host
-byte order. This may be changed by byte-order marks (BOMs) anywhere in the
-string (commonly as the first character).
-</P>
-<P>
-If <i>byte_order</i> is not NULL, a non-zero value of the integer to which it
-points means that the input starts off in host byte order, otherwise the
-opposite order is assumed. Again, BOMs in the string can change this. The final
-byte order is passed back at the end of processing.
-</P>
-<P>
-If <i>keep_boms</i> is not zero, byte-order mark characters (0xfeff) are copied
-into the output string. Otherwise they are discarded.
-</P>
-<P>
-The result of the function is the number of 32-bit units placed into the output
-buffer, including the zero terminator if the string was zero-terminated.
-</P>
-<br><a name="SEC12" href="#TOC1">SUBJECT STRING OFFSETS</a><br>
-<P>
-The lengths and starting offsets of subject strings must be specified in 32-bit
-data units, and the offsets within subject strings that are returned by the
-matching functions are in also 32-bit units rather than bytes.
-</P>
-<br><a name="SEC13" href="#TOC1">NAMED SUBPATTERNS</a><br>
-<P>
-The name-to-number translation table that is maintained for named subpatterns
-uses 32-bit characters. The <b>pcre32_get_stringtable_entries()</b> function
-returns the length of each entry in the table as the number of 32-bit data
-units.
-</P>
-<br><a name="SEC14" href="#TOC1">OPTION NAMES</a><br>
-<P>
-There are two new general option names, PCRE_UTF32 and PCRE_NO_UTF32_CHECK,
-which correspond to PCRE_UTF8 and PCRE_NO_UTF8_CHECK in the 8-bit library. In
-fact, these new options define the same bits in the options word. There is a
-discussion about the
-<a href="pcreunicode.html#utf32strings">validity of UTF-32 strings</a>
-in the
-<a href="pcreunicode.html"><b>pcreunicode</b></a>
-page.
-</P>
-<P>
-For the <b>pcre32_config()</b> function there is an option PCRE_CONFIG_UTF32
-that returns 1 if UTF-32 support is configured, otherwise 0. If this option is
-given to <b>pcre_config()</b> or <b>pcre16_config()</b>, or if the
-PCRE_CONFIG_UTF8 or PCRE_CONFIG_UTF16 option is given to <b>pcre32_config()</b>,
-the result is the PCRE_ERROR_BADOPTION error.
-</P>
-<br><a name="SEC15" href="#TOC1">CHARACTER CODES</a><br>
-<P>
-In 32-bit mode, when PCRE_UTF32 is not set, character values are treated in the
-same way as in 8-bit, non UTF-8 mode, except, of course, that they can range
-from 0 to 0x7fffffff instead of 0 to 0xff. Character types for characters less
-than 0xff can therefore be influenced by the locale in the same way as before.
-Characters greater than 0xff have only one case, and no "type" (such as letter
-or digit).
-</P>
-<P>
-In UTF-32 mode, the character code is Unicode, in the range 0 to 0x10ffff, with
-the exception of values in the range 0xd800 to 0xdfff because those are
-"surrogate" values that are ill-formed in UTF-32.
-</P>
-<P>
-A UTF-32 string can indicate its endianness by special code knows as a
-byte-order mark (BOM). The PCRE functions do not handle this, expecting strings
-to be in host byte order. A utility function called
-<b>pcre32_utf32_to_host_byte_order()</b> is provided to help with this (see
-above).
-</P>
-<br><a name="SEC16" href="#TOC1">ERROR NAMES</a><br>
-<P>
-The error PCRE_ERROR_BADUTF32 corresponds to its 8-bit counterpart.
-The error PCRE_ERROR_BADMODE is given when a compiled
-pattern is passed to a function that processes patterns in the other
-mode, for example, if a pattern compiled with <b>pcre_compile()</b> is passed to
-<b>pcre32_exec()</b>.
-</P>
-<P>
-There are new error codes whose names begin with PCRE_UTF32_ERR for invalid
-UTF-32 strings, corresponding to the PCRE_UTF8_ERR codes for UTF-8 strings that
-are described in the section entitled
-<a href="pcreapi.html#badutf8reasons">"Reason codes for invalid UTF-8 strings"</a>
-in the main
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page. The UTF-32 errors are:
-<pre>
- PCRE_UTF32_ERR1 Surrogate character (range from 0xd800 to 0xdfff)
- PCRE_UTF32_ERR2 Non-character
- PCRE_UTF32_ERR3 Character &#62; 0x10ffff
-</PRE>
-</P>
-<br><a name="SEC17" href="#TOC1">ERROR TEXTS</a><br>
-<P>
-If there is an error while compiling a pattern, the error text that is passed
-back by <b>pcre32_compile()</b> or <b>pcre32_compile2()</b> is still an 8-bit
-character string, zero-terminated.
-</P>
-<br><a name="SEC18" href="#TOC1">CALLOUTS</a><br>
-<P>
-The <i>subject</i> and <i>mark</i> fields in the callout block that is passed to
-a callout function point to 32-bit vectors.
-</P>
-<br><a name="SEC19" href="#TOC1">TESTING</a><br>
-<P>
-The <b>pcretest</b> program continues to operate with 8-bit input and output
-files, but it can be used for testing the 32-bit library. If it is run with the
-command line option <b>-32</b>, patterns and subject strings are converted from
-8-bit to 32-bit before being passed to PCRE, and the 32-bit library functions
-are used instead of the 8-bit ones. Returned 32-bit strings are converted to
-8-bit for output. If both the 8-bit and the 16-bit libraries were not compiled,
-<b>pcretest</b> defaults to 32-bit and the <b>-32</b> option is ignored.
-</P>
-<P>
-When PCRE is being built, the <b>RunTest</b> script that is called by "make
-check" uses the <b>pcretest</b> <b>-C</b> option to discover which of the 8-bit,
-16-bit and 32-bit libraries has been built, and runs the tests appropriately.
-</P>
-<br><a name="SEC20" href="#TOC1">NOT SUPPORTED IN 32-BIT MODE</a><br>
-<P>
-Not all the features of the 8-bit library are available with the 32-bit
-library. The C++ and POSIX wrapper functions support only the 8-bit library,
-and the <b>pcregrep</b> program is at present 8-bit only.
-</P>
-<br><a name="SEC21" href="#TOC1">AUTHOR</a><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><a name="SEC22" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 12 May 2013
-<br>
-Copyright &copy; 1997-2013 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcre_assign_jit_stack.html b/libs/Pcre16/docs/doc/html/pcre_assign_jit_stack.html
deleted file mode 100644
index b2eef704db..0000000000
--- a/libs/Pcre16/docs/doc/html/pcre_assign_jit_stack.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<html>
-<head>
-<title>pcre_assign_jit_stack specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_assign_jit_stack man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>void pcre_assign_jit_stack(pcre_extra *<i>extra</i>,</b>
-<b> pcre_jit_callback <i>callback</i>, void *<i>data</i>);</b>
-<br>
-<br>
-<b>void pcre16_assign_jit_stack(pcre16_extra *<i>extra</i>,</b>
-<b> pcre16_jit_callback <i>callback</i>, void *<i>data</i>);</b>
-<br>
-<br>
-<b>void pcre32_assign_jit_stack(pcre32_extra *<i>extra</i>,</b>
-<b> pcre32_jit_callback <i>callback</i>, void *<i>data</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function provides control over the memory used as a stack at run-time by a
-call to <b>pcre[16|32]_exec()</b> with a pattern that has been successfully
-compiled with JIT optimization. The arguments are:
-<pre>
- extra the data pointer returned by <b>pcre[16|32]_study()</b>
- callback a callback function
- data a JIT stack or a value to be passed to the callback
- function
-</PRE>
-</P>
-<P>
-If <i>callback</i> is NULL and <i>data</i> is NULL, an internal 32K block on
-the machine stack is used.
-</P>
-<P>
-If <i>callback</i> is NULL and <i>data</i> is not NULL, <i>data</i> must
-be a valid JIT stack, the result of calling <b>pcre[16|32]_jit_stack_alloc()</b>.
-</P>
-<P>
-If <i>callback</i> not NULL, it is called with <i>data</i> as an argument at
-the start of matching, in order to set up a JIT stack. If the result is NULL,
-the internal 32K stack is used; otherwise the return value must be a valid JIT
-stack, the result of calling <b>pcre[16|32]_jit_stack_alloc()</b>.
-</P>
-<P>
-You may safely assign the same JIT stack to multiple patterns, as long as they
-are all matched in the same thread. In a multithread application, each thread
-must use its own JIT stack. For more details, see the
-<a href="pcrejit.html"><b>pcrejit</b></a>
-page.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcre_compile.html b/libs/Pcre16/docs/doc/html/pcre_compile.html
deleted file mode 100644
index 95b4bec63c..0000000000
--- a/libs/Pcre16/docs/doc/html/pcre_compile.html
+++ /dev/null
@@ -1,111 +0,0 @@
-<html>
-<head>
-<title>pcre_compile specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_compile man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>pcre *pcre_compile(const char *<i>pattern</i>, int <i>options</i>,</b>
-<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
-<b> const unsigned char *<i>tableptr</i>);</b>
-<br>
-<br>
-<b>pcre16 *pcre16_compile(PCRE_SPTR16 <i>pattern</i>, int <i>options</i>,</b>
-<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
-<b> const unsigned char *<i>tableptr</i>);</b>
-<br>
-<br>
-<b>pcre32 *pcre32_compile(PCRE_SPTR32 <i>pattern</i>, int <i>options</i>,</b>
-<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
-<b> const unsigned char *<i>tableptr</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function compiles a regular expression into an internal form. It is the
-same as <b>pcre[16|32]_compile2()</b>, except for the absence of the
-<i>errorcodeptr</i> argument. Its arguments are:
-<pre>
- <i>pattern</i> A zero-terminated string containing the
- regular expression to be compiled
- <i>options</i> Zero or more option bits
- <i>errptr</i> Where to put an error message
- <i>erroffset</i> Offset in pattern where error was found
- <i>tableptr</i> Pointer to character tables, or NULL to
- use the built-in default
-</pre>
-The option bits are:
-<pre>
- 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 white space and # comments
- PCRE_EXTRA PCRE extra features
- (not much use currently)
- PCRE_FIRSTLINE Force matching to be before newline
- PCRE_JAVASCRIPT_COMPAT JavaScript compatibility
- PCRE_MULTILINE ^ and $ match newlines within data
- PCRE_NEVER_UTF Lock out UTF, e.g. via (*UTF)
- 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_NO_AUTO_POSSESS Disable auto-possessification
- PCRE_NO_START_OPTIMIZE Disable match-time start optimizations
- PCRE_NO_UTF16_CHECK Do not check the pattern for UTF-16
- validity (only relevant if
- PCRE_UTF16 is set)
- PCRE_NO_UTF32_CHECK Do not check the pattern for UTF-32
- validity (only relevant if
- PCRE_UTF32 is set)
- PCRE_NO_UTF8_CHECK Do not check the pattern for UTF-8
- validity (only relevant if
- PCRE_UTF8 is set)
- PCRE_UCP Use Unicode properties for \d, \w, etc.
- PCRE_UNGREEDY Invert greediness of quantifiers
- PCRE_UTF16 Run in <b>pcre16_compile()</b> UTF-16 mode
- PCRE_UTF32 Run in <b>pcre32_compile()</b> UTF-32 mode
- PCRE_UTF8 Run in <b>pcre_compile()</b> UTF-8 mode
-</pre>
-PCRE must be built with UTF support in order to use PCRE_UTF8/16/32 and
-PCRE_NO_UTF8/16/32_CHECK, and with UCP support if PCRE_UCP is used.
-</P>
-<P>
-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.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcre_compile2.html b/libs/Pcre16/docs/doc/html/pcre_compile2.html
deleted file mode 100644
index 9cd56a237b..0000000000
--- a/libs/Pcre16/docs/doc/html/pcre_compile2.html
+++ /dev/null
@@ -1,115 +0,0 @@
-<html>
-<head>
-<title>pcre_compile2 specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_compile2 man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>pcre *pcre_compile2(const char *<i>pattern</i>, int <i>options</i>,</b>
-<b> int *<i>errorcodeptr</i>,</b>
-<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
-<b> const unsigned char *<i>tableptr</i>);</b>
-<br>
-<br>
-<b>pcre16 *pcre16_compile2(PCRE_SPTR16 <i>pattern</i>, int <i>options</i>,</b>
-<b> int *<i>errorcodeptr</i>,</b>
-<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
-<b> const unsigned char *<i>tableptr</i>);</b>
-<br>
-<br>
-<b>pcre32 *pcre32_compile2(PCRE_SPTR32 <i>pattern</i>, int <i>options</i>,</b>
-<b>" int *<i>errorcodeptr</i>,£</b>
-<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
-<b> const unsigned char *<i>tableptr</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function compiles a regular expression into an internal form. It is the
-same as <b>pcre[16|32]_compile()</b>, except for the addition of the
-<i>errorcodeptr</i> argument. The arguments are:
-<pre>
- <i>pattern</i> A zero-terminated string containing the
- regular expression to be compiled
- <i>options</i> Zero or more option bits
- <i>errorcodeptr</i> Where to put an error code
- <i>errptr</i> Where to put an error message
- <i>erroffset</i> Offset in pattern where error was found
- <i>tableptr</i> Pointer to character tables, or NULL to
- use the built-in default
-</pre>
-The option bits are:
-<pre>
- 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 white space and # comments
- PCRE_EXTRA PCRE extra features
- (not much use currently)
- PCRE_FIRSTLINE Force matching to be before newline
- PCRE_JAVASCRIPT_COMPAT JavaScript compatibility
- PCRE_MULTILINE ^ and $ match newlines within data
- PCRE_NEVER_UTF Lock out UTF, e.g. via (*UTF)
- 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_NO_AUTO_POSSESS Disable auto-possessification
- PCRE_NO_START_OPTIMIZE Disable match-time start optimizations
- PCRE_NO_UTF16_CHECK Do not check the pattern for UTF-16
- validity (only relevant if
- PCRE_UTF16 is set)
- PCRE_NO_UTF32_CHECK Do not check the pattern for UTF-32
- validity (only relevant if
- PCRE_UTF32 is set)
- PCRE_NO_UTF8_CHECK Do not check the pattern for UTF-8
- validity (only relevant if
- PCRE_UTF8 is set)
- PCRE_UCP Use Unicode properties for \d, \w, etc.
- PCRE_UNGREEDY Invert greediness of quantifiers
- PCRE_UTF16 Run <b>pcre16_compile()</b> in UTF-16 mode
- PCRE_UTF32 Run <b>pcre32_compile()</b> in UTF-32 mode
- PCRE_UTF8 Run <b>pcre_compile()</b> in UTF-8 mode
-</pre>
-PCRE must be built with UTF support in order to use PCRE_UTF8/16/32 and
-PCRE_NO_UTF8/16/32_CHECK, and with UCP support if PCRE_UCP is used.
-</P>
-<P>
-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.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcre_config.html b/libs/Pcre16/docs/doc/html/pcre_config.html
deleted file mode 100644
index 72fb9caa1f..0000000000
--- a/libs/Pcre16/docs/doc/html/pcre_config.html
+++ /dev/null
@@ -1,94 +0,0 @@
-<html>
-<head>
-<title>pcre_config specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_config man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>int pcre_config(int <i>what</i>, void *<i>where</i>);</b>
-</P>
-<P>
-<b>int pcre16_config(int <i>what</i>, void *<i>where</i>);</b>
-</P>
-<P>
-<b>int pcre32_config(int <i>what</i>, void *<i>where</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function makes it possible for a client program to find out which optional
-features are available in the version of the PCRE library it is using. The
-arguments are as follows:
-<pre>
- <i>what</i> A code specifying what information is required
- <i>where</i> Points to where to put the data
-</pre>
-The <i>where</i> argument must point to an integer variable, except for
-PCRE_CONFIG_MATCH_LIMIT, PCRE_CONFIG_MATCH_LIMIT_RECURSION, and
-PCRE_CONFIG_PARENS_LIMIT, when it must point to an unsigned long integer,
-and for PCRE_CONFIG_JITTARGET, when it must point to a const char*.
-The available codes are:
-<pre>
- PCRE_CONFIG_JIT Availability of just-in-time compiler
- support (1=yes 0=no)
- PCRE_CONFIG_JITTARGET String containing information about the
- target architecture for the JIT compiler,
- or NULL if there is no JIT support
- PCRE_CONFIG_LINK_SIZE Internal link size: 2, 3, or 4
- PCRE_CONFIG_PARENS_LIMIT Parentheses nesting limit
- PCRE_CONFIG_MATCH_LIMIT Internal resource limit
- 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
- <b>malloc()</b> is used by the POSIX API
- PCRE_CONFIG_STACKRECURSE Recursion implementation (1=stack 0=heap)
- PCRE_CONFIG_UTF16 Availability of UTF-16 support (1=yes
- 0=no); option for <b>pcre16_config()</b>
- PCRE_CONFIG_UTF32 Availability of UTF-32 support (1=yes
- 0=no); option for <b>pcre32_config()</b>
- PCRE_CONFIG_UTF8 Availability of UTF-8 support (1=yes 0=no);
- option for <b>pcre_config()</b>
- PCRE_CONFIG_UNICODE_PROPERTIES
- Availability of Unicode property support
- (1=yes 0=no)
-</pre>
-The function yields 0 on success or PCRE_ERROR_BADOPTION otherwise. That error
-is also given if PCRE_CONFIG_UTF16 or PCRE_CONFIG_UTF32 is passed to
-<b>pcre_config()</b>, if PCRE_CONFIG_UTF8 or PCRE_CONFIG_UTF32 is passed to
-<b>pcre16_config()</b>, or if PCRE_CONFIG_UTF8 or PCRE_CONFIG_UTF16 is passed to
-<b>pcre32_config()</b>.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcre_copy_named_substring.html b/libs/Pcre16/docs/doc/html/pcre_copy_named_substring.html
deleted file mode 100644
index 77b48043cd..0000000000
--- a/libs/Pcre16/docs/doc/html/pcre_copy_named_substring.html
+++ /dev/null
@@ -1,65 +0,0 @@
-<html>
-<head>
-<title>pcre_copy_named_substring specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_copy_named_substring man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>int pcre_copy_named_substring(const pcre *<i>code</i>,</b>
-<b> const char *<i>subject</i>, int *<i>ovector</i>,</b>
-<b> int <i>stringcount</i>, const char *<i>stringname</i>,</b>
-<b> char *<i>buffer</i>, int <i>buffersize</i>);</b>
-<br>
-<br>
-<b>int pcre16_copy_named_substring(const pcre16 *<i>code</i>,</b>
-<b> PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b>
-<b> int <i>stringcount</i>, PCRE_SPTR16 <i>stringname</i>,</b>
-<b> PCRE_UCHAR16 *<i>buffer</i>, int <i>buffersize</i>);</b>
-<br>
-<br>
-<b>int pcre32_copy_named_substring(const pcre32 *<i>code</i>,</b>
-<b> PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b>
-<b> int <i>stringcount</i>, PCRE_SPTR32 <i>stringname</i>,</b>
-<b> PCRE_UCHAR32 *<i>buffer</i>, int <i>buffersize</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This is a convenience function for extracting a captured substring, identified
-by name, into a given buffer. The arguments are:
-<pre>
- <i>code</i> Pattern that was successfully matched
- <i>subject</i> Subject that has been successfully matched
- <i>ovector</i> Offset vector that <b>pcre[16|32]_exec()</b> used
- <i>stringcount</i> Value returned by <b>pcre[16|32]_exec()</b>
- <i>stringname</i> Name of the required substring
- <i>buffer</i> Buffer to receive the string
- <i>buffersize</i> Size of buffer
-</pre>
-The yield is the length of the substring, PCRE_ERROR_NOMEMORY if the buffer was
-too small, or PCRE_ERROR_NOSUBSTRING if the string name is invalid.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcre_copy_substring.html b/libs/Pcre16/docs/doc/html/pcre_copy_substring.html
deleted file mode 100644
index ecaebe8533..0000000000
--- a/libs/Pcre16/docs/doc/html/pcre_copy_substring.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<html>
-<head>
-<title>pcre_copy_substring specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_copy_substring man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>int pcre_copy_substring(const char *<i>subject</i>, int *<i>ovector</i>,</b>
-<b> int <i>stringcount</i>, int <i>stringnumber</i>, char *<i>buffer</i>,</b>
-<b> int <i>buffersize</i>);</b>
-<br>
-<br>
-<b>int pcre16_copy_substring(PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b>
-<b> int <i>stringcount</i>, int <i>stringnumber</i>, PCRE_UCHAR16 *<i>buffer</i>,</b>
-<b> int <i>buffersize</i>);</b>
-<br>
-<br>
-<b>int pcre32_copy_substring(PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b>
-<b> int <i>stringcount</i>, int <i>stringnumber</i>, PCRE_UCHAR32 *<i>buffer</i>,</b>
-<b> int <i>buffersize</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This is a convenience function for extracting a captured substring into a given
-buffer. The arguments are:
-<pre>
- <i>subject</i> Subject that has been successfully matched
- <i>ovector</i> Offset vector that <b>pcre[16|32]_exec()</b> used
- <i>stringcount</i> Value returned by <b>pcre[16|32]_exec()</b>
- <i>stringnumber</i> Number of the required substring
- <i>buffer</i> Buffer to receive the string
- <i>buffersize</i> Size of buffer
-</pre>
-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.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcre_dfa_exec.html b/libs/Pcre16/docs/doc/html/pcre_dfa_exec.html
deleted file mode 100644
index 5fff6a7e0a..0000000000
--- a/libs/Pcre16/docs/doc/html/pcre_dfa_exec.html
+++ /dev/null
@@ -1,129 +0,0 @@
-<html>
-<head>
-<title>pcre_dfa_exec specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_dfa_exec man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>int pcre_dfa_exec(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
-<b> const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
-<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
-<b> int *<i>workspace</i>, int <i>wscount</i>);</b>
-<br>
-<br>
-<b>int pcre16_dfa_exec(const pcre16 *<i>code</i>, const pcre16_extra *<i>extra</i>,</b>
-<b> PCRE_SPTR16 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
-<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
-<b> int *<i>workspace</i>, int <i>wscount</i>);</b>
-<br>
-<br>
-<b>int pcre32_dfa_exec(const pcre32 *<i>code</i>, const pcre32_extra *<i>extra</i>,</b>
-<b> PCRE_SPTR32 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
-<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
-<b> int *<i>workspace</i>, int <i>wscount</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function matches a compiled regular expression against a given subject
-string, using an alternative matching algorithm that scans the subject string
-just once (<i>not</i> Perl-compatible). Note that the main, Perl-compatible,
-matching function is <b>pcre[16|32]_exec()</b>. The arguments for this function
-are:
-<pre>
- <i>code</i> Points to the compiled pattern
- <i>extra</i> Points to an associated <b>pcre[16|32]_extra</b> structure,
- or is NULL
- <i>subject</i> Points to the subject string
- <i>length</i> Length of the subject string
- <i>startoffset</i> Offset in the subject at which to start matching
- <i>options</i> Option bits
- <i>ovector</i> Points to a vector of ints for result offsets
- <i>ovecsize</i> Number of elements in the vector
- <i>workspace</i> Points to a vector of ints used as working space
- <i>wscount</i> Number of elements in the vector
-</pre>
-The units for <i>length</i> and <i>startoffset</i> are bytes for
-<b>pcre_exec()</b>, 16-bit data items for <b>pcre16_exec()</b>, and 32-bit items
-for <b>pcre32_exec()</b>. The options are:
-<pre>
- 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, & CRLF as newline sequences
- PCRE_NEWLINE_CR Recognize CR as the only newline sequence
- PCRE_NEWLINE_CRLF Recognize CRLF as the only newline sequence
- PCRE_NEWLINE_LF Recognize LF as the only 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_NOTEMPTY_ATSTART An empty string at the start of the subject
- is not a valid match
- PCRE_NO_START_OPTIMIZE Do not do "start-match" optimizations
- PCRE_NO_UTF16_CHECK Do not check the subject for UTF-16
- validity (only relevant if PCRE_UTF16
- was set at compile time)
- PCRE_NO_UTF32_CHECK Do not check the subject for UTF-32
- validity (only relevant if PCRE_UTF32
- was set at compile time)
- 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
- PCRE_PARTIAL_SOFT ) match if no full matches are found
- PCRE_PARTIAL_HARD Return PCRE_ERROR_PARTIAL for a partial match
- even if there is a full match as well
- PCRE_DFA_SHORTEST Return only the shortest match
- PCRE_DFA_RESTART Restart after a partial match
-</pre>
-There are restrictions on what may appear in a pattern when using this matching
-function. Details are given in the
-<a href="pcrematching.html"><b>pcrematching</b></a>
-documentation. For details of partial matching, see the
-<a href="pcrepartial.html"><b>pcrepartial</b></a>
-page.
-</P>
-<P>
-A <b>pcre[16|32]_extra</b> structure contains the following fields:
-<pre>
- <i>flags</i> Bits indicating which fields are set
- <i>study_data</i> Opaque data from <b>pcre[16|32]_study()</b>
- <i>match_limit</i> Limit on internal resource use
- <i>match_limit_recursion</i> Limit on internal recursion depth
- <i>callout_data</i> Opaque data passed back to callouts
- <i>tables</i> Points to character tables or is NULL
- <i>mark</i> For passing back a *MARK pointer
- <i>executable_jit</i> Opaque data from JIT compilation
-</pre>
-The flag bits are PCRE_EXTRA_STUDY_DATA, PCRE_EXTRA_MATCH_LIMIT,
-PCRE_EXTRA_MATCH_LIMIT_RECURSION, PCRE_EXTRA_CALLOUT_DATA,
-PCRE_EXTRA_TABLES, PCRE_EXTRA_MARK and PCRE_EXTRA_EXECUTABLE_JIT. For this
-matching function, the <i>match_limit</i> and <i>match_limit_recursion</i> fields
-are not used, and must not be set. The PCRE_EXTRA_EXECUTABLE_JIT flag and
-the corresponding variable are ignored.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcre_exec.html b/libs/Pcre16/docs/doc/html/pcre_exec.html
deleted file mode 100644
index 18e1a13ff8..0000000000
--- a/libs/Pcre16/docs/doc/html/pcre_exec.html
+++ /dev/null
@@ -1,111 +0,0 @@
-<html>
-<head>
-<title>pcre_exec specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_exec man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>int pcre_exec(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
-<b> const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
-<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b>
-<br>
-<br>
-<b>int pcre16_exec(const pcre16 *<i>code</i>, const pcre16_extra *<i>extra</i>,</b>
-<b> PCRE_SPTR16 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
-<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b>
-<br>
-<br>
-<b>int pcre32_exec(const pcre32 *<i>code</i>, const pcre32_extra *<i>extra</i>,</b>
-<b> PCRE_SPTR32 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
-<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function matches a compiled regular expression against a given subject
-string, using a matching algorithm that is similar to Perl's. It returns
-offsets to captured substrings. Its arguments are:
-<pre>
- <i>code</i> Points to the compiled pattern
- <i>extra</i> Points to an associated <b>pcre[16|32]_extra</b> structure,
- or is NULL
- <i>subject</i> Points to the subject string
- <i>length</i> Length of the subject string
- <i>startoffset</i> Offset in the subject at which to start matching
- <i>options</i> Option bits
- <i>ovector</i> Points to a vector of ints for result offsets
- <i>ovecsize</i> Number of elements in the vector (a multiple of 3)
-</pre>
-The units for <i>length</i> and <i>startoffset</i> are bytes for
-<b>pcre_exec()</b>, 16-bit data items for <b>pcre16_exec()</b>, and 32-bit items
-for <b>pcre32_exec()</b>. The options are:
-<pre>
- 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, & CRLF as newline sequences
- PCRE_NEWLINE_CR Recognize CR as the only newline sequence
- PCRE_NEWLINE_CRLF Recognize CRLF as the only newline sequence
- PCRE_NEWLINE_LF Recognize LF as the only newline sequence
- PCRE_NOTBOL Subject string is not the beginning of a line
- PCRE_NOTEOL Subject string is not the end of a line
- PCRE_NOTEMPTY An empty string is not a valid match
- PCRE_NOTEMPTY_ATSTART An empty string at the start of the subject
- is not a valid match
- PCRE_NO_START_OPTIMIZE Do not do "start-match" optimizations
- PCRE_NO_UTF16_CHECK Do not check the subject for UTF-16
- validity (only relevant if PCRE_UTF16
- was set at compile time)
- PCRE_NO_UTF32_CHECK Do not check the subject for UTF-32
- validity (only relevant if PCRE_UTF32
- was set at compile time)
- 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
- PCRE_PARTIAL_SOFT ) match if no full matches are found
- PCRE_PARTIAL_HARD Return PCRE_ERROR_PARTIAL for a partial match
- if that is found before a full match
-</pre>
-For details of partial matching, see the
-<a href="pcrepartial.html"><b>pcrepartial</b></a>
-page. A <b>pcre_extra</b> structure contains the following fields:
-<pre>
- <i>flags</i> Bits indicating which fields are set
- <i>study_data</i> Opaque data from <b>pcre[16|32]_study()</b>
- <i>match_limit</i> Limit on internal resource use
- <i>match_limit_recursion</i> Limit on internal recursion depth
- <i>callout_data</i> Opaque data passed back to callouts
- <i>tables</i> Points to character tables or is NULL
- <i>mark</i> For passing back a *MARK pointer
- <i>executable_jit</i> Opaque data from JIT compilation
-</pre>
-The flag bits are PCRE_EXTRA_STUDY_DATA, PCRE_EXTRA_MATCH_LIMIT,
-PCRE_EXTRA_MATCH_LIMIT_RECURSION, PCRE_EXTRA_CALLOUT_DATA,
-PCRE_EXTRA_TABLES, PCRE_EXTRA_MARK and PCRE_EXTRA_EXECUTABLE_JIT.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcre_free_study.html b/libs/Pcre16/docs/doc/html/pcre_free_study.html
deleted file mode 100644
index 7f9e10e863..0000000000
--- a/libs/Pcre16/docs/doc/html/pcre_free_study.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<html>
-<head>
-<title>pcre_free_study specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_free_study man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>void pcre_free_study(pcre_extra *<i>extra</i>);</b>
-</P>
-<P>
-<b>void pcre16_free_study(pcre16_extra *<i>extra</i>);</b>
-</P>
-<P>
-<b>void pcre32_free_study(pcre32_extra *<i>extra</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function is used to free the memory used for the data generated by a call
-to <b>pcre[16|32]_study()</b> when it is no longer needed. The argument must be the
-result of such a call.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcre_free_substring.html b/libs/Pcre16/docs/doc/html/pcre_free_substring.html
deleted file mode 100644
index 1fe6610746..0000000000
--- a/libs/Pcre16/docs/doc/html/pcre_free_substring.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<html>
-<head>
-<title>pcre_free_substring specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_free_substring man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>void pcre_free_substring(const char *<i>stringptr</i>);</b>
-</P>
-<P>
-<b>void pcre16_free_substring(PCRE_SPTR16 <i>stringptr</i>);</b>
-</P>
-<P>
-<b>void pcre32_free_substring(PCRE_SPTR32 <i>stringptr</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This is a convenience function for freeing the store obtained by a previous
-call to <b>pcre[16|32]_get_substring()</b> or <b>pcre[16|32]_get_named_substring()</b>.
-Its only argument is a pointer to the string.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcre_free_substring_list.html b/libs/Pcre16/docs/doc/html/pcre_free_substring_list.html
deleted file mode 100644
index c0861780b4..0000000000
--- a/libs/Pcre16/docs/doc/html/pcre_free_substring_list.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<html>
-<head>
-<title>pcre_free_substring_list specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_free_substring_list man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>void pcre_free_substring_list(const char **<i>stringptr</i>);</b>
-</P>
-<P>
-<b>void pcre16_free_substring_list(PCRE_SPTR16 *<i>stringptr</i>);</b>
-</P>
-<P>
-<b>void pcre32_free_substring_list(PCRE_SPTR32 *<i>stringptr</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This is a convenience function for freeing the store obtained by a previous
-call to <b>pcre[16|32]_get_substring_list()</b>. Its only argument is a pointer to
-the list of string pointers.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcre_fullinfo.html b/libs/Pcre16/docs/doc/html/pcre_fullinfo.html
deleted file mode 100644
index 2b7c72b3b9..0000000000
--- a/libs/Pcre16/docs/doc/html/pcre_fullinfo.html
+++ /dev/null
@@ -1,118 +0,0 @@
-<html>
-<head>
-<title>pcre_fullinfo specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_fullinfo man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>int pcre_fullinfo(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
-<b> int <i>what</i>, void *<i>where</i>);</b>
-<br>
-<br>
-<b>int pcre16_fullinfo(const pcre16 *<i>code</i>, const pcre16_extra *<i>extra</i>,</b>
-<b> int <i>what</i>, void *<i>where</i>);</b>
-<br>
-<br>
-<b>int pcre32_fullinfo(const pcre32 *<i>code</i>, const pcre32_extra *<i>extra</i>,</b>
-<b> int <i>what</i>, void *<i>where</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function returns information about a compiled pattern. Its arguments are:
-<pre>
- <i>code</i> Compiled regular expression
- <i>extra</i> Result of <b>pcre[16|32]_study()</b> or NULL
- <i>what</i> What information is required
- <i>where</i> Where to put the information
-</pre>
-The following information is available:
-<pre>
- PCRE_INFO_BACKREFMAX Number of highest back reference
- PCRE_INFO_CAPTURECOUNT Number of capturing subpatterns
- PCRE_INFO_DEFAULT_TABLES Pointer to default tables
- PCRE_INFO_FIRSTBYTE Fixed first data unit for a match, or
- -1 for start of string
- or after newline, or
- -2 otherwise
- PCRE_INFO_FIRSTTABLE Table of first data units (after studying)
- PCRE_INFO_HASCRORLF Return 1 if explicit CR or LF matches exist
- PCRE_INFO_JCHANGED Return 1 if (?J) or (?-J) was used
- PCRE_INFO_JIT Return 1 after successful JIT compilation
- PCRE_INFO_JITSIZE Size of JIT compiled code
- PCRE_INFO_LASTLITERAL Literal last data unit required
- PCRE_INFO_MINLENGTH Lower bound length of matching strings
- PCRE_INFO_MATCHEMPTY Return 1 if the pattern can match an empty string,
- 0 otherwise
- PCRE_INFO_MATCHLIMIT Match limit if set, otherwise PCRE_RROR_UNSET
- PCRE_INFO_MAXLOOKBEHIND Length (in characters) of the longest lookbehind assertion
- PCRE_INFO_NAMECOUNT Number of named subpatterns
- PCRE_INFO_NAMEENTRYSIZE Size of name table entry
- PCRE_INFO_NAMETABLE Pointer to name table
- PCRE_INFO_OKPARTIAL Return 1 if partial matching can be tried
- (always returns 1 after release 8.00)
- PCRE_INFO_OPTIONS Option bits used for compilation
- PCRE_INFO_SIZE Size of compiled pattern
- PCRE_INFO_STUDYSIZE Size of study data
- PCRE_INFO_FIRSTCHARACTER Fixed first data unit for a match
- PCRE_INFO_FIRSTCHARACTERFLAGS Returns
- 1 if there is a first data character set, which can
- then be retrieved using PCRE_INFO_FIRSTCHARACTER,
- 2 if the first character is at the start of the data
- string or after a newline, and
- 0 otherwise
- PCRE_INFO_RECURSIONLIMIT Recursion limit if set, otherwise PCRE_ERROR_UNSET
- PCRE_INFO_REQUIREDCHAR Literal last data unit required
- PCRE_INFO_REQUIREDCHARFLAGS Returns 1 if the last data character is set (which can then
- be retrieved using PCRE_INFO_REQUIREDCHAR); 0 otherwise
-</pre>
-The <i>where</i> argument must point to an integer variable, except for the
-following <i>what</i> values:
-<pre>
- PCRE_INFO_DEFAULT_TABLES const uint8_t *
- PCRE_INFO_FIRSTCHARACTER uint32_t
- PCRE_INFO_FIRSTTABLE const uint8_t *
- PCRE_INFO_JITSIZE size_t
- PCRE_INFO_MATCHLIMIT uint32_t
- PCRE_INFO_NAMETABLE PCRE_SPTR16 (16-bit library)
- PCRE_INFO_NAMETABLE PCRE_SPTR32 (32-bit library)
- PCRE_INFO_NAMETABLE const unsigned char * (8-bit library)
- PCRE_INFO_OPTIONS unsigned long int
- PCRE_INFO_SIZE size_t
- PCRE_INFO_STUDYSIZE size_t
- PCRE_INFO_RECURSIONLIMIT uint32_t
- PCRE_INFO_REQUIREDCHAR uint32_t
-</pre>
-The yield of the function is zero on success or:
-<pre>
- PCRE_ERROR_NULL the argument <i>code</i> was NULL
- the argument <i>where</i> was NULL
- PCRE_ERROR_BADMAGIC the "magic number" was not found
- PCRE_ERROR_BADOPTION the value of <i>what</i> was invalid
- PCRE_ERROR_UNSET the option was not set
-</PRE>
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcre_get_named_substring.html b/libs/Pcre16/docs/doc/html/pcre_get_named_substring.html
deleted file mode 100644
index 72924d9b25..0000000000
--- a/libs/Pcre16/docs/doc/html/pcre_get_named_substring.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<html>
-<head>
-<title>pcre_get_named_substring specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_get_named_substring man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>int pcre_get_named_substring(const pcre *<i>code</i>,</b>
-<b> const char *<i>subject</i>, int *<i>ovector</i>,</b>
-<b> int <i>stringcount</i>, const char *<i>stringname</i>,</b>
-<b> const char **<i>stringptr</i>);</b>
-<br>
-<br>
-<b>int pcre16_get_named_substring(const pcre16 *<i>code</i>,</b>
-<b> PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b>
-<b> int <i>stringcount</i>, PCRE_SPTR16 <i>stringname</i>,</b>
-<b> PCRE_SPTR16 *<i>stringptr</i>);</b>
-<br>
-<br>
-<b>int pcre32_get_named_substring(const pcre32 *<i>code</i>,</b>
-<b> PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b>
-<b> int <i>stringcount</i>, PCRE_SPTR32 <i>stringname</i>,</b>
-<b> PCRE_SPTR32 *<i>stringptr</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This is a convenience function for extracting a captured substring by name. The
-arguments are:
-<pre>
- <i>code</i> Compiled pattern
- <i>subject</i> Subject that has been successfully matched
- <i>ovector</i> Offset vector that <b>pcre[16|32]_exec()</b> used
- <i>stringcount</i> Value returned by <b>pcre[16|32]_exec()</b>
- <i>stringname</i> Name of the required substring
- <i>stringptr</i> Where to put the string pointer
-</pre>
-The memory in which the substring is placed is obtained by calling
-<b>pcre[16|32]_malloc()</b>. The convenience function
-<b>pcre[16|32]_free_substring()</b> 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.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcre_get_stringnumber.html b/libs/Pcre16/docs/doc/html/pcre_get_stringnumber.html
deleted file mode 100644
index 7324d782e7..0000000000
--- a/libs/Pcre16/docs/doc/html/pcre_get_stringnumber.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<html>
-<head>
-<title>pcre_get_stringnumber specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_get_stringnumber man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>int pcre_get_stringnumber(const pcre *<i>code</i>,</b>
-<b> const char *<i>name</i>);</b>
-<br>
-<br>
-<b>int pcre16_get_stringnumber(const pcre16 *<i>code</i>,</b>
-<b> PCRE_SPTR16 <i>name</i>);</b>
-<br>
-<br>
-<b>int pcre32_get_stringnumber(const pcre32 *<i>code</i>,</b>
-<b> PCRE_SPTR32 <i>name</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This convenience function finds the number of a named substring capturing
-parenthesis in a compiled pattern. Its arguments are:
-<pre>
- <i>code</i> Compiled regular expression
- <i>name</i> Name whose number is required
-</pre>
-The yield of the function is the number of the parenthesis if the name is
-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
-<b>pcre[16|32]_get_stringnumber()</b>. You can obtain the complete list by calling
-<b>pcre[16|32]_get_stringtable_entries()</b>.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcre_get_stringtable_entries.html b/libs/Pcre16/docs/doc/html/pcre_get_stringtable_entries.html
deleted file mode 100644
index 79906798e6..0000000000
--- a/libs/Pcre16/docs/doc/html/pcre_get_stringtable_entries.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<html>
-<head>
-<title>pcre_get_stringtable_entries specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_get_stringtable_entries man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>int pcre_get_stringtable_entries(const pcre *<i>code</i>,</b>
-<b> const char *<i>name</i>, char **<i>first</i>, char **<i>last</i>);</b>
-<br>
-<br>
-<b>int pcre16_get_stringtable_entries(const pcre16 *<i>code</i>,</b>
-<b> PCRE_SPTR16 <i>name</i>, PCRE_UCHAR16 **<i>first</i>, PCRE_UCHAR16 **<i>last</i>);</b>
-<br>
-<br>
-<b>int pcre32_get_stringtable_entries(const pcre32 *<i>code</i>,</b>
-<b> PCRE_SPTR32 <i>name</i>, PCRE_UCHAR32 **<i>first</i>, PCRE_UCHAR32 **<i>last</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-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
-<i>not</i> set), it is usually easier to use <b>pcre[16|32]_get_stringnumber()</b>
-instead.
-<pre>
- <i>code</i> Compiled regular expression
- <i>name</i> Name whose entries required
- <i>first</i> Where to return a pointer to the first entry
- <i>last</i> Where to return a pointer to the last entry
-</pre>
-The yield of the function is the length of each entry, or
-PCRE_ERROR_NOSUBSTRING if none are found.
-</P>
-<P>
-There is a complete description of the PCRE native API, including the format of
-the table entries, in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page, and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcre_get_substring.html b/libs/Pcre16/docs/doc/html/pcre_get_substring.html
deleted file mode 100644
index 1a8e4f5a49..0000000000
--- a/libs/Pcre16/docs/doc/html/pcre_get_substring.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<html>
-<head>
-<title>pcre_get_substring specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_get_substring man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>int pcre_get_substring(const char *<i>subject</i>, int *<i>ovector</i>,</b>
-<b> int <i>stringcount</i>, int <i>stringnumber</i>,</b>
-<b> const char **<i>stringptr</i>);</b>
-<br>
-<br>
-<b>int pcre16_get_substring(PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b>
-<b> int <i>stringcount</i>, int <i>stringnumber</i>,</b>
-<b> PCRE_SPTR16 *<i>stringptr</i>);</b>
-<br>
-<br>
-<b>int pcre32_get_substring(PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b>
-<b> int <i>stringcount</i>, int <i>stringnumber</i>,</b>
-<b> PCRE_SPTR32 *<i>stringptr</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This is a convenience function for extracting a captured substring. The
-arguments are:
-<pre>
- <i>subject</i> Subject that has been successfully matched
- <i>ovector</i> Offset vector that <b>pcre[16|32]_exec()</b> used
- <i>stringcount</i> Value returned by <b>pcre[16|32]_exec()</b>
- <i>stringnumber</i> Number of the required substring
- <i>stringptr</i> Where to put the string pointer
-</pre>
-The memory in which the substring is placed is obtained by calling
-<b>pcre[16|32]_malloc()</b>. The convenience function
-<b>pcre[16|32]_free_substring()</b> 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.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcre_get_substring_list.html b/libs/Pcre16/docs/doc/html/pcre_get_substring_list.html
deleted file mode 100644
index 7e8c6bc858..0000000000
--- a/libs/Pcre16/docs/doc/html/pcre_get_substring_list.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<html>
-<head>
-<title>pcre_get_substring_list specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_get_substring_list man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>int pcre_get_substring_list(const char *<i>subject</i>,</b>
-<b> int *<i>ovector</i>, int <i>stringcount</i>, const char ***<i>listptr</i>);</b>
-<br>
-<br>
-<b>int pcre16_get_substring_list(PCRE_SPTR16 <i>subject</i>,</b>
-<b> int *<i>ovector</i>, int <i>stringcount</i>, PCRE_SPTR16 **<i>listptr</i>);</b>
-<br>
-<br>
-<b>int pcre32_get_substring_list(PCRE_SPTR32 <i>subject</i>,</b>
-<b> int *<i>ovector</i>, int <i>stringcount</i>, PCRE_SPTR32 **<i>listptr</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This is a convenience function for extracting a list of all the captured
-substrings. The arguments are:
-<pre>
- <i>subject</i> Subject that has been successfully matched
- <i>ovector</i> Offset vector that <b>pcre[16|32]_exec</b> used
- <i>stringcount</i> Value returned by <b>pcre[16|32]_exec</b>
- <i>listptr</i> Where to put a pointer to the list
-</pre>
-The memory in which the substrings and the list are placed is obtained by
-calling <b>pcre[16|32]_malloc()</b>. The convenience function
-<b>pcre[16|32]_free_substring_list()</b> can be used to free it when it is no
-longer needed. A pointer to a list of pointers is put in the variable whose
-address is in <i>listptr</i>. The list is terminated by a NULL pointer. The
-yield of the function is zero on success or PCRE_ERROR_NOMEMORY if sufficient
-memory could not be obtained.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcre_jit_exec.html b/libs/Pcre16/docs/doc/html/pcre_jit_exec.html
deleted file mode 100644
index 4ebb0cbcac..0000000000
--- a/libs/Pcre16/docs/doc/html/pcre_jit_exec.html
+++ /dev/null
@@ -1,108 +0,0 @@
-<html>
-<head>
-<title>pcre_jit_exec specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_jit_exec man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>int pcre_jit_exec(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
-<b> const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
-<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
-<b> pcre_jit_stack *<i>jstack</i>);</b>
-<br>
-<br>
-<b>int pcre16_jit_exec(const pcre16 *<i>code</i>, const pcre16_extra *<i>extra</i>,</b>
-<b> PCRE_SPTR16 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
-<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
-<b> pcre_jit_stack *<i>jstack</i>);</b>
-<br>
-<br>
-<b>int pcre32_jit_exec(const pcre32 *<i>code</i>, const pcre32_extra *<i>extra</i>,</b>
-<b> PCRE_SPTR32 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
-<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
-<b> pcre_jit_stack *<i>jstack</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function matches a compiled regular expression that has been successfully
-studied with one of the JIT options against a given subject string, using a
-matching algorithm that is similar to Perl's. It is a "fast path" interface to
-JIT, and it bypasses some of the sanity checks that <b>pcre_exec()</b> applies.
-It returns offsets to captured substrings. Its arguments are:
-<pre>
- <i>code</i> Points to the compiled pattern
- <i>extra</i> Points to an associated <b>pcre[16|32]_extra</b> structure,
- or is NULL
- <i>subject</i> Points to the subject string
- <i>length</i> Length of the subject string, in bytes
- <i>startoffset</i> Offset in bytes in the subject at which to
- start matching
- <i>options</i> Option bits
- <i>ovector</i> Points to a vector of ints for result offsets
- <i>ovecsize</i> Number of elements in the vector (a multiple of 3)
- <i>jstack</i> Pointer to a JIT stack
-</pre>
-The allowed options are:
-<pre>
- PCRE_NOTBOL Subject string is not the beginning of a line
- PCRE_NOTEOL Subject string is not the end of a line
- PCRE_NOTEMPTY An empty string is not a valid match
- PCRE_NOTEMPTY_ATSTART An empty string at the start of the subject
- is not a valid match
- PCRE_NO_UTF16_CHECK Do not check the subject for UTF-16
- validity (only relevant if PCRE_UTF16
- was set at compile time)
- PCRE_NO_UTF32_CHECK Do not check the subject for UTF-32
- validity (only relevant if PCRE_UTF32
- was set at compile time)
- 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
- PCRE_PARTIAL_SOFT ) match if no full matches are found
- PCRE_PARTIAL_HARD Return PCRE_ERROR_PARTIAL for a partial match
- if that is found before a full match
-</pre>
-However, the PCRE_NO_UTF[8|16|32]_CHECK options have no effect, as this check
-is never applied. For details of partial matching, see the
-<a href="pcrepartial.html"><b>pcrepartial</b></a>
-page. A <b>pcre_extra</b> structure contains the following fields:
-<pre>
- <i>flags</i> Bits indicating which fields are set
- <i>study_data</i> Opaque data from <b>pcre[16|32]_study()</b>
- <i>match_limit</i> Limit on internal resource use
- <i>match_limit_recursion</i> Limit on internal recursion depth
- <i>callout_data</i> Opaque data passed back to callouts
- <i>tables</i> Points to character tables or is NULL
- <i>mark</i> For passing back a *MARK pointer
- <i>executable_jit</i> Opaque data from JIT compilation
-</pre>
-The flag bits are PCRE_EXTRA_STUDY_DATA, PCRE_EXTRA_MATCH_LIMIT,
-PCRE_EXTRA_MATCH_LIMIT_RECURSION, PCRE_EXTRA_CALLOUT_DATA,
-PCRE_EXTRA_TABLES, PCRE_EXTRA_MARK and PCRE_EXTRA_EXECUTABLE_JIT.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the JIT API in the
-<a href="pcrejit.html"><b>pcrejit</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcre_jit_stack_alloc.html b/libs/Pcre16/docs/doc/html/pcre_jit_stack_alloc.html
deleted file mode 100644
index 23ba450750..0000000000
--- a/libs/Pcre16/docs/doc/html/pcre_jit_stack_alloc.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<html>
-<head>
-<title>pcre_jit_stack_alloc specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_jit_stack_alloc man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>pcre_jit_stack *pcre_jit_stack_alloc(int <i>startsize</i>,</b>
-<b> int <i>maxsize</i>);</b>
-<br>
-<br>
-<b>pcre16_jit_stack *pcre16_jit_stack_alloc(int <i>startsize</i>,</b>
-<b> int <i>maxsize</i>);</b>
-<br>
-<br>
-<b>pcre32_jit_stack *pcre32_jit_stack_alloc(int <i>startsize</i>,</b>
-<b> int <i>maxsize</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function is used to create a stack for use by the code compiled by the JIT
-optimization of <b>pcre[16|32]_study()</b>. The arguments are a starting size for
-the stack, and a maximum size to which it is allowed to grow. The result can be
-passed to the JIT run-time code by <b>pcre[16|32]_assign_jit_stack()</b>, or that
-function can set up a callback for obtaining a stack. A maximum stack size of
-512K to 1M should be more than enough for any pattern. For more details, see
-the
-<a href="pcrejit.html"><b>pcrejit</b></a>
-page.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcre_jit_stack_free.html b/libs/Pcre16/docs/doc/html/pcre_jit_stack_free.html
deleted file mode 100644
index 8bd06e4655..0000000000
--- a/libs/Pcre16/docs/doc/html/pcre_jit_stack_free.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<html>
-<head>
-<title>pcre_jit_stack_free specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_jit_stack_free man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>void pcre_jit_stack_free(pcre_jit_stack *<i>stack</i>);</b>
-</P>
-<P>
-<b>void pcre16_jit_stack_free(pcre16_jit_stack *<i>stack</i>);</b>
-</P>
-<P>
-<b>void pcre32_jit_stack_free(pcre32_jit_stack *<i>stack</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function is used to free a JIT stack that was created by
-<b>pcre[16|32]_jit_stack_alloc()</b> when it is no longer needed. For more details,
-see the
-<a href="pcrejit.html"><b>pcrejit</b></a>
-page.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcre_maketables.html b/libs/Pcre16/docs/doc/html/pcre_maketables.html
deleted file mode 100644
index 3a7b5ebc4a..0000000000
--- a/libs/Pcre16/docs/doc/html/pcre_maketables.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<html>
-<head>
-<title>pcre_maketables specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_maketables man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>const unsigned char *pcre_maketables(void);</b>
-</P>
-<P>
-<b>const unsigned char *pcre16_maketables(void);</b>
-</P>
-<P>
-<b>const unsigned char *pcre32_maketables(void);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function builds a set of character tables for character values less than
-256. These can be passed to <b>pcre[16|32]_compile()</b> to override PCRE's
-internal, built-in tables (which were made by <b>pcre[16|32]_maketables()</b> when
-PCRE was compiled). You might want to do this if you are using a non-standard
-locale. The function yields a pointer to the tables.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcre_pattern_to_host_byte_order.html b/libs/Pcre16/docs/doc/html/pcre_pattern_to_host_byte_order.html
deleted file mode 100644
index 1b1c80372b..0000000000
--- a/libs/Pcre16/docs/doc/html/pcre_pattern_to_host_byte_order.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<html>
-<head>
-<title>pcre_pattern_to_host_byte_order specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_pattern_to_host_byte_order man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>int pcre_pattern_to_host_byte_order(pcre *<i>code</i>,</b>
-<b> pcre_extra *<i>extra</i>, const unsigned char *<i>tables</i>);</b>
-<br>
-<br>
-<b>int pcre16_pattern_to_host_byte_order(pcre16 *<i>code</i>,</b>
-<b> pcre16_extra *<i>extra</i>, const unsigned char *<i>tables</i>);</b>
-<br>
-<br>
-<b>int pcre32_pattern_to_host_byte_order(pcre32 *<i>code</i>,</b>
-<b> pcre32_extra *<i>extra</i>, const unsigned char *<i>tables</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function ensures that the bytes in 2-byte and 4-byte values in a compiled
-pattern are in the correct order for the current host. It is useful when a
-pattern that has been compiled on one host is transferred to another that might
-have different endianness. The arguments are:
-<pre>
- <i>code</i> A compiled regular expression
- <i>extra</i> Points to an associated <b>pcre[16|32]_extra</b> structure,
- or is NULL
- <i>tables</i> Pointer to character tables, or NULL to
- set the built-in default
-</pre>
-The result is 0 for success, a negative PCRE_ERROR_xxx value otherwise.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcre_refcount.html b/libs/Pcre16/docs/doc/html/pcre_refcount.html
deleted file mode 100644
index bfb92e6d8a..0000000000
--- a/libs/Pcre16/docs/doc/html/pcre_refcount.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<html>
-<head>
-<title>pcre_refcount specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_refcount man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>int pcre_refcount(pcre *<i>code</i>, int <i>adjust</i>);</b>
-</P>
-<P>
-<b>int pcre16_refcount(pcre16 *<i>code</i>, int <i>adjust</i>);</b>
-</P>
-<P>
-<b>int pcre32_refcount(pcre32 *<i>code</i>, int <i>adjust</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function is used to maintain a reference count inside a data block that
-contains a compiled pattern. Its arguments are:
-<pre>
- <i>code</i> Compiled regular expression
- <i>adjust</i> Adjustment to reference value
-</pre>
-The yield of the function is the adjusted reference value, which is constrained
-to lie between 0 and 65535.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcre_study.html b/libs/Pcre16/docs/doc/html/pcre_study.html
deleted file mode 100644
index af82f11409..0000000000
--- a/libs/Pcre16/docs/doc/html/pcre_study.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<html>
-<head>
-<title>pcre_study specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_study man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>pcre_extra *pcre_study(const pcre *<i>code</i>, int <i>options</i>,</b>
-<b> const char **<i>errptr</i>);</b>
-<br>
-<br>
-<b>pcre16_extra *pcre16_study(const pcre16 *<i>code</i>, int <i>options</i>,</b>
-<b> const char **<i>errptr</i>);</b>
-<br>
-<br>
-<b>pcre32_extra *pcre32_study(const pcre32 *<i>code</i>, int <i>options</i>,</b>
-<b> const char **<i>errptr</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function studies a compiled pattern, to see if additional information can
-be extracted that might speed up matching. Its arguments are:
-<pre>
- <i>code</i> A compiled regular expression
- <i>options</i> Options for <b>pcre[16|32]_study()</b>
- <i>errptr</i> Where to put an error message
-</pre>
-If the function succeeds, it returns a value that can be passed to
-<b>pcre[16|32]_exec()</b> or <b>pcre[16|32]_dfa_exec()</b> via their <i>extra</i>
-arguments.
-</P>
-<P>
-If the function returns NULL, either it could not find any additional
-information, or there was an error. You can tell the difference by looking at
-the error value. It is NULL in first case.
-</P>
-<P>
-The only option is PCRE_STUDY_JIT_COMPILE. It requests just-in-time compilation
-if possible. If PCRE has been compiled without JIT support, this option is
-ignored. See the
-<a href="pcrejit.html"><b>pcrejit</b></a>
-page for further details.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcre_utf16_to_host_byte_order.html b/libs/Pcre16/docs/doc/html/pcre_utf16_to_host_byte_order.html
deleted file mode 100644
index 18e7788f68..0000000000
--- a/libs/Pcre16/docs/doc/html/pcre_utf16_to_host_byte_order.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<html>
-<head>
-<title>pcre_utf16_to_host_byte_order specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_utf16_to_host_byte_order man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>int pcre16_utf16_to_host_byte_order(PCRE_UCHAR16 *<i>output</i>,</b>
-<b> PCRE_SPTR16 <i>input</i>, int <i>length</i>, int *<i>host_byte_order</i>,</b>
-<b> int <i>keep_boms</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function, which exists only in the 16-bit library, converts a UTF-16
-string to the correct order for the current host, taking account of any byte
-order marks (BOMs) within the string. Its arguments are:
-<pre>
- <i>output</i> pointer to output buffer, may be the same as <i>input</i>
- <i>input</i> pointer to input buffer
- <i>length</i> number of 16-bit units in the input, or negative for
- a zero-terminated string
- <i>host_byte_order</i> a NULL value or a non-zero value pointed to means
- start in host byte order
- <i>keep_boms</i> if non-zero, BOMs are copied to the output string
-</pre>
-The result of the function is the number of 16-bit units placed into the output
-buffer, including the zero terminator if the string was zero-terminated.
-</P>
-<P>
-If <i>host_byte_order</i> is not NULL, it is set to indicate the byte order that
-is current at the end of the string.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcre_utf32_to_host_byte_order.html b/libs/Pcre16/docs/doc/html/pcre_utf32_to_host_byte_order.html
deleted file mode 100644
index 772ae40cd9..0000000000
--- a/libs/Pcre16/docs/doc/html/pcre_utf32_to_host_byte_order.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<html>
-<head>
-<title>pcre_utf32_to_host_byte_order specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_utf32_to_host_byte_order man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>int pcre32_utf32_to_host_byte_order(PCRE_UCHAR32 *<i>output</i>,</b>
-<b> PCRE_SPTR32 <i>input</i>, int <i>length</i>, int *<i>host_byte_order</i>,</b>
-<b> int <i>keep_boms</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function, which exists only in the 32-bit library, converts a UTF-32
-string to the correct order for the current host, taking account of any byte
-order marks (BOMs) within the string. Its arguments are:
-<pre>
- <i>output</i> pointer to output buffer, may be the same as <i>input</i>
- <i>input</i> pointer to input buffer
- <i>length</i> number of 32-bit units in the input, or negative for
- a zero-terminated string
- <i>host_byte_order</i> a NULL value or a non-zero value pointed to means
- start in host byte order
- <i>keep_boms</i> if non-zero, BOMs are copied to the output string
-</pre>
-The result of the function is the number of 32-bit units placed into the output
-buffer, including the zero terminator if the string was zero-terminated.
-</P>
-<P>
-If <i>host_byte_order</i> is not NULL, it is set to indicate the byte order that
-is current at the end of the string.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcre_version.html b/libs/Pcre16/docs/doc/html/pcre_version.html
deleted file mode 100644
index d33e718955..0000000000
--- a/libs/Pcre16/docs/doc/html/pcre_version.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<html>
-<head>
-<title>pcre_version specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_version man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>const char *pcre_version(void);</b>
-</P>
-<P>
-<b>const char *pcre16_version(void);</b>
-</P>
-<P>
-<b>const char *pcre32_version(void);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function (even in the 16-bit and 32-bit libraries) returns a
-zero-terminated, 8-bit character string that gives the version number of the
-PCRE library and the date of its release.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcreapi.html b/libs/Pcre16/docs/doc/html/pcreapi.html
deleted file mode 100644
index 2d7adf185a..0000000000
--- a/libs/Pcre16/docs/doc/html/pcreapi.html
+++ /dev/null
@@ -1,2921 +0,0 @@
-<html>
-<head>
-<title>pcreapi specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcreapi man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">PCRE NATIVE API BASIC FUNCTIONS</a>
-<li><a name="TOC2" href="#SEC2">PCRE NATIVE API STRING EXTRACTION FUNCTIONS</a>
-<li><a name="TOC3" href="#SEC3">PCRE NATIVE API AUXILIARY FUNCTIONS</a>
-<li><a name="TOC4" href="#SEC4">PCRE NATIVE API INDIRECTED FUNCTIONS</a>
-<li><a name="TOC5" href="#SEC5">PCRE 8-BIT, 16-BIT, AND 32-BIT LIBRARIES</a>
-<li><a name="TOC6" href="#SEC6">PCRE API OVERVIEW</a>
-<li><a name="TOC7" href="#SEC7">NEWLINES</a>
-<li><a name="TOC8" href="#SEC8">MULTITHREADING</a>
-<li><a name="TOC9" href="#SEC9">SAVING PRECOMPILED PATTERNS FOR LATER USE</a>
-<li><a name="TOC10" href="#SEC10">CHECKING BUILD-TIME OPTIONS</a>
-<li><a name="TOC11" href="#SEC11">COMPILING A PATTERN</a>
-<li><a name="TOC12" href="#SEC12">COMPILATION ERROR CODES</a>
-<li><a name="TOC13" href="#SEC13">STUDYING A PATTERN</a>
-<li><a name="TOC14" href="#SEC14">LOCALE SUPPORT</a>
-<li><a name="TOC15" href="#SEC15">INFORMATION ABOUT A PATTERN</a>
-<li><a name="TOC16" href="#SEC16">REFERENCE COUNTS</a>
-<li><a name="TOC17" href="#SEC17">MATCHING A PATTERN: THE TRADITIONAL FUNCTION</a>
-<li><a name="TOC18" href="#SEC18">EXTRACTING CAPTURED SUBSTRINGS BY NUMBER</a>
-<li><a name="TOC19" href="#SEC19">EXTRACTING CAPTURED SUBSTRINGS BY NAME</a>
-<li><a name="TOC20" href="#SEC20">DUPLICATE SUBPATTERN NAMES</a>
-<li><a name="TOC21" href="#SEC21">FINDING ALL POSSIBLE MATCHES</a>
-<li><a name="TOC22" href="#SEC22">OBTAINING AN ESTIMATE OF STACK USAGE</a>
-<li><a name="TOC23" href="#SEC23">MATCHING A PATTERN: THE ALTERNATIVE FUNCTION</a>
-<li><a name="TOC24" href="#SEC24">SEE ALSO</a>
-<li><a name="TOC25" href="#SEC25">AUTHOR</a>
-<li><a name="TOC26" href="#SEC26">REVISION</a>
-</ul>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<br><a name="SEC1" href="#TOC1">PCRE NATIVE API BASIC FUNCTIONS</a><br>
-<P>
-<b>pcre *pcre_compile(const char *<i>pattern</i>, int <i>options</i>,</b>
-<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
-<b> const unsigned char *<i>tableptr</i>);</b>
-<br>
-<br>
-<b>pcre *pcre_compile2(const char *<i>pattern</i>, int <i>options</i>,</b>
-<b> int *<i>errorcodeptr</i>,</b>
-<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
-<b> const unsigned char *<i>tableptr</i>);</b>
-<br>
-<br>
-<b>pcre_extra *pcre_study(const pcre *<i>code</i>, int <i>options</i>,</b>
-<b> const char **<i>errptr</i>);</b>
-<br>
-<br>
-<b>void pcre_free_study(pcre_extra *<i>extra</i>);</b>
-<br>
-<br>
-<b>int pcre_exec(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
-<b> const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
-<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b>
-<br>
-<br>
-<b>int pcre_dfa_exec(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
-<b> const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
-<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
-<b> int *<i>workspace</i>, int <i>wscount</i>);</b>
-</P>
-<br><a name="SEC2" href="#TOC1">PCRE NATIVE API STRING EXTRACTION FUNCTIONS</a><br>
-<P>
-<b>int pcre_copy_named_substring(const pcre *<i>code</i>,</b>
-<b> const char *<i>subject</i>, int *<i>ovector</i>,</b>
-<b> int <i>stringcount</i>, const char *<i>stringname</i>,</b>
-<b> char *<i>buffer</i>, int <i>buffersize</i>);</b>
-<br>
-<br>
-<b>int pcre_copy_substring(const char *<i>subject</i>, int *<i>ovector</i>,</b>
-<b> int <i>stringcount</i>, int <i>stringnumber</i>, char *<i>buffer</i>,</b>
-<b> int <i>buffersize</i>);</b>
-<br>
-<br>
-<b>int pcre_get_named_substring(const pcre *<i>code</i>,</b>
-<b> const char *<i>subject</i>, int *<i>ovector</i>,</b>
-<b> int <i>stringcount</i>, const char *<i>stringname</i>,</b>
-<b> const char **<i>stringptr</i>);</b>
-<br>
-<br>
-<b>int pcre_get_stringnumber(const pcre *<i>code</i>,</b>
-<b> const char *<i>name</i>);</b>
-<br>
-<br>
-<b>int pcre_get_stringtable_entries(const pcre *<i>code</i>,</b>
-<b> const char *<i>name</i>, char **<i>first</i>, char **<i>last</i>);</b>
-<br>
-<br>
-<b>int pcre_get_substring(const char *<i>subject</i>, int *<i>ovector</i>,</b>
-<b> int <i>stringcount</i>, int <i>stringnumber</i>,</b>
-<b> const char **<i>stringptr</i>);</b>
-<br>
-<br>
-<b>int pcre_get_substring_list(const char *<i>subject</i>,</b>
-<b> int *<i>ovector</i>, int <i>stringcount</i>, const char ***<i>listptr</i>);</b>
-<br>
-<br>
-<b>void pcre_free_substring(const char *<i>stringptr</i>);</b>
-<br>
-<br>
-<b>void pcre_free_substring_list(const char **<i>stringptr</i>);</b>
-</P>
-<br><a name="SEC3" href="#TOC1">PCRE NATIVE API AUXILIARY FUNCTIONS</a><br>
-<P>
-<b>int pcre_jit_exec(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
-<b> const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
-<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
-<b> pcre_jit_stack *<i>jstack</i>);</b>
-<br>
-<br>
-<b>pcre_jit_stack *pcre_jit_stack_alloc(int <i>startsize</i>, int <i>maxsize</i>);</b>
-<br>
-<br>
-<b>void pcre_jit_stack_free(pcre_jit_stack *<i>stack</i>);</b>
-<br>
-<br>
-<b>void pcre_assign_jit_stack(pcre_extra *<i>extra</i>,</b>
-<b> pcre_jit_callback <i>callback</i>, void *<i>data</i>);</b>
-<br>
-<br>
-<b>const unsigned char *pcre_maketables(void);</b>
-<br>
-<br>
-<b>int pcre_fullinfo(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
-<b> int <i>what</i>, void *<i>where</i>);</b>
-<br>
-<br>
-<b>int pcre_refcount(pcre *<i>code</i>, int <i>adjust</i>);</b>
-<br>
-<br>
-<b>int pcre_config(int <i>what</i>, void *<i>where</i>);</b>
-<br>
-<br>
-<b>const char *pcre_version(void);</b>
-<br>
-<br>
-<b>int pcre_pattern_to_host_byte_order(pcre *<i>code</i>,</b>
-<b> pcre_extra *<i>extra</i>, const unsigned char *<i>tables</i>);</b>
-</P>
-<br><a name="SEC4" href="#TOC1">PCRE NATIVE API INDIRECTED FUNCTIONS</a><br>
-<P>
-<b>void *(*pcre_malloc)(size_t);</b>
-<br>
-<br>
-<b>void (*pcre_free)(void *);</b>
-<br>
-<br>
-<b>void *(*pcre_stack_malloc)(size_t);</b>
-<br>
-<br>
-<b>void (*pcre_stack_free)(void *);</b>
-<br>
-<br>
-<b>int (*pcre_callout)(pcre_callout_block *);</b>
-<br>
-<br>
-<b>int (*pcre_stack_guard)(void);</b>
-</P>
-<br><a name="SEC5" href="#TOC1">PCRE 8-BIT, 16-BIT, AND 32-BIT LIBRARIES</a><br>
-<P>
-As well as support for 8-bit character strings, PCRE also supports 16-bit
-strings (from release 8.30) and 32-bit strings (from release 8.32), by means of
-two additional libraries. They can be built as well as, or instead of, the
-8-bit library. To avoid too much complication, this document describes the
-8-bit versions of the functions, with only occasional references to the 16-bit
-and 32-bit libraries.
-</P>
-<P>
-The 16-bit and 32-bit functions operate in the same way as their 8-bit
-counterparts; they just use different data types for their arguments and
-results, and their names start with <b>pcre16_</b> or <b>pcre32_</b> instead of
-<b>pcre_</b>. For every option that has UTF8 in its name (for example,
-PCRE_UTF8), there are corresponding 16-bit and 32-bit names with UTF8 replaced
-by UTF16 or UTF32, respectively. This facility is in fact just cosmetic; the
-16-bit and 32-bit option names define the same bit values.
-</P>
-<P>
-References to bytes and UTF-8 in this document should be read as references to
-16-bit data units and UTF-16 when using the 16-bit library, or 32-bit data
-units and UTF-32 when using the 32-bit library, unless specified otherwise.
-More details of the specific differences for the 16-bit and 32-bit libraries
-are given in the
-<a href="pcre16.html"><b>pcre16</b></a>
-and
-<a href="pcre32.html"><b>pcre32</b></a>
-pages.
-</P>
-<br><a name="SEC6" href="#TOC1">PCRE API OVERVIEW</a><br>
-<P>
-PCRE has its own native API, which is described in this document. There are
-also some wrapper functions (for the 8-bit library only) that correspond to the
-POSIX regular expression API, but they do not give access to all the
-functionality. They are described in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-documentation. Both of these APIs define a set of C function calls. A C++
-wrapper (again for the 8-bit library only) is also distributed with PCRE. It is
-documented in the
-<a href="pcrecpp.html"><b>pcrecpp</b></a>
-page.
-</P>
-<P>
-The native API C function prototypes are defined in the header file
-<b>pcre.h</b>, and on Unix-like systems the (8-bit) library itself is called
-<b>libpcre</b>. It can normally be accessed by adding <b>-lpcre</b> to the
-command for linking an application that uses PCRE. The header file defines the
-macros PCRE_MAJOR and PCRE_MINOR to contain the major and minor release numbers
-for the library. Applications can use these to include support for different
-releases of PCRE.
-</P>
-<P>
-In a Windows environment, if you want to statically link an application program
-against a non-dll <b>pcre.a</b> file, you must define PCRE_STATIC before
-including <b>pcre.h</b> or <b>pcrecpp.h</b>, because otherwise the
-<b>pcre_malloc()</b> and <b>pcre_free()</b> exported functions will be declared
-<b>__declspec(dllimport)</b>, with unwanted results.
-</P>
-<P>
-The functions <b>pcre_compile()</b>, <b>pcre_compile2()</b>, <b>pcre_study()</b>,
-and <b>pcre_exec()</b> are used for compiling and matching regular expressions
-in a Perl-compatible manner. A sample program that demonstrates the simplest
-way of using them is provided in the file called <i>pcredemo.c</i> in the PCRE
-source distribution. A listing of this program is given in the
-<a href="pcredemo.html"><b>pcredemo</b></a>
-documentation, and the
-<a href="pcresample.html"><b>pcresample</b></a>
-documentation describes how to compile and run it.
-</P>
-<P>
-Just-in-time compiler support is an optional feature of PCRE that can be built
-in appropriate hardware environments. It greatly speeds up the matching
-performance of many patterns. Simple programs can easily request that it be
-used if available, by setting an option that is ignored when it is not
-relevant. More complicated programs might need to make use of the functions
-<b>pcre_jit_stack_alloc()</b>, <b>pcre_jit_stack_free()</b>, and
-<b>pcre_assign_jit_stack()</b> in order to control the JIT code's memory usage.
-</P>
-<P>
-From release 8.32 there is also a direct interface for JIT execution, which
-gives improved performance. The JIT-specific functions are discussed in the
-<a href="pcrejit.html"><b>pcrejit</b></a>
-documentation.
-</P>
-<P>
-A second matching function, <b>pcre_dfa_exec()</b>, which is not
-Perl-compatible, is also provided. This uses a different algorithm for the
-matching. The alternative algorithm finds all possible matches (at a given
-point in the subject), and scans the subject just once (unless there are
-lookbehind assertions). However, this algorithm does not return captured
-substrings. A description of the two matching algorithms and their advantages
-and disadvantages is given in the
-<a href="pcrematching.html"><b>pcrematching</b></a>
-documentation.
-</P>
-<P>
-In addition to the main compiling and matching functions, there are convenience
-functions for extracting captured substrings from a subject string that is
-matched by <b>pcre_exec()</b>. They are:
-<pre>
- <b>pcre_copy_substring()</b>
- <b>pcre_copy_named_substring()</b>
- <b>pcre_get_substring()</b>
- <b>pcre_get_named_substring()</b>
- <b>pcre_get_substring_list()</b>
- <b>pcre_get_stringnumber()</b>
- <b>pcre_get_stringtable_entries()</b>
-</pre>
-<b>pcre_free_substring()</b> and <b>pcre_free_substring_list()</b> are also
-provided, to free the memory used for extracted strings.
-</P>
-<P>
-The function <b>pcre_maketables()</b> is used to build a set of character tables
-in the current locale for passing to <b>pcre_compile()</b>, <b>pcre_exec()</b>,
-or <b>pcre_dfa_exec()</b>. This is an optional facility that is provided for
-specialist use. Most commonly, no special tables are passed, in which case
-internal tables that are generated when PCRE is built are used.
-</P>
-<P>
-The function <b>pcre_fullinfo()</b> is used to find out information about a
-compiled pattern. The function <b>pcre_version()</b> returns a pointer to a
-string containing the version of PCRE and its date of release.
-</P>
-<P>
-The function <b>pcre_refcount()</b> maintains a reference count in a data block
-containing a compiled pattern. This is provided for the benefit of
-object-oriented applications.
-</P>
-<P>
-The global variables <b>pcre_malloc</b> and <b>pcre_free</b> initially contain
-the entry points of the standard <b>malloc()</b> and <b>free()</b> functions,
-respectively. PCRE calls the memory management functions via these variables,
-so a calling program can replace them if it wishes to intercept the calls. This
-should be done before calling any PCRE functions.
-</P>
-<P>
-The global variables <b>pcre_stack_malloc</b> and <b>pcre_stack_free</b> are also
-indirections to memory management functions. These special functions are used
-only when PCRE is compiled to use the heap for remembering data, instead of
-recursive function calls, when running the <b>pcre_exec()</b> function. See the
-<a href="pcrebuild.html"><b>pcrebuild</b></a>
-documentation for details of how to do this. It is a non-standard way of
-building PCRE, for use in environments that have limited stacks. Because of the
-greater use of memory management, it runs more slowly. Separate functions are
-provided so that special-purpose external code can be used for this case. When
-used, these functions always allocate memory blocks of the same size. There is
-a discussion about PCRE's stack usage in the
-<a href="pcrestack.html"><b>pcrestack</b></a>
-documentation.
-</P>
-<P>
-The global variable <b>pcre_callout</b> initially contains NULL. It can be set
-by the caller to a "callout" function, which PCRE will then call at specified
-points during a matching operation. Details are given in the
-<a href="pcrecallout.html"><b>pcrecallout</b></a>
-documentation.
-</P>
-<P>
-The global variable <b>pcre_stack_guard</b> initially contains NULL. It can be
-set by the caller to a function that is called by PCRE whenever it starts
-to compile a parenthesized part of a pattern. When parentheses are nested, PCRE
-uses recursive function calls, which use up the system stack. This function is
-provided so that applications with restricted stacks can force a compilation
-error if the stack runs out. The function should return zero if all is well, or
-non-zero to force an error.
-<a name="newlines"></a></P>
-<br><a name="SEC7" href="#TOC1">NEWLINES</a><br>
-<P>
-PCRE supports five different conventions for indicating line breaks in
-strings: a single CR (carriage return) character, a single LF (linefeed)
-character, the two-character sequence CRLF, any of the three preceding, or any
-Unicode newline sequence. The Unicode newline sequences are the three just
-mentioned, plus the single characters VT (vertical tab, U+000B), FF (form feed,
-U+000C), NEL (next line, U+0085), LS (line separator, U+2028), and PS
-(paragraph separator, U+2029).
-</P>
-<P>
-Each of the first three conventions is used by at least one operating system as
-its standard newline sequence. When PCRE is built, a default can be specified.
-The default default is LF, which is the Unix standard. When PCRE is run, the
-default can be overridden, either when a pattern is compiled, or when it is
-matched.
-</P>
-<P>
-At compile time, the newline convention can be specified by the <i>options</i>
-argument of <b>pcre_compile()</b>, or it can be specified by special text at the
-start of the pattern itself; this overrides any other settings. See the
-<a href="pcrepattern.html"><b>pcrepattern</b></a>
-page for details of the special character sequences.
-</P>
-<P>
-In the PCRE documentation the word "newline" is used to mean "the character or
-pair of characters that indicate a line break". The choice of newline
-convention affects the handling of the dot, circumflex, and dollar
-metacharacters, the handling of #-comments in /x mode, and, when CRLF is a
-recognized line ending sequence, the match position advancement for a
-non-anchored pattern. There is more detail about this in the
-<a href="#execoptions">section on <b>pcre_exec()</b> options</a>
-below.
-</P>
-<P>
-The choice of newline convention does not affect the interpretation of
-the \n or \r escape sequences, nor does it affect what \R matches, which is
-controlled in a similar way, but by separate options.
-</P>
-<br><a name="SEC8" href="#TOC1">MULTITHREADING</a><br>
-<P>
-The PCRE functions can be used in multi-threading applications, with the
-proviso that the memory management functions pointed to by <b>pcre_malloc</b>,
-<b>pcre_free</b>, <b>pcre_stack_malloc</b>, and <b>pcre_stack_free</b>, and the
-callout and stack-checking functions pointed to by <b>pcre_callout</b> and
-<b>pcre_stack_guard</b>, are shared by all threads.
-</P>
-<P>
-The compiled form of a regular expression is not altered during matching, so
-the same compiled pattern can safely be used by several threads at once.
-</P>
-<P>
-If the just-in-time optimization feature is being used, it needs separate
-memory stack areas for each thread. See the
-<a href="pcrejit.html"><b>pcrejit</b></a>
-documentation for more details.
-</P>
-<br><a name="SEC9" href="#TOC1">SAVING PRECOMPILED PATTERNS FOR LATER USE</a><br>
-<P>
-The compiled form of a regular expression can be saved and re-used at a later
-time, possibly by a different program, and even on a host other than the one on
-which it was compiled. Details are given in the
-<a href="pcreprecompile.html"><b>pcreprecompile</b></a>
-documentation, which includes a description of the
-<b>pcre_pattern_to_host_byte_order()</b> function. However, compiling a regular
-expression with one version of PCRE for use with a different version is not
-guaranteed to work and may cause crashes.
-</P>
-<br><a name="SEC10" href="#TOC1">CHECKING BUILD-TIME OPTIONS</a><br>
-<P>
-<b>int pcre_config(int <i>what</i>, void *<i>where</i>);</b>
-</P>
-<P>
-The function <b>pcre_config()</b> makes it possible for a PCRE client to
-discover which optional features have been compiled into the PCRE library. The
-<a href="pcrebuild.html"><b>pcrebuild</b></a>
-documentation has more details about these optional features.
-</P>
-<P>
-The first argument for <b>pcre_config()</b> is an integer, specifying which
-information is required; the second argument is a pointer to a variable into
-which the information is placed. The returned value is zero on success, or the
-negative error code PCRE_ERROR_BADOPTION if the value in the first argument is
-not recognized. The following information is available:
-<pre>
- PCRE_CONFIG_UTF8
-</pre>
-The output is an integer that is set to one if UTF-8 support is available;
-otherwise it is set to zero. This value should normally be given to the 8-bit
-version of this function, <b>pcre_config()</b>. If it is given to the 16-bit
-or 32-bit version of this function, the result is PCRE_ERROR_BADOPTION.
-<pre>
- PCRE_CONFIG_UTF16
-</pre>
-The output is an integer that is set to one if UTF-16 support is available;
-otherwise it is set to zero. This value should normally be given to the 16-bit
-version of this function, <b>pcre16_config()</b>. If it is given to the 8-bit
-or 32-bit version of this function, the result is PCRE_ERROR_BADOPTION.
-<pre>
- PCRE_CONFIG_UTF32
-</pre>
-The output is an integer that is set to one if UTF-32 support is available;
-otherwise it is set to zero. This value should normally be given to the 32-bit
-version of this function, <b>pcre32_config()</b>. If it is given to the 8-bit
-or 16-bit version of this function, the result is PCRE_ERROR_BADOPTION.
-<pre>
- PCRE_CONFIG_UNICODE_PROPERTIES
-</pre>
-The output is an integer that is set to one if support for Unicode character
-properties is available; otherwise it is set to zero.
-<pre>
- PCRE_CONFIG_JIT
-</pre>
-The output is an integer that is set to one if support for just-in-time
-compiling is available; otherwise it is set to zero.
-<pre>
- PCRE_CONFIG_JITTARGET
-</pre>
-The output is a pointer to a zero-terminated "const char *" string. If JIT
-support is available, the string contains the name of the architecture for
-which the JIT compiler is configured, for example "x86 32bit (little endian +
-unaligned)". If JIT support is not available, the result is NULL.
-<pre>
- PCRE_CONFIG_NEWLINE
-</pre>
-The output is an integer whose value specifies the default character sequence
-that is recognized as meaning "newline". The values that are supported in
-ASCII/Unicode environments are: 10 for LF, 13 for CR, 3338 for CRLF, -2 for
-ANYCRLF, and -1 for ANY. In EBCDIC environments, CR, ANYCRLF, and ANY yield the
-same values. However, the value for LF is normally 21, though some EBCDIC
-environments use 37. The corresponding values for CRLF are 3349 and 3365. The
-default should normally correspond to the standard sequence for your operating
-system.
-<pre>
- PCRE_CONFIG_BSR
-</pre>
-The output is an integer whose value indicates what character sequences the \R
-escape sequence matches by default. A value of 0 means that \R matches any
-Unicode line ending sequence; a value of 1 means that \R matches only CR, LF,
-or CRLF. The default can be overridden when a pattern is compiled or matched.
-<pre>
- PCRE_CONFIG_LINK_SIZE
-</pre>
-The output is an integer that contains the number of bytes used for internal
-linkage in compiled regular expressions. For the 8-bit library, the value can
-be 2, 3, or 4. For the 16-bit library, the value is either 2 or 4 and is still
-a number of bytes. For the 32-bit library, the value is either 2 or 4 and is
-still a number of bytes. The default value of 2 is sufficient for all but the
-most massive patterns, since it allows the compiled pattern to be up to 64K in
-size. Larger values allow larger regular expressions to be compiled, at the
-expense of slower matching.
-<pre>
- PCRE_CONFIG_POSIX_MALLOC_THRESHOLD
-</pre>
-The output is an integer that contains the threshold above which the POSIX
-interface uses <b>malloc()</b> for output vectors. Further details are given in
-the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-documentation.
-<pre>
- PCRE_CONFIG_PARENS_LIMIT
-</pre>
-The output is a long integer that gives the maximum depth of nesting of
-parentheses (of any kind) in a pattern. This limit is imposed to cap the amount
-of system stack used when a pattern is compiled. It is specified when PCRE is
-built; the default is 250. This limit does not take into account the stack that
-may already be used by the calling application. For finer control over
-compilation stack usage, you can set a pointer to an external checking function
-in <b>pcre_stack_guard</b>.
-<pre>
- PCRE_CONFIG_MATCH_LIMIT
-</pre>
-The output is a long integer that gives the default limit for the number of
-internal matching function calls in a <b>pcre_exec()</b> execution. Further
-details are given with <b>pcre_exec()</b> below.
-<pre>
- PCRE_CONFIG_MATCH_LIMIT_RECURSION
-</pre>
-The output is a long integer that gives the default limit for the depth of
-recursion when calling the internal matching function in a <b>pcre_exec()</b>
-execution. Further details are given with <b>pcre_exec()</b> below.
-<pre>
- PCRE_CONFIG_STACKRECURSE
-</pre>
-The output is an integer that is set to one if internal recursion when running
-<b>pcre_exec()</b> is implemented by recursive function calls that use the stack
-to remember their state. This is the usual way that PCRE is compiled. The
-output is zero if PCRE was compiled to use blocks of data on the heap instead
-of recursive function calls. In this case, <b>pcre_stack_malloc</b> and
-<b>pcre_stack_free</b> are called to manage memory blocks on the heap, thus
-avoiding the use of the stack.
-</P>
-<br><a name="SEC11" href="#TOC1">COMPILING A PATTERN</a><br>
-<P>
-<b>pcre *pcre_compile(const char *<i>pattern</i>, int <i>options</i>,</b>
-<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
-<b> const unsigned char *<i>tableptr</i>);</b>
-<br>
-<br>
-<b>pcre *pcre_compile2(const char *<i>pattern</i>, int <i>options</i>,</b>
-<b> int *<i>errorcodeptr</i>,</b>
-<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
-<b> const unsigned char *<i>tableptr</i>);</b>
-</P>
-<P>
-Either of the functions <b>pcre_compile()</b> or <b>pcre_compile2()</b> can be
-called to compile a pattern into an internal form. The only difference between
-the two interfaces is that <b>pcre_compile2()</b> has an additional argument,
-<i>errorcodeptr</i>, via which a numerical error code can be returned. To avoid
-too much repetition, we refer just to <b>pcre_compile()</b> below, but the
-information applies equally to <b>pcre_compile2()</b>.
-</P>
-<P>
-The pattern is a C string terminated by a binary zero, and is passed in the
-<i>pattern</i> argument. A pointer to a single block of memory that is obtained
-via <b>pcre_malloc</b> is returned. This contains the compiled code and related
-data. The <b>pcre</b> type is defined for the returned block; this is a typedef
-for a structure whose contents are not externally defined. It is up to the
-caller to free the memory (via <b>pcre_free</b>) when it is no longer required.
-</P>
-<P>
-Although the compiled code of a PCRE regex is relocatable, that is, it does not
-depend on memory location, the complete <b>pcre</b> data block is not
-fully relocatable, because it may contain a copy of the <i>tableptr</i>
-argument, which is an address (see below).
-</P>
-<P>
-The <i>options</i> argument contains various bit settings that affect the
-compilation. It should be zero if no options are required. The available
-options are described below. Some of them (in particular, those that are
-compatible with Perl, but some others as well) can also be set and unset from
-within the pattern (see the detailed description in the
-<a href="pcrepattern.html"><b>pcrepattern</b></a>
-documentation). For those options that can be different in different parts of
-the pattern, the contents of the <i>options</i> argument specifies their
-settings at the start of compilation and execution. The PCRE_ANCHORED,
-PCRE_BSR_<i>xxx</i>, PCRE_NEWLINE_<i>xxx</i>, PCRE_NO_UTF8_CHECK, and
-PCRE_NO_START_OPTIMIZE options can be set at the time of matching as well as at
-compile time.
-</P>
-<P>
-If <i>errptr</i> is NULL, <b>pcre_compile()</b> returns NULL immediately.
-Otherwise, if compilation of a pattern fails, <b>pcre_compile()</b> returns
-NULL, and sets the variable pointed to by <i>errptr</i> to point to a textual
-error message. This is a static string that is part of the library. You must
-not try to free it. Normally, the offset from the start of the pattern to the
-data unit that was being processed when the error was discovered is placed in
-the variable pointed to by <i>erroffset</i>, which must not be NULL (if it is,
-an immediate error is given). However, for an invalid UTF-8 or UTF-16 string,
-the offset is that of the first data unit of the failing character.
-</P>
-<P>
-Some errors are not detected until the whole pattern has been scanned; in these
-cases, the offset passed back is the length of the pattern. Note that the
-offset is in data units, not characters, even in a UTF mode. It may sometimes
-point into the middle of a UTF-8 or UTF-16 character.
-</P>
-<P>
-If <b>pcre_compile2()</b> is used instead of <b>pcre_compile()</b>, and the
-<i>errorcodeptr</i> argument is not NULL, a non-zero error code number is
-returned via this argument in the event of an error. This is in addition to the
-textual error message. Error codes and messages are listed below.
-</P>
-<P>
-If the final argument, <i>tableptr</i>, is NULL, PCRE uses a default set of
-character tables that are built when PCRE is compiled, using the default C
-locale. Otherwise, <i>tableptr</i> must be an address that is the result of a
-call to <b>pcre_maketables()</b>. This value is stored with the compiled
-pattern, and used again by <b>pcre_exec()</b> and <b>pcre_dfa_exec()</b> when the
-pattern is matched. For more discussion, see the section on locale support
-below.
-</P>
-<P>
-This code fragment shows a typical straightforward call to <b>pcre_compile()</b>:
-<pre>
- pcre *re;
- const char *error;
- int erroffset;
- re = pcre_compile(
- "^A.*Z", /* the pattern */
- 0, /* default options */
- &error, /* for error message */
- &erroffset, /* for error offset */
- NULL); /* use default character tables */
-</pre>
-The following names for option bits are defined in the <b>pcre.h</b> header
-file:
-<pre>
- PCRE_ANCHORED
-</pre>
-If this bit is set, the pattern is forced to be "anchored", that is, it is
-constrained to match only at the first matching point in the string that is
-being searched (the "subject string"). This effect can also be achieved by
-appropriate constructs in the pattern itself, which is the only way to do it in
-Perl.
-<pre>
- PCRE_AUTO_CALLOUT
-</pre>
-If this bit is set, <b>pcre_compile()</b> automatically inserts callout items,
-all with number 255, before each pattern item. For discussion of the callout
-facility, see the
-<a href="pcrecallout.html"><b>pcrecallout</b></a>
-documentation.
-<pre>
- PCRE_BSR_ANYCRLF
- PCRE_BSR_UNICODE
-</pre>
-These options (which are mutually exclusive) control what the \R escape
-sequence matches. The choice is either to match only CR, LF, or CRLF, or to
-match any Unicode newline sequence. The default is specified when PCRE is
-built. It can be overridden from within the pattern, or by setting an option
-when a compiled pattern is matched.
-<pre>
- PCRE_CASELESS
-</pre>
-If this bit is set, letters in the pattern match both upper and lower case
-letters. It is equivalent to Perl's /i option, and it can be changed within a
-pattern by a (?i) option setting. In UTF-8 mode, PCRE always understands the
-concept of case for characters whose values are less than 128, so caseless
-matching is always possible. For characters with higher values, the concept of
-case is supported if PCRE is compiled with Unicode property support, but not
-otherwise. If you want to use caseless matching for characters 128 and above,
-you must ensure that PCRE is compiled with Unicode property support as well as
-with UTF-8 support.
-<pre>
- PCRE_DOLLAR_ENDONLY
-</pre>
-If this bit is set, a dollar metacharacter in the pattern matches only at the
-end of the subject string. Without this option, a dollar also matches
-immediately before a newline at the end of the string (but not before any other
-newlines). The PCRE_DOLLAR_ENDONLY option is ignored if PCRE_MULTILINE is set.
-There is no equivalent to this option in Perl, and no way to set it within a
-pattern.
-<pre>
- PCRE_DOTALL
-</pre>
-If this bit is set, a dot metacharacter in the pattern matches a character of
-any value, including one that indicates a newline. However, it only ever
-matches one character, even if newlines are coded as CRLF. Without this option,
-a dot does not match when the current position is at a newline. This option is
-equivalent to Perl's /s option, and it can be changed within a pattern by a
-(?s) option setting. A negative class such as [^a] always matches newline
-characters, independent of the setting of this option.
-<pre>
- PCRE_DUPNAMES
-</pre>
-If this bit is set, names used to identify capturing subpatterns need not be
-unique. This can be helpful for certain types of pattern when it is known that
-only one instance of the named subpattern can ever be matched. There are more
-details of named subpatterns below; see also the
-<a href="pcrepattern.html"><b>pcrepattern</b></a>
-documentation.
-<pre>
- PCRE_EXTENDED
-</pre>
-If this bit is set, most white space characters in the pattern are totally
-ignored except when escaped or inside a character class. However, white space
-is not allowed within sequences such as (?&#62; that introduce various
-parenthesized subpatterns, nor within a numerical quantifier such as {1,3}.
-However, ignorable white space is permitted between an item and a following
-quantifier and between a quantifier and a following + that indicates
-possessiveness.
-</P>
-<P>
-White space did not used to include the VT character (code 11), because Perl
-did not treat this character as white space. However, Perl changed at release
-5.18, so PCRE followed at release 8.34, and VT is now treated as white space.
-</P>
-<P>
-PCRE_EXTENDED also causes characters between an unescaped # outside a character
-class and the next newline, inclusive, to be ignored. PCRE_EXTENDED is
-equivalent to Perl's /x option, and it can be changed within a pattern by a
-(?x) option setting.
-</P>
-<P>
-Which characters are interpreted as newlines is controlled by the options
-passed to <b>pcre_compile()</b> or by a special sequence at the start of the
-pattern, as described in the section entitled
-<a href="pcrepattern.html#newlines">"Newline conventions"</a>
-in the <b>pcrepattern</b> documentation. Note that the end of this type of
-comment is a literal newline sequence in the pattern; escape sequences that
-happen to represent a newline do not count.
-</P>
-<P>
-This option makes it possible to include comments inside complicated patterns.
-Note, however, that this applies only to data characters. White space characters
-may never appear within special character sequences in a pattern, for example
-within the sequence (?( that introduces a conditional subpattern.
-<pre>
- PCRE_EXTRA
-</pre>
-This option was invented in order to turn on additional functionality of PCRE
-that is incompatible with Perl, but it is currently of very little use. When
-set, any backslash in a pattern that is followed by a letter that has no
-special meaning causes an error, thus reserving these combinations for future
-expansion. By default, as in Perl, a backslash followed by a letter with no
-special meaning is treated as a literal. (Perl can, however, be persuaded to
-give an error for this, by running it with the -w option.) There are at present
-no other features controlled by this option. It can also be set by a (?X)
-option setting within a pattern.
-<pre>
- PCRE_FIRSTLINE
-</pre>
-If this option is set, an unanchored pattern is required to match before or at
-the first newline in the subject string, though the matched text may continue
-over the newline.
-<pre>
- PCRE_JAVASCRIPT_COMPAT
-</pre>
-If this option is set, PCRE's behaviour is changed in some ways so that it is
-compatible with JavaScript rather than Perl. The changes are as follows:
-</P>
-<P>
-(1) A lone closing square bracket in a pattern causes a compile-time error,
-because this is illegal in JavaScript (by default it is treated as a data
-character). Thus, the pattern AB]CD becomes illegal when this option is set.
-</P>
-<P>
-(2) At run time, a back reference to an unset subpattern group matches an empty
-string (by default this causes the current matching alternative to fail). A
-pattern such as (\1)(a) succeeds when this option is set (assuming it can find
-an "a" in the subject), whereas it fails by default, for Perl compatibility.
-</P>
-<P>
-(3) \U matches an upper case "U" character; by default \U causes a compile
-time error (Perl uses \U to upper case subsequent characters).
-</P>
-<P>
-(4) \u matches a lower case "u" character unless it is followed by four
-hexadecimal digits, in which case the hexadecimal number defines the code point
-to match. By default, \u causes a compile time error (Perl uses it to upper
-case the following character).
-</P>
-<P>
-(5) \x matches a lower case "x" character unless it is followed by two
-hexadecimal digits, in which case the hexadecimal number defines the code point
-to match. By default, as in Perl, a hexadecimal number is always expected after
-\x, but it may have zero, one, or two digits (so, for example, \xz matches a
-binary zero character followed by z).
-<pre>
- PCRE_MULTILINE
-</pre>
-By default, for the purposes of matching "start of line" and "end of line",
-PCRE treats the subject string as consisting of a single line of characters,
-even if it actually contains newlines. The "start of line" metacharacter (^)
-matches only at the start of the string, and the "end of line" metacharacter
-($) matches only at the end of the string, or before a terminating newline
-(except when PCRE_DOLLAR_ENDONLY is set). Note, however, that unless
-PCRE_DOTALL is set, the "any character" metacharacter (.) does not match at a
-newline. This behaviour (for ^, $, and dot) is the same as Perl.
-</P>
-<P>
-When PCRE_MULTILINE it is set, the "start of line" and "end of line" constructs
-match immediately following or immediately before internal newlines in the
-subject string, respectively, as well as at the very start and end. This is
-equivalent to Perl's /m option, and it can be changed within a pattern by a
-(?m) option setting. If there are no newlines in a subject string, or no
-occurrences of ^ or $ in a pattern, setting PCRE_MULTILINE has no effect.
-<pre>
- PCRE_NEVER_UTF
-</pre>
-This option locks out interpretation of the pattern as UTF-8 (or UTF-16 or
-UTF-32 in the 16-bit and 32-bit libraries). In particular, it prevents the
-creator of the pattern from switching to UTF interpretation by starting the
-pattern with (*UTF). This may be useful in applications that process patterns
-from external sources. The combination of PCRE_UTF8 and PCRE_NEVER_UTF also
-causes an error.
-<pre>
- PCRE_NEWLINE_CR
- PCRE_NEWLINE_LF
- PCRE_NEWLINE_CRLF
- PCRE_NEWLINE_ANYCRLF
- PCRE_NEWLINE_ANY
-</pre>
-These options override the default newline definition that was chosen when PCRE
-was built. Setting the first or the second specifies that a newline is
-indicated by a single character (CR or LF, respectively). Setting
-PCRE_NEWLINE_CRLF specifies that a newline is indicated by the two-character
-CRLF sequence. Setting PCRE_NEWLINE_ANYCRLF specifies that any of the three
-preceding sequences should be recognized. Setting PCRE_NEWLINE_ANY specifies
-that any Unicode newline sequence should be recognized.
-</P>
-<P>
-In an ASCII/Unicode environment, the Unicode newline sequences are the three
-just mentioned, plus the single characters VT (vertical tab, U+000B), FF (form
-feed, U+000C), NEL (next line, U+0085), LS (line separator, U+2028), and PS
-(paragraph separator, U+2029). For the 8-bit library, the last two are
-recognized only in UTF-8 mode.
-</P>
-<P>
-When PCRE is compiled to run in an EBCDIC (mainframe) environment, the code for
-CR is 0x0d, the same as ASCII. However, the character code for LF is normally
-0x15, though in some EBCDIC environments 0x25 is used. Whichever of these is
-not LF is made to correspond to Unicode's NEL character. EBCDIC codes are all
-less than 256. For more details, see the
-<a href="pcrebuild.html"><b>pcrebuild</b></a>
-documentation.
-</P>
-<P>
-The newline setting in the options word uses three bits that are treated
-as a number, giving eight possibilities. Currently only six are used (default
-plus the five values above). This means that if you set more than one newline
-option, the combination may or may not be sensible. For example,
-PCRE_NEWLINE_CR with PCRE_NEWLINE_LF is equivalent to PCRE_NEWLINE_CRLF, but
-other combinations may yield unused numbers and cause an error.
-</P>
-<P>
-The only time that a line break in a pattern is specially recognized when
-compiling is when PCRE_EXTENDED is set. CR and LF are white space characters,
-and so are ignored in this mode. Also, an unescaped # outside a character class
-indicates a comment that lasts until after the next line break sequence. In
-other circumstances, line break sequences in patterns are treated as literal
-data.
-</P>
-<P>
-The newline option that is set at compile time becomes the default that is used
-for <b>pcre_exec()</b> and <b>pcre_dfa_exec()</b>, but it can be overridden.
-<pre>
- PCRE_NO_AUTO_CAPTURE
-</pre>
-If this option is set, it disables the use of numbered capturing parentheses in
-the pattern. Any opening parenthesis that is not followed by ? behaves as if it
-were followed by ?: but named parentheses can still be used for capturing (and
-they acquire numbers in the usual way). There is no equivalent of this option
-in Perl.
-<pre>
- PCRE_NO_AUTO_POSSESS
-</pre>
-If this option is set, it disables "auto-possessification". This is an
-optimization that, for example, turns a+b into a++b in order to avoid
-backtracks into a+ that can never be successful. However, if callouts are in
-use, auto-possessification means that some of them are never taken. You can set
-this option if you want the matching functions to do a full unoptimized search
-and run all the callouts, but it is mainly provided for testing purposes.
-<pre>
- PCRE_NO_START_OPTIMIZE
-</pre>
-This is an option that acts at matching time; that is, it is really an option
-for <b>pcre_exec()</b> or <b>pcre_dfa_exec()</b>. If it is set at compile time,
-it is remembered with the compiled pattern and assumed at matching time. This
-is necessary if you want to use JIT execution, because the JIT compiler needs
-to know whether or not this option is set. For details see the discussion of
-PCRE_NO_START_OPTIMIZE
-<a href="#execoptions">below.</a>
-<pre>
- PCRE_UCP
-</pre>
-This option changes the way PCRE processes \B, \b, \D, \d, \S, \s, \W,
-\w, and some of the POSIX character classes. By default, only ASCII characters
-are recognized, but if PCRE_UCP is set, Unicode properties are used instead to
-classify characters. More details are given in the section on
-<a href="pcre.html#genericchartypes">generic character types</a>
-in the
-<a href="pcrepattern.html"><b>pcrepattern</b></a>
-page. If you set PCRE_UCP, matching one of the items it affects takes much
-longer. The option is available only if PCRE has been compiled with Unicode
-property support.
-<pre>
- PCRE_UNGREEDY
-</pre>
-This option inverts the "greediness" of the quantifiers so that they are not
-greedy by default, but become greedy if followed by "?". It is not compatible
-with Perl. It can also be set by a (?U) option setting within the pattern.
-<pre>
- PCRE_UTF8
-</pre>
-This option causes PCRE to regard both the pattern and the subject as strings
-of UTF-8 characters instead of single-byte strings. However, it is available
-only when PCRE is built to include UTF support. If not, the use of this option
-provokes an error. Details of how this option changes the behaviour of PCRE are
-given in the
-<a href="pcreunicode.html"><b>pcreunicode</b></a>
-page.
-<pre>
- PCRE_NO_UTF8_CHECK
-</pre>
-When PCRE_UTF8 is set, the validity of the pattern as a UTF-8 string is
-automatically checked. There is a discussion about the
-<a href="pcreunicode.html#utf8strings">validity of UTF-8 strings</a>
-in the
-<a href="pcreunicode.html"><b>pcreunicode</b></a>
-page. If an invalid UTF-8 sequence is found, <b>pcre_compile()</b> returns an
-error. If you already know that your pattern is valid, and you want to skip
-this check for performance reasons, you can set the PCRE_NO_UTF8_CHECK option.
-When it is set, the effect of passing an invalid UTF-8 string as a pattern is
-undefined. It may cause your program to crash or loop. Note that this option
-can also be passed to <b>pcre_exec()</b> and <b>pcre_dfa_exec()</b>, to suppress
-the validity checking of subject strings only. If the same string is being
-matched many times, the option can be safely set for the second and subsequent
-matchings to improve performance.
-</P>
-<br><a name="SEC12" href="#TOC1">COMPILATION ERROR CODES</a><br>
-<P>
-The following table lists the error codes than may be returned by
-<b>pcre_compile2()</b>, along with the error messages that may be returned by
-both compiling functions. Note that error messages are always 8-bit ASCII
-strings, even in 16-bit or 32-bit mode. As PCRE has developed, some error codes
-have fallen out of use. To avoid confusion, they have not been re-used.
-<pre>
- 0 no error
- 1 \ at end of pattern
- 2 \c at end of pattern
- 3 unrecognized character follows \
- 4 numbers out of order in {} quantifier
- 5 number too big in {} quantifier
- 6 missing terminating ] for character class
- 7 invalid escape sequence in character class
- 8 range out of order in character class
- 9 nothing to repeat
- 10 [this code is not in use]
- 11 internal error: unexpected repeat
- 12 unrecognized character after (? or (?-
- 13 POSIX named classes are supported only within a class
- 14 missing )
- 15 reference to non-existent subpattern
- 16 erroffset passed as NULL
- 17 unknown option bit(s) set
- 18 missing ) after comment
- 19 [this code is not in use]
- 20 regular expression is too large
- 21 failed to get memory
- 22 unmatched parentheses
- 23 internal error: code overflow
- 24 unrecognized character after (?&#60;
- 25 lookbehind assertion is not fixed length
- 26 malformed number or name after (?(
- 27 conditional group contains more than two branches
- 28 assertion expected after (?(
- 29 (?R or (?[+-]digits must be followed by )
- 30 unknown POSIX class name
- 31 POSIX collating elements are not supported
- 32 this version of PCRE is compiled without UTF support
- 33 [this code is not in use]
- 34 character value in \x{} or \o{} is too large
- 35 invalid condition (?(0)
- 36 \C not allowed in lookbehind assertion
- 37 PCRE does not support \L, \l, \N{name}, \U, or \u
- 38 number after (?C is &#62; 255
- 39 closing ) for (?C expected
- 40 recursive call could loop indefinitely
- 41 unrecognized character after (?P
- 42 syntax error in subpattern name (missing terminator)
- 43 two named subpatterns have the same name
- 44 invalid UTF-8 string (specifically UTF-8)
- 45 support for \P, \p, and \X has not been compiled
- 46 malformed \P or \p sequence
- 47 unknown property name after \P or \p
- 48 subpattern name is too long (maximum 32 characters)
- 49 too many named subpatterns (maximum 10000)
- 50 [this code is not in use]
- 51 octal value is greater than \377 in 8-bit non-UTF-8 mode
- 52 internal error: overran compiling workspace
- 53 internal error: previously-checked referenced subpattern
- not found
- 54 DEFINE group contains more than one branch
- 55 repeating a DEFINE group is not allowed
- 56 inconsistent NEWLINE options
- 57 \g is not followed by a braced, angle-bracketed, or quoted
- name/number or by a plain number
- 58 a numbered reference must not be zero
- 59 an argument is not allowed for (*ACCEPT), (*FAIL), or (*COMMIT)
- 60 (*VERB) not recognized or malformed
- 61 number is too big
- 62 subpattern name expected
- 63 digit expected after (?+
- 64 ] is an invalid data character in JavaScript compatibility mode
- 65 different names for subpatterns of the same number are
- not allowed
- 66 (*MARK) must have an argument
- 67 this version of PCRE is not compiled with Unicode property
- support
- 68 \c must be followed by an ASCII character
- 69 \k is not followed by a braced, angle-bracketed, or quoted name
- 70 internal error: unknown opcode in find_fixedlength()
- 71 \N is not supported in a class
- 72 too many forward references
- 73 disallowed Unicode code point (&#62;= 0xd800 && &#60;= 0xdfff)
- 74 invalid UTF-16 string (specifically UTF-16)
- 75 name is too long in (*MARK), (*PRUNE), (*SKIP), or (*THEN)
- 76 character value in \u.... sequence is too large
- 77 invalid UTF-32 string (specifically UTF-32)
- 78 setting UTF is disabled by the application
- 79 non-hex character in \x{} (closing brace missing?)
- 80 non-octal character in \o{} (closing brace missing?)
- 81 missing opening brace after \o
- 82 parentheses are too deeply nested
- 83 invalid range in character class
- 84 group name must start with a non-digit
- 85 parentheses are too deeply nested (stack check)
-</pre>
-The numbers 32 and 10000 in errors 48 and 49 are defaults; different values may
-be used if the limits were changed when PCRE was built.
-<a name="studyingapattern"></a></P>
-<br><a name="SEC13" href="#TOC1">STUDYING A PATTERN</a><br>
-<P>
-<b>pcre_extra *pcre_study(const pcre *<i>code</i>, int <i>options</i>,</b>
-<b> const char **<i>errptr</i>);</b>
-</P>
-<P>
-If a compiled pattern is going to be used several times, it is worth spending
-more time analyzing it in order to speed up the time taken for matching. The
-function <b>pcre_study()</b> takes a pointer to a compiled pattern as its first
-argument. If studying the pattern produces additional information that will
-help speed up matching, <b>pcre_study()</b> returns a pointer to a
-<b>pcre_extra</b> block, in which the <i>study_data</i> field points to the
-results of the study.
-</P>
-<P>
-The returned value from <b>pcre_study()</b> can be passed directly to
-<b>pcre_exec()</b> or <b>pcre_dfa_exec()</b>. However, a <b>pcre_extra</b> block
-also contains other fields that can be set by the caller before the block is
-passed; these are described
-<a href="#extradata">below</a>
-in the section on matching a pattern.
-</P>
-<P>
-If studying the pattern does not produce any useful information,
-<b>pcre_study()</b> returns NULL by default. In that circumstance, if the
-calling program wants to pass any of the other fields to <b>pcre_exec()</b> or
-<b>pcre_dfa_exec()</b>, it must set up its own <b>pcre_extra</b> block. However,
-if <b>pcre_study()</b> is called with the PCRE_STUDY_EXTRA_NEEDED option, it
-returns a <b>pcre_extra</b> block even if studying did not find any additional
-information. It may still return NULL, however, if an error occurs in
-<b>pcre_study()</b>.
-</P>
-<P>
-The second argument of <b>pcre_study()</b> contains option bits. There are three
-further options in addition to PCRE_STUDY_EXTRA_NEEDED:
-<pre>
- PCRE_STUDY_JIT_COMPILE
- PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE
- PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE
-</pre>
-If any of these are set, and the just-in-time compiler is available, the
-pattern is further compiled into machine code that executes much faster than
-the <b>pcre_exec()</b> interpretive matching function. If the just-in-time
-compiler is not available, these options are ignored. All undefined bits in the
-<i>options</i> argument must be zero.
-</P>
-<P>
-JIT compilation is a heavyweight optimization. It can take some time for
-patterns to be analyzed, and for one-off matches and simple patterns the
-benefit of faster execution might be offset by a much slower study time.
-Not all patterns can be optimized by the JIT compiler. For those that cannot be
-handled, matching automatically falls back to the <b>pcre_exec()</b>
-interpreter. For more details, see the
-<a href="pcrejit.html"><b>pcrejit</b></a>
-documentation.
-</P>
-<P>
-The third argument for <b>pcre_study()</b> is a pointer for an error message. If
-studying succeeds (even if no data is returned), the variable it points to is
-set to NULL. Otherwise it is set to point to a textual error message. This is a
-static string that is part of the library. You must not try to free it. You
-should test the error pointer for NULL after calling <b>pcre_study()</b>, to be
-sure that it has run successfully.
-</P>
-<P>
-When you are finished with a pattern, you can free the memory used for the
-study data by calling <b>pcre_free_study()</b>. This function was added to the
-API for release 8.20. For earlier versions, the memory could be freed with
-<b>pcre_free()</b>, just like the pattern itself. This will still work in cases
-where JIT optimization is not used, but it is advisable to change to the new
-function when convenient.
-</P>
-<P>
-This is a typical way in which <b>pcre_study</b>() is used (except that in a
-real application there should be tests for errors):
-<pre>
- int rc;
- pcre *re;
- pcre_extra *sd;
- re = pcre_compile("pattern", 0, &error, &erroroffset, NULL);
- sd = pcre_study(
- re, /* result of pcre_compile() */
- 0, /* no options */
- &error); /* set to NULL or points to a message */
- rc = pcre_exec( /* see below for details of pcre_exec() options */
- re, sd, "subject", 7, 0, 0, ovector, 30);
- ...
- pcre_free_study(sd);
- pcre_free(re);
-</pre>
-Studying a pattern does two things: first, a lower bound for the length of
-subject string that is needed to match the pattern is computed. This does not
-mean that there are any strings of that length that match, but it does
-guarantee that no shorter strings match. The value is used to avoid wasting
-time by trying to match strings that are shorter than the lower bound. You can
-find out the value in a calling program via the <b>pcre_fullinfo()</b> function.
-</P>
-<P>
-Studying a pattern is also useful for non-anchored patterns that do not have a
-single fixed starting character. A bitmap of possible starting bytes is
-created. This speeds up finding a position in the subject at which to start
-matching. (In 16-bit mode, the bitmap is used for 16-bit values less than 256.
-In 32-bit mode, the bitmap is used for 32-bit values less than 256.)
-</P>
-<P>
-These two optimizations apply to both <b>pcre_exec()</b> and
-<b>pcre_dfa_exec()</b>, and the information is also used by the JIT compiler.
-The optimizations can be disabled by setting the PCRE_NO_START_OPTIMIZE option.
-You might want to do this if your pattern contains callouts or (*MARK) and you
-want to make use of these facilities in cases where matching fails.
-</P>
-<P>
-PCRE_NO_START_OPTIMIZE can be specified at either compile time or execution
-time. However, if PCRE_NO_START_OPTIMIZE is passed to <b>pcre_exec()</b>, (that
-is, after any JIT compilation has happened) JIT execution is disabled. For JIT
-execution to work with PCRE_NO_START_OPTIMIZE, the option must be set at
-compile time.
-</P>
-<P>
-There is a longer discussion of PCRE_NO_START_OPTIMIZE
-<a href="#execoptions">below.</a>
-<a name="localesupport"></a></P>
-<br><a name="SEC14" href="#TOC1">LOCALE SUPPORT</a><br>
-<P>
-PCRE handles caseless matching, and determines whether characters are letters,
-digits, or whatever, by reference to a set of tables, indexed by character
-code point. When running in UTF-8 mode, or in the 16- or 32-bit libraries, this
-applies only to characters with code points less than 256. By default,
-higher-valued code points never match escapes such as \w or \d. However, if
-PCRE is built with Unicode property support, all characters can be tested with
-\p and \P, or, alternatively, the PCRE_UCP option can be set when a pattern
-is compiled; this causes \w and friends to use Unicode property support
-instead of the built-in tables.
-</P>
-<P>
-The use of locales with Unicode is discouraged. If you are handling characters
-with code points greater than 128, you should either use Unicode support, or
-use locales, but not try to mix the two.
-</P>
-<P>
-PCRE contains an internal set of tables that are used when the final argument
-of <b>pcre_compile()</b> is NULL. These are sufficient for many applications.
-Normally, the internal tables recognize only ASCII characters. However, when
-PCRE is built, it is possible to cause the internal tables to be rebuilt in the
-default "C" locale of the local system, which may cause them to be different.
-</P>
-<P>
-The internal tables can always be overridden by tables supplied by the
-application that calls PCRE. These may be created in a different locale from
-the default. As more and more applications change to using Unicode, the need
-for this locale support is expected to die away.
-</P>
-<P>
-External tables are built by calling the <b>pcre_maketables()</b> function,
-which has no arguments, in the relevant locale. The result can then be passed
-to <b>pcre_compile()</b> as often as necessary. For example, to build and use
-tables that are appropriate for the French locale (where accented characters
-with values greater than 128 are treated as letters), the following code could
-be used:
-<pre>
- setlocale(LC_CTYPE, "fr_FR");
- tables = pcre_maketables();
- re = pcre_compile(..., tables);
-</pre>
-The locale name "fr_FR" is used on Linux and other Unix-like systems; if you
-are using Windows, the name for the French locale is "french".
-</P>
-<P>
-When <b>pcre_maketables()</b> runs, the tables are built in memory that is
-obtained via <b>pcre_malloc</b>. It is the caller's responsibility to ensure
-that the memory containing the tables remains available for as long as it is
-needed.
-</P>
-<P>
-The pointer that is passed to <b>pcre_compile()</b> is saved with the compiled
-pattern, and the same tables are used via this pointer by <b>pcre_study()</b>
-and also by <b>pcre_exec()</b> and <b>pcre_dfa_exec()</b>. Thus, for any single
-pattern, compilation, studying and matching all happen in the same locale, but
-different patterns can be processed in different locales.
-</P>
-<P>
-It is possible to pass a table pointer or NULL (indicating the use of the
-internal tables) to <b>pcre_exec()</b> or <b>pcre_dfa_exec()</b> (see the
-discussion below in the section on matching a pattern). This facility is
-provided for use with pre-compiled patterns that have been saved and reloaded.
-Character tables are not saved with patterns, so if a non-standard table was
-used at compile time, it must be provided again when the reloaded pattern is
-matched. Attempting to use this facility to match a pattern in a different
-locale from the one in which it was compiled is likely to lead to anomalous
-(usually incorrect) results.
-<a name="infoaboutpattern"></a></P>
-<br><a name="SEC15" href="#TOC1">INFORMATION ABOUT A PATTERN</a><br>
-<P>
-<b>int pcre_fullinfo(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
-<b> int <i>what</i>, void *<i>where</i>);</b>
-</P>
-<P>
-The <b>pcre_fullinfo()</b> function returns information about a compiled
-pattern. It replaces the <b>pcre_info()</b> function, which was removed from the
-library at version 8.30, after more than 10 years of obsolescence.
-</P>
-<P>
-The first argument for <b>pcre_fullinfo()</b> is a pointer to the compiled
-pattern. The second argument is the result of <b>pcre_study()</b>, or NULL if
-the pattern was not studied. The third argument specifies which piece of
-information is required, and the fourth argument is a pointer to a variable
-to receive the data. The yield of the function is zero for success, or one of
-the following negative numbers:
-<pre>
- PCRE_ERROR_NULL the argument <i>code</i> was NULL
- the argument <i>where</i> was NULL
- PCRE_ERROR_BADMAGIC the "magic number" was not found
- PCRE_ERROR_BADENDIANNESS the pattern was compiled with different
- endianness
- PCRE_ERROR_BADOPTION the value of <i>what</i> was invalid
- PCRE_ERROR_UNSET the requested field is not set
-</pre>
-The "magic number" is placed at the start of each compiled pattern as an simple
-check against passing an arbitrary memory pointer. The endianness error can
-occur if a compiled pattern is saved and reloaded on a different host. Here is
-a typical call of <b>pcre_fullinfo()</b>, to obtain the length of the compiled
-pattern:
-<pre>
- int rc;
- size_t length;
- rc = pcre_fullinfo(
- re, /* result of pcre_compile() */
- sd, /* result of pcre_study(), or NULL */
- PCRE_INFO_SIZE, /* what is required */
- &length); /* where to put the data */
-</pre>
-The possible values for the third argument are defined in <b>pcre.h</b>, and are
-as follows:
-<pre>
- PCRE_INFO_BACKREFMAX
-</pre>
-Return the number of the highest back reference in the pattern. The fourth
-argument should point to an <b>int</b> variable. Zero is returned if there are
-no back references.
-<pre>
- PCRE_INFO_CAPTURECOUNT
-</pre>
-Return the number of capturing subpatterns in the pattern. The fourth argument
-should point to an <b>int</b> variable.
-<pre>
- PCRE_INFO_DEFAULT_TABLES
-</pre>
-Return a pointer to the internal default character tables within PCRE. The
-fourth argument should point to an <b>unsigned char *</b> variable. This
-information call is provided for internal use by the <b>pcre_study()</b>
-function. External callers can cause PCRE to use its internal tables by passing
-a NULL table pointer.
-<pre>
- PCRE_INFO_FIRSTBYTE (deprecated)
-</pre>
-Return information about the first data unit of any matched string, for a
-non-anchored pattern. The name of this option refers to the 8-bit library,
-where data units are bytes. The fourth argument should point to an <b>int</b>
-variable. Negative values are used for special cases. However, this means that
-when the 32-bit library is in non-UTF-32 mode, the full 32-bit range of
-characters cannot be returned. For this reason, this value is deprecated; use
-PCRE_INFO_FIRSTCHARACTERFLAGS and PCRE_INFO_FIRSTCHARACTER instead.
-</P>
-<P>
-If there is a fixed first value, for example, the letter "c" from a pattern
-such as (cat|cow|coyote), its value is returned. In the 8-bit library, the
-value is always less than 256. In the 16-bit library the value can be up to
-0xffff. In the 32-bit library the value can be up to 0x10ffff.
-</P>
-<P>
-If there is no fixed first value, and if either
-<br>
-<br>
-(a) the pattern was compiled with the PCRE_MULTILINE option, and every branch
-starts with "^", or
-<br>
-<br>
-(b) every branch of the pattern starts with ".*" and PCRE_DOTALL is not set
-(if it were set, the pattern would be anchored),
-<br>
-<br>
--1 is returned, indicating that the pattern matches only at the start of a
-subject string or after any newline within the string. Otherwise -2 is
-returned. For anchored patterns, -2 is returned.
-<pre>
- PCRE_INFO_FIRSTCHARACTER
-</pre>
-Return the value of the first data unit (non-UTF character) of any matched
-string in the situation where PCRE_INFO_FIRSTCHARACTERFLAGS returns 1;
-otherwise return 0. The fourth argument should point to an <b>uint_t</b>
-variable.
-</P>
-<P>
-In the 8-bit library, the value is always less than 256. In the 16-bit library
-the value can be up to 0xffff. In the 32-bit library in UTF-32 mode the value
-can be up to 0x10ffff, and up to 0xffffffff when not using UTF-32 mode.
-<pre>
- PCRE_INFO_FIRSTCHARACTERFLAGS
-</pre>
-Return information about the first data unit of any matched string, for a
-non-anchored pattern. The fourth argument should point to an <b>int</b>
-variable.
-</P>
-<P>
-If there is a fixed first value, for example, the letter "c" from a pattern
-such as (cat|cow|coyote), 1 is returned, and the character value can be
-retrieved using PCRE_INFO_FIRSTCHARACTER. If there is no fixed first value, and
-if either
-<br>
-<br>
-(a) the pattern was compiled with the PCRE_MULTILINE option, and every branch
-starts with "^", or
-<br>
-<br>
-(b) every branch of the pattern starts with ".*" and PCRE_DOTALL is not set
-(if it were set, the pattern would be anchored),
-<br>
-<br>
-2 is returned, indicating that the pattern matches only at the start of a
-subject string or after any newline within the string. Otherwise 0 is
-returned. For anchored patterns, 0 is returned.
-<pre>
- PCRE_INFO_FIRSTTABLE
-</pre>
-If the pattern was studied, and this resulted in the construction of a 256-bit
-table indicating a fixed set of values for the first data unit in any matching
-string, a pointer to the table is returned. Otherwise NULL is returned. The
-fourth argument should point to an <b>unsigned char *</b> variable.
-<pre>
- PCRE_INFO_HASCRORLF
-</pre>
-Return 1 if the pattern contains any explicit matches for CR or LF characters,
-otherwise 0. The fourth argument should point to an <b>int</b> variable. An
-explicit match is either a literal CR or LF character, or \r or \n.
-<pre>
- PCRE_INFO_JCHANGED
-</pre>
-Return 1 if the (?J) or (?-J) option setting is used in the pattern, otherwise
-0. The fourth argument should point to an <b>int</b> variable. (?J) and
-(?-J) set and unset the local PCRE_DUPNAMES option, respectively.
-<pre>
- PCRE_INFO_JIT
-</pre>
-Return 1 if the pattern was studied with one of the JIT options, and
-just-in-time compiling was successful. The fourth argument should point to an
-<b>int</b> variable. A return value of 0 means that JIT support is not available
-in this version of PCRE, or that the pattern was not studied with a JIT option,
-or that the JIT compiler could not handle this particular pattern. See the
-<a href="pcrejit.html"><b>pcrejit</b></a>
-documentation for details of what can and cannot be handled.
-<pre>
- PCRE_INFO_JITSIZE
-</pre>
-If the pattern was successfully studied with a JIT option, return the size of
-the JIT compiled code, otherwise return zero. The fourth argument should point
-to a <b>size_t</b> variable.
-<pre>
- PCRE_INFO_LASTLITERAL
-</pre>
-Return the value of the rightmost literal data unit that must exist in any
-matched string, other than at its start, if such a value has been recorded. The
-fourth argument should point to an <b>int</b> variable. If there is no such
-value, -1 is returned. For anchored patterns, a last literal value is recorded
-only if it follows something of variable length. For example, for the pattern
-/^a\d+z\d+/ the returned value is "z", but for /^a\dz\d/ the returned value
-is -1.
-</P>
-<P>
-Since for the 32-bit library using the non-UTF-32 mode, this function is unable
-to return the full 32-bit range of characters, this value is deprecated;
-instead the PCRE_INFO_REQUIREDCHARFLAGS and PCRE_INFO_REQUIREDCHAR values should
-be used.
-<pre>
- PCRE_INFO_MATCH_EMPTY
-</pre>
-Return 1 if the pattern can match an empty string, otherwise 0. The fourth
-argument should point to an <b>int</b> variable.
-<pre>
- PCRE_INFO_MATCHLIMIT
-</pre>
-If the pattern set a match limit by including an item of the form
-(*LIMIT_MATCH=nnnn) at the start, the value is returned. The fourth argument
-should point to an unsigned 32-bit integer. If no such value has been set, the
-call to <b>pcre_fullinfo()</b> returns the error PCRE_ERROR_UNSET.
-<pre>
- PCRE_INFO_MAXLOOKBEHIND
-</pre>
-Return the number of characters (NB not data units) in the longest lookbehind
-assertion in the pattern. This information is useful when doing multi-segment
-matching using the partial matching facilities. Note that the simple assertions
-\b and \B require a one-character lookbehind. \A also registers a
-one-character lookbehind, though it does not actually inspect the previous
-character. This is to ensure that at least one character from the old segment
-is retained when a new segment is processed. Otherwise, if there are no
-lookbehinds in the pattern, \A might match incorrectly at the start of a new
-segment.
-<pre>
- PCRE_INFO_MINLENGTH
-</pre>
-If the pattern was studied and a minimum length for matching subject strings
-was computed, its value is returned. Otherwise the returned value is -1. The
-value is a number of characters, which in UTF mode may be different from the
-number of data units. The fourth argument should point to an <b>int</b>
-variable. A non-negative value is a lower bound to the length of any matching
-string. There may not be any strings of that length that do actually match, but
-every string that does match is at least that long.
-<pre>
- PCRE_INFO_NAMECOUNT
- PCRE_INFO_NAMEENTRYSIZE
- PCRE_INFO_NAMETABLE
-</pre>
-PCRE supports the use of named as well as numbered capturing parentheses. The
-names are just an additional way of identifying the parentheses, which still
-acquire numbers. Several convenience functions such as
-<b>pcre_get_named_substring()</b> are provided for extracting captured
-substrings by name. It is also possible to extract the data directly, by first
-converting the name to a number in order to access the correct pointers in the
-output vector (described with <b>pcre_exec()</b> below). To do the conversion,
-you need to use the name-to-number map, which is described by these three
-values.
-</P>
-<P>
-The map consists of a number of fixed-size entries. PCRE_INFO_NAMECOUNT gives
-the number of entries, and PCRE_INFO_NAMEENTRYSIZE gives the size of each
-entry; both of these return an <b>int</b> value. The entry size depends on the
-length of the longest name. PCRE_INFO_NAMETABLE returns a pointer to the first
-entry of the table. This is a pointer to <b>char</b> in the 8-bit library, where
-the first two bytes of each entry are the number of the capturing parenthesis,
-most significant byte first. In the 16-bit library, the pointer points to
-16-bit data units, the first of which contains the parenthesis number. In the
-32-bit library, the pointer points to 32-bit data units, the first of which
-contains the parenthesis number. The rest of the entry is the corresponding
-name, zero terminated.
-</P>
-<P>
-The names are in alphabetical order. If (?| is used to create multiple groups
-with the same number, as described in the
-<a href="pcrepattern.html#dupsubpatternnumber">section on duplicate subpattern numbers</a>
-in the
-<a href="pcrepattern.html"><b>pcrepattern</b></a>
-page, the groups may be given the same name, but there is only one entry in the
-table. Different names for groups of the same number are not permitted.
-Duplicate names for subpatterns with different numbers are permitted,
-but only if PCRE_DUPNAMES is set. They appear in the table in the order in
-which they were found in the pattern. In the absence of (?| this is the order
-of increasing number; when (?| is used this is not necessarily the case because
-later subpatterns may have lower numbers.
-</P>
-<P>
-As a simple example of the name/number table, consider the following pattern
-after compilation by the 8-bit library (assume PCRE_EXTENDED is set, so white
-space - including newlines - is ignored):
-<pre>
- (?&#60;date&#62; (?&#60;year&#62;(\d\d)?\d\d) - (?&#60;month&#62;\d\d) - (?&#60;day&#62;\d\d) )
-</pre>
-There are four named subpatterns, so the table has four entries, and each entry
-in the table is eight bytes long. The table is as follows, with non-printing
-bytes shows in hexadecimal, and undefined bytes shown as ??:
-<pre>
- 00 01 d a t e 00 ??
- 00 05 d a y 00 ?? ??
- 00 04 m o n t h 00
- 00 02 y e a r 00 ??
-</pre>
-When writing code to extract data from named subpatterns using the
-name-to-number map, remember that the length of the entries is likely to be
-different for each compiled pattern.
-<pre>
- PCRE_INFO_OKPARTIAL
-</pre>
-Return 1 if the pattern can be used for partial matching with
-<b>pcre_exec()</b>, otherwise 0. The fourth argument should point to an
-<b>int</b> variable. From release 8.00, this always returns 1, because the
-restrictions that previously applied to partial matching have been lifted. The
-<a href="pcrepartial.html"><b>pcrepartial</b></a>
-documentation gives details of partial matching.
-<pre>
- PCRE_INFO_OPTIONS
-</pre>
-Return a copy of the options with which the pattern was compiled. The fourth
-argument should point to an <b>unsigned long int</b> variable. These option bits
-are those specified in the call to <b>pcre_compile()</b>, modified by any
-top-level option settings at the start of the pattern itself. In other words,
-they are the options that will be in force when matching starts. For example,
-if the pattern /(?im)abc(?-i)d/ is compiled with the PCRE_EXTENDED option, the
-result is PCRE_CASELESS, PCRE_MULTILINE, and PCRE_EXTENDED.
-</P>
-<P>
-A pattern is automatically anchored by PCRE if all of its top-level
-alternatives begin with one of the following:
-<pre>
- ^ unless PCRE_MULTILINE is set
- \A always
- \G always
- .* if PCRE_DOTALL is set and there are no back references to the subpattern in which .* appears
-</pre>
-For such patterns, the PCRE_ANCHORED bit is set in the options returned by
-<b>pcre_fullinfo()</b>.
-<pre>
- PCRE_INFO_RECURSIONLIMIT
-</pre>
-If the pattern set a recursion limit by including an item of the form
-(*LIMIT_RECURSION=nnnn) at the start, the value is returned. The fourth
-argument should point to an unsigned 32-bit integer. If no such value has been
-set, the call to <b>pcre_fullinfo()</b> returns the error PCRE_ERROR_UNSET.
-<pre>
- PCRE_INFO_SIZE
-</pre>
-Return the size of the compiled pattern in bytes (for all three libraries). The
-fourth argument should point to a <b>size_t</b> variable. This value does not
-include the size of the <b>pcre</b> structure that is returned by
-<b>pcre_compile()</b>. The value that is passed as the argument to
-<b>pcre_malloc()</b> when <b>pcre_compile()</b> is getting memory in which to
-place the compiled data is the value returned by this option plus the size of
-the <b>pcre</b> structure. Studying a compiled pattern, with or without JIT,
-does not alter the value returned by this option.
-<pre>
- PCRE_INFO_STUDYSIZE
-</pre>
-Return the size in bytes (for all three libraries) of the data block pointed to
-by the <i>study_data</i> field in a <b>pcre_extra</b> block. If <b>pcre_extra</b>
-is NULL, or there is no study data, zero is returned. The fourth argument
-should point to a <b>size_t</b> variable. The <i>study_data</i> field is set by
-<b>pcre_study()</b> to record information that will speed up matching (see the
-section entitled
-<a href="#studyingapattern">"Studying a pattern"</a>
-above). The format of the <i>study_data</i> block is private, but its length
-is made available via this option so that it can be saved and restored (see the
-<a href="pcreprecompile.html"><b>pcreprecompile</b></a>
-documentation for details).
-<pre>
- PCRE_INFO_REQUIREDCHARFLAGS
-</pre>
-Returns 1 if there is a rightmost literal data unit that must exist in any
-matched string, other than at its start. The fourth argument should point to
-an <b>int</b> variable. If there is no such value, 0 is returned. If returning
-1, the character value itself can be retrieved using PCRE_INFO_REQUIREDCHAR.
-</P>
-<P>
-For anchored patterns, a last literal value is recorded only if it follows
-something of variable length. For example, for the pattern /^a\d+z\d+/ the
-returned value 1 (with "z" returned from PCRE_INFO_REQUIREDCHAR), but for
-/^a\dz\d/ the returned value is 0.
-<pre>
- PCRE_INFO_REQUIREDCHAR
-</pre>
-Return the value of the rightmost literal data unit that must exist in any
-matched string, other than at its start, if such a value has been recorded. The
-fourth argument should point to an <b>uint32_t</b> variable. If there is no such
-value, 0 is returned.
-</P>
-<br><a name="SEC16" href="#TOC1">REFERENCE COUNTS</a><br>
-<P>
-<b>int pcre_refcount(pcre *<i>code</i>, int <i>adjust</i>);</b>
-</P>
-<P>
-The <b>pcre_refcount()</b> function is used to maintain a reference count in the
-data block that contains a compiled pattern. It is provided for the benefit of
-applications that operate in an object-oriented manner, where different parts
-of the application may be using the same compiled pattern, but you want to free
-the block when they are all done.
-</P>
-<P>
-When a pattern is compiled, the reference count field is initialized to zero.
-It is changed only by calling this function, whose action is to add the
-<i>adjust</i> value (which may be positive or negative) to it. The yield of the
-function is the new value. However, the value of the count is constrained to
-lie between 0 and 65535, inclusive. If the new value is outside these limits,
-it is forced to the appropriate limit value.
-</P>
-<P>
-Except when it is zero, the reference count is not correctly preserved if a
-pattern is compiled on one host and then transferred to a host whose byte-order
-is different. (This seems a highly unlikely scenario.)
-</P>
-<br><a name="SEC17" href="#TOC1">MATCHING A PATTERN: THE TRADITIONAL FUNCTION</a><br>
-<P>
-<b>int pcre_exec(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
-<b> const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
-<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b>
-</P>
-<P>
-The function <b>pcre_exec()</b> is called to match a subject string against a
-compiled pattern, which is passed in the <i>code</i> argument. If the
-pattern was studied, the result of the study should be passed in the
-<i>extra</i> argument. You can call <b>pcre_exec()</b> with the same <i>code</i>
-and <i>extra</i> arguments as many times as you like, in order to match
-different subject strings with the same pattern.
-</P>
-<P>
-This function is the main matching facility of the library, and it operates in
-a Perl-like manner. For specialist use there is also an alternative matching
-function, which is described
-<a href="#dfamatch">below</a>
-in the section about the <b>pcre_dfa_exec()</b> function.
-</P>
-<P>
-In most applications, the pattern will have been compiled (and optionally
-studied) in the same process that calls <b>pcre_exec()</b>. However, it is
-possible to save compiled patterns and study data, and then use them later
-in different processes, possibly even on different hosts. For a discussion
-about this, see the
-<a href="pcreprecompile.html"><b>pcreprecompile</b></a>
-documentation.
-</P>
-<P>
-Here is an example of a simple call to <b>pcre_exec()</b>:
-<pre>
- int rc;
- int ovector[30];
- rc = pcre_exec(
- re, /* result of pcre_compile() */
- NULL, /* we didn't study the pattern */
- "some string", /* the subject string */
- 11, /* the length of the subject string */
- 0, /* start at offset 0 in the subject */
- 0, /* default options */
- ovector, /* vector of integers for substring information */
- 30); /* number of elements (NOT size in bytes) */
-<a name="extradata"></a></PRE>
-</P>
-<br><b>
-Extra data for <b>pcre_exec()</b>
-</b><br>
-<P>
-If the <i>extra</i> argument is not NULL, it must point to a <b>pcre_extra</b>
-data block. The <b>pcre_study()</b> function returns such a block (when it
-doesn't return NULL), but you can also create one for yourself, and pass
-additional information in it. The <b>pcre_extra</b> block contains the following
-fields (not necessarily in this order):
-<pre>
- unsigned long int <i>flags</i>;
- void *<i>study_data</i>;
- void *<i>executable_jit</i>;
- unsigned long int <i>match_limit</i>;
- unsigned long int <i>match_limit_recursion</i>;
- void *<i>callout_data</i>;
- const unsigned char *<i>tables</i>;
- unsigned char **<i>mark</i>;
-</pre>
-In the 16-bit version of this structure, the <i>mark</i> field has type
-"PCRE_UCHAR16 **".
-<br>
-<br>
-In the 32-bit version of this structure, the <i>mark</i> field has type
-"PCRE_UCHAR32 **".
-</P>
-<P>
-The <i>flags</i> field is used to specify which of the other fields are set. The
-flag bits are:
-<pre>
- PCRE_EXTRA_CALLOUT_DATA
- PCRE_EXTRA_EXECUTABLE_JIT
- PCRE_EXTRA_MARK
- PCRE_EXTRA_MATCH_LIMIT
- PCRE_EXTRA_MATCH_LIMIT_RECURSION
- PCRE_EXTRA_STUDY_DATA
- PCRE_EXTRA_TABLES
-</pre>
-Other flag bits should be set to zero. The <i>study_data</i> field and sometimes
-the <i>executable_jit</i> field are set in the <b>pcre_extra</b> block that is
-returned by <b>pcre_study()</b>, together with the appropriate flag bits. You
-should not set these yourself, but you may add to the block by setting other
-fields and their corresponding flag bits.
-</P>
-<P>
-The <i>match_limit</i> field provides a means of preventing PCRE from using up a
-vast amount of resources when running patterns that are not going to match,
-but which have a very large number of possibilities in their search trees. The
-classic example is a pattern that uses nested unlimited repeats.
-</P>
-<P>
-Internally, <b>pcre_exec()</b> uses a function called <b>match()</b>, which it
-calls repeatedly (sometimes recursively). The limit set by <i>match_limit</i> is
-imposed on the number of times this function is called during a match, which
-has the effect of limiting the amount of backtracking that can take place. For
-patterns that are not anchored, the count restarts from zero for each position
-in the subject string.
-</P>
-<P>
-When <b>pcre_exec()</b> is called with a pattern that was successfully studied
-with a JIT option, the way that the matching is executed is entirely different.
-However, there is still the possibility of runaway matching that goes on for a
-very long time, and so the <i>match_limit</i> value is also used in this case
-(but in a different way) to limit how long the matching can continue.
-</P>
-<P>
-The default value for the limit can be set when PCRE is built; the default
-default is 10 million, which handles all but the most extreme cases. You can
-override the default by suppling <b>pcre_exec()</b> with a <b>pcre_extra</b>
-block in which <i>match_limit</i> is set, and PCRE_EXTRA_MATCH_LIMIT is set in
-the <i>flags</i> field. If the limit is exceeded, <b>pcre_exec()</b> returns
-PCRE_ERROR_MATCHLIMIT.
-</P>
-<P>
-A value for the match limit may also be supplied by an item at the start of a
-pattern of the form
-<pre>
- (*LIMIT_MATCH=d)
-</pre>
-where d is a decimal number. However, such a setting is ignored unless d is
-less than the limit set by the caller of <b>pcre_exec()</b> or, if no such limit
-is set, less than the default.
-</P>
-<P>
-The <i>match_limit_recursion</i> field is similar to <i>match_limit</i>, but
-instead of limiting the total number of times that <b>match()</b> is called, it
-limits the depth of recursion. The recursion depth is a smaller number than the
-total number of calls, because not all calls to <b>match()</b> are recursive.
-This limit is of use only if it is set smaller than <i>match_limit</i>.
-</P>
-<P>
-Limiting the recursion depth limits the amount of machine stack that can be
-used, or, when PCRE has been compiled to use memory on the heap instead of the
-stack, the amount of heap memory that can be used. This limit is not relevant,
-and is ignored, when matching is done using JIT compiled code.
-</P>
-<P>
-The default value for <i>match_limit_recursion</i> can be set when PCRE is
-built; the default default is the same value as the default for
-<i>match_limit</i>. You can override the default by suppling <b>pcre_exec()</b>
-with a <b>pcre_extra</b> block in which <i>match_limit_recursion</i> is set, and
-PCRE_EXTRA_MATCH_LIMIT_RECURSION is set in the <i>flags</i> field. If the limit
-is exceeded, <b>pcre_exec()</b> returns PCRE_ERROR_RECURSIONLIMIT.
-</P>
-<P>
-A value for the recursion limit may also be supplied by an item at the start of
-a pattern of the form
-<pre>
- (*LIMIT_RECURSION=d)
-</pre>
-where d is a decimal number. However, such a setting is ignored unless d is
-less than the limit set by the caller of <b>pcre_exec()</b> or, if no such limit
-is set, less than the default.
-</P>
-<P>
-The <i>callout_data</i> field is used in conjunction with the "callout" feature,
-and is described in the
-<a href="pcrecallout.html"><b>pcrecallout</b></a>
-documentation.
-</P>
-<P>
-The <i>tables</i> field is provided for use with patterns that have been
-pre-compiled using custom character tables, saved to disc or elsewhere, and
-then reloaded, because the tables that were used to compile a pattern are not
-saved with it. See the
-<a href="pcreprecompile.html"><b>pcreprecompile</b></a>
-documentation for a discussion of saving compiled patterns for later use. If
-NULL is passed using this mechanism, it forces PCRE's internal tables to be
-used.
-</P>
-<P>
-<b>Warning:</b> The tables that <b>pcre_exec()</b> uses must be the same as those
-that were used when the pattern was compiled. If this is not the case, the
-behaviour of <b>pcre_exec()</b> is undefined. Therefore, when a pattern is
-compiled and matched in the same process, this field should never be set. In
-this (the most common) case, the correct table pointer is automatically passed
-with the compiled pattern from <b>pcre_compile()</b> to <b>pcre_exec()</b>.
-</P>
-<P>
-If PCRE_EXTRA_MARK is set in the <i>flags</i> field, the <i>mark</i> field must
-be set to point to a suitable variable. If the pattern contains any
-backtracking control verbs such as (*MARK:NAME), and the execution ends up with
-a name to pass back, a pointer to the name string (zero terminated) is placed
-in the variable pointed to by the <i>mark</i> field. The names are within the
-compiled pattern; if you wish to retain such a name you must copy it before
-freeing the memory of a compiled pattern. If there is no name to pass back, the
-variable pointed to by the <i>mark</i> field is set to NULL. For details of the
-backtracking control verbs, see the section entitled
-<a href="pcrepattern#backtrackcontrol">"Backtracking control"</a>
-in the
-<a href="pcrepattern.html"><b>pcrepattern</b></a>
-documentation.
-<a name="execoptions"></a></P>
-<br><b>
-Option bits for <b>pcre_exec()</b>
-</b><br>
-<P>
-The unused bits of the <i>options</i> argument for <b>pcre_exec()</b> must be
-zero. The only bits that may be set are PCRE_ANCHORED, PCRE_NEWLINE_<i>xxx</i>,
-PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NOTEMPTY_ATSTART,
-PCRE_NO_START_OPTIMIZE, PCRE_NO_UTF8_CHECK, PCRE_PARTIAL_HARD, and
-PCRE_PARTIAL_SOFT.
-</P>
-<P>
-If the pattern was successfully studied with one of the just-in-time (JIT)
-compile options, the only supported options for JIT execution are
-PCRE_NO_UTF8_CHECK, PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY,
-PCRE_NOTEMPTY_ATSTART, PCRE_PARTIAL_HARD, and PCRE_PARTIAL_SOFT. If an
-unsupported option is used, JIT execution is disabled and the normal
-interpretive code in <b>pcre_exec()</b> is run.
-<pre>
- PCRE_ANCHORED
-</pre>
-The PCRE_ANCHORED option limits <b>pcre_exec()</b> to matching at the first
-matching position. If a pattern was compiled with PCRE_ANCHORED, or turned out
-to be anchored by virtue of its contents, it cannot be made unachored at
-matching time.
-<pre>
- PCRE_BSR_ANYCRLF
- PCRE_BSR_UNICODE
-</pre>
-These options (which are mutually exclusive) control what the \R escape
-sequence matches. The choice is either to match only CR, LF, or CRLF, or to
-match any Unicode newline sequence. These options override the choice that was
-made or defaulted when the pattern was compiled.
-<pre>
- PCRE_NEWLINE_CR
- PCRE_NEWLINE_LF
- PCRE_NEWLINE_CRLF
- PCRE_NEWLINE_ANYCRLF
- PCRE_NEWLINE_ANY
-</pre>
-These options override the newline definition that was chosen or defaulted when
-the pattern was compiled. For details, see the description of
-<b>pcre_compile()</b> above. During matching, the newline choice affects the
-behaviour of the dot, circumflex, and dollar metacharacters. It may also alter
-the way the match position is advanced after a match failure for an unanchored
-pattern.
-</P>
-<P>
-When PCRE_NEWLINE_CRLF, PCRE_NEWLINE_ANYCRLF, or PCRE_NEWLINE_ANY is set, and a
-match attempt for an unanchored pattern fails when the current position is at a
-CRLF sequence, and the pattern contains no explicit matches for CR or LF
-characters, the match position is advanced by two characters instead of one, in
-other words, to after the CRLF.
-</P>
-<P>
-The above rule is a compromise that makes the most common cases work as
-expected. For example, if the pattern is .+A (and the PCRE_DOTALL option is not
-set), it does not match the string "\r\nA" because, after failing at the
-start, it skips both the CR and the LF before retrying. However, the pattern
-[\r\n]A does match that string, because it contains an explicit CR or LF
-reference, and so advances only by one character after the first failure.
-</P>
-<P>
-An explicit match for CR of LF is either a literal appearance of one of those
-characters, or one of the \r or \n escape sequences. Implicit matches such as
-[^X] do not count, nor does \s (which includes CR and LF in the characters
-that it matches).
-</P>
-<P>
-Notwithstanding the above, anomalous effects may still occur when CRLF is a
-valid newline sequence and explicit \r or \n escapes appear in the pattern.
-<pre>
- PCRE_NOTBOL
-</pre>
-This option specifies that first character of the subject string is not the
-beginning of a line, so the circumflex metacharacter should not match before
-it. Setting this without PCRE_MULTILINE (at compile time) causes circumflex
-never to match. This option affects only the behaviour of the circumflex
-metacharacter. It does not affect \A.
-<pre>
- PCRE_NOTEOL
-</pre>
-This option specifies that the end of the subject string is not the end of a
-line, so the dollar metacharacter should not match it nor (except in multiline
-mode) a newline immediately before it. Setting this without PCRE_MULTILINE (at
-compile time) causes dollar never to match. This option affects only the
-behaviour of the dollar metacharacter. It does not affect \Z or \z.
-<pre>
- PCRE_NOTEMPTY
-</pre>
-An empty string is not considered to be a valid match if this option is set. If
-there are alternatives in the pattern, they are tried. If all the alternatives
-match the empty string, the entire match fails. For example, if the pattern
-<pre>
- a?b?
-</pre>
-is applied to a string not beginning with "a" or "b", it matches an empty
-string at the start of the subject. With PCRE_NOTEMPTY set, this match is not
-valid, so PCRE searches further into the string for occurrences of "a" or "b".
-<pre>
- PCRE_NOTEMPTY_ATSTART
-</pre>
-This is like PCRE_NOTEMPTY, except that an empty string match that is not at
-the start of the subject is permitted. If the pattern is anchored, such a match
-can occur only if the pattern contains \K.
-</P>
-<P>
-Perl has no direct equivalent of PCRE_NOTEMPTY or PCRE_NOTEMPTY_ATSTART, but it
-does make a special case of a pattern match of the empty string within its
-<b>split()</b> function, and when using the /g modifier. It is possible to
-emulate Perl's behaviour after matching a null string by first trying the match
-again at the same offset with PCRE_NOTEMPTY_ATSTART and PCRE_ANCHORED, and then
-if that fails, by advancing the starting offset (see below) and trying an
-ordinary match again. There is some code that demonstrates how to do this in
-the
-<a href="pcredemo.html"><b>pcredemo</b></a>
-sample program. In the most general case, you have to check to see if the
-newline convention recognizes CRLF as a newline, and if so, and the current
-character is CR followed by LF, advance the starting offset by two characters
-instead of one.
-<pre>
- PCRE_NO_START_OPTIMIZE
-</pre>
-There are a number of optimizations that <b>pcre_exec()</b> uses at the start of
-a match, in order to speed up the process. For example, if it is known that an
-unanchored match must start with a specific character, it searches the subject
-for that character, and fails immediately if it cannot find it, without
-actually running the main matching function. This means that a special item
-such as (*COMMIT) at the start of a pattern is not considered until after a
-suitable starting point for the match has been found. Also, when callouts or
-(*MARK) items are in use, these "start-up" optimizations can cause them to be
-skipped if the pattern is never actually used. The start-up optimizations are
-in effect a pre-scan of the subject that takes place before the pattern is run.
-</P>
-<P>
-The PCRE_NO_START_OPTIMIZE option disables the start-up optimizations, possibly
-causing performance to suffer, but ensuring that in cases where the result is
-"no match", the callouts do occur, and that items such as (*COMMIT) and (*MARK)
-are considered at every possible starting position in the subject string. If
-PCRE_NO_START_OPTIMIZE is set at compile time, it cannot be unset at matching
-time. The use of PCRE_NO_START_OPTIMIZE at matching time (that is, passing it
-to <b>pcre_exec()</b>) disables JIT execution; in this situation, matching is
-always done using interpretively.
-</P>
-<P>
-Setting PCRE_NO_START_OPTIMIZE can change the outcome of a matching operation.
-Consider the pattern
-<pre>
- (*COMMIT)ABC
-</pre>
-When this is compiled, PCRE records the fact that a match must start with the
-character "A". Suppose the subject string is "DEFABC". The start-up
-optimization scans along the subject, finds "A" and runs the first match
-attempt from there. The (*COMMIT) item means that the pattern must match the
-current starting position, which in this case, it does. However, if the same
-match is run with PCRE_NO_START_OPTIMIZE set, the initial scan along the
-subject string does not happen. The first match attempt is run starting from
-"D" and when this fails, (*COMMIT) prevents any further matches being tried, so
-the overall result is "no match". If the pattern is studied, more start-up
-optimizations may be used. For example, a minimum length for the subject may be
-recorded. Consider the pattern
-<pre>
- (*MARK:A)(X|Y)
-</pre>
-The minimum length for a match is one character. If the subject is "ABC", there
-will be attempts to match "ABC", "BC", "C", and then finally an empty string.
-If the pattern is studied, the final attempt does not take place, because PCRE
-knows that the subject is too short, and so the (*MARK) is never encountered.
-In this case, studying the pattern does not affect the overall match result,
-which is still "no match", but it does affect the auxiliary information that is
-returned.
-<pre>
- PCRE_NO_UTF8_CHECK
-</pre>
-When PCRE_UTF8 is set at compile time, the validity of the subject as a UTF-8
-string is automatically checked when <b>pcre_exec()</b> is subsequently called.
-The entire string is checked before any other processing takes place. The value
-of <i>startoffset</i> is also checked to ensure that it points to the start of a
-UTF-8 character. There is a discussion about the
-<a href="pcreunicode.html#utf8strings">validity of UTF-8 strings</a>
-in the
-<a href="pcreunicode.html"><b>pcreunicode</b></a>
-page. If an invalid sequence of bytes is found, <b>pcre_exec()</b> returns the
-error PCRE_ERROR_BADUTF8 or, if PCRE_PARTIAL_HARD is set and the problem is a
-truncated character at the end of the subject, PCRE_ERROR_SHORTUTF8. In both
-cases, information about the precise nature of the error may also be returned
-(see the descriptions of these errors in the section entitled \fIError return
-values from\fP <b>pcre_exec()</b>
-<a href="#errorlist">below).</a>
-If <i>startoffset</i> contains a value that does not point to the start of a
-UTF-8 character (or to the end of the subject), PCRE_ERROR_BADUTF8_OFFSET is
-returned.
-</P>
-<P>
-If you already know that your subject is valid, and you want to skip these
-checks for performance reasons, you can set the PCRE_NO_UTF8_CHECK option when
-calling <b>pcre_exec()</b>. You might want to do this for the second and
-subsequent calls to <b>pcre_exec()</b> if you are making repeated calls to find
-all the matches in a single subject string. However, you should be sure that
-the value of <i>startoffset</i> points to the start of a character (or the end
-of the subject). When PCRE_NO_UTF8_CHECK is set, the effect of passing an
-invalid string as a subject or an invalid value of <i>startoffset</i> is
-undefined. Your program may crash or loop.
-<pre>
- PCRE_PARTIAL_HARD
- PCRE_PARTIAL_SOFT
-</pre>
-These options turn on the partial matching feature. For backwards
-compatibility, PCRE_PARTIAL is a synonym for PCRE_PARTIAL_SOFT. A partial match
-occurs if the end of the subject string is reached successfully, but there are
-not enough subject characters to complete the match. If this happens when
-PCRE_PARTIAL_SOFT (but not PCRE_PARTIAL_HARD) is set, matching continues by
-testing any remaining alternatives. Only if no complete match can be found is
-PCRE_ERROR_PARTIAL returned instead of PCRE_ERROR_NOMATCH. In other words,
-PCRE_PARTIAL_SOFT says that the caller is prepared to handle a partial match,
-but only if no complete match can be found.
-</P>
-<P>
-If PCRE_PARTIAL_HARD is set, it overrides PCRE_PARTIAL_SOFT. In this case, if a
-partial match is found, <b>pcre_exec()</b> immediately returns
-PCRE_ERROR_PARTIAL, without considering any other alternatives. In other words,
-when PCRE_PARTIAL_HARD is set, a partial match is considered to be more
-important that an alternative complete match.
-</P>
-<P>
-In both cases, the portion of the string that was inspected when the partial
-match was found is set as the first matching string. There is a more detailed
-discussion of partial and multi-segment matching, with examples, in the
-<a href="pcrepartial.html"><b>pcrepartial</b></a>
-documentation.
-</P>
-<br><b>
-The string to be matched by <b>pcre_exec()</b>
-</b><br>
-<P>
-The subject string is passed to <b>pcre_exec()</b> as a pointer in
-<i>subject</i>, a length in <i>length</i>, and a starting offset in
-<i>startoffset</i>. The units for <i>length</i> and <i>startoffset</i> are bytes
-for the 8-bit library, 16-bit data items for the 16-bit library, and 32-bit
-data items for the 32-bit library.
-</P>
-<P>
-If <i>startoffset</i> is negative or greater than the length of the subject,
-<b>pcre_exec()</b> returns PCRE_ERROR_BADOFFSET. When the starting offset is
-zero, the search for a match starts at the beginning of the subject, and this
-is by far the most common case. In UTF-8 or UTF-16 mode, the offset must point
-to the start of a character, or the end of the subject (in UTF-32 mode, one
-data unit equals one character, so all offsets are valid). Unlike the pattern
-string, the subject may contain binary zeroes.
-</P>
-<P>
-A non-zero starting offset is useful when searching for another match in the
-same subject by calling <b>pcre_exec()</b> again after a previous success.
-Setting <i>startoffset</i> differs from just passing over a shortened string and
-setting PCRE_NOTBOL in the case of a pattern that begins with any kind of
-lookbehind. For example, consider the pattern
-<pre>
- \Biss\B
-</pre>
-which finds occurrences of "iss" in the middle of words. (\B matches only if
-the current position in the subject is not a word boundary.) When applied to
-the string "Mississipi" the first call to <b>pcre_exec()</b> finds the first
-occurrence. If <b>pcre_exec()</b> is called again with just the remainder of the
-subject, namely "issipi", it does not match, because \B is always false at the
-start of the subject, which is deemed to be a word boundary. However, if
-<b>pcre_exec()</b> is passed the entire string again, but with <i>startoffset</i>
-set to 4, it finds the second occurrence of "iss" because it is able to look
-behind the starting point to discover that it is preceded by a letter.
-</P>
-<P>
-Finding all the matches in a subject is tricky when the pattern can match an
-empty string. It is possible to emulate Perl's /g behaviour by first trying the
-match again at the same offset, with the PCRE_NOTEMPTY_ATSTART and
-PCRE_ANCHORED options, and then if that fails, advancing the starting offset
-and trying an ordinary match again. There is some code that demonstrates how to
-do this in the
-<a href="pcredemo.html"><b>pcredemo</b></a>
-sample program. In the most general case, you have to check to see if the
-newline convention recognizes CRLF as a newline, and if so, and the current
-character is CR followed by LF, advance the starting offset by two characters
-instead of one.
-</P>
-<P>
-If a non-zero starting offset is passed when the pattern is anchored, one
-attempt to match at the given offset is made. This can only succeed if the
-pattern does not require the match to be at the start of the subject.
-</P>
-<br><b>
-How <b>pcre_exec()</b> returns captured substrings
-</b><br>
-<P>
-In general, a pattern matches a certain portion of the subject, and in
-addition, further substrings from the subject may be picked out by parts of the
-pattern. Following the usage in Jeffrey Friedl's book, this is called
-"capturing" in what follows, and the phrase "capturing subpattern" is used for
-a fragment of a pattern that picks out a substring. PCRE supports several other
-kinds of parenthesized subpattern that do not cause substrings to be captured.
-</P>
-<P>
-Captured substrings are returned to the caller via a vector of integers whose
-address is passed in <i>ovector</i>. The number of elements in the vector is
-passed in <i>ovecsize</i>, which must be a non-negative number. <b>Note</b>: this
-argument is NOT the size of <i>ovector</i> in bytes.
-</P>
-<P>
-The first two-thirds of the vector is used to pass back captured substrings,
-each substring using a pair of integers. The remaining third of the vector is
-used as workspace by <b>pcre_exec()</b> while matching capturing subpatterns,
-and is not available for passing back information. The number passed in
-<i>ovecsize</i> should always be a multiple of three. If it is not, it is
-rounded down.
-</P>
-<P>
-When a match is successful, information about captured substrings is returned
-in pairs of integers, starting at the beginning of <i>ovector</i>, and
-continuing up to two-thirds of its length at the most. The first element of
-each pair is set to the offset of the first character in a substring, and the
-second is set to the offset of the first character after the end of a
-substring. These values are always data unit offsets, even in UTF mode. They
-are byte offsets in the 8-bit library, 16-bit data item offsets in the 16-bit
-library, and 32-bit data item offsets in the 32-bit library. <b>Note</b>: they
-are not character counts.
-</P>
-<P>
-The first pair of integers, <i>ovector[0]</i> and <i>ovector[1]</i>, identify the
-portion of the subject string matched by the entire pattern. The next pair is
-used for the first capturing subpattern, and so on. The value returned by
-<b>pcre_exec()</b> is one more than the highest numbered pair that has been set.
-For example, if two substrings have been captured, the returned value is 3. If
-there are no capturing subpatterns, the return value from a successful match is
-1, indicating that just the first pair of offsets has been set.
-</P>
-<P>
-If a capturing subpattern is matched repeatedly, it is the last portion of the
-string that it matched that is returned.
-</P>
-<P>
-If the vector is too small to hold all the captured substring offsets, it is
-used as far as possible (up to two-thirds of its length), and the function
-returns a value of zero. If neither the actual string matched nor any captured
-substrings are of interest, <b>pcre_exec()</b> may be called with <i>ovector</i>
-passed as NULL and <i>ovecsize</i> as zero. However, if the pattern contains
-back references and the <i>ovector</i> is not big enough to remember the related
-substrings, PCRE has to get additional memory for use during matching. Thus it
-is usually advisable to supply an <i>ovector</i> of reasonable size.
-</P>
-<P>
-There are some cases where zero is returned (indicating vector overflow) when
-in fact the vector is exactly the right size for the final match. For example,
-consider the pattern
-<pre>
- (a)(?:(b)c|bd)
-</pre>
-If a vector of 6 elements (allowing for only 1 captured substring) is given
-with subject string "abd", <b>pcre_exec()</b> will try to set the second
-captured string, thereby recording a vector overflow, before failing to match
-"c" and backing up to try the second alternative. The zero return, however,
-does correctly indicate that the maximum number of slots (namely 2) have been
-filled. In similar cases where there is temporary overflow, but the final
-number of used slots is actually less than the maximum, a non-zero value is
-returned.
-</P>
-<P>
-The <b>pcre_fullinfo()</b> function can be used to find out how many capturing
-subpatterns there are in a compiled pattern. The smallest size for
-<i>ovector</i> that will allow for <i>n</i> captured substrings, in addition to
-the offsets of the substring matched by the whole pattern, is (<i>n</i>+1)*3.
-</P>
-<P>
-It is possible for capturing subpattern number <i>n+1</i> to match some part of
-the subject when subpattern <i>n</i> has not been used at all. For example, if
-the string "abc" is matched against the pattern (a|(z))(bc) the return from the
-function is 4, and subpatterns 1 and 3 are matched, but 2 is not. When this
-happens, both values in the offset pairs corresponding to unused subpatterns
-are set to -1.
-</P>
-<P>
-Offset values that correspond to unused subpatterns at the end of the
-expression are also set to -1. For example, if the string "abc" is matched
-against the pattern (abc)(x(yz)?)? subpatterns 2 and 3 are not matched. The
-return from the function is 2, because the highest used capturing subpattern
-number is 1, and the offsets for for the second and third capturing subpatterns
-(assuming the vector is large enough, of course) are set to -1.
-</P>
-<P>
-<b>Note</b>: Elements in the first two-thirds of <i>ovector</i> that do not
-correspond to capturing parentheses in the pattern are never changed. That is,
-if a pattern contains <i>n</i> capturing parentheses, no more than
-<i>ovector[0]</i> to <i>ovector[2n+1]</i> are set by <b>pcre_exec()</b>. The other
-elements (in the first two-thirds) retain whatever values they previously had.
-</P>
-<P>
-Some convenience functions are provided for extracting the captured substrings
-as separate strings. These are described below.
-<a name="errorlist"></a></P>
-<br><b>
-Error return values from <b>pcre_exec()</b>
-</b><br>
-<P>
-If <b>pcre_exec()</b> fails, it returns a negative number. The following are
-defined in the header file:
-<pre>
- PCRE_ERROR_NOMATCH (-1)
-</pre>
-The subject string did not match the pattern.
-<pre>
- PCRE_ERROR_NULL (-2)
-</pre>
-Either <i>code</i> or <i>subject</i> was passed as NULL, or <i>ovector</i> was
-NULL and <i>ovecsize</i> was not zero.
-<pre>
- PCRE_ERROR_BADOPTION (-3)
-</pre>
-An unrecognized bit was set in the <i>options</i> argument.
-<pre>
- PCRE_ERROR_BADMAGIC (-4)
-</pre>
-PCRE stores a 4-byte "magic number" at the start of the compiled code, to catch
-the case when it is passed a junk pointer and to detect when a pattern that was
-compiled in an environment of one endianness is run in an environment with the
-other endianness. This is the error that PCRE gives when the magic number is
-not present.
-<pre>
- PCRE_ERROR_UNKNOWN_OPCODE (-5)
-</pre>
-While running the pattern match, an unknown item was encountered in the
-compiled pattern. This error could be caused by a bug in PCRE or by overwriting
-of the compiled pattern.
-<pre>
- PCRE_ERROR_NOMEMORY (-6)
-</pre>
-If a pattern contains back references, but the <i>ovector</i> that is passed to
-<b>pcre_exec()</b> is not big enough to remember the referenced substrings, PCRE
-gets a block of memory at the start of matching to use for this purpose. If the
-call via <b>pcre_malloc()</b> fails, this error is given. The memory is
-automatically freed at the end of matching.
-</P>
-<P>
-This error is also given if <b>pcre_stack_malloc()</b> fails in
-<b>pcre_exec()</b>. This can happen only when PCRE has been compiled with
-<b>--disable-stack-for-recursion</b>.
-<pre>
- PCRE_ERROR_NOSUBSTRING (-7)
-</pre>
-This error is used by the <b>pcre_copy_substring()</b>,
-<b>pcre_get_substring()</b>, and <b>pcre_get_substring_list()</b> functions (see
-below). It is never returned by <b>pcre_exec()</b>.
-<pre>
- PCRE_ERROR_MATCHLIMIT (-8)
-</pre>
-The backtracking limit, as specified by the <i>match_limit</i> field in a
-<b>pcre_extra</b> structure (or defaulted) was reached. See the description
-above.
-<pre>
- PCRE_ERROR_CALLOUT (-9)
-</pre>
-This error is never generated by <b>pcre_exec()</b> itself. It is provided for
-use by callout functions that want to yield a distinctive error code. See the
-<a href="pcrecallout.html"><b>pcrecallout</b></a>
-documentation for details.
-<pre>
- PCRE_ERROR_BADUTF8 (-10)
-</pre>
-A string that contains an invalid UTF-8 byte sequence was passed as a subject,
-and the PCRE_NO_UTF8_CHECK option was not set. If the size of the output vector
-(<i>ovecsize</i>) is at least 2, the byte offset to the start of the the invalid
-UTF-8 character is placed in the first element, and a reason code is placed in
-the second element. The reason codes are listed in the
-<a href="#badutf8reasons">following section.</a>
-For backward compatibility, if PCRE_PARTIAL_HARD is set and the problem is a
-truncated UTF-8 character at the end of the subject (reason codes 1 to 5),
-PCRE_ERROR_SHORTUTF8 is returned instead of PCRE_ERROR_BADUTF8.
-<pre>
- PCRE_ERROR_BADUTF8_OFFSET (-11)
-</pre>
-The UTF-8 byte sequence that was passed as a subject was checked and found to
-be valid (the PCRE_NO_UTF8_CHECK option was not set), but the value of
-<i>startoffset</i> did not point to the beginning of a UTF-8 character or the
-end of the subject.
-<pre>
- PCRE_ERROR_PARTIAL (-12)
-</pre>
-The subject string did not match, but it did match partially. See the
-<a href="pcrepartial.html"><b>pcrepartial</b></a>
-documentation for details of partial matching.
-<pre>
- PCRE_ERROR_BADPARTIAL (-13)
-</pre>
-This code is no longer in use. It was formerly returned when the PCRE_PARTIAL
-option was used with a compiled pattern containing items that were not
-supported for partial matching. From release 8.00 onwards, there are no
-restrictions on partial matching.
-<pre>
- PCRE_ERROR_INTERNAL (-14)
-</pre>
-An unexpected internal error has occurred. This error could be caused by a bug
-in PCRE or by overwriting of the compiled pattern.
-<pre>
- PCRE_ERROR_BADCOUNT (-15)
-</pre>
-This error is given if the value of the <i>ovecsize</i> argument is negative.
-<pre>
- PCRE_ERROR_RECURSIONLIMIT (-21)
-</pre>
-The internal recursion limit, as specified by the <i>match_limit_recursion</i>
-field in a <b>pcre_extra</b> structure (or defaulted) was reached. See the
-description above.
-<pre>
- PCRE_ERROR_BADNEWLINE (-23)
-</pre>
-An invalid combination of PCRE_NEWLINE_<i>xxx</i> options was given.
-<pre>
- PCRE_ERROR_BADOFFSET (-24)
-</pre>
-The value of <i>startoffset</i> was negative or greater than the length of the
-subject, that is, the value in <i>length</i>.
-<pre>
- PCRE_ERROR_SHORTUTF8 (-25)
-</pre>
-This error is returned instead of PCRE_ERROR_BADUTF8 when the subject string
-ends with a truncated UTF-8 character and the PCRE_PARTIAL_HARD option is set.
-Information about the failure is returned as for PCRE_ERROR_BADUTF8. It is in
-fact sufficient to detect this case, but this special error code for
-PCRE_PARTIAL_HARD precedes the implementation of returned information; it is
-retained for backwards compatibility.
-<pre>
- PCRE_ERROR_RECURSELOOP (-26)
-</pre>
-This error is returned when <b>pcre_exec()</b> detects a recursion loop within
-the pattern. Specifically, it means that either the whole pattern or a
-subpattern has been called recursively for the second time at the same position
-in the subject string. Some simple patterns that might do this are detected and
-faulted at compile time, but more complicated cases, in particular mutual
-recursions between two different subpatterns, cannot be detected until run
-time.
-<pre>
- PCRE_ERROR_JIT_STACKLIMIT (-27)
-</pre>
-This error is returned when a pattern that was successfully studied using a
-JIT compile option is being matched, but the memory available for the
-just-in-time processing stack is not large enough. See the
-<a href="pcrejit.html"><b>pcrejit</b></a>
-documentation for more details.
-<pre>
- PCRE_ERROR_BADMODE (-28)
-</pre>
-This error is given if a pattern that was compiled by the 8-bit library is
-passed to a 16-bit or 32-bit library function, or vice versa.
-<pre>
- PCRE_ERROR_BADENDIANNESS (-29)
-</pre>
-This error is given if a pattern that was compiled and saved is reloaded on a
-host with different endianness. The utility function
-<b>pcre_pattern_to_host_byte_order()</b> can be used to convert such a pattern
-so that it runs on the new host.
-<pre>
- PCRE_ERROR_JIT_BADOPTION
-</pre>
-This error is returned when a pattern that was successfully studied using a JIT
-compile option is being matched, but the matching mode (partial or complete
-match) does not correspond to any JIT compilation mode. When the JIT fast path
-function is used, this error may be also given for invalid options. See the
-<a href="pcrejit.html"><b>pcrejit</b></a>
-documentation for more details.
-<pre>
- PCRE_ERROR_BADLENGTH (-32)
-</pre>
-This error is given if <b>pcre_exec()</b> is called with a negative value for
-the <i>length</i> argument.
-</P>
-<P>
-Error numbers -16 to -20, -22, and 30 are not used by <b>pcre_exec()</b>.
-<a name="badutf8reasons"></a></P>
-<br><b>
-Reason codes for invalid UTF-8 strings
-</b><br>
-<P>
-This section applies only to the 8-bit library. The corresponding information
-for the 16-bit and 32-bit libraries is given in the
-<a href="pcre16.html"><b>pcre16</b></a>
-and
-<a href="pcre32.html"><b>pcre32</b></a>
-pages.
-</P>
-<P>
-When <b>pcre_exec()</b> returns either PCRE_ERROR_BADUTF8 or
-PCRE_ERROR_SHORTUTF8, and the size of the output vector (<i>ovecsize</i>) is at
-least 2, the offset of the start of the invalid UTF-8 character is placed in
-the first output vector element (<i>ovector[0]</i>) and a reason code is placed
-in the second element (<i>ovector[1]</i>). The reason codes are given names in
-the <b>pcre.h</b> header file:
-<pre>
- PCRE_UTF8_ERR1
- PCRE_UTF8_ERR2
- PCRE_UTF8_ERR3
- PCRE_UTF8_ERR4
- PCRE_UTF8_ERR5
-</pre>
-The string ends with a truncated UTF-8 character; the code specifies how many
-bytes are missing (1 to 5). Although RFC 3629 restricts UTF-8 characters to be
-no longer than 4 bytes, the encoding scheme (originally defined by RFC 2279)
-allows for up to 6 bytes, and this is checked first; hence the possibility of
-4 or 5 missing bytes.
-<pre>
- PCRE_UTF8_ERR6
- PCRE_UTF8_ERR7
- PCRE_UTF8_ERR8
- PCRE_UTF8_ERR9
- PCRE_UTF8_ERR10
-</pre>
-The two most significant bits of the 2nd, 3rd, 4th, 5th, or 6th byte of the
-character do not have the binary value 0b10 (that is, either the most
-significant bit is 0, or the next bit is 1).
-<pre>
- PCRE_UTF8_ERR11
- PCRE_UTF8_ERR12
-</pre>
-A character that is valid by the RFC 2279 rules is either 5 or 6 bytes long;
-these code points are excluded by RFC 3629.
-<pre>
- PCRE_UTF8_ERR13
-</pre>
-A 4-byte character has a value greater than 0x10fff; these code points are
-excluded by RFC 3629.
-<pre>
- PCRE_UTF8_ERR14
-</pre>
-A 3-byte character has a value in the range 0xd800 to 0xdfff; this range of
-code points are reserved by RFC 3629 for use with UTF-16, and so are excluded
-from UTF-8.
-<pre>
- PCRE_UTF8_ERR15
- PCRE_UTF8_ERR16
- PCRE_UTF8_ERR17
- PCRE_UTF8_ERR18
- PCRE_UTF8_ERR19
-</pre>
-A 2-, 3-, 4-, 5-, or 6-byte character is "overlong", that is, it codes for a
-value that can be represented by fewer bytes, which is invalid. For example,
-the two bytes 0xc0, 0xae give the value 0x2e, whose correct coding uses just
-one byte.
-<pre>
- PCRE_UTF8_ERR20
-</pre>
-The two most significant bits of the first byte of a character have the binary
-value 0b10 (that is, the most significant bit is 1 and the second is 0). Such a
-byte can only validly occur as the second or subsequent byte of a multi-byte
-character.
-<pre>
- PCRE_UTF8_ERR21
-</pre>
-The first byte of a character has the value 0xfe or 0xff. These values can
-never occur in a valid UTF-8 string.
-<pre>
- PCRE_UTF8_ERR22
-</pre>
-This error code was formerly used when the presence of a so-called
-"non-character" caused an error. Unicode corrigendum #9 makes it clear that
-such characters should not cause a string to be rejected, and so this code is
-no longer in use and is never returned.
-</P>
-<br><a name="SEC18" href="#TOC1">EXTRACTING CAPTURED SUBSTRINGS BY NUMBER</a><br>
-<P>
-<b>int pcre_copy_substring(const char *<i>subject</i>, int *<i>ovector</i>,</b>
-<b> int <i>stringcount</i>, int <i>stringnumber</i>, char *<i>buffer</i>,</b>
-<b> int <i>buffersize</i>);</b>
-<br>
-<br>
-<b>int pcre_get_substring(const char *<i>subject</i>, int *<i>ovector</i>,</b>
-<b> int <i>stringcount</i>, int <i>stringnumber</i>,</b>
-<b> const char **<i>stringptr</i>);</b>
-<br>
-<br>
-<b>int pcre_get_substring_list(const char *<i>subject</i>,</b>
-<b> int *<i>ovector</i>, int <i>stringcount</i>, const char ***<i>listptr</i>);</b>
-</P>
-<P>
-Captured substrings can be accessed directly by using the offsets returned by
-<b>pcre_exec()</b> in <i>ovector</i>. For convenience, the functions
-<b>pcre_copy_substring()</b>, <b>pcre_get_substring()</b>, and
-<b>pcre_get_substring_list()</b> are provided for extracting captured substrings
-as new, separate, zero-terminated strings. These functions identify substrings
-by number. The next section describes functions for extracting named
-substrings.
-</P>
-<P>
-A substring that contains a binary zero is correctly extracted and has a
-further zero added on the end, but the result is not, of course, a C string.
-However, you can process such a string by referring to the length that is
-returned by <b>pcre_copy_substring()</b> and <b>pcre_get_substring()</b>.
-Unfortunately, the interface to <b>pcre_get_substring_list()</b> is not adequate
-for handling strings containing binary zeros, because the end of the final
-string is not independently indicated.
-</P>
-<P>
-The first three arguments are the same for all three of these functions:
-<i>subject</i> is the subject string that has just been successfully matched,
-<i>ovector</i> is a pointer to the vector of integer offsets that was passed to
-<b>pcre_exec()</b>, and <i>stringcount</i> is the number of substrings that were
-captured by the match, including the substring that matched the entire regular
-expression. This is the value returned by <b>pcre_exec()</b> if it is greater
-than zero. If <b>pcre_exec()</b> returned zero, indicating that it ran out of
-space in <i>ovector</i>, the value passed as <i>stringcount</i> should be the
-number of elements in the vector divided by three.
-</P>
-<P>
-The functions <b>pcre_copy_substring()</b> and <b>pcre_get_substring()</b>
-extract a single substring, whose number is given as <i>stringnumber</i>. A
-value of zero extracts the substring that matched the entire pattern, whereas
-higher values extract the captured substrings. For <b>pcre_copy_substring()</b>,
-the string is placed in <i>buffer</i>, whose length is given by
-<i>buffersize</i>, while for <b>pcre_get_substring()</b> a new block of memory is
-obtained via <b>pcre_malloc</b>, and its address is returned via
-<i>stringptr</i>. The yield of the function is the length of the string, not
-including the terminating zero, or one of these error codes:
-<pre>
- PCRE_ERROR_NOMEMORY (-6)
-</pre>
-The buffer was too small for <b>pcre_copy_substring()</b>, or the attempt to get
-memory failed for <b>pcre_get_substring()</b>.
-<pre>
- PCRE_ERROR_NOSUBSTRING (-7)
-</pre>
-There is no substring whose number is <i>stringnumber</i>.
-</P>
-<P>
-The <b>pcre_get_substring_list()</b> function extracts all available substrings
-and builds a list of pointers to them. All this is done in a single block of
-memory that is obtained via <b>pcre_malloc</b>. The address of the memory block
-is returned via <i>listptr</i>, which is also the start of the list of string
-pointers. The end of the list is marked by a NULL pointer. The yield of the
-function is zero if all went well, or the error code
-<pre>
- PCRE_ERROR_NOMEMORY (-6)
-</pre>
-if the attempt to get the memory block failed.
-</P>
-<P>
-When any of these functions encounter a substring that is unset, which can
-happen when capturing subpattern number <i>n+1</i> matches some part of the
-subject, but subpattern <i>n</i> has not been used at all, they return an empty
-string. This can be distinguished from a genuine zero-length substring by
-inspecting the appropriate offset in <i>ovector</i>, which is negative for unset
-substrings.
-</P>
-<P>
-The two convenience functions <b>pcre_free_substring()</b> and
-<b>pcre_free_substring_list()</b> can be used to free the memory returned by
-a previous call of <b>pcre_get_substring()</b> or
-<b>pcre_get_substring_list()</b>, respectively. They do nothing more than call
-the function pointed to by <b>pcre_free</b>, which of course could be called
-directly from a C program. However, PCRE is used in some situations where it is
-linked via a special interface to another programming language that cannot use
-<b>pcre_free</b> directly; it is for these cases that the functions are
-provided.
-</P>
-<br><a name="SEC19" href="#TOC1">EXTRACTING CAPTURED SUBSTRINGS BY NAME</a><br>
-<P>
-<b>int pcre_get_stringnumber(const pcre *<i>code</i>,</b>
-<b> const char *<i>name</i>);</b>
-<br>
-<br>
-<b>int pcre_copy_named_substring(const pcre *<i>code</i>,</b>
-<b> const char *<i>subject</i>, int *<i>ovector</i>,</b>
-<b> int <i>stringcount</i>, const char *<i>stringname</i>,</b>
-<b> char *<i>buffer</i>, int <i>buffersize</i>);</b>
-<br>
-<br>
-<b>int pcre_get_named_substring(const pcre *<i>code</i>,</b>
-<b> const char *<i>subject</i>, int *<i>ovector</i>,</b>
-<b> int <i>stringcount</i>, const char *<i>stringname</i>,</b>
-<b> const char **<i>stringptr</i>);</b>
-</P>
-<P>
-To extract a substring by name, you first have to find associated number.
-For example, for this pattern
-<pre>
- (a+)b(?&#60;xxx&#62;\d+)...
-</pre>
-the number of the subpattern called "xxx" is 2. If the name is known to be
-unique (PCRE_DUPNAMES was not set), you can find the number from the name by
-calling <b>pcre_get_stringnumber()</b>. The first argument is the compiled
-pattern, and the second is the name. The yield of the function is the
-subpattern number, or PCRE_ERROR_NOSUBSTRING (-7) if there is no subpattern of
-that name.
-</P>
-<P>
-Given the number, you can extract the substring directly, or use one of the
-functions described in the previous section. For convenience, there are also
-two functions that do the whole job.
-</P>
-<P>
-Most of the arguments of <b>pcre_copy_named_substring()</b> and
-<b>pcre_get_named_substring()</b> are the same as those for the similarly named
-functions that extract by number. As these are described in the previous
-section, they are not re-described here. There are just two differences:
-</P>
-<P>
-First, instead of a substring number, a substring name is given. Second, there
-is an extra argument, given at the start, which is a pointer to the compiled
-pattern. This is needed in order to gain access to the name-to-number
-translation table.
-</P>
-<P>
-These functions call <b>pcre_get_stringnumber()</b>, and if it succeeds, they
-then call <b>pcre_copy_substring()</b> or <b>pcre_get_substring()</b>, as
-appropriate. <b>NOTE:</b> If PCRE_DUPNAMES is set and there are duplicate names,
-the behaviour may not be what you want (see the next section).
-</P>
-<P>
-<b>Warning:</b> If the pattern uses the (?| feature to set up multiple
-subpatterns with the same number, as described in the
-<a href="pcrepattern.html#dupsubpatternnumber">section on duplicate subpattern numbers</a>
-in the
-<a href="pcrepattern.html"><b>pcrepattern</b></a>
-page, you cannot use names to distinguish the different subpatterns, because
-names are not included in the compiled code. The matching process uses only
-numbers. For this reason, the use of different names for subpatterns of the
-same number causes an error at compile time.
-</P>
-<br><a name="SEC20" href="#TOC1">DUPLICATE SUBPATTERN NAMES</a><br>
-<P>
-<b>int pcre_get_stringtable_entries(const pcre *<i>code</i>,</b>
-<b> const char *<i>name</i>, char **<i>first</i>, char **<i>last</i>);</b>
-</P>
-<P>
-When a pattern is compiled with the PCRE_DUPNAMES option, names for subpatterns
-are not required to be unique. (Duplicate names are always allowed for
-subpatterns with the same number, created by using the (?| feature. Indeed, if
-such subpatterns are named, they are required to use the same names.)
-</P>
-<P>
-Normally, patterns with duplicate names are such that in any one match, only
-one of the named subpatterns participates. An example is shown in the
-<a href="pcrepattern.html"><b>pcrepattern</b></a>
-documentation.
-</P>
-<P>
-When duplicates are present, <b>pcre_copy_named_substring()</b> and
-<b>pcre_get_named_substring()</b> return the first substring corresponding to
-the given name that is set. If none are set, PCRE_ERROR_NOSUBSTRING (-7) is
-returned; no data is returned. The <b>pcre_get_stringnumber()</b> function
-returns one of the numbers that are associated with the name, but it is not
-defined which it is.
-</P>
-<P>
-If you want to get full details of all captured substrings for a given name,
-you must use the <b>pcre_get_stringtable_entries()</b> function. The first
-argument is the compiled pattern, and the second is the name. The third and
-fourth are pointers to variables which are updated by the function. After it
-has run, they point to the first and last entries in the name-to-number table
-for the given name. The function itself returns the length of each entry, or
-PCRE_ERROR_NOSUBSTRING (-7) if there are none. The format of the table is
-described above in the section entitled <i>Information about a pattern</i>
-<a href="#infoaboutpattern">above.</a>
-Given all the relevant entries for the name, you can extract each of their
-numbers, and hence the captured data, if any.
-</P>
-<br><a name="SEC21" href="#TOC1">FINDING ALL POSSIBLE MATCHES</a><br>
-<P>
-The traditional matching function uses a similar algorithm to Perl, which stops
-when it finds the first match, starting at a given point in the subject. If you
-want to find all possible matches, or the longest possible match, consider
-using the alternative matching function (see below) instead. If you cannot use
-the alternative function, but still need to find all possible matches, you
-can kludge it up by making use of the callout facility, which is described in
-the
-<a href="pcrecallout.html"><b>pcrecallout</b></a>
-documentation.
-</P>
-<P>
-What you have to do is to insert a callout right at the end of the pattern.
-When your callout function is called, extract and save the current matched
-substring. Then return 1, which forces <b>pcre_exec()</b> to backtrack and try
-other alternatives. Ultimately, when it runs out of matches, <b>pcre_exec()</b>
-will yield PCRE_ERROR_NOMATCH.
-</P>
-<br><a name="SEC22" href="#TOC1">OBTAINING AN ESTIMATE OF STACK USAGE</a><br>
-<P>
-Matching certain patterns using <b>pcre_exec()</b> can use a lot of process
-stack, which in certain environments can be rather limited in size. Some users
-find it helpful to have an estimate of the amount of stack that is used by
-<b>pcre_exec()</b>, to help them set recursion limits, as described in the
-<a href="pcrestack.html"><b>pcrestack</b></a>
-documentation. The estimate that is output by <b>pcretest</b> when called with
-the <b>-m</b> and <b>-C</b> options is obtained by calling <b>pcre_exec</b> with
-the values NULL, NULL, NULL, -999, and -999 for its first five arguments.
-</P>
-<P>
-Normally, if its first argument is NULL, <b>pcre_exec()</b> immediately returns
-the negative error code PCRE_ERROR_NULL, but with this special combination of
-arguments, it returns instead a negative number whose absolute value is the
-approximate stack frame size in bytes. (A negative number is used so that it is
-clear that no match has happened.) The value is approximate because in some
-cases, recursive calls to <b>pcre_exec()</b> occur when there are one or two
-additional variables on the stack.
-</P>
-<P>
-If PCRE has been compiled to use the heap instead of the stack for recursion,
-the value returned is the size of each block that is obtained from the heap.
-<a name="dfamatch"></a></P>
-<br><a name="SEC23" href="#TOC1">MATCHING A PATTERN: THE ALTERNATIVE FUNCTION</a><br>
-<P>
-<b>int pcre_dfa_exec(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
-<b> const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
-<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
-<b> int *<i>workspace</i>, int <i>wscount</i>);</b>
-</P>
-<P>
-The function <b>pcre_dfa_exec()</b> is called to match a subject string against
-a compiled pattern, using a matching algorithm that scans the subject string
-just once, and does not backtrack. This has different characteristics to the
-normal algorithm, and is not compatible with Perl. Some of the features of PCRE
-patterns are not supported. Nevertheless, there are times when this kind of
-matching can be useful. For a discussion of the two matching algorithms, and a
-list of features that <b>pcre_dfa_exec()</b> does not support, see the
-<a href="pcrematching.html"><b>pcrematching</b></a>
-documentation.
-</P>
-<P>
-The arguments for the <b>pcre_dfa_exec()</b> function are the same as for
-<b>pcre_exec()</b>, plus two extras. The <i>ovector</i> argument is used in a
-different way, and this is described below. The other common arguments are used
-in the same way as for <b>pcre_exec()</b>, so their description is not repeated
-here.
-</P>
-<P>
-The two additional arguments provide workspace for the function. The workspace
-vector should contain at least 20 elements. It is used for keeping track of
-multiple paths through the pattern tree. More workspace will be needed for
-patterns and subjects where there are a lot of potential matches.
-</P>
-<P>
-Here is an example of a simple call to <b>pcre_dfa_exec()</b>:
-<pre>
- int rc;
- int ovector[10];
- int wspace[20];
- rc = pcre_dfa_exec(
- re, /* result of pcre_compile() */
- NULL, /* we didn't study the pattern */
- "some string", /* the subject string */
- 11, /* the length of the subject string */
- 0, /* start at offset 0 in the subject */
- 0, /* default options */
- ovector, /* vector of integers for substring information */
- 10, /* number of elements (NOT size in bytes) */
- wspace, /* working space vector */
- 20); /* number of elements (NOT size in bytes) */
-</PRE>
-</P>
-<br><b>
-Option bits for <b>pcre_dfa_exec()</b>
-</b><br>
-<P>
-The unused bits of the <i>options</i> argument for <b>pcre_dfa_exec()</b> must be
-zero. The only bits that may be set are PCRE_ANCHORED, PCRE_NEWLINE_<i>xxx</i>,
-PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NOTEMPTY_ATSTART,
-PCRE_NO_UTF8_CHECK, PCRE_BSR_ANYCRLF, PCRE_BSR_UNICODE, PCRE_NO_START_OPTIMIZE,
-PCRE_PARTIAL_HARD, PCRE_PARTIAL_SOFT, PCRE_DFA_SHORTEST, and PCRE_DFA_RESTART.
-All but the last four of these are exactly the same as for <b>pcre_exec()</b>,
-so their description is not repeated here.
-<pre>
- PCRE_PARTIAL_HARD
- PCRE_PARTIAL_SOFT
-</pre>
-These have the same general effect as they do for <b>pcre_exec()</b>, but the
-details are slightly different. When PCRE_PARTIAL_HARD is set for
-<b>pcre_dfa_exec()</b>, it returns PCRE_ERROR_PARTIAL if the end of the subject
-is reached and there is still at least one matching possibility that requires
-additional characters. This happens even if some complete matches have also
-been found. When PCRE_PARTIAL_SOFT is set, the return code PCRE_ERROR_NOMATCH
-is converted into PCRE_ERROR_PARTIAL if the end of the subject is reached,
-there have been no complete matches, but there is still at least one matching
-possibility. The portion of the string that was inspected when the longest
-partial match was found is set as the first matching string in both cases.
-There is a more detailed discussion of partial and multi-segment matching, with
-examples, in the
-<a href="pcrepartial.html"><b>pcrepartial</b></a>
-documentation.
-<pre>
- PCRE_DFA_SHORTEST
-</pre>
-Setting the PCRE_DFA_SHORTEST option causes the matching algorithm to stop as
-soon as it has found one match. Because of the way the alternative algorithm
-works, this is necessarily the shortest possible match at the first possible
-matching point in the subject string.
-<pre>
- PCRE_DFA_RESTART
-</pre>
-When <b>pcre_dfa_exec()</b> returns a partial match, it is possible to call it
-again, with additional subject characters, and have it continue with the same
-match. The PCRE_DFA_RESTART option requests this action; when it is set, the
-<i>workspace</i> and <i>wscount</i> options must reference the same vector as
-before because data about the match so far is left in them after a partial
-match. There is more discussion of this facility in the
-<a href="pcrepartial.html"><b>pcrepartial</b></a>
-documentation.
-</P>
-<br><b>
-Successful returns from <b>pcre_dfa_exec()</b>
-</b><br>
-<P>
-When <b>pcre_dfa_exec()</b> succeeds, it may have matched more than one
-substring in the subject. Note, however, that all the matches from one run of
-the function start at the same point in the subject. The shorter matches are
-all initial substrings of the longer matches. For example, if the pattern
-<pre>
- &#60;.*&#62;
-</pre>
-is matched against the string
-<pre>
- This is &#60;something&#62; &#60;something else&#62; &#60;something further&#62; no more
-</pre>
-the three matched strings are
-<pre>
- &#60;something&#62;
- &#60;something&#62; &#60;something else&#62;
- &#60;something&#62; &#60;something else&#62; &#60;something further&#62;
-</pre>
-On success, the yield of the function is a number greater than zero, which is
-the number of matched substrings. The substrings themselves are returned in
-<i>ovector</i>. Each string uses two elements; the first is the offset to the
-start, and the second is the offset to the end. In fact, all the strings have
-the same start offset. (Space could have been saved by giving this only once,
-but it was decided to retain some compatibility with the way <b>pcre_exec()</b>
-returns data, even though the meaning of the strings is different.)
-</P>
-<P>
-The strings are returned in reverse order of length; that is, the longest
-matching string is given first. If there were too many matches to fit into
-<i>ovector</i>, the yield of the function is zero, and the vector is filled with
-the longest matches. Unlike <b>pcre_exec()</b>, <b>pcre_dfa_exec()</b> can use
-the entire <i>ovector</i> for returning matched strings.
-</P>
-<P>
-NOTE: PCRE's "auto-possessification" optimization usually applies to character
-repeats at the end of a pattern (as well as internally). For example, the
-pattern "a\d+" is compiled as if it were "a\d++" because there is no point
-even considering the possibility of backtracking into the repeated digits. For
-DFA matching, this means that only one possible match is found. If you really
-do want multiple matches in such cases, either use an ungreedy repeat
-("a\d+?") or set the PCRE_NO_AUTO_POSSESS option when compiling.
-</P>
-<br><b>
-Error returns from <b>pcre_dfa_exec()</b>
-</b><br>
-<P>
-The <b>pcre_dfa_exec()</b> function returns a negative number when it fails.
-Many of the errors are the same as for <b>pcre_exec()</b>, and these are
-described
-<a href="#errorlist">above.</a>
-There are in addition the following errors that are specific to
-<b>pcre_dfa_exec()</b>:
-<pre>
- PCRE_ERROR_DFA_UITEM (-16)
-</pre>
-This return is given if <b>pcre_dfa_exec()</b> encounters an item in the pattern
-that it does not support, for instance, the use of \C or a back reference.
-<pre>
- PCRE_ERROR_DFA_UCOND (-17)
-</pre>
-This return is given if <b>pcre_dfa_exec()</b> encounters a condition item that
-uses a back reference for the condition, or a test for recursion in a specific
-group. These are not supported.
-<pre>
- PCRE_ERROR_DFA_UMLIMIT (-18)
-</pre>
-This return is given if <b>pcre_dfa_exec()</b> is called with an <i>extra</i>
-block that contains a setting of the <i>match_limit</i> or
-<i>match_limit_recursion</i> fields. This is not supported (these fields are
-meaningless for DFA matching).
-<pre>
- PCRE_ERROR_DFA_WSSIZE (-19)
-</pre>
-This return is given if <b>pcre_dfa_exec()</b> runs out of space in the
-<i>workspace</i> vector.
-<pre>
- PCRE_ERROR_DFA_RECURSE (-20)
-</pre>
-When a recursive subpattern is processed, the matching function calls itself
-recursively, using private vectors for <i>ovector</i> and <i>workspace</i>. This
-error is given if the output vector is not large enough. This should be
-extremely rare, as a vector of size 1000 is used.
-<pre>
- PCRE_ERROR_DFA_BADRESTART (-30)
-</pre>
-When <b>pcre_dfa_exec()</b> is called with the <b>PCRE_DFA_RESTART</b> option,
-some plausibility checks are made on the contents of the workspace, which
-should contain data about the previous partial match. If any of these checks
-fail, this error is given.
-</P>
-<br><a name="SEC24" href="#TOC1">SEE ALSO</a><br>
-<P>
-<b>pcre16</b>(3), <b>pcre32</b>(3), <b>pcrebuild</b>(3), <b>pcrecallout</b>(3),
-<b>pcrecpp(3)</b>(3), <b>pcrematching</b>(3), <b>pcrepartial</b>(3),
-<b>pcreposix</b>(3), <b>pcreprecompile</b>(3), <b>pcresample</b>(3),
-<b>pcrestack</b>(3).
-</P>
-<br><a name="SEC25" href="#TOC1">AUTHOR</a><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><a name="SEC26" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 18 December 2015
-<br>
-Copyright &copy; 1997-2015 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcrebuild.html b/libs/Pcre16/docs/doc/html/pcrebuild.html
deleted file mode 100644
index 03c8cbe0b2..0000000000
--- a/libs/Pcre16/docs/doc/html/pcrebuild.html
+++ /dev/null
@@ -1,534 +0,0 @@
-<html>
-<head>
-<title>pcrebuild specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcrebuild man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">BUILDING PCRE</a>
-<li><a name="TOC2" href="#SEC2">PCRE BUILD-TIME OPTIONS</a>
-<li><a name="TOC3" href="#SEC3">BUILDING 8-BIT, 16-BIT AND 32-BIT LIBRARIES</a>
-<li><a name="TOC4" href="#SEC4">BUILDING SHARED AND STATIC LIBRARIES</a>
-<li><a name="TOC5" href="#SEC5">C++ SUPPORT</a>
-<li><a name="TOC6" href="#SEC6">UTF-8, UTF-16 AND UTF-32 SUPPORT</a>
-<li><a name="TOC7" href="#SEC7">UNICODE CHARACTER PROPERTY SUPPORT</a>
-<li><a name="TOC8" href="#SEC8">JUST-IN-TIME COMPILER SUPPORT</a>
-<li><a name="TOC9" href="#SEC9">CODE VALUE OF NEWLINE</a>
-<li><a name="TOC10" href="#SEC10">WHAT \R MATCHES</a>
-<li><a name="TOC11" href="#SEC11">POSIX MALLOC USAGE</a>
-<li><a name="TOC12" href="#SEC12">HANDLING VERY LARGE PATTERNS</a>
-<li><a name="TOC13" href="#SEC13">AVOIDING EXCESSIVE STACK USAGE</a>
-<li><a name="TOC14" href="#SEC14">LIMITING PCRE RESOURCE USAGE</a>
-<li><a name="TOC15" href="#SEC15">CREATING CHARACTER TABLES AT BUILD TIME</a>
-<li><a name="TOC16" href="#SEC16">USING EBCDIC CODE</a>
-<li><a name="TOC17" href="#SEC17">PCREGREP OPTIONS FOR COMPRESSED FILE SUPPORT</a>
-<li><a name="TOC18" href="#SEC18">PCREGREP BUFFER SIZE</a>
-<li><a name="TOC19" href="#SEC19">PCRETEST OPTION FOR LIBREADLINE SUPPORT</a>
-<li><a name="TOC20" href="#SEC20">DEBUGGING WITH VALGRIND SUPPORT</a>
-<li><a name="TOC21" href="#SEC21">CODE COVERAGE REPORTING</a>
-<li><a name="TOC22" href="#SEC22">SEE ALSO</a>
-<li><a name="TOC23" href="#SEC23">AUTHOR</a>
-<li><a name="TOC24" href="#SEC24">REVISION</a>
-</ul>
-<br><a name="SEC1" href="#TOC1">BUILDING PCRE</a><br>
-<P>
-PCRE is distributed with a <b>configure</b> script that can be used to build the
-library in Unix-like environments using the applications known as Autotools.
-Also in the distribution are files to support building using <b>CMake</b>
-instead of <b>configure</b>. The text file
-<a href="README.txt"><b>README</b></a>
-contains general information about building with Autotools (some of which is
-repeated below), and also has some comments about building on various operating
-systems. There is a lot more information about building PCRE without using
-Autotools (including information about using <b>CMake</b> and building "by
-hand") in the text file called
-<a href="NON-AUTOTOOLS-BUILD.txt"><b>NON-AUTOTOOLS-BUILD</b>.</a>
-You should consult this file as well as the
-<a href="README.txt"><b>README</b></a>
-file if you are building in a non-Unix-like environment.
-</P>
-<br><a name="SEC2" href="#TOC1">PCRE BUILD-TIME OPTIONS</a><br>
-<P>
-The rest of this document describes the optional features of PCRE that can be
-selected when the library is compiled. It assumes use of the <b>configure</b>
-script, where the optional features are selected or deselected by providing
-options to <b>configure</b> before running the <b>make</b> command. However, the
-same options can be selected in both Unix-like and non-Unix-like environments
-using the GUI facility of <b>cmake-gui</b> if you are using <b>CMake</b> instead
-of <b>configure</b> to build PCRE.
-</P>
-<P>
-If you are not using Autotools or <b>CMake</b>, option selection can be done by
-editing the <b>config.h</b> file, or by passing parameter settings to the
-compiler, as described in
-<a href="NON-AUTOTOOLS-BUILD.txt"><b>NON-AUTOTOOLS-BUILD</b>.</a>
-</P>
-<P>
-The complete list of options for <b>configure</b> (which includes the standard
-ones such as the selection of the installation directory) can be obtained by
-running
-<pre>
- ./configure --help
-</pre>
-The following sections include descriptions of options whose names begin with
---enable or --disable. These settings specify changes to the defaults for the
-<b>configure</b> command. Because of the way that <b>configure</b> works,
---enable and --disable always come in pairs, so the complementary option always
-exists as well, but as it specifies the default, it is not described.
-</P>
-<br><a name="SEC3" href="#TOC1">BUILDING 8-BIT, 16-BIT AND 32-BIT LIBRARIES</a><br>
-<P>
-By default, a library called <b>libpcre</b> is built, containing functions that
-take string arguments contained in vectors of bytes, either as single-byte
-characters, or interpreted as UTF-8 strings. You can also build a separate
-library, called <b>libpcre16</b>, in which strings are contained in vectors of
-16-bit data units and interpreted either as single-unit characters or UTF-16
-strings, by adding
-<pre>
- --enable-pcre16
-</pre>
-to the <b>configure</b> command. You can also build yet another separate
-library, called <b>libpcre32</b>, in which strings are contained in vectors of
-32-bit data units and interpreted either as single-unit characters or UTF-32
-strings, by adding
-<pre>
- --enable-pcre32
-</pre>
-to the <b>configure</b> command. If you do not want the 8-bit library, add
-<pre>
- --disable-pcre8
-</pre>
-as well. At least one of the three libraries must be built. Note that the C++
-and POSIX wrappers are for the 8-bit library only, and that <b>pcregrep</b> is
-an 8-bit program. None of these are built if you select only the 16-bit or
-32-bit libraries.
-</P>
-<br><a name="SEC4" href="#TOC1">BUILDING SHARED AND STATIC LIBRARIES</a><br>
-<P>
-The Autotools PCRE building process uses <b>libtool</b> to build both shared and
-static libraries by default. You can suppress one of these by adding one of
-<pre>
- --disable-shared
- --disable-static
-</pre>
-to the <b>configure</b> command, as required.
-</P>
-<br><a name="SEC5" href="#TOC1">C++ SUPPORT</a><br>
-<P>
-By default, if the 8-bit library is being built, the <b>configure</b> script
-will search for a C++ compiler and C++ header files. If it finds them, it
-automatically builds the C++ wrapper library (which supports only 8-bit
-strings). You can disable this by adding
-<pre>
- --disable-cpp
-</pre>
-to the <b>configure</b> command.
-</P>
-<br><a name="SEC6" href="#TOC1">UTF-8, UTF-16 AND UTF-32 SUPPORT</a><br>
-<P>
-To build PCRE with support for UTF Unicode character strings, add
-<pre>
- --enable-utf
-</pre>
-to the <b>configure</b> command. This setting applies to all three libraries,
-adding support for UTF-8 to the 8-bit library, support for UTF-16 to the 16-bit
-library, and support for UTF-32 to the to the 32-bit library. There are no
-separate options for enabling UTF-8, UTF-16 and UTF-32 independently because
-that would allow ridiculous settings such as requesting UTF-16 support while
-building only the 8-bit library. It is not possible to build one library with
-UTF support and another without in the same configuration. (For backwards
-compatibility, --enable-utf8 is a synonym of --enable-utf.)
-</P>
-<P>
-Of itself, this setting does not make PCRE treat strings as UTF-8, UTF-16 or
-UTF-32. As well as compiling PCRE with this option, you also have have to set
-the PCRE_UTF8, PCRE_UTF16 or PCRE_UTF32 option (as appropriate) when you call
-one of the pattern compiling functions.
-</P>
-<P>
-If you set --enable-utf when compiling in an EBCDIC environment, PCRE expects
-its input to be either ASCII or UTF-8 (depending on the run-time option). It is
-not possible to support both EBCDIC and UTF-8 codes in the same version of the
-library. Consequently, --enable-utf and --enable-ebcdic are mutually
-exclusive.
-</P>
-<br><a name="SEC7" href="#TOC1">UNICODE CHARACTER PROPERTY SUPPORT</a><br>
-<P>
-UTF support allows the libraries to process character codepoints up to 0x10ffff
-in the strings that they handle. On its own, however, it does not provide any
-facilities for accessing the properties of such characters. If you want to be
-able to use the pattern escapes \P, \p, and \X, which refer to Unicode
-character properties, you must add
-<pre>
- --enable-unicode-properties
-</pre>
-to the <b>configure</b> command. This implies UTF support, even if you have
-not explicitly requested it.
-</P>
-<P>
-Including Unicode property support adds around 30K of tables to the PCRE
-library. Only the general category properties such as <i>Lu</i> and <i>Nd</i> are
-supported. Details are given in the
-<a href="pcrepattern.html"><b>pcrepattern</b></a>
-documentation.
-</P>
-<br><a name="SEC8" href="#TOC1">JUST-IN-TIME COMPILER SUPPORT</a><br>
-<P>
-Just-in-time compiler support is included in the build by specifying
-<pre>
- --enable-jit
-</pre>
-This support is available only for certain hardware architectures. If this
-option is set for an unsupported architecture, a compile time error occurs.
-See the
-<a href="pcrejit.html"><b>pcrejit</b></a>
-documentation for a discussion of JIT usage. When JIT support is enabled,
-pcregrep automatically makes use of it, unless you add
-<pre>
- --disable-pcregrep-jit
-</pre>
-to the "configure" command.
-</P>
-<br><a name="SEC9" href="#TOC1">CODE VALUE OF NEWLINE</a><br>
-<P>
-By default, PCRE interprets the linefeed (LF) character as indicating the end
-of a line. This is the normal newline character on Unix-like systems. You can
-compile PCRE to use carriage return (CR) instead, by adding
-<pre>
- --enable-newline-is-cr
-</pre>
-to the <b>configure</b> command. There is also a --enable-newline-is-lf option,
-which explicitly specifies linefeed as the newline character.
-<br>
-<br>
-Alternatively, you can specify that line endings are to be indicated by the two
-character sequence CRLF. If you want this, add
-<pre>
- --enable-newline-is-crlf
-</pre>
-to the <b>configure</b> command. There is a fourth option, specified by
-<pre>
- --enable-newline-is-anycrlf
-</pre>
-which causes PCRE to recognize any of the three sequences CR, LF, or CRLF as
-indicating a line ending. Finally, a fifth option, specified by
-<pre>
- --enable-newline-is-any
-</pre>
-causes PCRE to recognize any Unicode newline sequence.
-</P>
-<P>
-Whatever line ending convention is selected when PCRE is built can be
-overridden when the library functions are called. At build time it is
-conventional to use the standard for your operating system.
-</P>
-<br><a name="SEC10" href="#TOC1">WHAT \R MATCHES</a><br>
-<P>
-By default, the sequence \R in a pattern matches any Unicode newline sequence,
-whatever has been selected as the line ending sequence. If you specify
-<pre>
- --enable-bsr-anycrlf
-</pre>
-the default is changed so that \R matches only CR, LF, or CRLF. Whatever is
-selected when PCRE is built can be overridden when the library functions are
-called.
-</P>
-<br><a name="SEC11" href="#TOC1">POSIX MALLOC USAGE</a><br>
-<P>
-When the 8-bit library is called through the POSIX interface (see the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-documentation), 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 <b>malloc()</b> for each call. The default threshold above
-which the stack is no longer used is 10; it can be changed by adding a setting
-such as
-<pre>
- --with-posix-malloc-threshold=20
-</pre>
-to the <b>configure</b> command.
-</P>
-<br><a name="SEC12" href="#TOC1">HANDLING VERY LARGE PATTERNS</a><br>
-<P>
-Within a compiled pattern, offset values are used to point from one part to
-another (for example, from an opening parenthesis to an alternation
-metacharacter). By default, in the 8-bit and 16-bit libraries, two-byte values
-are used for these offsets, leading to a maximum size for a compiled pattern of
-around 64K. This is sufficient to handle all but the most gigantic patterns.
-Nevertheless, some people do want to process truly enormous patterns, so it is
-possible to compile PCRE to use three-byte or four-byte offsets by adding a
-setting such as
-<pre>
- --with-link-size=3
-</pre>
-to the <b>configure</b> command. The value given must be 2, 3, or 4. For the
-16-bit library, a value of 3 is rounded up to 4. In these libraries, using
-longer offsets slows down the operation of PCRE because it has to load
-additional data when handling them. For the 32-bit library the value is always
-4 and cannot be overridden; the value of --with-link-size is ignored.
-</P>
-<br><a name="SEC13" href="#TOC1">AVOIDING EXCESSIVE STACK USAGE</a><br>
-<P>
-When matching with the <b>pcre_exec()</b> function, PCRE implements backtracking
-by making recursive calls to an internal function called <b>match()</b>. In
-environments where the size of the stack is limited, this can severely limit
-PCRE's operation. (The Unix environment does not usually suffer from this
-problem, but it may sometimes be necessary to increase the maximum stack size.
-There is a discussion in the
-<a href="pcrestack.html"><b>pcrestack</b></a>
-documentation.) An alternative approach to recursion that uses memory from the
-heap to remember data, instead of using recursive function calls, has been
-implemented to work round the problem of limited stack size. If you want to
-build a version of PCRE that works this way, add
-<pre>
- --disable-stack-for-recursion
-</pre>
-to the <b>configure</b> command. With this configuration, PCRE will use the
-<b>pcre_stack_malloc</b> and <b>pcre_stack_free</b> variables to call memory
-management functions. By default these point to <b>malloc()</b> and
-<b>free()</b>, but you can replace the pointers so that your own functions are
-used instead.
-</P>
-<P>
-Separate functions are provided rather than using <b>pcre_malloc</b> and
-<b>pcre_free</b> because the usage is very predictable: the block sizes
-requested are always the same, and the blocks are always freed in reverse
-order. A calling program might be able to implement optimized functions that
-perform better than <b>malloc()</b> and <b>free()</b>. PCRE runs noticeably more
-slowly when built in this way. This option affects only the <b>pcre_exec()</b>
-function; it is not relevant for <b>pcre_dfa_exec()</b>.
-</P>
-<br><a name="SEC14" href="#TOC1">LIMITING PCRE RESOURCE USAGE</a><br>
-<P>
-Internally, PCRE has a function called <b>match()</b>, which it calls repeatedly
-(sometimes recursively) when matching a pattern with the <b>pcre_exec()</b>
-function. By controlling the maximum number of times this function may be
-called during a single matching operation, a limit can be placed on the
-resources used by a single call to <b>pcre_exec()</b>. The limit can be changed
-at run time, as described in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-documentation. The default is 10 million, but this can be changed by adding a
-setting such as
-<pre>
- --with-match-limit=500000
-</pre>
-to the <b>configure</b> command. This setting has no effect on the
-<b>pcre_dfa_exec()</b> matching function.
-</P>
-<P>
-In some environments it is desirable to limit the depth of recursive calls of
-<b>match()</b> more strictly than the total number of calls, in order to
-restrict the maximum amount of stack (or heap, if --disable-stack-for-recursion
-is specified) that is used. A second limit controls this; it defaults to the
-value that is set for --with-match-limit, which imposes no additional
-constraints. However, you can set a lower limit by adding, for example,
-<pre>
- --with-match-limit-recursion=10000
-</pre>
-to the <b>configure</b> command. This value can also be overridden at run time.
-</P>
-<br><a name="SEC15" href="#TOC1">CREATING CHARACTER TABLES AT BUILD TIME</a><br>
-<P>
-PCRE uses fixed tables for processing characters whose code values are less
-than 256. By default, PCRE is built with a set of tables that are distributed
-in the file <i>pcre_chartables.c.dist</i>. These tables are for ASCII codes
-only. If you add
-<pre>
- --enable-rebuild-chartables
-</pre>
-to the <b>configure</b> command, the distributed tables are no longer used.
-Instead, a program called <b>dftables</b> is compiled and run. This outputs the
-source for new set of tables, created in the default locale of your C run-time
-system. (This method of replacing the tables does not work if you are cross
-compiling, because <b>dftables</b> is run on the local host. If you need to
-create alternative tables when cross compiling, you will have to do so "by
-hand".)
-</P>
-<br><a name="SEC16" href="#TOC1">USING EBCDIC CODE</a><br>
-<P>
-PCRE assumes by default that it will run in an environment where the character
-code is ASCII (or Unicode, which is a superset of ASCII). This is the case for
-most computer operating systems. PCRE can, however, be compiled to run in an
-EBCDIC environment by adding
-<pre>
- --enable-ebcdic
-</pre>
-to the <b>configure</b> command. This setting implies
---enable-rebuild-chartables. You should only use it if you know that you are in
-an EBCDIC environment (for example, an IBM mainframe operating system). The
---enable-ebcdic option is incompatible with --enable-utf.
-</P>
-<P>
-The EBCDIC character that corresponds to an ASCII LF is assumed to have the
-value 0x15 by default. However, in some EBCDIC environments, 0x25 is used. In
-such an environment you should use
-<pre>
- --enable-ebcdic-nl25
-</pre>
-as well as, or instead of, --enable-ebcdic. The EBCDIC character for CR has the
-same value as in ASCII, namely, 0x0d. Whichever of 0x15 and 0x25 is <i>not</i>
-chosen as LF is made to correspond to the Unicode NEL character (which, in
-Unicode, is 0x85).
-</P>
-<P>
-The options that select newline behaviour, such as --enable-newline-is-cr,
-and equivalent run-time options, refer to these character values in an EBCDIC
-environment.
-</P>
-<br><a name="SEC17" href="#TOC1">PCREGREP OPTIONS FOR COMPRESSED FILE SUPPORT</a><br>
-<P>
-By default, <b>pcregrep</b> reads all files as plain text. You can build it so
-that it recognizes files whose names end in <b>.gz</b> or <b>.bz2</b>, and reads
-them with <b>libz</b> or <b>libbz2</b>, respectively, by adding one or both of
-<pre>
- --enable-pcregrep-libz
- --enable-pcregrep-libbz2
-</pre>
-to the <b>configure</b> command. These options naturally require that the
-relevant libraries are installed on your system. Configuration will fail if
-they are not.
-</P>
-<br><a name="SEC18" href="#TOC1">PCREGREP BUFFER SIZE</a><br>
-<P>
-<b>pcregrep</b> uses an internal buffer to hold a "window" on the file it is
-scanning, in order to be able to output "before" and "after" lines when it
-finds a match. The size of the buffer is controlled by a parameter whose
-default value is 20K. The buffer itself is three times this size, but because
-of the way it is used for holding "before" lines, the longest line that is
-guaranteed to be processable is the parameter size. You can change the default
-parameter value by adding, for example,
-<pre>
- --with-pcregrep-bufsize=50K
-</pre>
-to the <b>configure</b> command. The caller of \fPpcregrep\fP can, however,
-override this value by specifying a run-time option.
-</P>
-<br><a name="SEC19" href="#TOC1">PCRETEST OPTION FOR LIBREADLINE SUPPORT</a><br>
-<P>
-If you add
-<pre>
- --enable-pcretest-libreadline
-</pre>
-to the <b>configure</b> command, <b>pcretest</b> is linked with the
-<b>libreadline</b> library, and when its input is from a terminal, it reads it
-using the <b>readline()</b> function. This provides line-editing and history
-facilities. Note that <b>libreadline</b> is GPL-licensed, so if you distribute a
-binary of <b>pcretest</b> linked in this way, there may be licensing issues.
-</P>
-<P>
-Setting this option causes the <b>-lreadline</b> option to be added to the
-<b>pcretest</b> build. In many operating environments with a sytem-installed
-<b>libreadline</b> this is sufficient. However, in some environments (e.g.
-if an unmodified distribution version of readline is in use), some extra
-configuration may be necessary. The INSTALL file for <b>libreadline</b> says
-this:
-<pre>
- "Readline uses the termcap functions, but does not link with the
- termcap or curses library itself, allowing applications which link
- with readline the to choose an appropriate library."
-</pre>
-If your environment has not been set up so that an appropriate library is
-automatically included, you may need to add something like
-<pre>
- LIBS="-ncurses"
-</pre>
-immediately before the <b>configure</b> command.
-</P>
-<br><a name="SEC20" href="#TOC1">DEBUGGING WITH VALGRIND SUPPORT</a><br>
-<P>
-By adding the
-<pre>
- --enable-valgrind
-</pre>
-option to to the <b>configure</b> command, PCRE will use valgrind annotations
-to mark certain memory regions as unaddressable. This allows it to detect
-invalid memory accesses, and is mostly useful for debugging PCRE itself.
-</P>
-<br><a name="SEC21" href="#TOC1">CODE COVERAGE REPORTING</a><br>
-<P>
-If your C compiler is gcc, you can build a version of PCRE that can generate a
-code coverage report for its test suite. To enable this, you must install
-<b>lcov</b> version 1.6 or above. Then specify
-<pre>
- --enable-coverage
-</pre>
-to the <b>configure</b> command and build PCRE in the usual way.
-</P>
-<P>
-Note that using <b>ccache</b> (a caching C compiler) is incompatible with code
-coverage reporting. If you have configured <b>ccache</b> to run automatically
-on your system, you must set the environment variable
-<pre>
- CCACHE_DISABLE=1
-</pre>
-before running <b>make</b> to build PCRE, so that <b>ccache</b> is not used.
-</P>
-<P>
-When --enable-coverage is used, the following addition targets are added to the
-<i>Makefile</i>:
-<pre>
- make coverage
-</pre>
-This creates a fresh coverage report for the PCRE test suite. It is equivalent
-to running "make coverage-reset", "make coverage-baseline", "make check", and
-then "make coverage-report".
-<pre>
- make coverage-reset
-</pre>
-This zeroes the coverage counters, but does nothing else.
-<pre>
- make coverage-baseline
-</pre>
-This captures baseline coverage information.
-<pre>
- make coverage-report
-</pre>
-This creates the coverage report.
-<pre>
- make coverage-clean-report
-</pre>
-This removes the generated coverage report without cleaning the coverage data
-itself.
-<pre>
- make coverage-clean-data
-</pre>
-This removes the captured coverage data without removing the coverage files
-created at compile time (*.gcno).
-<pre>
- make coverage-clean
-</pre>
-This cleans all coverage data including the generated coverage report. For more
-information about code coverage, see the <b>gcov</b> and <b>lcov</b>
-documentation.
-</P>
-<br><a name="SEC22" href="#TOC1">SEE ALSO</a><br>
-<P>
-<b>pcreapi</b>(3), <b>pcre16</b>, <b>pcre32</b>, <b>pcre_config</b>(3).
-</P>
-<br><a name="SEC23" href="#TOC1">AUTHOR</a><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><a name="SEC24" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 12 May 2013
-<br>
-Copyright &copy; 1997-2013 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcrecallout.html b/libs/Pcre16/docs/doc/html/pcrecallout.html
deleted file mode 100644
index 53a937f52d..0000000000
--- a/libs/Pcre16/docs/doc/html/pcrecallout.html
+++ /dev/null
@@ -1,286 +0,0 @@
-<html>
-<head>
-<title>pcrecallout specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcrecallout man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">SYNOPSIS</a>
-<li><a name="TOC2" href="#SEC2">DESCRIPTION</a>
-<li><a name="TOC3" href="#SEC3">MISSING CALLOUTS</a>
-<li><a name="TOC4" href="#SEC4">THE CALLOUT INTERFACE</a>
-<li><a name="TOC5" href="#SEC5">RETURN VALUES</a>
-<li><a name="TOC6" href="#SEC6">AUTHOR</a>
-<li><a name="TOC7" href="#SEC7">REVISION</a>
-</ul>
-<br><a name="SEC1" href="#TOC1">SYNOPSIS</a><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>int (*pcre_callout)(pcre_callout_block *);</b>
-</P>
-<P>
-<b>int (*pcre16_callout)(pcre16_callout_block *);</b>
-</P>
-<P>
-<b>int (*pcre32_callout)(pcre32_callout_block *);</b>
-</P>
-<br><a name="SEC2" href="#TOC1">DESCRIPTION</a><br>
-<P>
-PCRE provides a feature called "callout", which is a means of temporarily
-passing control to the caller of PCRE in the middle of pattern matching. The
-caller of PCRE provides an external function by putting its entry point in the
-global variable <i>pcre_callout</i> (<i>pcre16_callout</i> for the 16-bit
-library, <i>pcre32_callout</i> for the 32-bit library). By default, this
-variable contains NULL, which disables all calling out.
-</P>
-<P>
-Within a regular expression, (?C) indicates the points at which the external
-function is to be called. Different callout points can be identified by putting
-a number less than 256 after the letter C. The default value is zero.
-For example, this pattern has two callout points:
-<pre>
- (?C1)abc(?C2)def
-</pre>
-If the PCRE_AUTO_CALLOUT option bit is set when a pattern is compiled, PCRE
-automatically inserts callouts, all with number 255, before each item in the
-pattern. For example, if PCRE_AUTO_CALLOUT is used with the pattern
-<pre>
- A(\d{2}|--)
-</pre>
-it is processed as if it were
-<br>
-<br>
-(?C255)A(?C255)((?C255)\d{2}(?C255)|(?C255)-(?C255)-(?C255))(?C255)
-<br>
-<br>
-Notice that there is a callout before and after each parenthesis and
-alternation bar. If the pattern contains a conditional group whose condition is
-an assertion, an automatic callout is inserted immediately before the
-condition. Such a callout may also be inserted explicitly, for example:
-<pre>
- (?(?C9)(?=a)ab|de)
-</pre>
-This applies only to assertion conditions (because they are themselves
-independent groups).
-</P>
-<P>
-Automatic callouts can be used for tracking the progress of pattern matching.
-The
-<a href="pcretest.html"><b>pcretest</b></a>
-program has a pattern qualifier (/C) that sets automatic callouts; when it is
-used, the output indicates how the pattern is being matched. This is useful
-information when you are trying to optimize the performance of a particular
-pattern.
-</P>
-<br><a name="SEC3" href="#TOC1">MISSING CALLOUTS</a><br>
-<P>
-You should be aware that, because of optimizations in the way PCRE compiles and
-matches patterns, callouts sometimes do not happen exactly as you might expect.
-</P>
-<P>
-At compile time, PCRE "auto-possessifies" repeated items when it knows that
-what follows cannot be part of the repeat. For example, a+[bc] is compiled as
-if it were a++[bc]. The <b>pcretest</b> output when this pattern is anchored and
-then applied with automatic callouts to the string "aaaa" is:
-<pre>
- ---&#62;aaaa
- +0 ^ ^
- +1 ^ a+
- +3 ^ ^ [bc]
- No match
-</pre>
-This indicates that when matching [bc] fails, there is no backtracking into a+
-and therefore the callouts that would be taken for the backtracks do not occur.
-You can disable the auto-possessify feature by passing PCRE_NO_AUTO_POSSESS
-to <b>pcre_compile()</b>, or starting the pattern with (*NO_AUTO_POSSESS). If
-this is done in <b>pcretest</b> (using the /O qualifier), the output changes to
-this:
-<pre>
- ---&#62;aaaa
- +0 ^ ^
- +1 ^ a+
- +3 ^ ^ [bc]
- +3 ^ ^ [bc]
- +3 ^ ^ [bc]
- +3 ^^ [bc]
- No match
-</pre>
-This time, when matching [bc] fails, the matcher backtracks into a+ and tries
-again, repeatedly, until a+ itself fails.
-</P>
-<P>
-Other optimizations that provide fast "no match" results also affect callouts.
-For example, if the pattern is
-<pre>
- ab(?C4)cd
-</pre>
-PCRE knows that any matching string must contain the letter "d". If the subject
-string is "abyz", the lack of "d" means that matching doesn't ever start, and
-the callout is never reached. However, with "abyd", though the result is still
-no match, the callout is obeyed.
-</P>
-<P>
-If the pattern is studied, PCRE knows the minimum length of a matching string,
-and will immediately give a "no match" return without actually running a match
-if the subject is not long enough, or, for unanchored patterns, if it has
-been scanned far enough.
-</P>
-<P>
-You can disable these optimizations by passing the PCRE_NO_START_OPTIMIZE
-option to the matching function, or by starting the pattern with
-(*NO_START_OPT). This slows down the matching process, but does ensure that
-callouts such as the example above are obeyed.
-</P>
-<br><a name="SEC4" href="#TOC1">THE CALLOUT INTERFACE</a><br>
-<P>
-During matching, when PCRE reaches a callout point, the external function
-defined by <i>pcre_callout</i> or <i>pcre[16|32]_callout</i> is called (if it is
-set). This applies to both normal and DFA matching. The only argument to the
-callout function is a pointer to a <b>pcre_callout</b> or
-<b>pcre[16|32]_callout</b> block. These structures contains the following
-fields:
-<pre>
- int <i>version</i>;
- int <i>callout_number</i>;
- int *<i>offset_vector</i>;
- const char *<i>subject</i>; (8-bit version)
- PCRE_SPTR16 <i>subject</i>; (16-bit version)
- PCRE_SPTR32 <i>subject</i>; (32-bit version)
- int <i>subject_length</i>;
- int <i>start_match</i>;
- int <i>current_position</i>;
- int <i>capture_top</i>;
- int <i>capture_last</i>;
- void *<i>callout_data</i>;
- int <i>pattern_position</i>;
- int <i>next_item_length</i>;
- const unsigned char *<i>mark</i>; (8-bit version)
- const PCRE_UCHAR16 *<i>mark</i>; (16-bit version)
- const PCRE_UCHAR32 *<i>mark</i>; (32-bit version)
-</pre>
-The <i>version</i> field is an integer containing the version number of the
-block format. The initial version was 0; the current version is 2. The version
-number will change again in future if additional fields are added, but the
-intention is never to remove any of the existing fields.
-</P>
-<P>
-The <i>callout_number</i> field contains the number of the callout, as compiled
-into the pattern (that is, the number after ?C for manual callouts, and 255 for
-automatically generated callouts).
-</P>
-<P>
-The <i>offset_vector</i> field is a pointer to the vector of offsets that was
-passed by the caller to the matching function. When <b>pcre_exec()</b> or
-<b>pcre[16|32]_exec()</b> is used, the contents can be inspected, in order to
-extract substrings that have been matched so far, in the same way as for
-extracting substrings after a match has completed. For the DFA matching
-functions, this field is not useful.
-</P>
-<P>
-The <i>subject</i> and <i>subject_length</i> fields contain copies of the values
-that were passed to the matching function.
-</P>
-<P>
-The <i>start_match</i> field normally contains the offset within the subject at
-which the current match attempt started. However, if the escape sequence \K
-has been encountered, this value is changed to reflect the modified starting
-point. If the pattern is not anchored, the callout function may be called
-several times from the same point in the pattern for different starting points
-in the subject.
-</P>
-<P>
-The <i>current_position</i> field contains the offset within the subject of the
-current match pointer.
-</P>
-<P>
-When the <b>pcre_exec()</b> or <b>pcre[16|32]_exec()</b> is used, the
-<i>capture_top</i> field contains one more than the number of the highest
-numbered captured substring so far. If no substrings have been captured, the
-value of <i>capture_top</i> is one. This is always the case when the DFA
-functions are used, because they do not support captured substrings.
-</P>
-<P>
-The <i>capture_last</i> field contains the number of the most recently captured
-substring. However, when a recursion exits, the value reverts to what it was
-outside the recursion, as do the values of all captured substrings. If no
-substrings have been captured, the value of <i>capture_last</i> is -1. This is
-always the case for the DFA matching functions.
-</P>
-<P>
-The <i>callout_data</i> field contains a value that is passed to a matching
-function specifically so that it can be passed back in callouts. It is passed
-in the <i>callout_data</i> field of a <b>pcre_extra</b> or <b>pcre[16|32]_extra</b>
-data structure. If no such data was passed, the value of <i>callout_data</i> in
-a callout block is NULL. There is a description of the <b>pcre_extra</b>
-structure in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-documentation.
-</P>
-<P>
-The <i>pattern_position</i> field is present from version 1 of the callout
-structure. It contains the offset to the next item to be matched in the pattern
-string.
-</P>
-<P>
-The <i>next_item_length</i> field is present from version 1 of the callout
-structure. It contains the length of the next item to be matched in the pattern
-string. When the callout immediately precedes an alternation bar, a closing
-parenthesis, or the end of the pattern, the length is zero. When the callout
-precedes an opening parenthesis, the length is that of the entire subpattern.
-</P>
-<P>
-The <i>pattern_position</i> and <i>next_item_length</i> fields are intended to
-help in distinguishing between different automatic callouts, which all have the
-same callout number. However, they are set for all callouts.
-</P>
-<P>
-The <i>mark</i> field is present from version 2 of the callout structure. In
-callouts from <b>pcre_exec()</b> or <b>pcre[16|32]_exec()</b> it contains a
-pointer to the zero-terminated name of the most recently passed (*MARK),
-(*PRUNE), or (*THEN) item in the match, or NULL if no such items have been
-passed. Instances of (*PRUNE) or (*THEN) without a name do not obliterate a
-previous (*MARK). In callouts from the DFA matching functions this field always
-contains NULL.
-</P>
-<br><a name="SEC5" href="#TOC1">RETURN VALUES</a><br>
-<P>
-The external callout function returns an integer to PCRE. If the value is zero,
-matching proceeds as normal. If the value is greater than zero, matching fails
-at the current point, but the testing of other matching possibilities goes
-ahead, just as if a lookahead assertion had failed. If the value is less than
-zero, the match is abandoned, the matching function returns the negative value.
-</P>
-<P>
-Negative values should normally be chosen from the set of PCRE_ERROR_xxx
-values. In particular, PCRE_ERROR_NOMATCH forces a standard "no match" failure.
-The error number PCRE_ERROR_CALLOUT is reserved for use by callout functions;
-it will never be used by PCRE itself.
-</P>
-<br><a name="SEC6" href="#TOC1">AUTHOR</a><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><a name="SEC7" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 12 November 2013
-<br>
-Copyright &copy; 1997-2013 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcrecompat.html b/libs/Pcre16/docs/doc/html/pcrecompat.html
deleted file mode 100644
index d95570ef17..0000000000
--- a/libs/Pcre16/docs/doc/html/pcrecompat.html
+++ /dev/null
@@ -1,235 +0,0 @@
-<html>
-<head>
-<title>pcrecompat specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcrecompat man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-DIFFERENCES BETWEEN PCRE AND PERL
-</b><br>
-<P>
-This document describes the differences in the ways that PCRE and Perl handle
-regular expressions. The differences described here are with respect to Perl
-versions 5.10 and above.
-</P>
-<P>
-1. PCRE has only a subset of Perl's Unicode support. Details of what it does
-have are given in the
-<a href="pcreunicode.html"><b>pcreunicode</b></a>
-page.
-</P>
-<P>
-2. PCRE allows repeat quantifiers only on parenthesized assertions, but they do
-not mean what you might think. For example, (?!a){3} does not assert that the
-next three characters are not "a". It just asserts that the next character is
-not "a" three times (in principle: PCRE optimizes this to run the assertion
-just once). Perl allows repeat quantifiers on other assertions such as \b, but
-these do not seem to have any use.
-</P>
-<P>
-3. Capturing subpatterns that occur inside negative lookahead assertions are
-counted, but their entries in the offsets vector are never set. Perl sometimes
-(but not always) sets its numerical variables from inside negative assertions.
-</P>
-<P>
-4. Though binary zero characters are supported in the subject string, they are
-not allowed in a pattern string because it is passed as a normal C string,
-terminated by zero. The escape sequence \0 can be used in the pattern to
-represent a binary zero.
-</P>
-<P>
-5. The following Perl escape sequences are not supported: \l, \u, \L,
-\U, and \N when followed by a character name or Unicode value. (\N on its
-own, matching a non-newline character, is supported.) In fact these are
-implemented by Perl's general string-handling and are not part of its pattern
-matching engine. If any of these are encountered by PCRE, an error is
-generated by default. However, if the PCRE_JAVASCRIPT_COMPAT option is set,
-\U and \u are interpreted as JavaScript interprets them.
-</P>
-<P>
-6. The Perl escape sequences \p, \P, and \X are supported only if PCRE is
-built with Unicode character property support. The properties that can be
-tested with \p and \P are limited to the general category properties such as
-Lu and Nd, script names such as Greek or Han, and the derived properties Any
-and L&. PCRE does support the Cs (surrogate) property, which Perl does not; the
-Perl documentation says "Because Perl hides the need for the user to understand
-the internal representation of Unicode characters, there is no need to
-implement the somewhat messy concept of surrogates."
-</P>
-<P>
-7. PCRE does support the \Q...\E escape for quoting substrings. Characters in
-between are treated as literals. This is slightly different from Perl in that $
-and @ are also handled as literals inside the quotes. In Perl, they cause
-variable interpolation (but of course PCRE does not have variables). Note the
-following examples:
-<pre>
- Pattern PCRE matches Perl matches
-
- \Qabc$xyz\E abc$xyz abc followed by the contents of $xyz
- \Qabc\$xyz\E abc\$xyz abc\$xyz
- \Qabc\E\$\Qxyz\E abc$xyz abc$xyz
-</pre>
-The \Q...\E sequence is recognized both inside and outside character classes.
-</P>
-<P>
-8. Fairly obviously, PCRE does not support the (?{code}) and (??{code})
-constructions. However, there is support for recursive patterns. This is not
-available in Perl 5.8, but it is in Perl 5.10. Also, the PCRE "callout"
-feature allows an external function to be called during pattern matching. See
-the
-<a href="pcrecallout.html"><b>pcrecallout</b></a>
-documentation for details.
-</P>
-<P>
-9. Subpatterns that are called as subroutines (whether or not recursively) are
-always treated as atomic groups in PCRE. This is like Python, but unlike Perl.
-Captured values that are set outside a subroutine call can be reference from
-inside in PCRE, but not in Perl. There is a discussion that explains these
-differences in more detail in the
-<a href="pcrepattern.html#recursiondifference">section on recursion differences from Perl</a>
-in the
-<a href="pcrepattern.html"><b>pcrepattern</b></a>
-page.
-</P>
-<P>
-10. If any of the backtracking control verbs are used in a subpattern that is
-called as a subroutine (whether or not recursively), their effect is confined
-to that subpattern; it does not extend to the surrounding pattern. This is not
-always the case in Perl. In particular, if (*THEN) is present in a group that
-is called as a subroutine, its action is limited to that group, even if the
-group does not contain any | characters. Note that such subpatterns are
-processed as anchored at the point where they are tested.
-</P>
-<P>
-11. If a pattern contains more than one backtracking control verb, the first
-one that is backtracked onto acts. For example, in the pattern
-A(*COMMIT)B(*PRUNE)C a failure in B triggers (*COMMIT), but a failure in C
-triggers (*PRUNE). Perl's behaviour is more complex; in many cases it is the
-same as PCRE, but there are examples where it differs.
-</P>
-<P>
-12. Most backtracking verbs in assertions have their normal actions. They are
-not confined to the assertion.
-</P>
-<P>
-13. There are some differences that are concerned with the settings of captured
-strings when part of a pattern is repeated. For example, matching "aba" against
-the pattern /^(a(b)?)+$/ in Perl leaves $2 unset, but in PCRE it is set to "b".
-</P>
-<P>
-14. PCRE's handling of duplicate subpattern numbers and duplicate subpattern
-names is not as general as Perl's. This is a consequence of the fact the PCRE
-works internally just with numbers, using an external table to translate
-between numbers and names. In particular, a pattern such as (?|(?&#60;a&#62;A)|(?&#60;b&#62;B),
-where the two capturing parentheses have the same number but different names,
-is not supported, and causes an error at compile time. If it were allowed, it
-would not be possible to distinguish which parentheses matched, because both
-names map to capturing subpattern number 1. To avoid this confusing situation,
-an error is given at compile time.
-</P>
-<P>
-15. Perl recognizes comments in some places that PCRE does not, for example,
-between the ( and ? at the start of a subpattern. If the /x modifier is set,
-Perl allows white space between ( and ? (though current Perls warn that this is
-deprecated) but PCRE never does, even if the PCRE_EXTENDED option is set.
-</P>
-<P>
-16. Perl, when in warning mode, gives warnings for character classes such as
-[A-\d] or [a-[:digit:]]. It then treats the hyphens as literals. PCRE has no
-warning features, so it gives an error in these cases because they are almost
-certainly user mistakes.
-</P>
-<P>
-17. In PCRE, the upper/lower case character properties Lu and Ll are not
-affected when case-independent matching is specified. For example, \p{Lu}
-always matches an upper case letter. I think Perl has changed in this respect;
-in the release at the time of writing (5.16), \p{Lu} and \p{Ll} match all
-letters, regardless of case, when case independence is specified.
-</P>
-<P>
-18. PCRE provides some extensions to the Perl regular expression facilities.
-Perl 5.10 includes new features that are not in earlier versions of Perl, some
-of which (such as named parentheses) have been in PCRE for some time. This list
-is with respect to Perl 5.10:
-<br>
-<br>
-(a) Although lookbehind assertions in PCRE must match fixed length strings,
-each alternative branch of a lookbehind assertion can match a different length
-of string. Perl requires them all to have the same length.
-<br>
-<br>
-(b) If PCRE_DOLLAR_ENDONLY is set and PCRE_MULTILINE is not set, the $
-meta-character matches only at the very end of the string.
-<br>
-<br>
-(c) If PCRE_EXTRA is set, a backslash followed by a letter with no special
-meaning is faulted. Otherwise, like Perl, the backslash is quietly ignored.
-(Perl can be made to issue a warning.)
-<br>
-<br>
-(d) If PCRE_UNGREEDY is set, the greediness of the repetition quantifiers is
-inverted, that is, by default they are not greedy, but if followed by a
-question mark they are.
-<br>
-<br>
-(e) PCRE_ANCHORED can be used at matching time to force a pattern to be tried
-only at the first matching position in the subject string.
-<br>
-<br>
-(f) The PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NOTEMPTY_ATSTART, and
-PCRE_NO_AUTO_CAPTURE options for <b>pcre_exec()</b> have no Perl equivalents.
-<br>
-<br>
-(g) The \R escape sequence can be restricted to match only CR, LF, or CRLF
-by the PCRE_BSR_ANYCRLF option.
-<br>
-<br>
-(h) The callout facility is PCRE-specific.
-<br>
-<br>
-(i) The partial matching facility is PCRE-specific.
-<br>
-<br>
-(j) Patterns compiled by PCRE can be saved and re-used at a later time, even on
-different hosts that have the other endianness. However, this does not apply to
-optimized data created by the just-in-time compiler.
-<br>
-<br>
-(k) The alternative matching functions (<b>pcre_dfa_exec()</b>,
-<b>pcre16_dfa_exec()</b> and <b>pcre32_dfa_exec()</b>,) match in a different way
-and are not Perl-compatible.
-<br>
-<br>
-(l) PCRE recognizes some special sequences such as (*CR) at the start of
-a pattern that set overall options that cannot be changed within the pattern.
-</P>
-<br><b>
-AUTHOR
-</b><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><b>
-REVISION
-</b><br>
-<P>
-Last updated: 10 November 2013
-<br>
-Copyright &copy; 1997-2013 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcrecpp.html b/libs/Pcre16/docs/doc/html/pcrecpp.html
deleted file mode 100644
index b7eac3a3d7..0000000000
--- a/libs/Pcre16/docs/doc/html/pcrecpp.html
+++ /dev/null
@@ -1,368 +0,0 @@
-<html>
-<head>
-<title>pcrecpp specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcrecpp man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">SYNOPSIS OF C++ WRAPPER</a>
-<li><a name="TOC2" href="#SEC2">DESCRIPTION</a>
-<li><a name="TOC3" href="#SEC3">MATCHING INTERFACE</a>
-<li><a name="TOC4" href="#SEC4">QUOTING METACHARACTERS</a>
-<li><a name="TOC5" href="#SEC5">PARTIAL MATCHES</a>
-<li><a name="TOC6" href="#SEC6">UTF-8 AND THE MATCHING INTERFACE</a>
-<li><a name="TOC7" href="#SEC7">PASSING MODIFIERS TO THE REGULAR EXPRESSION ENGINE</a>
-<li><a name="TOC8" href="#SEC8">SCANNING TEXT INCREMENTALLY</a>
-<li><a name="TOC9" href="#SEC9">PARSING HEX/OCTAL/C-RADIX NUMBERS</a>
-<li><a name="TOC10" href="#SEC10">REPLACING PARTS OF STRINGS</a>
-<li><a name="TOC11" href="#SEC11">AUTHOR</a>
-<li><a name="TOC12" href="#SEC12">REVISION</a>
-</ul>
-<br><a name="SEC1" href="#TOC1">SYNOPSIS OF C++ WRAPPER</a><br>
-<P>
-<b>#include &#60;pcrecpp.h&#62;</b>
-</P>
-<br><a name="SEC2" href="#TOC1">DESCRIPTION</a><br>
-<P>
-The C++ wrapper for PCRE was provided by Google Inc. Some additional
-functionality was added by Giuseppe Maxia. This brief man page was constructed
-from the notes in the <i>pcrecpp.h</i> file, which should be consulted for
-further details. Note that the C++ wrapper supports only the original 8-bit
-PCRE library. There is no 16-bit or 32-bit support at present.
-</P>
-<br><a name="SEC3" href="#TOC1">MATCHING INTERFACE</a><br>
-<P>
-The "FullMatch" operation checks that supplied text matches a supplied pattern
-exactly. If pointer arguments are supplied, it copies matched sub-strings that
-match sub-patterns into them.
-<pre>
- Example: successful match
- pcrecpp::RE re("h.*o");
- re.FullMatch("hello");
-
- Example: unsuccessful match (requires full match):
- pcrecpp::RE re("e");
- !re.FullMatch("hello");
-
- Example: creating a temporary RE object:
- pcrecpp::RE("h.*o").FullMatch("hello");
-</pre>
-You can pass in a "const char*" or a "string" for "text". The examples below
-tend to use a const char*. You can, as in the different examples above, store
-the RE object explicitly in a variable or use a temporary RE object. The
-examples below use one mode or the other arbitrarily. Either could correctly be
-used for any of these examples.
-</P>
-<P>
-You must supply extra pointer arguments to extract matched subpieces.
-<pre>
- Example: extracts "ruby" into "s" and 1234 into "i"
- int i;
- string s;
- pcrecpp::RE re("(\\w+):(\\d+)");
- re.FullMatch("ruby:1234", &s, &i);
-
- Example: does not try to extract any extra sub-patterns
- re.FullMatch("ruby:1234", &s);
-
- Example: does not try to extract into NULL
- re.FullMatch("ruby:1234", NULL, &i);
-
- Example: integer overflow causes failure
- !re.FullMatch("ruby:1234567891234", NULL, &i);
-
- Example: fails because there aren't enough sub-patterns:
- !pcrecpp::RE("\\w+:\\d+").FullMatch("ruby:1234", &s);
-
- Example: fails because string cannot be stored in integer
- !pcrecpp::RE("(.*)").FullMatch("ruby", &i);
-</pre>
-The provided pointer arguments can be pointers to any scalar numeric
-type, or one of:
-<pre>
- string (matched piece is copied to string)
- StringPiece (StringPiece is mutated to point to matched piece)
- T (where "bool T::ParseFrom(const char*, int)" exists)
- NULL (the corresponding matched sub-pattern is not copied)
-</pre>
-The function returns true iff all of the following conditions are satisfied:
-<pre>
- a. "text" matches "pattern" exactly;
-
- b. The number of matched sub-patterns is &#62;= number of supplied
- pointers;
-
- c. The "i"th argument has a suitable type for holding the
- string captured as the "i"th sub-pattern. If you pass in
- void * NULL for the "i"th argument, or a non-void * NULL
- of the correct type, or pass fewer arguments than the
- number of sub-patterns, "i"th captured sub-pattern is
- ignored.
-</pre>
-CAVEAT: An optional sub-pattern that does not exist in the matched
-string is assigned the empty string. Therefore, the following will
-return false (because the empty string is not a valid number):
-<pre>
- int number;
- pcrecpp::RE::FullMatch("abc", "[a-z]+(\\d+)?", &number);
-</pre>
-The matching interface supports at most 16 arguments per call.
-If you need more, consider using the more general interface
-<b>pcrecpp::RE::DoMatch</b>. See <b>pcrecpp.h</b> for the signature for
-<b>DoMatch</b>.
-</P>
-<P>
-NOTE: Do not use <b>no_arg</b>, which is used internally to mark the end of a
-list of optional arguments, as a placeholder for missing arguments, as this can
-lead to segfaults.
-</P>
-<br><a name="SEC4" href="#TOC1">QUOTING METACHARACTERS</a><br>
-<P>
-You can use the "QuoteMeta" operation to insert backslashes before all
-potentially meaningful characters in a string. The returned string, used as a
-regular expression, will exactly match the original string.
-<pre>
- Example:
- string quoted = RE::QuoteMeta(unquoted);
-</pre>
-Note that it's legal to escape a character even if it has no special meaning in
-a regular expression -- so this function does that. (This also makes it
-identical to the perl function of the same name; see "perldoc -f quotemeta".)
-For example, "1.5-2.0?" becomes "1\.5\-2\.0\?".
-</P>
-<br><a name="SEC5" href="#TOC1">PARTIAL MATCHES</a><br>
-<P>
-You can use the "PartialMatch" operation when you want the pattern
-to match any substring of the text.
-<pre>
- Example: simple search for a string:
- pcrecpp::RE("ell").PartialMatch("hello");
-
- Example: find first number in a string:
- int number;
- pcrecpp::RE re("(\\d+)");
- re.PartialMatch("x*100 + 20", &number);
- assert(number == 100);
-</PRE>
-</P>
-<br><a name="SEC6" href="#TOC1">UTF-8 AND THE MATCHING INTERFACE</a><br>
-<P>
-By default, pattern and text are plain text, one byte per character. The UTF8
-flag, passed to the constructor, causes both pattern and string to be treated
-as UTF-8 text, still a byte stream but potentially multiple bytes per
-character. In practice, the text is likelier to be UTF-8 than the pattern, but
-the match returned may depend on the UTF8 flag, so always use it when matching
-UTF8 text. For example, "." will match one byte normally but with UTF8 set may
-match up to three bytes of a multi-byte character.
-<pre>
- Example:
- pcrecpp::RE_Options options;
- options.set_utf8();
- pcrecpp::RE re(utf8_pattern, options);
- re.FullMatch(utf8_string);
-
- Example: using the convenience function UTF8():
- pcrecpp::RE re(utf8_pattern, pcrecpp::UTF8());
- re.FullMatch(utf8_string);
-</pre>
-NOTE: The UTF8 flag is ignored if pcre was not configured with the
-<pre>
- --enable-utf8 flag.
-</PRE>
-</P>
-<br><a name="SEC7" href="#TOC1">PASSING MODIFIERS TO THE REGULAR EXPRESSION ENGINE</a><br>
-<P>
-PCRE defines some modifiers to change the behavior of the regular expression
-engine. The C++ wrapper defines an auxiliary class, RE_Options, as a vehicle to
-pass such modifiers to a RE class. Currently, the following modifiers are
-supported:
-<pre>
- modifier description Perl corresponding
-
- PCRE_CASELESS case insensitive match /i
- PCRE_MULTILINE multiple lines match /m
- PCRE_DOTALL dot matches newlines /s
- PCRE_DOLLAR_ENDONLY $ matches only at end N/A
- PCRE_EXTRA strict escape parsing N/A
- PCRE_EXTENDED ignore white spaces /x
- PCRE_UTF8 handles UTF8 chars built-in
- PCRE_UNGREEDY reverses * and *? N/A
- PCRE_NO_AUTO_CAPTURE disables capturing parens N/A (*)
-</pre>
-(*) Both Perl and PCRE allow non capturing parentheses by means of the
-"?:" modifier within the pattern itself. e.g. (?:ab|cd) does not
-capture, while (ab|cd) does.
-</P>
-<P>
-For a full account on how each modifier works, please check the
-PCRE API reference page.
-</P>
-<P>
-For each modifier, there are two member functions whose name is made
-out of the modifier in lowercase, without the "PCRE_" prefix. For
-instance, PCRE_CASELESS is handled by
-<pre>
- bool caseless()
-</pre>
-which returns true if the modifier is set, and
-<pre>
- RE_Options & set_caseless(bool)
-</pre>
-which sets or unsets the modifier. Moreover, PCRE_EXTRA_MATCH_LIMIT can be
-accessed through the <b>set_match_limit()</b> and <b>match_limit()</b> member
-functions. Setting <i>match_limit</i> to a non-zero value will limit the
-execution of pcre to keep it from doing bad things like blowing the stack or
-taking an eternity to return a result. A value of 5000 is good enough to stop
-stack blowup in a 2MB thread stack. Setting <i>match_limit</i> to zero disables
-match limiting. Alternatively, you can call <b>match_limit_recursion()</b>
-which uses PCRE_EXTRA_MATCH_LIMIT_RECURSION to limit how much PCRE
-recurses. <b>match_limit()</b> limits the number of matches PCRE does;
-<b>match_limit_recursion()</b> limits the depth of internal recursion, and
-therefore the amount of stack that is used.
-</P>
-<P>
-Normally, to pass one or more modifiers to a RE class, you declare
-a <i>RE_Options</i> object, set the appropriate options, and pass this
-object to a RE constructor. Example:
-<pre>
- RE_Options opt;
- opt.set_caseless(true);
- if (RE("HELLO", opt).PartialMatch("hello world")) ...
-</pre>
-RE_options has two constructors. The default constructor takes no arguments and
-creates a set of flags that are off by default. The optional parameter
-<i>option_flags</i> is to facilitate transfer of legacy code from C programs.
-This lets you do
-<pre>
- RE(pattern,
- RE_Options(PCRE_CASELESS|PCRE_MULTILINE)).PartialMatch(str);
-</pre>
-However, new code is better off doing
-<pre>
- RE(pattern,
- RE_Options().set_caseless(true).set_multiline(true))
- .PartialMatch(str);
-</pre>
-If you are going to pass one of the most used modifiers, there are some
-convenience functions that return a RE_Options class with the
-appropriate modifier already set: <b>CASELESS()</b>, <b>UTF8()</b>,
-<b>MULTILINE()</b>, <b>DOTALL</b>(), and <b>EXTENDED()</b>.
-</P>
-<P>
-If you need to set several options at once, and you don't want to go through
-the pains of declaring a RE_Options object and setting several options, there
-is a parallel method that give you such ability on the fly. You can concatenate
-several <b>set_xxxxx()</b> member functions, since each of them returns a
-reference to its class object. For example, to pass PCRE_CASELESS,
-PCRE_EXTENDED, and PCRE_MULTILINE to a RE with one statement, you may write:
-<pre>
- RE(" ^ xyz \\s+ .* blah$",
- RE_Options()
- .set_caseless(true)
- .set_extended(true)
- .set_multiline(true)).PartialMatch(sometext);
-
-</PRE>
-</P>
-<br><a name="SEC8" href="#TOC1">SCANNING TEXT INCREMENTALLY</a><br>
-<P>
-The "Consume" operation may be useful if you want to repeatedly
-match regular expressions at the front of a string and skip over
-them as they match. This requires use of the "StringPiece" type,
-which represents a sub-range of a real string. Like RE, StringPiece
-is defined in the pcrecpp namespace.
-<pre>
- Example: read lines of the form "var = value" from a string.
- string contents = ...; // Fill string somehow
- pcrecpp::StringPiece input(contents); // Wrap in a StringPiece
-
- string var;
- int value;
- pcrecpp::RE re("(\\w+) = (\\d+)\n");
- while (re.Consume(&input, &var, &value)) {
- ...;
- }
-</pre>
-Each successful call to "Consume" will set "var/value", and also
-advance "input" so it points past the matched text.
-</P>
-<P>
-The "FindAndConsume" operation is similar to "Consume" but does not
-anchor your match at the beginning of the string. For example, you
-could extract all words from a string by repeatedly calling
-<pre>
- pcrecpp::RE("(\\w+)").FindAndConsume(&input, &word)
-</PRE>
-</P>
-<br><a name="SEC9" href="#TOC1">PARSING HEX/OCTAL/C-RADIX NUMBERS</a><br>
-<P>
-By default, if you pass a pointer to a numeric value, the
-corresponding text is interpreted as a base-10 number. You can
-instead wrap the pointer with a call to one of the operators Hex(),
-Octal(), or CRadix() to interpret the text in another base. The
-CRadix operator interprets C-style "0" (base-8) and "0x" (base-16)
-prefixes, but defaults to base-10.
-<pre>
- Example:
- int a, b, c, d;
- pcrecpp::RE re("(.*) (.*) (.*) (.*)");
- re.FullMatch("100 40 0100 0x40",
- pcrecpp::Octal(&a), pcrecpp::Hex(&b),
- pcrecpp::CRadix(&c), pcrecpp::CRadix(&d));
-</pre>
-will leave 64 in a, b, c, and d.
-</P>
-<br><a name="SEC10" href="#TOC1">REPLACING PARTS OF STRINGS</a><br>
-<P>
-You can replace the first match of "pattern" in "str" with "rewrite".
-Within "rewrite", backslash-escaped digits (\1 to \9) can be
-used to insert text matching corresponding parenthesized group
-from the pattern. \0 in "rewrite" refers to the entire matching
-text. For example:
-<pre>
- string s = "yabba dabba doo";
- pcrecpp::RE("b+").Replace("d", &s);
-</pre>
-will leave "s" containing "yada dabba doo". The result is true if the pattern
-matches and a replacement occurs, false otherwise.
-</P>
-<P>
-<b>GlobalReplace</b> is like <b>Replace</b> except that it replaces all
-occurrences of the pattern in the string with the rewrite. Replacements are
-not subject to re-matching. For example:
-<pre>
- string s = "yabba dabba doo";
- pcrecpp::RE("b+").GlobalReplace("d", &s);
-</pre>
-will leave "s" containing "yada dada doo". It returns the number of
-replacements made.
-</P>
-<P>
-<b>Extract</b> is like <b>Replace</b>, except that if the pattern matches,
-"rewrite" is copied into "out" (an additional argument) with substitutions.
-The non-matching portions of "text" are ignored. Returns true iff a match
-occurred and the extraction happened successfully; if no match occurs, the
-string is left unaffected.
-</P>
-<br><a name="SEC11" href="#TOC1">AUTHOR</a><br>
-<P>
-The C++ wrapper was contributed by Google Inc.
-<br>
-Copyright &copy; 2007 Google Inc.
-<br>
-</P>
-<br><a name="SEC12" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 08 January 2012
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcredemo.html b/libs/Pcre16/docs/doc/html/pcredemo.html
deleted file mode 100644
index 894a930826..0000000000
--- a/libs/Pcre16/docs/doc/html/pcredemo.html
+++ /dev/null
@@ -1,426 +0,0 @@
-<html>
-<head>
-<title>pcredemo specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcredemo man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<ul>
-</ul>
-<PRE>
-/*************************************************
-* PCRE DEMONSTRATION PROGRAM *
-*************************************************/
-
-/* This is a demonstration program to illustrate the most straightforward ways
-of calling the PCRE regular expression library from a C program. See the
-pcresample documentation for a short discussion ("man pcresample" if you have
-the PCRE man pages installed).
-
-In Unix-like environments, if PCRE is installed in your standard system
-libraries, you should be able to compile this program using this command:
-
-gcc -Wall pcredemo.c -lpcre -o pcredemo
-
-If PCRE is not installed in a standard place, it is likely to be installed with
-support for the pkg-config mechanism. If you have pkg-config, you can compile
-this program using this command:
-
-gcc -Wall pcredemo.c `pkg-config --cflags --libs libpcre` -o pcredemo
-
-If you do not have pkg-config, you may have to use this:
-
-gcc -Wall pcredemo.c -I/usr/local/include -L/usr/local/lib \
- -R/usr/local/lib -lpcre -o pcredemo
-
-Replace "/usr/local/include" and "/usr/local/lib" with wherever the include and
-library files for PCRE are installed on your system. Only some operating
-systems (e.g. Solaris) use the -R option.
-
-Building under Windows:
-
-If you want to statically link this 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. So in this environment, uncomment the following line. */
-
-/* #define PCRE_STATIC */
-
-#include &lt;stdio.h&gt;
-#include &lt;string.h&gt;
-#include &lt;pcre.h&gt;
-
-#define OVECCOUNT 30 /* should be a multiple of 3 */
-
-
-int main(int argc, char **argv)
-{
-pcre *re;
-const char *error;
-char *pattern;
-char *subject;
-unsigned char *name_table;
-unsigned int option_bits;
-int erroffset;
-int find_all;
-int crlf_is_newline;
-int namecount;
-int name_entry_size;
-int ovector[OVECCOUNT];
-int subject_length;
-int rc, i;
-int utf8;
-
-
-/**************************************************************************
-* First, sort out the command line. There is only one possible option at *
-* the moment, "-g" to request repeated matching to find all occurrences, *
-* like Perl's /g option. We set the variable find_all to a non-zero value *
-* if the -g option is present. Apart from that, there must be exactly two *
-* arguments. *
-**************************************************************************/
-
-find_all = 0;
-for (i = 1; i &lt; argc; i++)
- {
- if (strcmp(argv[i], "-g") == 0) find_all = 1;
- else break;
- }
-
-/* After the options, we require exactly two arguments, which are the pattern,
-and the subject string. */
-
-if (argc - i != 2)
- {
- printf("Two arguments required: a regex and a subject string\n");
- return 1;
- }
-
-pattern = argv[i];
-subject = argv[i+1];
-subject_length = (int)strlen(subject);
-
-
-/*************************************************************************
-* Now we are going to compile the regular expression pattern, and handle *
-* and errors that are detected. *
-*************************************************************************/
-
-re = pcre_compile(
- pattern, /* the pattern */
- 0, /* default options */
- &amp;error, /* for error message */
- &amp;erroffset, /* for error offset */
- NULL); /* use default character tables */
-
-/* Compilation failed: print the error message and exit */
-
-if (re == NULL)
- {
- printf("PCRE compilation failed at offset %d: %s\n", erroffset, error);
- return 1;
- }
-
-
-/*************************************************************************
-* If the compilation succeeded, we call PCRE again, in order to do a *
-* pattern match against the subject string. This does just ONE match. If *
-* further matching is needed, it will be done below. *
-*************************************************************************/
-
-rc = pcre_exec(
- re, /* the compiled pattern */
- NULL, /* no extra data - we didn't study the pattern */
- subject, /* the subject string */
- subject_length, /* the length of the subject */
- 0, /* start at offset 0 in the subject */
- 0, /* default options */
- ovector, /* output vector for substring information */
- OVECCOUNT); /* number of elements in the output vector */
-
-/* Matching failed: handle error cases */
-
-if (rc &lt; 0)
- {
- switch(rc)
- {
- case PCRE_ERROR_NOMATCH: printf("No match\n"); break;
- /*
- Handle other special cases if you like
- */
- default: printf("Matching error %d\n", rc); break;
- }
- pcre_free(re); /* Release memory used for the compiled pattern */
- return 1;
- }
-
-/* Match succeded */
-
-printf("\nMatch succeeded at offset %d\n", ovector[0]);
-
-
-/*************************************************************************
-* We have found the first match within the subject string. If the output *
-* vector wasn't big enough, say so. Then output any substrings that were *
-* captured. *
-*************************************************************************/
-
-/* The output vector wasn't big enough */
-
-if (rc == 0)
- {
- rc = OVECCOUNT/3;
- printf("ovector only has room for %d captured substrings\n", rc - 1);
- }
-
-/* Show substrings stored in the output vector by number. Obviously, in a real
-application you might want to do things other than print them. */
-
-for (i = 0; i &lt; rc; i++)
- {
- char *substring_start = subject + ovector[2*i];
- int substring_length = ovector[2*i+1] - ovector[2*i];
- printf("%2d: %.*s\n", i, substring_length, substring_start);
- }
-
-
-/**************************************************************************
-* That concludes the basic part of this demonstration program. We have *
-* compiled a pattern, and performed a single match. The code that follows *
-* shows first how to access named substrings, and then how to code for *
-* repeated matches on the same subject. *
-**************************************************************************/
-
-/* See if there are any named substrings, and if so, show them by name. First
-we have to extract the count of named parentheses from the pattern. */
-
-(void)pcre_fullinfo(
- re, /* the compiled pattern */
- NULL, /* no extra data - we didn't study the pattern */
- PCRE_INFO_NAMECOUNT, /* number of named substrings */
- &amp;namecount); /* where to put the answer */
-
-if (namecount &lt;= 0) printf("No named substrings\n"); else
- {
- unsigned char *tabptr;
- printf("Named substrings\n");
-
- /* Before we can access the substrings, we must extract the table for
- translating names to numbers, and the size of each entry in the table. */
-
- (void)pcre_fullinfo(
- re, /* the compiled pattern */
- NULL, /* no extra data - we didn't study the pattern */
- PCRE_INFO_NAMETABLE, /* address of the table */
- &amp;name_table); /* where to put the answer */
-
- (void)pcre_fullinfo(
- re, /* the compiled pattern */
- NULL, /* no extra data - we didn't study the pattern */
- PCRE_INFO_NAMEENTRYSIZE, /* size of each entry in the table */
- &amp;name_entry_size); /* where to put the answer */
-
- /* Now we can scan the table and, for each entry, print the number, the name,
- and the substring itself. */
-
- tabptr = name_table;
- for (i = 0; i &lt; namecount; i++)
- {
- int n = (tabptr[0] &lt;&lt; 8) | tabptr[1];
- printf("(%d) %*s: %.*s\n", n, name_entry_size - 3, tabptr + 2,
- ovector[2*n+1] - ovector[2*n], subject + ovector[2*n]);
- tabptr += name_entry_size;
- }
- }
-
-
-/*************************************************************************
-* If the "-g" option was given on the command line, we want to continue *
-* to search for additional matches in the subject string, in a similar *
-* way to the /g option in Perl. This turns out to be trickier than you *
-* might think because of the possibility of matching an empty string. *
-* What happens is as follows: *
-* *
-* If the previous match was NOT for an empty string, we can just start *
-* the next match at the end of the previous one. *
-* *
-* If the previous match WAS for an empty string, we can't do that, as it *
-* would lead to an infinite loop. Instead, a special call of pcre_exec() *
-* is made with the PCRE_NOTEMPTY_ATSTART and PCRE_ANCHORED flags set. *
-* The first of these tells PCRE that an empty string at the start of the *
-* subject is not a valid match; other possibilities must be tried. The *
-* second flag restricts PCRE to one match attempt at the initial string *
-* position. If this match succeeds, an alternative to the empty string *
-* match has been found, and we can print it and proceed round the loop, *
-* advancing by the length of whatever was found. If this match does not *
-* succeed, we still stay in the loop, advancing by just one character. *
-* In UTF-8 mode, which can be set by (*UTF8) in the pattern, this may be *
-* more than one byte. *
-* *
-* However, there is a complication concerned with newlines. When the *
-* newline convention is such that CRLF is a valid newline, we must *
-* advance by two characters rather than one. The newline convention can *
-* be set in the regex by (*CR), etc.; if not, we must find the default. *
-*************************************************************************/
-
-if (!find_all) /* Check for -g */
- {
- pcre_free(re); /* Release the memory used for the compiled pattern */
- return 0; /* Finish unless -g was given */
- }
-
-/* Before running the loop, check for UTF-8 and whether CRLF is a valid newline
-sequence. First, find the options with which the regex was compiled; extract
-the UTF-8 state, and mask off all but the newline options. */
-
-(void)pcre_fullinfo(re, NULL, PCRE_INFO_OPTIONS, &amp;option_bits);
-utf8 = option_bits &amp; PCRE_UTF8;
-option_bits &amp;= PCRE_NEWLINE_CR|PCRE_NEWLINE_LF|PCRE_NEWLINE_CRLF|
- PCRE_NEWLINE_ANY|PCRE_NEWLINE_ANYCRLF;
-
-/* If no newline options were set, find the default newline convention from the
-build configuration. */
-
-if (option_bits == 0)
- {
- int d;
- (void)pcre_config(PCRE_CONFIG_NEWLINE, &amp;d);
- /* Note that these values are always the ASCII ones, even in
- EBCDIC environments. CR = 13, NL = 10. */
- option_bits = (d == 13)? PCRE_NEWLINE_CR :
- (d == 10)? PCRE_NEWLINE_LF :
- (d == (13&lt;&lt;8 | 10))? PCRE_NEWLINE_CRLF :
- (d == -2)? PCRE_NEWLINE_ANYCRLF :
- (d == -1)? PCRE_NEWLINE_ANY : 0;
- }
-
-/* See if CRLF is a valid newline sequence. */
-
-crlf_is_newline =
- option_bits == PCRE_NEWLINE_ANY ||
- option_bits == PCRE_NEWLINE_CRLF ||
- option_bits == PCRE_NEWLINE_ANYCRLF;
-
-/* Loop for second and subsequent matches */
-
-for (;;)
- {
- int options = 0; /* Normally no options */
- int start_offset = ovector[1]; /* Start at end of previous match */
-
- /* If the previous match was for an empty string, we are finished if we are
- at the end of the subject. Otherwise, arrange to run another match at the
- same point to see if a non-empty match can be found. */
-
- if (ovector[0] == ovector[1])
- {
- if (ovector[0] == subject_length) break;
- options = PCRE_NOTEMPTY_ATSTART | PCRE_ANCHORED;
- }
-
- /* Run the next matching operation */
-
- rc = pcre_exec(
- re, /* the compiled pattern */
- NULL, /* no extra data - we didn't study the pattern */
- subject, /* the subject string */
- subject_length, /* the length of the subject */
- start_offset, /* starting offset in the subject */
- options, /* options */
- ovector, /* output vector for substring information */
- OVECCOUNT); /* number of elements in the output vector */
-
- /* This time, a result of NOMATCH isn't an error. If the value in "options"
- is zero, it just means we have found all possible matches, so the loop ends.
- Otherwise, it means we have failed to find a non-empty-string match at a
- point where there was a previous empty-string match. In this case, we do what
- Perl does: advance the matching position by one character, and continue. We
- do this by setting the "end of previous match" offset, because that is picked
- up at the top of the loop as the point at which to start again.
-
- There are two complications: (a) When CRLF is a valid newline sequence, and
- the current position is just before it, advance by an extra byte. (b)
- Otherwise we must ensure that we skip an entire UTF-8 character if we are in
- UTF-8 mode. */
-
- if (rc == PCRE_ERROR_NOMATCH)
- {
- if (options == 0) break; /* All matches found */
- ovector[1] = start_offset + 1; /* Advance one byte */
- if (crlf_is_newline &amp;&amp; /* If CRLF is newline &amp; */
- start_offset &lt; subject_length - 1 &amp;&amp; /* we are at CRLF, */
- subject[start_offset] == '\r' &amp;&amp;
- subject[start_offset + 1] == '\n')
- ovector[1] += 1; /* Advance by one more. */
- else if (utf8) /* Otherwise, ensure we */
- { /* advance a whole UTF-8 */
- while (ovector[1] &lt; subject_length) /* character. */
- {
- if ((subject[ovector[1]] &amp; 0xc0) != 0x80) break;
- ovector[1] += 1;
- }
- }
- continue; /* Go round the loop again */
- }
-
- /* Other matching errors are not recoverable. */
-
- if (rc &lt; 0)
- {
- printf("Matching error %d\n", rc);
- pcre_free(re); /* Release memory used for the compiled pattern */
- return 1;
- }
-
- /* Match succeded */
-
- printf("\nMatch succeeded again at offset %d\n", ovector[0]);
-
- /* The match succeeded, but the output vector wasn't big enough. */
-
- if (rc == 0)
- {
- rc = OVECCOUNT/3;
- printf("ovector only has room for %d captured substrings\n", rc - 1);
- }
-
- /* As before, show substrings stored in the output vector by number, and then
- also any named substrings. */
-
- for (i = 0; i &lt; rc; i++)
- {
- char *substring_start = subject + ovector[2*i];
- int substring_length = ovector[2*i+1] - ovector[2*i];
- printf("%2d: %.*s\n", i, substring_length, substring_start);
- }
-
- if (namecount &lt;= 0) printf("No named substrings\n"); else
- {
- unsigned char *tabptr = name_table;
- printf("Named substrings\n");
- for (i = 0; i &lt; namecount; i++)
- {
- int n = (tabptr[0] &lt;&lt; 8) | tabptr[1];
- printf("(%d) %*s: %.*s\n", n, name_entry_size - 3, tabptr + 2,
- ovector[2*n+1] - ovector[2*n], subject + ovector[2*n]);
- tabptr += name_entry_size;
- }
- }
- } /* End of loop to find second and subsequent matches */
-
-printf("\n");
-pcre_free(re); /* Release memory used for the compiled pattern */
-return 0;
-}
-
-/* End of pcredemo.c */
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcregrep.html b/libs/Pcre16/docs/doc/html/pcregrep.html
deleted file mode 100644
index dacbb4998f..0000000000
--- a/libs/Pcre16/docs/doc/html/pcregrep.html
+++ /dev/null
@@ -1,759 +0,0 @@
-<html>
-<head>
-<title>pcregrep specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcregrep man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">SYNOPSIS</a>
-<li><a name="TOC2" href="#SEC2">DESCRIPTION</a>
-<li><a name="TOC3" href="#SEC3">SUPPORT FOR COMPRESSED FILES</a>
-<li><a name="TOC4" href="#SEC4">BINARY FILES</a>
-<li><a name="TOC5" href="#SEC5">OPTIONS</a>
-<li><a name="TOC6" href="#SEC6">ENVIRONMENT VARIABLES</a>
-<li><a name="TOC7" href="#SEC7">NEWLINES</a>
-<li><a name="TOC8" href="#SEC8">OPTIONS COMPATIBILITY</a>
-<li><a name="TOC9" href="#SEC9">OPTIONS WITH DATA</a>
-<li><a name="TOC10" href="#SEC10">MATCHING ERRORS</a>
-<li><a name="TOC11" href="#SEC11">DIAGNOSTICS</a>
-<li><a name="TOC12" href="#SEC12">SEE ALSO</a>
-<li><a name="TOC13" href="#SEC13">AUTHOR</a>
-<li><a name="TOC14" href="#SEC14">REVISION</a>
-</ul>
-<br><a name="SEC1" href="#TOC1">SYNOPSIS</a><br>
-<P>
-<b>pcregrep [options] [long options] [pattern] [path1 path2 ...]</b>
-</P>
-<br><a name="SEC2" href="#TOC1">DESCRIPTION</a><br>
-<P>
-<b>pcregrep</b> searches files for character patterns, in the same way as other
-grep commands do, but it uses the PCRE regular expression library to support
-patterns that are compatible with the regular expressions of Perl 5. See
-<a href="pcresyntax.html"><b>pcresyntax</b>(3)</a>
-for a quick-reference summary of pattern syntax, or
-<a href="pcrepattern.html"><b>pcrepattern</b>(3)</a>
-for a full description of the syntax and semantics of the regular expressions
-that PCRE supports.
-</P>
-<P>
-Patterns, whether supplied on the command line or in a separate file, are given
-without delimiters. For example:
-<pre>
- pcregrep Thursday /etc/motd
-</pre>
-If you attempt to use delimiters (for example, by surrounding a pattern with
-slashes, as is common in Perl scripts), they are interpreted as part of the
-pattern. Quotes can of course be used to delimit patterns on the command line
-because they are interpreted by the shell, and indeed quotes are required if a
-pattern contains white space or shell metacharacters.
-</P>
-<P>
-The first argument that follows any option settings is treated as the single
-pattern to be matched when neither <b>-e</b> nor <b>-f</b> is present.
-Conversely, when one or both of these options are used to specify patterns, all
-arguments are treated as path names. At least one of <b>-e</b>, <b>-f</b>, or an
-argument pattern must be provided.
-</P>
-<P>
-If no files are specified, <b>pcregrep</b> reads the standard input. The
-standard input can also be referenced by a name consisting of a single hyphen.
-For example:
-<pre>
- pcregrep some-pattern /file1 - /file3
-</pre>
-By default, each line that matches a pattern is copied to the standard
-output, and if there is more than one file, the file name is output at the
-start of each line, followed by a colon. However, there are options that can
-change how <b>pcregrep</b> behaves. In particular, the <b>-M</b> option makes it
-possible to search for patterns that span line boundaries. What defines a line
-boundary is controlled by the <b>-N</b> (<b>--newline</b>) option.
-</P>
-<P>
-The amount of memory used for buffering files that are being scanned is
-controlled by a parameter that can be set by the <b>--buffer-size</b> option.
-The default value for this parameter is specified when <b>pcregrep</b> is built,
-with the default default being 20K. A block of memory three times this size is
-used (to allow for buffering "before" and "after" lines). An error occurs if a
-line overflows the buffer.
-</P>
-<P>
-Patterns can be no longer than 8K or BUFSIZ bytes, whichever is the greater.
-BUFSIZ is defined in <b>&#60;stdio.h&#62;</b>. When there is more than one pattern
-(specified by the use of <b>-e</b> and/or <b>-f</b>), each pattern is applied to
-each line in the order in which they are defined, except that all the <b>-e</b>
-patterns are tried before the <b>-f</b> patterns.
-</P>
-<P>
-By default, as soon as one pattern matches a line, no further patterns are
-considered. However, if <b>--colour</b> (or <b>--color</b>) is used to colour the
-matching substrings, or if <b>--only-matching</b>, <b>--file-offsets</b>, or
-<b>--line-offsets</b> is used to output only the part of the line that matched
-(either shown literally, or as an offset), scanning resumes immediately
-following the match, so that further matches on the same line can be found. If
-there are multiple patterns, they are all tried on the remainder of the line,
-but patterns that follow the one that matched are not tried on the earlier part
-of the line.
-</P>
-<P>
-This behaviour means that the order in which multiple patterns are specified
-can affect the output when one of the above options is used. This is no longer
-the same behaviour as GNU grep, which now manages to display earlier matches
-for later patterns (as long as there is no overlap).
-</P>
-<P>
-Patterns that can match an empty string are accepted, but empty string
-matches are never recognized. An example is the pattern "(super)?(man)?", in
-which all components are optional. This pattern finds all occurrences of both
-"super" and "man"; the output differs from matching with "super|man" when only
-the matching substrings are being shown.
-</P>
-<P>
-If the <b>LC_ALL</b> or <b>LC_CTYPE</b> environment variable is set,
-<b>pcregrep</b> uses the value to set a locale when calling the PCRE library.
-The <b>--locale</b> option can be used to override this.
-</P>
-<br><a name="SEC3" href="#TOC1">SUPPORT FOR COMPRESSED FILES</a><br>
-<P>
-It is possible to compile <b>pcregrep</b> so that it uses <b>libz</b> or
-<b>libbz2</b> to read files whose names end in <b>.gz</b> or <b>.bz2</b>,
-respectively. You can find out whether your binary has support for one or both
-of these file types by running it with the <b>--help</b> option. If the
-appropriate support is not present, files are treated as plain text. The
-standard input is always so treated.
-</P>
-<br><a name="SEC4" href="#TOC1">BINARY FILES</a><br>
-<P>
-By default, a file that contains a binary zero byte within the first 1024 bytes
-is identified as a binary file, and is processed specially. (GNU grep also
-identifies binary files in this manner.) See the <b>--binary-files</b> option
-for a means of changing the way binary files are handled.
-</P>
-<br><a name="SEC5" href="#TOC1">OPTIONS</a><br>
-<P>
-The order in which some of the options appear can affect the output. For
-example, both the <b>-h</b> and <b>-l</b> options affect the printing of file
-names. Whichever comes later in the command line will be the one that takes
-effect. Similarly, except where noted below, if an option is given twice, the
-later setting is used. Numerical values for options may be followed by K or M,
-to signify multiplication by 1024 or 1024*1024 respectively.
-</P>
-<P>
-<b>--</b>
-This terminates the list of options. It is useful if the next item on the
-command line starts with a hyphen but is not an option. This allows for the
-processing of patterns and filenames that start with hyphens.
-</P>
-<P>
-<b>-A</b> <i>number</i>, <b>--after-context=</b><i>number</i>
-Output <i>number</i> lines of context after each matching line. If filenames
-and/or line numbers are being output, a hyphen separator is used instead of a
-colon for the context lines. A line containing "--" is output between each
-group of lines, unless they are in fact contiguous in the input file. The value
-of <i>number</i> is expected to be relatively small. However, <b>pcregrep</b>
-guarantees to have up to 8K of following text available for context output.
-</P>
-<P>
-<b>-a</b>, <b>--text</b>
-Treat binary files as text. This is equivalent to
-<b>--binary-files</b>=<i>text</i>.
-</P>
-<P>
-<b>-B</b> <i>number</i>, <b>--before-context=</b><i>number</i>
-Output <i>number</i> lines of context before each matching line. If filenames
-and/or line numbers are being output, a hyphen separator is used instead of a
-colon for the context lines. A line containing "--" is output between each
-group of lines, unless they are in fact contiguous in the input file. The value
-of <i>number</i> is expected to be relatively small. However, <b>pcregrep</b>
-guarantees to have up to 8K of preceding text available for context output.
-</P>
-<P>
-<b>--binary-files=</b><i>word</i>
-Specify how binary files are to be processed. If the word is "binary" (the
-default), pattern matching is performed on binary files, but the only output is
-"Binary file &#60;name&#62; matches" when a match succeeds. If the word is "text",
-which is equivalent to the <b>-a</b> or <b>--text</b> option, binary files are
-processed in the same way as any other file. In this case, when a match
-succeeds, the output may be binary garbage, which can have nasty effects if
-sent to a terminal. If the word is "without-match", which is equivalent to the
-<b>-I</b> option, binary files are not processed at all; they are assumed not to
-be of interest.
-</P>
-<P>
-<b>--buffer-size=</b><i>number</i>
-Set the parameter that controls how much memory is used for buffering files
-that are being scanned.
-</P>
-<P>
-<b>-C</b> <i>number</i>, <b>--context=</b><i>number</i>
-Output <i>number</i> lines of context both before and after each matching line.
-This is equivalent to setting both <b>-A</b> and <b>-B</b> to the same value.
-</P>
-<P>
-<b>-c</b>, <b>--count</b>
-Do not output individual lines from the files that are being scanned; instead
-output the number of lines that would otherwise have been shown. If no lines
-are selected, the number zero is output. If several files are are being
-scanned, a count is output for each of them. However, if the
-<b>--files-with-matches</b> option is also used, only those files whose counts
-are greater than zero are listed. When <b>-c</b> is used, the <b>-A</b>,
-<b>-B</b>, and <b>-C</b> options are ignored.
-</P>
-<P>
-<b>--colour</b>, <b>--color</b>
-If this option is given without any data, it is equivalent to "--colour=auto".
-If data is required, it must be given in the same shell item, separated by an
-equals sign.
-</P>
-<P>
-<b>--colour=</b><i>value</i>, <b>--color=</b><i>value</i>
-This option specifies under what circumstances the parts of a line that matched
-a pattern should be coloured in the output. By default, the output is not
-coloured. The value (which is optional, see above) may be "never", "always", or
-"auto". In the latter case, colouring happens only if the standard output is
-connected to a terminal. More resources are used when colouring is enabled,
-because <b>pcregrep</b> has to search for all possible matches in a line, not
-just one, in order to colour them all.
-<br>
-<br>
-The colour that is used can be specified by setting the environment variable
-PCREGREP_COLOUR or PCREGREP_COLOR. The value of this variable should be a
-string of two numbers, separated by a semicolon. They are copied directly into
-the control string for setting colour on a terminal, so it is your
-responsibility to ensure that they make sense. If neither of the environment
-variables is set, the default is "1;31", which gives red.
-</P>
-<P>
-<b>-D</b> <i>action</i>, <b>--devices=</b><i>action</i>
-If an input path is not a regular file or a directory, "action" specifies how
-it is to be processed. Valid values are "read" (the default) or "skip"
-(silently skip the path).
-</P>
-<P>
-<b>-d</b> <i>action</i>, <b>--directories=</b><i>action</i>
-If an input path is a directory, "action" specifies how it is to be processed.
-Valid values are "read" (the default in non-Windows environments, for
-compatibility with GNU grep), "recurse" (equivalent to the <b>-r</b> option), or
-"skip" (silently skip the path, the default in Windows environments). In the
-"read" case, directories are read as if they were ordinary files. In some
-operating systems the effect of reading a directory like this is an immediate
-end-of-file; in others it may provoke an error.
-</P>
-<P>
-<b>-e</b> <i>pattern</i>, <b>--regex=</b><i>pattern</i>, <b>--regexp=</b><i>pattern</i>
-Specify a pattern to be matched. This option can be used multiple times in
-order to specify several patterns. It can also be used as a way of specifying a
-single pattern that starts with a hyphen. When <b>-e</b> is used, no argument
-pattern is taken from the command line; all arguments are treated as file
-names. There is no limit to the number of patterns. They are applied to each
-line in the order in which they are defined until one matches.
-<br>
-<br>
-If <b>-f</b> is used with <b>-e</b>, the command line patterns are matched first,
-followed by the patterns from the file(s), independent of the order in which
-these options are specified. Note that multiple use of <b>-e</b> is not the same
-as a single pattern with alternatives. For example, X|Y finds the first
-character in a line that is X or Y, whereas if the two patterns are given
-separately, with X first, <b>pcregrep</b> finds X if it is present, even if it
-follows Y in the line. It finds Y only if there is no X in the line. This
-matters only if you are using <b>-o</b> or <b>--colo(u)r</b> to show the part(s)
-of the line that matched.
-</P>
-<P>
-<b>--exclude</b>=<i>pattern</i>
-Files (but not directories) whose names match the pattern are skipped without
-being processed. This applies to all files, whether listed on the command line,
-obtained from <b>--file-list</b>, or by scanning a directory. The pattern is a
-PCRE regular expression, and is matched against the final component of the file
-name, not the entire path. The <b>-F</b>, <b>-w</b>, and <b>-x</b> options do not
-apply to this pattern. The option may be given any number of times in order to
-specify multiple patterns. If a file name matches both an <b>--include</b>
-and an <b>--exclude</b> pattern, it is excluded. There is no short form for this
-option.
-</P>
-<P>
-<b>--exclude-from=</b><i>filename</i>
-Treat each non-empty line of the file as the data for an <b>--exclude</b>
-option. What constitutes a newline when reading the file is the operating
-system's default. The <b>--newline</b> option has no effect on this option. This
-option may be given more than once in order to specify a number of files to
-read.
-</P>
-<P>
-<b>--exclude-dir</b>=<i>pattern</i>
-Directories whose names match the pattern are skipped without being processed,
-whatever the setting of the <b>--recursive</b> option. This applies to all
-directories, whether listed on the command line, obtained from
-<b>--file-list</b>, or by scanning a parent directory. The pattern is a PCRE
-regular expression, and is matched against the final component of the directory
-name, not the entire path. The <b>-F</b>, <b>-w</b>, and <b>-x</b> options do not
-apply to this pattern. The option may be given any number of times in order to
-specify more than one pattern. If a directory matches both <b>--include-dir</b>
-and <b>--exclude-dir</b>, it is excluded. There is no short form for this
-option.
-</P>
-<P>
-<b>-F</b>, <b>--fixed-strings</b>
-Interpret each data-matching pattern as a list of fixed strings, separated by
-newlines, instead of as a regular expression. What constitutes a newline for
-this purpose is controlled by the <b>--newline</b> option. The <b>-w</b> (match
-as a word) and <b>-x</b> (match whole line) options can be used with <b>-F</b>.
-They apply to each of the fixed strings. A line is selected if any of the fixed
-strings are found in it (subject to <b>-w</b> or <b>-x</b>, if present). This
-option applies only to the patterns that are matched against the contents of
-files; it does not apply to patterns specified by any of the <b>--include</b> or
-<b>--exclude</b> options.
-</P>
-<P>
-<b>-f</b> <i>filename</i>, <b>--file=</b><i>filename</i>
-Read patterns from the file, one per line, and match them against
-each line of input. What constitutes a newline when reading the file is the
-operating system's default. The <b>--newline</b> option has no effect on this
-option. Trailing white space is removed from each line, and blank lines are
-ignored. An empty file contains no patterns and therefore matches nothing. See
-also the comments about multiple patterns versus a single pattern with
-alternatives in the description of <b>-e</b> above.
-<br>
-<br>
-If this option is given more than once, all the specified files are
-read. A data line is output if any of the patterns match it. A filename can
-be given as "-" to refer to the standard input. When <b>-f</b> is used, patterns
-specified on the command line using <b>-e</b> may also be present; they are
-tested before the file's patterns. However, no other pattern is taken from the
-command line; all arguments are treated as the names of paths to be searched.
-</P>
-<P>
-<b>--file-list</b>=<i>filename</i>
-Read a list of files and/or directories that are to be scanned from the given
-file, one per line. Trailing white space is removed from each line, and blank
-lines are ignored. These paths are processed before any that are listed on the
-command line. The filename can be given as "-" to refer to the standard input.
-If <b>--file</b> and <b>--file-list</b> are both specified as "-", patterns are
-read first. This is useful only when the standard input is a terminal, from
-which further lines (the list of files) can be read after an end-of-file
-indication. If this option is given more than once, all the specified files are
-read.
-</P>
-<P>
-<b>--file-offsets</b>
-Instead of showing lines or parts of lines that match, show each match as an
-offset from the start of the file and a length, separated by a comma. In this
-mode, no context is shown. That is, the <b>-A</b>, <b>-B</b>, and <b>-C</b>
-options are ignored. If there is more than one match in a line, each of them is
-shown separately. This option is mutually exclusive with <b>--line-offsets</b>
-and <b>--only-matching</b>.
-</P>
-<P>
-<b>-H</b>, <b>--with-filename</b>
-Force the inclusion of the filename at the start of output lines when searching
-a single file. By default, the filename is not shown in this case. For matching
-lines, the filename is followed by a colon; for context lines, a hyphen
-separator is used. If a line number is also being output, it follows the file
-name.
-</P>
-<P>
-<b>-h</b>, <b>--no-filename</b>
-Suppress the output filenames when searching multiple files. By default,
-filenames are shown when multiple files are searched. For matching lines, the
-filename is followed by a colon; for context lines, a hyphen separator is used.
-If a line number is also being output, it follows the file name.
-</P>
-<P>
-<b>--help</b>
-Output a help message, giving brief details of the command options and file
-type support, and then exit. Anything else on the command line is
-ignored.
-</P>
-<P>
-<b>-I</b>
-Treat binary files as never matching. This is equivalent to
-<b>--binary-files</b>=<i>without-match</i>.
-</P>
-<P>
-<b>-i</b>, <b>--ignore-case</b>
-Ignore upper/lower case distinctions during comparisons.
-</P>
-<P>
-<b>--include</b>=<i>pattern</i>
-If any <b>--include</b> patterns are specified, the only files that are
-processed are those that match one of the patterns (and do not match an
-<b>--exclude</b> pattern). This option does not affect directories, but it
-applies to all files, whether listed on the command line, obtained from
-<b>--file-list</b>, or by scanning a directory. The pattern is a PCRE regular
-expression, and is matched against the final component of the file name, not
-the entire path. The <b>-F</b>, <b>-w</b>, and <b>-x</b> options do not apply to
-this pattern. The option may be given any number of times. If a file name
-matches both an <b>--include</b> and an <b>--exclude</b> pattern, it is excluded.
-There is no short form for this option.
-</P>
-<P>
-<b>--include-from=</b><i>filename</i>
-Treat each non-empty line of the file as the data for an <b>--include</b>
-option. What constitutes a newline for this purpose is the operating system's
-default. The <b>--newline</b> option has no effect on this option. This option
-may be given any number of times; all the files are read.
-</P>
-<P>
-<b>--include-dir</b>=<i>pattern</i>
-If any <b>--include-dir</b> patterns are specified, the only directories that
-are processed are those that match one of the patterns (and do not match an
-<b>--exclude-dir</b> pattern). This applies to all directories, whether listed
-on the command line, obtained from <b>--file-list</b>, or by scanning a parent
-directory. The pattern is a PCRE regular expression, and is matched against the
-final component of the directory name, not the entire path. The <b>-F</b>,
-<b>-w</b>, and <b>-x</b> options do not apply to this pattern. The option may be
-given any number of times. If a directory matches both <b>--include-dir</b> and
-<b>--exclude-dir</b>, it is excluded. There is no short form for this option.
-</P>
-<P>
-<b>-L</b>, <b>--files-without-match</b>
-Instead of outputting lines from the files, just output the names of the files
-that do not contain any lines that would have been output. Each file name is
-output once, on a separate line.
-</P>
-<P>
-<b>-l</b>, <b>--files-with-matches</b>
-Instead of outputting lines from the files, just output the names of the files
-containing lines that would have been output. Each file name is output
-once, on a separate line. Searching normally stops as soon as a matching line
-is found in a file. However, if the <b>-c</b> (count) option is also used,
-matching continues in order to obtain the correct count, and those files that
-have at least one match are listed along with their counts. Using this option
-with <b>-c</b> is a way of suppressing the listing of files with no matches.
-</P>
-<P>
-<b>--label</b>=<i>name</i>
-This option supplies a name to be used for the standard input when file names
-are being output. If not supplied, "(standard input)" is used. There is no
-short form for this option.
-</P>
-<P>
-<b>--line-buffered</b>
-When this option is given, input is read and processed line by line, and the
-output is flushed after each write. By default, input is read in large chunks,
-unless <b>pcregrep</b> can determine that it is reading from a terminal (which
-is currently possible only in Unix-like environments). Output to terminal is
-normally automatically flushed by the operating system. This option can be
-useful when the input or output is attached to a pipe and you do not want
-<b>pcregrep</b> to buffer up large amounts of data. However, its use will affect
-performance, and the <b>-M</b> (multiline) option ceases to work.
-</P>
-<P>
-<b>--line-offsets</b>
-Instead of showing lines or parts of lines that match, show each match as a
-line number, the offset from the start of the line, and a length. The line
-number is terminated by a colon (as usual; see the <b>-n</b> option), and the
-offset and length are separated by a comma. In this mode, no context is shown.
-That is, the <b>-A</b>, <b>-B</b>, and <b>-C</b> options are ignored. If there is
-more than one match in a line, each of them is shown separately. This option is
-mutually exclusive with <b>--file-offsets</b> and <b>--only-matching</b>.
-</P>
-<P>
-<b>--locale</b>=<i>locale-name</i>
-This option specifies a locale to be used for pattern matching. It overrides
-the value in the <b>LC_ALL</b> or <b>LC_CTYPE</b> environment variables. If no
-locale is specified, the PCRE library's default (usually the "C" locale) is
-used. There is no short form for this option.
-</P>
-<P>
-<b>--match-limit</b>=<i>number</i>
-Processing some regular expression patterns can require a very large amount of
-memory, leading in some cases to a program crash if not enough is available.
-Other patterns may take a very long time to search for all possible matching
-strings. The <b>pcre_exec()</b> function that is called by <b>pcregrep</b> to do
-the matching has two parameters that can limit the resources that it uses.
-<br>
-<br>
-The <b>--match-limit</b> option provides a means of limiting resource usage
-when processing patterns that are not going to match, but which have a very
-large number of possibilities in their search trees. The classic example is a
-pattern that uses nested unlimited repeats. Internally, PCRE uses a function
-called <b>match()</b> which it calls repeatedly (sometimes recursively). The
-limit set by <b>--match-limit</b> is imposed on the number of times this
-function is called during a match, which has the effect of limiting the amount
-of backtracking that can take place.
-<br>
-<br>
-The <b>--recursion-limit</b> option is similar to <b>--match-limit</b>, but
-instead of limiting the total number of times that <b>match()</b> is called, it
-limits the depth of recursive calls, which in turn limits the amount of memory
-that can be used. The recursion depth is a smaller number than the total number
-of calls, because not all calls to <b>match()</b> are recursive. This limit is
-of use only if it is set smaller than <b>--match-limit</b>.
-<br>
-<br>
-There are no short forms for these options. The default settings are specified
-when the PCRE library is compiled, with the default default being 10 million.
-</P>
-<P>
-<b>-M</b>, <b>--multiline</b>
-Allow patterns to match more than one line. When this option is given, patterns
-may usefully contain literal newline characters and internal occurrences of ^
-and $ characters. The output for a successful match may consist of more than
-one line, the last of which is the one in which the match ended. If the matched
-string ends with a newline sequence the output ends at the end of that line.
-<br>
-<br>
-When this option is set, the PCRE library is called in "multiline" mode.
-There is a limit to the number of lines that can be matched, imposed by the way
-that <b>pcregrep</b> buffers the input file as it scans it. However,
-<b>pcregrep</b> ensures that at least 8K characters or the rest of the document
-(whichever is the shorter) are available for forward matching, and similarly
-the previous 8K characters (or all the previous characters, if fewer than 8K)
-are guaranteed to be available for lookbehind assertions. This option does not
-work when input is read line by line (see \fP--line-buffered\fP.)
-</P>
-<P>
-<b>-N</b> <i>newline-type</i>, <b>--newline</b>=<i>newline-type</i>
-The PCRE library supports five different conventions for indicating
-the ends of lines. They are the single-character sequences CR (carriage return)
-and LF (linefeed), the two-character sequence CRLF, an "anycrlf" convention,
-which recognizes any of the preceding three types, and an "any" convention, in
-which any Unicode line ending sequence is assumed to end a line. The Unicode
-sequences are the three just mentioned, plus VT (vertical tab, U+000B), FF
-(form feed, U+000C), NEL (next line, U+0085), LS (line separator, U+2028), and
-PS (paragraph separator, U+2029).
-<br>
-<br>
-When the PCRE library is built, a default line-ending sequence is specified.
-This is normally the standard sequence for the operating system. Unless
-otherwise specified by this option, <b>pcregrep</b> uses the library's default.
-The possible values for this option are CR, LF, CRLF, ANYCRLF, or ANY. This
-makes it possible to use <b>pcregrep</b> to scan files that have come from other
-environments without having to modify their line endings. If the data that is
-being scanned does not agree with the convention set by this option,
-<b>pcregrep</b> may behave in strange ways. Note that this option does not
-apply to files specified by the <b>-f</b>, <b>--exclude-from</b>, or
-<b>--include-from</b> options, which are expected to use the operating system's
-standard newline sequence.
-</P>
-<P>
-<b>-n</b>, <b>--line-number</b>
-Precede each output line by its line number in the file, followed by a colon
-for matching lines or a hyphen for context lines. If the filename is also being
-output, it precedes the line number. This option is forced if
-<b>--line-offsets</b> is used.
-</P>
-<P>
-<b>--no-jit</b>
-If the PCRE library is built with support for just-in-time compiling (which
-speeds up matching), <b>pcregrep</b> automatically makes use of this, unless it
-was explicitly disabled at build time. This option can be used to disable the
-use of JIT at run time. It is provided for testing and working round problems.
-It should never be needed in normal use.
-</P>
-<P>
-<b>-o</b>, <b>--only-matching</b>
-Show only the part of the line that matched a pattern instead of the whole
-line. In this mode, no context is shown. That is, the <b>-A</b>, <b>-B</b>, and
-<b>-C</b> options are ignored. If there is more than one match in a line, each
-of them is shown separately. If <b>-o</b> is combined with <b>-v</b> (invert the
-sense of the match to find non-matching lines), no output is generated, but the
-return code is set appropriately. If the matched portion of the line is empty,
-nothing is output unless the file name or line number are being printed, in
-which case they are shown on an otherwise empty line. This option is mutually
-exclusive with <b>--file-offsets</b> and <b>--line-offsets</b>.
-</P>
-<P>
-<b>-o</b><i>number</i>, <b>--only-matching</b>=<i>number</i>
-Show only the part of the line that matched the capturing parentheses of the
-given number. Up to 32 capturing parentheses are supported, and -o0 is
-equivalent to <b>-o</b> without a number. Because these options can be given
-without an argument (see above), if an argument is present, it must be given in
-the same shell item, for example, -o3 or --only-matching=2. The comments given
-for the non-argument case above also apply to this case. If the specified
-capturing parentheses do not exist in the pattern, or were not set in the
-match, nothing is output unless the file name or line number are being printed.
-<br>
-<br>
-If this option is given multiple times, multiple substrings are output, in the
-order the options are given. For example, -o3 -o1 -o3 causes the substrings
-matched by capturing parentheses 3 and 1 and then 3 again to be output. By
-default, there is no separator (but see the next option).
-</P>
-<P>
-<b>--om-separator</b>=<i>text</i>
-Specify a separating string for multiple occurrences of <b>-o</b>. The default
-is an empty string. Separating strings are never coloured.
-</P>
-<P>
-<b>-q</b>, <b>--quiet</b>
-Work quietly, that is, display nothing except error messages. The exit
-status indicates whether or not any matches were found.
-</P>
-<P>
-<b>-r</b>, <b>--recursive</b>
-If any given path is a directory, recursively scan the files it contains,
-taking note of any <b>--include</b> and <b>--exclude</b> settings. By default, a
-directory is read as a normal file; in some operating systems this gives an
-immediate end-of-file. This option is a shorthand for setting the <b>-d</b>
-option to "recurse".
-</P>
-<P>
-<b>--recursion-limit</b>=<i>number</i>
-See <b>--match-limit</b> above.
-</P>
-<P>
-<b>-s</b>, <b>--no-messages</b>
-Suppress error messages about non-existent or unreadable files. Such files are
-quietly skipped. However, the return code is still 2, even if matches were
-found in other files.
-</P>
-<P>
-<b>-u</b>, <b>--utf-8</b>
-Operate in UTF-8 mode. This option is available only if PCRE has been compiled
-with UTF-8 support. All patterns (including those for any <b>--exclude</b> and
-<b>--include</b> options) and all subject lines that are scanned must be valid
-strings of UTF-8 characters.
-</P>
-<P>
-<b>-V</b>, <b>--version</b>
-Write the version numbers of <b>pcregrep</b> and the PCRE library to the
-standard output and then exit. Anything else on the command line is
-ignored.
-</P>
-<P>
-<b>-v</b>, <b>--invert-match</b>
-Invert the sense of the match, so that lines which do <i>not</i> match any of
-the patterns are the ones that are found.
-</P>
-<P>
-<b>-w</b>, <b>--word-regex</b>, <b>--word-regexp</b>
-Force the patterns to match only whole words. This is equivalent to having \b
-at the start and end of the pattern. This option applies only to the patterns
-that are matched against the contents of files; it does not apply to patterns
-specified by any of the <b>--include</b> or <b>--exclude</b> options.
-</P>
-<P>
-<b>-x</b>, <b>--line-regex</b>, <b>--line-regexp</b>
-Force the patterns to be anchored (each must start matching at the beginning of
-a line) and in addition, require them to match entire lines. This is equivalent
-to having ^ and $ characters at the start and end of each alternative branch in
-every pattern. This option applies only to the patterns that are matched
-against the contents of files; it does not apply to patterns specified by any
-of the <b>--include</b> or <b>--exclude</b> options.
-</P>
-<br><a name="SEC6" href="#TOC1">ENVIRONMENT VARIABLES</a><br>
-<P>
-The environment variables <b>LC_ALL</b> and <b>LC_CTYPE</b> are examined, in that
-order, for a locale. The first one that is set is used. This can be overridden
-by the <b>--locale</b> option. If no locale is set, the PCRE library's default
-(usually the "C" locale) is used.
-</P>
-<br><a name="SEC7" href="#TOC1">NEWLINES</a><br>
-<P>
-The <b>-N</b> (<b>--newline</b>) option allows <b>pcregrep</b> to scan files with
-different newline conventions from the default. Any parts of the input files
-that are written to the standard output are copied identically, with whatever
-newline sequences they have in the input. However, the setting of this option
-does not affect the interpretation of files specified by the <b>-f</b>,
-<b>--exclude-from</b>, or <b>--include-from</b> options, which are assumed to use
-the operating system's standard newline sequence, nor does it affect the way in
-which <b>pcregrep</b> writes informational messages to the standard error and
-output streams. For these it uses the string "\n" to indicate newlines,
-relying on the C I/O library to convert this to an appropriate sequence.
-</P>
-<br><a name="SEC8" href="#TOC1">OPTIONS COMPATIBILITY</a><br>
-<P>
-Many of the short and long forms of <b>pcregrep</b>'s options are the same
-as in the GNU <b>grep</b> program. Any long option of the form
-<b>--xxx-regexp</b> (GNU terminology) is also available as <b>--xxx-regex</b>
-(PCRE terminology). However, the <b>--file-list</b>, <b>--file-offsets</b>,
-<b>--include-dir</b>, <b>--line-offsets</b>, <b>--locale</b>, <b>--match-limit</b>,
-<b>-M</b>, <b>--multiline</b>, <b>-N</b>, <b>--newline</b>, <b>--om-separator</b>,
-<b>--recursion-limit</b>, <b>-u</b>, and <b>--utf-8</b> options are specific to
-<b>pcregrep</b>, as is the use of the <b>--only-matching</b> option with a
-capturing parentheses number.
-</P>
-<P>
-Although most of the common options work the same way, a few are different in
-<b>pcregrep</b>. For example, the <b>--include</b> option's argument is a glob
-for GNU <b>grep</b>, but a regular expression for <b>pcregrep</b>. If both the
-<b>-c</b> and <b>-l</b> options are given, GNU grep lists only file names,
-without counts, but <b>pcregrep</b> gives the counts.
-</P>
-<br><a name="SEC9" href="#TOC1">OPTIONS WITH DATA</a><br>
-<P>
-There are four different ways in which an option with data can be specified.
-If a short form option is used, the data may follow immediately, or (with one
-exception) in the next command line item. For example:
-<pre>
- -f/some/file
- -f /some/file
-</pre>
-The exception is the <b>-o</b> option, which may appear with or without data.
-Because of this, if data is present, it must follow immediately in the same
-item, for example -o3.
-</P>
-<P>
-If a long form option is used, the data may appear in the same command line
-item, separated by an equals character, or (with two exceptions) it may appear
-in the next command line item. For example:
-<pre>
- --file=/some/file
- --file /some/file
-</pre>
-Note, however, that if you want to supply a file name beginning with ~ as data
-in a shell command, and have the shell expand ~ to a home directory, you must
-separate the file name from the option, because the shell does not treat ~
-specially unless it is at the start of an item.
-</P>
-<P>
-The exceptions to the above are the <b>--colour</b> (or <b>--color</b>) and
-<b>--only-matching</b> options, for which the data is optional. If one of these
-options does have data, it must be given in the first form, using an equals
-character. Otherwise <b>pcregrep</b> will assume that it has no data.
-</P>
-<br><a name="SEC10" href="#TOC1">MATCHING ERRORS</a><br>
-<P>
-It is possible to supply a regular expression that takes a very long time to
-fail to match certain lines. Such patterns normally involve nested indefinite
-repeats, for example: (a+)*\d when matched against a line of a's with no final
-digit. The PCRE matching function has a resource limit that causes it to abort
-in these circumstances. If this happens, <b>pcregrep</b> outputs an error
-message and the line that caused the problem to the standard error stream. If
-there are more than 20 such errors, <b>pcregrep</b> gives up.
-</P>
-<P>
-The <b>--match-limit</b> option of <b>pcregrep</b> can be used to set the overall
-resource limit; there is a second option called <b>--recursion-limit</b> that
-sets a limit on the amount of memory (usually stack) that is used (see the
-discussion of these options above).
-</P>
-<br><a name="SEC11" href="#TOC1">DIAGNOSTICS</a><br>
-<P>
-Exit status is 0 if any matches were found, 1 if no matches were found, and 2
-for syntax errors, overlong lines, non-existent or inaccessible files (even if
-matches were found in other files) or too many matching errors. Using the
-<b>-s</b> option to suppress error messages about inaccessible files does not
-affect the return code.
-</P>
-<br><a name="SEC12" href="#TOC1">SEE ALSO</a><br>
-<P>
-<b>pcrepattern</b>(3), <b>pcresyntax</b>(3), <b>pcretest</b>(1).
-</P>
-<br><a name="SEC13" href="#TOC1">AUTHOR</a><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><a name="SEC14" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 03 April 2014
-<br>
-Copyright &copy; 1997-2014 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcrejit.html b/libs/Pcre16/docs/doc/html/pcrejit.html
deleted file mode 100644
index abb342522f..0000000000
--- a/libs/Pcre16/docs/doc/html/pcrejit.html
+++ /dev/null
@@ -1,499 +0,0 @@
-<html>
-<head>
-<title>pcrejit specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcrejit man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">PCRE JUST-IN-TIME COMPILER SUPPORT</a>
-<li><a name="TOC2" href="#SEC2">8-BIT, 16-BIT AND 32-BIT SUPPORT</a>
-<li><a name="TOC3" href="#SEC3">AVAILABILITY OF JIT SUPPORT</a>
-<li><a name="TOC4" href="#SEC4">SIMPLE USE OF JIT</a>
-<li><a name="TOC5" href="#SEC5">UNSUPPORTED OPTIONS AND PATTERN ITEMS</a>
-<li><a name="TOC6" href="#SEC6">RETURN VALUES FROM JIT EXECUTION</a>
-<li><a name="TOC7" href="#SEC7">SAVING AND RESTORING COMPILED PATTERNS</a>
-<li><a name="TOC8" href="#SEC8">CONTROLLING THE JIT STACK</a>
-<li><a name="TOC9" href="#SEC9">JIT STACK FAQ</a>
-<li><a name="TOC10" href="#SEC10">EXAMPLE CODE</a>
-<li><a name="TOC11" href="#SEC11">JIT FAST PATH API</a>
-<li><a name="TOC12" href="#SEC12">SEE ALSO</a>
-<li><a name="TOC13" href="#SEC13">AUTHOR</a>
-<li><a name="TOC14" href="#SEC14">REVISION</a>
-</ul>
-<br><a name="SEC1" href="#TOC1">PCRE JUST-IN-TIME COMPILER SUPPORT</a><br>
-<P>
-Just-in-time compiling is a heavyweight optimization that can greatly speed up
-pattern matching. However, it comes at the cost of extra processing before the
-match is performed. Therefore, it is of most benefit when the same pattern is
-going to be matched many times. This does not necessarily mean many calls of a
-matching function; if the pattern is not anchored, matching attempts may take
-place many times at various positions in the subject, even for a single call.
-Therefore, if the subject string is very long, it may still pay to use JIT for
-one-off matches.
-</P>
-<P>
-JIT support applies only to the traditional Perl-compatible matching function.
-It does not apply when the DFA matching function is being used. The code for
-this support was written by Zoltan Herczeg.
-</P>
-<br><a name="SEC2" href="#TOC1">8-BIT, 16-BIT AND 32-BIT SUPPORT</a><br>
-<P>
-JIT support is available for all of the 8-bit, 16-bit and 32-bit PCRE
-libraries. To keep this documentation simple, only the 8-bit interface is
-described in what follows. If you are using the 16-bit library, substitute the
-16-bit functions and 16-bit structures (for example, <i>pcre16_jit_stack</i>
-instead of <i>pcre_jit_stack</i>). If you are using the 32-bit library,
-substitute the 32-bit functions and 32-bit structures (for example,
-<i>pcre32_jit_stack</i> instead of <i>pcre_jit_stack</i>).
-</P>
-<br><a name="SEC3" href="#TOC1">AVAILABILITY OF JIT SUPPORT</a><br>
-<P>
-JIT support is an optional feature of PCRE. The "configure" option --enable-jit
-(or equivalent CMake option) must be set when PCRE is built if you want to use
-JIT. The support is limited to the following hardware platforms:
-<pre>
- ARM v5, v7, and Thumb2
- Intel x86 32-bit and 64-bit
- MIPS 32-bit
- Power PC 32-bit and 64-bit
- SPARC 32-bit (experimental)
-</pre>
-If --enable-jit is set on an unsupported platform, compilation fails.
-</P>
-<P>
-A program that is linked with PCRE 8.20 or later can tell if JIT support is
-available by calling <b>pcre_config()</b> with the PCRE_CONFIG_JIT option. The
-result is 1 when JIT is available, and 0 otherwise. However, a simple program
-does not need to check this in order to use JIT. The normal API is implemented
-in a way that falls back to the interpretive code if JIT is not available. For
-programs that need the best possible performance, there is also a "fast path"
-API that is JIT-specific.
-</P>
-<P>
-If your program may sometimes be linked with versions of PCRE that are older
-than 8.20, but you want to use JIT when it is available, you can test the
-values of PCRE_MAJOR and PCRE_MINOR, or the existence of a JIT macro such as
-PCRE_CONFIG_JIT, for compile-time control of your code. Also beware that the
-<b>pcre_jit_exec()</b> function was not available at all before 8.32,
-and may not be available at all if PCRE isn't compiled with
---enable-jit. See the "JIT FAST PATH API" section below for details.
-</P>
-<br><a name="SEC4" href="#TOC1">SIMPLE USE OF JIT</a><br>
-<P>
-You have to do two things to make use of the JIT support in the simplest way:
-<pre>
- (1) Call <b>pcre_study()</b> with the PCRE_STUDY_JIT_COMPILE option for
- each compiled pattern, and pass the resulting <b>pcre_extra</b> block to
- <b>pcre_exec()</b>.
-
- (2) Use <b>pcre_free_study()</b> to free the <b>pcre_extra</b> block when it is
- no longer needed, instead of just freeing it yourself. This ensures that
- any JIT data is also freed.
-</pre>
-For a program that may be linked with pre-8.20 versions of PCRE, you can insert
-<pre>
- #ifndef PCRE_STUDY_JIT_COMPILE
- #define PCRE_STUDY_JIT_COMPILE 0
- #endif
-</pre>
-so that no option is passed to <b>pcre_study()</b>, and then use something like
-this to free the study data:
-<pre>
- #ifdef PCRE_CONFIG_JIT
- pcre_free_study(study_ptr);
- #else
- pcre_free(study_ptr);
- #endif
-</pre>
-PCRE_STUDY_JIT_COMPILE requests the JIT compiler to generate code for complete
-matches. If you want to run partial matches using the PCRE_PARTIAL_HARD or
-PCRE_PARTIAL_SOFT options of <b>pcre_exec()</b>, you should set one or both of
-the following options in addition to, or instead of, PCRE_STUDY_JIT_COMPILE
-when you call <b>pcre_study()</b>:
-<pre>
- PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE
- PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE
-</pre>
-If using <b>pcre_jit_exec()</b> and supporting a pre-8.32 version of
-PCRE, you can insert:
-<pre>
- #if PCRE_MAJOR &#62;= 8 && PCRE_MINOR &#62;= 32
- pcre_jit_exec(...);
- #else
- pcre_exec(...)
- #endif
-</pre>
-but as described in the "JIT FAST PATH API" section below this assumes
-version 8.32 and later are compiled with --enable-jit, which may
-break.
-<br>
-<br>
-The JIT compiler generates different optimized code for each of the three
-modes (normal, soft partial, hard partial). When <b>pcre_exec()</b> is called,
-the appropriate code is run if it is available. Otherwise, the pattern is
-matched using interpretive code.
-</P>
-<P>
-In some circumstances you may need to call additional functions. These are
-described in the section entitled
-<a href="#stackcontrol">"Controlling the JIT stack"</a>
-below.
-</P>
-<P>
-If JIT support is not available, PCRE_STUDY_JIT_COMPILE etc. are ignored, and
-no JIT data is created. Otherwise, the compiled pattern is passed to the JIT
-compiler, which turns it into machine code that executes much faster than the
-normal interpretive code. When <b>pcre_exec()</b> is passed a <b>pcre_extra</b>
-block containing a pointer to JIT code of the appropriate mode (normal or
-hard/soft partial), it obeys that code instead of running the interpreter. The
-result is identical, but the compiled JIT code runs much faster.
-</P>
-<P>
-There are some <b>pcre_exec()</b> options that are not supported for JIT
-execution. There are also some pattern items that JIT cannot handle. Details
-are given below. In both cases, execution automatically falls back to the
-interpretive code. If you want to know whether JIT was actually used for a
-particular match, you should arrange for a JIT callback function to be set up
-as described in the section entitled
-<a href="#stackcontrol">"Controlling the JIT stack"</a>
-below, even if you do not need to supply a non-default JIT stack. Such a
-callback function is called whenever JIT code is about to be obeyed. If the
-execution options are not right for JIT execution, the callback function is not
-obeyed.
-</P>
-<P>
-If the JIT compiler finds an unsupported item, no JIT data is generated. You
-can find out if JIT execution is available after studying a pattern by calling
-<b>pcre_fullinfo()</b> with the PCRE_INFO_JIT option. A result of 1 means that
-JIT compilation was successful. A result of 0 means that JIT support is not
-available, or the pattern was not studied with PCRE_STUDY_JIT_COMPILE etc., or
-the JIT compiler was not able to handle the pattern.
-</P>
-<P>
-Once a pattern has been studied, with or without JIT, it can be used as many
-times as you like for matching different subject strings.
-</P>
-<br><a name="SEC5" href="#TOC1">UNSUPPORTED OPTIONS AND PATTERN ITEMS</a><br>
-<P>
-The only <b>pcre_exec()</b> options that are supported for JIT execution are
-PCRE_NO_UTF8_CHECK, PCRE_NO_UTF16_CHECK, PCRE_NO_UTF32_CHECK, PCRE_NOTBOL,
-PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NOTEMPTY_ATSTART, PCRE_PARTIAL_HARD, and
-PCRE_PARTIAL_SOFT.
-</P>
-<P>
-The only unsupported pattern items are \C (match a single data unit) when
-running in a UTF mode, and a callout immediately before an assertion condition
-in a conditional group.
-</P>
-<br><a name="SEC6" href="#TOC1">RETURN VALUES FROM JIT EXECUTION</a><br>
-<P>
-When a pattern is matched using JIT execution, the return values are the same
-as those given by the interpretive <b>pcre_exec()</b> code, with the addition of
-one new error code: PCRE_ERROR_JIT_STACKLIMIT. This means that the memory used
-for the JIT stack was insufficient. See
-<a href="#stackcontrol">"Controlling the JIT stack"</a>
-below for a discussion of JIT stack usage. For compatibility with the
-interpretive <b>pcre_exec()</b> code, no more than two-thirds of the
-<i>ovector</i> argument is used for passing back captured substrings.
-</P>
-<P>
-The error code PCRE_ERROR_MATCHLIMIT is returned by the JIT code if searching a
-very large pattern tree goes on for too long, as it is in the same circumstance
-when JIT is not used, but the details of exactly what is counted are not the
-same. The PCRE_ERROR_RECURSIONLIMIT error code is never returned by JIT
-execution.
-</P>
-<br><a name="SEC7" href="#TOC1">SAVING AND RESTORING COMPILED PATTERNS</a><br>
-<P>
-The code that is generated by the JIT compiler is architecture-specific, and is
-also position dependent. For those reasons it cannot be saved (in a file or
-database) and restored later like the bytecode and other data of a compiled
-pattern. Saving and restoring compiled patterns is not something many people
-do. More detail about this facility is given in the
-<a href="pcreprecompile.html"><b>pcreprecompile</b></a>
-documentation. It should be possible to run <b>pcre_study()</b> on a saved and
-restored pattern, and thereby recreate the JIT data, but because JIT
-compilation uses significant resources, it is probably not worth doing this;
-you might as well recompile the original pattern.
-<a name="stackcontrol"></a></P>
-<br><a name="SEC8" href="#TOC1">CONTROLLING THE JIT STACK</a><br>
-<P>
-When the compiled JIT code runs, it needs a block of memory to use as a stack.
-By default, it uses 32K on the machine stack. However, some large or
-complicated patterns need more than this. The error PCRE_ERROR_JIT_STACKLIMIT
-is given when there is not enough stack. Three functions are provided for
-managing blocks of memory for use as JIT stacks. There is further discussion
-about the use of JIT stacks in the section entitled
-<a href="#stackcontrol">"JIT stack FAQ"</a>
-below.
-</P>
-<P>
-The <b>pcre_jit_stack_alloc()</b> function creates a JIT stack. Its arguments
-are a starting size and a maximum size, and it returns a pointer to an opaque
-structure of type <b>pcre_jit_stack</b>, or NULL if there is an error. The
-<b>pcre_jit_stack_free()</b> function can be used to free a stack that is no
-longer needed. (For the technically minded: the address space is allocated by
-mmap or VirtualAlloc.)
-</P>
-<P>
-JIT uses far less memory for recursion than the interpretive code,
-and a maximum stack size of 512K to 1M should be more than enough for any
-pattern.
-</P>
-<P>
-The <b>pcre_assign_jit_stack()</b> function specifies which stack JIT code
-should use. Its arguments are as follows:
-<pre>
- pcre_extra *extra
- pcre_jit_callback callback
- void *data
-</pre>
-The <i>extra</i> argument must be the result of studying a pattern with
-PCRE_STUDY_JIT_COMPILE etc. There are three cases for the values of the other
-two options:
-<pre>
- (1) If <i>callback</i> is NULL and <i>data</i> is NULL, an internal 32K block
- on the machine stack is used.
-
- (2) If <i>callback</i> is NULL and <i>data</i> is not NULL, <i>data</i> must be
- a valid JIT stack, the result of calling <b>pcre_jit_stack_alloc()</b>.
-
- (3) If <i>callback</i> is not NULL, it must point to a function that is
- called with <i>data</i> as an argument at the start of matching, in
- order to set up a JIT stack. If the return from the callback
- function is NULL, the internal 32K stack is used; otherwise the
- return value must be a valid JIT stack, the result of calling
- <b>pcre_jit_stack_alloc()</b>.
-</pre>
-A callback function is obeyed whenever JIT code is about to be run; it is not
-obeyed when <b>pcre_exec()</b> is called with options that are incompatible for
-JIT execution. A callback function can therefore be used to determine whether a
-match operation was executed by JIT or by the interpreter.
-</P>
-<P>
-You may safely use the same JIT stack for more than one pattern (either by
-assigning directly or by callback), as long as the patterns are all matched
-sequentially in the same thread. In a multithread application, if you do not
-specify a JIT stack, or if you assign or pass back NULL from a callback, that
-is thread-safe, because each thread has its own machine stack. However, if you
-assign or pass back a non-NULL JIT stack, this must be a different stack for
-each thread so that the application is thread-safe.
-</P>
-<P>
-Strictly speaking, even more is allowed. You can assign the same non-NULL stack
-to any number of patterns as long as they are not used for matching by multiple
-threads at the same time. For example, you can assign the same stack to all
-compiled patterns, and use a global mutex in the callback to wait until the
-stack is available for use. However, this is an inefficient solution, and not
-recommended.
-</P>
-<P>
-This is a suggestion for how a multithreaded program that needs to set up
-non-default JIT stacks might operate:
-<pre>
- During thread initalization
- thread_local_var = pcre_jit_stack_alloc(...)
-
- During thread exit
- pcre_jit_stack_free(thread_local_var)
-
- Use a one-line callback function
- return thread_local_var
-</pre>
-All the functions described in this section do nothing if JIT is not available,
-and <b>pcre_assign_jit_stack()</b> does nothing unless the <b>extra</b> argument
-is non-NULL and points to a <b>pcre_extra</b> block that is the result of a
-successful study with PCRE_STUDY_JIT_COMPILE etc.
-<a name="stackfaq"></a></P>
-<br><a name="SEC9" href="#TOC1">JIT STACK FAQ</a><br>
-<P>
-(1) Why do we need JIT stacks?
-<br>
-<br>
-PCRE (and JIT) is a recursive, depth-first engine, so it needs a stack where
-the local data of the current node is pushed before checking its child nodes.
-Allocating real machine stack on some platforms is difficult. For example, the
-stack chain needs to be updated every time if we extend the stack on PowerPC.
-Although it is possible, its updating time overhead decreases performance. So
-we do the recursion in memory.
-</P>
-<P>
-(2) Why don't we simply allocate blocks of memory with <b>malloc()</b>?
-<br>
-<br>
-Modern operating systems have a nice feature: they can reserve an address space
-instead of allocating memory. We can safely allocate memory pages inside this
-address space, so the stack could grow without moving memory data (this is
-important because of pointers). Thus we can allocate 1M address space, and use
-only a single memory page (usually 4K) if that is enough. However, we can still
-grow up to 1M anytime if needed.
-</P>
-<P>
-(3) Who "owns" a JIT stack?
-<br>
-<br>
-The owner of the stack is the user program, not the JIT studied pattern or
-anything else. The user program must ensure that if a stack is used by
-<b>pcre_exec()</b>, (that is, it is assigned to the pattern currently running),
-that stack must not be used by any other threads (to avoid overwriting the same
-memory area). The best practice for multithreaded programs is to allocate a
-stack for each thread, and return this stack through the JIT callback function.
-</P>
-<P>
-(4) When should a JIT stack be freed?
-<br>
-<br>
-You can free a JIT stack at any time, as long as it will not be used by
-<b>pcre_exec()</b> again. When you assign the stack to a pattern, only a pointer
-is set. There is no reference counting or any other magic. You can free the
-patterns and stacks in any order, anytime. Just <i>do not</i> call
-<b>pcre_exec()</b> with a pattern pointing to an already freed stack, as that
-will cause SEGFAULT. (Also, do not free a stack currently used by
-<b>pcre_exec()</b> in another thread). You can also replace the stack for a
-pattern at any time. You can even free the previous stack before assigning a
-replacement.
-</P>
-<P>
-(5) Should I allocate/free a stack every time before/after calling
-<b>pcre_exec()</b>?
-<br>
-<br>
-No, because this is too costly in terms of resources. However, you could
-implement some clever idea which release the stack if it is not used in let's
-say two minutes. The JIT callback can help to achieve this without keeping a
-list of the currently JIT studied patterns.
-</P>
-<P>
-(6) OK, the stack is for long term memory allocation. But what happens if a
-pattern causes stack overflow with a stack of 1M? Is that 1M kept until the
-stack is freed?
-<br>
-<br>
-Especially on embedded sytems, it might be a good idea to release memory
-sometimes without freeing the stack. There is no API for this at the moment.
-Probably a function call which returns with the currently allocated memory for
-any stack and another which allows releasing memory (shrinking the stack) would
-be a good idea if someone needs this.
-</P>
-<P>
-(7) This is too much of a headache. Isn't there any better solution for JIT
-stack handling?
-<br>
-<br>
-No, thanks to Windows. If POSIX threads were used everywhere, we could throw
-out this complicated API.
-</P>
-<br><a name="SEC10" href="#TOC1">EXAMPLE CODE</a><br>
-<P>
-This is a single-threaded example that specifies a JIT stack without using a
-callback.
-<pre>
- int rc;
- int ovector[30];
- pcre *re;
- pcre_extra *extra;
- pcre_jit_stack *jit_stack;
-
- re = pcre_compile(pattern, 0, &error, &erroffset, NULL);
- /* Check for errors */
- extra = pcre_study(re, PCRE_STUDY_JIT_COMPILE, &error);
- jit_stack = pcre_jit_stack_alloc(32*1024, 512*1024);
- /* Check for error (NULL) */
- pcre_assign_jit_stack(extra, NULL, jit_stack);
- rc = pcre_exec(re, extra, subject, length, 0, 0, ovector, 30);
- /* Check results */
- pcre_free(re);
- pcre_free_study(extra);
- pcre_jit_stack_free(jit_stack);
-
-</PRE>
-</P>
-<br><a name="SEC11" href="#TOC1">JIT FAST PATH API</a><br>
-<P>
-Because the API described above falls back to interpreted execution when JIT is
-not available, it is convenient for programs that are written for general use
-in many environments. However, calling JIT via <b>pcre_exec()</b> does have a
-performance impact. Programs that are written for use where JIT is known to be
-available, and which need the best possible performance, can instead use a
-"fast path" API to call JIT execution directly instead of calling
-<b>pcre_exec()</b> (obviously only for patterns that have been successfully
-studied by JIT).
-</P>
-<P>
-The fast path function is called <b>pcre_jit_exec()</b>, and it takes exactly
-the same arguments as <b>pcre_exec()</b>, plus one additional argument that
-must point to a JIT stack. The JIT stack arrangements described above do not
-apply. The return values are the same as for <b>pcre_exec()</b>.
-</P>
-<P>
-When you call <b>pcre_exec()</b>, as well as testing for invalid options, a
-number of other sanity checks are performed on the arguments. For example, if
-the subject pointer is NULL, or its length is negative, an immediate error is
-given. Also, unless PCRE_NO_UTF[8|16|32] is set, a UTF subject string is tested
-for validity. In the interests of speed, these checks do not happen on the JIT
-fast path, and if invalid data is passed, the result is undefined.
-</P>
-<P>
-Bypassing the sanity checks and the <b>pcre_exec()</b> wrapping can give
-speedups of more than 10%.
-</P>
-<P>
-Note that the <b>pcre_jit_exec()</b> function is not available in versions of
-PCRE before 8.32 (released in November 2012). If you need to support versions
-that old you must either use the slower <b>pcre_exec()</b>, or switch between
-the two codepaths by checking the values of PCRE_MAJOR and PCRE_MINOR.
-</P>
-<P>
-Due to an unfortunate implementation oversight, even in versions 8.32
-and later there will be no <b>pcre_jit_exec()</b> stub function defined
-when PCRE is compiled with --disable-jit, which is the default, and
-there's no way to detect whether PCRE was compiled with --enable-jit
-via a macro.
-</P>
-<P>
-If you need to support versions older than 8.32, or versions that may
-not build with --enable-jit, you must either use the slower
-<b>pcre_exec()</b>, or switch between the two codepaths by checking the
-values of PCRE_MAJOR and PCRE_MINOR.
-</P>
-<P>
-Switching between the two by checking the version assumes that all the
-versions being targeted are built with --enable-jit. To also support
-builds that may use --disable-jit either <b>pcre_exec()</b> must be
-used, or a compile-time check for JIT via <b>pcre_config()</b> (which
-assumes the runtime environment will be the same), or as the Git
-project decided to do, simply assume that <b>pcre_jit_exec()</b> is
-present in 8.32 or later unless a compile-time flag is provided, see
-the "grep: un-break building with PCRE &#62;= 8.32 without --enable-jit"
-commit in git.git for an example of that.
-</P>
-<br><a name="SEC12" href="#TOC1">SEE ALSO</a><br>
-<P>
-<b>pcreapi</b>(3)
-</P>
-<br><a name="SEC13" href="#TOC1">AUTHOR</a><br>
-<P>
-Philip Hazel (FAQ by Zoltan Herczeg)
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><a name="SEC14" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 05 July 2017
-<br>
-Copyright &copy; 1997-2017 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcrelimits.html b/libs/Pcre16/docs/doc/html/pcrelimits.html
deleted file mode 100644
index ee5ebf033d..0000000000
--- a/libs/Pcre16/docs/doc/html/pcrelimits.html
+++ /dev/null
@@ -1,90 +0,0 @@
-<html>
-<head>
-<title>pcrelimits specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcrelimits man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-SIZE AND OTHER LIMITATIONS
-</b><br>
-<P>
-There are some size limitations in PCRE but it is hoped that they will never in
-practice be relevant.
-</P>
-<P>
-The maximum length of a compiled pattern is approximately 64K data units (bytes
-for the 8-bit library, 16-bit units for the 16-bit library, and 32-bit units for
-the 32-bit library) if PCRE is compiled with the default internal linkage size,
-which is 2 bytes for the 8-bit and 16-bit libraries, and 4 bytes for the 32-bit
-library. If you want to process regular expressions that are truly enormous,
-you can compile PCRE with an internal linkage size of 3 or 4 (when building the
-16-bit or 32-bit library, 3 is rounded up to 4). See the <b>README</b> file in
-the source distribution and the
-<a href="pcrebuild.html"><b>pcrebuild</b></a>
-documentation for details. In these cases the limit is substantially larger.
-However, the speed of execution is slower.
-</P>
-<P>
-All values in repeating quantifiers must be less than 65536.
-</P>
-<P>
-There is no limit to the number of parenthesized subpatterns, but there can be
-no more than 65535 capturing subpatterns. There is, however, a limit to the
-depth of nesting of parenthesized subpatterns of all kinds. This is imposed in
-order to limit the amount of system stack used at compile time. The limit can
-be specified when PCRE is built; the default is 250.
-</P>
-<P>
-There is a limit to the number of forward references to subsequent subpatterns
-of around 200,000. Repeated forward references with fixed upper limits, for
-example, (?2){0,100} when subpattern number 2 is to the right, are included in
-the count. There is no limit to the number of backward references.
-</P>
-<P>
-The maximum length of name for a named subpattern is 32 characters, and the
-maximum number of named subpatterns is 10000.
-</P>
-<P>
-The maximum length of a name in a (*MARK), (*PRUNE), (*SKIP), or (*THEN) verb
-is 255 for the 8-bit library and 65535 for the 16-bit and 32-bit libraries.
-</P>
-<P>
-The maximum length of a subject string is the largest positive number that an
-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
-<a href="pcrestack.html"><b>pcrestack</b></a>
-documentation.
-</P>
-<br><b>
-AUTHOR
-</b><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><b>
-REVISION
-</b><br>
-<P>
-Last updated: 05 November 2013
-<br>
-Copyright &copy; 1997-2013 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcrematching.html b/libs/Pcre16/docs/doc/html/pcrematching.html
deleted file mode 100644
index a1af39b68d..0000000000
--- a/libs/Pcre16/docs/doc/html/pcrematching.html
+++ /dev/null
@@ -1,242 +0,0 @@
-<html>
-<head>
-<title>pcrematching specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcrematching man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">PCRE MATCHING ALGORITHMS</a>
-<li><a name="TOC2" href="#SEC2">REGULAR EXPRESSIONS AS TREES</a>
-<li><a name="TOC3" href="#SEC3">THE STANDARD MATCHING ALGORITHM</a>
-<li><a name="TOC4" href="#SEC4">THE ALTERNATIVE MATCHING ALGORITHM</a>
-<li><a name="TOC5" href="#SEC5">ADVANTAGES OF THE ALTERNATIVE ALGORITHM</a>
-<li><a name="TOC6" href="#SEC6">DISADVANTAGES OF THE ALTERNATIVE ALGORITHM</a>
-<li><a name="TOC7" href="#SEC7">AUTHOR</a>
-<li><a name="TOC8" href="#SEC8">REVISION</a>
-</ul>
-<br><a name="SEC1" href="#TOC1">PCRE MATCHING ALGORITHMS</a><br>
-<P>
-This document describes the two different algorithms that are available in PCRE
-for matching a compiled regular expression against a given subject string. The
-"standard" algorithm is the one provided by the <b>pcre_exec()</b>,
-<b>pcre16_exec()</b> and <b>pcre32_exec()</b> functions. These work in the same
-as as Perl's matching function, and provide a Perl-compatible matching operation.
-The just-in-time (JIT) optimization that is described in the
-<a href="pcrejit.html"><b>pcrejit</b></a>
-documentation is compatible with these functions.
-</P>
-<P>
-An alternative algorithm is provided by the <b>pcre_dfa_exec()</b>,
-<b>pcre16_dfa_exec()</b> and <b>pcre32_dfa_exec()</b> functions; they operate in
-a different way, and are not Perl-compatible. This alternative has advantages
-and disadvantages compared with the standard algorithm, and these are described
-below.
-</P>
-<P>
-When there is only one possible way in which a given subject string can match a
-pattern, the two algorithms give the same answer. A difference arises, however,
-when there are multiple possibilities. For example, if the pattern
-<pre>
- ^&#60;.*&#62;
-</pre>
-is matched against the string
-<pre>
- &#60;something&#62; &#60;something else&#62; &#60;something further&#62;
-</pre>
-there are three possible answers. The standard algorithm finds only one of
-them, whereas the alternative algorithm finds all three.
-</P>
-<br><a name="SEC2" href="#TOC1">REGULAR EXPRESSIONS AS TREES</a><br>
-<P>
-The set of strings that are matched by a regular expression can be represented
-as a tree structure. An unlimited repetition in the pattern makes the tree of
-infinite size, but it is still a tree. Matching the pattern to a given subject
-string (from a given starting point) can be thought of as a search of the tree.
-There are two ways to search a tree: depth-first and breadth-first, and these
-correspond to the two matching algorithms provided by PCRE.
-</P>
-<br><a name="SEC3" href="#TOC1">THE STANDARD MATCHING ALGORITHM</a><br>
-<P>
-In the terminology of Jeffrey Friedl's book "Mastering Regular
-Expressions", the standard algorithm is an "NFA algorithm". It conducts a
-depth-first search of the pattern tree. That is, it proceeds along a single
-path through the tree, checking that the subject matches what is required. When
-there is a mismatch, the algorithm tries any alternatives at the current point,
-and if they all fail, it backs up to the previous branch point in the tree, and
-tries the next alternative branch at that level. This often involves backing up
-(moving to the left) in the subject string as well. The order in which
-repetition branches are tried is controlled by the greedy or ungreedy nature of
-the quantifier.
-</P>
-<P>
-If a leaf node is reached, a matching string has been found, and at that point
-the algorithm stops. Thus, if there is more than one possible match, this
-algorithm returns the first one that it finds. Whether this is the shortest,
-the longest, or some intermediate length depends on the way the greedy and
-ungreedy repetition quantifiers are specified in the pattern.
-</P>
-<P>
-Because it ends up with a single path through the tree, it is relatively
-straightforward for this algorithm to keep track of the substrings that are
-matched by portions of the pattern in parentheses. This provides support for
-capturing parentheses and back references.
-</P>
-<br><a name="SEC4" href="#TOC1">THE ALTERNATIVE MATCHING ALGORITHM</a><br>
-<P>
-This algorithm conducts a breadth-first search of the tree. Starting from the
-first matching point in the subject, it scans the subject string from left to
-right, once, character by character, and as it does this, it remembers all the
-paths through the tree that represent valid matches. In Friedl's terminology,
-this is a kind of "DFA algorithm", though it is not implemented as a
-traditional finite state machine (it keeps multiple states active
-simultaneously).
-</P>
-<P>
-Although the general principle of this matching algorithm is that it scans the
-subject string only once, without backtracking, there is one exception: when a
-lookaround assertion is encountered, the characters following or preceding the
-current point have to be independently inspected.
-</P>
-<P>
-The scan continues until either the end of the subject is reached, or there are
-no more unterminated paths. At this point, terminated paths represent the
-different matching possibilities (if there are none, the match has failed).
-Thus, if there is more than one possible match, this algorithm finds all of
-them, and in particular, it finds the longest. The matches are returned in
-decreasing order of length. There is an option to stop the algorithm after the
-first match (which is necessarily the shortest) is found.
-</P>
-<P>
-Note that all the matches that are found start at the same point in the
-subject. If the pattern
-<pre>
- cat(er(pillar)?)?
-</pre>
-is matched against the string "the caterpillar catchment", the result will be
-the three strings "caterpillar", "cater", and "cat" that start at the fifth
-character of the subject. The algorithm does not automatically move on to find
-matches that start at later positions.
-</P>
-<P>
-PCRE's "auto-possessification" optimization usually applies to character
-repeats at the end of a pattern (as well as internally). For example, the
-pattern "a\d+" is compiled as if it were "a\d++" because there is no point
-even considering the possibility of backtracking into the repeated digits. For
-DFA matching, this means that only one possible match is found. If you really
-do want multiple matches in such cases, either use an ungreedy repeat
-("a\d+?") or set the PCRE_NO_AUTO_POSSESS option when compiling.
-</P>
-<P>
-There are a number of features of PCRE regular expressions that are not
-supported by the alternative matching algorithm. They are as follows:
-</P>
-<P>
-1. Because the algorithm finds all possible matches, the greedy or ungreedy
-nature of repetition quantifiers is not relevant. Greedy and ungreedy
-quantifiers are treated in exactly the same way. However, possessive
-quantifiers can make a difference when what follows could also match what is
-quantified, for example in a pattern like this:
-<pre>
- ^a++\w!
-</pre>
-This pattern matches "aaab!" but not "aaa!", which would be matched by a
-non-possessive quantifier. Similarly, if an atomic group is present, it is
-matched as if it were a standalone pattern at the current point, and the
-longest match is then "locked in" for the rest of the overall pattern.
-</P>
-<P>
-2. When dealing with multiple paths through the tree simultaneously, it is not
-straightforward to keep track of captured substrings for the different matching
-possibilities, and PCRE's implementation of this algorithm does not attempt to
-do this. This means that no captured substrings are available.
-</P>
-<P>
-3. Because no substrings are captured, back references within the pattern are
-not supported, and cause errors if encountered.
-</P>
-<P>
-4. For the same reason, conditional expressions that use a backreference as the
-condition or test for a specific group recursion are not supported.
-</P>
-<P>
-5. Because many paths through the tree may be active, the \K escape sequence,
-which resets the start of the match when encountered (but may be on some paths
-and not on others), is not supported. It causes an error if encountered.
-</P>
-<P>
-6. Callouts are supported, but the value of the <i>capture_top</i> field is
-always 1, and the value of the <i>capture_last</i> field is always -1.
-</P>
-<P>
-7. The \C escape sequence, which (in the standard algorithm) always matches a
-single data unit, even in UTF-8, UTF-16 or UTF-32 modes, is not supported in
-these modes, because the alternative algorithm moves through the subject string
-one character (not data unit) at a time, for all active paths through the tree.
-</P>
-<P>
-8. Except for (*FAIL), the backtracking control verbs such as (*PRUNE) are not
-supported. (*FAIL) is supported, and behaves like a failing negative assertion.
-</P>
-<br><a name="SEC5" href="#TOC1">ADVANTAGES OF THE ALTERNATIVE ALGORITHM</a><br>
-<P>
-Using the alternative matching algorithm provides the following advantages:
-</P>
-<P>
-1. All possible matches (at a single point in the subject) are automatically
-found, and in particular, the longest match is found. To find more than one
-match using the standard algorithm, you have to do kludgy things with
-callouts.
-</P>
-<P>
-2. Because the alternative algorithm scans the subject string just once, and
-never needs to backtrack (except for lookbehinds), it is possible to pass very
-long subject strings to the matching function in several pieces, checking for
-partial matching each time. Although it is possible to do multi-segment
-matching using the standard algorithm by retaining partially matched
-substrings, it is more complicated. The
-<a href="pcrepartial.html"><b>pcrepartial</b></a>
-documentation gives details of partial matching and discusses multi-segment
-matching.
-</P>
-<br><a name="SEC6" href="#TOC1">DISADVANTAGES OF THE ALTERNATIVE ALGORITHM</a><br>
-<P>
-The alternative algorithm suffers from a number of disadvantages:
-</P>
-<P>
-1. It is substantially slower than the standard algorithm. This is partly
-because it has to search for all possible matches, but is also because it is
-less susceptible to optimization.
-</P>
-<P>
-2. Capturing parentheses and back references are not supported.
-</P>
-<P>
-3. Although atomic groups are supported, their use does not provide the
-performance advantage that it does for the standard algorithm.
-</P>
-<br><a name="SEC7" href="#TOC1">AUTHOR</a><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><a name="SEC8" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 12 November 2013
-<br>
-Copyright &copy; 1997-2012 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcrepartial.html b/libs/Pcre16/docs/doc/html/pcrepartial.html
deleted file mode 100644
index 4faeafcb68..0000000000
--- a/libs/Pcre16/docs/doc/html/pcrepartial.html
+++ /dev/null
@@ -1,509 +0,0 @@
-<html>
-<head>
-<title>pcrepartial specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcrepartial man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">PARTIAL MATCHING IN PCRE</a>
-<li><a name="TOC2" href="#SEC2">PARTIAL MATCHING USING pcre_exec() OR pcre[16|32]_exec()</a>
-<li><a name="TOC3" href="#SEC3">PARTIAL MATCHING USING pcre_dfa_exec() OR pcre[16|32]_dfa_exec()</a>
-<li><a name="TOC4" href="#SEC4">PARTIAL MATCHING AND WORD BOUNDARIES</a>
-<li><a name="TOC5" href="#SEC5">FORMERLY RESTRICTED PATTERNS</a>
-<li><a name="TOC6" href="#SEC6">EXAMPLE OF PARTIAL MATCHING USING PCRETEST</a>
-<li><a name="TOC7" href="#SEC7">MULTI-SEGMENT MATCHING WITH pcre_dfa_exec() OR pcre[16|32]_dfa_exec()</a>
-<li><a name="TOC8" href="#SEC8">MULTI-SEGMENT MATCHING WITH pcre_exec() OR pcre[16|32]_exec()</a>
-<li><a name="TOC9" href="#SEC9">ISSUES WITH MULTI-SEGMENT MATCHING</a>
-<li><a name="TOC10" href="#SEC10">AUTHOR</a>
-<li><a name="TOC11" href="#SEC11">REVISION</a>
-</ul>
-<br><a name="SEC1" href="#TOC1">PARTIAL MATCHING IN PCRE</a><br>
-<P>
-In normal use of PCRE, if the subject string that is passed to a matching
-function matches as far as it goes, but is too short to match the entire
-pattern, PCRE_ERROR_NOMATCH is returned. There are circumstances where it might
-be helpful to distinguish this case from other cases in which there is no
-match.
-</P>
-<P>
-Consider, for example, an application where a human is required to type in data
-for a field with specific formatting requirements. An example might be a date
-in the form <i>ddmmmyy</i>, defined by this pattern:
-<pre>
- ^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$
-</pre>
-If the application sees the user's keystrokes one by one, and can check that
-what has been typed so far is potentially valid, it is able to raise an error
-as soon as a mistake is made, by beeping and not reflecting the character that
-has been typed, for example. This immediate feedback is likely to be a better
-user interface than a check that is delayed until the entire string has been
-entered. Partial matching can also be useful when the subject string is very
-long and is not all available at once.
-</P>
-<P>
-PCRE supports partial matching by means of the PCRE_PARTIAL_SOFT and
-PCRE_PARTIAL_HARD options, which can be set when calling any of the matching
-functions. For backwards compatibility, PCRE_PARTIAL is a synonym for
-PCRE_PARTIAL_SOFT. The essential difference between the two options is whether
-or not a partial match is preferred to an alternative complete match, though
-the details differ between the two types of matching function. If both options
-are set, PCRE_PARTIAL_HARD takes precedence.
-</P>
-<P>
-If you want to use partial matching with just-in-time optimized code, you must
-call <b>pcre_study()</b>, <b>pcre16_study()</b> or <b>pcre32_study()</b> with one
-or both of these options:
-<pre>
- PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE
- PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE
-</pre>
-PCRE_STUDY_JIT_COMPILE should also be set if you are going to run non-partial
-matches on the same pattern. If the appropriate JIT study mode has not been set
-for a match, the interpretive matching code is used.
-</P>
-<P>
-Setting a partial matching option disables two of PCRE's standard
-optimizations. PCRE remembers the last literal data unit in a pattern, and
-abandons matching immediately if it is not present in the subject string. This
-optimization cannot be used for a subject string that might match only
-partially. If the pattern was studied, PCRE knows the minimum length of a
-matching string, and does not bother to run the matching function on shorter
-strings. This optimization is also disabled for partial matching.
-</P>
-<br><a name="SEC2" href="#TOC1">PARTIAL MATCHING USING pcre_exec() OR pcre[16|32]_exec()</a><br>
-<P>
-A partial match occurs during a call to <b>pcre_exec()</b> or
-<b>pcre[16|32]_exec()</b> when the end of the subject string is reached
-successfully, but matching cannot continue because more characters are needed.
-However, at least one character in the subject must have been inspected. This
-character need not form part of the final matched string; lookbehind assertions
-and the \K escape sequence provide ways of inspecting characters before the
-start of a matched substring. The requirement for inspecting at least one
-character exists because an empty string can always be matched; without such a
-restriction there would always be a partial match of an empty string at the end
-of the subject.
-</P>
-<P>
-If there are at least two slots in the offsets vector when a partial match is
-returned, the first slot is set to the offset of the earliest character that
-was inspected. For convenience, the second offset points to the end of the
-subject so that a substring can easily be identified. If there are at least
-three slots in the offsets vector, the third slot is set to the offset of the
-character where matching started.
-</P>
-<P>
-For the majority of patterns, the contents of the first and third slots will be
-the same. However, for patterns that contain lookbehind assertions, or begin
-with \b or \B, characters before the one where matching started may have been
-inspected while carrying out the match. For example, consider this pattern:
-<pre>
- /(?&#60;=abc)123/
-</pre>
-This pattern matches "123", but only if it is preceded by "abc". If the subject
-string is "xyzabc12", the first two offsets after a partial match are for the
-substring "abc12", because all these characters were inspected. However, the
-third offset is set to 6, because that is the offset where matching began.
-</P>
-<P>
-What happens when a partial match is identified depends on which of the two
-partial matching options are set.
-</P>
-<br><b>
-PCRE_PARTIAL_SOFT WITH pcre_exec() OR pcre[16|32]_exec()
-</b><br>
-<P>
-If PCRE_PARTIAL_SOFT is set when <b>pcre_exec()</b> or <b>pcre[16|32]_exec()</b>
-identifies a partial match, the partial match is remembered, but matching
-continues as normal, and other alternatives in the pattern are tried. If no
-complete match can be found, PCRE_ERROR_PARTIAL is returned instead of
-PCRE_ERROR_NOMATCH.
-</P>
-<P>
-This option is "soft" because it prefers a complete match over a partial match.
-All the various matching items in a pattern behave as if the subject string is
-potentially complete. For example, \z, \Z, and $ match at the end of the
-subject, as normal, and for \b and \B the end of the subject is treated as a
-non-alphanumeric.
-</P>
-<P>
-If there is more than one partial match, the first one that was found provides
-the data that is returned. Consider this pattern:
-<pre>
- /123\w+X|dogY/
-</pre>
-If this is matched against the subject string "abc123dog", both
-alternatives fail to match, but the end of the subject is reached during
-matching, so PCRE_ERROR_PARTIAL is returned. The offsets are set to 3 and 9,
-identifying "123dog" as the first partial match that was found. (In this
-example, there are two partial matches, because "dog" on its own partially
-matches the second alternative.)
-</P>
-<br><b>
-PCRE_PARTIAL_HARD WITH pcre_exec() OR pcre[16|32]_exec()
-</b><br>
-<P>
-If PCRE_PARTIAL_HARD is set for <b>pcre_exec()</b> or <b>pcre[16|32]_exec()</b>,
-PCRE_ERROR_PARTIAL is returned as soon as a partial match is found, without
-continuing to search for possible complete matches. This option is "hard"
-because it prefers an earlier partial match over a later complete match. For
-this reason, the assumption is made that the end of the supplied subject string
-may not be the true end of the available data, and so, if \z, \Z, \b, \B,
-or $ are encountered at the end of the subject, the result is
-PCRE_ERROR_PARTIAL, provided that at least one character in the subject has
-been inspected.
-</P>
-<P>
-Setting PCRE_PARTIAL_HARD also affects the way UTF-8 and UTF-16
-subject strings are checked for validity. Normally, an invalid sequence
-causes the error PCRE_ERROR_BADUTF8 or PCRE_ERROR_BADUTF16. However, in the
-special case of a truncated character at the end of the subject,
-PCRE_ERROR_SHORTUTF8 or PCRE_ERROR_SHORTUTF16 is returned when
-PCRE_PARTIAL_HARD is set.
-</P>
-<br><b>
-Comparing hard and soft partial matching
-</b><br>
-<P>
-The difference between the two partial matching options can be illustrated by a
-pattern such as:
-<pre>
- /dog(sbody)?/
-</pre>
-This matches either "dog" or "dogsbody", greedily (that is, it prefers the
-longer string if possible). If it is matched against the string "dog" with
-PCRE_PARTIAL_SOFT, it yields a complete match for "dog". However, if
-PCRE_PARTIAL_HARD is set, the result is PCRE_ERROR_PARTIAL. On the other hand,
-if the pattern is made ungreedy the result is different:
-<pre>
- /dog(sbody)??/
-</pre>
-In this case the result is always a complete match because that is found first,
-and matching never continues after finding a complete match. It might be easier
-to follow this explanation by thinking of the two patterns like this:
-<pre>
- /dog(sbody)?/ is the same as /dogsbody|dog/
- /dog(sbody)??/ is the same as /dog|dogsbody/
-</pre>
-The second pattern will never match "dogsbody", because it will always find the
-shorter match first.
-</P>
-<br><a name="SEC3" href="#TOC1">PARTIAL MATCHING USING pcre_dfa_exec() OR pcre[16|32]_dfa_exec()</a><br>
-<P>
-The DFA functions move along the subject string character by character, without
-backtracking, searching for all possible matches simultaneously. If the end of
-the subject is reached before the end of the pattern, there is the possibility
-of a partial match, again provided that at least one character has been
-inspected.
-</P>
-<P>
-When PCRE_PARTIAL_SOFT is set, PCRE_ERROR_PARTIAL is returned only if there
-have been no complete matches. Otherwise, the complete matches are returned.
-However, if PCRE_PARTIAL_HARD is set, a partial match takes precedence over any
-complete matches. The portion of the string that was inspected when the longest
-partial match was found is set as the first matching string, provided there are
-at least two slots in the offsets vector.
-</P>
-<P>
-Because the DFA functions always search for all possible matches, and there is
-no difference between greedy and ungreedy repetition, their behaviour is
-different from the standard functions when PCRE_PARTIAL_HARD is set. Consider
-the string "dog" matched against the ungreedy pattern shown above:
-<pre>
- /dog(sbody)??/
-</pre>
-Whereas the standard functions stop as soon as they find the complete match for
-"dog", the DFA functions also find the partial match for "dogsbody", and so
-return that when PCRE_PARTIAL_HARD is set.
-</P>
-<br><a name="SEC4" href="#TOC1">PARTIAL MATCHING AND WORD BOUNDARIES</a><br>
-<P>
-If a pattern ends with one of sequences \b or \B, which test for word
-boundaries, partial matching with PCRE_PARTIAL_SOFT can give counter-intuitive
-results. Consider this pattern:
-<pre>
- /\bcat\b/
-</pre>
-This matches "cat", provided there is a word boundary at either end. If the
-subject string is "the cat", the comparison of the final "t" with a following
-character cannot take place, so a partial match is found. However, normal
-matching carries on, and \b matches at the end of the subject when the last
-character is a letter, so a complete match is found. The result, therefore, is
-<i>not</i> PCRE_ERROR_PARTIAL. Using PCRE_PARTIAL_HARD in this case does yield
-PCRE_ERROR_PARTIAL, because then the partial match takes precedence.
-</P>
-<br><a name="SEC5" href="#TOC1">FORMERLY RESTRICTED PATTERNS</a><br>
-<P>
-For releases of PCRE prior to 8.00, because of the way certain internal
-optimizations were implemented in the <b>pcre_exec()</b> function, the
-PCRE_PARTIAL option (predecessor of PCRE_PARTIAL_SOFT) could not be used with
-all patterns. From release 8.00 onwards, the restrictions no longer apply, and
-partial matching with can be requested for any pattern.
-</P>
-<P>
-Items that were formerly restricted were repeated single characters and
-repeated metasequences. If PCRE_PARTIAL was set for a pattern that did not
-conform to the restrictions, <b>pcre_exec()</b> returned the error code
-PCRE_ERROR_BADPARTIAL (-13). This error code is no longer in use. The
-PCRE_INFO_OKPARTIAL call to <b>pcre_fullinfo()</b> to find out if a compiled
-pattern can be used for partial matching now always returns 1.
-</P>
-<br><a name="SEC6" href="#TOC1">EXAMPLE OF PARTIAL MATCHING USING PCRETEST</a><br>
-<P>
-If the escape sequence \P is present in a <b>pcretest</b> data line, the
-PCRE_PARTIAL_SOFT option is used for the match. Here is a run of <b>pcretest</b>
-that uses the date example quoted above:
-<pre>
- re&#62; /^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$/
- data&#62; 25jun04\P
- 0: 25jun04
- 1: jun
- data&#62; 25dec3\P
- Partial match: 23dec3
- data&#62; 3ju\P
- Partial match: 3ju
- data&#62; 3juj\P
- No match
- data&#62; j\P
- No match
-</pre>
-The first data string is matched completely, so <b>pcretest</b> shows the
-matched substrings. The remaining four strings do not match the complete
-pattern, but the first two are partial matches. Similar output is obtained
-if DFA matching is used.
-</P>
-<P>
-If the escape sequence \P is present more than once in a <b>pcretest</b> data
-line, the PCRE_PARTIAL_HARD option is set for the match.
-</P>
-<br><a name="SEC7" href="#TOC1">MULTI-SEGMENT MATCHING WITH pcre_dfa_exec() OR pcre[16|32]_dfa_exec()</a><br>
-<P>
-When a partial match has been found using a DFA matching function, it is
-possible to continue the match by providing additional subject data and calling
-the function again with the same compiled regular expression, this time setting
-the PCRE_DFA_RESTART option. You must pass the same working space as before,
-because this is where details of the previous partial match are stored. Here is
-an example using <b>pcretest</b>, using the \R escape sequence to set the
-PCRE_DFA_RESTART option (\D specifies the use of the DFA matching function):
-<pre>
- re&#62; /^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$/
- data&#62; 23ja\P\D
- Partial match: 23ja
- data&#62; n05\R\D
- 0: n05
-</pre>
-The first call has "23ja" as the subject, and requests partial matching; the
-second call has "n05" as the subject for the continued (restarted) match.
-Notice that when the match is complete, only the last part is shown; PCRE does
-not retain the previously partially-matched string. It is up to the calling
-program to do that if it needs to.
-</P>
-<P>
-That means that, for an unanchored pattern, if a continued match fails, it is
-not possible to try again at a new starting point. All this facility is capable
-of doing is continuing with the previous match attempt. In the previous
-example, if the second set of data is "ug23" the result is no match, even
-though there would be a match for "aug23" if the entire string were given at
-once. Depending on the application, this may or may not be what you want.
-The only way to allow for starting again at the next character is to retain the
-matched part of the subject and try a new complete match.
-</P>
-<P>
-You can set the PCRE_PARTIAL_SOFT or PCRE_PARTIAL_HARD options with
-PCRE_DFA_RESTART to continue partial matching over multiple segments. This
-facility can be used to pass very long subject strings to the DFA matching
-functions.
-</P>
-<br><a name="SEC8" href="#TOC1">MULTI-SEGMENT MATCHING WITH pcre_exec() OR pcre[16|32]_exec()</a><br>
-<P>
-From release 8.00, the standard matching functions can also be used to do
-multi-segment matching. Unlike the DFA functions, it is not possible to
-restart the previous match with a new segment of data. Instead, new data must
-be added to the previous subject string, and the entire match re-run, starting
-from the point where the partial match occurred. Earlier data can be discarded.
-</P>
-<P>
-It is best to use PCRE_PARTIAL_HARD in this situation, because it does not
-treat the end of a segment as the end of the subject when matching \z, \Z,
-\b, \B, and $. Consider an unanchored pattern that matches dates:
-<pre>
- re&#62; /\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d/
- data&#62; The date is 23ja\P\P
- Partial match: 23ja
-</pre>
-At this stage, an application could discard the text preceding "23ja", add on
-text from the next segment, and call the matching function again. Unlike the
-DFA matching functions, the entire matching string must always be available,
-and the complete matching process occurs for each call, so more memory and more
-processing time is needed.
-</P>
-<P>
-<b>Note:</b> If the pattern contains lookbehind assertions, or \K, or starts
-with \b or \B, the string that is returned for a partial match includes
-characters that precede the start of what would be returned for a complete
-match, because it contains all the characters that were inspected during the
-partial match.
-</P>
-<br><a name="SEC9" href="#TOC1">ISSUES WITH MULTI-SEGMENT MATCHING</a><br>
-<P>
-Certain types of pattern may give problems with multi-segment matching,
-whichever matching function is used.
-</P>
-<P>
-1. If the pattern contains a test for the beginning of a line, you need to pass
-the PCRE_NOTBOL option when the subject string for any call does start at the
-beginning of a line. There is also a PCRE_NOTEOL option, but in practice when
-doing multi-segment matching you should be using PCRE_PARTIAL_HARD, which
-includes the effect of PCRE_NOTEOL.
-</P>
-<P>
-2. Lookbehind assertions that have already been obeyed are catered for in the
-offsets that are returned for a partial match. However a lookbehind assertion
-later in the pattern could require even earlier characters to be inspected. You
-can handle this case by using the PCRE_INFO_MAXLOOKBEHIND option of the
-<b>pcre_fullinfo()</b> or <b>pcre[16|32]_fullinfo()</b> functions to obtain the
-length of the longest lookbehind in the pattern. This length is given in
-characters, not bytes. If you always retain at least that many characters
-before the partially matched string, all should be well. (Of course, near the
-start of the subject, fewer characters may be present; in that case all
-characters should be retained.)
-</P>
-<P>
-From release 8.33, there is a more accurate way of deciding which characters to
-retain. Instead of subtracting the length of the longest lookbehind from the
-earliest inspected character (<i>offsets[0]</i>), the match start position
-(<i>offsets[2]</i>) should be used, and the next match attempt started at the
-<i>offsets[2]</i> character by setting the <i>startoffset</i> argument of
-<b>pcre_exec()</b> or <b>pcre_dfa_exec()</b>.
-</P>
-<P>
-For example, if the pattern "(?&#60;=123)abc" is partially
-matched against the string "xx123a", the three offset values returned are 2, 6,
-and 5. This indicates that the matching process that gave a partial match
-started at offset 5, but the characters "123a" were all inspected. The maximum
-lookbehind for that pattern is 3, so taking that away from 5 shows that we need
-only keep "123a", and the next match attempt can be started at offset 3 (that
-is, at "a") when further characters have been added. When the match start is
-not the earliest inspected character, <b>pcretest</b> shows it explicitly:
-<pre>
- re&#62; "(?&#60;=123)abc"
- data&#62; xx123a\P\P
- Partial match at offset 5: 123a
-</PRE>
-</P>
-<P>
-3. Because a partial match must always contain at least one character, what
-might be considered a partial match of an empty string actually gives a "no
-match" result. For example:
-<pre>
- re&#62; /c(?&#60;=abc)x/
- data&#62; ab\P
- No match
-</pre>
-If the next segment begins "cx", a match should be found, but this will only
-happen if characters from the previous segment are retained. For this reason, a
-"no match" result should be interpreted as "partial match of an empty string"
-when the pattern contains lookbehinds.
-</P>
-<P>
-4. Matching a subject string that is split into multiple segments may not
-always produce exactly the same result as matching over one single long string,
-especially when PCRE_PARTIAL_SOFT is used. The section "Partial Matching and
-Word Boundaries" above describes an issue that arises if the pattern ends with
-\b or \B. Another kind of difference may occur when there are multiple
-matching possibilities, because (for PCRE_PARTIAL_SOFT) a partial match result
-is given only when there are no completed matches. This means that as soon as
-the shortest match has been found, continuation to a new subject segment is no
-longer possible. Consider again this <b>pcretest</b> example:
-<pre>
- re&#62; /dog(sbody)?/
- data&#62; dogsb\P
- 0: dog
- data&#62; do\P\D
- Partial match: do
- data&#62; gsb\R\P\D
- 0: g
- data&#62; dogsbody\D
- 0: dogsbody
- 1: dog
-</pre>
-The first data line passes the string "dogsb" to a standard matching function,
-setting the PCRE_PARTIAL_SOFT option. Although the string is a partial match
-for "dogsbody", the result is not PCRE_ERROR_PARTIAL, because the shorter
-string "dog" is a complete match. Similarly, when the subject is presented to
-a DFA matching function in several parts ("do" and "gsb" being the first two)
-the match stops when "dog" has been found, and it is not possible to continue.
-On the other hand, if "dogsbody" is presented as a single string, a DFA
-matching function finds both matches.
-</P>
-<P>
-Because of these problems, it is best to use PCRE_PARTIAL_HARD when matching
-multi-segment data. The example above then behaves differently:
-<pre>
- re&#62; /dog(sbody)?/
- data&#62; dogsb\P\P
- Partial match: dogsb
- data&#62; do\P\D
- Partial match: do
- data&#62; gsb\R\P\P\D
- Partial match: gsb
-</pre>
-5. Patterns that contain alternatives at the top level which do not all start
-with the same pattern item may not work as expected when PCRE_DFA_RESTART is
-used. For example, consider this pattern:
-<pre>
- 1234|3789
-</pre>
-If the first part of the subject is "ABC123", a partial match of the first
-alternative is found at offset 3. There is no partial match for the second
-alternative, because such a match does not start at the same point in the
-subject string. Attempting to continue with the string "7890" does not yield a
-match because only those alternatives that match at one point in the subject
-are remembered. The problem arises because the start of the second alternative
-matches within the first alternative. There is no problem with anchored
-patterns or patterns such as:
-<pre>
- 1234|ABCD
-</pre>
-where no string can be a partial match for both alternatives. This is not a
-problem if a standard matching function is used, because the entire match has
-to be rerun each time:
-<pre>
- re&#62; /1234|3789/
- data&#62; ABC123\P\P
- Partial match: 123
- data&#62; 1237890
- 0: 3789
-</pre>
-Of course, instead of using PCRE_DFA_RESTART, the same technique of re-running
-the entire match can also be used with the DFA matching functions. Another
-possibility is to work with two buffers. If a partial match at offset <i>n</i>
-in the first buffer is followed by "no match" when PCRE_DFA_RESTART is used on
-the second buffer, you can then try a new match starting at offset <i>n+1</i> in
-the first buffer.
-</P>
-<br><a name="SEC10" href="#TOC1">AUTHOR</a><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><a name="SEC11" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 02 July 2013
-<br>
-Copyright &copy; 1997-2013 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcrepattern.html b/libs/Pcre16/docs/doc/html/pcrepattern.html
deleted file mode 100644
index 96fc72986f..0000000000
--- a/libs/Pcre16/docs/doc/html/pcrepattern.html
+++ /dev/null
@@ -1,3276 +0,0 @@
-<html>
-<head>
-<title>pcrepattern specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcrepattern man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">PCRE REGULAR EXPRESSION DETAILS</a>
-<li><a name="TOC2" href="#SEC2">SPECIAL START-OF-PATTERN ITEMS</a>
-<li><a name="TOC3" href="#SEC3">EBCDIC CHARACTER CODES</a>
-<li><a name="TOC4" href="#SEC4">CHARACTERS AND METACHARACTERS</a>
-<li><a name="TOC5" href="#SEC5">BACKSLASH</a>
-<li><a name="TOC6" href="#SEC6">CIRCUMFLEX AND DOLLAR</a>
-<li><a name="TOC7" href="#SEC7">FULL STOP (PERIOD, DOT) AND \N</a>
-<li><a name="TOC8" href="#SEC8">MATCHING A SINGLE DATA UNIT</a>
-<li><a name="TOC9" href="#SEC9">SQUARE BRACKETS AND CHARACTER CLASSES</a>
-<li><a name="TOC10" href="#SEC10">POSIX CHARACTER CLASSES</a>
-<li><a name="TOC11" href="#SEC11">COMPATIBILITY FEATURE FOR WORD BOUNDARIES</a>
-<li><a name="TOC12" href="#SEC12">VERTICAL BAR</a>
-<li><a name="TOC13" href="#SEC13">INTERNAL OPTION SETTING</a>
-<li><a name="TOC14" href="#SEC14">SUBPATTERNS</a>
-<li><a name="TOC15" href="#SEC15">DUPLICATE SUBPATTERN NUMBERS</a>
-<li><a name="TOC16" href="#SEC16">NAMED SUBPATTERNS</a>
-<li><a name="TOC17" href="#SEC17">REPETITION</a>
-<li><a name="TOC18" href="#SEC18">ATOMIC GROUPING AND POSSESSIVE QUANTIFIERS</a>
-<li><a name="TOC19" href="#SEC19">BACK REFERENCES</a>
-<li><a name="TOC20" href="#SEC20">ASSERTIONS</a>
-<li><a name="TOC21" href="#SEC21">CONDITIONAL SUBPATTERNS</a>
-<li><a name="TOC22" href="#SEC22">COMMENTS</a>
-<li><a name="TOC23" href="#SEC23">RECURSIVE PATTERNS</a>
-<li><a name="TOC24" href="#SEC24">SUBPATTERNS AS SUBROUTINES</a>
-<li><a name="TOC25" href="#SEC25">ONIGURUMA SUBROUTINE SYNTAX</a>
-<li><a name="TOC26" href="#SEC26">CALLOUTS</a>
-<li><a name="TOC27" href="#SEC27">BACKTRACKING CONTROL</a>
-<li><a name="TOC28" href="#SEC28">SEE ALSO</a>
-<li><a name="TOC29" href="#SEC29">AUTHOR</a>
-<li><a name="TOC30" href="#SEC30">REVISION</a>
-</ul>
-<br><a name="SEC1" href="#TOC1">PCRE REGULAR EXPRESSION DETAILS</a><br>
-<P>
-The syntax and semantics of the regular expressions that are supported by PCRE
-are described in detail below. There is a quick-reference syntax summary in the
-<a href="pcresyntax.html"><b>pcresyntax</b></a>
-page. PCRE tries to match Perl syntax and semantics as closely as it can. PCRE
-also supports some alternative regular expression syntax (which does not
-conflict with the Perl syntax) in order to provide some compatibility with
-regular expressions in Python, .NET, and Oniguruma.
-</P>
-<P>
-Perl's regular expressions are described in its own documentation, and
-regular expressions in general are covered in a number of books, some of which
-have copious examples. Jeffrey Friedl's "Mastering Regular Expressions",
-published by O'Reilly, covers regular expressions in great detail. This
-description of PCRE's regular expressions is intended as reference material.
-</P>
-<P>
-This document discusses the patterns that are supported by PCRE when one its
-main matching functions, <b>pcre_exec()</b> (8-bit) or <b>pcre[16|32]_exec()</b>
-(16- or 32-bit), is used. PCRE also has alternative matching functions,
-<b>pcre_dfa_exec()</b> and <b>pcre[16|32_dfa_exec()</b>, which match using a
-different algorithm that is not Perl-compatible. Some of the features discussed
-below are not available when DFA matching is used. The advantages and
-disadvantages of the alternative functions, and how they differ from the normal
-functions, are discussed in the
-<a href="pcrematching.html"><b>pcrematching</b></a>
-page.
-</P>
-<br><a name="SEC2" href="#TOC1">SPECIAL START-OF-PATTERN ITEMS</a><br>
-<P>
-A number of options that can be passed to <b>pcre_compile()</b> can also be set
-by special items at the start of a pattern. These are not Perl-compatible, but
-are provided to make these options accessible to pattern writers who are not
-able to change the program that processes the pattern. Any number of these
-items may appear, but they must all be together right at the start of the
-pattern string, and the letters must be in upper case.
-</P>
-<br><b>
-UTF support
-</b><br>
-<P>
-The original operation of PCRE was on strings of one-byte characters. However,
-there is now also support for UTF-8 strings in the original library, an
-extra library that supports 16-bit and UTF-16 character strings, and a
-third library that supports 32-bit and UTF-32 character strings. To use these
-features, PCRE must be built to include appropriate support. When using UTF
-strings you must either call the compiling function with the PCRE_UTF8,
-PCRE_UTF16, or PCRE_UTF32 option, or the pattern must start with one of
-these special sequences:
-<pre>
- (*UTF8)
- (*UTF16)
- (*UTF32)
- (*UTF)
-</pre>
-(*UTF) is a generic sequence that can be used with any of the libraries.
-Starting a pattern with such a sequence is equivalent to setting the relevant
-option. How setting a UTF mode affects pattern matching is mentioned in several
-places below. There is also a summary of features in the
-<a href="pcreunicode.html"><b>pcreunicode</b></a>
-page.
-</P>
-<P>
-Some applications that allow their users to supply patterns may wish to
-restrict them to non-UTF data for security reasons. If the PCRE_NEVER_UTF
-option is set at compile time, (*UTF) etc. are not allowed, and their
-appearance causes an error.
-</P>
-<br><b>
-Unicode property support
-</b><br>
-<P>
-Another special sequence that may appear at the start of a pattern is (*UCP).
-This has the same effect as setting the PCRE_UCP option: it causes sequences
-such as \d and \w to use Unicode properties to determine character types,
-instead of recognizing only characters with codes less than 128 via a lookup
-table.
-</P>
-<br><b>
-Disabling auto-possessification
-</b><br>
-<P>
-If a pattern starts with (*NO_AUTO_POSSESS), it has the same effect as setting
-the PCRE_NO_AUTO_POSSESS option at compile time. This stops PCRE from making
-quantifiers possessive when what follows cannot match the repeated item. For
-example, by default a+b is treated as a++b. For more details, see the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-documentation.
-</P>
-<br><b>
-Disabling start-up optimizations
-</b><br>
-<P>
-If a pattern starts with (*NO_START_OPT), it has the same effect as setting the
-PCRE_NO_START_OPTIMIZE option either at compile or matching time. This disables
-several optimizations for quickly reaching "no match" results. For more
-details, see the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-documentation.
-<a name="newlines"></a></P>
-<br><b>
-Newline conventions
-</b><br>
-<P>
-PCRE supports five different conventions for indicating line breaks in
-strings: a single CR (carriage return) character, a single LF (linefeed)
-character, the two-character sequence CRLF, any of the three preceding, or any
-Unicode newline sequence. The
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page has
-<a href="pcreapi.html#newlines">further discussion</a>
-about newlines, and shows how to set the newline convention in the
-<i>options</i> arguments for the compiling and matching functions.
-</P>
-<P>
-It is also possible to specify a newline convention by starting a pattern
-string with one of the following five sequences:
-<pre>
- (*CR) carriage return
- (*LF) linefeed
- (*CRLF) carriage return, followed by linefeed
- (*ANYCRLF) any of the three above
- (*ANY) all Unicode newline sequences
-</pre>
-These override the default and the options given to the compiling function. For
-example, on a Unix system where LF is the default newline sequence, the pattern
-<pre>
- (*CR)a.b
-</pre>
-changes the convention to CR. That pattern matches "a\nb" because LF is no
-longer a newline. If more than one of these settings is present, the last one
-is used.
-</P>
-<P>
-The newline convention affects where the circumflex and dollar assertions are
-true. It also affects the interpretation of the dot metacharacter when
-PCRE_DOTALL is not set, and the behaviour of \N. However, it does not affect
-what the \R escape sequence matches. By default, this is any Unicode newline
-sequence, for Perl compatibility. However, this can be changed; see the
-description of \R in the section entitled
-<a href="#newlineseq">"Newline sequences"</a>
-below. A change of \R setting can be combined with a change of newline
-convention.
-</P>
-<br><b>
-Setting match and recursion limits
-</b><br>
-<P>
-The caller of <b>pcre_exec()</b> can set a limit on the number of times the
-internal <b>match()</b> function is called and on the maximum depth of
-recursive calls. These facilities are provided to catch runaway matches that
-are provoked by patterns with huge matching trees (a typical example is a
-pattern with nested unlimited repeats) and to avoid running out of system stack
-by too much recursion. When one of these limits is reached, <b>pcre_exec()</b>
-gives an error return. The limits can also be set by items at the start of the
-pattern of the form
-<pre>
- (*LIMIT_MATCH=d)
- (*LIMIT_RECURSION=d)
-</pre>
-where d is any number of decimal digits. However, the value of the setting must
-be less than the value set (or defaulted) by the caller of <b>pcre_exec()</b>
-for it to have any effect. In other words, the pattern writer can lower the
-limits set by the programmer, but not raise them. If there is more than one
-setting of one of these limits, the lower value is used.
-</P>
-<br><a name="SEC3" href="#TOC1">EBCDIC CHARACTER CODES</a><br>
-<P>
-PCRE can be compiled to run in an environment that uses EBCDIC as its character
-code rather than ASCII or Unicode (typically a mainframe system). In the
-sections below, character code values are ASCII or Unicode; in an EBCDIC
-environment these characters may have different code values, and there are no
-code points greater than 255.
-</P>
-<br><a name="SEC4" href="#TOC1">CHARACTERS AND METACHARACTERS</a><br>
-<P>
-A regular expression is a pattern that is matched against a subject string from
-left to right. Most characters stand for themselves in a pattern, and match the
-corresponding characters in the subject. As a trivial example, the pattern
-<pre>
- The quick brown fox
-</pre>
-matches a portion of a subject string that is identical to itself. When
-caseless matching is specified (the PCRE_CASELESS option), letters are matched
-independently of case. In a UTF mode, PCRE always understands the concept of
-case for characters whose values are less than 128, so caseless matching is
-always possible. For characters with higher values, the concept of case is
-supported if PCRE is compiled with Unicode property support, but not otherwise.
-If you want to use caseless matching for characters 128 and above, you must
-ensure that PCRE is compiled with Unicode property support as well as with
-UTF support.
-</P>
-<P>
-The power of regular expressions comes from the ability to include alternatives
-and repetitions in the pattern. These are encoded in the pattern by the use of
-<i>metacharacters</i>, which do not stand for themselves but instead are
-interpreted in some special way.
-</P>
-<P>
-There are two different sets of metacharacters: those that are recognized
-anywhere in the pattern except within square brackets, and those that are
-recognized within square brackets. Outside square brackets, the metacharacters
-are as follows:
-<pre>
- \ general escape character with several uses
- ^ assert start of string (or line, in multiline mode)
- $ assert end of string (or line, in multiline mode)
- . match any character except newline (by default)
- [ start character class definition
- | start of alternative branch
- ( start subpattern
- ) end subpattern
- ? extends the meaning of (
- also 0 or 1 quantifier
- also quantifier minimizer
- * 0 or more quantifier
- + 1 or more quantifier
- also "possessive quantifier"
- { start min/max quantifier
-</pre>
-Part of a pattern that is in square brackets is called a "character class". In
-a character class the only metacharacters are:
-<pre>
- \ general escape character
- ^ negate the class, but only if the first character
- - indicates character range
- [ POSIX character class (only if followed by POSIX syntax)
- ] terminates the character class
-</pre>
-The following sections describe the use of each of the metacharacters.
-</P>
-<br><a name="SEC5" href="#TOC1">BACKSLASH</a><br>
-<P>
-The backslash character has several uses. Firstly, if it is followed by a
-character that is not a number or a letter, it takes away any special meaning
-that character may have. This use of backslash as an escape character applies
-both inside and outside character classes.
-</P>
-<P>
-For example, if you want to match a * character, you write \* in the pattern.
-This escaping action applies whether or not the following character would
-otherwise be interpreted as a metacharacter, so it is always safe to precede a
-non-alphanumeric with backslash to specify that it stands for itself. In
-particular, if you want to match a backslash, you write \\.
-</P>
-<P>
-In a UTF mode, only ASCII numbers and letters have any special meaning after a
-backslash. All other characters (in particular, those whose codepoints are
-greater than 127) are treated as literals.
-</P>
-<P>
-If a pattern is compiled with the PCRE_EXTENDED option, most white space in the
-pattern (other than in a character class), and characters between a # outside a
-character class and the next newline, inclusive, are ignored. An escaping
-backslash can be used to include a white space or # character as part of the
-pattern.
-</P>
-<P>
-If you want to remove the special meaning from a sequence of characters, you
-can do so by putting them between \Q and \E. This is different from Perl in
-that $ and @ are handled as literals in \Q...\E sequences in PCRE, whereas in
-Perl, $ and @ cause variable interpolation. Note the following examples:
-<pre>
- Pattern PCRE matches Perl matches
-
- \Qabc$xyz\E abc$xyz abc followed by the contents of $xyz
- \Qabc\$xyz\E abc\$xyz abc\$xyz
- \Qabc\E\$\Qxyz\E abc$xyz abc$xyz
-</pre>
-The \Q...\E sequence is recognized both inside and outside character classes.
-An isolated \E that is not preceded by \Q is ignored. If \Q is not followed
-by \E later in the pattern, the literal interpretation continues to the end of
-the pattern (that is, \E is assumed at the end). If the isolated \Q is inside
-a character class, this causes an error, because the character class is not
-terminated.
-<a name="digitsafterbackslash"></a></P>
-<br><b>
-Non-printing characters
-</b><br>
-<P>
-A second use of backslash provides a way of encoding non-printing characters
-in patterns in a visible manner. There is no restriction on the appearance of
-non-printing characters, apart from the binary zero that terminates a pattern,
-but when a pattern is being prepared by text editing, it is often easier to use
-one of the following escape sequences than the binary character it represents.
-In an ASCII or Unicode environment, these escapes are as follows:
-<pre>
- \a alarm, that is, the BEL character (hex 07)
- \cx "control-x", where x is any ASCII character
- \e escape (hex 1B)
- \f form feed (hex 0C)
- \n linefeed (hex 0A)
- \r carriage return (hex 0D)
- \t tab (hex 09)
- \0dd character with octal code 0dd
- \ddd character with octal code ddd, or back reference
- \o{ddd..} character with octal code ddd..
- \xhh character with hex code hh
- \x{hhh..} character with hex code hhh.. (non-JavaScript mode)
- \uhhhh character with hex code hhhh (JavaScript mode only)
-</pre>
-The precise effect of \cx on ASCII characters is as follows: if x is a lower
-case letter, it is converted to upper case. Then bit 6 of the character (hex
-40) is inverted. Thus \cA to \cZ become hex 01 to hex 1A (A is 41, Z is 5A),
-but \c{ becomes hex 3B ({ is 7B), and \c; becomes hex 7B (; is 3B). If the
-data item (byte or 16-bit value) following \c has a value greater than 127, a
-compile-time error occurs. This locks out non-ASCII characters in all modes.
-</P>
-<P>
-When PCRE is compiled in EBCDIC mode, \a, \e, \f, \n, \r, and \t
-generate the appropriate EBCDIC code values. The \c escape is processed
-as specified for Perl in the <b>perlebcdic</b> document. The only characters
-that are allowed after \c are A-Z, a-z, or one of @, [, \, ], ^, _, or ?. Any
-other character provokes a compile-time error. The sequence \c@ encodes
-character code 0; after \c the letters (in either case) encode characters 1-26
-(hex 01 to hex 1A); [, \, ], ^, and _ encode characters 27-31 (hex 1B to hex
-1F), and \c? becomes either 255 (hex FF) or 95 (hex 5F).
-</P>
-<P>
-Thus, apart from \c?, these escapes generate the same character code values as
-they do in an ASCII environment, though the meanings of the values mostly
-differ. For example, \cG always generates code value 7, which is BEL in ASCII
-but DEL in EBCDIC.
-</P>
-<P>
-The sequence \c? generates DEL (127, hex 7F) in an ASCII environment, but
-because 127 is not a control character in EBCDIC, Perl makes it generate the
-APC character. Unfortunately, there are several variants of EBCDIC. In most of
-them the APC character has the value 255 (hex FF), but in the one Perl calls
-POSIX-BC its value is 95 (hex 5F). If certain other characters have POSIX-BC
-values, PCRE makes \c? generate 95; otherwise it generates 255.
-</P>
-<P>
-After \0 up to two further octal digits are read. If there are fewer than two
-digits, just those that are present are used. Thus the sequence \0\x\015
-specifies two binary zeros followed by a CR character (code value 13). Make
-sure you supply two digits after the initial zero if the pattern character that
-follows is itself an octal digit.
-</P>
-<P>
-The escape \o must be followed by a sequence of octal digits, enclosed in
-braces. An error occurs if this is not the case. This escape is a recent
-addition to Perl; it provides way of specifying character code points as octal
-numbers greater than 0777, and it also allows octal numbers and back references
-to be unambiguously specified.
-</P>
-<P>
-For greater clarity and unambiguity, it is best to avoid following \ by a
-digit greater than zero. Instead, use \o{} or \x{} to specify character
-numbers, and \g{} to specify back references. The following paragraphs
-describe the old, ambiguous syntax.
-</P>
-<P>
-The handling of a backslash followed by a digit other than 0 is complicated,
-and Perl has changed in recent releases, causing PCRE also to change. Outside a
-character class, PCRE reads the digit and any following digits as a decimal
-number. If the number is less than 8, or if there have been at least that many
-previous capturing left parentheses in the expression, the entire sequence is
-taken as a <i>back reference</i>. A description of how this works is given
-<a href="#backreferences">later,</a>
-following the discussion of
-<a href="#subpattern">parenthesized subpatterns.</a>
-</P>
-<P>
-Inside a character class, or if the decimal number following \ is greater than
-7 and there have not been that many capturing subpatterns, PCRE handles \8 and
-\9 as the literal characters "8" and "9", and otherwise re-reads up to three
-octal digits following the backslash, using them to generate a data character.
-Any subsequent digits stand for themselves. For example:
-<pre>
- \040 is another way of writing an ASCII space
- \40 is the same, provided there are fewer than 40 previous capturing subpatterns
- \7 is always a back reference
- \11 might be a back reference, or another way of writing a tab
- \011 is always a tab
- \0113 is a tab followed by the character "3"
- \113 might be a back reference, otherwise the character with octal code 113
- \377 might be a back reference, otherwise the value 255 (decimal)
- \81 is either a back reference, or the two characters "8" and "1"
-</pre>
-Note that octal values of 100 or greater that are specified using this syntax
-must not be introduced by a leading zero, because no more than three octal
-digits are ever read.
-</P>
-<P>
-By default, after \x that is not followed by {, from zero to two hexadecimal
-digits are read (letters can be in upper or lower case). Any number of
-hexadecimal digits may appear between \x{ and }. If a character other than
-a hexadecimal digit appears between \x{ and }, or if there is no terminating
-}, an error occurs.
-</P>
-<P>
-If the PCRE_JAVASCRIPT_COMPAT option is set, the interpretation of \x is
-as just described only when it is followed by two hexadecimal digits.
-Otherwise, it matches a literal "x" character. In JavaScript mode, support for
-code points greater than 256 is provided by \u, which must be followed by
-four hexadecimal digits; otherwise it matches a literal "u" character.
-</P>
-<P>
-Characters whose value is less than 256 can be defined by either of the two
-syntaxes for \x (or by \u in JavaScript mode). There is no difference in the
-way they are handled. For example, \xdc is exactly the same as \x{dc} (or
-\u00dc in JavaScript mode).
-</P>
-<br><b>
-Constraints on character values
-</b><br>
-<P>
-Characters that are specified using octal or hexadecimal numbers are
-limited to certain values, as follows:
-<pre>
- 8-bit non-UTF mode less than 0x100
- 8-bit UTF-8 mode less than 0x10ffff and a valid codepoint
- 16-bit non-UTF mode less than 0x10000
- 16-bit UTF-16 mode less than 0x10ffff and a valid codepoint
- 32-bit non-UTF mode less than 0x100000000
- 32-bit UTF-32 mode less than 0x10ffff and a valid codepoint
-</pre>
-Invalid Unicode codepoints are the range 0xd800 to 0xdfff (the so-called
-"surrogate" codepoints), and 0xffef.
-</P>
-<br><b>
-Escape sequences in character classes
-</b><br>
-<P>
-All the sequences that define a single character value can be used both inside
-and outside character classes. In addition, inside a character class, \b is
-interpreted as the backspace character (hex 08).
-</P>
-<P>
-\N is not allowed in a character class. \B, \R, and \X are not special
-inside a character class. Like other unrecognized escape sequences, they are
-treated as the literal characters "B", "R", and "X" by default, but cause an
-error if the PCRE_EXTRA option is set. Outside a character class, these
-sequences have different meanings.
-</P>
-<br><b>
-Unsupported escape sequences
-</b><br>
-<P>
-In Perl, the sequences \l, \L, \u, and \U are recognized by its string
-handler and used to modify the case of following characters. By default, PCRE
-does not support these escape sequences. However, if the PCRE_JAVASCRIPT_COMPAT
-option is set, \U matches a "U" character, and \u can be used to define a
-character by code point, as described in the previous section.
-</P>
-<br><b>
-Absolute and relative back references
-</b><br>
-<P>
-The sequence \g followed by an unsigned or a negative number, optionally
-enclosed in braces, is an absolute or relative back reference. A named back
-reference can be coded as \g{name}. Back references are discussed
-<a href="#backreferences">later,</a>
-following the discussion of
-<a href="#subpattern">parenthesized subpatterns.</a>
-</P>
-<br><b>
-Absolute and relative subroutine calls
-</b><br>
-<P>
-For compatibility with Oniguruma, the non-Perl syntax \g followed by a name or
-a number enclosed either in angle brackets or single quotes, is an alternative
-syntax for referencing a subpattern as a "subroutine". Details are discussed
-<a href="#onigurumasubroutines">later.</a>
-Note that \g{...} (Perl syntax) and \g&#60;...&#62; (Oniguruma syntax) are <i>not</i>
-synonymous. The former is a back reference; the latter is a
-<a href="#subpatternsassubroutines">subroutine</a>
-call.
-<a name="genericchartypes"></a></P>
-<br><b>
-Generic character types
-</b><br>
-<P>
-Another use of backslash is for specifying generic character types:
-<pre>
- \d any decimal digit
- \D any character that is not a decimal digit
- \h any horizontal white space character
- \H any character that is not a horizontal white space character
- \s any white space character
- \S any character that is not a white space character
- \v any vertical white space character
- \V any character that is not a vertical white space character
- \w any "word" character
- \W any "non-word" character
-</pre>
-There is also the single sequence \N, which matches a non-newline character.
-This is the same as
-<a href="#fullstopdot">the "." metacharacter</a>
-when PCRE_DOTALL is not set. Perl also uses \N to match characters by name;
-PCRE does not support this.
-</P>
-<P>
-Each pair of lower and upper case escape sequences partitions the complete set
-of characters into two disjoint sets. Any given character matches one, and only
-one, of each pair. The sequences can appear both inside and outside character
-classes. They each match one character of the appropriate type. If the current
-matching point is at the end of the subject string, all of them fail, because
-there is no character to match.
-</P>
-<P>
-For compatibility with Perl, \s did not used to match the VT character (code
-11), which made it different from the the POSIX "space" class. However, Perl
-added VT at release 5.18, and PCRE followed suit at release 8.34. The default
-\s characters are now HT (9), LF (10), VT (11), FF (12), CR (13), and space
-(32), which are defined as white space in the "C" locale. This list may vary if
-locale-specific matching is taking place. For example, in some locales the
-"non-breaking space" character (\xA0) is recognized as white space, and in
-others the VT character is not.
-</P>
-<P>
-A "word" character is an underscore or any character that is a letter or digit.
-By default, the definition of letters and digits is controlled by PCRE's
-low-valued character tables, and may vary if locale-specific matching is taking
-place (see
-<a href="pcreapi.html#localesupport">"Locale support"</a>
-in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page). For example, in a French locale such as "fr_FR" in Unix-like systems,
-or "french" in Windows, some character codes greater than 127 are used for
-accented letters, and these are then matched by \w. The use of locales with
-Unicode is discouraged.
-</P>
-<P>
-By default, characters whose code points are greater than 127 never match \d,
-\s, or \w, and always match \D, \S, and \W, although this may vary for
-characters in the range 128-255 when locale-specific matching is happening.
-These escape sequences retain their original meanings from before Unicode
-support was available, mainly for efficiency reasons. If PCRE is compiled with
-Unicode property support, and the PCRE_UCP option is set, the behaviour is
-changed so that Unicode properties are used to determine character types, as
-follows:
-<pre>
- \d any character that matches \p{Nd} (decimal digit)
- \s any character that matches \p{Z} or \h or \v
- \w any character that matches \p{L} or \p{N}, plus underscore
-</pre>
-The upper case escapes match the inverse sets of characters. Note that \d
-matches only decimal digits, whereas \w matches any Unicode digit, as well as
-any Unicode letter, and underscore. Note also that PCRE_UCP affects \b, and
-\B because they are defined in terms of \w and \W. Matching these sequences
-is noticeably slower when PCRE_UCP is set.
-</P>
-<P>
-The sequences \h, \H, \v, and \V are features that were added to Perl at
-release 5.10. In contrast to the other sequences, which match only ASCII
-characters by default, these always match certain high-valued code points,
-whether or not PCRE_UCP is set. The horizontal space characters are:
-<pre>
- U+0009 Horizontal tab (HT)
- U+0020 Space
- U+00A0 Non-break space
- U+1680 Ogham space mark
- U+180E Mongolian vowel separator
- U+2000 En quad
- U+2001 Em quad
- U+2002 En space
- U+2003 Em space
- U+2004 Three-per-em space
- U+2005 Four-per-em space
- U+2006 Six-per-em space
- U+2007 Figure space
- U+2008 Punctuation space
- U+2009 Thin space
- U+200A Hair space
- U+202F Narrow no-break space
- U+205F Medium mathematical space
- U+3000 Ideographic space
-</pre>
-The vertical space characters are:
-<pre>
- U+000A Linefeed (LF)
- U+000B Vertical tab (VT)
- U+000C Form feed (FF)
- U+000D Carriage return (CR)
- U+0085 Next line (NEL)
- U+2028 Line separator
- U+2029 Paragraph separator
-</pre>
-In 8-bit, non-UTF-8 mode, only the characters with codepoints less than 256 are
-relevant.
-<a name="newlineseq"></a></P>
-<br><b>
-Newline sequences
-</b><br>
-<P>
-Outside a character class, by default, the escape sequence \R matches any
-Unicode newline sequence. In 8-bit non-UTF-8 mode \R is equivalent to the
-following:
-<pre>
- (?&#62;\r\n|\n|\x0b|\f|\r|\x85)
-</pre>
-This is an example of an "atomic group", details of which are given
-<a href="#atomicgroup">below.</a>
-This particular group matches either the two-character sequence CR followed by
-LF, or one of the single characters LF (linefeed, U+000A), VT (vertical tab,
-U+000B), FF (form feed, U+000C), CR (carriage return, U+000D), or NEL (next
-line, U+0085). The two-character sequence is treated as a single unit that
-cannot be split.
-</P>
-<P>
-In other modes, two additional characters whose codepoints are greater than 255
-are added: LS (line separator, U+2028) and PS (paragraph separator, U+2029).
-Unicode character property support is not needed for these characters to be
-recognized.
-</P>
-<P>
-It is possible to restrict \R to match only CR, LF, or CRLF (instead of the
-complete set of Unicode line endings) by setting the option PCRE_BSR_ANYCRLF
-either at compile time or when the pattern is matched. (BSR is an abbrevation
-for "backslash R".) This can be made the default when PCRE is built; if this is
-the case, the other behaviour can be requested via the PCRE_BSR_UNICODE option.
-It is also possible to specify these settings by starting a pattern string with
-one of the following sequences:
-<pre>
- (*BSR_ANYCRLF) CR, LF, or CRLF only
- (*BSR_UNICODE) any Unicode newline sequence
-</pre>
-These override the default and the options given to the compiling function, but
-they can themselves be overridden by options given to a matching function. Note
-that these special settings, which are not Perl-compatible, are recognized only
-at the very start of a pattern, and that they must be in upper case. If more
-than one of them is present, the last one is used. They can be combined with a
-change of newline convention; for example, a pattern can start with:
-<pre>
- (*ANY)(*BSR_ANYCRLF)
-</pre>
-They can also be combined with the (*UTF8), (*UTF16), (*UTF32), (*UTF) or
-(*UCP) special sequences. Inside a character class, \R is treated as an
-unrecognized escape sequence, and so matches the letter "R" by default, but
-causes an error if PCRE_EXTRA is set.
-<a name="uniextseq"></a></P>
-<br><b>
-Unicode character properties
-</b><br>
-<P>
-When PCRE is built with Unicode character property support, three additional
-escape sequences that match characters with specific properties are available.
-When in 8-bit non-UTF-8 mode, these sequences are of course limited to testing
-characters whose codepoints are less than 256, but they do work in this mode.
-The extra escape sequences are:
-<pre>
- \p{<i>xx</i>} a character with the <i>xx</i> property
- \P{<i>xx</i>} a character without the <i>xx</i> property
- \X a Unicode extended grapheme cluster
-</pre>
-The property names represented by <i>xx</i> above are limited to the Unicode
-script names, the general category properties, "Any", which matches any
-character (including newline), and some special PCRE properties (described
-in the
-<a href="#extraprops">next section).</a>
-Other Perl properties such as "InMusicalSymbols" are not currently supported by
-PCRE. Note that \P{Any} does not match any characters, so always causes a
-match failure.
-</P>
-<P>
-Sets of Unicode characters are defined as belonging to certain scripts. A
-character from one of these sets can be matched using a script name. For
-example:
-<pre>
- \p{Greek}
- \P{Han}
-</pre>
-Those that are not part of an identified script are lumped together as
-"Common". The current list of scripts is:
-</P>
-<P>
-Arabic,
-Armenian,
-Avestan,
-Balinese,
-Bamum,
-Bassa_Vah,
-Batak,
-Bengali,
-Bopomofo,
-Brahmi,
-Braille,
-Buginese,
-Buhid,
-Canadian_Aboriginal,
-Carian,
-Caucasian_Albanian,
-Chakma,
-Cham,
-Cherokee,
-Common,
-Coptic,
-Cuneiform,
-Cypriot,
-Cyrillic,
-Deseret,
-Devanagari,
-Duployan,
-Egyptian_Hieroglyphs,
-Elbasan,
-Ethiopic,
-Georgian,
-Glagolitic,
-Gothic,
-Grantha,
-Greek,
-Gujarati,
-Gurmukhi,
-Han,
-Hangul,
-Hanunoo,
-Hebrew,
-Hiragana,
-Imperial_Aramaic,
-Inherited,
-Inscriptional_Pahlavi,
-Inscriptional_Parthian,
-Javanese,
-Kaithi,
-Kannada,
-Katakana,
-Kayah_Li,
-Kharoshthi,
-Khmer,
-Khojki,
-Khudawadi,
-Lao,
-Latin,
-Lepcha,
-Limbu,
-Linear_A,
-Linear_B,
-Lisu,
-Lycian,
-Lydian,
-Mahajani,
-Malayalam,
-Mandaic,
-Manichaean,
-Meetei_Mayek,
-Mende_Kikakui,
-Meroitic_Cursive,
-Meroitic_Hieroglyphs,
-Miao,
-Modi,
-Mongolian,
-Mro,
-Myanmar,
-Nabataean,
-New_Tai_Lue,
-Nko,
-Ogham,
-Ol_Chiki,
-Old_Italic,
-Old_North_Arabian,
-Old_Permic,
-Old_Persian,
-Old_South_Arabian,
-Old_Turkic,
-Oriya,
-Osmanya,
-Pahawh_Hmong,
-Palmyrene,
-Pau_Cin_Hau,
-Phags_Pa,
-Phoenician,
-Psalter_Pahlavi,
-Rejang,
-Runic,
-Samaritan,
-Saurashtra,
-Sharada,
-Shavian,
-Siddham,
-Sinhala,
-Sora_Sompeng,
-Sundanese,
-Syloti_Nagri,
-Syriac,
-Tagalog,
-Tagbanwa,
-Tai_Le,
-Tai_Tham,
-Tai_Viet,
-Takri,
-Tamil,
-Telugu,
-Thaana,
-Thai,
-Tibetan,
-Tifinagh,
-Tirhuta,
-Ugaritic,
-Vai,
-Warang_Citi,
-Yi.
-</P>
-<P>
-Each character has exactly one Unicode general category property, specified by
-a two-letter abbreviation. For compatibility with Perl, negation can be
-specified by including a circumflex between the opening brace and the property
-name. For example, \p{^Lu} is the same as \P{Lu}.
-</P>
-<P>
-If only one letter is specified with \p or \P, it includes all the general
-category properties that start with that letter. In this case, in the absence
-of negation, the curly brackets in the escape sequence are optional; these two
-examples have the same effect:
-<pre>
- \p{L}
- \pL
-</pre>
-The following general category property codes are supported:
-<pre>
- C Other
- Cc Control
- Cf Format
- Cn Unassigned
- Co Private use
- Cs Surrogate
-
- L Letter
- Ll Lower case letter
- Lm Modifier letter
- Lo Other letter
- Lt Title case letter
- Lu Upper case letter
-
- M Mark
- Mc Spacing mark
- Me Enclosing mark
- Mn Non-spacing mark
-
- N Number
- Nd Decimal number
- Nl Letter number
- No Other number
-
- P Punctuation
- Pc Connector punctuation
- Pd Dash punctuation
- Pe Close punctuation
- Pf Final punctuation
- Pi Initial punctuation
- Po Other punctuation
- Ps Open punctuation
-
- S Symbol
- Sc Currency symbol
- Sk Modifier symbol
- Sm Mathematical symbol
- So Other symbol
-
- Z Separator
- Zl Line separator
- Zp Paragraph separator
- Zs Space separator
-</pre>
-The special property L& is also supported: it matches a character that has
-the Lu, Ll, or Lt property, in other words, a letter that is not classified as
-a modifier or "other".
-</P>
-<P>
-The Cs (Surrogate) property applies only to characters in the range U+D800 to
-U+DFFF. Such characters are not valid in Unicode strings and so
-cannot be tested by PCRE, unless UTF validity checking has been turned off
-(see the discussion of PCRE_NO_UTF8_CHECK, PCRE_NO_UTF16_CHECK and
-PCRE_NO_UTF32_CHECK in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page). Perl does not support the Cs property.
-</P>
-<P>
-The long synonyms for property names that Perl supports (such as \p{Letter})
-are not supported by PCRE, nor is it permitted to prefix any of these
-properties with "Is".
-</P>
-<P>
-No character that is in the Unicode table has the Cn (unassigned) property.
-Instead, this property is assumed for any code point that is not in the
-Unicode table.
-</P>
-<P>
-Specifying caseless matching does not affect these escape sequences. For
-example, \p{Lu} always matches only upper case letters. This is different from
-the behaviour of current versions of Perl.
-</P>
-<P>
-Matching characters by Unicode property is not fast, because PCRE has to do a
-multistage table lookup in order to find a character's property. That is why
-the traditional escape sequences such as \d and \w do not use Unicode
-properties in PCRE by default, though you can make them do so by setting the
-PCRE_UCP option or by starting the pattern with (*UCP).
-</P>
-<br><b>
-Extended grapheme clusters
-</b><br>
-<P>
-The \X escape matches any number of Unicode characters that form an "extended
-grapheme cluster", and treats the sequence as an atomic group
-<a href="#atomicgroup">(see below).</a>
-Up to and including release 8.31, PCRE matched an earlier, simpler definition
-that was equivalent to
-<pre>
- (?&#62;\PM\pM*)
-</pre>
-That is, it matched a character without the "mark" property, followed by zero
-or more characters with the "mark" property. Characters with the "mark"
-property are typically non-spacing accents that affect the preceding character.
-</P>
-<P>
-This simple definition was extended in Unicode to include more complicated
-kinds of composite character by giving each character a grapheme breaking
-property, and creating rules that use these properties to define the boundaries
-of extended grapheme clusters. In releases of PCRE later than 8.31, \X matches
-one of these clusters.
-</P>
-<P>
-\X always matches at least one character. Then it decides whether to add
-additional characters according to the following rules for ending a cluster:
-</P>
-<P>
-1. End at the end of the subject string.
-</P>
-<P>
-2. Do not end between CR and LF; otherwise end after any control character.
-</P>
-<P>
-3. Do not break Hangul (a Korean script) syllable sequences. Hangul characters
-are of five types: L, V, T, LV, and LVT. An L character may be followed by an
-L, V, LV, or LVT character; an LV or V character may be followed by a V or T
-character; an LVT or T character may be follwed only by a T character.
-</P>
-<P>
-4. Do not end before extending characters or spacing marks. Characters with
-the "mark" property always have the "extend" grapheme breaking property.
-</P>
-<P>
-5. Do not end after prepend characters.
-</P>
-<P>
-6. Otherwise, end the cluster.
-<a name="extraprops"></a></P>
-<br><b>
-PCRE's additional properties
-</b><br>
-<P>
-As well as the standard Unicode properties described above, PCRE supports four
-more that make it possible to convert traditional escape sequences such as \w
-and \s to use Unicode properties. PCRE uses these non-standard, non-Perl
-properties internally when PCRE_UCP is set. However, they may also be used
-explicitly. These properties are:
-<pre>
- Xan Any alphanumeric character
- Xps Any POSIX space character
- Xsp Any Perl space character
- Xwd Any Perl "word" character
-</pre>
-Xan matches characters that have either the L (letter) or the N (number)
-property. Xps matches the characters tab, linefeed, vertical tab, form feed, or
-carriage return, and any other character that has the Z (separator) property.
-Xsp is the same as Xps; it used to exclude vertical tab, for Perl
-compatibility, but Perl changed, and so PCRE followed at release 8.34. Xwd
-matches the same characters as Xan, plus underscore.
-</P>
-<P>
-There is another non-standard property, Xuc, which matches any character that
-can be represented by a Universal Character Name in C++ and other programming
-languages. These are the characters $, @, ` (grave accent), and all characters
-with Unicode code points greater than or equal to U+00A0, except for the
-surrogates U+D800 to U+DFFF. Note that most base (ASCII) characters are
-excluded. (Universal Character Names are of the form \uHHHH or \UHHHHHHHH
-where H is a hexadecimal digit. Note that the Xuc property does not match these
-sequences but the characters that they represent.)
-<a name="resetmatchstart"></a></P>
-<br><b>
-Resetting the match start
-</b><br>
-<P>
-The escape sequence \K causes any previously matched characters not to be
-included in the final matched sequence. For example, the pattern:
-<pre>
- foo\Kbar
-</pre>
-matches "foobar", but reports that it has matched "bar". This feature is
-similar to a lookbehind assertion
-<a href="#lookbehind">(described below).</a>
-However, in this case, the part of the subject before the real match does not
-have to be of fixed length, as lookbehind assertions do. The use of \K does
-not interfere with the setting of
-<a href="#subpattern">captured substrings.</a>
-For example, when the pattern
-<pre>
- (foo)\Kbar
-</pre>
-matches "foobar", the first substring is still set to "foo".
-</P>
-<P>
-Perl documents that the use of \K within assertions is "not well defined". In
-PCRE, \K is acted upon when it occurs inside positive assertions, but is
-ignored in negative assertions. Note that when a pattern such as (?=ab\K)
-matches, the reported start of the match can be greater than the end of the
-match.
-<a name="smallassertions"></a></P>
-<br><b>
-Simple assertions
-</b><br>
-<P>
-The final use of backslash is for certain simple assertions. An assertion
-specifies a condition that has to be met at a particular point in a match,
-without consuming any characters from the subject string. The use of
-subpatterns for more complicated assertions is described
-<a href="#bigassertions">below.</a>
-The backslashed assertions are:
-<pre>
- \b matches at a word boundary
- \B matches when not at a word boundary
- \A matches at the start of the subject
- \Z matches at the end of the subject
- also matches before a newline at the end of the subject
- \z matches only at the end of the subject
- \G matches at the first matching position in the subject
-</pre>
-Inside a character class, \b has a different meaning; it matches the backspace
-character. If any other of these assertions appears in a character class, by
-default it matches the corresponding literal character (for example, \B
-matches the letter B). However, if the PCRE_EXTRA option is set, an "invalid
-escape sequence" error is generated instead.
-</P>
-<P>
-A word boundary is a position in the subject string where the current character
-and the previous character do not both match \w or \W (i.e. one matches
-\w and the other matches \W), or the start or end of the string if the
-first or last character matches \w, respectively. In a UTF mode, the meanings
-of \w and \W can be changed by setting the PCRE_UCP option. When this is
-done, it also affects \b and \B. Neither PCRE nor Perl has a separate "start
-of word" or "end of word" metasequence. However, whatever follows \b normally
-determines which it is. For example, the fragment \ba matches "a" at the start
-of a word.
-</P>
-<P>
-The \A, \Z, and \z assertions differ from the traditional circumflex and
-dollar (described in the next section) in that they only ever match at the very
-start and end of the subject string, whatever options are set. Thus, they are
-independent of multiline mode. These three assertions are not affected by the
-PCRE_NOTBOL or PCRE_NOTEOL options, which affect only the behaviour of the
-circumflex and dollar metacharacters. However, if the <i>startoffset</i>
-argument of <b>pcre_exec()</b> is non-zero, indicating that matching is to start
-at a point other than the beginning of the subject, \A can never match. The
-difference between \Z and \z is that \Z matches before a newline at the end
-of the string as well as at the very end, whereas \z matches only at the end.
-</P>
-<P>
-The \G assertion is true only when the current matching position is at the
-start point of the match, as specified by the <i>startoffset</i> argument of
-<b>pcre_exec()</b>. It differs from \A when the value of <i>startoffset</i> is
-non-zero. By calling <b>pcre_exec()</b> multiple times with appropriate
-arguments, you can mimic Perl's /g option, and it is in this kind of
-implementation where \G can be useful.
-</P>
-<P>
-Note, however, that PCRE's interpretation of \G, as the start of the current
-match, is subtly different from Perl's, which defines it as the end of the
-previous match. In Perl, these can be different when the previously matched
-string was empty. Because PCRE does just one match at a time, it cannot
-reproduce this behaviour.
-</P>
-<P>
-If all the alternatives of a pattern begin with \G, the expression is anchored
-to the starting match position, and the "anchored" flag is set in the compiled
-regular expression.
-</P>
-<br><a name="SEC6" href="#TOC1">CIRCUMFLEX AND DOLLAR</a><br>
-<P>
-The circumflex and dollar metacharacters are zero-width assertions. That is,
-they test for a particular condition being true without consuming any
-characters from the subject string.
-</P>
-<P>
-Outside a character class, in the default matching mode, the circumflex
-character is an assertion that is true only if the current matching point is at
-the start of the subject string. If the <i>startoffset</i> argument of
-<b>pcre_exec()</b> is non-zero, circumflex can never match if the PCRE_MULTILINE
-option is unset. Inside a character class, circumflex has an entirely different
-meaning
-<a href="#characterclass">(see below).</a>
-</P>
-<P>
-Circumflex need not be the first character of the pattern if a number of
-alternatives are involved, but it should be the first thing in each alternative
-in which it appears if the pattern is ever to match that branch. If all
-possible alternatives start with a circumflex, that is, if the pattern is
-constrained to match only at the start of the subject, it is said to be an
-"anchored" pattern. (There are also other constructs that can cause a pattern
-to be anchored.)
-</P>
-<P>
-The dollar character is an assertion that is true only if the current matching
-point is at the end of the subject string, or immediately before a newline at
-the end of the string (by default). Note, however, that it does not actually
-match the newline. Dollar need not be the last character of the pattern if a
-number of alternatives are involved, but it should be the last item in any
-branch in which it appears. Dollar has no special meaning in a character class.
-</P>
-<P>
-The meaning of dollar can be changed so that it matches only at the very end of
-the string, by setting the PCRE_DOLLAR_ENDONLY option at compile time. This
-does not affect the \Z assertion.
-</P>
-<P>
-The meanings of the circumflex and dollar characters are changed if the
-PCRE_MULTILINE option is set. When this is the case, a circumflex matches
-immediately after internal newlines as well as at the start of the subject
-string. It does not match after a newline that ends the string. A dollar
-matches before any newlines in the string, as well as at the very end, when
-PCRE_MULTILINE is set. When newline is specified as the two-character
-sequence CRLF, isolated CR and LF characters do not indicate newlines.
-</P>
-<P>
-For example, the pattern /^abc$/ matches the subject string "def\nabc" (where
-\n represents a newline) in multiline mode, but not otherwise. Consequently,
-patterns that are anchored in single line mode because all branches start with
-^ are not anchored in multiline mode, and a match for circumflex is possible
-when the <i>startoffset</i> argument of <b>pcre_exec()</b> is non-zero. The
-PCRE_DOLLAR_ENDONLY option is ignored if PCRE_MULTILINE is set.
-</P>
-<P>
-Note that the sequences \A, \Z, and \z can be used to match the start and
-end of the subject in both modes, and if all branches of a pattern start with
-\A it is always anchored, whether or not PCRE_MULTILINE is set.
-<a name="fullstopdot"></a></P>
-<br><a name="SEC7" href="#TOC1">FULL STOP (PERIOD, DOT) AND \N</a><br>
-<P>
-Outside a character class, a dot in the pattern matches any one character in
-the subject string except (by default) a character that signifies the end of a
-line.
-</P>
-<P>
-When a line ending is defined as a single character, dot never matches that
-character; when the two-character sequence CRLF is used, dot does not match CR
-if it is immediately followed by LF, but otherwise it matches all characters
-(including isolated CRs and LFs). When any Unicode line endings are being
-recognized, dot does not match CR or LF or any of the other line ending
-characters.
-</P>
-<P>
-The behaviour of dot with regard to newlines can be changed. If the PCRE_DOTALL
-option is set, a dot matches any one character, without exception. If the
-two-character sequence CRLF is present in the subject string, it takes two dots
-to match it.
-</P>
-<P>
-The handling of dot is entirely independent of the handling of circumflex and
-dollar, the only relationship being that they both involve newlines. Dot has no
-special meaning in a character class.
-</P>
-<P>
-The escape sequence \N behaves like a dot, except that it is not affected by
-the PCRE_DOTALL option. In other words, it matches any character except one
-that signifies the end of a line. Perl also uses \N to match characters by
-name; PCRE does not support this.
-</P>
-<br><a name="SEC8" href="#TOC1">MATCHING A SINGLE DATA UNIT</a><br>
-<P>
-Outside a character class, the escape sequence \C matches any one data unit,
-whether or not a UTF mode is set. In the 8-bit library, one data unit is one
-byte; in the 16-bit library it is a 16-bit unit; in the 32-bit library it is
-a 32-bit unit. Unlike a dot, \C always
-matches line-ending characters. The feature is provided in Perl in order to
-match individual bytes in UTF-8 mode, but it is unclear how it can usefully be
-used. Because \C breaks up characters into individual data units, matching one
-unit with \C in a UTF mode means that the rest of the string may start with a
-malformed UTF character. This has undefined results, because PCRE assumes that
-it is dealing with valid UTF strings (and by default it checks this at the
-start of processing unless the PCRE_NO_UTF8_CHECK, PCRE_NO_UTF16_CHECK or
-PCRE_NO_UTF32_CHECK option is used).
-</P>
-<P>
-PCRE does not allow \C to appear in lookbehind assertions
-<a href="#lookbehind">(described below)</a>
-in a UTF mode, because this would make it impossible to calculate the length of
-the lookbehind.
-</P>
-<P>
-In general, the \C escape sequence is best avoided. However, one
-way of using it that avoids the problem of malformed UTF characters is to use a
-lookahead to check the length of the next character, as in this pattern, which
-could be used with a UTF-8 string (ignore white space and line breaks):
-<pre>
- (?| (?=[\x00-\x7f])(\C) |
- (?=[\x80-\x{7ff}])(\C)(\C) |
- (?=[\x{800}-\x{ffff}])(\C)(\C)(\C) |
- (?=[\x{10000}-\x{1fffff}])(\C)(\C)(\C)(\C))
-</pre>
-A group that starts with (?| resets the capturing parentheses numbers in each
-alternative (see
-<a href="#dupsubpatternnumber">"Duplicate Subpattern Numbers"</a>
-below). The assertions at the start of each branch check the next UTF-8
-character for values whose encoding uses 1, 2, 3, or 4 bytes, respectively. The
-character's individual bytes are then captured by the appropriate number of
-groups.
-<a name="characterclass"></a></P>
-<br><a name="SEC9" href="#TOC1">SQUARE BRACKETS AND CHARACTER CLASSES</a><br>
-<P>
-An opening square bracket introduces a character class, terminated by a closing
-square bracket. A closing square bracket on its own is not special by default.
-However, if the PCRE_JAVASCRIPT_COMPAT option is set, a lone closing square
-bracket causes a compile-time error. If a closing square bracket is required as
-a member of the class, it should be the first data character in the class
-(after an initial circumflex, if present) or escaped with a backslash.
-</P>
-<P>
-A character class matches a single character in the subject. In a UTF mode, the
-character may be more than one data unit long. A matched character must be in
-the set of characters defined by the class, unless the first character in the
-class definition is a circumflex, in which case the subject character must not
-be in the set defined by the class. If a circumflex is actually required as a
-member of the class, ensure it is not the first character, or escape it with a
-backslash.
-</P>
-<P>
-For example, the character class [aeiou] matches any lower case vowel, while
-[^aeiou] matches any character that is not a lower case vowel. Note that a
-circumflex is just a convenient notation for specifying the characters that
-are in the class by enumerating those that are not. A class that starts with a
-circumflex is not an assertion; it still consumes a character from the subject
-string, and therefore it fails if the current pointer is at the end of the
-string.
-</P>
-<P>
-In UTF-8 (UTF-16, UTF-32) mode, characters with values greater than 255 (0xffff)
-can be included in a class as a literal string of data units, or by using the
-\x{ escaping mechanism.
-</P>
-<P>
-When caseless matching is set, any letters in a class represent both their
-upper case and lower case versions, so for example, a caseless [aeiou] matches
-"A" as well as "a", and a caseless [^aeiou] does not match "A", whereas a
-caseful version would. In a UTF mode, PCRE always understands the concept of
-case for characters whose values are less than 128, so caseless matching is
-always possible. For characters with higher values, the concept of case is
-supported if PCRE is compiled with Unicode property support, but not otherwise.
-If you want to use caseless matching in a UTF mode for characters 128 and
-above, you must ensure that PCRE is compiled with Unicode property support as
-well as with UTF support.
-</P>
-<P>
-Characters that might indicate line breaks are never treated in any special way
-when matching character classes, whatever line-ending sequence is in use, and
-whatever setting of the PCRE_DOTALL and PCRE_MULTILINE options is used. A class
-such as [^a] always matches one of these characters.
-</P>
-<P>
-The minus (hyphen) character can be used to specify a range of characters in a
-character class. For example, [d-m] matches any letter between d and m,
-inclusive. If a minus character is required in a class, it must be escaped with
-a backslash or appear in a position where it cannot be interpreted as
-indicating a range, typically as the first or last character in the class, or
-immediately after a range. For example, [b-d-z] matches letters in the range b
-to d, a hyphen character, or z.
-</P>
-<P>
-It is not possible to have the literal character "]" as the end character of a
-range. A pattern such as [W-]46] is interpreted as a class of two characters
-("W" and "-") followed by a literal string "46]", so it would match "W46]" or
-"-46]". However, if the "]" is escaped with a backslash it is interpreted as
-the end of range, so [W-\]46] is interpreted as a class containing a range
-followed by two other characters. The octal or hexadecimal representation of
-"]" can also be used to end a range.
-</P>
-<P>
-An error is generated if a POSIX character class (see below) or an escape
-sequence other than one that defines a single character appears at a point
-where a range ending character is expected. For example, [z-\xff] is valid,
-but [A-\d] and [A-[:digit:]] are not.
-</P>
-<P>
-Ranges operate in the collating sequence of character values. They can also be
-used for characters specified numerically, for example [\000-\037]. Ranges
-can include any characters that are valid for the current mode.
-</P>
-<P>
-If a range that includes letters is used when caseless matching is set, it
-matches the letters in either case. For example, [W-c] is equivalent to
-[][\\^_`wxyzabc], matched caselessly, and in a non-UTF mode, if character
-tables for a French locale are in use, [\xc8-\xcb] matches accented E
-characters in both cases. In UTF modes, PCRE supports the concept of case for
-characters with values greater than 128 only when it is compiled with Unicode
-property support.
-</P>
-<P>
-The character escape sequences \d, \D, \h, \H, \p, \P, \s, \S, \v,
-\V, \w, and \W may appear in a character class, and add the characters that
-they match to the class. For example, [\dABCDEF] matches any hexadecimal
-digit. In UTF modes, the PCRE_UCP option affects the meanings of \d, \s, \w
-and their upper case partners, just as it does when they appear outside a
-character class, as described in the section entitled
-<a href="#genericchartypes">"Generic character types"</a>
-above. The escape sequence \b has a different meaning inside a character
-class; it matches the backspace character. The sequences \B, \N, \R, and \X
-are not special inside a character class. Like any other unrecognized escape
-sequences, they are treated as the literal characters "B", "N", "R", and "X" by
-default, but cause an error if the PCRE_EXTRA option is set.
-</P>
-<P>
-A circumflex can conveniently be used with the upper case character types to
-specify a more restricted set of characters than the matching lower case type.
-For example, the class [^\W_] matches any letter or digit, but not underscore,
-whereas [\w] includes underscore. A positive character class should be read as
-"something OR something OR ..." and a negative class as "NOT something AND NOT
-something AND NOT ...".
-</P>
-<P>
-The only metacharacters that are recognized in character classes are backslash,
-hyphen (only where it can be interpreted as specifying a range), circumflex
-(only at the start), opening square bracket (only when it can be interpreted as
-introducing a POSIX class name, or for a special compatibility feature - see
-the next two sections), and the terminating closing square bracket. However,
-escaping other non-alphanumeric characters does no harm.
-</P>
-<br><a name="SEC10" href="#TOC1">POSIX CHARACTER CLASSES</a><br>
-<P>
-Perl supports the POSIX notation for character classes. This uses names
-enclosed by [: and :] within the enclosing square brackets. PCRE also supports
-this notation. For example,
-<pre>
- [01[:alpha:]%]
-</pre>
-matches "0", "1", any alphabetic character, or "%". The supported class names
-are:
-<pre>
- alnum letters and digits
- alpha letters
- ascii character codes 0 - 127
- blank space or tab only
- cntrl control characters
- digit decimal digits (same as \d)
- graph printing characters, excluding space
- lower lower case letters
- print printing characters, including space
- punct printing characters, excluding letters and digits and space
- space white space (the same as \s from PCRE 8.34)
- upper upper case letters
- word "word" characters (same as \w)
- xdigit hexadecimal digits
-</pre>
-The default "space" characters are HT (9), LF (10), VT (11), FF (12), CR (13),
-and space (32). If locale-specific matching is taking place, the list of space
-characters may be different; there may be fewer or more of them. "Space" used
-to be different to \s, which did not include VT, for Perl compatibility.
-However, Perl changed at release 5.18, and PCRE followed at release 8.34.
-"Space" and \s now match the same set of characters.
-</P>
-<P>
-The name "word" is a Perl extension, and "blank" is a GNU extension from Perl
-5.8. Another Perl extension is negation, which is indicated by a ^ character
-after the colon. For example,
-<pre>
- [12[:^digit:]]
-</pre>
-matches "1", "2", or any non-digit. PCRE (and Perl) also recognize the POSIX
-syntax [.ch.] and [=ch=] where "ch" is a "collating element", but these are not
-supported, and an error is given if they are encountered.
-</P>
-<P>
-By default, characters with values greater than 128 do not match any of the
-POSIX character classes. However, if the PCRE_UCP option is passed to
-<b>pcre_compile()</b>, some of the classes are changed so that Unicode character
-properties are used. This is achieved by replacing certain POSIX classes by
-other sequences, as follows:
-<pre>
- [:alnum:] becomes \p{Xan}
- [:alpha:] becomes \p{L}
- [:blank:] becomes \h
- [:digit:] becomes \p{Nd}
- [:lower:] becomes \p{Ll}
- [:space:] becomes \p{Xps}
- [:upper:] becomes \p{Lu}
- [:word:] becomes \p{Xwd}
-</pre>
-Negated versions, such as [:^alpha:] use \P instead of \p. Three other POSIX
-classes are handled specially in UCP mode:
-</P>
-<P>
-[:graph:]
-This matches characters that have glyphs that mark the page when printed. In
-Unicode property terms, it matches all characters with the L, M, N, P, S, or Cf
-properties, except for:
-<pre>
- U+061C Arabic Letter Mark
- U+180E Mongolian Vowel Separator
- U+2066 - U+2069 Various "isolate"s
-
-</PRE>
-</P>
-<P>
-[:print:]
-This matches the same characters as [:graph:] plus space characters that are
-not controls, that is, characters with the Zs property.
-</P>
-<P>
-[:punct:]
-This matches all characters that have the Unicode P (punctuation) property,
-plus those characters whose code points are less than 128 that have the S
-(Symbol) property.
-</P>
-<P>
-The other POSIX classes are unchanged, and match only characters with code
-points less than 128.
-</P>
-<br><a name="SEC11" href="#TOC1">COMPATIBILITY FEATURE FOR WORD BOUNDARIES</a><br>
-<P>
-In the POSIX.2 compliant library that was included in 4.4BSD Unix, the ugly
-syntax [[:&#60;:]] and [[:&#62;:]] is used for matching "start of word" and "end of
-word". PCRE treats these items as follows:
-<pre>
- [[:&#60;:]] is converted to \b(?=\w)
- [[:&#62;:]] is converted to \b(?&#60;=\w)
-</pre>
-Only these exact character sequences are recognized. A sequence such as
-[a[:&#60;:]b] provokes error for an unrecognized POSIX class name. This support is
-not compatible with Perl. It is provided to help migrations from other
-environments, and is best not used in any new patterns. Note that \b matches
-at the start and the end of a word (see
-<a href="#smallassertions">"Simple assertions"</a>
-above), and in a Perl-style pattern the preceding or following character
-normally shows which is wanted, without the need for the assertions that are
-used above in order to give exactly the POSIX behaviour.
-</P>
-<br><a name="SEC12" href="#TOC1">VERTICAL BAR</a><br>
-<P>
-Vertical bar characters are used to separate alternative patterns. For example,
-the pattern
-<pre>
- gilbert|sullivan
-</pre>
-matches either "gilbert" or "sullivan". Any number of alternatives may appear,
-and an empty alternative is permitted (matching the empty string). The matching
-process tries each alternative in turn, from left to right, and the first one
-that succeeds is used. If the alternatives are within a subpattern
-<a href="#subpattern">(defined below),</a>
-"succeeds" means matching the rest of the main pattern as well as the
-alternative in the subpattern.
-</P>
-<br><a name="SEC13" href="#TOC1">INTERNAL OPTION SETTING</a><br>
-<P>
-The settings of the PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL, and
-PCRE_EXTENDED options (which are Perl-compatible) can be changed from within
-the pattern by a sequence of Perl option letters enclosed between "(?" and ")".
-The option letters are
-<pre>
- i for PCRE_CASELESS
- m for PCRE_MULTILINE
- s for PCRE_DOTALL
- x for PCRE_EXTENDED
-</pre>
-For example, (?im) sets caseless, multiline matching. It is also possible to
-unset these options by preceding the letter with a hyphen, and a combined
-setting and unsetting such as (?im-sx), which sets PCRE_CASELESS and
-PCRE_MULTILINE while unsetting PCRE_DOTALL and PCRE_EXTENDED, is also
-permitted. If a letter appears both before and after the hyphen, the option is
-unset.
-</P>
-<P>
-The PCRE-specific options PCRE_DUPNAMES, PCRE_UNGREEDY, and PCRE_EXTRA can be
-changed in the same way as the Perl-compatible options by using the characters
-J, U and X respectively.
-</P>
-<P>
-When one of these option changes occurs at top level (that is, not inside
-subpattern parentheses), the change applies to the remainder of the pattern
-that follows. An option change within a subpattern (see below for a description
-of subpatterns) affects only that part of the subpattern that follows it, so
-<pre>
- (a(?i)b)c
-</pre>
-matches abc and aBc and no other strings (assuming PCRE_CASELESS is not used).
-By this means, options can be made to have different settings in different
-parts of the pattern. Any changes made in one alternative do carry on
-into subsequent branches within the same subpattern. For example,
-<pre>
- (a(?i)b|c)
-</pre>
-matches "ab", "aB", "c", and "C", even though when matching "C" the first
-branch is abandoned before the option setting. This is because the effects of
-option settings happen at compile time. There would be some very weird
-behaviour otherwise.
-</P>
-<P>
-<b>Note:</b> There are other PCRE-specific options that can be set by the
-application when the compiling or matching functions are called. In some cases
-the pattern can contain special leading sequences such as (*CRLF) to override
-what the application has set or what has been defaulted. Details are given in
-the section entitled
-<a href="#newlineseq">"Newline sequences"</a>
-above. There are also the (*UTF8), (*UTF16),(*UTF32), and (*UCP) leading
-sequences that can be used to set UTF and Unicode property modes; they are
-equivalent to setting the PCRE_UTF8, PCRE_UTF16, PCRE_UTF32 and the PCRE_UCP
-options, respectively. The (*UTF) sequence is a generic version that can be
-used with any of the libraries. However, the application can set the
-PCRE_NEVER_UTF option, which locks out the use of the (*UTF) sequences.
-<a name="subpattern"></a></P>
-<br><a name="SEC14" href="#TOC1">SUBPATTERNS</a><br>
-<P>
-Subpatterns are delimited by parentheses (round brackets), which can be nested.
-Turning part of a pattern into a subpattern does two things:
-<br>
-<br>
-1. It localizes a set of alternatives. For example, the pattern
-<pre>
- cat(aract|erpillar|)
-</pre>
-matches "cataract", "caterpillar", or "cat". Without the parentheses, it would
-match "cataract", "erpillar" or an empty string.
-<br>
-<br>
-2. It sets up the subpattern as a capturing subpattern. This means that, when
-the whole pattern matches, that portion of the subject string that matched the
-subpattern is passed back to the caller via the <i>ovector</i> argument of the
-matching function. (This applies only to the traditional matching functions;
-the DFA matching functions do not support capturing.)
-</P>
-<P>
-Opening parentheses are counted from left to right (starting from 1) to obtain
-numbers for the capturing subpatterns. For example, if the string "the red
-king" is matched against the pattern
-<pre>
- the ((red|white) (king|queen))
-</pre>
-the captured substrings are "red king", "red", and "king", and are numbered 1,
-2, and 3, respectively.
-</P>
-<P>
-The fact that plain parentheses fulfil two functions is not always helpful.
-There are often times when a grouping subpattern is required without a
-capturing requirement. If an opening parenthesis is followed by a question mark
-and a colon, the subpattern does not do any capturing, and is not counted when
-computing the number of any subsequent capturing subpatterns. For example, if
-the string "the white queen" is matched against the pattern
-<pre>
- the ((?:red|white) (king|queen))
-</pre>
-the captured substrings are "white queen" and "queen", and are numbered 1 and
-2. The maximum number of capturing subpatterns is 65535.
-</P>
-<P>
-As a convenient shorthand, if any option settings are required at the start of
-a non-capturing subpattern, the option letters may appear between the "?" and
-the ":". Thus the two patterns
-<pre>
- (?i:saturday|sunday)
- (?:(?i)saturday|sunday)
-</pre>
-match exactly the same set of strings. Because alternative branches are tried
-from left to right, and options are not reset until the end of the subpattern
-is reached, an option setting in one branch does affect subsequent branches, so
-the above patterns match "SUNDAY" as well as "Saturday".
-<a name="dupsubpatternnumber"></a></P>
-<br><a name="SEC15" href="#TOC1">DUPLICATE SUBPATTERN NUMBERS</a><br>
-<P>
-Perl 5.10 introduced a feature whereby each alternative in a subpattern uses
-the same numbers for its capturing parentheses. Such a subpattern starts with
-(?| and is itself a non-capturing subpattern. For example, consider this
-pattern:
-<pre>
- (?|(Sat)ur|(Sun))day
-</pre>
-Because the two alternatives are inside a (?| group, both sets of capturing
-parentheses are numbered one. Thus, when the pattern matches, you can look
-at captured substring number one, whichever alternative matched. This construct
-is useful when you want to capture part, but not all, of one of a number of
-alternatives. Inside a (?| group, parentheses are numbered as usual, but the
-number is reset at the start of each branch. The numbers of any capturing
-parentheses that follow the subpattern start after the highest number used in
-any branch. The following example is taken from the Perl documentation. The
-numbers underneath show in which buffer the captured content will be stored.
-<pre>
- # before ---------------branch-reset----------- after
- / ( a ) (?| x ( y ) z | (p (q) r) | (t) u (v) ) ( z ) /x
- # 1 2 2 3 2 3 4
-</pre>
-A back reference to a numbered subpattern uses the most recent value that is
-set for that number by any subpattern. The following pattern matches "abcabc"
-or "defdef":
-<pre>
- /(?|(abc)|(def))\1/
-</pre>
-In contrast, a subroutine call to a numbered subpattern always refers to the
-first one in the pattern with the given number. The following pattern matches
-"abcabc" or "defabc":
-<pre>
- /(?|(abc)|(def))(?1)/
-</pre>
-If a
-<a href="#conditions">condition test</a>
-for a subpattern's having matched refers to a non-unique number, the test is
-true if any of the subpatterns of that number have matched.
-</P>
-<P>
-An alternative approach to using this "branch reset" feature is to use
-duplicate named subpatterns, as described in the next section.
-</P>
-<br><a name="SEC16" href="#TOC1">NAMED SUBPATTERNS</a><br>
-<P>
-Identifying capturing parentheses by number is simple, but it can be very hard
-to keep track of the numbers in complicated regular expressions. Furthermore,
-if an expression is modified, the numbers may change. To help with this
-difficulty, PCRE supports the naming of subpatterns. This feature was not
-added to Perl until release 5.10. Python had the feature earlier, and PCRE
-introduced it at release 4.0, using the Python syntax. PCRE now supports both
-the Perl and the Python syntax. Perl allows identically numbered subpatterns to
-have different names, but PCRE does not.
-</P>
-<P>
-In PCRE, a subpattern can be named in one of three ways: (?&#60;name&#62;...) or
-(?'name'...) as in Perl, or (?P&#60;name&#62;...) as in Python. References to capturing
-parentheses from other parts of the pattern, such as
-<a href="#backreferences">back references,</a>
-<a href="#recursion">recursion,</a>
-and
-<a href="#conditions">conditions,</a>
-can be made by name as well as by number.
-</P>
-<P>
-Names consist of up to 32 alphanumeric characters and underscores, but must
-start with a non-digit. Named capturing parentheses are still allocated numbers
-as well as names, exactly as if the names were not present. The PCRE API
-provides function calls for extracting the name-to-number translation table
-from a compiled pattern. There is also a convenience function for extracting a
-captured substring by name.
-</P>
-<P>
-By default, a name must be unique within a pattern, but it is possible to relax
-this constraint by setting the PCRE_DUPNAMES option at compile time. (Duplicate
-names are also always permitted for subpatterns with the same number, set up as
-described in the previous section.) Duplicate names can be useful for patterns
-where only one instance of the named parentheses can match. Suppose you want to
-match the name of a weekday, either as a 3-letter abbreviation or as the full
-name, and in both cases you want to extract the abbreviation. This pattern
-(ignoring the line breaks) does the job:
-<pre>
- (?&#60;DN&#62;Mon|Fri|Sun)(?:day)?|
- (?&#60;DN&#62;Tue)(?:sday)?|
- (?&#60;DN&#62;Wed)(?:nesday)?|
- (?&#60;DN&#62;Thu)(?:rsday)?|
- (?&#60;DN&#62;Sat)(?:urday)?
-</pre>
-There are five capturing substrings, but only one is ever set after a match.
-(An alternative way of solving this problem is to use a "branch reset"
-subpattern, as described in the previous section.)
-</P>
-<P>
-The convenience function for extracting the data by name returns the substring
-for the first (and in this example, the only) subpattern of that name that
-matched. This saves searching to find which numbered subpattern it was.
-</P>
-<P>
-If you make a back reference to a non-unique named subpattern from elsewhere in
-the pattern, the subpatterns to which the name refers are checked in the order
-in which they appear in the overall pattern. The first one that is set is used
-for the reference. For example, this pattern matches both "foofoo" and
-"barbar" but not "foobar" or "barfoo":
-<pre>
- (?:(?&#60;n&#62;foo)|(?&#60;n&#62;bar))\k&#60;n&#62;
-
-</PRE>
-</P>
-<P>
-If you make a subroutine call to a non-unique named subpattern, the one that
-corresponds to the first occurrence of the name is used. In the absence of
-duplicate numbers (see the previous section) this is the one with the lowest
-number.
-</P>
-<P>
-If you use a named reference in a condition
-test (see the
-<a href="#conditions">section about conditions</a>
-below), either to check whether a subpattern has matched, or to check for
-recursion, all subpatterns with the same name are tested. If the condition is
-true for any one of them, the overall condition is true. This is the same
-behaviour as testing by number. For further details of the interfaces for
-handling named subpatterns, see the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-documentation.
-</P>
-<P>
-<b>Warning:</b> You cannot use different names to distinguish between two
-subpatterns with the same number because PCRE uses only the numbers when
-matching. For this reason, an error is given at compile time if different names
-are given to subpatterns with the same number. However, you can always give the
-same name to subpatterns with the same number, even when PCRE_DUPNAMES is not
-set.
-</P>
-<br><a name="SEC17" href="#TOC1">REPETITION</a><br>
-<P>
-Repetition is specified by quantifiers, which can follow any of the following
-items:
-<pre>
- a literal data character
- the dot metacharacter
- the \C escape sequence
- the \X escape sequence
- the \R escape sequence
- an escape such as \d or \pL that matches a single character
- a character class
- a back reference (see next section)
- a parenthesized subpattern (including assertions)
- a subroutine call to a subpattern (recursive or otherwise)
-</pre>
-The general repetition quantifier specifies a minimum and maximum number of
-permitted matches, by giving the two numbers in curly brackets (braces),
-separated by a comma. The numbers must be less than 65536, and the first must
-be less than or equal to the second. For example:
-<pre>
- z{2,4}
-</pre>
-matches "zz", "zzz", or "zzzz". A closing brace on its own is not a special
-character. If the second number is omitted, but the comma is present, there is
-no upper limit; if the second number and the comma are both omitted, the
-quantifier specifies an exact number of required matches. Thus
-<pre>
- [aeiou]{3,}
-</pre>
-matches at least 3 successive vowels, but may match many more, while
-<pre>
- \d{8}
-</pre>
-matches exactly 8 digits. An opening curly bracket that appears in a position
-where a quantifier is not allowed, or one that does not match the syntax of a
-quantifier, is taken as a literal character. For example, {,6} is not a
-quantifier, but a literal string of four characters.
-</P>
-<P>
-In UTF modes, quantifiers apply to characters rather than to individual data
-units. Thus, for example, \x{100}{2} matches two characters, each of
-which is represented by a two-byte sequence in a UTF-8 string. Similarly,
-\X{3} matches three Unicode extended grapheme clusters, each of which may be
-several data units long (and they may be of different lengths).
-</P>
-<P>
-The quantifier {0} is permitted, causing the expression to behave as if the
-previous item and the quantifier were not present. This may be useful for
-subpatterns that are referenced as
-<a href="#subpatternsassubroutines">subroutines</a>
-from elsewhere in the pattern (but see also the section entitled
-<a href="#subdefine">"Defining subpatterns for use by reference only"</a>
-below). Items other than subpatterns that have a {0} quantifier are omitted
-from the compiled pattern.
-</P>
-<P>
-For convenience, the three most common quantifiers have single-character
-abbreviations:
-<pre>
- * is equivalent to {0,}
- + is equivalent to {1,}
- ? is equivalent to {0,1}
-</pre>
-It is possible to construct infinite loops by following a subpattern that can
-match no characters with a quantifier that has no upper limit, for example:
-<pre>
- (a?)*
-</pre>
-Earlier versions of Perl and PCRE used to give an error at compile time for
-such patterns. However, because there are cases where this can be useful, such
-patterns are now accepted, but if any repetition of the subpattern does in fact
-match no characters, the loop is forcibly broken.
-</P>
-<P>
-By default, the quantifiers are "greedy", that is, they match as much as
-possible (up to the maximum number of permitted times), without causing the
-rest of the pattern to fail. The classic example of where this gives problems
-is in trying to match comments in C programs. These appear between /* and */
-and within the comment, individual * and / characters may appear. An attempt to
-match C comments by applying the pattern
-<pre>
- /\*.*\*/
-</pre>
-to the string
-<pre>
- /* first comment */ not comment /* second comment */
-</pre>
-fails, because it matches the entire string owing to the greediness of the .*
-item.
-</P>
-<P>
-However, if a quantifier is followed by a question mark, it ceases to be
-greedy, and instead matches the minimum number of times possible, so the
-pattern
-<pre>
- /\*.*?\*/
-</pre>
-does the right thing with the C comments. The meaning of the various
-quantifiers is not otherwise changed, just the preferred number of matches.
-Do not confuse this use of question mark with its use as a quantifier in its
-own right. Because it has two uses, it can sometimes appear doubled, as in
-<pre>
- \d??\d
-</pre>
-which matches one digit by preference, but can match two if that is the only
-way the rest of the pattern matches.
-</P>
-<P>
-If the PCRE_UNGREEDY option is set (an option that is not available in Perl),
-the quantifiers are not greedy by default, but individual ones can be made
-greedy by following them with a question mark. In other words, it inverts the
-default behaviour.
-</P>
-<P>
-When a parenthesized subpattern is quantified with a minimum repeat count that
-is greater than 1 or with a limited maximum, more memory is required for the
-compiled pattern, in proportion to the size of the minimum or maximum.
-</P>
-<P>
-If a pattern starts with .* or .{0,} and the PCRE_DOTALL option (equivalent
-to Perl's /s) is set, thus allowing the dot to match newlines, the pattern is
-implicitly anchored, because whatever follows will be tried against every
-character position in the subject string, so there is no point in retrying the
-overall match at any position after the first. PCRE normally treats such a
-pattern as though it were preceded by \A.
-</P>
-<P>
-In cases where it is known that the subject string contains no newlines, it is
-worth setting PCRE_DOTALL in order to obtain this optimization, or
-alternatively using ^ to indicate anchoring explicitly.
-</P>
-<P>
-However, there are some cases where the optimization cannot be used. When .*
-is inside capturing parentheses that are the subject of a back reference
-elsewhere in the pattern, a match at the start may fail where a later one
-succeeds. Consider, for example:
-<pre>
- (.*)abc\1
-</pre>
-If the subject is "xyz123abc123" the match point is the fourth character. For
-this reason, such a pattern is not implicitly anchored.
-</P>
-<P>
-Another case where implicit anchoring is not applied is when the leading .* is
-inside an atomic group. Once again, a match at the start may fail where a later
-one succeeds. Consider this pattern:
-<pre>
- (?&#62;.*?a)b
-</pre>
-It matches "ab" in the subject "aab". The use of the backtracking control verbs
-(*PRUNE) and (*SKIP) also disable this optimization.
-</P>
-<P>
-When a capturing subpattern is repeated, the value captured is the substring
-that matched the final iteration. For example, after
-<pre>
- (tweedle[dume]{3}\s*)+
-</pre>
-has matched "tweedledum tweedledee" the value of the captured substring is
-"tweedledee". However, if there are nested capturing subpatterns, the
-corresponding captured values may have been set in previous iterations. For
-example, after
-<pre>
- /(a|(b))+/
-</pre>
-matches "aba" the value of the second captured substring is "b".
-<a name="atomicgroup"></a></P>
-<br><a name="SEC18" href="#TOC1">ATOMIC GROUPING AND POSSESSIVE QUANTIFIERS</a><br>
-<P>
-With both maximizing ("greedy") and minimizing ("ungreedy" or "lazy")
-repetition, failure of what follows normally causes the repeated item to be
-re-evaluated to see if a different number of repeats allows the rest of the
-pattern to match. Sometimes it is useful to prevent this, either to change the
-nature of the match, or to cause it fail earlier than it otherwise might, when
-the author of the pattern knows there is no point in carrying on.
-</P>
-<P>
-Consider, for example, the pattern \d+foo when applied to the subject line
-<pre>
- 123456bar
-</pre>
-After matching all 6 digits and then failing to match "foo", the normal
-action of the matcher is to try again with only 5 digits matching the \d+
-item, and then with 4, and so on, before ultimately failing. "Atomic grouping"
-(a term taken from Jeffrey Friedl's book) provides the means for specifying
-that once a subpattern has matched, it is not to be re-evaluated in this way.
-</P>
-<P>
-If we use atomic grouping for the previous example, the matcher gives up
-immediately on failing to match "foo" the first time. The notation is a kind of
-special parenthesis, starting with (?&#62; as in this example:
-<pre>
- (?&#62;\d+)foo
-</pre>
-This kind of parenthesis "locks up" the part of the pattern it contains once
-it has matched, and a failure further into the pattern is prevented from
-backtracking into it. Backtracking past it to previous items, however, works as
-normal.
-</P>
-<P>
-An alternative description is that a subpattern of this type matches the string
-of characters that an identical standalone pattern would match, if anchored at
-the current point in the subject string.
-</P>
-<P>
-Atomic grouping subpatterns are not capturing subpatterns. Simple cases such as
-the above example can be thought of as a maximizing repeat that must swallow
-everything it can. So, while both \d+ and \d+? are prepared to adjust the
-number of digits they match in order to make the rest of the pattern match,
-(?&#62;\d+) can only match an entire sequence of digits.
-</P>
-<P>
-Atomic groups in general can of course contain arbitrarily complicated
-subpatterns, and can be nested. However, when the subpattern for an atomic
-group is just a single repeated item, as in the example above, a simpler
-notation, called a "possessive quantifier" can be used. This consists of an
-additional + character following a quantifier. Using this notation, the
-previous example can be rewritten as
-<pre>
- \d++foo
-</pre>
-Note that a possessive quantifier can be used with an entire group, for
-example:
-<pre>
- (abc|xyz){2,3}+
-</pre>
-Possessive quantifiers are always greedy; the setting of the PCRE_UNGREEDY
-option is ignored. They are a convenient notation for the simpler forms of
-atomic group. However, there is no difference in the meaning of a possessive
-quantifier and the equivalent atomic group, though there may be a performance
-difference; possessive quantifiers should be slightly faster.
-</P>
-<P>
-The possessive quantifier syntax is an extension to the Perl 5.8 syntax.
-Jeffrey Friedl originated the idea (and the name) in the first edition of his
-book. Mike McCloskey liked it, so implemented it when he built Sun's Java
-package, and PCRE copied it from there. It ultimately found its way into Perl
-at release 5.10.
-</P>
-<P>
-PCRE has an optimization that automatically "possessifies" certain simple
-pattern constructs. For example, the sequence A+B is treated as A++B because
-there is no point in backtracking into a sequence of A's when B must follow.
-</P>
-<P>
-When a pattern contains an unlimited repeat inside a subpattern that can itself
-be repeated an unlimited number of times, the use of an atomic group is the
-only way to avoid some failing matches taking a very long time indeed. The
-pattern
-<pre>
- (\D+|&#60;\d+&#62;)*[!?]
-</pre>
-matches an unlimited number of substrings that either consist of non-digits, or
-digits enclosed in &#60;&#62;, followed by either ! or ?. When it matches, it runs
-quickly. However, if it is applied to
-<pre>
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-</pre>
-it takes a long time before reporting failure. This is because the string can
-be divided between the internal \D+ repeat and the external * repeat in a
-large number of ways, and all have to be tried. (The example uses [!?] rather
-than a single character at the end, because both PCRE and Perl have an
-optimization that allows for fast failure when a single character is used. They
-remember the last single character that is required for a match, and fail early
-if it is not present in the string.) If the pattern is changed so that it uses
-an atomic group, like this:
-<pre>
- ((?&#62;\D+)|&#60;\d+&#62;)*[!?]
-</pre>
-sequences of non-digits cannot be broken, and failure happens quickly.
-<a name="backreferences"></a></P>
-<br><a name="SEC19" href="#TOC1">BACK REFERENCES</a><br>
-<P>
-Outside a character class, a backslash followed by a digit greater than 0 (and
-possibly further digits) is a back reference to a capturing subpattern earlier
-(that is, to its left) in the pattern, provided there have been that many
-previous capturing left parentheses.
-</P>
-<P>
-However, if the decimal number following the backslash is less than 10, it is
-always taken as a back reference, and causes an error only if there are not
-that many capturing left parentheses in the entire pattern. In other words, the
-parentheses that are referenced need not be to the left of the reference for
-numbers less than 10. A "forward back reference" of this type can make sense
-when a repetition is involved and the subpattern to the right has participated
-in an earlier iteration.
-</P>
-<P>
-It is not possible to have a numerical "forward back reference" to a subpattern
-whose number is 10 or more using this syntax because a sequence such as \50 is
-interpreted as a character defined in octal. See the subsection entitled
-"Non-printing characters"
-<a href="#digitsafterbackslash">above</a>
-for further details of the handling of digits following a backslash. There is
-no such problem when named parentheses are used. A back reference to any
-subpattern is possible using named parentheses (see below).
-</P>
-<P>
-Another way of avoiding the ambiguity inherent in the use of digits following a
-backslash is to use the \g escape sequence. This escape must be followed by an
-unsigned number or a negative number, optionally enclosed in braces. These
-examples are all identical:
-<pre>
- (ring), \1
- (ring), \g1
- (ring), \g{1}
-</pre>
-An unsigned number specifies an absolute reference without the ambiguity that
-is present in the older syntax. It is also useful when literal digits follow
-the reference. A negative number is a relative reference. Consider this
-example:
-<pre>
- (abc(def)ghi)\g{-1}
-</pre>
-The sequence \g{-1} is a reference to the most recently started capturing
-subpattern before \g, that is, is it equivalent to \2 in this example.
-Similarly, \g{-2} would be equivalent to \1. The use of relative references
-can be helpful in long patterns, and also in patterns that are created by
-joining together fragments that contain references within themselves.
-</P>
-<P>
-A back reference matches whatever actually matched the capturing subpattern in
-the current subject string, rather than anything matching the subpattern
-itself (see
-<a href="#subpatternsassubroutines">"Subpatterns as subroutines"</a>
-below for a way of doing that). So the pattern
-<pre>
- (sens|respons)e and \1ibility
-</pre>
-matches "sense and sensibility" and "response and responsibility", but not
-"sense and responsibility". If caseful matching is in force at the time of the
-back reference, the case of letters is relevant. For example,
-<pre>
- ((?i)rah)\s+\1
-</pre>
-matches "rah rah" and "RAH RAH", but not "RAH rah", even though the original
-capturing subpattern is matched caselessly.
-</P>
-<P>
-There are several different ways of writing back references to named
-subpatterns. The .NET syntax \k{name} and the Perl syntax \k&#60;name&#62; or
-\k'name' are supported, as is the Python syntax (?P=name). Perl 5.10's unified
-back reference syntax, in which \g can be used for both numeric and named
-references, is also supported. We could rewrite the above example in any of
-the following ways:
-<pre>
- (?&#60;p1&#62;(?i)rah)\s+\k&#60;p1&#62;
- (?'p1'(?i)rah)\s+\k{p1}
- (?P&#60;p1&#62;(?i)rah)\s+(?P=p1)
- (?&#60;p1&#62;(?i)rah)\s+\g{p1}
-</pre>
-A subpattern that is referenced by name may appear in the pattern before or
-after the reference.
-</P>
-<P>
-There may be more than one back reference to the same subpattern. If a
-subpattern has not actually been used in a particular match, any back
-references to it always fail by default. For example, the pattern
-<pre>
- (a|(bc))\2
-</pre>
-always fails if it starts to match "a" rather than "bc". However, if the
-PCRE_JAVASCRIPT_COMPAT option is set at compile time, a back reference to an
-unset value matches an empty string.
-</P>
-<P>
-Because there may be many capturing parentheses in a pattern, all digits
-following a backslash are taken as part of a potential back reference number.
-If the pattern continues with a digit character, some delimiter must be used to
-terminate the back reference. If the PCRE_EXTENDED option is set, this can be
-white space. Otherwise, the \g{ syntax or an empty comment (see
-<a href="#comments">"Comments"</a>
-below) can be used.
-</P>
-<br><b>
-Recursive back references
-</b><br>
-<P>
-A back reference that occurs inside the parentheses to which it refers fails
-when the subpattern is first used, so, for example, (a\1) never matches.
-However, such references can be useful inside repeated subpatterns. For
-example, the pattern
-<pre>
- (a|b\1)+
-</pre>
-matches any number of "a"s and also "aba", "ababbaa" etc. At each iteration of
-the subpattern, the back reference matches the character string corresponding
-to the previous iteration. In order for this to work, the pattern must be such
-that the first iteration does not need to match the back reference. This can be
-done using alternation, as in the example above, or by a quantifier with a
-minimum of zero.
-</P>
-<P>
-Back references of this type cause the group that they reference to be treated
-as an
-<a href="#atomicgroup">atomic group.</a>
-Once the whole group has been matched, a subsequent matching failure cannot
-cause backtracking into the middle of the group.
-<a name="bigassertions"></a></P>
-<br><a name="SEC20" href="#TOC1">ASSERTIONS</a><br>
-<P>
-An assertion is a test on the characters following or preceding the current
-matching point that does not actually consume any characters. The simple
-assertions coded as \b, \B, \A, \G, \Z, \z, ^ and $ are described
-<a href="#smallassertions">above.</a>
-</P>
-<P>
-More complicated assertions are coded as subpatterns. There are two kinds:
-those that look ahead of the current position in the subject string, and those
-that look behind it. An assertion subpattern is matched in the normal way,
-except that it does not cause the current matching position to be changed.
-</P>
-<P>
-Assertion subpatterns are not capturing subpatterns. If such an assertion
-contains capturing subpatterns within it, these are counted for the purposes of
-numbering the capturing subpatterns in the whole pattern. However, substring
-capturing is carried out only for positive assertions. (Perl sometimes, but not
-always, does do capturing in negative assertions.)
-</P>
-<P>
-WARNING: If a positive assertion containing one or more capturing subpatterns
-succeeds, but failure to match later in the pattern causes backtracking over
-this assertion, the captures within the assertion are reset only if no higher
-numbered captures are already set. This is, unfortunately, a fundamental
-limitation of the current implementation, and as PCRE1 is now in
-maintenance-only status, it is unlikely ever to change.
-</P>
-<P>
-For compatibility with Perl, assertion subpatterns may be repeated; though
-it makes no sense to assert the same thing several times, the side effect of
-capturing parentheses may occasionally be useful. In practice, there only three
-cases:
-<br>
-<br>
-(1) If the quantifier is {0}, the assertion is never obeyed during matching.
-However, it may contain internal capturing parenthesized groups that are called
-from elsewhere via the
-<a href="#subpatternsassubroutines">subroutine mechanism.</a>
-<br>
-<br>
-(2) If quantifier is {0,n} where n is greater than zero, it is treated as if it
-were {0,1}. At run time, the rest of the pattern match is tried with and
-without the assertion, the order depending on the greediness of the quantifier.
-<br>
-<br>
-(3) If the minimum repetition is greater than zero, the quantifier is ignored.
-The assertion is obeyed just once when encountered during matching.
-</P>
-<br><b>
-Lookahead assertions
-</b><br>
-<P>
-Lookahead assertions start with (?= for positive assertions and (?! for
-negative assertions. For example,
-<pre>
- \w+(?=;)
-</pre>
-matches a word followed by a semicolon, but does not include the semicolon in
-the match, and
-<pre>
- foo(?!bar)
-</pre>
-matches any occurrence of "foo" that is not followed by "bar". Note that the
-apparently similar pattern
-<pre>
- (?!foo)bar
-</pre>
-does not find an occurrence of "bar" that is preceded by something other than
-"foo"; it finds any occurrence of "bar" whatsoever, because the assertion
-(?!foo) is always true when the next three characters are "bar". A
-lookbehind assertion is needed to achieve the other effect.
-</P>
-<P>
-If you want to force a matching failure at some point in a pattern, the most
-convenient way to do it is with (?!) because an empty string always matches, so
-an assertion that requires there not to be an empty string must always fail.
-The backtracking control verb (*FAIL) or (*F) is a synonym for (?!).
-<a name="lookbehind"></a></P>
-<br><b>
-Lookbehind assertions
-</b><br>
-<P>
-Lookbehind assertions start with (?&#60;= for positive assertions and (?&#60;! for
-negative assertions. For example,
-<pre>
- (?&#60;!foo)bar
-</pre>
-does find an occurrence of "bar" that is not preceded by "foo". The contents of
-a lookbehind assertion are restricted such that all the strings it matches must
-have a fixed length. However, if there are several top-level alternatives, they
-do not all have to have the same fixed length. Thus
-<pre>
- (?&#60;=bullock|donkey)
-</pre>
-is permitted, but
-<pre>
- (?&#60;!dogs?|cats?)
-</pre>
-causes an error at compile time. Branches that match different length strings
-are permitted only at the top level of a lookbehind assertion. This is an
-extension compared with Perl, which requires all branches to match the same
-length of string. An assertion such as
-<pre>
- (?&#60;=ab(c|de))
-</pre>
-is not permitted, because its single top-level branch can match two different
-lengths, but it is acceptable to PCRE if rewritten to use two top-level
-branches:
-<pre>
- (?&#60;=abc|abde)
-</pre>
-In some cases, the escape sequence \K
-<a href="#resetmatchstart">(see above)</a>
-can be used instead of a lookbehind assertion to get round the fixed-length
-restriction.
-</P>
-<P>
-The implementation of lookbehind assertions is, for each alternative, to
-temporarily move the current position back by the fixed length and then try to
-match. If there are insufficient characters before the current position, the
-assertion fails.
-</P>
-<P>
-In a UTF mode, PCRE does not allow the \C escape (which matches a single data
-unit even in a UTF mode) to appear in lookbehind assertions, because it makes
-it impossible to calculate the length of the lookbehind. The \X and \R
-escapes, which can match different numbers of data units, are also not
-permitted.
-</P>
-<P>
-<a href="#subpatternsassubroutines">"Subroutine"</a>
-calls (see below) such as (?2) or (?&X) are permitted in lookbehinds, as long
-as the subpattern matches a fixed-length string.
-<a href="#recursion">Recursion,</a>
-however, is not supported.
-</P>
-<P>
-Possessive quantifiers can be used in conjunction with lookbehind assertions to
-specify efficient matching of fixed-length strings at the end of subject
-strings. Consider a simple pattern such as
-<pre>
- abcd$
-</pre>
-when applied to a long string that does not match. Because matching proceeds
-from left to right, PCRE will look for each "a" in the subject and then see if
-what follows matches the rest of the pattern. If the pattern is specified as
-<pre>
- ^.*abcd$
-</pre>
-the initial .* matches the entire string at first, but when this fails (because
-there is no following "a"), it backtracks to match all but the last character,
-then all but the last two characters, and so on. Once again the search for "a"
-covers the entire string, from right to left, so we are no better off. However,
-if the pattern is written as
-<pre>
- ^.*+(?&#60;=abcd)
-</pre>
-there can be no backtracking for the .*+ item; it can match only the entire
-string. The subsequent lookbehind assertion does a single test on the last four
-characters. If it fails, the match fails immediately. For long strings, this
-approach makes a significant difference to the processing time.
-</P>
-<br><b>
-Using multiple assertions
-</b><br>
-<P>
-Several assertions (of any sort) may occur in succession. For example,
-<pre>
- (?&#60;=\d{3})(?&#60;!999)foo
-</pre>
-matches "foo" preceded by three digits that are not "999". Notice that each of
-the assertions is applied independently at the same point in the subject
-string. First there is a check that the previous three characters are all
-digits, and then there is a check that the same three characters are not "999".
-This pattern does <i>not</i> match "foo" preceded by six characters, the first
-of which are digits and the last three of which are not "999". For example, it
-doesn't match "123abcfoo". A pattern to do that is
-<pre>
- (?&#60;=\d{3}...)(?&#60;!999)foo
-</pre>
-This time the first assertion looks at the preceding six characters, checking
-that the first three are digits, and then the second assertion checks that the
-preceding three characters are not "999".
-</P>
-<P>
-Assertions can be nested in any combination. For example,
-<pre>
- (?&#60;=(?&#60;!foo)bar)baz
-</pre>
-matches an occurrence of "baz" that is preceded by "bar" which in turn is not
-preceded by "foo", while
-<pre>
- (?&#60;=\d{3}(?!999)...)foo
-</pre>
-is another pattern that matches "foo" preceded by three digits and any three
-characters that are not "999".
-<a name="conditions"></a></P>
-<br><a name="SEC21" href="#TOC1">CONDITIONAL SUBPATTERNS</a><br>
-<P>
-It is possible to cause the matching process to obey a subpattern
-conditionally or to choose between two alternative subpatterns, depending on
-the result of an assertion, or whether a specific capturing subpattern has
-already been matched. The two possible forms of conditional subpattern are:
-<pre>
- (?(condition)yes-pattern)
- (?(condition)yes-pattern|no-pattern)
-</pre>
-If the condition is satisfied, the yes-pattern is used; otherwise the
-no-pattern (if present) is used. If there are more than two alternatives in the
-subpattern, a compile-time error occurs. Each of the two alternatives may
-itself contain nested subpatterns of any form, including conditional
-subpatterns; the restriction to two alternatives applies only at the level of
-the condition. This pattern fragment is an example where the alternatives are
-complex:
-<pre>
- (?(1) (A|B|C) | (D | (?(2)E|F) | E) )
-
-</PRE>
-</P>
-<P>
-There are four kinds of condition: references to subpatterns, references to
-recursion, a pseudo-condition called DEFINE, and assertions.
-</P>
-<br><b>
-Checking for a used subpattern by number
-</b><br>
-<P>
-If the text between the parentheses consists of a sequence of digits, the
-condition is true if a capturing subpattern of that number has previously
-matched. If there is more than one capturing subpattern with the same number
-(see the earlier
-<a href="#recursion">section about duplicate subpattern numbers),</a>
-the condition is true if any of them have matched. An alternative notation is
-to precede the digits with a plus or minus sign. In this case, the subpattern
-number is relative rather than absolute. The most recently opened parentheses
-can be referenced by (?(-1), the next most recent by (?(-2), and so on. Inside
-loops it can also make sense to refer to subsequent groups. The next
-parentheses to be opened can be referenced as (?(+1), and so on. (The value
-zero in any of these forms is not used; it provokes a compile-time error.)
-</P>
-<P>
-Consider the following pattern, which contains non-significant white space to
-make it more readable (assume the PCRE_EXTENDED option) and to divide it into
-three parts for ease of discussion:
-<pre>
- ( \( )? [^()]+ (?(1) \) )
-</pre>
-The first part matches an optional opening parenthesis, and if that
-character is present, sets it as the first captured substring. The second part
-matches one or more characters that are not parentheses. The third part is a
-conditional subpattern that tests whether or not the first set of parentheses
-matched. If they did, that is, if subject started with an opening parenthesis,
-the condition is true, and so the yes-pattern is executed and a closing
-parenthesis is required. Otherwise, since no-pattern is not present, the
-subpattern matches nothing. In other words, this pattern matches a sequence of
-non-parentheses, optionally enclosed in parentheses.
-</P>
-<P>
-If you were embedding this pattern in a larger one, you could use a relative
-reference:
-<pre>
- ...other stuff... ( \( )? [^()]+ (?(-1) \) ) ...
-</pre>
-This makes the fragment independent of the parentheses in the larger pattern.
-</P>
-<br><b>
-Checking for a used subpattern by name
-</b><br>
-<P>
-Perl uses the syntax (?(&#60;name&#62;)...) or (?('name')...) to test for a used
-subpattern by name. For compatibility with earlier versions of PCRE, which had
-this facility before Perl, the syntax (?(name)...) is also recognized.
-</P>
-<P>
-Rewriting the above example to use a named subpattern gives this:
-<pre>
- (?&#60;OPEN&#62; \( )? [^()]+ (?(&#60;OPEN&#62;) \) )
-</pre>
-If the name used in a condition of this kind is a duplicate, the test is
-applied to all subpatterns of the same name, and is true if any one of them has
-matched.
-</P>
-<br><b>
-Checking for pattern recursion
-</b><br>
-<P>
-If the condition is the string (R), and there is no subpattern with the name R,
-the condition is true if a recursive call to the whole pattern or any
-subpattern has been made. If digits or a name preceded by ampersand follow the
-letter R, for example:
-<pre>
- (?(R3)...) or (?(R&name)...)
-</pre>
-the condition is true if the most recent recursion is into a subpattern whose
-number or name is given. This condition does not check the entire recursion
-stack. If the name used in a condition of this kind is a duplicate, the test is
-applied to all subpatterns of the same name, and is true if any one of them is
-the most recent recursion.
-</P>
-<P>
-At "top level", all these recursion test conditions are false.
-<a href="#recursion">The syntax for recursive patterns</a>
-is described below.
-<a name="subdefine"></a></P>
-<br><b>
-Defining subpatterns for use by reference only
-</b><br>
-<P>
-If the condition is the string (DEFINE), and there is no subpattern with the
-name DEFINE, the condition is always false. In this case, there may be only one
-alternative in the subpattern. It is always skipped if control reaches this
-point in the pattern; the idea of DEFINE is that it can be used to define
-subroutines that can be referenced from elsewhere. (The use of
-<a href="#subpatternsassubroutines">subroutines</a>
-is described below.) For example, a pattern to match an IPv4 address such as
-"192.168.23.245" could be written like this (ignore white space and line
-breaks):
-<pre>
- (?(DEFINE) (?&#60;byte&#62; 2[0-4]\d | 25[0-5] | 1\d\d | [1-9]?\d) )
- \b (?&byte) (\.(?&byte)){3} \b
-</pre>
-The first part of the pattern is a DEFINE group inside which a another group
-named "byte" is defined. This matches an individual component of an IPv4
-address (a number less than 256). When matching takes place, this part of the
-pattern is skipped because DEFINE acts like a false condition. The rest of the
-pattern uses references to the named group to match the four dot-separated
-components of an IPv4 address, insisting on a word boundary at each end.
-</P>
-<br><b>
-Assertion conditions
-</b><br>
-<P>
-If the condition is not in any of the above formats, it must be an assertion.
-This may be a positive or negative lookahead or lookbehind assertion. Consider
-this pattern, again containing non-significant white space, and with the two
-alternatives on the second line:
-<pre>
- (?(?=[^a-z]*[a-z])
- \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} )
-</pre>
-The condition is a positive lookahead assertion that matches an optional
-sequence of non-letters followed by a letter. In other words, it tests for the
-presence of at least one letter in the subject. If a letter is found, the
-subject is matched against the first alternative; otherwise it is matched
-against the second. This pattern matches strings in one of the two forms
-dd-aaa-dd or dd-dd-dd, where aaa are letters and dd are digits.
-<a name="comments"></a></P>
-<br><a name="SEC22" href="#TOC1">COMMENTS</a><br>
-<P>
-There are two ways of including comments in patterns that are processed by
-PCRE. In both cases, the start of the comment must not be in a character class,
-nor in the middle of any other sequence of related characters such as (?: or a
-subpattern name or number. The characters that make up a comment play no part
-in the pattern matching.
-</P>
-<P>
-The sequence (?# marks the start of a comment that continues up to the next
-closing parenthesis. Nested parentheses are not permitted. If the PCRE_EXTENDED
-option is set, an unescaped # character also introduces a comment, which in
-this case continues to immediately after the next newline character or
-character sequence in the pattern. Which characters are interpreted as newlines
-is controlled by the options passed to a compiling function or by a special
-sequence at the start of the pattern, as described in the section entitled
-<a href="#newlines">"Newline conventions"</a>
-above. Note that the end of this type of comment is a literal newline sequence
-in the pattern; escape sequences that happen to represent a newline do not
-count. For example, consider this pattern when PCRE_EXTENDED is set, and the
-default newline convention is in force:
-<pre>
- abc #comment \n still comment
-</pre>
-On encountering the # character, <b>pcre_compile()</b> skips along, looking for
-a newline in the pattern. The sequence \n is still literal at this stage, so
-it does not terminate the comment. Only an actual character with the code value
-0x0a (the default newline) does so.
-<a name="recursion"></a></P>
-<br><a name="SEC23" href="#TOC1">RECURSIVE PATTERNS</a><br>
-<P>
-Consider the problem of matching a string in parentheses, allowing for
-unlimited nested parentheses. Without the use of recursion, the best that can
-be done is to use a pattern that matches up to some fixed depth of nesting. It
-is not possible to handle an arbitrary nesting depth.
-</P>
-<P>
-For some time, Perl has provided a facility that allows regular expressions to
-recurse (amongst other things). It does this by interpolating Perl code in the
-expression at run time, and the code can refer to the expression itself. A Perl
-pattern using code interpolation to solve the parentheses problem can be
-created like this:
-<pre>
- $re = qr{\( (?: (?&#62;[^()]+) | (?p{$re}) )* \)}x;
-</pre>
-The (?p{...}) item interpolates Perl code at run time, and in this case refers
-recursively to the pattern in which it appears.
-</P>
-<P>
-Obviously, PCRE cannot support the interpolation of Perl code. Instead, it
-supports special syntax for recursion of the entire pattern, and also for
-individual subpattern recursion. After its introduction in PCRE and Python,
-this kind of recursion was subsequently introduced into Perl at release 5.10.
-</P>
-<P>
-A special item that consists of (? followed by a number greater than zero and a
-closing parenthesis is a recursive subroutine call of the subpattern of the
-given number, provided that it occurs inside that subpattern. (If not, it is a
-<a href="#subpatternsassubroutines">non-recursive subroutine</a>
-call, which is described in the next section.) The special item (?R) or (?0) is
-a recursive call of the entire regular expression.
-</P>
-<P>
-This PCRE pattern solves the nested parentheses problem (assume the
-PCRE_EXTENDED option is set so that white space is ignored):
-<pre>
- \( ( [^()]++ | (?R) )* \)
-</pre>
-First it matches an opening parenthesis. Then it matches any number of
-substrings which can either be a sequence of non-parentheses, or a recursive
-match of the pattern itself (that is, a correctly parenthesized substring).
-Finally there is a closing parenthesis. Note the use of a possessive quantifier
-to avoid backtracking into sequences of non-parentheses.
-</P>
-<P>
-If this were part of a larger pattern, you would not want to recurse the entire
-pattern, so instead you could use this:
-<pre>
- ( \( ( [^()]++ | (?1) )* \) )
-</pre>
-We have put the pattern into parentheses, and caused the recursion to refer to
-them instead of the whole pattern.
-</P>
-<P>
-In a larger pattern, keeping track of parenthesis numbers can be tricky. This
-is made easier by the use of relative references. Instead of (?1) in the
-pattern above you can write (?-2) to refer to the second most recently opened
-parentheses preceding the recursion. In other words, a negative number counts
-capturing parentheses leftwards from the point at which it is encountered.
-</P>
-<P>
-It is also possible to refer to subsequently opened parentheses, by writing
-references such as (?+2). However, these cannot be recursive because the
-reference is not inside the parentheses that are referenced. They are always
-<a href="#subpatternsassubroutines">non-recursive subroutine</a>
-calls, as described in the next section.
-</P>
-<P>
-An alternative approach is to use named parentheses instead. The Perl syntax
-for this is (?&name); PCRE's earlier syntax (?P&#62;name) is also supported. We
-could rewrite the above example as follows:
-<pre>
- (?&#60;pn&#62; \( ( [^()]++ | (?&pn) )* \) )
-</pre>
-If there is more than one subpattern with the same name, the earliest one is
-used.
-</P>
-<P>
-This particular example pattern that we have been looking at contains nested
-unlimited repeats, and so the use of a possessive quantifier for matching
-strings of non-parentheses is important when applying the pattern to strings
-that do not match. For example, when this pattern is applied to
-<pre>
- (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()
-</pre>
-it yields "no match" quickly. However, if a possessive quantifier is not used,
-the match runs for a very long time indeed because there are so many different
-ways the + and * repeats can carve up the subject, and all have to be tested
-before failure can be reported.
-</P>
-<P>
-At the end of a match, the values of capturing parentheses are those from
-the outermost level. If you want to obtain intermediate values, a callout
-function can be used (see below and the
-<a href="pcrecallout.html"><b>pcrecallout</b></a>
-documentation). If the pattern above is matched against
-<pre>
- (ab(cd)ef)
-</pre>
-the value for the inner capturing parentheses (numbered 2) is "ef", which is
-the last value taken on at the top level. If a capturing subpattern is not
-matched at the top level, its final captured value is unset, even if it was
-(temporarily) set at a deeper level during the matching process.
-</P>
-<P>
-If there are more than 15 capturing parentheses in a pattern, PCRE has to
-obtain extra memory to store data during a recursion, which it does by using
-<b>pcre_malloc</b>, freeing it via <b>pcre_free</b> afterwards. If no memory can
-be obtained, the match fails with the PCRE_ERROR_NOMEMORY error.
-</P>
-<P>
-Do not confuse the (?R) item with the condition (R), which tests for recursion.
-Consider this pattern, which matches text in angle brackets, allowing for
-arbitrary nesting. Only digits are allowed in nested brackets (that is, when
-recursing), whereas any characters are permitted at the outer level.
-<pre>
- &#60; (?: (?(R) \d++ | [^&#60;&#62;]*+) | (?R)) * &#62;
-</pre>
-In this pattern, (?(R) is the start of a conditional subpattern, with two
-different alternatives for the recursive and non-recursive cases. The (?R) item
-is the actual recursive call.
-<a name="recursiondifference"></a></P>
-<br><b>
-Differences in recursion processing between PCRE and Perl
-</b><br>
-<P>
-Recursion processing in PCRE differs from Perl in two important ways. In PCRE
-(like Python, but unlike Perl), a recursive subpattern call is always treated
-as an atomic group. That is, once it has matched some of the subject string, it
-is never re-entered, even if it contains untried alternatives and there is a
-subsequent matching failure. This can be illustrated by the following pattern,
-which purports to match a palindromic string that contains an odd number of
-characters (for example, "a", "aba", "abcba", "abcdcba"):
-<pre>
- ^(.|(.)(?1)\2)$
-</pre>
-The idea is that it either matches a single character, or two identical
-characters surrounding a sub-palindrome. In Perl, this pattern works; in PCRE
-it does not if the pattern is longer than three characters. Consider the
-subject string "abcba":
-</P>
-<P>
-At the top level, the first character is matched, but as it is not at the end
-of the string, the first alternative fails; the second alternative is taken
-and the recursion kicks in. The recursive call to subpattern 1 successfully
-matches the next character ("b"). (Note that the beginning and end of line
-tests are not part of the recursion).
-</P>
-<P>
-Back at the top level, the next character ("c") is compared with what
-subpattern 2 matched, which was "a". This fails. Because the recursion is
-treated as an atomic group, there are now no backtracking points, and so the
-entire match fails. (Perl is able, at this point, to re-enter the recursion and
-try the second alternative.) However, if the pattern is written with the
-alternatives in the other order, things are different:
-<pre>
- ^((.)(?1)\2|.)$
-</pre>
-This time, the recursing alternative is tried first, and continues to recurse
-until it runs out of characters, at which point the recursion fails. But this
-time we do have another alternative to try at the higher level. That is the big
-difference: in the previous case the remaining alternative is at a deeper
-recursion level, which PCRE cannot use.
-</P>
-<P>
-To change the pattern so that it matches all palindromic strings, not just
-those with an odd number of characters, it is tempting to change the pattern to
-this:
-<pre>
- ^((.)(?1)\2|.?)$
-</pre>
-Again, this works in Perl, but not in PCRE, and for the same reason. When a
-deeper recursion has matched a single character, it cannot be entered again in
-order to match an empty string. The solution is to separate the two cases, and
-write out the odd and even cases as alternatives at the higher level:
-<pre>
- ^(?:((.)(?1)\2|)|((.)(?3)\4|.))
-</pre>
-If you want to match typical palindromic phrases, the pattern has to ignore all
-non-word characters, which can be done like this:
-<pre>
- ^\W*+(?:((.)\W*+(?1)\W*+\2|)|((.)\W*+(?3)\W*+\4|\W*+.\W*+))\W*+$
-</pre>
-If run with the PCRE_CASELESS option, this pattern matches phrases such as "A
-man, a plan, a canal: Panama!" and it works well in both PCRE and Perl. Note
-the use of the possessive quantifier *+ to avoid backtracking into sequences of
-non-word characters. Without this, PCRE takes a great deal longer (ten times or
-more) to match typical phrases, and Perl takes so long that you think it has
-gone into a loop.
-</P>
-<P>
-<b>WARNING</b>: The palindrome-matching patterns above work only if the subject
-string does not start with a palindrome that is shorter than the entire string.
-For example, although "abcba" is correctly matched, if the subject is "ababa",
-PCRE finds the palindrome "aba" at the start, then fails at top level because
-the end of the string does not follow. Once again, it cannot jump back into the
-recursion to try other alternatives, so the entire match fails.
-</P>
-<P>
-The second way in which PCRE and Perl differ in their recursion processing is
-in the handling of captured values. In Perl, when a subpattern is called
-recursively or as a subpattern (see the next section), it has no access to any
-values that were captured outside the recursion, whereas in PCRE these values
-can be referenced. Consider this pattern:
-<pre>
- ^(.)(\1|a(?2))
-</pre>
-In PCRE, this pattern matches "bab". The first capturing parentheses match "b",
-then in the second group, when the back reference \1 fails to match "b", the
-second alternative matches "a" and then recurses. In the recursion, \1 does
-now match "b" and so the whole match succeeds. In Perl, the pattern fails to
-match because inside the recursive call \1 cannot access the externally set
-value.
-<a name="subpatternsassubroutines"></a></P>
-<br><a name="SEC24" href="#TOC1">SUBPATTERNS AS SUBROUTINES</a><br>
-<P>
-If the syntax for a recursive subpattern call (either by number or by
-name) is used outside the parentheses to which it refers, it operates like a
-subroutine in a programming language. The called subpattern may be defined
-before or after the reference. A numbered reference can be absolute or
-relative, as in these examples:
-<pre>
- (...(absolute)...)...(?2)...
- (...(relative)...)...(?-1)...
- (...(?+1)...(relative)...
-</pre>
-An earlier example pointed out that the pattern
-<pre>
- (sens|respons)e and \1ibility
-</pre>
-matches "sense and sensibility" and "response and responsibility", but not
-"sense and responsibility". If instead the pattern
-<pre>
- (sens|respons)e and (?1)ibility
-</pre>
-is used, it does match "sense and responsibility" as well as the other two
-strings. Another example is given in the discussion of DEFINE above.
-</P>
-<P>
-All subroutine calls, whether recursive or not, are always treated as atomic
-groups. That is, once a subroutine has matched some of the subject string, it
-is never re-entered, even if it contains untried alternatives and there is a
-subsequent matching failure. Any capturing parentheses that are set during the
-subroutine call revert to their previous values afterwards.
-</P>
-<P>
-Processing options such as case-independence are fixed when a subpattern is
-defined, so if it is used as a subroutine, such options cannot be changed for
-different calls. For example, consider this pattern:
-<pre>
- (abc)(?i:(?-1))
-</pre>
-It matches "abcabc". It does not match "abcABC" because the change of
-processing option does not affect the called subpattern.
-<a name="onigurumasubroutines"></a></P>
-<br><a name="SEC25" href="#TOC1">ONIGURUMA SUBROUTINE SYNTAX</a><br>
-<P>
-For compatibility with Oniguruma, the non-Perl syntax \g followed by a name or
-a number enclosed either in angle brackets or single quotes, is an alternative
-syntax for referencing a subpattern as a subroutine, possibly recursively. Here
-are two of the examples used above, rewritten using this syntax:
-<pre>
- (?&#60;pn&#62; \( ( (?&#62;[^()]+) | \g&#60;pn&#62; )* \) )
- (sens|respons)e and \g'1'ibility
-</pre>
-PCRE supports an extension to Oniguruma: if a number is preceded by a
-plus or a minus sign it is taken as a relative reference. For example:
-<pre>
- (abc)(?i:\g&#60;-1&#62;)
-</pre>
-Note that \g{...} (Perl syntax) and \g&#60;...&#62; (Oniguruma syntax) are <i>not</i>
-synonymous. The former is a back reference; the latter is a subroutine call.
-</P>
-<br><a name="SEC26" href="#TOC1">CALLOUTS</a><br>
-<P>
-Perl has a feature whereby using the sequence (?{...}) causes arbitrary Perl
-code to be obeyed in the middle of matching a regular expression. This makes it
-possible, amongst other things, to extract different substrings that match the
-same pair of parentheses when there is a repetition.
-</P>
-<P>
-PCRE provides a similar feature, but of course it cannot obey arbitrary Perl
-code. The feature is called "callout". The caller of PCRE provides an external
-function by putting its entry point in the global variable <i>pcre_callout</i>
-(8-bit library) or <i>pcre[16|32]_callout</i> (16-bit or 32-bit library).
-By default, this variable contains NULL, which disables all calling out.
-</P>
-<P>
-Within a regular expression, (?C) indicates the points at which the external
-function is to be called. If you want to identify different callout points, you
-can put a number less than 256 after the letter C. The default value is zero.
-For example, this pattern has two callout points:
-<pre>
- (?C1)abc(?C2)def
-</pre>
-If the PCRE_AUTO_CALLOUT flag is passed to a compiling function, callouts are
-automatically installed before each item in the pattern. They are all numbered
-255. If there is a conditional group in the pattern whose condition is an
-assertion, an additional callout is inserted just before the condition. An
-explicit callout may also be set at this position, as in this example:
-<pre>
- (?(?C9)(?=a)abc|def)
-</pre>
-Note that this applies only to assertion conditions, not to other types of
-condition.
-</P>
-<P>
-During matching, when PCRE reaches a callout point, the external function is
-called. It is provided with the number of the callout, the position in the
-pattern, and, optionally, one item of data originally supplied by the caller of
-the matching function. The callout function may cause matching to proceed, to
-backtrack, or to fail altogether.
-</P>
-<P>
-By default, PCRE implements a number of optimizations at compile time and
-matching time, and one side-effect is that sometimes callouts are skipped. If
-you need all possible callouts to happen, you need to set options that disable
-the relevant optimizations. More details, and a complete description of the
-interface to the callout function, are given in the
-<a href="pcrecallout.html"><b>pcrecallout</b></a>
-documentation.
-<a name="backtrackcontrol"></a></P>
-<br><a name="SEC27" href="#TOC1">BACKTRACKING CONTROL</a><br>
-<P>
-Perl 5.10 introduced a number of "Special Backtracking Control Verbs", which
-are still described in the Perl documentation as "experimental and subject to
-change or removal in a future version of Perl". It goes on to say: "Their usage
-in production code should be noted to avoid problems during upgrades." The same
-remarks apply to the PCRE features described in this section.
-</P>
-<P>
-The new verbs make use of what was previously invalid syntax: an opening
-parenthesis followed by an asterisk. They are generally of the form
-(*VERB) or (*VERB:NAME). Some may take either form, possibly behaving
-differently depending on whether or not a name is present. A name is any
-sequence of characters that does not include a closing parenthesis. The maximum
-length of name is 255 in the 8-bit library and 65535 in the 16-bit and 32-bit
-libraries. If the name is empty, that is, if the closing parenthesis
-immediately follows the colon, the effect is as if the colon were not there.
-Any number of these verbs may occur in a pattern.
-</P>
-<P>
-Since these verbs are specifically related to backtracking, most of them can be
-used only when the pattern is to be matched using one of the traditional
-matching functions, because these use a backtracking algorithm. With the
-exception of (*FAIL), which behaves like a failing negative assertion, the
-backtracking control verbs cause an error if encountered by a DFA matching
-function.
-</P>
-<P>
-The behaviour of these verbs in
-<a href="#btrepeat">repeated groups,</a>
-<a href="#btassert">assertions,</a>
-and in
-<a href="#btsub">subpatterns called as subroutines</a>
-(whether or not recursively) is documented below.
-<a name="nooptimize"></a></P>
-<br><b>
-Optimizations that affect backtracking verbs
-</b><br>
-<P>
-PCRE contains some optimizations that are used to speed up matching by running
-some checks at the start of each match attempt. For example, it may know the
-minimum length of matching subject, or that a particular character must be
-present. When one of these optimizations bypasses the running of a match, any
-included backtracking verbs will not, of course, be processed. You can suppress
-the start-of-match optimizations by setting the PCRE_NO_START_OPTIMIZE option
-when calling <b>pcre_compile()</b> or <b>pcre_exec()</b>, or by starting the
-pattern with (*NO_START_OPT). There is more discussion of this option in the
-section entitled
-<a href="pcreapi.html#execoptions">"Option bits for <b>pcre_exec()</b>"</a>
-in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-documentation.
-</P>
-<P>
-Experiments with Perl suggest that it too has similar optimizations, sometimes
-leading to anomalous results.
-</P>
-<br><b>
-Verbs that act immediately
-</b><br>
-<P>
-The following verbs act as soon as they are encountered. They may not be
-followed by a name.
-<pre>
- (*ACCEPT)
-</pre>
-This verb causes the match to end successfully, skipping the remainder of the
-pattern. However, when it is inside a subpattern that is called as a
-subroutine, only that subpattern is ended successfully. Matching then continues
-at the outer level. If (*ACCEPT) in triggered in a positive assertion, the
-assertion succeeds; in a negative assertion, the assertion fails.
-</P>
-<P>
-If (*ACCEPT) is inside capturing parentheses, the data so far is captured. For
-example:
-<pre>
- A((?:A|B(*ACCEPT)|C)D)
-</pre>
-This matches "AB", "AAD", or "ACD"; when it matches "AB", "B" is captured by
-the outer parentheses.
-<pre>
- (*FAIL) or (*F)
-</pre>
-This verb causes a matching failure, forcing backtracking to occur. It is
-equivalent to (?!) but easier to read. The Perl documentation notes that it is
-probably useful only when combined with (?{}) or (??{}). Those are, of course,
-Perl features that are not present in PCRE. The nearest equivalent is the
-callout feature, as for example in this pattern:
-<pre>
- a+(?C)(*FAIL)
-</pre>
-A match with the string "aaaa" always fails, but the callout is taken before
-each backtrack happens (in this example, 10 times).
-</P>
-<br><b>
-Recording which path was taken
-</b><br>
-<P>
-There is one verb whose main purpose is to track how a match was arrived at,
-though it also has a secondary use in conjunction with advancing the match
-starting point (see (*SKIP) below).
-<pre>
- (*MARK:NAME) or (*:NAME)
-</pre>
-A name is always required with this verb. There may be as many instances of
-(*MARK) as you like in a pattern, and their names do not have to be unique.
-</P>
-<P>
-When a match succeeds, the name of the last-encountered (*MARK:NAME),
-(*PRUNE:NAME), or (*THEN:NAME) on the matching path is passed back to the
-caller as described in the section entitled
-<a href="pcreapi.html#extradata">"Extra data for <b>pcre_exec()</b>"</a>
-in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-documentation. Here is an example of <b>pcretest</b> output, where the /K
-modifier requests the retrieval and outputting of (*MARK) data:
-<pre>
- re&#62; /X(*MARK:A)Y|X(*MARK:B)Z/K
- data&#62; XY
- 0: XY
- MK: A
- XZ
- 0: XZ
- MK: B
-</pre>
-The (*MARK) name is tagged with "MK:" in this output, and in this example it
-indicates which of the two alternatives matched. This is a more efficient way
-of obtaining this information than putting each alternative in its own
-capturing parentheses.
-</P>
-<P>
-If a verb with a name is encountered in a positive assertion that is true, the
-name is recorded and passed back if it is the last-encountered. This does not
-happen for negative assertions or failing positive assertions.
-</P>
-<P>
-After a partial match or a failed match, the last encountered name in the
-entire match process is returned. For example:
-<pre>
- re&#62; /X(*MARK:A)Y|X(*MARK:B)Z/K
- data&#62; XP
- No match, mark = B
-</pre>
-Note that in this unanchored example the mark is retained from the match
-attempt that started at the letter "X" in the subject. Subsequent match
-attempts starting at "P" and then with an empty string do not get as far as the
-(*MARK) item, but nevertheless do not reset it.
-</P>
-<P>
-If you are interested in (*MARK) values after failed matches, you should
-probably set the PCRE_NO_START_OPTIMIZE option
-<a href="#nooptimize">(see above)</a>
-to ensure that the match is always attempted.
-</P>
-<br><b>
-Verbs that act after backtracking
-</b><br>
-<P>
-The following verbs do nothing when they are encountered. Matching continues
-with what follows, but if there is no subsequent match, causing a backtrack to
-the verb, a failure is forced. That is, backtracking cannot pass to the left of
-the verb. However, when one of these verbs appears inside an atomic group or an
-assertion that is true, its effect is confined to that group, because once the
-group has been matched, there is never any backtracking into it. In this
-situation, backtracking can "jump back" to the left of the entire atomic group
-or assertion. (Remember also, as stated above, that this localization also
-applies in subroutine calls.)
-</P>
-<P>
-These verbs differ in exactly what kind of failure occurs when backtracking
-reaches them. The behaviour described below is what happens when the verb is
-not in a subroutine or an assertion. Subsequent sections cover these special
-cases.
-<pre>
- (*COMMIT)
-</pre>
-This verb, which may not be followed by a name, causes the whole match to fail
-outright if there is a later matching failure that causes backtracking to reach
-it. Even if the pattern is unanchored, no further attempts to find a match by
-advancing the starting point take place. If (*COMMIT) is the only backtracking
-verb that is encountered, once it has been passed <b>pcre_exec()</b> is
-committed to finding a match at the current starting point, or not at all. For
-example:
-<pre>
- a+(*COMMIT)b
-</pre>
-This matches "xxaab" but not "aacaab". It can be thought of as a kind of
-dynamic anchor, or "I've started, so I must finish." The name of the most
-recently passed (*MARK) in the path is passed back when (*COMMIT) forces a
-match failure.
-</P>
-<P>
-If there is more than one backtracking verb in a pattern, a different one that
-follows (*COMMIT) may be triggered first, so merely passing (*COMMIT) during a
-match does not always guarantee that a match must be at this starting point.
-</P>
-<P>
-Note that (*COMMIT) at the start of a pattern is not the same as an anchor,
-unless PCRE's start-of-match optimizations are turned off, as shown in this
-output from <b>pcretest</b>:
-<pre>
- re&#62; /(*COMMIT)abc/
- data&#62; xyzabc
- 0: abc
- data&#62; xyzabc\Y
- No match
-</pre>
-For this pattern, PCRE knows that any match must start with "a", so the
-optimization skips along the subject to "a" before applying the pattern to the
-first set of data. The match attempt then succeeds. In the second set of data,
-the escape sequence \Y is interpreted by the <b>pcretest</b> program. It causes
-the PCRE_NO_START_OPTIMIZE option to be set when <b>pcre_exec()</b> is called.
-This disables the optimization that skips along to the first character. The
-pattern is now applied starting at "x", and so the (*COMMIT) causes the match
-to fail without trying any other starting points.
-<pre>
- (*PRUNE) or (*PRUNE:NAME)
-</pre>
-This verb causes the match to fail at the current starting position in the
-subject if there is a later matching failure that causes backtracking to reach
-it. If the pattern is unanchored, the normal "bumpalong" advance to the next
-starting character then happens. Backtracking can occur as usual to the left of
-(*PRUNE), before it is reached, or when matching to the right of (*PRUNE), but
-if there is no match to the right, backtracking cannot cross (*PRUNE). In
-simple cases, the use of (*PRUNE) is just an alternative to an atomic group or
-possessive quantifier, but there are some uses of (*PRUNE) that cannot be
-expressed in any other way. In an anchored pattern (*PRUNE) has the same effect
-as (*COMMIT).
-</P>
-<P>
-The behaviour of (*PRUNE:NAME) is the not the same as (*MARK:NAME)(*PRUNE).
-It is like (*MARK:NAME) in that the name is remembered for passing back to the
-caller. However, (*SKIP:NAME) searches only for names set with (*MARK).
-<pre>
- (*SKIP)
-</pre>
-This verb, when given without a name, is like (*PRUNE), except that if the
-pattern is unanchored, the "bumpalong" advance is not to the next character,
-but to the position in the subject where (*SKIP) was encountered. (*SKIP)
-signifies that whatever text was matched leading up to it cannot be part of a
-successful match. Consider:
-<pre>
- a+(*SKIP)b
-</pre>
-If the subject is "aaaac...", after the first match attempt fails (starting at
-the first character in the string), the starting point skips on to start the
-next attempt at "c". Note that a possessive quantifer does not have the same
-effect as this example; although it would suppress backtracking during the
-first match attempt, the second attempt would start at the second character
-instead of skipping on to "c".
-<pre>
- (*SKIP:NAME)
-</pre>
-When (*SKIP) has an associated name, its behaviour is modified. When it is
-triggered, the previous path through the pattern is searched for the most
-recent (*MARK) that has the same name. If one is found, the "bumpalong" advance
-is to the subject position that corresponds to that (*MARK) instead of to where
-(*SKIP) was encountered. If no (*MARK) with a matching name is found, the
-(*SKIP) is ignored.
-</P>
-<P>
-Note that (*SKIP:NAME) searches only for names set by (*MARK:NAME). It ignores
-names that are set by (*PRUNE:NAME) or (*THEN:NAME).
-<pre>
- (*THEN) or (*THEN:NAME)
-</pre>
-This verb causes a skip to the next innermost alternative when backtracking
-reaches it. That is, it cancels any further backtracking within the current
-alternative. Its name comes from the observation that it can be used for a
-pattern-based if-then-else block:
-<pre>
- ( COND1 (*THEN) FOO | COND2 (*THEN) BAR | COND3 (*THEN) BAZ ) ...
-</pre>
-If the COND1 pattern matches, FOO is tried (and possibly further items after
-the end of the group if FOO succeeds); on failure, the matcher skips to the
-second alternative and tries COND2, without backtracking into COND1. If that
-succeeds and BAR fails, COND3 is tried. If subsequently BAZ fails, there are no
-more alternatives, so there is a backtrack to whatever came before the entire
-group. If (*THEN) is not inside an alternation, it acts like (*PRUNE).
-</P>
-<P>
-The behaviour of (*THEN:NAME) is the not the same as (*MARK:NAME)(*THEN).
-It is like (*MARK:NAME) in that the name is remembered for passing back to the
-caller. However, (*SKIP:NAME) searches only for names set with (*MARK).
-</P>
-<P>
-A subpattern that does not contain a | character is just a part of the
-enclosing alternative; it is not a nested alternation with only one
-alternative. The effect of (*THEN) extends beyond such a subpattern to the
-enclosing alternative. Consider this pattern, where A, B, etc. are complex
-pattern fragments that do not contain any | characters at this level:
-<pre>
- A (B(*THEN)C) | D
-</pre>
-If A and B are matched, but there is a failure in C, matching does not
-backtrack into A; instead it moves to the next alternative, that is, D.
-However, if the subpattern containing (*THEN) is given an alternative, it
-behaves differently:
-<pre>
- A (B(*THEN)C | (*FAIL)) | D
-</pre>
-The effect of (*THEN) is now confined to the inner subpattern. After a failure
-in C, matching moves to (*FAIL), which causes the whole subpattern to fail
-because there are no more alternatives to try. In this case, matching does now
-backtrack into A.
-</P>
-<P>
-Note that a conditional subpattern is not considered as having two
-alternatives, because only one is ever used. In other words, the | character in
-a conditional subpattern has a different meaning. Ignoring white space,
-consider:
-<pre>
- ^.*? (?(?=a) a | b(*THEN)c )
-</pre>
-If the subject is "ba", this pattern does not match. Because .*? is ungreedy,
-it initially matches zero characters. The condition (?=a) then fails, the
-character "b" is matched, but "c" is not. At this point, matching does not
-backtrack to .*? as might perhaps be expected from the presence of the |
-character. The conditional subpattern is part of the single alternative that
-comprises the whole pattern, and so the match fails. (If there was a backtrack
-into .*?, allowing it to match "b", the match would succeed.)
-</P>
-<P>
-The verbs just described provide four different "strengths" of control when
-subsequent matching fails. (*THEN) is the weakest, carrying on the match at the
-next alternative. (*PRUNE) comes next, failing the match at the current
-starting position, but allowing an advance to the next character (for an
-unanchored pattern). (*SKIP) is similar, except that the advance may be more
-than one character. (*COMMIT) is the strongest, causing the entire match to
-fail.
-</P>
-<br><b>
-More than one backtracking verb
-</b><br>
-<P>
-If more than one backtracking verb is present in a pattern, the one that is
-backtracked onto first acts. For example, consider this pattern, where A, B,
-etc. are complex pattern fragments:
-<pre>
- (A(*COMMIT)B(*THEN)C|ABD)
-</pre>
-If A matches but B fails, the backtrack to (*COMMIT) causes the entire match to
-fail. However, if A and B match, but C fails, the backtrack to (*THEN) causes
-the next alternative (ABD) to be tried. This behaviour is consistent, but is
-not always the same as Perl's. It means that if two or more backtracking verbs
-appear in succession, all the the last of them has no effect. Consider this
-example:
-<pre>
- ...(*COMMIT)(*PRUNE)...
-</pre>
-If there is a matching failure to the right, backtracking onto (*PRUNE) causes
-it to be triggered, and its action is taken. There can never be a backtrack
-onto (*COMMIT).
-<a name="btrepeat"></a></P>
-<br><b>
-Backtracking verbs in repeated groups
-</b><br>
-<P>
-PCRE differs from Perl in its handling of backtracking verbs in repeated
-groups. For example, consider:
-<pre>
- /(a(*COMMIT)b)+ac/
-</pre>
-If the subject is "abac", Perl matches, but PCRE fails because the (*COMMIT) in
-the second repeat of the group acts.
-<a name="btassert"></a></P>
-<br><b>
-Backtracking verbs in assertions
-</b><br>
-<P>
-(*FAIL) in an assertion has its normal effect: it forces an immediate backtrack.
-</P>
-<P>
-(*ACCEPT) in a positive assertion causes the assertion to succeed without any
-further processing. In a negative assertion, (*ACCEPT) causes the assertion to
-fail without any further processing.
-</P>
-<P>
-The other backtracking verbs are not treated specially if they appear in a
-positive assertion. In particular, (*THEN) skips to the next alternative in the
-innermost enclosing group that has alternations, whether or not this is within
-the assertion.
-</P>
-<P>
-Negative assertions are, however, different, in order to ensure that changing a
-positive assertion into a negative assertion changes its result. Backtracking
-into (*COMMIT), (*SKIP), or (*PRUNE) causes a negative assertion to be true,
-without considering any further alternative branches in the assertion.
-Backtracking into (*THEN) causes it to skip to the next enclosing alternative
-within the assertion (the normal behaviour), but if the assertion does not have
-such an alternative, (*THEN) behaves like (*PRUNE).
-<a name="btsub"></a></P>
-<br><b>
-Backtracking verbs in subroutines
-</b><br>
-<P>
-These behaviours occur whether or not the subpattern is called recursively.
-Perl's treatment of subroutines is different in some cases.
-</P>
-<P>
-(*FAIL) in a subpattern called as a subroutine has its normal effect: it forces
-an immediate backtrack.
-</P>
-<P>
-(*ACCEPT) in a subpattern called as a subroutine causes the subroutine match to
-succeed without any further processing. Matching then continues after the
-subroutine call.
-</P>
-<P>
-(*COMMIT), (*SKIP), and (*PRUNE) in a subpattern called as a subroutine cause
-the subroutine match to fail.
-</P>
-<P>
-(*THEN) skips to the next alternative in the innermost enclosing group within
-the subpattern that has alternatives. If there is no such group within the
-subpattern, (*THEN) causes the subroutine match to fail.
-</P>
-<br><a name="SEC28" href="#TOC1">SEE ALSO</a><br>
-<P>
-<b>pcreapi</b>(3), <b>pcrecallout</b>(3), <b>pcrematching</b>(3),
-<b>pcresyntax</b>(3), <b>pcre</b>(3), <b>pcre16(3)</b>, <b>pcre32(3)</b>.
-</P>
-<br><a name="SEC29" href="#TOC1">AUTHOR</a><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><a name="SEC30" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 23 October 2016
-<br>
-Copyright &copy; 1997-2016 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcreperform.html b/libs/Pcre16/docs/doc/html/pcreperform.html
deleted file mode 100644
index dda207f901..0000000000
--- a/libs/Pcre16/docs/doc/html/pcreperform.html
+++ /dev/null
@@ -1,195 +0,0 @@
-<html>
-<head>
-<title>pcreperform specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcreperform man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-PCRE PERFORMANCE
-</b><br>
-<P>
-Two aspects of performance are discussed below: memory usage and processing
-time. The way you express your pattern as a regular expression can affect both
-of them.
-</P>
-<br><b>
-COMPILED PATTERN MEMORY USAGE
-</b><br>
-<P>
-Patterns are compiled by PCRE into a reasonably efficient interpretive code, so
-that most simple patterns do not use much memory. However, there is one case
-where the memory usage of a compiled pattern can be unexpectedly large. If a
-parenthesized subpattern has a quantifier with a minimum greater than 1 and/or
-a limited maximum, the whole subpattern is repeated in the compiled code. For
-example, the pattern
-<pre>
- (abc|def){2,4}
-</pre>
-is compiled as if it were
-<pre>
- (abc|def)(abc|def)((abc|def)(abc|def)?)?
-</pre>
-(Technical aside: It is done this way so that backtrack points within each of
-the repetitions can be independently maintained.)
-</P>
-<P>
-For regular expressions whose quantifiers use only small numbers, this is not
-usually a problem. However, if the numbers are large, and particularly if such
-repetitions are nested, the memory usage can become an embarrassment. For
-example, the very simple pattern
-<pre>
- ((ab){1,1000}c){1,3}
-</pre>
-uses 51K bytes when compiled using the 8-bit library. When PCRE is compiled
-with its default internal pointer size of two bytes, the size limit on a
-compiled pattern is 64K data units, and this is reached with the above pattern
-if the outer repetition is increased from 3 to 4. PCRE can be compiled to use
-larger internal pointers and thus handle larger compiled patterns, but it is
-better to try to rewrite your pattern to use less memory if you can.
-</P>
-<P>
-One way of reducing the memory usage for such patterns is to make use of PCRE's
-<a href="pcrepattern.html#subpatternsassubroutines">"subroutine"</a>
-facility. Re-writing the above pattern as
-<pre>
- ((ab)(?2){0,999}c)(?1){0,2}
-</pre>
-reduces the memory requirements to 18K, and indeed it remains under 20K even
-with the outer repetition increased to 100. However, this pattern is not
-exactly equivalent, because the "subroutine" calls are treated as
-<a href="pcrepattern.html#atomicgroup">atomic groups</a>
-into which there can be no backtracking if there is a subsequent matching
-failure. Therefore, PCRE cannot do this kind of rewriting automatically.
-Furthermore, there is a noticeable loss of speed when executing the modified
-pattern. Nevertheless, if the atomic grouping is not a problem and the loss of
-speed is acceptable, this kind of rewriting will allow you to process patterns
-that PCRE cannot otherwise handle.
-</P>
-<br><b>
-STACK USAGE AT RUN TIME
-</b><br>
-<P>
-When <b>pcre_exec()</b> or <b>pcre[16|32]_exec()</b> is used for matching, certain
-kinds of pattern can cause it to use large amounts of the process stack. In
-some environments the default process stack is quite small, and if it runs out
-the result is often SIGSEGV. This issue is probably the most frequently raised
-problem with PCRE. Rewriting your pattern can often help. The
-<a href="pcrestack.html"><b>pcrestack</b></a>
-documentation discusses this issue in detail.
-</P>
-<br><b>
-PROCESSING TIME
-</b><br>
-<P>
-Certain items in regular expression patterns are processed more efficiently
-than others. It is more efficient to use a character class like [aeiou] than a
-set of single-character alternatives such as (a|e|i|o|u). In general, the
-simplest construction that provides the required behaviour is usually the most
-efficient. Jeffrey Friedl's book contains a lot of useful general discussion
-about optimizing regular expressions for efficient performance. This document
-contains a few observations about PCRE.
-</P>
-<P>
-Using Unicode character properties (the \p, \P, and \X escapes) is slow,
-because PCRE has to use a multi-stage table lookup whenever it needs a
-character's property. If you can find an alternative pattern that does not use
-character properties, it will probably be faster.
-</P>
-<P>
-By default, the escape sequences \b, \d, \s, and \w, and the POSIX
-character classes such as [:alpha:] do not use Unicode properties, partly for
-backwards compatibility, and partly for performance reasons. However, you can
-set PCRE_UCP if you want Unicode character properties to be used. This can
-double the matching time for items such as \d, when matched with
-a traditional matching function; the performance loss is less with
-a DFA matching function, and in both cases there is not much difference for
-\b.
-</P>
-<P>
-When a pattern begins with .* not in parentheses, or in parentheses that are
-not the subject of a backreference, and the PCRE_DOTALL option is set, the
-pattern is implicitly anchored by PCRE, since it can match only at the start of
-a subject string. However, if PCRE_DOTALL is not set, PCRE cannot make this
-optimization, because the . metacharacter does not then match a newline, and if
-the subject string contains newlines, the pattern may match from the character
-immediately following one of them instead of from the very start. For example,
-the pattern
-<pre>
- .*second
-</pre>
-matches the subject "first\nand second" (where \n stands for a newline
-character), with the match starting at the seventh character. In order to do
-this, PCRE has to retry the match starting after every newline in the subject.
-</P>
-<P>
-If you are using such a pattern with subject strings that do not contain
-newlines, the best performance is obtained by setting PCRE_DOTALL, or starting
-the pattern with ^.* or ^.*? to indicate explicit anchoring. That saves PCRE
-from having to scan along the subject looking for a newline to restart at.
-</P>
-<P>
-Beware of patterns that contain nested indefinite repeats. These can take a
-long time to run when applied to a string that does not match. Consider the
-pattern fragment
-<pre>
- ^(a+)*
-</pre>
-This can match "aaaa" in 16 different ways, and this number increases very
-rapidly as the string gets longer. (The * repeat can match 0, 1, 2, 3, or 4
-times, and for each of those cases other than 0 or 4, the + repeats can match
-different numbers of times.) When the remainder of the pattern is such that the
-entire match is going to fail, PCRE has in principle to try every possible
-variation, and this can take an extremely long time, even for relatively short
-strings.
-</P>
-<P>
-An optimization catches some of the more simple cases such as
-<pre>
- (a+)*b
-</pre>
-where a literal character follows. Before embarking on the standard matching
-procedure, PCRE checks that there is a "b" later in the subject string, and if
-there is not, it fails the match immediately. However, when there is no
-following literal this optimization cannot be used. You can see the difference
-by comparing the behaviour of
-<pre>
- (a+)*\d
-</pre>
-with the pattern above. The former gives a failure almost instantly when
-applied to a whole line of "a" characters, whereas the latter takes an
-appreciable time with strings longer than about 20 characters.
-</P>
-<P>
-In many cases, the solution to this kind of performance issue is to use an
-atomic group or a possessive quantifier.
-</P>
-<br><b>
-AUTHOR
-</b><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><b>
-REVISION
-</b><br>
-<P>
-Last updated: 25 August 2012
-<br>
-Copyright &copy; 1997-2012 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcreposix.html b/libs/Pcre16/docs/doc/html/pcreposix.html
deleted file mode 100644
index 18924cf7f9..0000000000
--- a/libs/Pcre16/docs/doc/html/pcreposix.html
+++ /dev/null
@@ -1,290 +0,0 @@
-<html>
-<head>
-<title>pcreposix specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcreposix man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">SYNOPSIS</a>
-<li><a name="TOC2" href="#SEC2">DESCRIPTION</a>
-<li><a name="TOC3" href="#SEC3">COMPILING A PATTERN</a>
-<li><a name="TOC4" href="#SEC4">MATCHING NEWLINE CHARACTERS</a>
-<li><a name="TOC5" href="#SEC5">MATCHING A PATTERN</a>
-<li><a name="TOC6" href="#SEC6">ERROR MESSAGES</a>
-<li><a name="TOC7" href="#SEC7">MEMORY USAGE</a>
-<li><a name="TOC8" href="#SEC8">AUTHOR</a>
-<li><a name="TOC9" href="#SEC9">REVISION</a>
-</ul>
-<br><a name="SEC1" href="#TOC1">SYNOPSIS</a><br>
-<P>
-<b>#include &#60;pcreposix.h&#62;</b>
-</P>
-<P>
-<b>int regcomp(regex_t *<i>preg</i>, const char *<i>pattern</i>,</b>
-<b> int <i>cflags</i>);</b>
-<br>
-<br>
-<b>int regexec(regex_t *<i>preg</i>, const char *<i>string</i>,</b>
-<b> size_t <i>nmatch</i>, regmatch_t <i>pmatch</i>[], int <i>eflags</i>);</b>
-<b> size_t regerror(int <i>errcode</i>, const regex_t *<i>preg</i>,</b>
-<b> char *<i>errbuf</i>, size_t <i>errbuf_size</i>);</b>
-<br>
-<br>
-<b>void regfree(regex_t *<i>preg</i>);</b>
-</P>
-<br><a name="SEC2" href="#TOC1">DESCRIPTION</a><br>
-<P>
-This set of functions provides a POSIX-style API for the PCRE regular
-expression 8-bit library. See the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-documentation for a description of PCRE's native API, which contains much
-additional functionality. There is no POSIX-style wrapper for PCRE's 16-bit
-and 32-bit library.
-</P>
-<P>
-The functions described here are just wrapper functions that ultimately call
-the PCRE native API. Their prototypes are defined in the <b>pcreposix.h</b>
-header file, and on Unix systems the library itself is called
-<b>pcreposix.a</b>, so can be accessed by adding <b>-lpcreposix</b> to the
-command for linking an application that uses them. Because the POSIX functions
-call the native ones, it is also necessary to add <b>-lpcre</b>.
-</P>
-<P>
-I have implemented only those POSIX option bits that can be reasonably mapped
-to PCRE native options. In addition, the option REG_EXTENDED is defined with
-the value zero. This has no effect, but since programs that are written to the
-POSIX interface often use it, this makes it easier to slot in PCRE as a
-replacement library. Other POSIX options are not even defined.
-</P>
-<P>
-There are also some other options that are not defined by POSIX. These have
-been added at the request of users who want to make use of certain
-PCRE-specific features via the POSIX calling interface.
-</P>
-<P>
-When PCRE is called via these functions, it is only the API that is POSIX-like
-in style. The syntax and semantics of the regular expressions themselves are
-still those of Perl, subject to the setting of various PCRE options, as
-described below. "POSIX-like in style" means that the API approximates to the
-POSIX definition; it is not fully POSIX-compatible, and in multi-byte encoding
-domains it is probably even less compatible.
-</P>
-<P>
-The header for these functions is supplied as <b>pcreposix.h</b> to avoid any
-potential clash with other POSIX libraries. It can, of course, be renamed or
-aliased as <b>regex.h</b>, which is the "correct" name. It provides two
-structure types, <i>regex_t</i> for compiled internal forms, and
-<i>regmatch_t</i> for returning captured substrings. It also defines some
-constants whose names start with "REG_"; these are used for setting options and
-identifying error codes.
-</P>
-<br><a name="SEC3" href="#TOC1">COMPILING A PATTERN</a><br>
-<P>
-The function <b>regcomp()</b> is called to compile a pattern into an
-internal form. The pattern is a C string terminated by a binary zero, and
-is passed in the argument <i>pattern</i>. The <i>preg</i> argument is a pointer
-to a <b>regex_t</b> structure that is used as a base for storing information
-about the compiled regular expression.
-</P>
-<P>
-The argument <i>cflags</i> is either zero, or contains one or more of the bits
-defined by the following macros:
-<pre>
- REG_DOTALL
-</pre>
-The PCRE_DOTALL option is set when the regular expression is passed for
-compilation to the native function. Note that REG_DOTALL is not part of the
-POSIX standard.
-<pre>
- REG_ICASE
-</pre>
-The PCRE_CASELESS option is set when the regular expression is passed for
-compilation to the native function.
-<pre>
- REG_NEWLINE
-</pre>
-The PCRE_MULTILINE option is set when the regular expression is passed for
-compilation to the native function. Note that this does <i>not</i> mimic the
-defined POSIX behaviour for REG_NEWLINE (see the following section).
-<pre>
- REG_NOSUB
-</pre>
-The PCRE_NO_AUTO_CAPTURE option is set when the regular expression is passed
-for compilation to the native function. In addition, when a pattern that is
-compiled with this flag is passed to <b>regexec()</b> for matching, the
-<i>nmatch</i> and <i>pmatch</i> arguments are ignored, and no captured strings
-are returned.
-<pre>
- REG_UCP
-</pre>
-The PCRE_UCP option is set when the regular expression is passed for
-compilation to the native function. This causes PCRE to use Unicode properties
-when matchine \d, \w, etc., instead of just recognizing ASCII values. Note
-that REG_UTF8 is not part of the POSIX standard.
-<pre>
- REG_UNGREEDY
-</pre>
-The PCRE_UNGREEDY option is set when the regular expression is passed for
-compilation to the native function. Note that REG_UNGREEDY is not part of the
-POSIX standard.
-<pre>
- REG_UTF8
-</pre>
-The PCRE_UTF8 option is set when the regular expression is passed for
-compilation to the native function. This causes the pattern itself and all data
-strings used for matching it to be treated as UTF-8 strings. Note that REG_UTF8
-is not part of the POSIX standard.
-</P>
-<P>
-In the absence of these flags, no options are passed to the native function.
-This means the the regex is compiled with PCRE default semantics. In
-particular, the way it handles newline characters in the subject string is the
-Perl way, not the POSIX way. Note that setting PCRE_MULTILINE has only
-<i>some</i> of the effects specified for REG_NEWLINE. It does not affect the way
-newlines are matched by . (they are not) or by a negative class such as [^a]
-(they are).
-</P>
-<P>
-The yield of <b>regcomp()</b> is zero on success, and non-zero otherwise. The
-<i>preg</i> structure is filled in on success, and one member of the structure
-is public: <i>re_nsub</i> contains the number of capturing subpatterns in
-the regular expression. Various error codes are defined in the header file.
-</P>
-<P>
-NOTE: If the yield of <b>regcomp()</b> is non-zero, you must not attempt to
-use the contents of the <i>preg</i> structure. If, for example, you pass it to
-<b>regexec()</b>, the result is undefined and your program is likely to crash.
-</P>
-<br><a name="SEC4" href="#TOC1">MATCHING NEWLINE CHARACTERS</a><br>
-<P>
-This area is not simple, because POSIX and Perl take different views of things.
-It is not possible to get PCRE to obey POSIX semantics, but then PCRE was never
-intended to be a POSIX engine. The following table lists the different
-possibilities for matching newline characters in PCRE:
-<pre>
- Default Change with
-
- . matches newline no PCRE_DOTALL
- newline matches [^a] yes not changeable
- $ matches \n at end yes PCRE_DOLLARENDONLY
- $ matches \n in middle no PCRE_MULTILINE
- ^ matches \n in middle no PCRE_MULTILINE
-</pre>
-This is the equivalent table for POSIX:
-<pre>
- Default Change with
-
- . matches newline yes REG_NEWLINE
- newline matches [^a] yes REG_NEWLINE
- $ matches \n at end no REG_NEWLINE
- $ matches \n in middle no REG_NEWLINE
- ^ matches \n in middle no REG_NEWLINE
-</pre>
-PCRE's behaviour is the same as Perl's, except that there is no equivalent for
-PCRE_DOLLAR_ENDONLY in Perl. In both PCRE and Perl, there is no way to stop
-newline from matching [^a].
-</P>
-<P>
-The default POSIX newline handling can be obtained by setting PCRE_DOTALL and
-PCRE_DOLLAR_ENDONLY, but there is no way to make PCRE behave exactly as for the
-REG_NEWLINE action.
-</P>
-<br><a name="SEC5" href="#TOC1">MATCHING A PATTERN</a><br>
-<P>
-The function <b>regexec()</b> is called to match a compiled pattern <i>preg</i>
-against a given <i>string</i>, which is by default terminated by a zero byte
-(but see REG_STARTEND below), subject to the options in <i>eflags</i>. These can
-be:
-<pre>
- REG_NOTBOL
-</pre>
-The PCRE_NOTBOL option is set when calling the underlying PCRE matching
-function.
-<pre>
- REG_NOTEMPTY
-</pre>
-The PCRE_NOTEMPTY option is set when calling the underlying PCRE matching
-function. Note that REG_NOTEMPTY is not part of the POSIX standard. However,
-setting this option can give more POSIX-like behaviour in some situations.
-<pre>
- REG_NOTEOL
-</pre>
-The PCRE_NOTEOL option is set when calling the underlying PCRE matching
-function.
-<pre>
- REG_STARTEND
-</pre>
-The string is considered to start at <i>string</i> + <i>pmatch[0].rm_so</i> and
-to have a terminating NUL located at <i>string</i> + <i>pmatch[0].rm_eo</i>
-(there need not actually be a NUL at that location), regardless of the value of
-<i>nmatch</i>. This is a BSD extension, compatible with but not specified by
-IEEE Standard 1003.2 (POSIX.2), and should be used with caution in software
-intended to be portable to other systems. Note that a non-zero <i>rm_so</i> does
-not imply REG_NOTBOL; REG_STARTEND affects only the location of the string, not
-how it is matched.
-</P>
-<P>
-If the pattern was compiled with the REG_NOSUB flag, no data about any matched
-strings is returned. The <i>nmatch</i> and <i>pmatch</i> arguments of
-<b>regexec()</b> are ignored.
-</P>
-<P>
-If the value of <i>nmatch</i> is zero, or if the value <i>pmatch</i> is NULL,
-no data about any matched strings is returned.
-</P>
-<P>
-Otherwise,the portion of the string that was matched, and also any captured
-substrings, are returned via the <i>pmatch</i> argument, which points to an
-array of <i>nmatch</i> structures of type <i>regmatch_t</i>, containing the
-members <i>rm_so</i> and <i>rm_eo</i>. These contain the offset to the first
-character of each substring and the offset to the first character after the end
-of each substring, respectively. The 0th element of the vector relates to the
-entire portion of <i>string</i> that was matched; subsequent elements relate to
-the capturing subpatterns of the regular expression. Unused entries in the
-array have both structure members set to -1.
-</P>
-<P>
-A successful match yields a zero return; various error codes are defined in the
-header file, of which REG_NOMATCH is the "expected" failure code.
-</P>
-<br><a name="SEC6" href="#TOC1">ERROR MESSAGES</a><br>
-<P>
-The <b>regerror()</b> function maps a non-zero errorcode from either
-<b>regcomp()</b> or <b>regexec()</b> to a printable message. If <i>preg</i> is not
-NULL, the error should have arisen from the use of that structure. A message
-terminated by a binary zero is placed in <i>errbuf</i>. The length of the
-message, including the zero, is limited to <i>errbuf_size</i>. The yield of the
-function is the size of buffer needed to hold the whole message.
-</P>
-<br><a name="SEC7" href="#TOC1">MEMORY USAGE</a><br>
-<P>
-Compiling a regular expression causes memory to be allocated and associated
-with the <i>preg</i> structure. The function <b>regfree()</b> frees all such
-memory, after which <i>preg</i> may no longer be used as a compiled expression.
-</P>
-<br><a name="SEC8" href="#TOC1">AUTHOR</a><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><a name="SEC9" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 09 January 2012
-<br>
-Copyright &copy; 1997-2012 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcreprecompile.html b/libs/Pcre16/docs/doc/html/pcreprecompile.html
deleted file mode 100644
index decb1d6ce0..0000000000
--- a/libs/Pcre16/docs/doc/html/pcreprecompile.html
+++ /dev/null
@@ -1,163 +0,0 @@
-<html>
-<head>
-<title>pcreprecompile specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcreprecompile man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">SAVING AND RE-USING PRECOMPILED PCRE PATTERNS</a>
-<li><a name="TOC2" href="#SEC2">SAVING A COMPILED PATTERN</a>
-<li><a name="TOC3" href="#SEC3">RE-USING A PRECOMPILED PATTERN</a>
-<li><a name="TOC4" href="#SEC4">COMPATIBILITY WITH DIFFERENT PCRE RELEASES</a>
-<li><a name="TOC5" href="#SEC5">AUTHOR</a>
-<li><a name="TOC6" href="#SEC6">REVISION</a>
-</ul>
-<br><a name="SEC1" href="#TOC1">SAVING AND RE-USING PRECOMPILED PCRE PATTERNS</a><br>
-<P>
-If you are running an application that uses a large number of regular
-expression patterns, it may be useful to store them in a precompiled form
-instead of having to compile them every time the application is run.
-If you are not using any private character tables (see the
-<a href="pcre_maketables.html"><b>pcre_maketables()</b></a>
-documentation), this is relatively straightforward. If you are using private
-tables, it is a little bit more complicated. However, if you are using the
-just-in-time optimization feature, it is not possible to save and reload the
-JIT data.
-</P>
-<P>
-If you save compiled patterns to a file, you can copy them to a different host
-and run them there. If the two hosts have different endianness (byte order),
-you should run the <b>pcre[16|32]_pattern_to_host_byte_order()</b> function on the
-new host before trying to match the pattern. The matching functions return
-PCRE_ERROR_BADENDIANNESS if they detect a pattern with the wrong endianness.
-</P>
-<P>
-Compiling regular expressions with one version of PCRE for use with a different
-version is not guaranteed to work and may cause crashes, and saving and
-restoring a compiled pattern loses any JIT optimization data.
-</P>
-<br><a name="SEC2" href="#TOC1">SAVING A COMPILED PATTERN</a><br>
-<P>
-The value returned by <b>pcre[16|32]_compile()</b> points to a single block of
-memory that holds the compiled pattern and associated data. You can find the
-length of this block in bytes by calling <b>pcre[16|32]_fullinfo()</b> with an
-argument of PCRE_INFO_SIZE. You can then save the data in any appropriate
-manner. Here is sample code for the 8-bit library that compiles a pattern and
-writes it to a file. It assumes that the variable <i>fd</i> refers to a file
-that is open for output:
-<pre>
- int erroroffset, rc, size;
- char *error;
- pcre *re;
-
- re = pcre_compile("my pattern", 0, &error, &erroroffset, NULL);
- if (re == NULL) { ... handle errors ... }
- rc = pcre_fullinfo(re, NULL, PCRE_INFO_SIZE, &size);
- if (rc &#60; 0) { ... handle errors ... }
- rc = fwrite(re, 1, size, fd);
- if (rc != size) { ... handle errors ... }
-</pre>
-In this example, the bytes that comprise the compiled pattern are copied
-exactly. Note that this is binary data that may contain any of the 256 possible
-byte values. On systems that make a distinction between binary and non-binary
-data, be sure that the file is opened for binary output.
-</P>
-<P>
-If you want to write more than one pattern to a file, you will have to devise a
-way of separating them. For binary data, preceding each pattern with its length
-is probably the most straightforward approach. Another possibility is to write
-out the data in hexadecimal instead of binary, one pattern to a line.
-</P>
-<P>
-Saving compiled patterns in a file is only one possible way of storing them for
-later use. They could equally well be saved in a database, or in the memory of
-some daemon process that passes them via sockets to the processes that want
-them.
-</P>
-<P>
-If the pattern has been studied, it is also possible to save the normal study
-data in a similar way to the compiled pattern itself. However, if the
-PCRE_STUDY_JIT_COMPILE was used, the just-in-time data that is created cannot
-be saved because it is too dependent on the current environment. When studying
-generates additional information, <b>pcre[16|32]_study()</b> returns a pointer to a
-<b>pcre[16|32]_extra</b> data block. Its format is defined in the
-<a href="pcreapi.html#extradata">section on matching a pattern</a>
-in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-documentation. The <i>study_data</i> field points to the binary study data, and
-this is what you must save (not the <b>pcre[16|32]_extra</b> block itself). The
-length of the study data can be obtained by calling <b>pcre[16|32]_fullinfo()</b>
-with an argument of PCRE_INFO_STUDYSIZE. Remember to check that
-<b>pcre[16|32]_study()</b> did return a non-NULL value before trying to save the
-study data.
-</P>
-<br><a name="SEC3" href="#TOC1">RE-USING A PRECOMPILED PATTERN</a><br>
-<P>
-Re-using a precompiled pattern is straightforward. Having reloaded it into main
-memory, called <b>pcre[16|32]_pattern_to_host_byte_order()</b> if necessary, you
-pass its pointer to <b>pcre[16|32]_exec()</b> or <b>pcre[16|32]_dfa_exec()</b> in
-the usual way.
-</P>
-<P>
-However, if you passed a pointer to custom character tables when the pattern
-was compiled (the <i>tableptr</i> argument of <b>pcre[16|32]_compile()</b>), you
-must now pass a similar pointer to <b>pcre[16|32]_exec()</b> or
-<b>pcre[16|32]_dfa_exec()</b>, because the value saved with the compiled pattern
-will obviously be nonsense. A field in a <b>pcre[16|32]_extra()</b> block is used
-to pass this data, as described in the
-<a href="pcreapi.html#extradata">section on matching a pattern</a>
-in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-documentation.
-</P>
-<P>
-<b>Warning:</b> The tables that <b>pcre_exec()</b> and <b>pcre_dfa_exec()</b> use
-must be the same as those that were used when the pattern was compiled. If this
-is not the case, the behaviour is undefined.
-</P>
-<P>
-If you did not provide custom character tables when the pattern was compiled,
-the pointer in the compiled pattern is NULL, which causes the matching
-functions to use PCRE's internal tables. Thus, you do not need to take any
-special action at run time in this case.
-</P>
-<P>
-If you saved study data with the compiled pattern, you need to create your own
-<b>pcre[16|32]_extra</b> data block and set the <i>study_data</i> field to point
-to the reloaded study data. You must also set the PCRE_EXTRA_STUDY_DATA bit in
-the <i>flags</i> field to indicate that study data is present. Then pass the
-<b>pcre[16|32]_extra</b> block to the matching function in the usual way. If the
-pattern was studied for just-in-time optimization, that data cannot be saved,
-and so is lost by a save/restore cycle.
-</P>
-<br><a name="SEC4" href="#TOC1">COMPATIBILITY WITH DIFFERENT PCRE RELEASES</a><br>
-<P>
-In general, it is safest to recompile all saved patterns when you update to a
-new PCRE release, though not all updates actually require this.
-</P>
-<br><a name="SEC5" href="#TOC1">AUTHOR</a><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><a name="SEC6" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 12 November 2013
-<br>
-Copyright &copy; 1997-2013 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcresample.html b/libs/Pcre16/docs/doc/html/pcresample.html
deleted file mode 100644
index aca9184e00..0000000000
--- a/libs/Pcre16/docs/doc/html/pcresample.html
+++ /dev/null
@@ -1,110 +0,0 @@
-<html>
-<head>
-<title>pcresample specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcresample man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-PCRE SAMPLE PROGRAM
-</b><br>
-<P>
-A simple, complete demonstration program, to get you started with using PCRE,
-is supplied in the file <i>pcredemo.c</i> in the PCRE distribution. A listing of
-this program is given in the
-<a href="pcredemo.html"><b>pcredemo</b></a>
-documentation. If you do not have a copy of the PCRE distribution, you can save
-this listing to re-create <i>pcredemo.c</i>.
-</P>
-<P>
-The demonstration program, which uses the original PCRE 8-bit library, compiles
-the regular expression that is its first argument, and matches it against the
-subject string in its second argument. No PCRE options are set, and default
-character tables are used. If matching succeeds, the program outputs the
-portion of the subject that matched, together with the contents of any captured
-substrings.
-</P>
-<P>
-If the -g option is given on the command line, the program then goes on to
-check for further matches of the same regular expression in the same subject
-string. The logic is a little bit tricky because of the possibility of matching
-an empty string. Comments in the code explain what is going on.
-</P>
-<P>
-If PCRE is installed in the standard include and library directories for your
-operating system, you should be able to compile the demonstration program using
-this command:
-<pre>
- gcc -o pcredemo pcredemo.c -lpcre
-</pre>
-If PCRE is installed elsewhere, you may need to add additional options to the
-command line. For example, on a Unix-like system that has PCRE installed in
-<i>/usr/local</i>, you can compile the demonstration program using a command
-like this:
-<pre>
- gcc -o pcredemo -I/usr/local/include pcredemo.c -L/usr/local/lib -lpcre
-</pre>
-In a Windows environment, if you want to statically link the program against a
-non-dll <b>pcre.a</b> file, you must uncomment the line that defines PCRE_STATIC
-before including <b>pcre.h</b>, because otherwise the <b>pcre_malloc()</b> and
-<b>pcre_free()</b> exported functions will be declared
-<b>__declspec(dllimport)</b>, with unwanted results.
-</P>
-<P>
-Once you have compiled and linked the demonstration program, you can run simple
-tests like this:
-<pre>
- ./pcredemo 'cat|dog' 'the cat sat on the mat'
- ./pcredemo -g 'cat|dog' 'the dog sat on the cat'
-</pre>
-Note that there is a much more comprehensive test program, called
-<a href="pcretest.html"><b>pcretest</b>,</a>
-which supports many more facilities for testing regular expressions and both
-PCRE libraries. The
-<a href="pcredemo.html"><b>pcredemo</b></a>
-program is provided as a simple coding example.
-</P>
-<P>
-If you try to run
-<a href="pcredemo.html"><b>pcredemo</b></a>
-when PCRE is not installed in the standard library directory, you may get an
-error like this on some operating systems (e.g. Solaris):
-<pre>
- ld.so.1: a.out: fatal: libpcre.so.0: open failed: No such file or directory
-</pre>
-This is caused by the way shared library support works on those systems. You
-need to add
-<pre>
- -R/usr/local/lib
-</pre>
-(for example) to the compile command to get round this problem.
-</P>
-<br><b>
-AUTHOR
-</b><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><b>
-REVISION
-</b><br>
-<P>
-Last updated: 10 January 2012
-<br>
-Copyright &copy; 1997-2012 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcrestack.html b/libs/Pcre16/docs/doc/html/pcrestack.html
deleted file mode 100644
index af6406d070..0000000000
--- a/libs/Pcre16/docs/doc/html/pcrestack.html
+++ /dev/null
@@ -1,225 +0,0 @@
-<html>
-<head>
-<title>pcrestack specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcrestack man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-PCRE DISCUSSION OF STACK USAGE
-</b><br>
-<P>
-When you call <b>pcre[16|32]_exec()</b>, it makes use of an internal function
-called <b>match()</b>. This calls itself recursively at branch points in the
-pattern, in order to remember the state of the match so that it can back up and
-try a different alternative if the first one fails. As matching proceeds deeper
-and deeper into the tree of possibilities, the recursion depth increases. The
-<b>match()</b> function is also called in other circumstances, for example,
-whenever a parenthesized sub-pattern is entered, and in certain cases of
-repetition.
-</P>
-<P>
-Not all calls of <b>match()</b> increase the recursion depth; for an item such
-as a* it may be called several times at the same level, after matching
-different numbers of a's. Furthermore, in a number of cases where the result of
-the recursive call would immediately be passed back as the result of the
-current call (a "tail recursion"), the function is just restarted instead.
-</P>
-<P>
-The above comments apply when <b>pcre[16|32]_exec()</b> is run in its normal
-interpretive manner. If the pattern was studied with the
-PCRE_STUDY_JIT_COMPILE option, and just-in-time compiling was successful, and
-the options passed to <b>pcre[16|32]_exec()</b> were not incompatible, the matching
-process uses the JIT-compiled code instead of the <b>match()</b> function. In
-this case, the memory requirements are handled entirely differently. See the
-<a href="pcrejit.html"><b>pcrejit</b></a>
-documentation for details.
-</P>
-<P>
-The <b>pcre[16|32]_dfa_exec()</b> function operates in an entirely different way,
-and uses recursion only when there is a regular expression recursion or
-subroutine call in the pattern. This includes the processing of assertion and
-"once-only" subpatterns, which are handled like subroutine calls. Normally,
-these are never very deep, and the limit on the complexity of
-<b>pcre[16|32]_dfa_exec()</b> is controlled by the amount of workspace it is given.
-However, it is possible to write patterns with runaway infinite recursions;
-such patterns will cause <b>pcre[16|32]_dfa_exec()</b> to run out of stack. At
-present, there is no protection against this.
-</P>
-<P>
-The comments that follow do NOT apply to <b>pcre[16|32]_dfa_exec()</b>; they are
-relevant only for <b>pcre[16|32]_exec()</b> without the JIT optimization.
-</P>
-<br><b>
-Reducing <b>pcre[16|32]_exec()</b>'s stack usage
-</b><br>
-<P>
-Each time that <b>match()</b> is actually called recursively, it uses memory
-from the process stack. For certain kinds of pattern and data, very large
-amounts of stack may be needed, despite the recognition of "tail recursion".
-You can often reduce the amount of recursion, and therefore the amount of stack
-used, by modifying the pattern that is being matched. Consider, for example,
-this pattern:
-<pre>
- ([^&#60;]|&#60;(?!inet))+
-</pre>
-It matches from wherever it starts until it encounters "&#60;inet" or the end of
-the data, and is the kind of pattern that might be used when processing an XML
-file. Each iteration of the outer parentheses matches either one character that
-is not "&#60;" or a "&#60;" that is not followed by "inet". However, each time a
-parenthesis is processed, a recursion occurs, so this formulation uses a stack
-frame for each matched character. For a long string, a lot of stack is
-required. Consider now this rewritten pattern, which matches exactly the same
-strings:
-<pre>
- ([^&#60;]++|&#60;(?!inet))+
-</pre>
-This uses very much less stack, because runs of characters that do not contain
-"&#60;" are "swallowed" in one item inside the parentheses. Recursion happens only
-when a "&#60;" character that is not followed by "inet" is encountered (and we
-assume this is relatively rare). A possessive quantifier is used to stop any
-backtracking into the runs of non-"&#60;" characters, but that is not related to
-stack usage.
-</P>
-<P>
-This example shows that one way of avoiding stack problems when matching long
-subject strings is to write repeated parenthesized subpatterns to match more
-than one character whenever possible.
-</P>
-<br><b>
-Compiling PCRE to use heap instead of stack for <b>pcre[16|32]_exec()</b>
-</b><br>
-<P>
-In environments where stack memory is constrained, you might want to compile
-PCRE to use heap memory instead of stack for remembering back-up points when
-<b>pcre[16|32]_exec()</b> is running. This makes it run a lot more slowly, however.
-Details of how to do this are given in the
-<a href="pcrebuild.html"><b>pcrebuild</b></a>
-documentation. When built in this way, instead of using the stack, PCRE obtains
-and frees memory by calling the functions that are pointed to by the
-<b>pcre[16|32]_stack_malloc</b> and <b>pcre[16|32]_stack_free</b> variables. By
-default, these point to <b>malloc()</b> and <b>free()</b>, but you can replace
-the pointers to cause PCRE to use your own functions. Since the block sizes are
-always the same, and are always freed in reverse order, it may be possible to
-implement customized memory handlers that are more efficient than the standard
-functions.
-</P>
-<br><b>
-Limiting <b>pcre[16|32]_exec()</b>'s stack usage
-</b><br>
-<P>
-You can set limits on the number of times that <b>match()</b> is called, both in
-total and recursively. If a limit is exceeded, <b>pcre[16|32]_exec()</b> returns an
-error code. Setting suitable limits should prevent it from running out of
-stack. The default values of the limits are very large, and unlikely ever to
-operate. They can be changed when PCRE is built, and they can also be set when
-<b>pcre[16|32]_exec()</b> is called. For details of these interfaces, see the
-<a href="pcrebuild.html"><b>pcrebuild</b></a>
-documentation and the
-<a href="pcreapi.html#extradata">section on extra data for <b>pcre[16|32]_exec()</b></a>
-in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-documentation.
-</P>
-<P>
-As a very rough rule of thumb, you should reckon on about 500 bytes per
-recursion. Thus, if you want to limit your stack usage to 8Mb, you should set
-the limit at 16000 recursions. A 64Mb stack, on the other hand, can support
-around 128000 recursions.
-</P>
-<P>
-In Unix-like environments, the <b>pcretest</b> test program has a command line
-option (<b>-S</b>) that can be used to increase the size of its stack. As long
-as the stack is large enough, another option (<b>-M</b>) can be used to find the
-smallest limits that allow a particular pattern to match a given subject
-string. This is done by calling <b>pcre[16|32]_exec()</b> repeatedly with different
-limits.
-</P>
-<br><b>
-Obtaining an estimate of stack usage
-</b><br>
-<P>
-The actual amount of stack used per recursion can vary quite a lot, depending
-on the compiler that was used to build PCRE and the optimization or debugging
-options that were set for it. The rule of thumb value of 500 bytes mentioned
-above may be larger or smaller than what is actually needed. A better
-approximation can be obtained by running this command:
-<pre>
- pcretest -m -C
-</pre>
-The <b>-C</b> option causes <b>pcretest</b> to output information about the
-options with which PCRE was compiled. When <b>-m</b> is also given (before
-<b>-C</b>), information about stack use is given in a line like this:
-<pre>
- Match recursion uses stack: approximate frame size = 640 bytes
-</pre>
-The value is approximate because some recursions need a bit more (up to perhaps
-16 more bytes).
-</P>
-<P>
-If the above command is given when PCRE is compiled to use the heap instead of
-the stack for recursion, the value that is output is the size of each block
-that is obtained from the heap.
-</P>
-<br><b>
-Changing stack size in Unix-like systems
-</b><br>
-<P>
-In Unix-like environments, there is not often a problem with the stack unless
-very long strings are involved, though the default limit on stack size varies
-from system to system. Values from 8Mb to 64Mb are common. You can find your
-default limit by running the command:
-<pre>
- ulimit -s
-</pre>
-Unfortunately, the effect of running out of stack is often SIGSEGV, though
-sometimes a more explicit error message is given. You can normally increase the
-limit on stack size by code such as this:
-<pre>
- struct rlimit rlim;
- getrlimit(RLIMIT_STACK, &rlim);
- rlim.rlim_cur = 100*1024*1024;
- setrlimit(RLIMIT_STACK, &rlim);
-</pre>
-This reads the current limits (soft and hard) using <b>getrlimit()</b>, then
-attempts to increase the soft limit to 100Mb using <b>setrlimit()</b>. You must
-do this before calling <b>pcre[16|32]_exec()</b>.
-</P>
-<br><b>
-Changing stack size in Mac OS X
-</b><br>
-<P>
-Using <b>setrlimit()</b>, as described above, should also work on Mac OS X. It
-is also possible to set a stack size when linking a program. There is a
-discussion about stack sizes in Mac OS X at this web site:
-<a href="http://developer.apple.com/qa/qa2005/qa1419.html">http://developer.apple.com/qa/qa2005/qa1419.html.</a>
-</P>
-<br><b>
-AUTHOR
-</b><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><b>
-REVISION
-</b><br>
-<P>
-Last updated: 24 June 2012
-<br>
-Copyright &copy; 1997-2012 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcresyntax.html b/libs/Pcre16/docs/doc/html/pcresyntax.html
deleted file mode 100644
index 5896b9e068..0000000000
--- a/libs/Pcre16/docs/doc/html/pcresyntax.html
+++ /dev/null
@@ -1,561 +0,0 @@
-<html>
-<head>
-<title>pcresyntax specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcresyntax man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">PCRE REGULAR EXPRESSION SYNTAX SUMMARY</a>
-<li><a name="TOC2" href="#SEC2">QUOTING</a>
-<li><a name="TOC3" href="#SEC3">CHARACTERS</a>
-<li><a name="TOC4" href="#SEC4">CHARACTER TYPES</a>
-<li><a name="TOC5" href="#SEC5">GENERAL CATEGORY PROPERTIES FOR \p and \P</a>
-<li><a name="TOC6" href="#SEC6">PCRE SPECIAL CATEGORY PROPERTIES FOR \p and \P</a>
-<li><a name="TOC7" href="#SEC7">SCRIPT NAMES FOR \p AND \P</a>
-<li><a name="TOC8" href="#SEC8">CHARACTER CLASSES</a>
-<li><a name="TOC9" href="#SEC9">QUANTIFIERS</a>
-<li><a name="TOC10" href="#SEC10">ANCHORS AND SIMPLE ASSERTIONS</a>
-<li><a name="TOC11" href="#SEC11">MATCH POINT RESET</a>
-<li><a name="TOC12" href="#SEC12">ALTERNATION</a>
-<li><a name="TOC13" href="#SEC13">CAPTURING</a>
-<li><a name="TOC14" href="#SEC14">ATOMIC GROUPS</a>
-<li><a name="TOC15" href="#SEC15">COMMENT</a>
-<li><a name="TOC16" href="#SEC16">OPTION SETTING</a>
-<li><a name="TOC17" href="#SEC17">NEWLINE CONVENTION</a>
-<li><a name="TOC18" href="#SEC18">WHAT \R MATCHES</a>
-<li><a name="TOC19" href="#SEC19">LOOKAHEAD AND LOOKBEHIND ASSERTIONS</a>
-<li><a name="TOC20" href="#SEC20">BACKREFERENCES</a>
-<li><a name="TOC21" href="#SEC21">SUBROUTINE REFERENCES (POSSIBLY RECURSIVE)</a>
-<li><a name="TOC22" href="#SEC22">CONDITIONAL PATTERNS</a>
-<li><a name="TOC23" href="#SEC23">BACKTRACKING CONTROL</a>
-<li><a name="TOC24" href="#SEC24">CALLOUTS</a>
-<li><a name="TOC25" href="#SEC25">SEE ALSO</a>
-<li><a name="TOC26" href="#SEC26">AUTHOR</a>
-<li><a name="TOC27" href="#SEC27">REVISION</a>
-</ul>
-<br><a name="SEC1" href="#TOC1">PCRE REGULAR EXPRESSION SYNTAX SUMMARY</a><br>
-<P>
-The full syntax and semantics of the regular expressions that are supported by
-PCRE are described in the
-<a href="pcrepattern.html"><b>pcrepattern</b></a>
-documentation. This document contains a quick-reference summary of the syntax.
-</P>
-<br><a name="SEC2" href="#TOC1">QUOTING</a><br>
-<P>
-<pre>
- \x where x is non-alphanumeric is a literal x
- \Q...\E treat enclosed characters as literal
-</PRE>
-</P>
-<br><a name="SEC3" href="#TOC1">CHARACTERS</a><br>
-<P>
-<pre>
- \a alarm, that is, the BEL character (hex 07)
- \cx "control-x", where x is any ASCII character
- \e escape (hex 1B)
- \f form feed (hex 0C)
- \n newline (hex 0A)
- \r carriage return (hex 0D)
- \t tab (hex 09)
- \0dd character with octal code 0dd
- \ddd character with octal code ddd, or backreference
- \o{ddd..} character with octal code ddd..
- \xhh character with hex code hh
- \x{hhh..} character with hex code hhh..
-</pre>
-Note that \0dd is always an octal code, and that \8 and \9 are the literal
-characters "8" and "9".
-</P>
-<br><a name="SEC4" href="#TOC1">CHARACTER TYPES</a><br>
-<P>
-<pre>
- . any character except newline;
- in dotall mode, any character whatsoever
- \C one data unit, even in UTF mode (best avoided)
- \d a decimal digit
- \D a character that is not a decimal digit
- \h a horizontal white space character
- \H a character that is not a horizontal white space character
- \N a character that is not a newline
- \p{<i>xx</i>} a character with the <i>xx</i> property
- \P{<i>xx</i>} a character without the <i>xx</i> property
- \R a newline sequence
- \s a white space character
- \S a character that is not a white space character
- \v a vertical white space character
- \V a character that is not a vertical white space character
- \w a "word" character
- \W a "non-word" character
- \X a Unicode extended grapheme cluster
-</pre>
-By default, \d, \s, and \w match only ASCII characters, even in UTF-8 mode
-or in the 16- bit and 32-bit libraries. However, if locale-specific matching is
-happening, \s and \w may also match characters with code points in the range
-128-255. If the PCRE_UCP option is set, the behaviour of these escape sequences
-is changed to use Unicode properties and they match many more characters.
-</P>
-<br><a name="SEC5" href="#TOC1">GENERAL CATEGORY PROPERTIES FOR \p and \P</a><br>
-<P>
-<pre>
- C Other
- Cc Control
- Cf Format
- Cn Unassigned
- Co Private use
- Cs Surrogate
-
- L Letter
- Ll Lower case letter
- Lm Modifier letter
- Lo Other letter
- Lt Title case letter
- Lu Upper case letter
- L& Ll, Lu, or Lt
-
- M Mark
- Mc Spacing mark
- Me Enclosing mark
- Mn Non-spacing mark
-
- N Number
- Nd Decimal number
- Nl Letter number
- No Other number
-
- P Punctuation
- Pc Connector punctuation
- Pd Dash punctuation
- Pe Close punctuation
- Pf Final punctuation
- Pi Initial punctuation
- Po Other punctuation
- Ps Open punctuation
-
- S Symbol
- Sc Currency symbol
- Sk Modifier symbol
- Sm Mathematical symbol
- So Other symbol
-
- Z Separator
- Zl Line separator
- Zp Paragraph separator
- Zs Space separator
-</PRE>
-</P>
-<br><a name="SEC6" href="#TOC1">PCRE SPECIAL CATEGORY PROPERTIES FOR \p and \P</a><br>
-<P>
-<pre>
- Xan Alphanumeric: union of properties L and N
- Xps POSIX space: property Z or tab, NL, VT, FF, CR
- Xsp Perl space: property Z or tab, NL, VT, FF, CR
- Xuc Univerally-named character: one that can be
- represented by a Universal Character Name
- Xwd Perl word: property Xan or underscore
-</pre>
-Perl and POSIX space are now the same. Perl added VT to its space character set
-at release 5.18 and PCRE changed at release 8.34.
-</P>
-<br><a name="SEC7" href="#TOC1">SCRIPT NAMES FOR \p AND \P</a><br>
-<P>
-Arabic,
-Armenian,
-Avestan,
-Balinese,
-Bamum,
-Bassa_Vah,
-Batak,
-Bengali,
-Bopomofo,
-Brahmi,
-Braille,
-Buginese,
-Buhid,
-Canadian_Aboriginal,
-Carian,
-Caucasian_Albanian,
-Chakma,
-Cham,
-Cherokee,
-Common,
-Coptic,
-Cuneiform,
-Cypriot,
-Cyrillic,
-Deseret,
-Devanagari,
-Duployan,
-Egyptian_Hieroglyphs,
-Elbasan,
-Ethiopic,
-Georgian,
-Glagolitic,
-Gothic,
-Grantha,
-Greek,
-Gujarati,
-Gurmukhi,
-Han,
-Hangul,
-Hanunoo,
-Hebrew,
-Hiragana,
-Imperial_Aramaic,
-Inherited,
-Inscriptional_Pahlavi,
-Inscriptional_Parthian,
-Javanese,
-Kaithi,
-Kannada,
-Katakana,
-Kayah_Li,
-Kharoshthi,
-Khmer,
-Khojki,
-Khudawadi,
-Lao,
-Latin,
-Lepcha,
-Limbu,
-Linear_A,
-Linear_B,
-Lisu,
-Lycian,
-Lydian,
-Mahajani,
-Malayalam,
-Mandaic,
-Manichaean,
-Meetei_Mayek,
-Mende_Kikakui,
-Meroitic_Cursive,
-Meroitic_Hieroglyphs,
-Miao,
-Modi,
-Mongolian,
-Mro,
-Myanmar,
-Nabataean,
-New_Tai_Lue,
-Nko,
-Ogham,
-Ol_Chiki,
-Old_Italic,
-Old_North_Arabian,
-Old_Permic,
-Old_Persian,
-Old_South_Arabian,
-Old_Turkic,
-Oriya,
-Osmanya,
-Pahawh_Hmong,
-Palmyrene,
-Pau_Cin_Hau,
-Phags_Pa,
-Phoenician,
-Psalter_Pahlavi,
-Rejang,
-Runic,
-Samaritan,
-Saurashtra,
-Sharada,
-Shavian,
-Siddham,
-Sinhala,
-Sora_Sompeng,
-Sundanese,
-Syloti_Nagri,
-Syriac,
-Tagalog,
-Tagbanwa,
-Tai_Le,
-Tai_Tham,
-Tai_Viet,
-Takri,
-Tamil,
-Telugu,
-Thaana,
-Thai,
-Tibetan,
-Tifinagh,
-Tirhuta,
-Ugaritic,
-Vai,
-Warang_Citi,
-Yi.
-</P>
-<br><a name="SEC8" href="#TOC1">CHARACTER CLASSES</a><br>
-<P>
-<pre>
- [...] positive character class
- [^...] negative character class
- [x-y] range (can be used for hex characters)
- [[:xxx:]] positive POSIX named set
- [[:^xxx:]] negative POSIX named set
-
- alnum alphanumeric
- alpha alphabetic
- ascii 0-127
- blank space or tab
- cntrl control character
- digit decimal digit
- graph printing, excluding space
- lower lower case letter
- print printing, including space
- punct printing, excluding alphanumeric
- space white space
- upper upper case letter
- word same as \w
- xdigit hexadecimal digit
-</pre>
-In PCRE, POSIX character set names recognize only ASCII characters by default,
-but some of them use Unicode properties if PCRE_UCP is set. You can use
-\Q...\E inside a character class.
-</P>
-<br><a name="SEC9" href="#TOC1">QUANTIFIERS</a><br>
-<P>
-<pre>
- ? 0 or 1, greedy
- ?+ 0 or 1, possessive
- ?? 0 or 1, lazy
- * 0 or more, greedy
- *+ 0 or more, possessive
- *? 0 or more, lazy
- + 1 or more, greedy
- ++ 1 or more, possessive
- +? 1 or more, lazy
- {n} exactly n
- {n,m} at least n, no more than m, greedy
- {n,m}+ at least n, no more than m, possessive
- {n,m}? at least n, no more than m, lazy
- {n,} n or more, greedy
- {n,}+ n or more, possessive
- {n,}? n or more, lazy
-</PRE>
-</P>
-<br><a name="SEC10" href="#TOC1">ANCHORS AND SIMPLE ASSERTIONS</a><br>
-<P>
-<pre>
- \b word boundary
- \B not a word boundary
- ^ start of subject
- also after internal newline in multiline mode
- \A start of subject
- $ end of subject
- also before newline at end of subject
- also before internal newline in multiline mode
- \Z end of subject
- also before newline at end of subject
- \z end of subject
- \G first matching position in subject
-</PRE>
-</P>
-<br><a name="SEC11" href="#TOC1">MATCH POINT RESET</a><br>
-<P>
-<pre>
- \K reset start of match
-</pre>
-\K is honoured in positive assertions, but ignored in negative ones.
-</P>
-<br><a name="SEC12" href="#TOC1">ALTERNATION</a><br>
-<P>
-<pre>
- expr|expr|expr...
-</PRE>
-</P>
-<br><a name="SEC13" href="#TOC1">CAPTURING</a><br>
-<P>
-<pre>
- (...) capturing group
- (?&#60;name&#62;...) named capturing group (Perl)
- (?'name'...) named capturing group (Perl)
- (?P&#60;name&#62;...) named capturing group (Python)
- (?:...) non-capturing group
- (?|...) non-capturing group; reset group numbers for
- capturing groups in each alternative
-</PRE>
-</P>
-<br><a name="SEC14" href="#TOC1">ATOMIC GROUPS</a><br>
-<P>
-<pre>
- (?&#62;...) atomic, non-capturing group
-</PRE>
-</P>
-<br><a name="SEC15" href="#TOC1">COMMENT</a><br>
-<P>
-<pre>
- (?#....) comment (not nestable)
-</PRE>
-</P>
-<br><a name="SEC16" href="#TOC1">OPTION SETTING</a><br>
-<P>
-<pre>
- (?i) caseless
- (?J) allow duplicate names
- (?m) multiline
- (?s) single line (dotall)
- (?U) default ungreedy (lazy)
- (?x) extended (ignore white space)
- (?-...) unset option(s)
-</pre>
-The following are recognized only at the very start of a pattern or after one
-of the newline or \R options with similar syntax. More than one of them may
-appear.
-<pre>
- (*LIMIT_MATCH=d) set the match limit to d (decimal number)
- (*LIMIT_RECURSION=d) set the recursion limit to d (decimal number)
- (*NO_AUTO_POSSESS) no auto-possessification (PCRE_NO_AUTO_POSSESS)
- (*NO_START_OPT) no start-match optimization (PCRE_NO_START_OPTIMIZE)
- (*UTF8) set UTF-8 mode: 8-bit library (PCRE_UTF8)
- (*UTF16) set UTF-16 mode: 16-bit library (PCRE_UTF16)
- (*UTF32) set UTF-32 mode: 32-bit library (PCRE_UTF32)
- (*UTF) set appropriate UTF mode for the library in use
- (*UCP) set PCRE_UCP (use Unicode properties for \d etc)
-</pre>
-Note that LIMIT_MATCH and LIMIT_RECURSION can only reduce the value of the
-limits set by the caller of pcre_exec(), not increase them.
-</P>
-<br><a name="SEC17" href="#TOC1">NEWLINE CONVENTION</a><br>
-<P>
-These are recognized only at the very start of the pattern or after option
-settings with a similar syntax.
-<pre>
- (*CR) carriage return only
- (*LF) linefeed only
- (*CRLF) carriage return followed by linefeed
- (*ANYCRLF) all three of the above
- (*ANY) any Unicode newline sequence
-</PRE>
-</P>
-<br><a name="SEC18" href="#TOC1">WHAT \R MATCHES</a><br>
-<P>
-These are recognized only at the very start of the pattern or after option
-setting with a similar syntax.
-<pre>
- (*BSR_ANYCRLF) CR, LF, or CRLF
- (*BSR_UNICODE) any Unicode newline sequence
-</PRE>
-</P>
-<br><a name="SEC19" href="#TOC1">LOOKAHEAD AND LOOKBEHIND ASSERTIONS</a><br>
-<P>
-<pre>
- (?=...) positive look ahead
- (?!...) negative look ahead
- (?&#60;=...) positive look behind
- (?&#60;!...) negative look behind
-</pre>
-Each top-level branch of a look behind must be of a fixed length.
-</P>
-<br><a name="SEC20" href="#TOC1">BACKREFERENCES</a><br>
-<P>
-<pre>
- \n reference by number (can be ambiguous)
- \gn reference by number
- \g{n} reference by number
- \g{-n} relative reference by number
- \k&#60;name&#62; reference by name (Perl)
- \k'name' reference by name (Perl)
- \g{name} reference by name (Perl)
- \k{name} reference by name (.NET)
- (?P=name) reference by name (Python)
-</PRE>
-</P>
-<br><a name="SEC21" href="#TOC1">SUBROUTINE REFERENCES (POSSIBLY RECURSIVE)</a><br>
-<P>
-<pre>
- (?R) recurse whole pattern
- (?n) call subpattern by absolute number
- (?+n) call subpattern by relative number
- (?-n) call subpattern by relative number
- (?&name) call subpattern by name (Perl)
- (?P&#62;name) call subpattern by name (Python)
- \g&#60;name&#62; call subpattern by name (Oniguruma)
- \g'name' call subpattern by name (Oniguruma)
- \g&#60;n&#62; call subpattern by absolute number (Oniguruma)
- \g'n' call subpattern by absolute number (Oniguruma)
- \g&#60;+n&#62; call subpattern by relative number (PCRE extension)
- \g'+n' call subpattern by relative number (PCRE extension)
- \g&#60;-n&#62; call subpattern by relative number (PCRE extension)
- \g'-n' call subpattern by relative number (PCRE extension)
-</PRE>
-</P>
-<br><a name="SEC22" href="#TOC1">CONDITIONAL PATTERNS</a><br>
-<P>
-<pre>
- (?(condition)yes-pattern)
- (?(condition)yes-pattern|no-pattern)
-
- (?(n)... absolute reference condition
- (?(+n)... relative reference condition
- (?(-n)... relative reference condition
- (?(&#60;name&#62;)... named reference condition (Perl)
- (?('name')... named reference condition (Perl)
- (?(name)... named reference condition (PCRE)
- (?(R)... overall recursion condition
- (?(Rn)... specific group recursion condition
- (?(R&name)... specific recursion condition
- (?(DEFINE)... define subpattern for reference
- (?(assert)... assertion condition
-</PRE>
-</P>
-<br><a name="SEC23" href="#TOC1">BACKTRACKING CONTROL</a><br>
-<P>
-The following act immediately they are reached:
-<pre>
- (*ACCEPT) force successful match
- (*FAIL) force backtrack; synonym (*F)
- (*MARK:NAME) set name to be passed back; synonym (*:NAME)
-</pre>
-The following act only when a subsequent match failure causes a backtrack to
-reach them. They all force a match failure, but they differ in what happens
-afterwards. Those that advance the start-of-match point do so only if the
-pattern is not anchored.
-<pre>
- (*COMMIT) overall failure, no advance of starting point
- (*PRUNE) advance to next starting character
- (*PRUNE:NAME) equivalent to (*MARK:NAME)(*PRUNE)
- (*SKIP) advance to current matching position
- (*SKIP:NAME) advance to position corresponding to an earlier
- (*MARK:NAME); if not found, the (*SKIP) is ignored
- (*THEN) local failure, backtrack to next alternation
- (*THEN:NAME) equivalent to (*MARK:NAME)(*THEN)
-</PRE>
-</P>
-<br><a name="SEC24" href="#TOC1">CALLOUTS</a><br>
-<P>
-<pre>
- (?C) callout
- (?Cn) callout with data n
-</PRE>
-</P>
-<br><a name="SEC25" href="#TOC1">SEE ALSO</a><br>
-<P>
-<b>pcrepattern</b>(3), <b>pcreapi</b>(3), <b>pcrecallout</b>(3),
-<b>pcrematching</b>(3), <b>pcre</b>(3).
-</P>
-<br><a name="SEC26" href="#TOC1">AUTHOR</a><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><a name="SEC27" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 08 January 2014
-<br>
-Copyright &copy; 1997-2014 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcretest.html b/libs/Pcre16/docs/doc/html/pcretest.html
deleted file mode 100644
index ba540d3c38..0000000000
--- a/libs/Pcre16/docs/doc/html/pcretest.html
+++ /dev/null
@@ -1,1163 +0,0 @@
-<html>
-<head>
-<title>pcretest specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcretest man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">SYNOPSIS</a>
-<li><a name="TOC2" href="#SEC2">INPUT DATA FORMAT</a>
-<li><a name="TOC3" href="#SEC3">PCRE's 8-BIT, 16-BIT AND 32-BIT LIBRARIES</a>
-<li><a name="TOC4" href="#SEC4">COMMAND LINE OPTIONS</a>
-<li><a name="TOC5" href="#SEC5">DESCRIPTION</a>
-<li><a name="TOC6" href="#SEC6">PATTERN MODIFIERS</a>
-<li><a name="TOC7" href="#SEC7">DATA LINES</a>
-<li><a name="TOC8" href="#SEC8">THE ALTERNATIVE MATCHING FUNCTION</a>
-<li><a name="TOC9" href="#SEC9">DEFAULT OUTPUT FROM PCRETEST</a>
-<li><a name="TOC10" href="#SEC10">OUTPUT FROM THE ALTERNATIVE MATCHING FUNCTION</a>
-<li><a name="TOC11" href="#SEC11">RESTARTING AFTER A PARTIAL MATCH</a>
-<li><a name="TOC12" href="#SEC12">CALLOUTS</a>
-<li><a name="TOC13" href="#SEC13">NON-PRINTING CHARACTERS</a>
-<li><a name="TOC14" href="#SEC14">SAVING AND RELOADING COMPILED PATTERNS</a>
-<li><a name="TOC15" href="#SEC15">SEE ALSO</a>
-<li><a name="TOC16" href="#SEC16">AUTHOR</a>
-<li><a name="TOC17" href="#SEC17">REVISION</a>
-</ul>
-<br><a name="SEC1" href="#TOC1">SYNOPSIS</a><br>
-<P>
-<b>pcretest [options] [input file [output file]]</b>
-<br>
-<br>
-<b>pcretest</b> was written as a test program for the PCRE regular expression
-library itself, but it can also be used for experimenting with regular
-expressions. This document describes the features of the test program; for
-details of the regular expressions themselves, see the
-<a href="pcrepattern.html"><b>pcrepattern</b></a>
-documentation. For details of the PCRE library function calls and their
-options, see the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-,
-<a href="pcre16.html"><b>pcre16</b></a>
-and
-<a href="pcre32.html"><b>pcre32</b></a>
-documentation.
-</P>
-<P>
-The input for <b>pcretest</b> is a sequence of regular expression patterns and
-strings to be matched, as described below. The output shows the result of each
-match. Options on the command line and the patterns control PCRE options and
-exactly what is output.
-</P>
-<P>
-As PCRE has evolved, it has acquired many different features, and as a result,
-<b>pcretest</b> now has rather a lot of obscure options for testing every
-possible feature. Some of these options are specifically designed for use in
-conjunction with the test script and data files that are distributed as part of
-PCRE, and are unlikely to be of use otherwise. They are all documented here,
-but without much justification.
-</P>
-<br><a name="SEC2" href="#TOC1">INPUT DATA FORMAT</a><br>
-<P>
-Input to <b>pcretest</b> is processed line by line, either by calling the C
-library's <b>fgets()</b> function, or via the <b>libreadline</b> library (see
-below). In Unix-like environments, <b>fgets()</b> treats any bytes other than
-newline as data characters. However, in some Windows environments character 26
-(hex 1A) causes an immediate end of file, and no further data is read. For
-maximum portability, therefore, it is safest to use only ASCII characters in
-<b>pcretest</b> input files.
-</P>
-<P>
-The input is processed using using C's string functions, so must not
-contain binary zeroes, even though in Unix-like environments, <b>fgets()</b>
-treats any bytes other than newline as data characters.
-</P>
-<br><a name="SEC3" href="#TOC1">PCRE's 8-BIT, 16-BIT AND 32-BIT LIBRARIES</a><br>
-<P>
-From release 8.30, two separate PCRE libraries can be built. The original one
-supports 8-bit character strings, whereas the newer 16-bit library supports
-character strings encoded in 16-bit units. From release 8.32, a third library
-can be built, supporting character strings encoded in 32-bit units. The
-<b>pcretest</b> program can be used to test all three libraries. However, it is
-itself still an 8-bit program, reading 8-bit input and writing 8-bit output.
-When testing the 16-bit or 32-bit library, the patterns and data strings are
-converted to 16- or 32-bit format before being passed to the PCRE library
-functions. Results are converted to 8-bit for output.
-</P>
-<P>
-References to functions and structures of the form <b>pcre[16|32]_xx</b> below
-mean "<b>pcre_xx</b> when using the 8-bit library, <b>pcre16_xx</b> when using
-the 16-bit library, or <b>pcre32_xx</b> when using the 32-bit library".
-</P>
-<br><a name="SEC4" href="#TOC1">COMMAND LINE OPTIONS</a><br>
-<P>
-<b>-8</b>
-If both the 8-bit library has been built, this option causes the 8-bit library
-to be used (which is the default); if the 8-bit library has not been built,
-this option causes an error.
-</P>
-<P>
-<b>-16</b>
-If both the 8-bit or the 32-bit, and the 16-bit libraries have been built, this
-option causes the 16-bit library to be used. If only the 16-bit library has been
-built, this is the default (so has no effect). If only the 8-bit or the 32-bit
-library has been built, this option causes an error.
-</P>
-<P>
-<b>-32</b>
-If both the 8-bit or the 16-bit, and the 32-bit libraries have been built, this
-option causes the 32-bit library to be used. If only the 32-bit library has been
-built, this is the default (so has no effect). If only the 8-bit or the 16-bit
-library has been built, this option causes an error.
-</P>
-<P>
-<b>-b</b>
-Behave as if each pattern has the <b>/B</b> (show byte code) modifier; the
-internal form is output after compilation.
-</P>
-<P>
-<b>-C</b>
-Output the version number of the PCRE library, and all available information
-about the optional features that are included, and then exit with zero exit
-code. All other options are ignored.
-</P>
-<P>
-<b>-C</b> <i>option</i>
-Output information about a specific build-time option, then exit. This
-functionality is intended for use in scripts such as <b>RunTest</b>. The
-following options output the value and set the exit code as indicated:
-<pre>
- ebcdic-nl the code for LF (= NL) in an EBCDIC environment:
- 0x15 or 0x25
- 0 if used in an ASCII environment
- exit code is always 0
- linksize the configured internal link size (2, 3, or 4)
- exit code is set to the link size
- newline the default newline setting:
- CR, LF, CRLF, ANYCRLF, or ANY
- exit code is always 0
- bsr the default setting for what \R matches:
- ANYCRLF or ANY
- exit code is always 0
-</pre>
-The following options output 1 for true or 0 for false, and set the exit code
-to the same value:
-<pre>
- ebcdic compiled for an EBCDIC environment
- jit just-in-time support is available
- pcre16 the 16-bit library was built
- pcre32 the 32-bit library was built
- pcre8 the 8-bit library was built
- ucp Unicode property support is available
- utf UTF-8 and/or UTF-16 and/or UTF-32 support
- is available
-</pre>
-If an unknown option is given, an error message is output; the exit code is 0.
-</P>
-<P>
-<b>-d</b>
-Behave as if each pattern has the <b>/D</b> (debug) modifier; the internal
-form and information about the compiled pattern is output after compilation;
-<b>-d</b> is equivalent to <b>-b -i</b>.
-</P>
-<P>
-<b>-dfa</b>
-Behave as if each data line contains the \D escape sequence; this causes the
-alternative matching function, <b>pcre[16|32]_dfa_exec()</b>, to be used instead
-of the standard <b>pcre[16|32]_exec()</b> function (more detail is given below).
-</P>
-<P>
-<b>-help</b>
-Output a brief summary these options and then exit.
-</P>
-<P>
-<b>-i</b>
-Behave as if each pattern has the <b>/I</b> modifier; information about the
-compiled pattern is given after compilation.
-</P>
-<P>
-<b>-M</b>
-Behave as if each data line contains the \M escape sequence; this causes
-PCRE to discover the minimum MATCH_LIMIT and MATCH_LIMIT_RECURSION settings by
-calling <b>pcre[16|32]_exec()</b> repeatedly with different limits.
-</P>
-<P>
-<b>-m</b>
-Output the size of each compiled pattern after it has been compiled. This is
-equivalent to adding <b>/M</b> to each regular expression. The size is given in
-bytes for both libraries.
-</P>
-<P>
-<b>-O</b>
-Behave as if each pattern has the <b>/O</b> modifier, that is disable
-auto-possessification for all patterns.
-</P>
-<P>
-<b>-o</b> <i>osize</i>
-Set the number of elements in the output vector that is used when calling
-<b>pcre[16|32]_exec()</b> or <b>pcre[16|32]_dfa_exec()</b> to be <i>osize</i>. The
-default value is 45, which is enough for 14 capturing subexpressions for
-<b>pcre[16|32]_exec()</b> or 22 different matches for
-<b>pcre[16|32]_dfa_exec()</b>.
-The vector size can be changed for individual matching calls by including \O
-in the data line (see below).
-</P>
-<P>
-<b>-p</b>
-Behave as if each pattern has the <b>/P</b> modifier; the POSIX wrapper API is
-used to call PCRE. None of the other options has any effect when <b>-p</b> is
-set. This option can be used only with the 8-bit library.
-</P>
-<P>
-<b>-q</b>
-Do not output the version number of <b>pcretest</b> at the start of execution.
-</P>
-<P>
-<b>-S</b> <i>size</i>
-On Unix-like systems, set the size of the run-time stack to <i>size</i>
-megabytes.
-</P>
-<P>
-<b>-s</b> or <b>-s+</b>
-Behave as if each pattern has the <b>/S</b> modifier; in other words, force each
-pattern to be studied. If <b>-s+</b> is used, all the JIT compile options are
-passed to <b>pcre[16|32]_study()</b>, causing just-in-time optimization to be set
-up if it is available, for both full and partial matching. Specific JIT compile
-options can be selected by following <b>-s+</b> with a digit in the range 1 to
-7, which selects the JIT compile modes as follows:
-<pre>
- 1 normal match only
- 2 soft partial match only
- 3 normal match and soft partial match
- 4 hard partial match only
- 6 soft and hard partial match
- 7 all three modes (default)
-</pre>
-If <b>-s++</b> is used instead of <b>-s+</b> (with or without a following digit),
-the text "(JIT)" is added to the first output line after a match or no match
-when JIT-compiled code was actually used.
-<br>
-<br>
-Note that there are pattern options that can override <b>-s</b>, either
-specifying no studying at all, or suppressing JIT compilation.
-<br>
-<br>
-If the <b>/I</b> or <b>/D</b> option is present on a pattern (requesting output
-about the compiled pattern), information about the result of studying is not
-included when studying is caused only by <b>-s</b> and neither <b>-i</b> nor
-<b>-d</b> is present on the command line. This behaviour means that the output
-from tests that are run with and without <b>-s</b> should be identical, except
-when options that output information about the actual running of a match are
-set.
-<br>
-<br>
-The <b>-M</b>, <b>-t</b>, and <b>-tm</b> options, which give information about
-resources used, are likely to produce different output with and without
-<b>-s</b>. Output may also differ if the <b>/C</b> option is present on an
-individual pattern. This uses callouts to trace the the matching process, and
-this may be different between studied and non-studied patterns. If the pattern
-contains (*MARK) items there may also be differences, for the same reason. The
-<b>-s</b> command line option can be overridden for specific patterns that
-should never be studied (see the <b>/S</b> pattern modifier below).
-</P>
-<P>
-<b>-t</b>
-Run each compile, study, and match many times with a timer, and output the
-resulting times per compile, study, or match (in milliseconds). Do not set
-<b>-m</b> with <b>-t</b>, because you will then get the size output a zillion
-times, and the timing will be distorted. You can control the number of
-iterations that are used for timing by following <b>-t</b> with a number (as a
-separate item on the command line). For example, "-t 1000" iterates 1000 times.
-The default is to iterate 500000 times.
-</P>
-<P>
-<b>-tm</b>
-This is like <b>-t</b> except that it times only the matching phase, not the
-compile or study phases.
-</P>
-<P>
-<b>-T</b> <b>-TM</b>
-These behave like <b>-t</b> and <b>-tm</b>, but in addition, at the end of a run,
-the total times for all compiles, studies, and matches are output.
-</P>
-<br><a name="SEC5" href="#TOC1">DESCRIPTION</a><br>
-<P>
-If <b>pcretest</b> is given two filename arguments, it reads from the first and
-writes to the second. If it is given only one filename argument, it reads from
-that file and writes to stdout. Otherwise, it reads from stdin and writes to
-stdout, and prompts for each line of input, using "re&#62;" to prompt for regular
-expressions, and "data&#62;" to prompt for data lines.
-</P>
-<P>
-When <b>pcretest</b> is built, a configuration option can specify that it should
-be linked with the <b>libreadline</b> library. When this is done, if the input
-is from a terminal, it is read using the <b>readline()</b> function. This
-provides line-editing and history facilities. The output from the <b>-help</b>
-option states whether or not <b>readline()</b> will be used.
-</P>
-<P>
-The program handles any number of sets of input on a single input file. Each
-set starts with a regular expression, and continues with any number of data
-lines to be matched against that pattern.
-</P>
-<P>
-Each data line is matched separately and independently. If you want to do
-multi-line matches, you have to use the \n escape sequence (or \r or \r\n,
-etc., depending on the newline setting) in a single line of input to encode the
-newline sequences. There is no limit on the length of data lines; the input
-buffer is automatically extended if it is too small.
-</P>
-<P>
-An empty line signals the end of the data lines, at which point a new regular
-expression is read. The regular expressions are given enclosed in any
-non-alphanumeric delimiters other than backslash, for example:
-<pre>
- /(a|bc)x+yz/
-</pre>
-White space before the initial delimiter is ignored. A regular expression may
-be continued over several input lines, in which case the newline characters are
-included within it. It is possible to include the delimiter within the pattern
-by escaping it, for example
-<pre>
- /abc\/def/
-</pre>
-If you do so, the escape and the delimiter form part of the pattern, but since
-delimiters are always non-alphanumeric, this does not affect its interpretation.
-If the terminating delimiter is immediately followed by a backslash, for
-example,
-<pre>
- /abc/\
-</pre>
-then a backslash is added to the end of the pattern. This is done to provide a
-way of testing the error condition that arises if a pattern finishes with a
-backslash, because
-<pre>
- /abc\/
-</pre>
-is interpreted as the first line of a pattern that starts with "abc/", causing
-pcretest to read the next line as a continuation of the regular expression.
-</P>
-<br><a name="SEC6" href="#TOC1">PATTERN MODIFIERS</a><br>
-<P>
-A pattern may be followed by any number of modifiers, which are mostly single
-characters, though some of these can be qualified by further characters.
-Following Perl usage, these are referred to below as, for example, "the
-<b>/i</b> modifier", even though the delimiter of the pattern need not always be
-a slash, and no slash is used when writing modifiers. White space may appear
-between the final pattern delimiter and the first modifier, and between the
-modifiers themselves. For reference, here is a complete list of modifiers. They
-fall into several groups that are described in detail in the following
-sections.
-<pre>
- <b>/8</b> set UTF mode
- <b>/9</b> set PCRE_NEVER_UTF (locks out UTF mode)
- <b>/?</b> disable UTF validity check
- <b>/+</b> show remainder of subject after match
- <b>/=</b> show all captures (not just those that are set)
-
- <b>/A</b> set PCRE_ANCHORED
- <b>/B</b> show compiled code
- <b>/C</b> set PCRE_AUTO_CALLOUT
- <b>/D</b> same as <b>/B</b> plus <b>/I</b>
- <b>/E</b> set PCRE_DOLLAR_ENDONLY
- <b>/F</b> flip byte order in compiled pattern
- <b>/f</b> set PCRE_FIRSTLINE
- <b>/G</b> find all matches (shorten string)
- <b>/g</b> find all matches (use startoffset)
- <b>/I</b> show information about pattern
- <b>/i</b> set PCRE_CASELESS
- <b>/J</b> set PCRE_DUPNAMES
- <b>/K</b> show backtracking control names
- <b>/L</b> set locale
- <b>/M</b> show compiled memory size
- <b>/m</b> set PCRE_MULTILINE
- <b>/N</b> set PCRE_NO_AUTO_CAPTURE
- <b>/O</b> set PCRE_NO_AUTO_POSSESS
- <b>/P</b> use the POSIX wrapper
- <b>/Q</b> test external stack check function
- <b>/S</b> study the pattern after compilation
- <b>/s</b> set PCRE_DOTALL
- <b>/T</b> select character tables
- <b>/U</b> set PCRE_UNGREEDY
- <b>/W</b> set PCRE_UCP
- <b>/X</b> set PCRE_EXTRA
- <b>/x</b> set PCRE_EXTENDED
- <b>/Y</b> set PCRE_NO_START_OPTIMIZE
- <b>/Z</b> don't show lengths in <b>/B</b> output
-
- <b>/&#60;any&#62;</b> set PCRE_NEWLINE_ANY
- <b>/&#60;anycrlf&#62;</b> set PCRE_NEWLINE_ANYCRLF
- <b>/&#60;cr&#62;</b> set PCRE_NEWLINE_CR
- <b>/&#60;crlf&#62;</b> set PCRE_NEWLINE_CRLF
- <b>/&#60;lf&#62;</b> set PCRE_NEWLINE_LF
- <b>/&#60;bsr_anycrlf&#62;</b> set PCRE_BSR_ANYCRLF
- <b>/&#60;bsr_unicode&#62;</b> set PCRE_BSR_UNICODE
- <b>/&#60;JS&#62;</b> set PCRE_JAVASCRIPT_COMPAT
-
-</PRE>
-</P>
-<br><b>
-Perl-compatible modifiers
-</b><br>
-<P>
-The <b>/i</b>, <b>/m</b>, <b>/s</b>, and <b>/x</b> modifiers set the PCRE_CASELESS,
-PCRE_MULTILINE, PCRE_DOTALL, or PCRE_EXTENDED options, respectively, when
-<b>pcre[16|32]_compile()</b> is called. These four modifier letters have the same
-effect as they do in Perl. For example:
-<pre>
- /caseless/i
-
-</PRE>
-</P>
-<br><b>
-Modifiers for other PCRE options
-</b><br>
-<P>
-The following table shows additional modifiers for setting PCRE compile-time
-options that do not correspond to anything in Perl:
-<pre>
- <b>/8</b> PCRE_UTF8 ) when using the 8-bit
- <b>/?</b> PCRE_NO_UTF8_CHECK ) library
-
- <b>/8</b> PCRE_UTF16 ) when using the 16-bit
- <b>/?</b> PCRE_NO_UTF16_CHECK ) library
-
- <b>/8</b> PCRE_UTF32 ) when using the 32-bit
- <b>/?</b> PCRE_NO_UTF32_CHECK ) library
-
- <b>/9</b> PCRE_NEVER_UTF
- <b>/A</b> PCRE_ANCHORED
- <b>/C</b> PCRE_AUTO_CALLOUT
- <b>/E</b> PCRE_DOLLAR_ENDONLY
- <b>/f</b> PCRE_FIRSTLINE
- <b>/J</b> PCRE_DUPNAMES
- <b>/N</b> PCRE_NO_AUTO_CAPTURE
- <b>/O</b> PCRE_NO_AUTO_POSSESS
- <b>/U</b> PCRE_UNGREEDY
- <b>/W</b> PCRE_UCP
- <b>/X</b> PCRE_EXTRA
- <b>/Y</b> PCRE_NO_START_OPTIMIZE
- <b>/&#60;any&#62;</b> PCRE_NEWLINE_ANY
- <b>/&#60;anycrlf&#62;</b> PCRE_NEWLINE_ANYCRLF
- <b>/&#60;cr&#62;</b> PCRE_NEWLINE_CR
- <b>/&#60;crlf&#62;</b> PCRE_NEWLINE_CRLF
- <b>/&#60;lf&#62;</b> PCRE_NEWLINE_LF
- <b>/&#60;bsr_anycrlf&#62;</b> PCRE_BSR_ANYCRLF
- <b>/&#60;bsr_unicode&#62;</b> PCRE_BSR_UNICODE
- <b>/&#60;JS&#62;</b> PCRE_JAVASCRIPT_COMPAT
-</pre>
-The modifiers that are enclosed in angle brackets are literal strings as shown,
-including the angle brackets, but the letters within can be in either case.
-This example sets multiline matching with CRLF as the line ending sequence:
-<pre>
- /^abc/m&#60;CRLF&#62;
-</pre>
-As well as turning on the PCRE_UTF8/16/32 option, the <b>/8</b> modifier causes
-all non-printing characters in output strings to be printed using the
-\x{hh...} notation. Otherwise, those less than 0x100 are output in hex without
-the curly brackets.
-</P>
-<P>
-Full details of the PCRE options are given in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-documentation.
-</P>
-<br><b>
-Finding all matches in a string
-</b><br>
-<P>
-Searching for all possible matches within each subject string can be requested
-by the <b>/g</b> or <b>/G</b> modifier. After finding a match, PCRE is called
-again to search the remainder of the subject string. The difference between
-<b>/g</b> and <b>/G</b> is that the former uses the <i>startoffset</i> argument to
-<b>pcre[16|32]_exec()</b> to start searching at a new point within the entire
-string (which is in effect what Perl does), whereas the latter passes over a
-shortened substring. This makes a difference to the matching process if the
-pattern begins with a lookbehind assertion (including \b or \B).
-</P>
-<P>
-If any call to <b>pcre[16|32]_exec()</b> in a <b>/g</b> or <b>/G</b> sequence matches
-an empty string, the next call is done with the PCRE_NOTEMPTY_ATSTART and
-PCRE_ANCHORED flags set in order to search for another, non-empty, match at the
-same point. If this second match fails, the start offset is advanced, and the
-normal match is retried. This imitates the way Perl handles such cases when
-using the <b>/g</b> modifier or the <b>split()</b> function. Normally, the start
-offset is advanced by one character, but if the newline convention recognizes
-CRLF as a newline, and the current character is CR followed by LF, an advance
-of two is used.
-</P>
-<br><b>
-Other modifiers
-</b><br>
-<P>
-There are yet more modifiers for controlling the way <b>pcretest</b>
-operates.
-</P>
-<P>
-The <b>/+</b> modifier requests that as well as outputting the substring that
-matched the entire pattern, <b>pcretest</b> should in addition output the
-remainder of the subject string. This is useful for tests where the subject
-contains multiple copies of the same substring. If the <b>+</b> modifier appears
-twice, the same action is taken for captured substrings. In each case the
-remainder is output on the following line with a plus character following the
-capture number. Note that this modifier must not immediately follow the /S
-modifier because /S+ and /S++ have other meanings.
-</P>
-<P>
-The <b>/=</b> modifier requests that the values of all potential captured
-parentheses be output after a match. By default, only those up to the highest
-one actually used in the match are output (corresponding to the return code
-from <b>pcre[16|32]_exec()</b>). Values in the offsets vector corresponding to
-higher numbers should be set to -1, and these are output as "&#60;unset&#62;". This
-modifier gives a way of checking that this is happening.
-</P>
-<P>
-The <b>/B</b> modifier is a debugging feature. It requests that <b>pcretest</b>
-output a representation of the compiled code after compilation. Normally this
-information contains length and offset values; however, if <b>/Z</b> is also
-present, this data is replaced by spaces. This is a special feature for use in
-the automatic test scripts; it ensures that the same output is generated for
-different internal link sizes.
-</P>
-<P>
-The <b>/D</b> modifier is a PCRE debugging feature, and is equivalent to
-<b>/BI</b>, that is, both the <b>/B</b> and the <b>/I</b> modifiers.
-</P>
-<P>
-The <b>/F</b> modifier causes <b>pcretest</b> to flip the byte order of the
-2-byte and 4-byte fields in the compiled pattern. This facility is for testing
-the feature in PCRE that allows it to execute patterns that were compiled on a
-host with a different endianness. This feature is not available when the POSIX
-interface to PCRE is being used, that is, when the <b>/P</b> pattern modifier is
-specified. See also the section about saving and reloading compiled patterns
-below.
-</P>
-<P>
-The <b>/I</b> modifier requests that <b>pcretest</b> output information about the
-compiled pattern (whether it is anchored, has a fixed first character, and
-so on). It does this by calling <b>pcre[16|32]_fullinfo()</b> after compiling a
-pattern. If the pattern is studied, the results of that are also output. In
-this output, the word "char" means a non-UTF character, that is, the value of a
-single data item (8-bit, 16-bit, or 32-bit, depending on the library that is
-being tested).
-</P>
-<P>
-The <b>/K</b> modifier requests <b>pcretest</b> to show names from backtracking
-control verbs that are returned from calls to <b>pcre[16|32]_exec()</b>. It causes
-<b>pcretest</b> to create a <b>pcre[16|32]_extra</b> block if one has not already
-been created by a call to <b>pcre[16|32]_study()</b>, and to set the
-PCRE_EXTRA_MARK flag and the <b>mark</b> field within it, every time that
-<b>pcre[16|32]_exec()</b> is called. If the variable that the <b>mark</b> field
-points to is non-NULL for a match, non-match, or partial match, <b>pcretest</b>
-prints the string to which it points. For a match, this is shown on a line by
-itself, tagged with "MK:". For a non-match it is added to the message.
-</P>
-<P>
-The <b>/L</b> modifier must be followed directly by the name of a locale, for
-example,
-<pre>
- /pattern/Lfr_FR
-</pre>
-For this reason, it must be the last modifier. The given locale is set,
-<b>pcre[16|32]_maketables()</b> is called to build a set of character tables for
-the locale, and this is then passed to <b>pcre[16|32]_compile()</b> when compiling
-the regular expression. Without an <b>/L</b> (or <b>/T</b>) modifier, NULL is
-passed as the tables pointer; that is, <b>/L</b> applies only to the expression
-on which it appears.
-</P>
-<P>
-The <b>/M</b> modifier causes the size in bytes of the memory block used to hold
-the compiled pattern to be output. This does not include the size of the
-<b>pcre[16|32]</b> block; it is just the actual compiled data. If the pattern is
-successfully studied with the PCRE_STUDY_JIT_COMPILE option, the size of the
-JIT compiled code is also output.
-</P>
-<P>
-The <b>/Q</b> modifier is used to test the use of <b>pcre_stack_guard</b>. It
-must be followed by '0' or '1', specifying the return code to be given from an
-external function that is passed to PCRE and used for stack checking during
-compilation (see the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-documentation for details).
-</P>
-<P>
-The <b>/S</b> modifier causes <b>pcre[16|32]_study()</b> to be called after the
-expression has been compiled, and the results used when the expression is
-matched. There are a number of qualifying characters that may follow <b>/S</b>.
-They may appear in any order.
-</P>
-<P>
-If <b>/S</b> is followed by an exclamation mark, <b>pcre[16|32]_study()</b> is
-called with the PCRE_STUDY_EXTRA_NEEDED option, causing it always to return a
-<b>pcre_extra</b> block, even when studying discovers no useful information.
-</P>
-<P>
-If <b>/S</b> is followed by a second S character, it suppresses studying, even
-if it was requested externally by the <b>-s</b> command line option. This makes
-it possible to specify that certain patterns are always studied, and others are
-never studied, independently of <b>-s</b>. This feature is used in the test
-files in a few cases where the output is different when the pattern is studied.
-</P>
-<P>
-If the <b>/S</b> modifier is followed by a + character, the call to
-<b>pcre[16|32]_study()</b> is made with all the JIT study options, requesting
-just-in-time optimization support if it is available, for both normal and
-partial matching. If you want to restrict the JIT compiling modes, you can
-follow <b>/S+</b> with a digit in the range 1 to 7:
-<pre>
- 1 normal match only
- 2 soft partial match only
- 3 normal match and soft partial match
- 4 hard partial match only
- 6 soft and hard partial match
- 7 all three modes (default)
-</pre>
-If <b>/S++</b> is used instead of <b>/S+</b> (with or without a following digit),
-the text "(JIT)" is added to the first output line after a match or no match
-when JIT-compiled code was actually used.
-</P>
-<P>
-Note that there is also an independent <b>/+</b> modifier; it must not be given
-immediately after <b>/S</b> or <b>/S+</b> because this will be misinterpreted.
-</P>
-<P>
-If JIT studying is successful, the compiled JIT code will automatically be used
-when <b>pcre[16|32]_exec()</b> is run, except when incompatible run-time options
-are specified. For more details, see the
-<a href="pcrejit.html"><b>pcrejit</b></a>
-documentation. See also the <b>\J</b> escape sequence below for a way of
-setting the size of the JIT stack.
-</P>
-<P>
-Finally, if <b>/S</b> is followed by a minus character, JIT compilation is
-suppressed, even if it was requested externally by the <b>-s</b> command line
-option. This makes it possible to specify that JIT is never to be used for
-certain patterns.
-</P>
-<P>
-The <b>/T</b> modifier must be followed by a single digit. It causes a specific
-set of built-in character tables to be passed to <b>pcre[16|32]_compile()</b>. It
-is used in the standard PCRE tests to check behaviour with different character
-tables. The digit specifies the tables as follows:
-<pre>
- 0 the default ASCII tables, as distributed in
- pcre_chartables.c.dist
- 1 a set of tables defining ISO 8859 characters
-</pre>
-In table 1, some characters whose codes are greater than 128 are identified as
-letters, digits, spaces, etc.
-</P>
-<br><b>
-Using the POSIX wrapper API
-</b><br>
-<P>
-The <b>/P</b> modifier causes <b>pcretest</b> to call PCRE via the POSIX wrapper
-API rather than its native API. This supports only the 8-bit library. When
-<b>/P</b> is set, the following modifiers set options for the <b>regcomp()</b>
-function:
-<pre>
- /i REG_ICASE
- /m REG_NEWLINE
- /N REG_NOSUB
- /s REG_DOTALL )
- /U REG_UNGREEDY ) These options are not part of
- /W REG_UCP ) the POSIX standard
- /8 REG_UTF8 )
-</pre>
-The <b>/+</b> modifier works as described above. All other modifiers are
-ignored.
-</P>
-<br><b>
-Locking out certain modifiers
-</b><br>
-<P>
-PCRE can be compiled with or without support for certain features such as
-UTF-8/16/32 or Unicode properties. Accordingly, the standard tests are split up
-into a number of different files that are selected for running depending on
-which features are available. When updating the tests, it is all too easy to
-put a new test into the wrong file by mistake; for example, to put a test that
-requires UTF support into a file that is used when it is not available. To help
-detect such mistakes as early as possible, there is a facility for locking out
-specific modifiers. If an input line for <b>pcretest</b> starts with the string
-"&#60; forbid " the following sequence of characters is taken as a list of
-forbidden modifiers. For example, in the test files that must not use UTF or
-Unicode property support, this line appears:
-<pre>
- &#60; forbid 8W
-</pre>
-This locks out the /8 and /W modifiers. An immediate error is given if they are
-subsequently encountered. If the character string contains &#60; but not &#62;, all the
-multi-character modifiers that begin with &#60; are locked out. Otherwise, such
-modifiers must be explicitly listed, for example:
-<pre>
- &#60; forbid &#60;JS&#62;&#60;cr&#62;
-</pre>
-There must be a single space between &#60; and "forbid" for this feature to be
-recognised. If there is not, the line is interpreted either as a request to
-re-load a pre-compiled pattern (see "SAVING AND RELOADING COMPILED PATTERNS"
-below) or, if there is a another &#60; character, as a pattern that uses &#60; as its
-delimiter.
-</P>
-<br><a name="SEC7" href="#TOC1">DATA LINES</a><br>
-<P>
-Before each data line is passed to <b>pcre[16|32]_exec()</b>, leading and trailing
-white space is removed, and it is then scanned for \ escapes. Some of these
-are pretty esoteric features, intended for checking out some of the more
-complicated features of PCRE. If you are just testing "ordinary" regular
-expressions, you probably don't need any of these. The following escapes are
-recognized:
-<pre>
- \a alarm (BEL, \x07)
- \b backspace (\x08)
- \e escape (\x27)
- \f form feed (\x0c)
- \n newline (\x0a)
- \qdd set the PCRE_MATCH_LIMIT limit to dd (any number of digits)
- \r carriage return (\x0d)
- \t tab (\x09)
- \v vertical tab (\x0b)
- \nnn octal character (up to 3 octal digits); always
- a byte unless &#62; 255 in UTF-8 or 16-bit or 32-bit mode
- \o{dd...} octal character (any number of octal digits}
- \xhh hexadecimal byte (up to 2 hex digits)
- \x{hh...} hexadecimal character (any number of hex digits)
- \A pass the PCRE_ANCHORED option to <b>pcre[16|32]_exec()</b> or <b>pcre[16|32]_dfa_exec()</b>
- \B pass the PCRE_NOTBOL option to <b>pcre[16|32]_exec()</b> or <b>pcre[16|32]_dfa_exec()</b>
- \Cdd call pcre[16|32]_copy_substring() for substring dd after a successful match (number less than 32)
- \Cname call pcre[16|32]_copy_named_substring() for substring "name" after a successful match (name termin-
- ated by next non alphanumeric character)
- \C+ show the current captured substrings at callout time
- \C- do not supply a callout function
- \C!n return 1 instead of 0 when callout number n is reached
- \C!n!m return 1 instead of 0 when callout number n is reached for the nth time
- \C*n pass the number n (may be negative) as callout data; this is used as the callout return value
- \D use the <b>pcre[16|32]_dfa_exec()</b> match function
- \F only shortest match for <b>pcre[16|32]_dfa_exec()</b>
- \Gdd call pcre[16|32]_get_substring() for substring dd after a successful match (number less than 32)
- \Gname call pcre[16|32]_get_named_substring() for substring "name" after a successful match (name termin-
- ated by next non-alphanumeric character)
- \Jdd set up a JIT stack of dd kilobytes maximum (any number of digits)
- \L call pcre[16|32]_get_substringlist() after a successful match
- \M discover the minimum MATCH_LIMIT and MATCH_LIMIT_RECURSION settings
- \N pass the PCRE_NOTEMPTY option to <b>pcre[16|32]_exec()</b> or <b>pcre[16|32]_dfa_exec()</b>; if used twice, pass the
- PCRE_NOTEMPTY_ATSTART option
- \Odd set the size of the output vector passed to <b>pcre[16|32]_exec()</b> to dd (any number of digits)
- \P pass the PCRE_PARTIAL_SOFT option to <b>pcre[16|32]_exec()</b> or <b>pcre[16|32]_dfa_exec()</b>; if used twice, pass the
- PCRE_PARTIAL_HARD option
- \Qdd set the PCRE_MATCH_LIMIT_RECURSION limit to dd (any number of digits)
- \R pass the PCRE_DFA_RESTART option to <b>pcre[16|32]_dfa_exec()</b>
- \S output details of memory get/free calls during matching
- \Y pass the PCRE_NO_START_OPTIMIZE option to <b>pcre[16|32]_exec()</b> or <b>pcre[16|32]_dfa_exec()</b>
- \Z pass the PCRE_NOTEOL option to <b>pcre[16|32]_exec()</b> or <b>pcre[16|32]_dfa_exec()</b>
- \? pass the PCRE_NO_UTF[8|16|32]_CHECK option to <b>pcre[16|32]_exec()</b> or <b>pcre[16|32]_dfa_exec()</b>
- \&#62;dd start the match at offset dd (optional "-"; then any number of digits); this sets the <i>startoffset</i>
- argument for <b>pcre[16|32]_exec()</b> or <b>pcre[16|32]_dfa_exec()</b>
- \&#60;cr&#62; pass the PCRE_NEWLINE_CR option to <b>pcre[16|32]_exec()</b> or <b>pcre[16|32]_dfa_exec()</b>
- \&#60;lf&#62; pass the PCRE_NEWLINE_LF option to <b>pcre[16|32]_exec()</b> or <b>pcre[16|32]_dfa_exec()</b>
- \&#60;crlf&#62; pass the PCRE_NEWLINE_CRLF option to <b>pcre[16|32]_exec()</b> or <b>pcre[16|32]_dfa_exec()</b>
- \&#60;anycrlf&#62; pass the PCRE_NEWLINE_ANYCRLF option to <b>pcre[16|32]_exec()</b> or <b>pcre[16|32]_dfa_exec()</b>
- \&#60;any&#62; pass the PCRE_NEWLINE_ANY option to <b>pcre[16|32]_exec()</b> or <b>pcre[16|32]_dfa_exec()</b>
-</pre>
-The use of \x{hh...} is not dependent on the use of the <b>/8</b> modifier on
-the pattern. It is recognized always. There may be any number of hexadecimal
-digits inside the braces; invalid values provoke error messages.
-</P>
-<P>
-Note that \xhh specifies one byte rather than one character in UTF-8 mode;
-this makes it possible to construct invalid UTF-8 sequences for testing
-purposes. On the other hand, \x{hh} is interpreted as a UTF-8 character in
-UTF-8 mode, generating more than one byte if the value is greater than 127.
-When testing the 8-bit library not in UTF-8 mode, \x{hh} generates one byte
-for values less than 256, and causes an error for greater values.
-</P>
-<P>
-In UTF-16 mode, all 4-digit \x{hhhh} values are accepted. This makes it
-possible to construct invalid UTF-16 sequences for testing purposes.
-</P>
-<P>
-In UTF-32 mode, all 4- to 8-digit \x{...} values are accepted. This makes it
-possible to construct invalid UTF-32 sequences for testing purposes.
-</P>
-<P>
-The escapes that specify line ending sequences are literal strings, exactly as
-shown. No more than one newline setting should be present in any data line.
-</P>
-<P>
-A backslash followed by anything else just escapes the anything else. If
-the very last character is a backslash, it is ignored. This gives a way of
-passing an empty line as data, since a real empty line terminates the data
-input.
-</P>
-<P>
-The <b>\J</b> escape provides a way of setting the maximum stack size that is
-used by the just-in-time optimization code. It is ignored if JIT optimization
-is not being used. Providing a stack that is larger than the default 32K is
-necessary only for very complicated patterns.
-</P>
-<P>
-If \M is present, <b>pcretest</b> calls <b>pcre[16|32]_exec()</b> several times,
-with different values in the <i>match_limit</i> and <i>match_limit_recursion</i>
-fields of the <b>pcre[16|32]_extra</b> data structure, until it finds the minimum
-numbers for each parameter that allow <b>pcre[16|32]_exec()</b> to complete without
-error. Because this is testing a specific feature of the normal interpretive
-<b>pcre[16|32]_exec()</b> execution, the use of any JIT optimization that might
-have been set up by the <b>/S+</b> qualifier of <b>-s+</b> option is disabled.
-</P>
-<P>
-The <i>match_limit</i> number is a measure of the amount of backtracking
-that takes place, and checking it out can be instructive. For most simple
-matches, the number is quite small, but for patterns with very large numbers of
-matching possibilities, it can become large very quickly with increasing length
-of subject string. The <i>match_limit_recursion</i> number is a measure of how
-much stack (or, if PCRE is compiled with NO_RECURSE, how much heap) memory is
-needed to complete the match attempt.
-</P>
-<P>
-When \O is used, the value specified may be higher or lower than the size set
-by the <b>-O</b> command line option (or defaulted to 45); \O applies only to
-the call of <b>pcre[16|32]_exec()</b> for the line in which it appears.
-</P>
-<P>
-If the <b>/P</b> modifier was present on the pattern, causing the POSIX wrapper
-API to be used, the only option-setting sequences that have any effect are \B,
-\N, and \Z, causing REG_NOTBOL, REG_NOTEMPTY, and REG_NOTEOL, respectively,
-to be passed to <b>regexec()</b>.
-</P>
-<br><a name="SEC8" href="#TOC1">THE ALTERNATIVE MATCHING FUNCTION</a><br>
-<P>
-By default, <b>pcretest</b> uses the standard PCRE matching function,
-<b>pcre[16|32]_exec()</b> to match each data line. PCRE also supports an
-alternative matching function, <b>pcre[16|32]_dfa_test()</b>, which operates in a
-different way, and has some restrictions. The differences between the two
-functions are described in the
-<a href="pcrematching.html"><b>pcrematching</b></a>
-documentation.
-</P>
-<P>
-If a data line contains the \D escape sequence, or if the command line
-contains the <b>-dfa</b> option, the alternative matching function is used.
-This function finds all possible matches at a given point. If, however, the \F
-escape sequence is present in the data line, it stops after the first match is
-found. This is always the shortest possible match.
-</P>
-<br><a name="SEC9" href="#TOC1">DEFAULT OUTPUT FROM PCRETEST</a><br>
-<P>
-This section describes the output when the normal matching function,
-<b>pcre[16|32]_exec()</b>, is being used.
-</P>
-<P>
-When a match succeeds, <b>pcretest</b> outputs the list of captured substrings
-that <b>pcre[16|32]_exec()</b> returns, starting with number 0 for the string that
-matched the whole pattern. Otherwise, it outputs "No match" when the return is
-PCRE_ERROR_NOMATCH, and "Partial match:" followed by the partially matching
-substring when <b>pcre[16|32]_exec()</b> returns PCRE_ERROR_PARTIAL. (Note that
-this is the entire substring that was inspected during the partial match; it
-may include characters before the actual match start if a lookbehind assertion,
-\K, \b, or \B was involved.) For any other return, <b>pcretest</b> outputs
-the PCRE negative error number and a short descriptive phrase. If the error is
-a failed UTF string check, the offset of the start of the failing character and
-the reason code are also output, provided that the size of the output vector is
-at least two. Here is an example of an interactive <b>pcretest</b> run.
-<pre>
- $ pcretest
- PCRE version 8.13 2011-04-30
-
- re&#62; /^abc(\d+)/
- data&#62; abc123
- 0: abc123
- 1: 123
- data&#62; xyz
- No match
-</pre>
-Unset capturing substrings that are not followed by one that is set are not
-returned by <b>pcre[16|32]_exec()</b>, and are not shown by <b>pcretest</b>. In the
-following example, there are two capturing substrings, but when the first data
-line is matched, the second, unset substring is not shown. An "internal" unset
-substring is shown as "&#60;unset&#62;", as for the second data line.
-<pre>
- re&#62; /(a)|(b)/
- data&#62; a
- 0: a
- 1: a
- data&#62; b
- 0: b
- 1: &#60;unset&#62;
- 2: b
-</pre>
-If the strings contain any non-printing characters, they are output as \xhh
-escapes if the value is less than 256 and UTF mode is not set. Otherwise they
-are output as \x{hh...} escapes. See below for the definition of non-printing
-characters. If the pattern has the <b>/+</b> modifier, the output for substring
-0 is followed by the the rest of the subject string, identified by "0+" like
-this:
-<pre>
- re&#62; /cat/+
- data&#62; cataract
- 0: cat
- 0+ aract
-</pre>
-If the pattern has the <b>/g</b> or <b>/G</b> modifier, the results of successive
-matching attempts are output in sequence, like this:
-<pre>
- re&#62; /\Bi(\w\w)/g
- data&#62; Mississippi
- 0: iss
- 1: ss
- 0: iss
- 1: ss
- 0: ipp
- 1: pp
-</pre>
-"No match" is output only if the first match attempt fails. Here is an example
-of a failure message (the offset 4 that is specified by \&#62;4 is past the end of
-the subject string):
-<pre>
- re&#62; /xyz/
- data&#62; xyz\&#62;4
- Error -24 (bad offset value)
-</PRE>
-</P>
-<P>
-If any of the sequences <b>\C</b>, <b>\G</b>, or <b>\L</b> are present in a
-data line that is successfully matched, the substrings extracted by the
-convenience functions are output with C, G, or L after the string number
-instead of a colon. This is in addition to the normal full list. The string
-length (that is, the return from the extraction function) is given in
-parentheses after each string for <b>\C</b> and <b>\G</b>.
-</P>
-<P>
-Note that whereas patterns can be continued over several lines (a plain "&#62;"
-prompt is used for continuations), data lines may not. However newlines can be
-included in data by means of the \n escape (or \r, \r\n, etc., depending on
-the newline sequence setting).
-</P>
-<br><a name="SEC10" href="#TOC1">OUTPUT FROM THE ALTERNATIVE MATCHING FUNCTION</a><br>
-<P>
-When the alternative matching function, <b>pcre[16|32]_dfa_exec()</b>, is used (by
-means of the \D escape sequence or the <b>-dfa</b> command line option), the
-output consists of a list of all the matches that start at the first point in
-the subject where there is at least one match. For example:
-<pre>
- re&#62; /(tang|tangerine|tan)/
- data&#62; yellow tangerine\D
- 0: tangerine
- 1: tang
- 2: tan
-</pre>
-(Using the normal matching function on this data finds only "tang".) The
-longest matching string is always given first (and numbered zero). After a
-PCRE_ERROR_PARTIAL return, the output is "Partial match:", followed by the
-partially matching substring. (Note that this is the entire substring that was
-inspected during the partial match; it may include characters before the actual
-match start if a lookbehind assertion, \K, \b, or \B was involved.)
-</P>
-<P>
-If <b>/g</b> is present on the pattern, the search for further matches resumes
-at the end of the longest match. For example:
-<pre>
- re&#62; /(tang|tangerine|tan)/g
- data&#62; yellow tangerine and tangy sultana\D
- 0: tangerine
- 1: tang
- 2: tan
- 0: tang
- 1: tan
- 0: tan
-</pre>
-Since the matching function does not support substring capture, the escape
-sequences that are concerned with captured substrings are not relevant.
-</P>
-<br><a name="SEC11" href="#TOC1">RESTARTING AFTER A PARTIAL MATCH</a><br>
-<P>
-When the alternative matching function has given the PCRE_ERROR_PARTIAL return,
-indicating that the subject partially matched the pattern, you can restart the
-match with additional subject data by means of the \R escape sequence. For
-example:
-<pre>
- re&#62; /^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$/
- data&#62; 23ja\P\D
- Partial match: 23ja
- data&#62; n05\R\D
- 0: n05
-</pre>
-For further information about partial matching, see the
-<a href="pcrepartial.html"><b>pcrepartial</b></a>
-documentation.
-</P>
-<br><a name="SEC12" href="#TOC1">CALLOUTS</a><br>
-<P>
-If the pattern contains any callout requests, <b>pcretest</b>'s callout function
-is called during matching. This works with both matching functions. By default,
-the called function displays the callout number, the start and current
-positions in the text at the callout time, and the next pattern item to be
-tested. For example:
-<pre>
- ---&#62;pqrabcdef
- 0 ^ ^ \d
-</pre>
-This output indicates that callout number 0 occurred for a match attempt
-starting at the fourth character of the subject string, when the pointer was at
-the seventh character of the data, and when the next pattern item was \d. Just
-one circumflex is output if the start and current positions are the same.
-</P>
-<P>
-Callouts numbered 255 are assumed to be automatic callouts, inserted as a
-result of the <b>/C</b> pattern modifier. In this case, instead of showing the
-callout number, the offset in the pattern, preceded by a plus, is output. For
-example:
-<pre>
- re&#62; /\d?[A-E]\*/C
- data&#62; E*
- ---&#62;E*
- +0 ^ \d?
- +3 ^ [A-E]
- +8 ^^ \*
- +10 ^ ^
- 0: E*
-</pre>
-If a pattern contains (*MARK) items, an additional line is output whenever
-a change of latest mark is passed to the callout function. For example:
-<pre>
- re&#62; /a(*MARK:X)bc/C
- data&#62; abc
- ---&#62;abc
- +0 ^ a
- +1 ^^ (*MARK:X)
- +10 ^^ b
- Latest Mark: X
- +11 ^ ^ c
- +12 ^ ^
- 0: abc
-</pre>
-The mark changes between matching "a" and "b", but stays the same for the rest
-of the match, so nothing more is output. If, as a result of backtracking, the
-mark reverts to being unset, the text "&#60;unset&#62;" is output.
-</P>
-<P>
-The callout function in <b>pcretest</b> returns zero (carry on matching) by
-default, but you can use a \C item in a data line (as described above) to
-change this and other parameters of the callout.
-</P>
-<P>
-Inserting callouts can be helpful when using <b>pcretest</b> to check
-complicated regular expressions. For further information about callouts, see
-the
-<a href="pcrecallout.html"><b>pcrecallout</b></a>
-documentation.
-</P>
-<br><a name="SEC13" href="#TOC1">NON-PRINTING CHARACTERS</a><br>
-<P>
-When <b>pcretest</b> is outputting text in the compiled version of a pattern,
-bytes other than 32-126 are always treated as non-printing characters are are
-therefore shown as hex escapes.
-</P>
-<P>
-When <b>pcretest</b> is outputting text that is a matched part of a subject
-string, it behaves in the same way, unless a different locale has been set for
-the pattern (using the <b>/L</b> modifier). In this case, the <b>isprint()</b>
-function to distinguish printing and non-printing characters.
-</P>
-<br><a name="SEC14" href="#TOC1">SAVING AND RELOADING COMPILED PATTERNS</a><br>
-<P>
-The facilities described in this section are not available when the POSIX
-interface to PCRE is being used, that is, when the <b>/P</b> pattern modifier is
-specified.
-</P>
-<P>
-When the POSIX interface is not in use, you can cause <b>pcretest</b> to write a
-compiled pattern to a file, by following the modifiers with &#62; and a file name.
-For example:
-<pre>
- /pattern/im &#62;/some/file
-</pre>
-See the
-<a href="pcreprecompile.html"><b>pcreprecompile</b></a>
-documentation for a discussion about saving and re-using compiled patterns.
-Note that if the pattern was successfully studied with JIT optimization, the
-JIT data cannot be saved.
-</P>
-<P>
-The data that is written is binary. The first eight bytes are the length of the
-compiled pattern data followed by the length of the optional study data, each
-written as four bytes in big-endian order (most significant byte first). If
-there is no study data (either the pattern was not studied, or studying did not
-return any data), the second length is zero. The lengths are followed by an
-exact copy of the compiled pattern. If there is additional study data, this
-(excluding any JIT data) follows immediately after the compiled pattern. After
-writing the file, <b>pcretest</b> expects to read a new pattern.
-</P>
-<P>
-A saved pattern can be reloaded into <b>pcretest</b> by specifying &#60; and a file
-name instead of a pattern. There must be no space between &#60; and the file name,
-which must not contain a &#60; character, as otherwise <b>pcretest</b> will
-interpret the line as a pattern delimited by &#60; characters. For example:
-<pre>
- re&#62; &#60;/some/file
- Compiled pattern loaded from /some/file
- No study data
-</pre>
-If the pattern was previously studied with the JIT optimization, the JIT
-information cannot be saved and restored, and so is lost. When the pattern has
-been loaded, <b>pcretest</b> proceeds to read data lines in the usual way.
-</P>
-<P>
-You can copy a file written by <b>pcretest</b> to a different host and reload it
-there, even if the new host has opposite endianness to the one on which the
-pattern was compiled. For example, you can compile on an i86 machine and run on
-a SPARC machine. When a pattern is reloaded on a host with different
-endianness, the confirmation message is changed to:
-<pre>
- Compiled pattern (byte-inverted) loaded from /some/file
-</pre>
-The test suite contains some saved pre-compiled patterns with different
-endianness. These are reloaded using "&#60;!" instead of just "&#60;". This suppresses
-the "(byte-inverted)" text so that the output is the same on all hosts. It also
-forces debugging output once the pattern has been reloaded.
-</P>
-<P>
-File names for saving and reloading can be absolute or relative, but note that
-the shell facility of expanding a file name that starts with a tilde (~) is not
-available.
-</P>
-<P>
-The ability to save and reload files in <b>pcretest</b> is intended for testing
-and experimentation. It is not intended for production use because only a
-single pattern can be written to a file. Furthermore, there is no facility for
-supplying custom character tables for use with a reloaded pattern. If the
-original pattern was compiled with custom tables, an attempt to match a subject
-string using a reloaded pattern is likely to cause <b>pcretest</b> to crash.
-Finally, if you attempt to load a file that is not in the correct format, the
-result is undefined.
-</P>
-<br><a name="SEC15" href="#TOC1">SEE ALSO</a><br>
-<P>
-<b>pcre</b>(3), <b>pcre16</b>(3), <b>pcre32</b>(3), <b>pcreapi</b>(3),
-<b>pcrecallout</b>(3),
-<b>pcrejit</b>, <b>pcrematching</b>(3), <b>pcrepartial</b>(d),
-<b>pcrepattern</b>(3), <b>pcreprecompile</b>(3).
-</P>
-<br><a name="SEC16" href="#TOC1">AUTHOR</a><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><a name="SEC17" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 23 February 2017
-<br>
-Copyright &copy; 1997-2017 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/html/pcreunicode.html b/libs/Pcre16/docs/doc/html/pcreunicode.html
deleted file mode 100644
index ab36bc61e3..0000000000
--- a/libs/Pcre16/docs/doc/html/pcreunicode.html
+++ /dev/null
@@ -1,262 +0,0 @@
-<html>
-<head>
-<title>pcreunicode specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcreunicode man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-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.
-<br>
-<br><b>
-UTF-8, UTF-16, UTF-32, AND UNICODE PROPERTY SUPPORT
-</b><br>
-<P>
-As well as UTF-8 support, PCRE also supports UTF-16 (from release 8.30) and
-UTF-32 (from release 8.32), by means of two additional libraries. They can be
-built as well as, or instead of, the 8-bit library.
-</P>
-<br><b>
-UTF-8 SUPPORT
-</b><br>
-<P>
-In order process UTF-8 strings, you must build PCRE's 8-bit library with UTF
-support, and, in addition, you must call
-<a href="pcre_compile.html"><b>pcre_compile()</b></a>
-with the PCRE_UTF8 option flag, or the pattern must start with the sequence
-(*UTF8) or (*UTF). When either of these is the case, both the pattern and any
-subject strings that are matched against it are treated as UTF-8 strings
-instead of strings of individual 1-byte characters.
-</P>
-<br><b>
-UTF-16 AND UTF-32 SUPPORT
-</b><br>
-<P>
-In order process UTF-16 or UTF-32 strings, you must build PCRE's 16-bit or
-32-bit library with UTF support, and, in addition, you must call
-<a href="pcre16_compile.html"><b>pcre16_compile()</b></a>
-or
-<a href="pcre32_compile.html"><b>pcre32_compile()</b></a>
-with the PCRE_UTF16 or PCRE_UTF32 option flag, as appropriate. Alternatively,
-the pattern must start with the sequence (*UTF16), (*UTF32), as appropriate, or
-(*UTF), which can be used with either library. When UTF mode is set, both the
-pattern and any subject strings that are matched against it are treated as
-UTF-16 or UTF-32 strings instead of strings of individual 16-bit or 32-bit
-characters.
-</P>
-<br><b>
-UTF SUPPORT OVERHEAD
-</b><br>
-<P>
-If you compile PCRE with UTF 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_UTF[8|16|32] flag occasionally, so should not be very big.
-</P>
-<br><b>
-UNICODE PROPERTY SUPPORT
-</b><br>
-<P>
-If PCRE is built with Unicode character property support (which implies UTF
-support), the escape sequences \p{..}, \P{..}, and \X can be used.
-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, the Unicode script names such as Arabic or Han, and the derived
-properties Any and L&. Full lists is given in the
-<a href="pcrepattern.html"><b>pcrepattern</b></a>
-and
-<a href="pcresyntax.html"><b>pcresyntax</b></a>
-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.
-<a name="utf8strings"></a></P>
-<br><b>
-Validity of UTF-8 strings
-</b><br>
-<P>
-When you set the PCRE_UTF8 flag, the byte strings passed as patterns and
-subjects are (by default) checked for validity on entry to the relevant
-functions. The entire string is checked before any other processing takes
-place. 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 the surrogate area. (From release 8.33 the so-called
-"non-character" code points are no longer excluded because Unicode corrigendum
-#9 makes it clear that they should not be.)
-</P>
-<P>
-Characters in the "Surrogate Area" of Unicode are reserved for use by UTF-16,
-where they are used in pairs to encode codepoints with values greater than
-0xFFFF. The code points that are encoded by UTF-16 pairs are available
-independently in the UTF-8 and UTF-32 encodings. (In other words, the whole
-surrogate thing is a fudge for UTF-16 which unfortunately messes up UTF-8 and
-UTF-32.)
-</P>
-<P>
-If an invalid UTF-8 string is passed to PCRE, an error return is given. At
-compile time, the only additional information is the offset to the first byte
-of the failing character. The run-time functions <b>pcre_exec()</b> and
-<b>pcre_dfa_exec()</b> also pass back this information, as well as a more
-detailed reason code if the caller has provided memory in which to do this.
-</P>
-<P>
-In some situations, you may already know that your strings are valid, and
-therefore want to skip these checks in order to improve performance, for
-example in the case of a long subject string that is being scanned repeatedly.
-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.
-</P>
-<P>
-Note that passing PCRE_NO_UTF8_CHECK to <b>pcre_compile()</b> just disables the
-check for the pattern; it does not also apply to subject strings. If you want
-to disable the check for a subject string you must pass this option to
-<b>pcre_exec()</b> or <b>pcre_dfa_exec()</b>.
-</P>
-<P>
-If you pass an invalid UTF-8 string when PCRE_NO_UTF8_CHECK is set, the result
-is undefined and your program may crash.
-<a name="utf16strings"></a></P>
-<br><b>
-Validity of UTF-16 strings
-</b><br>
-<P>
-When you set the PCRE_UTF16 flag, the strings of 16-bit data units that are
-passed as patterns and subjects are (by default) checked for validity on entry
-to the relevant functions. Values other than those in the surrogate range
-U+D800 to U+DFFF are independent code points. Values in the surrogate range
-must be used in pairs in the correct manner.
-</P>
-<P>
-If an invalid UTF-16 string is passed to PCRE, an error return is given. At
-compile time, the only additional information is the offset to the first data
-unit of the failing character. The run-time functions <b>pcre16_exec()</b> and
-<b>pcre16_dfa_exec()</b> also pass back this information, as well as a more
-detailed reason code if the caller has provided memory in which to do this.
-</P>
-<P>
-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_UTF16_CHECK flag at compile time or at run time, PCRE assumes that
-the pattern or subject it is given (respectively) contains only valid UTF-16
-sequences. In this case, it does not diagnose an invalid UTF-16 string.
-However, if an invalid string is passed, the result is undefined.
-<a name="utf32strings"></a></P>
-<br><b>
-Validity of UTF-32 strings
-</b><br>
-<P>
-When you set the PCRE_UTF32 flag, the strings of 32-bit data units that are
-passed as patterns and subjects are (by default) checked for validity on entry
-to the relevant functions. This check allows only values in the range U+0
-to U+10FFFF, excluding the surrogate area U+D800 to U+DFFF.
-</P>
-<P>
-If an invalid UTF-32 string is passed to PCRE, an error return is given. At
-compile time, the only additional information is the offset to the first data
-unit of the failing character. The run-time functions <b>pcre32_exec()</b> and
-<b>pcre32_dfa_exec()</b> also pass back this information, as well as a more
-detailed reason code if the caller has provided memory in which to do this.
-</P>
-<P>
-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_UTF32_CHECK flag at compile time or at run time, PCRE assumes that
-the pattern or subject it is given (respectively) contains only valid UTF-32
-sequences. In this case, it does not diagnose an invalid UTF-32 string.
-However, if an invalid string is passed, the result is undefined.
-</P>
-<br><b>
-General comments about UTF modes
-</b><br>
-<P>
-1. Codepoints less than 256 can be specified in patterns by either braced or
-unbraced hexadecimal escape sequences (for example, \x{b3} or \xb3). Larger
-values have to use braced sequences.
-</P>
-<P>
-2. Octal numbers up to \777 are recognized, and in UTF-8 mode they match
-two-byte characters for values greater than \177.
-</P>
-<P>
-3. Repeat quantifiers apply to complete UTF characters, not to individual
-data units, for example: \x{100}{3}.
-</P>
-<P>
-4. The dot metacharacter matches one UTF character instead of a single data
-unit.
-</P>
-<P>
-5. The escape sequence \C can be used to match a single byte in UTF-8 mode, or
-a single 16-bit data unit in UTF-16 mode, or a single 32-bit data unit in
-UTF-32 mode, but its use can lead to some strange effects because it breaks up
-multi-unit characters (see the description of \C in the
-<a href="pcrepattern.html"><b>pcrepattern</b></a>
-documentation). The use of \C is not supported in the alternative matching
-function <b>pcre[16|32]_dfa_exec()</b>, nor is it supported in UTF mode by the
-JIT optimization of <b>pcre[16|32]_exec()</b>. If JIT optimization is requested
-for a UTF pattern that contains \C, it will not succeed, and so the matching
-will be carried out by the normal interpretive function.
-</P>
-<P>
-6. The character escapes \b, \B, \d, \D, \s, \S, \w, and \W correctly
-test characters of any code value, but, by default, the characters that PCRE
-recognizes as digits, spaces, or word characters remain the same set as in
-non-UTF mode, all with values less than 256. This remains true even when PCRE
-is built to include Unicode property support, because to do otherwise would
-slow down PCRE in many common cases. Note in particular that this applies to
-\b and \B, because they are defined in terms of \w and \W. If you really
-want to test for a wider sense of, say, "digit", you can use explicit Unicode
-property tests such as \p{Nd}. Alternatively, if you set the PCRE_UCP option,
-the way that the character escapes work is changed so that Unicode properties
-are used to determine which characters match. There are more details in the
-section on
-<a href="pcrepattern.html#genericchartypes">generic character types</a>
-in the
-<a href="pcrepattern.html"><b>pcrepattern</b></a>
-documentation.
-</P>
-<P>
-7. Similarly, characters that match the POSIX named character classes are all
-low-valued characters, unless the PCRE_UCP option is set.
-</P>
-<P>
-8. However, the horizontal and vertical white space matching escapes (\h, \H,
-\v, and \V) do match all the appropriate Unicode characters, whether or not
-PCRE_UCP is set.
-</P>
-<P>
-9. Case-insensitive matching applies only to characters whose values are less
-than 128, unless PCRE is built with Unicode property support. A few Unicode
-characters such as Greek sigma have more than two codepoints that are
-case-equivalent. Up to and including PCRE release 8.31, only one-to-one case
-mappings were supported, but later releases (with Unicode property support) do
-treat as case-equivalent all versions of characters such as Greek sigma.
-</P>
-<br><b>
-AUTHOR
-</b><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><b>
-REVISION
-</b><br>
-<P>
-Last updated: 27 February 2013
-<br>
-Copyright &copy; 1997-2013 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/libs/Pcre16/docs/doc/index.html.src b/libs/Pcre16/docs/doc/index.html.src
deleted file mode 100644
index 887f4d7507..0000000000
--- a/libs/Pcre16/docs/doc/index.html.src
+++ /dev/null
@@ -1,185 +0,0 @@
-<html>
-<!-- This is a manually maintained file that is the root of the HTML version of
- the PCRE documentation. When the HTML documents are built from the man
- page versions, the entire doc/html directory is emptied, this file is then
- copied into doc/html/index.html, and the remaining files therein are
- created by the 132html script.
--->
-<head>
-<title>PCRE specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>Perl-compatible Regular Expressions (PCRE)</h1>
-<p>
-The HTML documentation for PCRE consists of a number of pages that are listed
-below in alphabetical order. If you are new to PCRE, please read the first one
-first.
-</p>
-
-<table>
-<tr><td><a href="pcre.html">pcre</a></td>
- <td>&nbsp;&nbsp;Introductory page</td></tr>
-
-<tr><td><a href="pcre-config.html">pcre-config</a></td>
- <td>&nbsp;&nbsp;Information about the installation configuration</td></tr>
-
-<tr><td><a href="pcre16.html">pcre16</a></td>
- <td>&nbsp;&nbsp;Discussion of the 16-bit PCRE library</td></tr>
-
-<tr><td><a href="pcre32.html">pcre32</a></td>
- <td>&nbsp;&nbsp;Discussion of the 32-bit PCRE library</td></tr>
-
-<tr><td><a href="pcreapi.html">pcreapi</a></td>
- <td>&nbsp;&nbsp;PCRE's native API</td></tr>
-
-<tr><td><a href="pcrebuild.html">pcrebuild</a></td>
- <td>&nbsp;&nbsp;Building PCRE</td></tr>
-
-<tr><td><a href="pcrecallout.html">pcrecallout</a></td>
- <td>&nbsp;&nbsp;The <i>callout</i> facility</td></tr>
-
-<tr><td><a href="pcrecompat.html">pcrecompat</a></td>
- <td>&nbsp;&nbsp;Compability with Perl</td></tr>
-
-<tr><td><a href="pcrecpp.html">pcrecpp</a></td>
- <td>&nbsp;&nbsp;The C++ wrapper for the PCRE library</td></tr>
-
-<tr><td><a href="pcredemo.html">pcredemo</a></td>
- <td>&nbsp;&nbsp;A demonstration C program that uses the PCRE library</td></tr>
-
-<tr><td><a href="pcregrep.html">pcregrep</a></td>
- <td>&nbsp;&nbsp;The <b>pcregrep</b> command</td></tr>
-
-<tr><td><a href="pcrejit.html">pcrejit</a></td>
- <td>&nbsp;&nbsp;Discussion of the just-in-time optimization support</td></tr>
-
-<tr><td><a href="pcrelimits.html">pcrelimits</a></td>
- <td>&nbsp;&nbsp;Details of size and other limits</td></tr>
-
-<tr><td><a href="pcrematching.html">pcrematching</a></td>
- <td>&nbsp;&nbsp;Discussion of the two matching algorithms</td></tr>
-
-<tr><td><a href="pcrepartial.html">pcrepartial</a></td>
- <td>&nbsp;&nbsp;Using PCRE for partial matching</td></tr>
-
-<tr><td><a href="pcrepattern.html">pcrepattern</a></td>
- <td>&nbsp;&nbsp;Specification of the regular expressions supported by PCRE</td></tr>
-
-<tr><td><a href="pcreperform.html">pcreperform</a></td>
- <td>&nbsp;&nbsp;Some comments on performance</td></tr>
-
-<tr><td><a href="pcreposix.html">pcreposix</a></td>
- <td>&nbsp;&nbsp;The POSIX API to the PCRE 8-bit library</td></tr>
-
-<tr><td><a href="pcreprecompile.html">pcreprecompile</a></td>
- <td>&nbsp;&nbsp;How to save and re-use compiled patterns</td></tr>
-
-<tr><td><a href="pcresample.html">pcresample</a></td>
- <td>&nbsp;&nbsp;Discussion of the pcredemo program</td></tr>
-
-<tr><td><a href="pcrestack.html">pcrestack</a></td>
- <td>&nbsp;&nbsp;Discussion of PCRE's stack usage</td></tr>
-
-<tr><td><a href="pcresyntax.html">pcresyntax</a></td>
- <td>&nbsp;&nbsp;Syntax quick-reference summary</td></tr>
-
-<tr><td><a href="pcretest.html">pcretest</a></td>
- <td>&nbsp;&nbsp;The <b>pcretest</b> command for testing PCRE</td></tr>
-
-<tr><td><a href="pcreunicode.html">pcreunicode</a></td>
- <td>&nbsp;&nbsp;Discussion of Unicode and UTF-8/UTF-16/UTF-32 support</td></tr>
-</table>
-
-<p>
-There are also individual pages that summarize the interface for each function
-in the library. There is a single page for each triple of 8-bit/16-bit/32-bit
-functions.
-</p>
-
-<table>
-
-<tr><td><a href="pcre_assign_jit_stack.html">pcre_assign_jit_stack</a></td>
- <td>&nbsp;&nbsp;Assign stack for JIT matching</td></tr>
-
-<tr><td><a href="pcre_compile.html">pcre_compile</a></td>
- <td>&nbsp;&nbsp;Compile a regular expression</td></tr>
-
-<tr><td><a href="pcre_compile2.html">pcre_compile2</a></td>
- <td>&nbsp;&nbsp;Compile a regular expression (alternate interface)</td></tr>
-
-<tr><td><a href="pcre_config.html">pcre_config</a></td>
- <td>&nbsp;&nbsp;Show build-time configuration options</td></tr>
-
-<tr><td><a href="pcre_copy_named_substring.html">pcre_copy_named_substring</a></td>
- <td>&nbsp;&nbsp;Extract named substring into given buffer</td></tr>
-
-<tr><td><a href="pcre_copy_substring.html">pcre_copy_substring</a></td>
- <td>&nbsp;&nbsp;Extract numbered substring into given buffer</td></tr>
-
-<tr><td><a href="pcre_dfa_exec.html">pcre_dfa_exec</a></td>
- <td>&nbsp;&nbsp;Match a compiled pattern to a subject string
- (DFA algorithm; <i>not</i> Perl compatible)</td></tr>
-
-<tr><td><a href="pcre_exec.html">pcre_exec</a></td>
- <td>&nbsp;&nbsp;Match a compiled pattern to a subject string
- (Perl compatible)</td></tr>
-
-<tr><td><a href="pcre_free_study.html">pcre_free_study</a></td>
- <td>&nbsp;&nbsp;Free study data</td></tr>
-
-<tr><td><a href="pcre_free_substring.html">pcre_free_substring</a></td>
- <td>&nbsp;&nbsp;Free extracted substring</td></tr>
-
-<tr><td><a href="pcre_free_substring_list.html">pcre_free_substring_list</a></td>
- <td>&nbsp;&nbsp;Free list of extracted substrings</td></tr>
-
-<tr><td><a href="pcre_fullinfo.html">pcre_fullinfo</a></td>
- <td>&nbsp;&nbsp;Extract information about a pattern</td></tr>
-
-<tr><td><a href="pcre_get_named_substring.html">pcre_get_named_substring</a></td>
- <td>&nbsp;&nbsp;Extract named substring into new memory</td></tr>
-
-<tr><td><a href="pcre_get_stringnumber.html">pcre_get_stringnumber</a></td>
- <td>&nbsp;&nbsp;Convert captured string name to number</td></tr>
-
-<tr><td><a href="pcre_get_stringtable_entries.html">pcre_get_stringtable_entries</a></td>
- <td>&nbsp;&nbsp;Find table entries for given string name</td></tr>
-
-<tr><td><a href="pcre_get_substring.html">pcre_get_substring</a></td>
- <td>&nbsp;&nbsp;Extract numbered substring into new memory</td></tr>
-
-<tr><td><a href="pcre_get_substring_list.html">pcre_get_substring_list</a></td>
- <td>&nbsp;&nbsp;Extract all substrings into new memory</td></tr>
-
-<tr><td><a href="pcre_jit_exec.html">pcre_jit_exec</a></td>
- <td>&nbsp;&nbsp;Fast path interface to JIT matching</td></tr>
-
-<tr><td><a href="pcre_jit_stack_alloc.html">pcre_jit_stack_alloc</a></td>
- <td>&nbsp;&nbsp;Create a stack for JIT matching</td></tr>
-
-<tr><td><a href="pcre_jit_stack_free.html">pcre_jit_stack_free</a></td>
- <td>&nbsp;&nbsp;Free a JIT matching stack</td></tr>
-
-<tr><td><a href="pcre_maketables.html">pcre_maketables</a></td>
- <td>&nbsp;&nbsp;Build character tables in current locale</td></tr>
-
-<tr><td><a href="pcre_pattern_to_host_byte_order.html">pcre_pattern_to_host_byte_order</a></td>
- <td>&nbsp;&nbsp;Convert compiled pattern to host byte order if necessary</td></tr>
-
-<tr><td><a href="pcre_refcount.html">pcre_refcount</a></td>
- <td>&nbsp;&nbsp;Maintain reference count in compiled pattern</td></tr>
-
-<tr><td><a href="pcre_study.html">pcre_study</a></td>
- <td>&nbsp;&nbsp;Study a compiled pattern</td></tr>
-
-<tr><td><a href="pcre_utf16_to_host_byte_order.html">pcre_utf16_to_host_byte_order</a></td>
- <td>&nbsp;&nbsp;Convert UTF-16 string to host byte order if necessary</td></tr>
-
-<tr><td><a href="pcre_utf32_to_host_byte_order.html">pcre_utf32_to_host_byte_order</a></td>
- <td>&nbsp;&nbsp;Convert UTF-32 string to host byte order if necessary</td></tr>
-
-<tr><td><a href="pcre_version.html">pcre_version</a></td>
- <td>&nbsp;&nbsp;Return PCRE version and release date</td></tr>
-</table>
-
-</html>
diff --git a/libs/Pcre16/docs/doc/pcre-config.1 b/libs/Pcre16/docs/doc/pcre-config.1
deleted file mode 100644
index 52eb4fb226..0000000000
--- a/libs/Pcre16/docs/doc/pcre-config.1
+++ /dev/null
@@ -1,92 +0,0 @@
-.TH PCRE-CONFIG 1 "01 January 2012" "PCRE 8.30"
-.SH NAME
-pcre-config - program to return PCRE configuration
-.SH SYNOPSIS
-.rs
-.sp
-.nf
-.B pcre-config [--prefix] [--exec-prefix] [--version] [--libs]
-.B " [--libs16] [--libs32] [--libs-cpp] [--libs-posix]"
-.B " [--cflags] [--cflags-posix]"
-.fi
-.
-.
-.SH DESCRIPTION
-.rs
-.sp
-\fBpcre-config\fP returns the configuration of the installed PCRE
-libraries and the options required to compile a program to use them. Some of
-the options apply only to the 8-bit, or 16-bit, or 32-bit libraries,
-respectively, and are
-not available if only one of those libraries has been built. If an unavailable
-option is encountered, the "usage" information is output.
-.
-.
-.SH OPTIONS
-.rs
-.TP 10
-\fB--prefix\fP
-Writes the directory prefix used in the PCRE installation for architecture
-independent files (\fI/usr\fP on many systems, \fI/usr/local\fP on some
-systems) to the standard output.
-.TP 10
-\fB--exec-prefix\fP
-Writes the directory prefix used in the PCRE installation for architecture
-dependent files (normally the same as \fB--prefix\fP) to the standard output.
-.TP 10
-\fB--version\fP
-Writes the version number of the installed PCRE libraries to the standard
-output.
-.TP 10
-\fB--libs\fP
-Writes to the standard output the command line options required to link
-with the 8-bit PCRE library (\fB-lpcre\fP on many systems).
-.TP 10
-\fB--libs16\fP
-Writes to the standard output the command line options required to link
-with the 16-bit PCRE library (\fB-lpcre16\fP on many systems).
-.TP 10
-\fB--libs32\fP
-Writes to the standard output the command line options required to link
-with the 32-bit PCRE library (\fB-lpcre32\fP on many systems).
-.TP 10
-\fB--libs-cpp\fP
-Writes to the standard output the command line options required to link with
-PCRE's C++ wrapper library (\fB-lpcrecpp\fP \fB-lpcre\fP on many
-systems).
-.TP 10
-\fB--libs-posix\fP
-Writes to the standard output the command line options required to link with
-PCRE's POSIX API wrapper library (\fB-lpcreposix\fP \fB-lpcre\fP on many
-systems).
-.TP 10
-\fB--cflags\fP
-Writes to the standard output the command line options required to compile
-files that use PCRE (this may include some \fB-I\fP options, but is blank on
-many systems).
-.TP 10
-\fB--cflags-posix\fP
-Writes to the standard output the command line options required to compile
-files that use PCRE's POSIX API wrapper library (this may include some \fB-I\fP
-options, but is blank on many systems).
-.
-.
-.SH "SEE ALSO"
-.rs
-.sp
-\fBpcre(3)\fP
-.
-.
-.SH AUTHOR
-.rs
-.sp
-This manual page was originally written by Mark Baker for the Debian GNU/Linux
-system. It has been subsequently revised as a generic PCRE man page.
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 24 June 2012
-.fi
diff --git a/libs/Pcre16/docs/doc/pcre-config.txt b/libs/Pcre16/docs/doc/pcre-config.txt
deleted file mode 100644
index 8503ab0ef0..0000000000
--- a/libs/Pcre16/docs/doc/pcre-config.txt
+++ /dev/null
@@ -1,86 +0,0 @@
-PCRE-CONFIG(1) General Commands Manual PCRE-CONFIG(1)
-
-
-
-NAME
- pcre-config - program to return PCRE configuration
-
-SYNOPSIS
-
- pcre-config [--prefix] [--exec-prefix] [--version] [--libs]
- [--libs16] [--libs32] [--libs-cpp] [--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. Some of the
- options apply only to the 8-bit, or 16-bit, or 32-bit libraries,
- respectively, and are not available if only one of those libraries has
- been built. If an unavailable option is encountered, the "usage" infor-
- mation is output.
-
-
-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 the 8-bit PCRE library (-lpcre on many
- systems).
-
- --libs16 Writes to the standard output the command line options
- required to link with the 16-bit PCRE library (-lpcre16 on
- many systems).
-
- --libs32 Writes to the standard output the command line options
- required to link with the 32-bit PCRE library (-lpcre32 on
- many systems).
-
- --libs-cpp
- Writes to the standard output the command line options
- required to link with PCRE's C++ wrapper library (-lpcrecpp
- -lpcre on many systems).
-
- --libs-posix
- Writes to the standard output the command line options
- required to link with PCRE's POSIX API wrapper 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 PCRE's POSIX API wrapper
- 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 subsequently revised as a generic PCRE
- man page.
-
-
-REVISION
-
- Last updated: 24 June 2012
diff --git a/libs/Pcre16/docs/doc/pcre.3 b/libs/Pcre16/docs/doc/pcre.3
deleted file mode 100644
index 0f2837e7c0..0000000000
--- a/libs/Pcre16/docs/doc/pcre.3
+++ /dev/null
@@ -1,230 +0,0 @@
-.TH PCRE 3 "10 February 2015" "PCRE 8.37"
-.SH NAME
-PCRE - Perl-compatible regular expressions (original API)
-.SH "PLEASE TAKE NOTE"
-.rs
-.sp
-This document relates to PCRE releases that use the original API,
-with library names libpcre, libpcre16, and libpcre32. January 2015 saw the
-first release of a new API, known as PCRE2, with release numbers starting at
-10.00 and library names libpcre2-8, libpcre2-16, and libpcre2-32. The old
-libraries (now called PCRE1) are still being maintained for bug fixes, but
-there will be no new development. New projects are advised to use the new PCRE2
-libraries.
-.
-.
-.SH INTRODUCTION
-.rs
-.sp
-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. Some features that appeared in Python and PCRE before they
-appeared in Perl are also available using the Python syntax, there is some
-support for one or two .NET and Oniguruma syntax items, and there is an option
-for requesting some minor changes that give better JavaScript compatibility.
-.P
-Starting with release 8.30, it is possible to compile two separate PCRE
-libraries: the original, which supports 8-bit character strings (including
-UTF-8 strings), and a second library that supports 16-bit character strings
-(including UTF-16 strings). The build process allows either one or both to be
-built. The majority of the work to make this possible was done by Zoltan
-Herczeg.
-.P
-Starting with release 8.32 it is possible to compile a third separate PCRE
-library that supports 32-bit character strings (including UTF-32 strings). The
-build process allows any combination of the 8-, 16- and 32-bit libraries. The
-work to make this possible was done by Christian Persch.
-.P
-The three libraries contain identical sets of functions, except that the names
-in the 16-bit library start with \fBpcre16_\fP instead of \fBpcre_\fP, and the
-names in the 32-bit library start with \fBpcre32_\fP instead of \fBpcre_\fP. To
-avoid over-complication and reduce the documentation maintenance load, most of
-the documentation describes the 8-bit library, with the differences for the
-16-bit and 32-bit libraries described separately in the
-.\" HREF
-\fBpcre16\fP
-and
-.\" HREF
-\fBpcre32\fP
-.\"
-pages. References to functions or structures of the form \fIpcre[16|32]_xxx\fP
-should be read as meaning "\fIpcre_xxx\fP when using the 8-bit library,
-\fIpcre16_xxx\fP when using the 16-bit library, or \fIpcre32_xxx\fP when using
-the 32-bit library".
-.P
-The current implementation of PCRE corresponds approximately with Perl 5.12,
-including support for UTF-8/16/32 encoded strings and Unicode general category
-properties. However, UTF-8/16/32 and Unicode support has to be explicitly
-enabled; it is not the default. The Unicode tables correspond to Unicode
-release 6.3.0.
-.P
-In addition to the Perl-compatible matching function, PCRE contains an
-alternative 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
-.\" HREF
-\fBpcrematching\fP
-.\"
-page.
-.P
-PCRE is written in C and released as a C library. A number of people have
-written wrappers and interfaces of various kinds. In particular, Google Inc.
-have provided a comprehensive C++ wrapper for the 8-bit library. This is now
-included as part of the PCRE distribution. The
-.\" HREF
-\fBpcrecpp\fP
-.\"
-page has details of this interface. Other people's contributions can be found
-in the \fIContrib\fP directory at the primary FTP site, which is:
-.sp
-.\" HTML <a href="ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre">
-.\" </a>
-ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre
-.\"
-.P
-Details of exactly which Perl regular expression features are and are not
-supported by PCRE are given in separate documents. See the
-.\" HREF
-\fBpcrepattern\fP
-.\"
-and
-.\" HREF
-\fBpcrecompat\fP
-.\"
-pages. There is a syntax summary in the
-.\" HREF
-\fBpcresyntax\fP
-.\"
-page.
-.P
-Some features of PCRE can be included, excluded, or changed when the library is
-built. The
-.\" HREF
-\fBpcre_config()\fP
-.\"
-function makes it possible for a client to discover which features are
-available. The features themselves are described in the
-.\" HREF
-\fBpcrebuild\fP
-.\"
-page. Documentation about building PCRE for various operating systems can be
-found in the
-.\" HTML <a href="README.txt">
-.\" </a>
-\fBREADME\fP
-.\"
-and
-.\" HTML <a href="NON-AUTOTOOLS-BUILD.txt">
-.\" </a>
-\fBNON-AUTOTOOLS_BUILD\fP
-.\"
-files in the source distribution.
-.P
-The libraries 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_" or "_pcre16_" or "_pcre32_", 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.
-.
-.
-.SH "SECURITY CONSIDERATIONS"
-.rs
-.sp
-If you are using PCRE in a non-UTF application that permits users to supply
-arbitrary patterns for compilation, you should be aware of a feature that
-allows users to turn on UTF support from within a pattern, provided that PCRE
-was built with UTF support. For example, an 8-bit pattern that begins with
-"(*UTF8)" or "(*UTF)" turns on UTF-8 mode, which interprets patterns and
-subjects as strings of UTF-8 characters instead of individual 8-bit characters.
-This causes both the pattern and any data against which it is matched to be
-checked for UTF-8 validity. If the data string is very long, such a check might
-use sufficiently many resources as to cause your application to lose
-performance.
-.P
-One way of guarding against this possibility is to use the
-\fBpcre_fullinfo()\fP function to check the compiled pattern's options for UTF.
-Alternatively, from release 8.33, you can set the PCRE_NEVER_UTF option at
-compile time. This causes an compile time error if a pattern contains a
-UTF-setting sequence.
-.P
-If your application is one that supports UTF, be aware that validity checking
-can take time. If the same data string is to be matched many times, you can use
-the PCRE_NO_UTF[8|16|32]_CHECK option for the second and subsequent matches to
-save redundant checks.
-.P
-Another way that performance can be hit is by running a pattern that has a very
-large search tree against a string that will never match. Nested unlimited
-repeats in a pattern are a common example. PCRE provides some protection
-against this: see the PCRE_EXTRA_MATCH_LIMIT feature in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page.
-.
-.
-.SH "USER DOCUMENTATION"
-.rs
-.sp
-The user documentation for PCRE comprises a number of different sections. In
-the "man" format, each of these is a separate "man page". In the HTML format,
-each is a separate page, linked from the index page. In the plain text format,
-the descriptions of the \fBpcregrep\fP and \fBpcretest\fP programs are in files
-called \fBpcregrep.txt\fP and \fBpcretest.txt\fP, respectively. The remaining
-sections, except for the \fBpcredemo\fP section (which is a program listing),
-are concatenated in \fBpcre.txt\fP, for ease of searching. The sections are as
-follows:
-.sp
- pcre this document
- pcre-config show PCRE installation configuration information
- pcre16 details of the 16-bit library
- pcre32 details of the 32-bit library
- pcreapi details of PCRE's native C API
- pcrebuild building PCRE
- pcrecallout details of the callout feature
- pcrecompat discussion of Perl compatibility
- pcrecpp details of the C++ wrapper for the 8-bit library
- pcredemo a demonstration C program that uses PCRE
- pcregrep description of the \fBpcregrep\fP command (8-bit only)
- pcrejit discussion of the just-in-time optimization support
- pcrelimits details of size and other limits
- pcrematching discussion of the two matching algorithms
- pcrepartial details of the partial matching facility
-.\" JOIN
- pcrepattern syntax and semantics of supported
- regular expressions
- pcreperform discussion of performance issues
- pcreposix the POSIX-compatible C API for the 8-bit library
- pcreprecompile details of saving and re-using precompiled patterns
- pcresample discussion of the pcredemo program
- pcrestack discussion of stack usage
- pcresyntax quick syntax reference
- pcretest description of the \fBpcretest\fP testing command
- pcreunicode discussion of Unicode and UTF-8/16/32 support
-.sp
-In the "man" and HTML formats, there is also a short page for each C library
-function, listing its arguments and results.
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.P
-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.
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 10 February 2015
-Copyright (c) 1997-2015 University of Cambridge.
-.fi
diff --git a/libs/Pcre16/docs/doc/pcre.txt b/libs/Pcre16/docs/doc/pcre.txt
deleted file mode 100644
index c027538f50..0000000000
--- a/libs/Pcre16/docs/doc/pcre.txt
+++ /dev/null
@@ -1,10502 +0,0 @@
------------------------------------------------------------------------------
-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. Neither has
-the pcredemo program. There are separate text files for the pcregrep and
-pcretest commands.
------------------------------------------------------------------------------
-
-
-PCRE(3) Library Functions Manual PCRE(3)
-
-
-
-NAME
- PCRE - Perl-compatible regular expressions (original API)
-
-PLEASE TAKE NOTE
-
- This document relates to PCRE releases that use the original API, with
- library names libpcre, libpcre16, and libpcre32. January 2015 saw the
- first release of a new API, known as PCRE2, with release numbers start-
- ing at 10.00 and library names libpcre2-8, libpcre2-16, and
- libpcre2-32. The old libraries (now called PCRE1) are still being main-
- tained for bug fixes, but there will be no new development. New
- projects are advised to use the new PCRE2 libraries.
-
-
-INTRODUCTION
-
- The PCRE library is a set of functions that implement regular expres-
- sion pattern matching using the same syntax and semantics as Perl, with
- just a few differences. Some features that appeared in Python and PCRE
- before they appeared in Perl are also available using the Python syn-
- tax, there is some support for one or two .NET and Oniguruma syntax
- items, and there is an option for requesting some minor changes that
- give better JavaScript compatibility.
-
- Starting with release 8.30, it is possible to compile two separate PCRE
- libraries: the original, which supports 8-bit character strings
- (including UTF-8 strings), and a second library that supports 16-bit
- character strings (including UTF-16 strings). The build process allows
- either one or both to be built. The majority of the work to make this
- possible was done by Zoltan Herczeg.
-
- Starting with release 8.32 it is possible to compile a third separate
- PCRE library that supports 32-bit character strings (including UTF-32
- strings). The build process allows any combination of the 8-, 16- and
- 32-bit libraries. The work to make this possible was done by Christian
- Persch.
-
- The three libraries contain identical sets of functions, except that
- the names in the 16-bit library start with pcre16_ instead of pcre_,
- and the names in the 32-bit library start with pcre32_ instead of
- pcre_. To avoid over-complication and reduce the documentation mainte-
- nance load, most of the documentation describes the 8-bit library, with
- the differences for the 16-bit and 32-bit libraries described sepa-
- rately in the pcre16 and pcre32 pages. References to functions or
- structures of the form pcre[16|32]_xxx should be read as meaning
- "pcre_xxx when using the 8-bit library, pcre16_xxx when using the
- 16-bit library, or pcre32_xxx when using the 32-bit library".
-
- The current implementation of PCRE corresponds approximately with Perl
- 5.12, including support for UTF-8/16/32 encoded strings and Unicode
- general category properties. However, UTF-8/16/32 and Unicode support
- has to be explicitly enabled; it is not the default. The Unicode tables
- correspond to Unicode release 6.3.0.
-
- In addition to the Perl-compatible matching function, PCRE contains an
- alternative function that matches the same compiled patterns in a dif-
- ferent 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. In particular,
- Google Inc. have provided a comprehensive C++ wrapper for the 8-bit
- library. This is now included as part of the PCRE distribution. The
- pcrecpp page has details of this interface. Other people's contribu-
- tions can be found in the Contrib directory at the primary FTP site,
- which is:
-
- ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre
-
- Details of exactly which Perl regular expression features are and are
- not supported by PCRE are given in separate documents. See the pcrepat-
- tern and pcrecompat pages. There is a syntax summary in the pcresyntax
- page.
-
- Some features of PCRE can be included, excluded, or changed when the
- library is built. The pcre_config() function makes it possible for a
- client to discover which features are available. The features them-
- selves are described in the pcrebuild page. Documentation about build-
- ing PCRE for various operating systems can be found in the README and
- NON-AUTOTOOLS_BUILD files in the source distribution.
-
- The libraries 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_" or "_pcre16_" or "_pcre32_", 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.
-
-
-SECURITY CONSIDERATIONS
-
- If you are using PCRE in a non-UTF application that permits users to
- supply arbitrary patterns for compilation, you should be aware of a
- feature that allows users to turn on UTF support from within a pattern,
- provided that PCRE was built with UTF support. For example, an 8-bit
- pattern that begins with "(*UTF8)" or "(*UTF)" turns on UTF-8 mode,
- which interprets patterns and subjects as strings of UTF-8 characters
- instead of individual 8-bit characters. This causes both the pattern
- and any data against which it is matched to be checked for UTF-8 valid-
- ity. If the data string is very long, such a check might use suffi-
- ciently many resources as to cause your application to lose perfor-
- mance.
-
- One way of guarding against this possibility is to use the
- pcre_fullinfo() function to check the compiled pattern's options for
- UTF. Alternatively, from release 8.33, you can set the PCRE_NEVER_UTF
- option at compile time. This causes an compile time error if a pattern
- contains a UTF-setting sequence.
-
- If your application is one that supports UTF, be aware that validity
- checking can take time. If the same data string is to be matched many
- times, you can use the PCRE_NO_UTF[8|16|32]_CHECK option for the second
- and subsequent matches to save redundant checks.
-
- Another way that performance can be hit is by running a pattern that
- has a very large search tree against a string that will never match.
- Nested unlimited repeats in a pattern are a common example. PCRE pro-
- vides some protection against this: see the PCRE_EXTRA_MATCH_LIMIT fea-
- ture in the pcreapi page.
-
-
-USER DOCUMENTATION
-
- The user documentation for PCRE comprises a number of different sec-
- tions. In the "man" format, each of these is a separate "man page". In
- the HTML format, each is a separate page, linked from the index page.
- In the plain text format, the descriptions of the pcregrep and pcretest
- programs are in files called pcregrep.txt and pcretest.txt, respec-
- tively. The remaining sections, except for the pcredemo section (which
- is a program listing), are concatenated in pcre.txt, for ease of
- searching. The sections are as follows:
-
- pcre this document
- pcre-config show PCRE installation configuration information
- pcre16 details of the 16-bit library
- pcre32 details of the 32-bit library
- pcreapi details of PCRE's native C API
- pcrebuild building PCRE
- pcrecallout details of the callout feature
- pcrecompat discussion of Perl compatibility
- pcrecpp details of the C++ wrapper for the 8-bit library
- pcredemo a demonstration C program that uses PCRE
- pcregrep description of the pcregrep command (8-bit only)
- pcrejit discussion of the just-in-time optimization support
- pcrelimits details of size and other limits
- pcrematching discussion of the two matching algorithms
- pcrepartial details of the partial matching facility
- pcrepattern syntax and semantics of supported
- regular expressions
- pcreperform discussion of performance issues
- pcreposix the POSIX-compatible C API for the 8-bit library
- pcreprecompile details of saving and re-using precompiled patterns
- pcresample discussion of the pcredemo program
- pcrestack discussion of stack usage
- pcresyntax quick syntax reference
- pcretest description of the pcretest testing command
- pcreunicode discussion of Unicode and UTF-8/16/32 support
-
- In the "man" and HTML formats, there is also a short page for each C
- library function, listing its arguments and results.
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, 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: 10 February 2015
- Copyright (c) 1997-2015 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCRE(3) Library Functions Manual PCRE(3)
-
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
- #include <pcre.h>
-
-
-PCRE 16-BIT API BASIC FUNCTIONS
-
- pcre16 *pcre16_compile(PCRE_SPTR16 pattern, int options,
- const char **errptr, int *erroffset,
- const unsigned char *tableptr);
-
- pcre16 *pcre16_compile2(PCRE_SPTR16 pattern, int options,
- int *errorcodeptr,
- const char **errptr, int *erroffset,
- const unsigned char *tableptr);
-
- pcre16_extra *pcre16_study(const pcre16 *code, int options,
- const char **errptr);
-
- void pcre16_free_study(pcre16_extra *extra);
-
- int pcre16_exec(const pcre16 *code, const pcre16_extra *extra,
- PCRE_SPTR16 subject, int length, int startoffset,
- int options, int *ovector, int ovecsize);
-
- int pcre16_dfa_exec(const pcre16 *code, const pcre16_extra *extra,
- PCRE_SPTR16 subject, int length, int startoffset,
- int options, int *ovector, int ovecsize,
- int *workspace, int wscount);
-
-
-PCRE 16-BIT API STRING EXTRACTION FUNCTIONS
-
- int pcre16_copy_named_substring(const pcre16 *code,
- PCRE_SPTR16 subject, int *ovector,
- int stringcount, PCRE_SPTR16 stringname,
- PCRE_UCHAR16 *buffer, int buffersize);
-
- int pcre16_copy_substring(PCRE_SPTR16 subject, int *ovector,
- int stringcount, int stringnumber, PCRE_UCHAR16 *buffer,
- int buffersize);
-
- int pcre16_get_named_substring(const pcre16 *code,
- PCRE_SPTR16 subject, int *ovector,
- int stringcount, PCRE_SPTR16 stringname,
- PCRE_SPTR16 *stringptr);
-
- int pcre16_get_stringnumber(const pcre16 *code,
- PCRE_SPTR16 name);
-
- int pcre16_get_stringtable_entries(const pcre16 *code,
- PCRE_SPTR16 name, PCRE_UCHAR16 **first, PCRE_UCHAR16 **last);
-
- int pcre16_get_substring(PCRE_SPTR16 subject, int *ovector,
- int stringcount, int stringnumber,
- PCRE_SPTR16 *stringptr);
-
- int pcre16_get_substring_list(PCRE_SPTR16 subject,
- int *ovector, int stringcount, PCRE_SPTR16 **listptr);
-
- void pcre16_free_substring(PCRE_SPTR16 stringptr);
-
- void pcre16_free_substring_list(PCRE_SPTR16 *stringptr);
-
-
-PCRE 16-BIT API AUXILIARY FUNCTIONS
-
- pcre16_jit_stack *pcre16_jit_stack_alloc(int startsize, int maxsize);
-
- void pcre16_jit_stack_free(pcre16_jit_stack *stack);
-
- void pcre16_assign_jit_stack(pcre16_extra *extra,
- pcre16_jit_callback callback, void *data);
-
- const unsigned char *pcre16_maketables(void);
-
- int pcre16_fullinfo(const pcre16 *code, const pcre16_extra *extra,
- int what, void *where);
-
- int pcre16_refcount(pcre16 *code, int adjust);
-
- int pcre16_config(int what, void *where);
-
- const char *pcre16_version(void);
-
- int pcre16_pattern_to_host_byte_order(pcre16 *code,
- pcre16_extra *extra, const unsigned char *tables);
-
-
-PCRE 16-BIT API INDIRECTED FUNCTIONS
-
- void *(*pcre16_malloc)(size_t);
-
- void (*pcre16_free)(void *);
-
- void *(*pcre16_stack_malloc)(size_t);
-
- void (*pcre16_stack_free)(void *);
-
- int (*pcre16_callout)(pcre16_callout_block *);
-
-
-PCRE 16-BIT API 16-BIT-ONLY FUNCTION
-
- int pcre16_utf16_to_host_byte_order(PCRE_UCHAR16 *output,
- PCRE_SPTR16 input, int length, int *byte_order,
- int keep_boms);
-
-
-THE PCRE 16-BIT LIBRARY
-
- Starting with release 8.30, it is possible to compile a PCRE library
- that supports 16-bit character strings, including UTF-16 strings, as
- well as or instead of the original 8-bit library. The majority of the
- work to make this possible was done by Zoltan Herczeg. The two
- libraries contain identical sets of functions, used in exactly the same
- way. Only the names of the functions and the data types of their argu-
- ments and results are different. To avoid over-complication and reduce
- the documentation maintenance load, most of the PCRE documentation
- describes the 8-bit library, with only occasional references to the
- 16-bit library. This page describes what is different when you use the
- 16-bit library.
-
- WARNING: A single application can be linked with both libraries, but
- you must take care when processing any particular pattern to use func-
- tions from just one library. For example, if you want to study a pat-
- tern that was compiled with pcre16_compile(), you must do so with
- pcre16_study(), not pcre_study(), and you must free the study data with
- pcre16_free_study().
-
-
-THE HEADER FILE
-
- There is only one header file, pcre.h. It contains prototypes for all
- the functions in all libraries, as well as definitions of flags, struc-
- tures, error codes, etc.
-
-
-THE LIBRARY NAME
-
- In Unix-like systems, the 16-bit library is called libpcre16, and can
- normally be accesss by adding -lpcre16 to the command for linking an
- application that uses PCRE.
-
-
-STRING TYPES
-
- In the 8-bit library, strings are passed to PCRE library functions as
- vectors of bytes with the C type "char *". In the 16-bit library,
- strings are passed as vectors of unsigned 16-bit quantities. The macro
- PCRE_UCHAR16 specifies an appropriate data type, and PCRE_SPTR16 is
- defined as "const PCRE_UCHAR16 *". In very many environments, "short
- int" is a 16-bit data type. When PCRE is built, it defines PCRE_UCHAR16
- as "unsigned short int", but checks that it really is a 16-bit data
- type. If it is not, the build fails with an error message telling the
- maintainer to modify the definition appropriately.
-
-
-STRUCTURE TYPES
-
- The types of the opaque structures that are used for compiled 16-bit
- patterns and JIT stacks are pcre16 and pcre16_jit_stack respectively.
- The type of the user-accessible structure that is returned by
- pcre16_study() is pcre16_extra, and the type of the structure that is
- used for passing data to a callout function is pcre16_callout_block.
- These structures contain the same fields, with the same names, as their
- 8-bit counterparts. The only difference is that pointers to character
- strings are 16-bit instead of 8-bit types.
-
-
-16-BIT FUNCTIONS
-
- For every function in the 8-bit library there is a corresponding func-
- tion in the 16-bit library with a name that starts with pcre16_ instead
- of pcre_. The prototypes are listed above. In addition, there is one
- extra function, pcre16_utf16_to_host_byte_order(). This is a utility
- function that converts a UTF-16 character string to host byte order if
- necessary. The other 16-bit functions expect the strings they are
- passed to be in host byte order.
-
- The input and output arguments of pcre16_utf16_to_host_byte_order() may
- point to the same address, that is, conversion in place is supported.
- The output buffer must be at least as long as the input.
-
- The length argument specifies the number of 16-bit data units in the
- input string; a negative value specifies a zero-terminated string.
-
- If byte_order is NULL, it is assumed that the string starts off in host
- byte order. This may be changed by byte-order marks (BOMs) anywhere in
- the string (commonly as the first character).
-
- If byte_order is not NULL, a non-zero value of the integer to which it
- points means that the input starts off in host byte order, otherwise
- the opposite order is assumed. Again, BOMs in the string can change
- this. The final byte order is passed back at the end of processing.
-
- If keep_boms is not zero, byte-order mark characters (0xfeff) are
- copied into the output string. Otherwise they are discarded.
-
- The result of the function is the number of 16-bit units placed into
- the output buffer, including the zero terminator if the string was
- zero-terminated.
-
-
-SUBJECT STRING OFFSETS
-
- The lengths and starting offsets of subject strings must be specified
- in 16-bit data units, and the offsets within subject strings that are
- returned by the matching functions are in also 16-bit units rather than
- bytes.
-
-
-NAMED SUBPATTERNS
-
- The name-to-number translation table that is maintained for named sub-
- patterns uses 16-bit characters. The pcre16_get_stringtable_entries()
- function returns the length of each entry in the table as the number of
- 16-bit data units.
-
-
-OPTION NAMES
-
- There are two new general option names, PCRE_UTF16 and
- PCRE_NO_UTF16_CHECK, which correspond to PCRE_UTF8 and
- PCRE_NO_UTF8_CHECK in the 8-bit library. In fact, these new options
- define the same bits in the options word. There is a discussion about
- the validity of UTF-16 strings in the pcreunicode page.
-
- For the pcre16_config() function there is an option PCRE_CONFIG_UTF16
- that returns 1 if UTF-16 support is configured, otherwise 0. If this
- option is given to pcre_config() or pcre32_config(), or if the
- PCRE_CONFIG_UTF8 or PCRE_CONFIG_UTF32 option is given to pcre16_con-
- fig(), the result is the PCRE_ERROR_BADOPTION error.
-
-
-CHARACTER CODES
-
- In 16-bit mode, when PCRE_UTF16 is not set, character values are
- treated in the same way as in 8-bit, non UTF-8 mode, except, of course,
- that they can range from 0 to 0xffff instead of 0 to 0xff. Character
- types for characters less than 0xff can therefore be influenced by the
- locale in the same way as before. Characters greater than 0xff have
- only one case, and no "type" (such as letter or digit).
-
- In UTF-16 mode, the character code is Unicode, in the range 0 to
- 0x10ffff, with the exception of values in the range 0xd800 to 0xdfff
- because those are "surrogate" values that are used in pairs to encode
- values greater than 0xffff.
-
- A UTF-16 string can indicate its endianness by special code knows as a
- byte-order mark (BOM). The PCRE functions do not handle this, expecting
- strings to be in host byte order. A utility function called
- pcre16_utf16_to_host_byte_order() is provided to help with this (see
- above).
-
-
-ERROR NAMES
-
- The errors PCRE_ERROR_BADUTF16_OFFSET and PCRE_ERROR_SHORTUTF16 corre-
- spond to their 8-bit counterparts. The error PCRE_ERROR_BADMODE is
- given when a compiled pattern is passed to a function that processes
- patterns in the other mode, for example, if a pattern compiled with
- pcre_compile() is passed to pcre16_exec().
-
- There are new error codes whose names begin with PCRE_UTF16_ERR for
- invalid UTF-16 strings, corresponding to the PCRE_UTF8_ERR codes for
- UTF-8 strings that are described in the section entitled "Reason codes
- for invalid UTF-8 strings" in the main pcreapi page. The UTF-16 errors
- are:
-
- PCRE_UTF16_ERR1 Missing low surrogate at end of string
- PCRE_UTF16_ERR2 Invalid low surrogate follows high surrogate
- PCRE_UTF16_ERR3 Isolated low surrogate
- PCRE_UTF16_ERR4 Non-character
-
-
-ERROR TEXTS
-
- If there is an error while compiling a pattern, the error text that is
- passed back by pcre16_compile() or pcre16_compile2() is still an 8-bit
- character string, zero-terminated.
-
-
-CALLOUTS
-
- The subject and mark fields in the callout block that is passed to a
- callout function point to 16-bit vectors.
-
-
-TESTING
-
- The pcretest program continues to operate with 8-bit input and output
- files, but it can be used for testing the 16-bit library. If it is run
- with the command line option -16, patterns and subject strings are con-
- verted from 8-bit to 16-bit before being passed to PCRE, and the 16-bit
- library functions are used instead of the 8-bit ones. Returned 16-bit
- strings are converted to 8-bit for output. If both the 8-bit and the
- 32-bit libraries were not compiled, pcretest defaults to 16-bit and the
- -16 option is ignored.
-
- When PCRE is being built, the RunTest script that is called by "make
- check" uses the pcretest -C option to discover which of the 8-bit,
- 16-bit and 32-bit libraries has been built, and runs the tests appro-
- priately.
-
-
-NOT SUPPORTED IN 16-BIT MODE
-
- Not all the features of the 8-bit library are available with the 16-bit
- library. The C++ and POSIX wrapper functions support only the 8-bit
- library, and the pcregrep program is at present 8-bit only.
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 12 May 2013
- Copyright (c) 1997-2013 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCRE(3) Library Functions Manual PCRE(3)
-
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
- #include <pcre.h>
-
-
-PCRE 32-BIT API BASIC FUNCTIONS
-
- pcre32 *pcre32_compile(PCRE_SPTR32 pattern, int options,
- const char **errptr, int *erroffset,
- const unsigned char *tableptr);
-
- pcre32 *pcre32_compile2(PCRE_SPTR32 pattern, int options,
- int *errorcodeptr,
- const unsigned char *tableptr);
-
- pcre32_extra *pcre32_study(const pcre32 *code, int options,
- const char **errptr);
-
- void pcre32_free_study(pcre32_extra *extra);
-
- int pcre32_exec(const pcre32 *code, const pcre32_extra *extra,
- PCRE_SPTR32 subject, int length, int startoffset,
- int options, int *ovector, int ovecsize);
-
- int pcre32_dfa_exec(const pcre32 *code, const pcre32_extra *extra,
- PCRE_SPTR32 subject, int length, int startoffset,
- int options, int *ovector, int ovecsize,
- int *workspace, int wscount);
-
-
-PCRE 32-BIT API STRING EXTRACTION FUNCTIONS
-
- int pcre32_copy_named_substring(const pcre32 *code,
- PCRE_SPTR32 subject, int *ovector,
- int stringcount, PCRE_SPTR32 stringname,
- PCRE_UCHAR32 *buffer, int buffersize);
-
- int pcre32_copy_substring(PCRE_SPTR32 subject, int *ovector,
- int stringcount, int stringnumber, PCRE_UCHAR32 *buffer,
- int buffersize);
-
- int pcre32_get_named_substring(const pcre32 *code,
- PCRE_SPTR32 subject, int *ovector,
- int stringcount, PCRE_SPTR32 stringname,
- PCRE_SPTR32 *stringptr);
-
- int pcre32_get_stringnumber(const pcre32 *code,
- PCRE_SPTR32 name);
-
- int pcre32_get_stringtable_entries(const pcre32 *code,
- PCRE_SPTR32 name, PCRE_UCHAR32 **first, PCRE_UCHAR32 **last);
-
- int pcre32_get_substring(PCRE_SPTR32 subject, int *ovector,
- int stringcount, int stringnumber,
- PCRE_SPTR32 *stringptr);
-
- int pcre32_get_substring_list(PCRE_SPTR32 subject,
- int *ovector, int stringcount, PCRE_SPTR32 **listptr);
-
- void pcre32_free_substring(PCRE_SPTR32 stringptr);
-
- void pcre32_free_substring_list(PCRE_SPTR32 *stringptr);
-
-
-PCRE 32-BIT API AUXILIARY FUNCTIONS
-
- pcre32_jit_stack *pcre32_jit_stack_alloc(int startsize, int maxsize);
-
- void pcre32_jit_stack_free(pcre32_jit_stack *stack);
-
- void pcre32_assign_jit_stack(pcre32_extra *extra,
- pcre32_jit_callback callback, void *data);
-
- const unsigned char *pcre32_maketables(void);
-
- int pcre32_fullinfo(const pcre32 *code, const pcre32_extra *extra,
- int what, void *where);
-
- int pcre32_refcount(pcre32 *code, int adjust);
-
- int pcre32_config(int what, void *where);
-
- const char *pcre32_version(void);
-
- int pcre32_pattern_to_host_byte_order(pcre32 *code,
- pcre32_extra *extra, const unsigned char *tables);
-
-
-PCRE 32-BIT API INDIRECTED FUNCTIONS
-
- void *(*pcre32_malloc)(size_t);
-
- void (*pcre32_free)(void *);
-
- void *(*pcre32_stack_malloc)(size_t);
-
- void (*pcre32_stack_free)(void *);
-
- int (*pcre32_callout)(pcre32_callout_block *);
-
-
-PCRE 32-BIT API 32-BIT-ONLY FUNCTION
-
- int pcre32_utf32_to_host_byte_order(PCRE_UCHAR32 *output,
- PCRE_SPTR32 input, int length, int *byte_order,
- int keep_boms);
-
-
-THE PCRE 32-BIT LIBRARY
-
- Starting with release 8.32, it is possible to compile a PCRE library
- that supports 32-bit character strings, including UTF-32 strings, as
- well as or instead of the original 8-bit library. This work was done by
- Christian Persch, based on the work done by Zoltan Herczeg for the
- 16-bit library. All three libraries contain identical sets of func-
- tions, used in exactly the same way. Only the names of the functions
- and the data types of their arguments and results are different. To
- avoid over-complication and reduce the documentation maintenance load,
- most of the PCRE documentation describes the 8-bit library, with only
- occasional references to the 16-bit and 32-bit libraries. This page
- describes what is different when you use the 32-bit library.
-
- WARNING: A single application can be linked with all or any of the
- three libraries, but you must take care when processing any particular
- pattern to use functions from just one library. For example, if you
- want to study a pattern that was compiled with pcre32_compile(), you
- must do so with pcre32_study(), not pcre_study(), and you must free the
- study data with pcre32_free_study().
-
-
-THE HEADER FILE
-
- There is only one header file, pcre.h. It contains prototypes for all
- the functions in all libraries, as well as definitions of flags, struc-
- tures, error codes, etc.
-
-
-THE LIBRARY NAME
-
- In Unix-like systems, the 32-bit library is called libpcre32, and can
- normally be accesss by adding -lpcre32 to the command for linking an
- application that uses PCRE.
-
-
-STRING TYPES
-
- In the 8-bit library, strings are passed to PCRE library functions as
- vectors of bytes with the C type "char *". In the 32-bit library,
- strings are passed as vectors of unsigned 32-bit quantities. The macro
- PCRE_UCHAR32 specifies an appropriate data type, and PCRE_SPTR32 is
- defined as "const PCRE_UCHAR32 *". In very many environments, "unsigned
- int" is a 32-bit data type. When PCRE is built, it defines PCRE_UCHAR32
- as "unsigned int", but checks that it really is a 32-bit data type. If
- it is not, the build fails with an error message telling the maintainer
- to modify the definition appropriately.
-
-
-STRUCTURE TYPES
-
- The types of the opaque structures that are used for compiled 32-bit
- patterns and JIT stacks are pcre32 and pcre32_jit_stack respectively.
- The type of the user-accessible structure that is returned by
- pcre32_study() is pcre32_extra, and the type of the structure that is
- used for passing data to a callout function is pcre32_callout_block.
- These structures contain the same fields, with the same names, as their
- 8-bit counterparts. The only difference is that pointers to character
- strings are 32-bit instead of 8-bit types.
-
-
-32-BIT FUNCTIONS
-
- For every function in the 8-bit library there is a corresponding func-
- tion in the 32-bit library with a name that starts with pcre32_ instead
- of pcre_. The prototypes are listed above. In addition, there is one
- extra function, pcre32_utf32_to_host_byte_order(). This is a utility
- function that converts a UTF-32 character string to host byte order if
- necessary. The other 32-bit functions expect the strings they are
- passed to be in host byte order.
-
- The input and output arguments of pcre32_utf32_to_host_byte_order() may
- point to the same address, that is, conversion in place is supported.
- The output buffer must be at least as long as the input.
-
- The length argument specifies the number of 32-bit data units in the
- input string; a negative value specifies a zero-terminated string.
-
- If byte_order is NULL, it is assumed that the string starts off in host
- byte order. This may be changed by byte-order marks (BOMs) anywhere in
- the string (commonly as the first character).
-
- If byte_order is not NULL, a non-zero value of the integer to which it
- points means that the input starts off in host byte order, otherwise
- the opposite order is assumed. Again, BOMs in the string can change
- this. The final byte order is passed back at the end of processing.
-
- If keep_boms is not zero, byte-order mark characters (0xfeff) are
- copied into the output string. Otherwise they are discarded.
-
- The result of the function is the number of 32-bit units placed into
- the output buffer, including the zero terminator if the string was
- zero-terminated.
-
-
-SUBJECT STRING OFFSETS
-
- The lengths and starting offsets of subject strings must be specified
- in 32-bit data units, and the offsets within subject strings that are
- returned by the matching functions are in also 32-bit units rather than
- bytes.
-
-
-NAMED SUBPATTERNS
-
- The name-to-number translation table that is maintained for named sub-
- patterns uses 32-bit characters. The pcre32_get_stringtable_entries()
- function returns the length of each entry in the table as the number of
- 32-bit data units.
-
-
-OPTION NAMES
-
- There are two new general option names, PCRE_UTF32 and
- PCRE_NO_UTF32_CHECK, which correspond to PCRE_UTF8 and
- PCRE_NO_UTF8_CHECK in the 8-bit library. In fact, these new options
- define the same bits in the options word. There is a discussion about
- the validity of UTF-32 strings in the pcreunicode page.
-
- For the pcre32_config() function there is an option PCRE_CONFIG_UTF32
- that returns 1 if UTF-32 support is configured, otherwise 0. If this
- option is given to pcre_config() or pcre16_config(), or if the
- PCRE_CONFIG_UTF8 or PCRE_CONFIG_UTF16 option is given to pcre32_con-
- fig(), the result is the PCRE_ERROR_BADOPTION error.
-
-
-CHARACTER CODES
-
- In 32-bit mode, when PCRE_UTF32 is not set, character values are
- treated in the same way as in 8-bit, non UTF-8 mode, except, of course,
- that they can range from 0 to 0x7fffffff instead of 0 to 0xff. Charac-
- ter types for characters less than 0xff can therefore be influenced by
- the locale in the same way as before. Characters greater than 0xff
- have only one case, and no "type" (such as letter or digit).
-
- In UTF-32 mode, the character code is Unicode, in the range 0 to
- 0x10ffff, with the exception of values in the range 0xd800 to 0xdfff
- because those are "surrogate" values that are ill-formed in UTF-32.
-
- A UTF-32 string can indicate its endianness by special code knows as a
- byte-order mark (BOM). The PCRE functions do not handle this, expecting
- strings to be in host byte order. A utility function called
- pcre32_utf32_to_host_byte_order() is provided to help with this (see
- above).
-
-
-ERROR NAMES
-
- The error PCRE_ERROR_BADUTF32 corresponds to its 8-bit counterpart.
- The error PCRE_ERROR_BADMODE is given when a compiled pattern is passed
- to a function that processes patterns in the other mode, for example,
- if a pattern compiled with pcre_compile() is passed to pcre32_exec().
-
- There are new error codes whose names begin with PCRE_UTF32_ERR for
- invalid UTF-32 strings, corresponding to the PCRE_UTF8_ERR codes for
- UTF-8 strings that are described in the section entitled "Reason codes
- for invalid UTF-8 strings" in the main pcreapi page. The UTF-32 errors
- are:
-
- PCRE_UTF32_ERR1 Surrogate character (range from 0xd800 to 0xdfff)
- PCRE_UTF32_ERR2 Non-character
- PCRE_UTF32_ERR3 Character > 0x10ffff
-
-
-ERROR TEXTS
-
- If there is an error while compiling a pattern, the error text that is
- passed back by pcre32_compile() or pcre32_compile2() is still an 8-bit
- character string, zero-terminated.
-
-
-CALLOUTS
-
- The subject and mark fields in the callout block that is passed to a
- callout function point to 32-bit vectors.
-
-
-TESTING
-
- The pcretest program continues to operate with 8-bit input and output
- files, but it can be used for testing the 32-bit library. If it is run
- with the command line option -32, patterns and subject strings are con-
- verted from 8-bit to 32-bit before being passed to PCRE, and the 32-bit
- library functions are used instead of the 8-bit ones. Returned 32-bit
- strings are converted to 8-bit for output. If both the 8-bit and the
- 16-bit libraries were not compiled, pcretest defaults to 32-bit and the
- -32 option is ignored.
-
- When PCRE is being built, the RunTest script that is called by "make
- check" uses the pcretest -C option to discover which of the 8-bit,
- 16-bit and 32-bit libraries has been built, and runs the tests appro-
- priately.
-
-
-NOT SUPPORTED IN 32-BIT MODE
-
- Not all the features of the 8-bit library are available with the 32-bit
- library. The C++ and POSIX wrapper functions support only the 8-bit
- library, and the pcregrep program is at present 8-bit only.
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 12 May 2013
- Copyright (c) 1997-2013 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCREBUILD(3) Library Functions Manual PCREBUILD(3)
-
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
-BUILDING PCRE
-
- PCRE is distributed with a configure script that can be used to build
- the library in Unix-like environments using the applications known as
- Autotools. Also in the distribution are files to support building
- using CMake instead of configure. The text file README contains general
- information about building with Autotools (some of which is repeated
- below), and also has some comments about building on various operating
- systems. There is a lot more information about building PCRE without
- using Autotools (including information about using CMake and building
- "by hand") in the text file called NON-AUTOTOOLS-BUILD. You should
- consult this file as well as the README file if you are building in a
- non-Unix-like environment.
-
-
-PCRE BUILD-TIME OPTIONS
-
- The rest of this document describes the optional features of PCRE that
- can be selected when the library is compiled. It assumes use of the
- configure script, where the optional features are selected or dese-
- lected by providing options to configure before running the make com-
- mand. However, the same options can be selected in both Unix-like and
- non-Unix-like environments using the GUI facility of cmake-gui if you
- are using CMake instead of configure to build PCRE.
-
- If you are not using Autotools or CMake, option selection can be done
- by editing the config.h file, or by passing parameter settings to the
- compiler, as described in NON-AUTOTOOLS-BUILD.
-
- The complete list of options for configure (which includes the standard
- ones such as the selection of the installation directory) can be
- obtained by running
-
- ./configure --help
-
- The following sections include descriptions of options whose names
- begin with --enable or --disable. These settings specify changes to the
- defaults for the configure command. Because of the way that configure
- works, --enable and --disable always come in pairs, so the complemen-
- tary option always exists as well, but as it specifies the default, it
- is not described.
-
-
-BUILDING 8-BIT, 16-BIT AND 32-BIT LIBRARIES
-
- By default, a library called libpcre is built, containing functions
- that take string arguments contained in vectors of bytes, either as
- single-byte characters, or interpreted as UTF-8 strings. You can also
- build a separate library, called libpcre16, in which strings are con-
- tained in vectors of 16-bit data units and interpreted either as sin-
- gle-unit characters or UTF-16 strings, by adding
-
- --enable-pcre16
-
- to the configure command. You can also build yet another separate
- library, called libpcre32, in which strings are contained in vectors of
- 32-bit data units and interpreted either as single-unit characters or
- UTF-32 strings, by adding
-
- --enable-pcre32
-
- to the configure command. If you do not want the 8-bit library, add
-
- --disable-pcre8
-
- as well. At least one of the three libraries must be built. Note that
- the C++ and POSIX wrappers are for the 8-bit library only, and that
- pcregrep is an 8-bit program. None of these are built if you select
- only the 16-bit or 32-bit libraries.
-
-
-BUILDING SHARED AND STATIC LIBRARIES
-
- The Autotools PCRE building process uses libtool to build both shared
- and static libraries by default. You can suppress one of these by
- adding one of
-
- --disable-shared
- --disable-static
-
- to the configure command, as required.
-
-
-C++ SUPPORT
-
- By default, if the 8-bit library is being built, the configure script
- will search for a C++ compiler and C++ header files. If it finds them,
- it automatically builds the C++ wrapper library (which supports only
- 8-bit strings). You can disable this by adding
-
- --disable-cpp
-
- to the configure command.
-
-
-UTF-8, UTF-16 AND UTF-32 SUPPORT
-
- To build PCRE with support for UTF Unicode character strings, add
-
- --enable-utf
-
- to the configure command. This setting applies to all three libraries,
- adding support for UTF-8 to the 8-bit library, support for UTF-16 to
- the 16-bit library, and support for UTF-32 to the to the 32-bit
- library. There are no separate options for enabling UTF-8, UTF-16 and
- UTF-32 independently because that would allow ridiculous settings such
- as requesting UTF-16 support while building only the 8-bit library. It
- is not possible to build one library with UTF support and another with-
- out in the same configuration. (For backwards compatibility, --enable-
- utf8 is a synonym of --enable-utf.)
-
- Of itself, this setting does not make PCRE treat strings as UTF-8,
- UTF-16 or UTF-32. As well as compiling PCRE with this option, you also
- have have to set the PCRE_UTF8, PCRE_UTF16 or PCRE_UTF32 option (as
- appropriate) when you call one of the pattern compiling functions.
-
- If you set --enable-utf when compiling in an EBCDIC environment, PCRE
- expects its input to be either ASCII or UTF-8 (depending on the run-
- time option). It is not possible to support both EBCDIC and UTF-8 codes
- in the same version of the library. Consequently, --enable-utf and
- --enable-ebcdic are mutually exclusive.
-
-
-UNICODE CHARACTER PROPERTY SUPPORT
-
- UTF support allows the libraries to process character codepoints up to
- 0x10ffff in the strings that they handle. On its own, however, it does
- not provide any facilities for accessing the properties of such charac-
- ters. If you want to be able to use the pattern escapes \P, \p, and \X,
- which refer to Unicode character properties, you must add
-
- --enable-unicode-properties
-
- to the configure command. This implies UTF support, even if you have
- not explicitly requested it.
-
- Including Unicode property support adds around 30K of tables to the
- PCRE library. Only the general category properties such as Lu and Nd
- are supported. Details are given in the pcrepattern documentation.
-
-
-JUST-IN-TIME COMPILER SUPPORT
-
- Just-in-time compiler support is included in the build by specifying
-
- --enable-jit
-
- This support is available only for certain hardware architectures. If
- this option is set for an unsupported architecture, a compile time
- error occurs. See the pcrejit documentation for a discussion of JIT
- usage. When JIT support is enabled, pcregrep automatically makes use of
- it, unless you add
-
- --disable-pcregrep-jit
-
- to the "configure" command.
-
-
-CODE VALUE OF NEWLINE
-
- By default, PCRE interprets the linefeed (LF) character as indicating
- the end of a line. This is the normal newline character on Unix-like
- systems. You can compile PCRE to use carriage return (CR) instead, by
- adding
-
- --enable-newline-is-cr
-
- to the configure command. There is also a --enable-newline-is-lf
- option, which explicitly specifies linefeed as the newline character.
-
- Alternatively, you can specify that line endings are to be indicated by
- the two character sequence CRLF. If you want this, add
-
- --enable-newline-is-crlf
-
- to the configure command. There is a fourth option, specified by
-
- --enable-newline-is-anycrlf
-
- which causes PCRE to recognize any of the three sequences CR, LF, or
- CRLF as indicating a line ending. Finally, a fifth option, specified by
-
- --enable-newline-is-any
-
- causes PCRE to recognize any Unicode newline sequence.
-
- Whatever line ending convention is selected when PCRE is built can be
- overridden when the library functions are called. At build time it is
- conventional to use the standard for your operating system.
-
-
-WHAT \R MATCHES
-
- By default, the sequence \R in a pattern matches any Unicode newline
- sequence, whatever has been selected as the line ending sequence. If
- you specify
-
- --enable-bsr-anycrlf
-
- the default is changed so that \R matches only CR, LF, or CRLF. What-
- ever is selected when PCRE is built can be overridden when the library
- functions are called.
-
-
-POSIX MALLOC USAGE
-
- When the 8-bit library is called through the POSIX interface (see the
- pcreposix documentation), 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 func-
- tion uses space on the stack, because this is faster than using mal-
- loc() for each call. The default threshold above which the stack is no
- longer used is 10; it can be changed by adding a setting such as
-
- --with-posix-malloc-threshold=20
-
- to the configure command.
-
-
-HANDLING VERY LARGE PATTERNS
-
- Within a compiled pattern, offset values are used to point from one
- part to another (for example, from an opening parenthesis to an alter-
- nation metacharacter). By default, in the 8-bit and 16-bit libraries,
- two-byte values are used for these offsets, leading to a maximum size
- for a compiled pattern of around 64K. This is sufficient to handle all
- but the most gigantic patterns. Nevertheless, some people do want to
- process truly enormous patterns, so it is possible to compile PCRE to
- use three-byte or four-byte offsets by adding a setting such as
-
- --with-link-size=3
-
- to the configure command. The value given must be 2, 3, or 4. For the
- 16-bit library, a value of 3 is rounded up to 4. In these libraries,
- using longer offsets slows down the operation of PCRE because it has to
- load additional data when handling them. For the 32-bit library the
- value is always 4 and cannot be overridden; the value of --with-link-
- size is ignored.
-
-
-AVOIDING EXCESSIVE STACK USAGE
-
- When matching with the pcre_exec() function, PCRE implements backtrack-
- ing by making recursive calls to an internal function called match().
- In environments where the size of the stack is limited, this can se-
- verely limit PCRE's operation. (The Unix environment does not usually
- suffer from this problem, but it may sometimes be necessary to increase
- the maximum stack size. There is a discussion in the pcrestack docu-
- mentation.) An alternative approach to recursion that uses memory from
- the heap to remember data, instead of using recursive function calls,
- has been implemented to work round the problem of limited stack size.
- If you want to build a version of PCRE that works this way, add
-
- --disable-stack-for-recursion
-
- to the configure command. With this configuration, PCRE will use the
- pcre_stack_malloc and pcre_stack_free variables to call memory manage-
- ment functions. By default these point to malloc() and free(), but you
- can replace the pointers so that your own functions are used instead.
-
- Separate functions are provided rather than using pcre_malloc and
- pcre_free because the usage is very predictable: the block sizes
- requested are always the same, and the blocks are always freed in
- reverse order. A calling program might be able to implement optimized
- functions that perform better than malloc() and free(). PCRE runs
- noticeably more slowly when built in this way. This option affects only
- the pcre_exec() function; it is not relevant for pcre_dfa_exec().
-
-
-LIMITING PCRE RESOURCE USAGE
-
- Internally, PCRE has a function called match(), which it calls repeat-
- edly (sometimes recursively) when matching a pattern with the
- pcre_exec() function. By controlling the maximum number of times this
- function may be called during a single matching operation, a limit can
- be placed on the resources used by a single call to pcre_exec(). The
- limit can be changed at run time, as described in the pcreapi documen-
- tation. The default is 10 million, but this can be changed by adding a
- setting such as
-
- --with-match-limit=500000
-
- to the configure command. This setting has no effect on the
- pcre_dfa_exec() matching function.
-
- In some environments it is desirable to limit the depth of recursive
- calls of match() more strictly than the total number of calls, in order
- to restrict the maximum amount of stack (or heap, if --disable-stack-
- for-recursion is specified) that is used. A second limit controls this;
- it defaults to the value that is set for --with-match-limit, which
- imposes no additional constraints. However, you can set a lower limit
- by adding, for example,
-
- --with-match-limit-recursion=10000
-
- to the configure command. This value can also be overridden at run
- time.
-
-
-CREATING CHARACTER TABLES AT BUILD TIME
-
- PCRE uses fixed tables for processing characters whose code values are
- less than 256. By default, PCRE is built with a set of tables that are
- distributed in the file pcre_chartables.c.dist. These tables are for
- ASCII codes only. If you add
-
- --enable-rebuild-chartables
-
- to the configure command, the distributed tables are no longer used.
- Instead, a program called dftables is compiled and run. This outputs
- the source for new set of tables, created in the default locale of your
- C run-time system. (This method of replacing the tables does not work
- if you are cross compiling, because dftables is run on the local host.
- If you need to create alternative tables when cross compiling, you will
- have to do so "by hand".)
-
-
-USING EBCDIC CODE
-
- PCRE assumes by default that it will run in an environment where the
- character code is ASCII (or Unicode, which is a superset of ASCII).
- This is the case for most computer operating systems. PCRE can, how-
- ever, be compiled to run in an EBCDIC environment by adding
-
- --enable-ebcdic
-
- to the configure command. This setting implies --enable-rebuild-charta-
- bles. You should only use it if you know that you are in an EBCDIC
- environment (for example, an IBM mainframe operating system). The
- --enable-ebcdic option is incompatible with --enable-utf.
-
- The EBCDIC character that corresponds to an ASCII LF is assumed to have
- the value 0x15 by default. However, in some EBCDIC environments, 0x25
- is used. In such an environment you should use
-
- --enable-ebcdic-nl25
-
- as well as, or instead of, --enable-ebcdic. The EBCDIC character for CR
- has the same value as in ASCII, namely, 0x0d. Whichever of 0x15 and
- 0x25 is not chosen as LF is made to correspond to the Unicode NEL char-
- acter (which, in Unicode, is 0x85).
-
- The options that select newline behaviour, such as --enable-newline-is-
- cr, and equivalent run-time options, refer to these character values in
- an EBCDIC environment.
-
-
-PCREGREP OPTIONS FOR COMPRESSED FILE SUPPORT
-
- By default, pcregrep reads all files as plain text. You can build it so
- that it recognizes files whose names end in .gz or .bz2, and reads them
- with libz or libbz2, respectively, by adding one or both of
-
- --enable-pcregrep-libz
- --enable-pcregrep-libbz2
-
- to the configure command. These options naturally require that the rel-
- evant libraries are installed on your system. Configuration will fail
- if they are not.
-
-
-PCREGREP BUFFER SIZE
-
- pcregrep uses an internal buffer to hold a "window" on the file it is
- scanning, in order to be able to output "before" and "after" lines when
- it finds a match. The size of the buffer is controlled by a parameter
- whose default value is 20K. The buffer itself is three times this size,
- but because of the way it is used for holding "before" lines, the long-
- est line that is guaranteed to be processable is the parameter size.
- You can change the default parameter value by adding, for example,
-
- --with-pcregrep-bufsize=50K
-
- to the configure command. The caller of pcregrep can, however, override
- this value by specifying a run-time option.
-
-
-PCRETEST OPTION FOR LIBREADLINE SUPPORT
-
- If you add
-
- --enable-pcretest-libreadline
-
- to the configure command, pcretest is linked with the libreadline
- library, and when its input is from a terminal, it reads it using the
- readline() function. This provides line-editing and history facilities.
- Note that libreadline is GPL-licensed, so if you distribute a binary of
- pcretest linked in this way, there may be licensing issues.
-
- Setting this option causes the -lreadline option to be added to the
- pcretest build. In many operating environments with a sytem-installed
- libreadline this is sufficient. However, in some environments (e.g. if
- an unmodified distribution version of readline is in use), some extra
- configuration may be necessary. The INSTALL file for libreadline says
- this:
-
- "Readline uses the termcap functions, but does not link with the
- termcap or curses library itself, allowing applications which link
- with readline the to choose an appropriate library."
-
- If your environment has not been set up so that an appropriate library
- is automatically included, you may need to add something like
-
- LIBS="-ncurses"
-
- immediately before the configure command.
-
-
-DEBUGGING WITH VALGRIND SUPPORT
-
- By adding the
-
- --enable-valgrind
-
- option to to the configure command, PCRE will use valgrind annotations
- to mark certain memory regions as unaddressable. This allows it to
- detect invalid memory accesses, and is mostly useful for debugging PCRE
- itself.
-
-
-CODE COVERAGE REPORTING
-
- If your C compiler is gcc, you can build a version of PCRE that can
- generate a code coverage report for its test suite. To enable this, you
- must install lcov version 1.6 or above. Then specify
-
- --enable-coverage
-
- to the configure command and build PCRE in the usual way.
-
- Note that using ccache (a caching C compiler) is incompatible with code
- coverage reporting. If you have configured ccache to run automatically
- on your system, you must set the environment variable
-
- CCACHE_DISABLE=1
-
- before running make to build PCRE, so that ccache is not used.
-
- When --enable-coverage is used, the following addition targets are
- added to the Makefile:
-
- make coverage
-
- This creates a fresh coverage report for the PCRE test suite. It is
- equivalent to running "make coverage-reset", "make coverage-baseline",
- "make check", and then "make coverage-report".
-
- make coverage-reset
-
- This zeroes the coverage counters, but does nothing else.
-
- make coverage-baseline
-
- This captures baseline coverage information.
-
- make coverage-report
-
- This creates the coverage report.
-
- make coverage-clean-report
-
- This removes the generated coverage report without cleaning the cover-
- age data itself.
-
- make coverage-clean-data
-
- This removes the captured coverage data without removing the coverage
- files created at compile time (*.gcno).
-
- make coverage-clean
-
- This cleans all coverage data including the generated coverage report.
- For more information about code coverage, see the gcov and lcov docu-
- mentation.
-
-
-SEE ALSO
-
- pcreapi(3), pcre16, pcre32, pcre_config(3).
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 12 May 2013
- Copyright (c) 1997-2013 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCREMATCHING(3) Library Functions Manual PCREMATCHING(3)
-
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
-PCRE MATCHING ALGORITHMS
-
- This document describes the two different algorithms that are available
- in PCRE for matching a compiled regular expression against a given sub-
- ject string. The "standard" algorithm is the one provided by the
- pcre_exec(), pcre16_exec() and pcre32_exec() functions. These work in
- the same as as Perl's matching function, and provide a Perl-compatible
- matching operation. The just-in-time (JIT) optimization that is
- described in the pcrejit documentation is compatible with these func-
- tions.
-
- An alternative algorithm is provided by the pcre_dfa_exec(),
- pcre16_dfa_exec() and pcre32_dfa_exec() functions; they operate in a
- different way, and are not Perl-compatible. This alternative has advan-
- tages and disadvantages compared with the standard algorithm, and these
- are described below.
-
- When there is only one possible way in which a given subject string can
- match a pattern, the two algorithms give the same answer. A difference
- arises, however, when there are multiple possibilities. For example, if
- the pattern
-
- ^<.*>
-
- is matched against the string
-
- <something> <something else> <something further>
-
- there are three possible answers. The standard algorithm finds only one
- of them, whereas the alternative algorithm finds all three.
-
-
-REGULAR EXPRESSIONS AS TREES
-
- The set of strings that are matched by a regular expression can be rep-
- resented as a tree structure. An unlimited repetition in the pattern
- makes the tree of infinite size, but it is still a tree. Matching the
- pattern to a given subject string (from a given starting point) can be
- thought of as a search of the tree. There are two ways to search a
- tree: depth-first and breadth-first, and these correspond to the two
- matching algorithms provided by PCRE.
-
-
-THE STANDARD MATCHING ALGORITHM
-
- In the terminology of Jeffrey Friedl's book "Mastering Regular Expres-
- sions", the standard algorithm is an "NFA algorithm". It conducts a
- depth-first search of the pattern tree. That is, it proceeds along a
- single path through the tree, checking that the subject matches what is
- required. When there is a mismatch, the algorithm tries any alterna-
- tives at the current point, and if they all fail, it backs up to the
- previous branch point in the tree, and tries the next alternative
- branch at that level. This often involves backing up (moving to the
- left) in the subject string as well. The order in which repetition
- branches are tried is controlled by the greedy or ungreedy nature of
- the quantifier.
-
- If a leaf node is reached, a matching string has been found, and at
- that point the algorithm stops. Thus, if there is more than one possi-
- ble match, this algorithm returns the first one that it finds. Whether
- this is the shortest, the longest, or some intermediate length depends
- on the way the greedy and ungreedy repetition quantifiers are specified
- in the pattern.
-
- Because it ends up with a single path through the tree, it is rela-
- tively straightforward for this algorithm to keep track of the sub-
- strings that are matched by portions of the pattern in parentheses.
- This provides support for capturing parentheses and back references.
-
-
-THE ALTERNATIVE MATCHING ALGORITHM
-
- This algorithm conducts a breadth-first search of the tree. Starting
- from the first matching point in the subject, it scans the subject
- string from left to right, once, character by character, and as it does
- this, it remembers all the paths through the tree that represent valid
- matches. In Friedl's terminology, this is a kind of "DFA algorithm",
- though it is not implemented as a traditional finite state machine (it
- keeps multiple states active simultaneously).
-
- Although the general principle of this matching algorithm is that it
- scans the subject string only once, without backtracking, there is one
- exception: when a lookaround assertion is encountered, the characters
- following or preceding the current point have to be independently
- inspected.
-
- The scan continues until either the end of the subject is reached, or
- there are no more unterminated paths. At this point, terminated paths
- represent the different matching possibilities (if there are none, the
- match has failed). Thus, if there is more than one possible match,
- this algorithm finds all of them, and in particular, it finds the long-
- est. The matches are returned in decreasing order of length. There is
- an option to stop the algorithm after the first match (which is neces-
- sarily the shortest) is found.
-
- Note that all the matches that are found start at the same point in the
- subject. If the pattern
-
- cat(er(pillar)?)?
-
- is matched against the string "the caterpillar catchment", the result
- will be the three strings "caterpillar", "cater", and "cat" that start
- at the fifth character of the subject. The algorithm does not automati-
- cally move on to find matches that start at later positions.
-
- PCRE's "auto-possessification" optimization usually applies to charac-
- ter repeats at the end of a pattern (as well as internally). For exam-
- ple, the pattern "a\d+" is compiled as if it were "a\d++" because there
- is no point even considering the possibility of backtracking into the
- repeated digits. For DFA matching, this means that only one possible
- match is found. If you really do want multiple matches in such cases,
- either use an ungreedy repeat ("a\d+?") or set the PCRE_NO_AUTO_POSSESS
- option when compiling.
-
- There are a number of features of PCRE regular expressions that are not
- supported by the alternative matching algorithm. They are as follows:
-
- 1. Because the algorithm finds all possible matches, the greedy or
- ungreedy nature of repetition quantifiers is not relevant. Greedy and
- ungreedy quantifiers are treated in exactly the same way. However, pos-
- sessive quantifiers can make a difference when what follows could also
- match what is quantified, for example in a pattern like this:
-
- ^a++\w!
-
- This pattern matches "aaab!" but not "aaa!", which would be matched by
- a non-possessive quantifier. Similarly, if an atomic group is present,
- it is matched as if it were a standalone pattern at the current point,
- and the longest match is then "locked in" for the rest of the overall
- pattern.
-
- 2. When dealing with multiple paths through the tree simultaneously, it
- is not straightforward to keep track of captured substrings for the
- different matching possibilities, and PCRE's implementation of this
- algorithm does not attempt to do this. This means that no captured sub-
- strings are available.
-
- 3. Because no substrings are captured, back references within the pat-
- tern are not supported, and cause errors if encountered.
-
- 4. For the same reason, conditional expressions that use a backrefer-
- ence as the condition or test for a specific group recursion are not
- supported.
-
- 5. Because many paths through the tree may be active, the \K escape
- sequence, which resets the start of the match when encountered (but may
- be on some paths and not on others), is not supported. It causes an
- error if encountered.
-
- 6. Callouts are supported, but the value of the capture_top field is
- always 1, and the value of the capture_last field is always -1.
-
- 7. The \C escape sequence, which (in the standard algorithm) always
- matches a single data unit, even in UTF-8, UTF-16 or UTF-32 modes, is
- not supported in these modes, because the alternative algorithm moves
- through the subject string one character (not data unit) at a time, for
- all active paths through the tree.
-
- 8. Except for (*FAIL), the backtracking control verbs such as (*PRUNE)
- are not supported. (*FAIL) is supported, and behaves like a failing
- negative assertion.
-
-
-ADVANTAGES OF THE ALTERNATIVE ALGORITHM
-
- Using the alternative matching algorithm provides the following advan-
- tages:
-
- 1. All possible matches (at a single point in the subject) are automat-
- ically found, and in particular, the longest match is found. To find
- more than one match using the standard algorithm, you have to do kludgy
- things with callouts.
-
- 2. Because the alternative algorithm scans the subject string just
- once, and never needs to backtrack (except for lookbehinds), it is pos-
- sible to pass very long subject strings to the matching function in
- several pieces, checking for partial matching each time. Although it is
- possible to do multi-segment matching using the standard algorithm by
- retaining partially matched substrings, it is more complicated. The
- pcrepartial documentation gives details of partial matching and dis-
- cusses multi-segment matching.
-
-
-DISADVANTAGES OF THE ALTERNATIVE ALGORITHM
-
- The alternative algorithm suffers from a number of disadvantages:
-
- 1. It is substantially slower than the standard algorithm. This is
- partly because it has to search for all possible matches, but is also
- because it is less susceptible to optimization.
-
- 2. Capturing parentheses and back references are not supported.
-
- 3. Although atomic groups are supported, their use does not provide the
- performance advantage that it does for the standard algorithm.
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 12 November 2013
- Copyright (c) 1997-2012 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCREAPI(3) Library Functions Manual PCREAPI(3)
-
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
- #include <pcre.h>
-
-
-PCRE NATIVE API BASIC FUNCTIONS
-
- pcre *pcre_compile(const char *pattern, int options,
- const char **errptr, int *erroffset,
- const unsigned char *tableptr);
-
- pcre *pcre_compile2(const char *pattern, int options,
- int *errorcodeptr,
- const char **errptr, int *erroffset,
- const unsigned char *tableptr);
-
- pcre_extra *pcre_study(const pcre *code, int options,
- const char **errptr);
-
- void pcre_free_study(pcre_extra *extra);
-
- int pcre_exec(const pcre *code, const pcre_extra *extra,
- const char *subject, int length, int startoffset,
- int options, int *ovector, int ovecsize);
-
- 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);
-
-
-PCRE NATIVE API STRING EXTRACTION FUNCTIONS
-
- int pcre_copy_named_substring(const pcre *code,
- const char *subject, int *ovector,
- int stringcount, const char *stringname,
- char *buffer, int buffersize);
-
- int pcre_copy_substring(const char *subject, int *ovector,
- int stringcount, int stringnumber, char *buffer,
- int buffersize);
-
- int pcre_get_named_substring(const pcre *code,
- const char *subject, int *ovector,
- int stringcount, const char *stringname,
- const char **stringptr);
-
- int pcre_get_stringnumber(const pcre *code,
- const char *name);
-
- int pcre_get_stringtable_entries(const pcre *code,
- const char *name, char **first, char **last);
-
- int pcre_get_substring(const char *subject, int *ovector,
- int stringcount, int stringnumber,
- const char **stringptr);
-
- int pcre_get_substring_list(const char *subject,
- int *ovector, int stringcount, const char ***listptr);
-
- void pcre_free_substring(const char *stringptr);
-
- void pcre_free_substring_list(const char **stringptr);
-
-
-PCRE NATIVE API AUXILIARY FUNCTIONS
-
- int pcre_jit_exec(const pcre *code, const pcre_extra *extra,
- const char *subject, int length, int startoffset,
- int options, int *ovector, int ovecsize,
- pcre_jit_stack *jstack);
-
- pcre_jit_stack *pcre_jit_stack_alloc(int startsize, int maxsize);
-
- void pcre_jit_stack_free(pcre_jit_stack *stack);
-
- void pcre_assign_jit_stack(pcre_extra *extra,
- pcre_jit_callback callback, void *data);
-
- const unsigned char *pcre_maketables(void);
-
- int pcre_fullinfo(const pcre *code, const pcre_extra *extra,
- int what, void *where);
-
- int pcre_refcount(pcre *code, int adjust);
-
- int pcre_config(int what, void *where);
-
- const char *pcre_version(void);
-
- int pcre_pattern_to_host_byte_order(pcre *code,
- pcre_extra *extra, const unsigned char *tables);
-
-
-PCRE NATIVE API INDIRECTED FUNCTIONS
-
- void *(*pcre_malloc)(size_t);
-
- void (*pcre_free)(void *);
-
- void *(*pcre_stack_malloc)(size_t);
-
- void (*pcre_stack_free)(void *);
-
- int (*pcre_callout)(pcre_callout_block *);
-
- int (*pcre_stack_guard)(void);
-
-
-PCRE 8-BIT, 16-BIT, AND 32-BIT LIBRARIES
-
- As well as support for 8-bit character strings, PCRE also supports
- 16-bit strings (from release 8.30) and 32-bit strings (from release
- 8.32), by means of two additional libraries. They can be built as well
- as, or instead of, the 8-bit library. To avoid too much complication,
- this document describes the 8-bit versions of the functions, with only
- occasional references to the 16-bit and 32-bit libraries.
-
- The 16-bit and 32-bit functions operate in the same way as their 8-bit
- counterparts; they just use different data types for their arguments
- and results, and their names start with pcre16_ or pcre32_ instead of
- pcre_. For every option that has UTF8 in its name (for example,
- PCRE_UTF8), there are corresponding 16-bit and 32-bit names with UTF8
- replaced by UTF16 or UTF32, respectively. This facility is in fact just
- cosmetic; the 16-bit and 32-bit option names define the same bit val-
- ues.
-
- References to bytes and UTF-8 in this document should be read as refer-
- ences to 16-bit data units and UTF-16 when using the 16-bit library, or
- 32-bit data units and UTF-32 when using the 32-bit library, unless
- specified otherwise. More details of the specific differences for the
- 16-bit and 32-bit libraries are given in the pcre16 and pcre32 pages.
-
-
-PCRE API OVERVIEW
-
- PCRE has its own native API, which is described in this document. There
- are also some wrapper functions (for the 8-bit library only) that cor-
- respond to the POSIX regular expression API, but they do not give
- access to all the functionality. They are described in the pcreposix
- documentation. Both of these APIs define a set of C function calls. A
- C++ wrapper (again for the 8-bit library only) is also distributed with
- PCRE. It is documented in the pcrecpp page.
-
- The native API C function prototypes are defined in the header file
- pcre.h, and on Unix-like systems the (8-bit) library itself is called
- libpcre. It can normally be accessed by adding -lpcre to the command
- for linking an application that uses PCRE. The header file defines the
- macros PCRE_MAJOR and PCRE_MINOR to contain the major and minor release
- numbers for the library. Applications can use these to include support
- for different releases of PCRE.
-
- In a Windows environment, if you want to statically link an application
- program against a non-dll pcre.a file, you must define PCRE_STATIC
- before including pcre.h or pcrecpp.h, because otherwise the pcre_mal-
- loc() and pcre_free() exported functions will be declared
- __declspec(dllimport), with unwanted results.
-
- The functions pcre_compile(), pcre_compile2(), pcre_study(), and
- pcre_exec() are used for compiling and matching regular expressions in
- a Perl-compatible manner. A sample program that demonstrates the sim-
- plest way of using them is provided in the file called pcredemo.c in
- the PCRE source distribution. A listing of this program is given in the
- pcredemo documentation, and the pcresample documentation describes how
- to compile and run it.
-
- Just-in-time compiler support is an optional feature of PCRE that can
- be built in appropriate hardware environments. It greatly speeds up the
- matching performance of many patterns. Simple programs can easily
- request that it be used if available, by setting an option that is
- ignored when it is not relevant. More complicated programs might need
- to make use of the functions pcre_jit_stack_alloc(),
- pcre_jit_stack_free(), and pcre_assign_jit_stack() in order to control
- the JIT code's memory usage.
-
- From release 8.32 there is also a direct interface for JIT execution,
- which gives improved performance. The JIT-specific functions are dis-
- cussed in the pcrejit documentation.
-
- A second matching function, pcre_dfa_exec(), which is not Perl-compati-
- ble, is also provided. This uses a different algorithm for the match-
- ing. The alternative algorithm finds all possible matches (at a given
- point in the subject), and scans the subject just once (unless there
- are lookbehind assertions). However, this algorithm does not return
- captured substrings. A description of the two matching algorithms and
- their advantages and disadvantages is given in the pcrematching docu-
- mentation.
-
- In addition to the main compiling and matching functions, there are
- convenience functions for extracting captured substrings from a subject
- string that is matched by pcre_exec(). They are:
-
- pcre_copy_substring()
- pcre_copy_named_substring()
- pcre_get_substring()
- pcre_get_named_substring()
- pcre_get_substring_list()
- pcre_get_stringnumber()
- pcre_get_stringtable_entries()
-
- pcre_free_substring() and pcre_free_substring_list() are also provided,
- to free the memory used for extracted strings.
-
- The function pcre_maketables() is used to build a set of character
- tables in the current locale for passing to pcre_compile(),
- pcre_exec(), or pcre_dfa_exec(). This is an optional facility that is
- provided for specialist use. Most commonly, no special tables are
- passed, in which case internal tables that are generated when PCRE is
- built are used.
-
- The function pcre_fullinfo() is used to find out information about a
- compiled pattern. The function pcre_version() returns a pointer to a
- string containing the version of PCRE and its date of release.
-
- The function pcre_refcount() maintains a reference count in a data
- block containing a compiled pattern. This is provided for the benefit
- of object-oriented applications.
-
- The global variables pcre_malloc and pcre_free initially contain the
- entry points of the standard malloc() and free() functions, respec-
- tively. PCRE calls the memory management functions via these variables,
- so a calling program can replace them if it wishes to intercept the
- calls. This should be done before calling any PCRE functions.
-
- The global variables pcre_stack_malloc and pcre_stack_free are also
- indirections to memory management functions. These special functions
- are used only when PCRE is compiled to use the heap for remembering
- data, instead of recursive function calls, when running the pcre_exec()
- function. See the pcrebuild documentation for details of how to do
- this. It is a non-standard way of building PCRE, for use in environ-
- ments that have limited stacks. Because of the greater use of memory
- management, it runs more slowly. Separate functions are provided so
- that special-purpose external code can be used for this case. When
- used, these functions always allocate memory blocks of the same size.
- There is a discussion about PCRE's stack usage in the pcrestack docu-
- mentation.
-
- The global variable pcre_callout initially contains NULL. It can be set
- by the caller to a "callout" function, which PCRE will then call at
- specified points during a matching operation. Details are given in the
- pcrecallout documentation.
-
- The global variable pcre_stack_guard initially contains NULL. It can be
- set by the caller to a function that is called by PCRE whenever it
- starts to compile a parenthesized part of a pattern. When parentheses
- are nested, PCRE uses recursive function calls, which use up the system
- stack. This function is provided so that applications with restricted
- stacks can force a compilation error if the stack runs out. The func-
- tion should return zero if all is well, or non-zero to force an error.
-
-
-NEWLINES
-
- PCRE supports five different conventions for indicating line breaks in
- strings: a single CR (carriage return) character, a single LF (line-
- feed) character, the two-character sequence CRLF, any of the three pre-
- ceding, or any Unicode newline sequence. The Unicode newline sequences
- are the three just mentioned, plus the single characters VT (vertical
- tab, U+000B), FF (form feed, U+000C), NEL (next line, U+0085), LS (line
- separator, U+2028), and PS (paragraph separator, U+2029).
-
- Each of the first three conventions is used by at least one operating
- system as its standard newline sequence. When PCRE is built, a default
- can be specified. The default default is LF, which is the Unix stan-
- dard. When PCRE is run, the default can be overridden, either when a
- pattern is compiled, or when it is matched.
-
- At compile time, the newline convention can be specified by the options
- argument of pcre_compile(), or it can be specified by special text at
- the start of the pattern itself; this overrides any other settings. See
- the pcrepattern page for details of the special character sequences.
-
- In the PCRE documentation the word "newline" is used to mean "the char-
- acter or pair of characters that indicate a line break". The choice of
- newline convention affects the handling of the dot, circumflex, and
- dollar metacharacters, the handling of #-comments in /x mode, and, when
- CRLF is a recognized line ending sequence, the match position advance-
- ment for a non-anchored pattern. There is more detail about this in the
- section on pcre_exec() options below.
-
- The choice of newline convention does not affect the interpretation of
- the \n or \r escape sequences, nor does it affect what \R matches,
- which is controlled in a similar way, but by separate options.
-
-
-MULTITHREADING
-
- The PCRE functions can be used in multi-threading applications, with
- the proviso that the memory management functions pointed to by
- pcre_malloc, pcre_free, pcre_stack_malloc, and pcre_stack_free, and the
- callout and stack-checking functions pointed to by pcre_callout and
- pcre_stack_guard, are shared by all threads.
-
- The compiled form of a regular expression is not altered during match-
- ing, so the same compiled pattern can safely be used by several threads
- at once.
-
- If the just-in-time optimization feature is being used, it needs sepa-
- rate memory stack areas for each thread. See the pcrejit documentation
- for more details.
-
-
-SAVING PRECOMPILED PATTERNS FOR LATER USE
-
- The compiled form of a regular expression can be saved and re-used at a
- later time, possibly by a different program, and even on a host other
- than the one on which it was compiled. Details are given in the
- pcreprecompile documentation, which includes a description of the
- pcre_pattern_to_host_byte_order() function. However, compiling a regu-
- lar expression with one version of PCRE for use with a different ver-
- sion is not guaranteed to work and may cause crashes.
-
-
-CHECKING BUILD-TIME OPTIONS
-
- int pcre_config(int what, void *where);
-
- The function pcre_config() makes it possible for a PCRE client to dis-
- cover which optional features have been compiled into the PCRE library.
- The pcrebuild documentation has more details about these optional fea-
- tures.
-
- The first argument for pcre_config() is an integer, specifying which
- information is required; the second argument is a pointer to a variable
- into which the information is placed. The returned value is zero on
- success, or the negative error code PCRE_ERROR_BADOPTION if the value
- in the first argument is not recognized. The following information is
- available:
-
- PCRE_CONFIG_UTF8
-
- The output is an integer that is set to one if UTF-8 support is avail-
- able; otherwise it is set to zero. This value should normally be given
- to the 8-bit version of this function, pcre_config(). If it is given to
- the 16-bit or 32-bit version of this function, the result is
- PCRE_ERROR_BADOPTION.
-
- PCRE_CONFIG_UTF16
-
- The output is an integer that is set to one if UTF-16 support is avail-
- able; otherwise it is set to zero. This value should normally be given
- to the 16-bit version of this function, pcre16_config(). If it is given
- to the 8-bit or 32-bit version of this function, the result is
- PCRE_ERROR_BADOPTION.
-
- PCRE_CONFIG_UTF32
-
- The output is an integer that is set to one if UTF-32 support is avail-
- able; otherwise it is set to zero. This value should normally be given
- to the 32-bit version of this function, pcre32_config(). If it is given
- to the 8-bit or 16-bit version of this function, the result is
- PCRE_ERROR_BADOPTION.
-
- PCRE_CONFIG_UNICODE_PROPERTIES
-
- The output is an integer that is set to one if support for Unicode
- character properties is available; otherwise it is set to zero.
-
- PCRE_CONFIG_JIT
-
- The output is an integer that is set to one if support for just-in-time
- compiling is available; otherwise it is set to zero.
-
- PCRE_CONFIG_JITTARGET
-
- The output is a pointer to a zero-terminated "const char *" string. If
- JIT support is available, the string contains the name of the architec-
- ture for which the JIT compiler is configured, for example "x86 32bit
- (little endian + unaligned)". If JIT support is not available, the
- result is NULL.
-
- PCRE_CONFIG_NEWLINE
-
- The output is an integer whose value specifies the default character
- sequence that is recognized as meaning "newline". The values that are
- supported in ASCII/Unicode environments are: 10 for LF, 13 for CR, 3338
- for CRLF, -2 for ANYCRLF, and -1 for ANY. In EBCDIC environments, CR,
- ANYCRLF, and ANY yield the same values. However, the value for LF is
- normally 21, though some EBCDIC environments use 37. The corresponding
- values for CRLF are 3349 and 3365. The default should normally corre-
- spond to the standard sequence for your operating system.
-
- PCRE_CONFIG_BSR
-
- The output is an integer whose value indicates what character sequences
- the \R escape sequence matches by default. A value of 0 means that \R
- matches any Unicode line ending sequence; a value of 1 means that \R
- matches only CR, LF, or CRLF. The default can be overridden when a pat-
- tern is compiled or matched.
-
- PCRE_CONFIG_LINK_SIZE
-
- The output is an integer that contains the number of bytes used for
- internal linkage in compiled regular expressions. For the 8-bit
- library, the value can be 2, 3, or 4. For the 16-bit library, the value
- is either 2 or 4 and is still a number of bytes. For the 32-bit
- library, the value is either 2 or 4 and is still a number of bytes. The
- default value of 2 is sufficient for all but the most massive patterns,
- since it allows the compiled pattern to be up to 64K in size. Larger
- values allow larger regular expressions to be compiled, at the expense
- of slower matching.
-
- PCRE_CONFIG_POSIX_MALLOC_THRESHOLD
-
- The output is an integer that contains the threshold above which the
- POSIX interface uses malloc() for output vectors. Further details are
- given in the pcreposix documentation.
-
- PCRE_CONFIG_PARENS_LIMIT
-
- The output is a long integer that gives the maximum depth of nesting of
- parentheses (of any kind) in a pattern. This limit is imposed to cap
- the amount of system stack used when a pattern is compiled. It is spec-
- ified when PCRE is built; the default is 250. This limit does not take
- into account the stack that may already be used by the calling applica-
- tion. For finer control over compilation stack usage, you can set a
- pointer to an external checking function in pcre_stack_guard.
-
- PCRE_CONFIG_MATCH_LIMIT
-
- The output is a long integer that gives the default limit for the num-
- ber of internal matching function calls in a pcre_exec() execution.
- Further details are given with pcre_exec() below.
-
- PCRE_CONFIG_MATCH_LIMIT_RECURSION
-
- The output is a long integer that gives the default limit for the depth
- of recursion when calling the internal matching function in a
- pcre_exec() execution. Further details are given with pcre_exec()
- below.
-
- PCRE_CONFIG_STACKRECURSE
-
- The output is an integer that is set to one if internal recursion when
- running pcre_exec() is implemented by recursive function calls that use
- the stack to remember their state. This is the usual way that PCRE is
- compiled. The output is zero if PCRE was compiled to use blocks of data
- on the heap instead of recursive function calls. In this case,
- pcre_stack_malloc and pcre_stack_free are called to manage memory
- blocks on the heap, thus avoiding the use of the stack.
-
-
-COMPILING A PATTERN
-
- pcre *pcre_compile(const char *pattern, int options,
- const char **errptr, int *erroffset,
- const unsigned char *tableptr);
-
- pcre *pcre_compile2(const char *pattern, int options,
- int *errorcodeptr,
- const char **errptr, int *erroffset,
- const unsigned char *tableptr);
-
- Either of the functions pcre_compile() or pcre_compile2() can be called
- to compile a pattern into an internal form. The only difference between
- the two interfaces is that pcre_compile2() has an additional argument,
- errorcodeptr, via which a numerical error code can be returned. To
- avoid too much repetition, we refer just to pcre_compile() below, but
- the information applies equally to pcre_compile2().
-
- The pattern is a C string terminated by a binary zero, and is passed in
- the pattern argument. A pointer to a single block of memory that is
- obtained via pcre_malloc is returned. This contains the compiled code
- and related data. The pcre type is defined for the returned block; this
- is a typedef for a structure whose contents are not externally defined.
- It is up to the caller to free the memory (via pcre_free) when it is no
- longer required.
-
- Although the compiled code of a PCRE regex is relocatable, that is, it
- does not depend on memory location, the complete pcre data block is not
- fully relocatable, because it may contain a copy of the tableptr argu-
- ment, which is an address (see below).
-
- The options argument contains various bit settings that affect the com-
- pilation. It should be zero if no options are required. The available
- options are described below. Some of them (in particular, those that
- are compatible with Perl, but some others as well) can also be set and
- unset from within the pattern (see the detailed description in the
- pcrepattern documentation). For those options that can be different in
- different parts of the pattern, the contents of the options argument
- specifies their settings at the start of compilation and execution. The
- PCRE_ANCHORED, PCRE_BSR_xxx, PCRE_NEWLINE_xxx, PCRE_NO_UTF8_CHECK, and
- PCRE_NO_START_OPTIMIZE options can be set at the time of matching as
- well as at compile time.
-
- If errptr is NULL, pcre_compile() returns NULL immediately. Otherwise,
- if compilation of a pattern fails, pcre_compile() returns NULL, and
- sets the variable pointed to by errptr to point to a textual error mes-
- sage. This is a static string that is part of the library. You must not
- try to free it. Normally, the offset from the start of the pattern to
- the data unit that was being processed when the error was discovered is
- placed in the variable pointed to by erroffset, which must not be NULL
- (if it is, an immediate error is given). However, for an invalid UTF-8
- or UTF-16 string, the offset is that of the first data unit of the
- failing character.
-
- Some errors are not detected until the whole pattern has been scanned;
- in these cases, the offset passed back is the length of the pattern.
- Note that the offset is in data units, not characters, even in a UTF
- mode. It may sometimes point into the middle of a UTF-8 or UTF-16 char-
- acter.
-
- If pcre_compile2() is used instead of pcre_compile(), and the error-
- codeptr argument is not NULL, a non-zero error code number is returned
- via this argument in the event of an error. This is in addition to the
- textual error message. Error codes and messages are listed below.
-
- If the final argument, tableptr, is NULL, PCRE uses a default set of
- character tables that are built when PCRE is compiled, using the
- default C locale. Otherwise, tableptr must be an address that is the
- result of a call to pcre_maketables(). This value is stored with the
- compiled pattern, and used again by pcre_exec() and pcre_dfa_exec()
- when the pattern is matched. For more discussion, see the section on
- locale support below.
-
- This code fragment shows a typical straightforward call to pcre_com-
- pile():
-
- pcre *re;
- const char *error;
- int erroffset;
- re = pcre_compile(
- "^A.*Z", /* the pattern */
- 0, /* default options */
- &error, /* for error message */
- &erroffset, /* for error offset */
- NULL); /* use default character tables */
-
- The following names for option bits are defined in the pcre.h header
- file:
-
- PCRE_ANCHORED
-
- If this bit is set, the pattern is forced to be "anchored", that is, it
- is constrained to match only at the first matching point in the string
- that is being searched (the "subject string"). This effect can also be
- achieved by appropriate constructs in the pattern itself, which is the
- only way to do it in Perl.
-
- PCRE_AUTO_CALLOUT
-
- If this bit is set, pcre_compile() automatically inserts callout items,
- all with number 255, before each pattern item. For discussion of the
- callout facility, see the pcrecallout documentation.
-
- PCRE_BSR_ANYCRLF
- PCRE_BSR_UNICODE
-
- These options (which are mutually exclusive) control what the \R escape
- sequence matches. The choice is either to match only CR, LF, or CRLF,
- or to match any Unicode newline sequence. The default is specified when
- PCRE is built. It can be overridden from within the pattern, or by set-
- ting an option when a compiled pattern is matched.
-
- PCRE_CASELESS
-
- If this bit is set, letters in the pattern match both upper and lower
- case letters. It is equivalent to Perl's /i option, and it can be
- changed within a pattern by a (?i) option setting. In UTF-8 mode, PCRE
- always understands the concept of case for characters whose values are
- less than 128, so caseless matching is always possible. For characters
- with higher values, the concept of case is supported if PCRE is com-
- piled with Unicode property support, but not otherwise. If you want to
- use caseless matching for characters 128 and above, you must ensure
- that PCRE is compiled with Unicode property support as well as with
- UTF-8 support.
-
- PCRE_DOLLAR_ENDONLY
-
- If this bit is set, a dollar metacharacter in the pattern matches only
- at the end of the subject string. Without this option, a dollar also
- matches immediately before a newline at the end of the string (but not
- before any other newlines). The PCRE_DOLLAR_ENDONLY option is ignored
- if PCRE_MULTILINE is set. There is no equivalent to this option in
- Perl, and no way to set it within a pattern.
-
- PCRE_DOTALL
-
- If this bit is set, a dot metacharacter in the pattern matches a char-
- acter of any value, including one that indicates a newline. However, it
- only ever matches one character, even if newlines are coded as CRLF.
- Without this option, a dot does not match when the current position is
- at a newline. This option is equivalent to Perl's /s option, and it can
- be changed within a pattern by a (?s) option setting. A negative class
- such as [^a] always matches newline characters, independent of the set-
- ting of this option.
-
- PCRE_DUPNAMES
-
- If this bit is set, names used to identify capturing subpatterns need
- not be unique. This can be helpful for certain types of pattern when it
- is known that only one instance of the named subpattern can ever be
- matched. There are more details of named subpatterns below; see also
- the pcrepattern documentation.
-
- PCRE_EXTENDED
-
- If this bit is set, most white space characters in the pattern are
- totally ignored except when escaped or inside a character class. How-
- ever, white space is not allowed within sequences such as (?> that
- introduce various parenthesized subpatterns, nor within a numerical
- quantifier such as {1,3}. However, ignorable white space is permitted
- between an item and a following quantifier and between a quantifier and
- a following + that indicates possessiveness.
-
- White space did not used to include the VT character (code 11), because
- Perl did not treat this character as white space. However, Perl changed
- at release 5.18, so PCRE followed at release 8.34, and VT is now
- treated as white space.
-
- PCRE_EXTENDED also causes characters between an unescaped # outside a
- character class and the next newline, inclusive, to be ignored.
- PCRE_EXTENDED is equivalent to Perl's /x option, and it can be changed
- within a pattern by a (?x) option setting.
-
- Which characters are interpreted as newlines is controlled by the
- options passed to pcre_compile() or by a special sequence at the start
- of the pattern, as described in the section entitled "Newline conven-
- tions" in the pcrepattern documentation. Note that the end of this type
- of comment is a literal newline sequence in the pattern; escape
- sequences that happen to represent a newline do not count.
-
- This option makes it possible to include comments inside complicated
- patterns. Note, however, that this applies only to data characters.
- White space characters may never appear within special character
- sequences in a pattern, for example within the sequence (?( that intro-
- duces a conditional subpattern.
-
- PCRE_EXTRA
-
- This option was invented in order to turn on additional functionality
- of PCRE that is incompatible with Perl, but it is currently of very
- little use. When set, any backslash in a pattern that is followed by a
- letter that has no special meaning causes an error, thus reserving
- these combinations for future expansion. By default, as in Perl, a
- backslash followed by a letter with no special meaning is treated as a
- literal. (Perl can, however, be persuaded to give an error for this, by
- running it with the -w option.) There are at present no other features
- controlled by this option. It can also be set by a (?X) option setting
- within a pattern.
-
- PCRE_FIRSTLINE
-
- If this option is set, an unanchored pattern is required to match
- before or at the first newline in the subject string, though the
- matched text may continue over the newline.
-
- PCRE_JAVASCRIPT_COMPAT
-
- If this option is set, PCRE's behaviour is changed in some ways so that
- it is compatible with JavaScript rather than Perl. The changes are as
- follows:
-
- (1) A lone closing square bracket in a pattern causes a compile-time
- error, because this is illegal in JavaScript (by default it is treated
- as a data character). Thus, the pattern AB]CD becomes illegal when this
- option is set.
-
- (2) At run time, a back reference to an unset subpattern group matches
- an empty string (by default this causes the current matching alterna-
- tive to fail). A pattern such as (\1)(a) succeeds when this option is
- set (assuming it can find an "a" in the subject), whereas it fails by
- default, for Perl compatibility.
-
- (3) \U matches an upper case "U" character; by default \U causes a com-
- pile time error (Perl uses \U to upper case subsequent characters).
-
- (4) \u matches a lower case "u" character unless it is followed by four
- hexadecimal digits, in which case the hexadecimal number defines the
- code point to match. By default, \u causes a compile time error (Perl
- uses it to upper case the following character).
-
- (5) \x matches a lower case "x" character unless it is followed by two
- hexadecimal digits, in which case the hexadecimal number defines the
- code point to match. By default, as in Perl, a hexadecimal number is
- always expected after \x, but it may have zero, one, or two digits (so,
- for example, \xz matches a binary zero character followed by z).
-
- PCRE_MULTILINE
-
- By default, for the purposes of matching "start of line" and "end of
- line", PCRE treats the subject string as consisting of a single line of
- characters, even if it actually contains newlines. The "start of line"
- metacharacter (^) matches only at the start of the string, and the "end
- of line" metacharacter ($) matches only at the end of the string, or
- before a terminating newline (except when PCRE_DOLLAR_ENDONLY is set).
- Note, however, that unless PCRE_DOTALL is set, the "any character"
- metacharacter (.) does not match at a newline. This behaviour (for ^,
- $, and dot) is the same as Perl.
-
- When PCRE_MULTILINE it is set, the "start of line" and "end of line"
- constructs match immediately following or immediately before internal
- newlines in the subject string, respectively, as well as at the very
- start and end. This is equivalent to Perl's /m option, and it can be
- changed within a pattern by a (?m) option setting. If there are no new-
- lines in a subject string, or no occurrences of ^ or $ in a pattern,
- setting PCRE_MULTILINE has no effect.
-
- PCRE_NEVER_UTF
-
- This option locks out interpretation of the pattern as UTF-8 (or UTF-16
- or UTF-32 in the 16-bit and 32-bit libraries). In particular, it pre-
- vents the creator of the pattern from switching to UTF interpretation
- by starting the pattern with (*UTF). This may be useful in applications
- that process patterns from external sources. The combination of
- PCRE_UTF8 and PCRE_NEVER_UTF also causes an error.
-
- PCRE_NEWLINE_CR
- PCRE_NEWLINE_LF
- PCRE_NEWLINE_CRLF
- PCRE_NEWLINE_ANYCRLF
- PCRE_NEWLINE_ANY
-
- These options override the default newline definition that was chosen
- when PCRE was built. Setting the first or the second specifies that a
- newline is indicated by a single character (CR or LF, respectively).
- Setting PCRE_NEWLINE_CRLF specifies that a newline is indicated by the
- two-character CRLF sequence. Setting PCRE_NEWLINE_ANYCRLF specifies
- that any of the three preceding sequences should be recognized. Setting
- PCRE_NEWLINE_ANY specifies that any Unicode newline sequence should be
- recognized.
-
- In an ASCII/Unicode environment, the Unicode newline sequences are the
- three just mentioned, plus the single characters VT (vertical tab,
- U+000B), FF (form feed, U+000C), NEL (next line, U+0085), LS (line sep-
- arator, U+2028), and PS (paragraph separator, U+2029). For the 8-bit
- library, the last two are recognized only in UTF-8 mode.
-
- When PCRE is compiled to run in an EBCDIC (mainframe) environment, the
- code for CR is 0x0d, the same as ASCII. However, the character code for
- LF is normally 0x15, though in some EBCDIC environments 0x25 is used.
- Whichever of these is not LF is made to correspond to Unicode's NEL
- character. EBCDIC codes are all less than 256. For more details, see
- the pcrebuild documentation.
-
- The newline setting in the options word uses three bits that are
- treated as a number, giving eight possibilities. Currently only six are
- used (default plus the five values above). This means that if you set
- more than one newline option, the combination may or may not be sensi-
- ble. For example, PCRE_NEWLINE_CR with PCRE_NEWLINE_LF is equivalent to
- PCRE_NEWLINE_CRLF, but other combinations may yield unused numbers and
- cause an error.
-
- The only time that a line break in a pattern is specially recognized
- when compiling is when PCRE_EXTENDED is set. CR and LF are white space
- characters, and so are ignored in this mode. Also, an unescaped # out-
- side a character class indicates a comment that lasts until after the
- next line break sequence. In other circumstances, line break sequences
- in patterns are treated as literal data.
-
- The newline option that is set at compile time becomes the default that
- is used for pcre_exec() and pcre_dfa_exec(), but it can be overridden.
-
- PCRE_NO_AUTO_CAPTURE
-
- If this option is set, it disables the use of numbered capturing paren-
- theses in the pattern. Any opening parenthesis that is not followed by
- ? behaves as if it were followed by ?: but named parentheses can still
- be used for capturing (and they acquire numbers in the usual way).
- There is no equivalent of this option in Perl.
-
- PCRE_NO_AUTO_POSSESS
-
- If this option is set, it disables "auto-possessification". This is an
- optimization that, for example, turns a+b into a++b in order to avoid
- backtracks into a+ that can never be successful. However, if callouts
- are in use, auto-possessification means that some of them are never
- taken. You can set this option if you want the matching functions to do
- a full unoptimized search and run all the callouts, but it is mainly
- provided for testing purposes.
-
- PCRE_NO_START_OPTIMIZE
-
- This is an option that acts at matching time; that is, it is really an
- option for pcre_exec() or pcre_dfa_exec(). If it is set at compile
- time, it is remembered with the compiled pattern and assumed at match-
- ing time. This is necessary if you want to use JIT execution, because
- the JIT compiler needs to know whether or not this option is set. For
- details see the discussion of PCRE_NO_START_OPTIMIZE below.
-
- PCRE_UCP
-
- This option changes the way PCRE processes \B, \b, \D, \d, \S, \s, \W,
- \w, and some of the POSIX character classes. By default, only ASCII
- characters are recognized, but if PCRE_UCP is set, Unicode properties
- are used instead to classify characters. More details are given in the
- section on generic character types in the pcrepattern page. If you set
- PCRE_UCP, matching one of the items it affects takes much longer. The
- option is available only if PCRE has been compiled with Unicode prop-
- erty support.
-
- PCRE_UNGREEDY
-
- This option inverts the "greediness" of the quantifiers so that they
- are not greedy by default, but become greedy if followed by "?". It is
- not compatible with Perl. It can also be set by a (?U) option setting
- within the pattern.
-
- PCRE_UTF8
-
- This option causes PCRE to regard both the pattern and the subject as
- strings of UTF-8 characters instead of single-byte strings. However, it
- is available only when PCRE is built to include UTF support. If not,
- the use of this option provokes an error. Details of how this option
- changes the behaviour of PCRE are given in the pcreunicode page.
-
- PCRE_NO_UTF8_CHECK
-
- When PCRE_UTF8 is set, the validity of the pattern as a UTF-8 string is
- automatically checked. There is a discussion about the validity of
- UTF-8 strings in the pcreunicode page. If an invalid UTF-8 sequence is
- found, pcre_compile() returns an error. If you already know that your
- pattern is valid, and you want to skip this check for performance rea-
- sons, you can set the PCRE_NO_UTF8_CHECK option. When it is set, the
- effect of passing an invalid UTF-8 string as a pattern is undefined. It
- may cause your program to crash or loop. Note that this option can also
- be passed to pcre_exec() and pcre_dfa_exec(), to suppress the validity
- checking of subject strings only. If the same string is being matched
- many times, the option can be safely set for the second and subsequent
- matchings to improve performance.
-
-
-COMPILATION ERROR CODES
-
- The following table lists the error codes than may be returned by
- pcre_compile2(), along with the error messages that may be returned by
- both compiling functions. Note that error messages are always 8-bit
- ASCII strings, even in 16-bit or 32-bit mode. As PCRE has developed,
- some error codes have fallen out of use. To avoid confusion, they have
- not been re-used.
-
- 0 no error
- 1 \ at end of pattern
- 2 \c at end of pattern
- 3 unrecognized character follows \
- 4 numbers out of order in {} quantifier
- 5 number too big in {} quantifier
- 6 missing terminating ] for character class
- 7 invalid escape sequence in character class
- 8 range out of order in character class
- 9 nothing to repeat
- 10 [this code is not in use]
- 11 internal error: unexpected repeat
- 12 unrecognized character after (? or (?-
- 13 POSIX named classes are supported only within a class
- 14 missing )
- 15 reference to non-existent subpattern
- 16 erroffset passed as NULL
- 17 unknown option bit(s) set
- 18 missing ) after comment
- 19 [this code is not in use]
- 20 regular expression is too large
- 21 failed to get memory
- 22 unmatched parentheses
- 23 internal error: code overflow
- 24 unrecognized character after (?<
- 25 lookbehind assertion is not fixed length
- 26 malformed number or name after (?(
- 27 conditional group contains more than two branches
- 28 assertion expected after (?(
- 29 (?R or (?[+-]digits must be followed by )
- 30 unknown POSIX class name
- 31 POSIX collating elements are not supported
- 32 this version of PCRE is compiled without UTF support
- 33 [this code is not in use]
- 34 character value in \x{} or \o{} is too large
- 35 invalid condition (?(0)
- 36 \C not allowed in lookbehind assertion
- 37 PCRE does not support \L, \l, \N{name}, \U, or \u
- 38 number after (?C is > 255
- 39 closing ) for (?C expected
- 40 recursive call could loop indefinitely
- 41 unrecognized character after (?P
- 42 syntax error in subpattern name (missing terminator)
- 43 two named subpatterns have the same name
- 44 invalid UTF-8 string (specifically UTF-8)
- 45 support for \P, \p, and \X has not been compiled
- 46 malformed \P or \p sequence
- 47 unknown property name after \P or \p
- 48 subpattern name is too long (maximum 32 characters)
- 49 too many named subpatterns (maximum 10000)
- 50 [this code is not in use]
- 51 octal value is greater than \377 in 8-bit non-UTF-8 mode
- 52 internal error: overran compiling workspace
- 53 internal error: previously-checked referenced subpattern
- not found
- 54 DEFINE group contains more than one branch
- 55 repeating a DEFINE group is not allowed
- 56 inconsistent NEWLINE options
- 57 \g is not followed by a braced, angle-bracketed, or quoted
- name/number or by a plain number
- 58 a numbered reference must not be zero
- 59 an argument is not allowed for (*ACCEPT), (*FAIL), or (*COMMIT)
- 60 (*VERB) not recognized or malformed
- 61 number is too big
- 62 subpattern name expected
- 63 digit expected after (?+
- 64 ] is an invalid data character in JavaScript compatibility mode
- 65 different names for subpatterns of the same number are
- not allowed
- 66 (*MARK) must have an argument
- 67 this version of PCRE is not compiled with Unicode property
- support
- 68 \c must be followed by an ASCII character
- 69 \k is not followed by a braced, angle-bracketed, or quoted name
- 70 internal error: unknown opcode in find_fixedlength()
- 71 \N is not supported in a class
- 72 too many forward references
- 73 disallowed Unicode code point (>= 0xd800 && <= 0xdfff)
- 74 invalid UTF-16 string (specifically UTF-16)
- 75 name is too long in (*MARK), (*PRUNE), (*SKIP), or (*THEN)
- 76 character value in \u.... sequence is too large
- 77 invalid UTF-32 string (specifically UTF-32)
- 78 setting UTF is disabled by the application
- 79 non-hex character in \x{} (closing brace missing?)
- 80 non-octal character in \o{} (closing brace missing?)
- 81 missing opening brace after \o
- 82 parentheses are too deeply nested
- 83 invalid range in character class
- 84 group name must start with a non-digit
- 85 parentheses are too deeply nested (stack check)
-
- The numbers 32 and 10000 in errors 48 and 49 are defaults; different
- values may be used if the limits were changed when PCRE was built.
-
-
-STUDYING A PATTERN
-
- pcre_extra *pcre_study(const pcre *code, int options,
- const char **errptr);
-
- If a compiled pattern is going to be used several times, it is worth
- spending more time analyzing it in order to speed up the time taken for
- matching. The function pcre_study() takes a pointer to a compiled pat-
- tern as its first argument. If studying the pattern produces additional
- information that will help speed up matching, pcre_study() returns a
- pointer to a pcre_extra block, in which the study_data field points to
- the results of the study.
-
- The returned value from pcre_study() can be passed directly to
- pcre_exec() or pcre_dfa_exec(). However, a pcre_extra block also con-
- tains other fields that can be set by the caller before the block is
- passed; these are described below in the section on matching a pattern.
-
- If studying the pattern does not produce any useful information,
- pcre_study() returns NULL by default. In that circumstance, if the
- calling program wants to pass any of the other fields to pcre_exec() or
- pcre_dfa_exec(), it must set up its own pcre_extra block. However, if
- pcre_study() is called with the PCRE_STUDY_EXTRA_NEEDED option, it
- returns a pcre_extra block even if studying did not find any additional
- information. It may still return NULL, however, if an error occurs in
- pcre_study().
-
- The second argument of pcre_study() contains option bits. There are
- three further options in addition to PCRE_STUDY_EXTRA_NEEDED:
-
- PCRE_STUDY_JIT_COMPILE
- PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE
- PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE
-
- If any of these are set, and the just-in-time compiler is available,
- the pattern is further compiled into machine code that executes much
- faster than the pcre_exec() interpretive matching function. If the
- just-in-time compiler is not available, these options are ignored. All
- undefined bits in the options argument must be zero.
-
- JIT compilation is a heavyweight optimization. It can take some time
- for patterns to be analyzed, and for one-off matches and simple pat-
- terns the benefit of faster execution might be offset by a much slower
- study time. Not all patterns can be optimized by the JIT compiler. For
- those that cannot be handled, matching automatically falls back to the
- pcre_exec() interpreter. For more details, see the pcrejit documenta-
- tion.
-
- The third argument for pcre_study() is a pointer for an error message.
- If studying succeeds (even if no data is returned), the variable it
- points to is set to NULL. Otherwise it is set to point to a textual
- error message. This is a static string that is part of the library. You
- must not try to free it. You should test the error pointer for NULL
- after calling pcre_study(), to be sure that it has run successfully.
-
- When you are finished with a pattern, you can free the memory used for
- the study data by calling pcre_free_study(). This function was added to
- the API for release 8.20. For earlier versions, the memory could be
- freed with pcre_free(), just like the pattern itself. This will still
- work in cases where JIT optimization is not used, but it is advisable
- to change to the new function when convenient.
-
- This is a typical way in which pcre_study() is used (except that in a
- real application there should be tests for errors):
-
- int rc;
- pcre *re;
- pcre_extra *sd;
- re = pcre_compile("pattern", 0, &error, &erroroffset, NULL);
- sd = pcre_study(
- re, /* result of pcre_compile() */
- 0, /* no options */
- &error); /* set to NULL or points to a message */
- rc = pcre_exec( /* see below for details of pcre_exec() options */
- re, sd, "subject", 7, 0, 0, ovector, 30);
- ...
- pcre_free_study(sd);
- pcre_free(re);
-
- Studying a pattern does two things: first, a lower bound for the length
- of subject string that is needed to match the pattern is computed. This
- does not mean that there are any strings of that length that match, but
- it does guarantee that no shorter strings match. The value is used to
- avoid wasting time by trying to match strings that are shorter than the
- lower bound. You can find out the value in a calling program via the
- pcre_fullinfo() function.
-
- Studying a pattern is also useful for non-anchored patterns that do not
- have a single fixed starting character. A bitmap of possible starting
- bytes is created. This speeds up finding a position in the subject at
- which to start matching. (In 16-bit mode, the bitmap is used for 16-bit
- values less than 256. In 32-bit mode, the bitmap is used for 32-bit
- values less than 256.)
-
- These two optimizations apply to both pcre_exec() and pcre_dfa_exec(),
- and the information is also used by the JIT compiler. The optimiza-
- tions can be disabled by setting the PCRE_NO_START_OPTIMIZE option.
- You might want to do this if your pattern contains callouts or (*MARK)
- and you want to make use of these facilities in cases where matching
- fails.
-
- PCRE_NO_START_OPTIMIZE can be specified at either compile time or exe-
- cution time. However, if PCRE_NO_START_OPTIMIZE is passed to
- pcre_exec(), (that is, after any JIT compilation has happened) JIT exe-
- cution is disabled. For JIT execution to work with PCRE_NO_START_OPTI-
- MIZE, the option must be set at compile time.
-
- There is a longer discussion of PCRE_NO_START_OPTIMIZE below.
-
-
-LOCALE SUPPORT
-
- PCRE handles caseless matching, and determines whether characters are
- letters, digits, or whatever, by reference to a set of tables, indexed
- by character code point. When running in UTF-8 mode, or in the 16- or
- 32-bit libraries, this applies only to characters with code points less
- than 256. By default, higher-valued code points never match escapes
- such as \w or \d. However, if PCRE is built with Unicode property sup-
- port, all characters can be tested with \p and \P, or, alternatively,
- the PCRE_UCP option can be set when a pattern is compiled; this causes
- \w and friends to use Unicode property support instead of the built-in
- tables.
-
- The use of locales with Unicode is discouraged. If you are handling
- characters with code points greater than 128, you should either use
- Unicode support, or use locales, but not try to mix the two.
-
- PCRE contains an internal set of tables that are used when the final
- argument of pcre_compile() is NULL. These are sufficient for many
- applications. Normally, the internal tables recognize only ASCII char-
- acters. However, when PCRE is built, it is possible to cause the inter-
- nal tables to be rebuilt in the default "C" locale of the local system,
- which may cause them to be different.
-
- The internal tables can always be overridden by tables supplied by the
- application that calls PCRE. These may be created in a different locale
- from the default. As more and more applications change to using Uni-
- code, the need for this locale support is expected to die away.
-
- External tables are built by calling the pcre_maketables() function,
- which has no arguments, in the relevant locale. The result can then be
- passed to pcre_compile() as often as necessary. For example, to build
- and use tables that are appropriate for the French locale (where
- accented characters with values greater than 128 are treated as let-
- ters), the following code could be used:
-
- setlocale(LC_CTYPE, "fr_FR");
- tables = pcre_maketables();
- re = pcre_compile(..., tables);
-
- The locale name "fr_FR" is used on Linux and other Unix-like systems;
- if you are using Windows, the name for the French locale is "french".
-
- When pcre_maketables() runs, the tables are built in memory that is
- obtained via pcre_malloc. It is the caller's responsibility to ensure
- that the memory containing the tables remains available for as long as
- it is needed.
-
- The pointer that is passed to pcre_compile() is saved with the compiled
- pattern, and the same tables are used via this pointer by pcre_study()
- and also by pcre_exec() and pcre_dfa_exec(). Thus, for any single pat-
- tern, compilation, studying and matching all happen in the same locale,
- but different patterns can be processed in different locales.
-
- It is possible to pass a table pointer or NULL (indicating the use of
- the internal tables) to pcre_exec() or pcre_dfa_exec() (see the discus-
- sion below in the section on matching a pattern). This facility is pro-
- vided for use with pre-compiled patterns that have been saved and
- reloaded. Character tables are not saved with patterns, so if a non-
- standard table was used at compile time, it must be provided again when
- the reloaded pattern is matched. Attempting to use this facility to
- match a pattern in a different locale from the one in which it was com-
- piled is likely to lead to anomalous (usually incorrect) results.
-
-
-INFORMATION ABOUT A PATTERN
-
- int pcre_fullinfo(const pcre *code, const pcre_extra *extra,
- int what, void *where);
-
- The pcre_fullinfo() function returns information about a compiled pat-
- tern. It replaces the pcre_info() function, which was removed from the
- library at version 8.30, after more than 10 years of obsolescence.
-
- The first argument for pcre_fullinfo() is a pointer to the compiled
- pattern. The second argument is the result of pcre_study(), or NULL if
- the pattern was not studied. The third argument specifies which piece
- of information is required, and the fourth argument is a pointer to a
- variable to receive the data. The yield of the function is zero for
- success, or one of the following negative numbers:
-
- PCRE_ERROR_NULL the argument code was NULL
- the argument where was NULL
- PCRE_ERROR_BADMAGIC the "magic number" was not found
- PCRE_ERROR_BADENDIANNESS the pattern was compiled with different
- endianness
- PCRE_ERROR_BADOPTION the value of what was invalid
- PCRE_ERROR_UNSET the requested field is not set
-
- The "magic number" is placed at the start of each compiled pattern as
- an simple check against passing an arbitrary memory pointer. The endi-
- anness error can occur if a compiled pattern is saved and reloaded on a
- different host. Here is a typical call of pcre_fullinfo(), to obtain
- the length of the compiled pattern:
-
- int rc;
- size_t length;
- rc = pcre_fullinfo(
- re, /* result of pcre_compile() */
- sd, /* result of pcre_study(), or NULL */
- PCRE_INFO_SIZE, /* what is required */
- &length); /* where to put the data */
-
- The possible values for the third argument are defined in pcre.h, and
- are as follows:
-
- PCRE_INFO_BACKREFMAX
-
- Return the number of the highest back reference in the pattern. The
- fourth argument should point to an int variable. Zero is returned if
- there are no back references.
-
- PCRE_INFO_CAPTURECOUNT
-
- Return the number of capturing subpatterns in the pattern. The fourth
- argument should point to an int variable.
-
- PCRE_INFO_DEFAULT_TABLES
-
- Return a pointer to the internal default character tables within PCRE.
- The fourth argument should point to an unsigned char * variable. This
- information call is provided for internal use by the pcre_study() func-
- tion. External callers can cause PCRE to use its internal tables by
- passing a NULL table pointer.
-
- PCRE_INFO_FIRSTBYTE (deprecated)
-
- Return information about the first data unit of any matched string, for
- a non-anchored pattern. The name of this option refers to the 8-bit
- library, where data units are bytes. The fourth argument should point
- to an int variable. Negative values are used for special cases. How-
- ever, this means that when the 32-bit library is in non-UTF-32 mode,
- the full 32-bit range of characters cannot be returned. For this rea-
- son, this value is deprecated; use PCRE_INFO_FIRSTCHARACTERFLAGS and
- PCRE_INFO_FIRSTCHARACTER instead.
-
- If there is a fixed first value, for example, the letter "c" from a
- pattern such as (cat|cow|coyote), its value is returned. In the 8-bit
- library, the value is always less than 256. In the 16-bit library the
- value can be up to 0xffff. In the 32-bit library the value can be up to
- 0x10ffff.
-
- If there is no fixed first value, and if either
-
- (a) the pattern was compiled with the PCRE_MULTILINE option, and every
- branch starts with "^", or
-
- (b) every branch of the pattern starts with ".*" and PCRE_DOTALL is not
- set (if it were set, the pattern would be anchored),
-
- -1 is returned, indicating that the pattern matches only at the start
- of a subject string or after any newline within the string. Otherwise
- -2 is returned. For anchored patterns, -2 is returned.
-
- PCRE_INFO_FIRSTCHARACTER
-
- Return the value of the first data unit (non-UTF character) of any
- matched string in the situation where PCRE_INFO_FIRSTCHARACTERFLAGS
- returns 1; otherwise return 0. The fourth argument should point to an
- uint_t variable.
-
- In the 8-bit library, the value is always less than 256. In the 16-bit
- library the value can be up to 0xffff. In the 32-bit library in UTF-32
- mode the value can be up to 0x10ffff, and up to 0xffffffff when not
- using UTF-32 mode.
-
- PCRE_INFO_FIRSTCHARACTERFLAGS
-
- Return information about the first data unit of any matched string, for
- a non-anchored pattern. The fourth argument should point to an int
- variable.
-
- If there is a fixed first value, for example, the letter "c" from a
- pattern such as (cat|cow|coyote), 1 is returned, and the character
- value can be retrieved using PCRE_INFO_FIRSTCHARACTER. If there is no
- fixed first value, and if either
-
- (a) the pattern was compiled with the PCRE_MULTILINE option, and every
- branch starts with "^", or
-
- (b) every branch of the pattern starts with ".*" and PCRE_DOTALL is not
- set (if it were set, the pattern would be anchored),
-
- 2 is returned, indicating that the pattern matches only at the start of
- a subject string or after any newline within the string. Otherwise 0 is
- returned. For anchored patterns, 0 is returned.
-
- PCRE_INFO_FIRSTTABLE
-
- If the pattern was studied, and this resulted in the construction of a
- 256-bit table indicating a fixed set of values for the first data unit
- in any matching string, a pointer to the table is returned. Otherwise
- NULL is returned. The fourth argument should point to an unsigned char
- * variable.
-
- PCRE_INFO_HASCRORLF
-
- Return 1 if the pattern contains any explicit matches for CR or LF
- characters, otherwise 0. The fourth argument should point to an int
- variable. An explicit match is either a literal CR or LF character, or
- \r or \n.
-
- PCRE_INFO_JCHANGED
-
- Return 1 if the (?J) or (?-J) option setting is used in the pattern,
- otherwise 0. The fourth argument should point to an int variable. (?J)
- and (?-J) set and unset the local PCRE_DUPNAMES option, respectively.
-
- PCRE_INFO_JIT
-
- Return 1 if the pattern was studied with one of the JIT options, and
- just-in-time compiling was successful. The fourth argument should point
- to an int variable. A return value of 0 means that JIT support is not
- available in this version of PCRE, or that the pattern was not studied
- with a JIT option, or that the JIT compiler could not handle this par-
- ticular pattern. See the pcrejit documentation for details of what can
- and cannot be handled.
-
- PCRE_INFO_JITSIZE
-
- If the pattern was successfully studied with a JIT option, return the
- size of the JIT compiled code, otherwise return zero. The fourth argu-
- ment should point to a size_t variable.
-
- PCRE_INFO_LASTLITERAL
-
- Return the value of the rightmost literal data unit that must exist in
- any matched string, other than at its start, if such a value has been
- recorded. The fourth argument should point to an int variable. If there
- is no such value, -1 is returned. For anchored patterns, a last literal
- value is recorded only if it follows something of variable length. For
- example, for the pattern /^a\d+z\d+/ the returned value is "z", but for
- /^a\dz\d/ the returned value is -1.
-
- Since for the 32-bit library using the non-UTF-32 mode, this function
- is unable to return the full 32-bit range of characters, this value is
- deprecated; instead the PCRE_INFO_REQUIREDCHARFLAGS and
- PCRE_INFO_REQUIREDCHAR values should be used.
-
- PCRE_INFO_MATCH_EMPTY
-
- Return 1 if the pattern can match an empty string, otherwise 0. The
- fourth argument should point to an int variable.
-
- PCRE_INFO_MATCHLIMIT
-
- If the pattern set a match limit by including an item of the form
- (*LIMIT_MATCH=nnnn) at the start, the value is returned. The fourth
- argument should point to an unsigned 32-bit integer. If no such value
- has been set, the call to pcre_fullinfo() returns the error
- PCRE_ERROR_UNSET.
-
- PCRE_INFO_MAXLOOKBEHIND
-
- Return the number of characters (NB not data units) in the longest
- lookbehind assertion in the pattern. This information is useful when
- doing multi-segment matching using the partial matching facilities.
- Note that the simple assertions \b and \B require a one-character look-
- behind. \A also registers a one-character lookbehind, though it does
- not actually inspect the previous character. This is to ensure that at
- least one character from the old segment is retained when a new segment
- is processed. Otherwise, if there are no lookbehinds in the pattern, \A
- might match incorrectly at the start of a new segment.
-
- PCRE_INFO_MINLENGTH
-
- If the pattern was studied and a minimum length for matching subject
- strings was computed, its value is returned. Otherwise the returned
- value is -1. The value is a number of characters, which in UTF mode may
- be different from the number of data units. The fourth argument should
- point to an int variable. A non-negative value is a lower bound to the
- length of any matching string. There may not be any strings of that
- length that do actually match, but every string that does match is at
- least that long.
-
- PCRE_INFO_NAMECOUNT
- PCRE_INFO_NAMEENTRYSIZE
- PCRE_INFO_NAMETABLE
-
- PCRE supports the use of named as well as numbered capturing parenthe-
- ses. The names are just an additional way of identifying the parenthe-
- ses, which still acquire numbers. Several convenience functions such as
- pcre_get_named_substring() are provided for extracting captured sub-
- strings by name. It is also possible to extract the data directly, by
- first converting the name to a number in order to access the correct
- pointers in the output vector (described with pcre_exec() below). To do
- the conversion, you need to use the name-to-number map, which is
- described by these three values.
-
- The map consists of a number of fixed-size entries. PCRE_INFO_NAMECOUNT
- gives the number of entries, and PCRE_INFO_NAMEENTRYSIZE gives the size
- of each entry; both of these return an int value. The entry size
- depends on the length of the longest name. PCRE_INFO_NAMETABLE returns
- a pointer to the first entry of the table. This is a pointer to char in
- the 8-bit library, where the first two bytes of each entry are the num-
- ber of the capturing parenthesis, most significant byte first. In the
- 16-bit library, the pointer points to 16-bit data units, the first of
- which contains the parenthesis number. In the 32-bit library, the
- pointer points to 32-bit data units, the first of which contains the
- parenthesis number. The rest of the entry is the corresponding name,
- zero terminated.
-
- The names are in alphabetical order. If (?| is used to create multiple
- groups with the same number, as described in the section on duplicate
- subpattern numbers in the pcrepattern page, the groups may be given the
- same name, but there is only one entry in the table. Different names
- for groups of the same number are not permitted. Duplicate names for
- subpatterns with different numbers are permitted, but only if PCRE_DUP-
- NAMES is set. They appear in the table in the order in which they were
- found in the pattern. In the absence of (?| this is the order of
- increasing number; when (?| is used this is not necessarily the case
- because later subpatterns may have lower numbers.
-
- As a simple example of the name/number table, consider the following
- pattern after compilation by the 8-bit library (assume PCRE_EXTENDED is
- set, so white space - including newlines - is ignored):
-
- (?<date> (?<year>(\d\d)?\d\d) -
- (?<month>\d\d) - (?<day>\d\d) )
-
- There are four named subpatterns, so the table has four entries, and
- each entry in the table is eight bytes long. The table is as follows,
- with non-printing bytes shows in hexadecimal, and undefined bytes shown
- as ??:
-
- 00 01 d a t e 00 ??
- 00 05 d a y 00 ?? ??
- 00 04 m o n t h 00
- 00 02 y e a r 00 ??
-
- When writing code to extract data from named subpatterns using the
- name-to-number map, remember that the length of the entries is likely
- to be different for each compiled pattern.
-
- PCRE_INFO_OKPARTIAL
-
- Return 1 if the pattern can be used for partial matching with
- pcre_exec(), otherwise 0. The fourth argument should point to an int
- variable. From release 8.00, this always returns 1, because the
- restrictions that previously applied to partial matching have been
- lifted. The pcrepartial documentation gives details of partial match-
- ing.
-
- PCRE_INFO_OPTIONS
-
- Return a copy of the options with which the pattern was compiled. The
- fourth argument should point to an unsigned long int variable. These
- option bits are those specified in the call to pcre_compile(), modified
- by any top-level option settings at the start of the pattern itself. In
- other words, they are the options that will be in force when matching
- starts. For example, if the pattern /(?im)abc(?-i)d/ is compiled with
- the PCRE_EXTENDED option, the result is PCRE_CASELESS, PCRE_MULTILINE,
- and PCRE_EXTENDED.
-
- A pattern is automatically anchored by PCRE if all of its top-level
- alternatives begin with one of the following:
-
- ^ unless PCRE_MULTILINE is set
- \A always
- \G always
- .* if PCRE_DOTALL is set and there are no back
- references to the subpattern in which .* appears
-
- For such patterns, the PCRE_ANCHORED bit is set in the options returned
- by pcre_fullinfo().
-
- PCRE_INFO_RECURSIONLIMIT
-
- If the pattern set a recursion limit by including an item of the form
- (*LIMIT_RECURSION=nnnn) at the start, the value is returned. The fourth
- argument should point to an unsigned 32-bit integer. If no such value
- has been set, the call to pcre_fullinfo() returns the error
- PCRE_ERROR_UNSET.
-
- PCRE_INFO_SIZE
-
- Return the size of the compiled pattern in bytes (for all three
- libraries). The fourth argument should point to a size_t variable. This
- value does not include the size of the pcre structure that is returned
- by pcre_compile(). The value that is passed as the argument to
- pcre_malloc() when pcre_compile() is getting memory in which to place
- the compiled data is the value returned by this option plus the size of
- the pcre structure. Studying a compiled pattern, with or without JIT,
- does not alter the value returned by this option.
-
- PCRE_INFO_STUDYSIZE
-
- Return the size in bytes (for all three libraries) of the data block
- pointed to by the study_data field in a pcre_extra block. If pcre_extra
- is NULL, or there is no study data, zero is returned. The fourth argu-
- ment should point to a size_t variable. The study_data field is set by
- pcre_study() to record information that will speed up matching (see the
- section entitled "Studying a pattern" above). The format of the
- study_data block is private, but its length is made available via this
- option so that it can be saved and restored (see the pcreprecompile
- documentation for details).
-
- PCRE_INFO_REQUIREDCHARFLAGS
-
- Returns 1 if there is a rightmost literal data unit that must exist in
- any matched string, other than at its start. The fourth argument should
- point to an int variable. If there is no such value, 0 is returned. If
- returning 1, the character value itself can be retrieved using
- PCRE_INFO_REQUIREDCHAR.
-
- For anchored patterns, a last literal value is recorded only if it fol-
- lows something of variable length. For example, for the pattern
- /^a\d+z\d+/ the returned value 1 (with "z" returned from
- PCRE_INFO_REQUIREDCHAR), but for /^a\dz\d/ the returned value is 0.
-
- PCRE_INFO_REQUIREDCHAR
-
- Return the value of the rightmost literal data unit that must exist in
- any matched string, other than at its start, if such a value has been
- recorded. The fourth argument should point to an uint32_t variable. If
- there is no such value, 0 is returned.
-
-
-REFERENCE COUNTS
-
- int pcre_refcount(pcre *code, int adjust);
-
- The pcre_refcount() function is used to maintain a reference count in
- the data block that contains a compiled pattern. It is provided for the
- benefit of applications that operate in an object-oriented manner,
- where different parts of the application may be using the same compiled
- pattern, but you want to free the block when they are all done.
-
- When a pattern is compiled, the reference count field is initialized to
- zero. It is changed only by calling this function, whose action is to
- add the adjust value (which may be positive or negative) to it. The
- yield of the function is the new value. However, the value of the count
- is constrained to lie between 0 and 65535, inclusive. If the new value
- is outside these limits, it is forced to the appropriate limit value.
-
- Except when it is zero, the reference count is not correctly preserved
- if a pattern is compiled on one host and then transferred to a host
- whose byte-order is different. (This seems a highly unlikely scenario.)
-
-
-MATCHING A PATTERN: THE TRADITIONAL FUNCTION
-
- int pcre_exec(const pcre *code, const pcre_extra *extra,
- const char *subject, int length, int startoffset,
- int options, int *ovector, int ovecsize);
-
- The function pcre_exec() is called to match a subject string against a
- compiled pattern, which is passed in the code argument. If the pattern
- was studied, the result of the study should be passed in the extra
- argument. You can call pcre_exec() with the same code and extra argu-
- ments as many times as you like, in order to match different subject
- strings with the same pattern.
-
- This function is the main matching facility of the library, and it
- operates in a Perl-like manner. For specialist use there is also an
- alternative matching function, which is described below in the section
- about the pcre_dfa_exec() function.
-
- In most applications, the pattern will have been compiled (and option-
- ally studied) in the same process that calls pcre_exec(). However, it
- is possible to save compiled patterns and study data, and then use them
- later in different processes, possibly even on different hosts. For a
- discussion about this, see the pcreprecompile documentation.
-
- Here is an example of a simple call to pcre_exec():
-
- int rc;
- int ovector[30];
- rc = pcre_exec(
- re, /* result of pcre_compile() */
- NULL, /* we didn't study the pattern */
- "some string", /* the subject string */
- 11, /* the length of the subject string */
- 0, /* start at offset 0 in the subject */
- 0, /* default options */
- ovector, /* vector of integers for substring information */
- 30); /* number of elements (NOT size in bytes) */
-
- Extra data for pcre_exec()
-
- If the extra argument is not NULL, it must point to a pcre_extra data
- block. The pcre_study() function returns such a block (when it doesn't
- return NULL), but you can also create one for yourself, and pass addi-
- tional information in it. The pcre_extra block contains the following
- fields (not necessarily in this order):
-
- unsigned long int flags;
- void *study_data;
- void *executable_jit;
- unsigned long int match_limit;
- unsigned long int match_limit_recursion;
- void *callout_data;
- const unsigned char *tables;
- unsigned char **mark;
-
- In the 16-bit version of this structure, the mark field has type
- "PCRE_UCHAR16 **".
-
- In the 32-bit version of this structure, the mark field has type
- "PCRE_UCHAR32 **".
-
- The flags field is used to specify which of the other fields are set.
- The flag bits are:
-
- PCRE_EXTRA_CALLOUT_DATA
- PCRE_EXTRA_EXECUTABLE_JIT
- PCRE_EXTRA_MARK
- PCRE_EXTRA_MATCH_LIMIT
- PCRE_EXTRA_MATCH_LIMIT_RECURSION
- PCRE_EXTRA_STUDY_DATA
- PCRE_EXTRA_TABLES
-
- Other flag bits should be set to zero. The study_data field and some-
- times the executable_jit field are set in the pcre_extra block that is
- returned by pcre_study(), together with the appropriate flag bits. You
- should not set these yourself, but you may add to the block by setting
- other fields and their corresponding flag bits.
-
- The match_limit field provides a means of preventing PCRE from using up
- a vast amount of resources when running patterns that are not going to
- match, but which have a very large number of possibilities in their
- search trees. The classic example is a pattern that uses nested unlim-
- ited repeats.
-
- Internally, pcre_exec() uses a function called match(), which it calls
- repeatedly (sometimes recursively). The limit set by match_limit is
- imposed on the number of times this function is called during a match,
- which has the effect of limiting the amount of backtracking that can
- take place. For patterns that are not anchored, the count restarts from
- zero for each position in the subject string.
-
- When pcre_exec() is called with a pattern that was successfully studied
- with a JIT option, the way that the matching is executed is entirely
- different. However, there is still the possibility of runaway matching
- that goes on for a very long time, and so the match_limit value is also
- used in this case (but in a different way) to limit how long the match-
- ing can continue.
-
- The default value for the limit can be set when PCRE is built; the
- default default is 10 million, which handles all but the most extreme
- cases. You can override the default by suppling pcre_exec() with a
- pcre_extra block in which match_limit is set, and
- PCRE_EXTRA_MATCH_LIMIT is set in the flags field. If the limit is
- exceeded, pcre_exec() returns PCRE_ERROR_MATCHLIMIT.
-
- A value for the match limit may also be supplied by an item at the
- start of a pattern of the form
-
- (*LIMIT_MATCH=d)
-
- where d is a decimal number. However, such a setting is ignored unless
- d is less than the limit set by the caller of pcre_exec() or, if no
- such limit is set, less than the default.
-
- The match_limit_recursion field is similar to match_limit, but instead
- of limiting the total number of times that match() is called, it limits
- the depth of recursion. The recursion depth is a smaller number than
- the total number of calls, because not all calls to match() are recur-
- sive. This limit is of use only if it is set smaller than match_limit.
-
- Limiting the recursion depth limits the amount of machine stack that
- can be used, or, when PCRE has been compiled to use memory on the heap
- instead of the stack, the amount of heap memory that can be used. This
- limit is not relevant, and is ignored, when matching is done using JIT
- compiled code.
-
- The default value for match_limit_recursion can be set when PCRE is
- built; the default default is the same value as the default for
- match_limit. You can override the default by suppling pcre_exec() with
- a pcre_extra block in which match_limit_recursion is set, and
- PCRE_EXTRA_MATCH_LIMIT_RECURSION is set in the flags field. If the
- limit is exceeded, pcre_exec() returns PCRE_ERROR_RECURSIONLIMIT.
-
- A value for the recursion limit may also be supplied by an item at the
- start of a pattern of the form
-
- (*LIMIT_RECURSION=d)
-
- where d is a decimal number. However, such a setting is ignored unless
- d is less than the limit set by the caller of pcre_exec() or, if no
- such limit is set, less than the default.
-
- The callout_data field is used in conjunction with the "callout" fea-
- ture, and is described in the pcrecallout documentation.
-
- The tables field is provided for use with patterns that have been pre-
- compiled using custom character tables, saved to disc or elsewhere, and
- then reloaded, because the tables that were used to compile a pattern
- are not saved with it. See the pcreprecompile documentation for a dis-
- cussion of saving compiled patterns for later use. If NULL is passed
- using this mechanism, it forces PCRE's internal tables to be used.
-
- Warning: The tables that pcre_exec() uses must be the same as those
- that were used when the pattern was compiled. If this is not the case,
- the behaviour of pcre_exec() is undefined. Therefore, when a pattern is
- compiled and matched in the same process, this field should never be
- set. In this (the most common) case, the correct table pointer is auto-
- matically passed with the compiled pattern from pcre_compile() to
- pcre_exec().
-
- If PCRE_EXTRA_MARK is set in the flags field, the mark field must be
- set to point to a suitable variable. If the pattern contains any back-
- tracking control verbs such as (*MARK:NAME), and the execution ends up
- with a name to pass back, a pointer to the name string (zero termi-
- nated) is placed in the variable pointed to by the mark field. The
- names are within the compiled pattern; if you wish to retain such a
- name you must copy it before freeing the memory of a compiled pattern.
- If there is no name to pass back, the variable pointed to by the mark
- field is set to NULL. For details of the backtracking control verbs,
- see the section entitled "Backtracking control" in the pcrepattern doc-
- umentation.
-
- Option bits for pcre_exec()
-
- The unused bits of the options argument for pcre_exec() must be zero.
- The only bits that may be set are PCRE_ANCHORED, PCRE_NEWLINE_xxx,
- PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NOTEMPTY_ATSTART,
- PCRE_NO_START_OPTIMIZE, PCRE_NO_UTF8_CHECK, PCRE_PARTIAL_HARD, and
- PCRE_PARTIAL_SOFT.
-
- If the pattern was successfully studied with one of the just-in-time
- (JIT) compile options, the only supported options for JIT execution are
- PCRE_NO_UTF8_CHECK, PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY,
- PCRE_NOTEMPTY_ATSTART, PCRE_PARTIAL_HARD, and PCRE_PARTIAL_SOFT. If an
- unsupported option is used, JIT execution is disabled and the normal
- interpretive code in pcre_exec() is run.
-
- PCRE_ANCHORED
-
- The PCRE_ANCHORED option limits pcre_exec() to matching at the first
- matching position. If a pattern was compiled with PCRE_ANCHORED, or
- turned out to be anchored by virtue of its contents, it cannot be made
- unachored at matching time.
-
- PCRE_BSR_ANYCRLF
- PCRE_BSR_UNICODE
-
- These options (which are mutually exclusive) control what the \R escape
- sequence matches. The choice is either to match only CR, LF, or CRLF,
- or to match any Unicode newline sequence. These options override the
- choice that was made or defaulted when the pattern was compiled.
-
- PCRE_NEWLINE_CR
- PCRE_NEWLINE_LF
- PCRE_NEWLINE_CRLF
- PCRE_NEWLINE_ANYCRLF
- PCRE_NEWLINE_ANY
-
- These options override the newline definition that was chosen or
- defaulted when the pattern was compiled. For details, see the descrip-
- tion of pcre_compile() above. During matching, the newline choice
- affects the behaviour of the dot, circumflex, and dollar metacharac-
- ters. It may also alter the way the match position is advanced after a
- match failure for an unanchored pattern.
-
- When PCRE_NEWLINE_CRLF, PCRE_NEWLINE_ANYCRLF, or PCRE_NEWLINE_ANY is
- set, and a match attempt for an unanchored pattern fails when the cur-
- rent position is at a CRLF sequence, and the pattern contains no
- explicit matches for CR or LF characters, the match position is
- advanced by two characters instead of one, in other words, to after the
- CRLF.
-
- The above rule is a compromise that makes the most common cases work as
- expected. For example, if the pattern is .+A (and the PCRE_DOTALL
- option is not set), it does not match the string "\r\nA" because, after
- failing at the start, it skips both the CR and the LF before retrying.
- However, the pattern [\r\n]A does match that string, because it con-
- tains an explicit CR or LF reference, and so advances only by one char-
- acter after the first failure.
-
- An explicit match for CR of LF is either a literal appearance of one of
- those characters, or one of the \r or \n escape sequences. Implicit
- matches such as [^X] do not count, nor does \s (which includes CR and
- LF in the characters that it matches).
-
- Notwithstanding the above, anomalous effects may still occur when CRLF
- is a valid newline sequence and explicit \r or \n escapes appear in the
- pattern.
-
- PCRE_NOTBOL
-
- This option specifies that first character of the subject string is not
- the beginning of a line, so the circumflex metacharacter should not
- match before it. Setting this without PCRE_MULTILINE (at compile time)
- causes circumflex never to match. This option affects only the behav-
- iour of the circumflex metacharacter. It does not affect \A.
-
- PCRE_NOTEOL
-
- This option specifies that the end of the subject string is not the end
- of a line, so the dollar metacharacter should not match it nor (except
- in multiline mode) a newline immediately before it. Setting this with-
- out PCRE_MULTILINE (at compile time) causes dollar never to match. This
- option affects only the behaviour of the dollar metacharacter. It does
- not affect \Z or \z.
-
- PCRE_NOTEMPTY
-
- An empty string is not considered to be a valid match if this option is
- set. If there are alternatives in the pattern, they are tried. If all
- the alternatives match the empty string, the entire match fails. For
- example, if the pattern
-
- a?b?
-
- is applied to a string not beginning with "a" or "b", it matches an
- empty string at the start of the subject. With PCRE_NOTEMPTY set, this
- match is not valid, so PCRE searches further into the string for occur-
- rences of "a" or "b".
-
- PCRE_NOTEMPTY_ATSTART
-
- This is like PCRE_NOTEMPTY, except that an empty string match that is
- not at the start of the subject is permitted. If the pattern is
- anchored, such a match can occur only if the pattern contains \K.
-
- Perl has no direct equivalent of PCRE_NOTEMPTY or
- PCRE_NOTEMPTY_ATSTART, but it does make a special case of a pattern
- match of the empty string within its split() function, and when using
- the /g modifier. It is possible to emulate Perl's behaviour after
- matching a null string by first trying the match again at the same off-
- set with PCRE_NOTEMPTY_ATSTART and PCRE_ANCHORED, and then if that
- fails, by advancing the starting offset (see below) and trying an ordi-
- nary match again. There is some code that demonstrates how to do this
- in the pcredemo sample program. In the most general case, you have to
- check to see if the newline convention recognizes CRLF as a newline,
- and if so, and the current character is CR followed by LF, advance the
- starting offset by two characters instead of one.
-
- PCRE_NO_START_OPTIMIZE
-
- There are a number of optimizations that pcre_exec() uses at the start
- of a match, in order to speed up the process. For example, if it is
- known that an unanchored match must start with a specific character, it
- searches the subject for that character, and fails immediately if it
- cannot find it, without actually running the main matching function.
- This means that a special item such as (*COMMIT) at the start of a pat-
- tern is not considered until after a suitable starting point for the
- match has been found. Also, when callouts or (*MARK) items are in use,
- these "start-up" optimizations can cause them to be skipped if the pat-
- tern is never actually used. The start-up optimizations are in effect a
- pre-scan of the subject that takes place before the pattern is run.
-
- The PCRE_NO_START_OPTIMIZE option disables the start-up optimizations,
- possibly causing performance to suffer, but ensuring that in cases
- where the result is "no match", the callouts do occur, and that items
- such as (*COMMIT) and (*MARK) are considered at every possible starting
- position in the subject string. If PCRE_NO_START_OPTIMIZE is set at
- compile time, it cannot be unset at matching time. The use of
- PCRE_NO_START_OPTIMIZE at matching time (that is, passing it to
- pcre_exec()) disables JIT execution; in this situation, matching is
- always done using interpretively.
-
- Setting PCRE_NO_START_OPTIMIZE can change the outcome of a matching
- operation. Consider the pattern
-
- (*COMMIT)ABC
-
- When this is compiled, PCRE records the fact that a match must start
- with the character "A". Suppose the subject string is "DEFABC". The
- start-up optimization scans along the subject, finds "A" and runs the
- first match attempt from there. The (*COMMIT) item means that the pat-
- tern must match the current starting position, which in this case, it
- does. However, if the same match is run with PCRE_NO_START_OPTIMIZE
- set, the initial scan along the subject string does not happen. The
- first match attempt is run starting from "D" and when this fails,
- (*COMMIT) prevents any further matches being tried, so the overall
- result is "no match". If the pattern is studied, more start-up opti-
- mizations may be used. For example, a minimum length for the subject
- may be recorded. Consider the pattern
-
- (*MARK:A)(X|Y)
-
- The minimum length for a match is one character. If the subject is
- "ABC", there will be attempts to match "ABC", "BC", "C", and then
- finally an empty string. If the pattern is studied, the final attempt
- does not take place, because PCRE knows that the subject is too short,
- and so the (*MARK) is never encountered. In this case, studying the
- pattern does not affect the overall match result, which is still "no
- match", but it does affect the auxiliary information that is returned.
-
- PCRE_NO_UTF8_CHECK
-
- When PCRE_UTF8 is set at compile time, the validity of the subject as a
- UTF-8 string is automatically checked when pcre_exec() is subsequently
- called. The entire string is checked before any other processing takes
- place. The value of startoffset is also checked to ensure that it
- points to the start of a UTF-8 character. There is a discussion about
- the validity of UTF-8 strings in the pcreunicode page. If an invalid
- sequence of bytes is found, pcre_exec() returns the error
- PCRE_ERROR_BADUTF8 or, if PCRE_PARTIAL_HARD is set and the problem is a
- truncated character at the end of the subject, PCRE_ERROR_SHORTUTF8. In
- both cases, information about the precise nature of the error may also
- be returned (see the descriptions of these errors in the section enti-
- tled Error return values from pcre_exec() below). If startoffset con-
- tains a value that does not point to the start of a UTF-8 character (or
- to the end of the subject), PCRE_ERROR_BADUTF8_OFFSET is returned.
-
- If you already know that your subject is valid, and you want to skip
- these checks for performance reasons, you can set the
- PCRE_NO_UTF8_CHECK option when calling pcre_exec(). You might want to
- do this for the second and subsequent calls to pcre_exec() if you are
- making repeated calls to find all the matches in a single subject
- string. However, you should be sure that the value of startoffset
- points to the start of a character (or the end of the subject). When
- PCRE_NO_UTF8_CHECK is set, the effect of passing an invalid string as a
- subject or an invalid value of startoffset is undefined. Your program
- may crash or loop.
-
- PCRE_PARTIAL_HARD
- PCRE_PARTIAL_SOFT
-
- These options turn on the partial matching feature. For backwards com-
- patibility, PCRE_PARTIAL is a synonym for PCRE_PARTIAL_SOFT. A partial
- match occurs if the end of the subject string is reached successfully,
- but there are not enough subject characters to complete the match. If
- this happens when PCRE_PARTIAL_SOFT (but not PCRE_PARTIAL_HARD) is set,
- matching continues by testing any remaining alternatives. Only if no
- complete match can be found is PCRE_ERROR_PARTIAL returned instead of
- PCRE_ERROR_NOMATCH. In other words, PCRE_PARTIAL_SOFT says that the
- caller is prepared to handle a partial match, but only if no complete
- match can be found.
-
- If PCRE_PARTIAL_HARD is set, it overrides PCRE_PARTIAL_SOFT. In this
- case, if a partial match is found, pcre_exec() immediately returns
- PCRE_ERROR_PARTIAL, without considering any other alternatives. In
- other words, when PCRE_PARTIAL_HARD is set, a partial match is consid-
- ered to be more important that an alternative complete match.
-
- In both cases, the portion of the string that was inspected when the
- partial match was found is set as the first matching string. There is a
- more detailed discussion of partial and multi-segment matching, with
- examples, in the pcrepartial documentation.
-
- The string to be matched by pcre_exec()
-
- The subject string is passed to pcre_exec() as a pointer in subject, a
- length in length, and a starting offset in startoffset. The units for
- length and startoffset are bytes for the 8-bit library, 16-bit data
- items for the 16-bit library, and 32-bit data items for the 32-bit
- library.
-
- If startoffset is negative or greater than the length of the subject,
- pcre_exec() returns PCRE_ERROR_BADOFFSET. When the starting offset is
- zero, the search for a match starts at the beginning of the subject,
- and this is by far the most common case. In UTF-8 or UTF-16 mode, the
- offset must point to the start of a character, or the end of the sub-
- ject (in UTF-32 mode, one data unit equals one character, so all off-
- sets are valid). Unlike the pattern string, the subject may contain
- binary zeroes.
-
- A non-zero starting offset is useful when searching for another match
- in the same subject by calling pcre_exec() again after a previous suc-
- cess. Setting startoffset differs from just passing over a shortened
- string and setting PCRE_NOTBOL in the case of a pattern that begins
- with any kind of lookbehind. For example, consider the pattern
-
- \Biss\B
-
- which finds occurrences of "iss" in the middle of words. (\B matches
- only if the current position in the subject is not a word boundary.)
- When applied to the string "Mississipi" the first call to pcre_exec()
- finds the first occurrence. If pcre_exec() is called again with just
- the remainder of the subject, namely "issipi", it does not match,
- because \B is always false at the start of the subject, which is deemed
- to be a word boundary. However, if pcre_exec() is passed the entire
- string again, but with startoffset set to 4, it finds the second occur-
- rence of "iss" because it is able to look behind the starting point to
- discover that it is preceded by a letter.
-
- Finding all the matches in a subject is tricky when the pattern can
- match an empty string. It is possible to emulate Perl's /g behaviour by
- first trying the match again at the same offset, with the
- PCRE_NOTEMPTY_ATSTART and PCRE_ANCHORED options, and then if that
- fails, advancing the starting offset and trying an ordinary match
- again. There is some code that demonstrates how to do this in the pcre-
- demo sample program. In the most general case, you have to check to see
- if the newline convention recognizes CRLF as a newline, and if so, and
- the current character is CR followed by LF, advance the starting offset
- by two characters instead of one.
-
- If a non-zero starting offset is passed when the pattern is anchored,
- one attempt to match at the given offset is made. This can only succeed
- if the pattern does not require the match to be at the start of the
- subject.
-
- How pcre_exec() returns captured substrings
-
- In general, a pattern matches a certain portion of the subject, and in
- addition, further substrings from the subject may be picked out by
- parts of the pattern. Following the usage in Jeffrey Friedl's book,
- this is called "capturing" in what follows, and the phrase "capturing
- subpattern" is used for a fragment of a pattern that picks out a sub-
- string. PCRE supports several other kinds of parenthesized subpattern
- that do not cause substrings to be captured.
-
- Captured substrings are returned to the caller via a vector of integers
- whose address is passed in ovector. The number of elements in the vec-
- tor is passed in ovecsize, which must be a non-negative number. Note:
- this argument is NOT the size of ovector in bytes.
-
- The first two-thirds of the vector is used to pass back captured sub-
- strings, each substring using a pair of integers. The remaining third
- of the vector is used as workspace by pcre_exec() while matching cap-
- turing subpatterns, and is not available for passing back information.
- The number passed in ovecsize should always be a multiple of three. If
- it is not, it is rounded down.
-
- When a match is successful, information about captured substrings is
- returned in pairs of integers, starting at the beginning of ovector,
- and continuing up to two-thirds of its length at the most. The first
- element of each pair is set to the offset of the first character in a
- substring, and the second is set to the offset of the first character
- after the end of a substring. These values are always data unit off-
- sets, even in UTF mode. They are byte offsets in the 8-bit library,
- 16-bit data item offsets in the 16-bit library, and 32-bit data item
- offsets in the 32-bit library. Note: they are not character counts.
-
- The first pair of integers, ovector[0] and ovector[1], identify the
- portion of the subject string matched by the entire pattern. The next
- pair is used for the first capturing subpattern, and so on. The value
- returned by pcre_exec() is one more than the highest numbered pair that
- has been set. For example, if two substrings have been captured, the
- returned value is 3. If there are no capturing subpatterns, the return
- value from a successful match is 1, indicating that just the first pair
- of offsets has been set.
-
- If a capturing subpattern is matched repeatedly, it is the last portion
- of the string that it matched that is returned.
-
- If the vector is too small to hold all the captured substring offsets,
- it is used as far as possible (up to two-thirds of its length), and the
- function returns a value of zero. If neither the actual string matched
- nor any captured substrings are of interest, pcre_exec() may be called
- with ovector passed as NULL and ovecsize as zero. However, if the pat-
- tern contains back references and the ovector is not big enough to
- remember the related substrings, PCRE has to get additional memory for
- use during matching. Thus it is usually advisable to supply an ovector
- of reasonable size.
-
- There are some cases where zero is returned (indicating vector over-
- flow) when in fact the vector is exactly the right size for the final
- match. For example, consider the pattern
-
- (a)(?:(b)c|bd)
-
- If a vector of 6 elements (allowing for only 1 captured substring) is
- given with subject string "abd", pcre_exec() will try to set the second
- captured string, thereby recording a vector overflow, before failing to
- match "c" and backing up to try the second alternative. The zero
- return, however, does correctly indicate that the maximum number of
- slots (namely 2) have been filled. In similar cases where there is tem-
- porary overflow, but the final number of used slots is actually less
- than the maximum, a non-zero value is returned.
-
- The pcre_fullinfo() function can be used to find out how many capturing
- subpatterns there are in a compiled pattern. The smallest size for
- ovector that will allow for n captured substrings, in addition to the
- offsets of the substring matched by the whole pattern, is (n+1)*3.
-
- It is possible for capturing subpattern number n+1 to match some part
- of the subject when subpattern n has not been used at all. For example,
- if the string "abc" is matched against the pattern (a|(z))(bc) the
- return from the function is 4, and subpatterns 1 and 3 are matched, but
- 2 is not. When this happens, both values in the offset pairs corre-
- sponding to unused subpatterns are set to -1.
-
- Offset values that correspond to unused subpatterns at the end of the
- expression are also set to -1. For example, if the string "abc" is
- matched against the pattern (abc)(x(yz)?)? subpatterns 2 and 3 are not
- matched. The return from the function is 2, because the highest used
- capturing subpattern number is 1, and the offsets for for the second
- and third capturing subpatterns (assuming the vector is large enough,
- of course) are set to -1.
-
- Note: Elements in the first two-thirds of ovector that do not corre-
- spond to capturing parentheses in the pattern are never changed. That
- is, if a pattern contains n capturing parentheses, no more than ovec-
- tor[0] to ovector[2n+1] are set by pcre_exec(). The other elements (in
- the first two-thirds) retain whatever values they previously had.
-
- Some convenience functions are provided for extracting the captured
- substrings as separate strings. These are described below.
-
- Error return values from pcre_exec()
-
- If pcre_exec() fails, it returns a negative number. The following are
- defined in the header file:
-
- PCRE_ERROR_NOMATCH (-1)
-
- The subject string did not match the pattern.
-
- PCRE_ERROR_NULL (-2)
-
- Either code or subject was passed as NULL, or ovector was NULL and
- ovecsize was not zero.
-
- PCRE_ERROR_BADOPTION (-3)
-
- An unrecognized bit was set in the options argument.
-
- PCRE_ERROR_BADMAGIC (-4)
-
- PCRE stores a 4-byte "magic number" at the start of the compiled code,
- to catch the case when it is passed a junk pointer and to detect when a
- pattern that was compiled in an environment of one endianness is run in
- an environment with the other endianness. This is the error that PCRE
- gives when the magic number is not present.
-
- PCRE_ERROR_UNKNOWN_OPCODE (-5)
-
- While running the pattern match, an unknown item was encountered in the
- compiled pattern. This error could be caused by a bug in PCRE or by
- overwriting of the compiled pattern.
-
- PCRE_ERROR_NOMEMORY (-6)
-
- If a pattern contains back references, but the ovector that is passed
- to pcre_exec() is not big enough to remember the referenced substrings,
- PCRE gets a block of memory at the start of matching to use for this
- purpose. If the call via pcre_malloc() fails, this error is given. The
- memory is automatically freed at the end of matching.
-
- This error is also given if pcre_stack_malloc() fails in pcre_exec().
- This can happen only when PCRE has been compiled with --disable-stack-
- for-recursion.
-
- PCRE_ERROR_NOSUBSTRING (-7)
-
- This error is used by the pcre_copy_substring(), pcre_get_substring(),
- and pcre_get_substring_list() functions (see below). It is never
- returned by pcre_exec().
-
- PCRE_ERROR_MATCHLIMIT (-8)
-
- The backtracking limit, as specified by the match_limit field in a
- pcre_extra structure (or defaulted) was reached. See the description
- above.
-
- PCRE_ERROR_CALLOUT (-9)
-
- This error is never generated by pcre_exec() itself. It is provided for
- use by callout functions that want to yield a distinctive error code.
- See the pcrecallout documentation for details.
-
- PCRE_ERROR_BADUTF8 (-10)
-
- A string that contains an invalid UTF-8 byte sequence was passed as a
- subject, and the PCRE_NO_UTF8_CHECK option was not set. If the size of
- the output vector (ovecsize) is at least 2, the byte offset to the
- start of the the invalid UTF-8 character is placed in the first ele-
- ment, and a reason code is placed in the second element. The reason
- codes are listed in the following section. For backward compatibility,
- if PCRE_PARTIAL_HARD is set and the problem is a truncated UTF-8 char-
- acter at the end of the subject (reason codes 1 to 5),
- PCRE_ERROR_SHORTUTF8 is returned instead of PCRE_ERROR_BADUTF8.
-
- PCRE_ERROR_BADUTF8_OFFSET (-11)
-
- The UTF-8 byte sequence that was passed as a subject was checked and
- found to be valid (the PCRE_NO_UTF8_CHECK option was not set), but the
- value of startoffset did not point to the beginning of a UTF-8 charac-
- ter or the end of the subject.
-
- PCRE_ERROR_PARTIAL (-12)
-
- The subject string did not match, but it did match partially. See the
- pcrepartial documentation for details of partial matching.
-
- PCRE_ERROR_BADPARTIAL (-13)
-
- This code is no longer in use. It was formerly returned when the
- PCRE_PARTIAL option was used with a compiled pattern containing items
- that were not supported for partial matching. From release 8.00
- onwards, there are no restrictions on partial matching.
-
- PCRE_ERROR_INTERNAL (-14)
-
- An unexpected internal error has occurred. This error could be caused
- by a bug in PCRE or by overwriting of the compiled pattern.
-
- PCRE_ERROR_BADCOUNT (-15)
-
- This error is given if the value of the ovecsize argument is negative.
-
- PCRE_ERROR_RECURSIONLIMIT (-21)
-
- The internal recursion limit, as specified by the match_limit_recursion
- field in a pcre_extra structure (or defaulted) was reached. See the
- description above.
-
- PCRE_ERROR_BADNEWLINE (-23)
-
- An invalid combination of PCRE_NEWLINE_xxx options was given.
-
- PCRE_ERROR_BADOFFSET (-24)
-
- The value of startoffset was negative or greater than the length of the
- subject, that is, the value in length.
-
- PCRE_ERROR_SHORTUTF8 (-25)
-
- This error is returned instead of PCRE_ERROR_BADUTF8 when the subject
- string ends with a truncated UTF-8 character and the PCRE_PARTIAL_HARD
- option is set. Information about the failure is returned as for
- PCRE_ERROR_BADUTF8. It is in fact sufficient to detect this case, but
- this special error code for PCRE_PARTIAL_HARD precedes the implementa-
- tion of returned information; it is retained for backwards compatibil-
- ity.
-
- PCRE_ERROR_RECURSELOOP (-26)
-
- This error is returned when pcre_exec() detects a recursion loop within
- the pattern. Specifically, it means that either the whole pattern or a
- subpattern has been called recursively for the second time at the same
- position in the subject string. Some simple patterns that might do this
- are detected and faulted at compile time, but more complicated cases,
- in particular mutual recursions between two different subpatterns, can-
- not be detected until run time.
-
- PCRE_ERROR_JIT_STACKLIMIT (-27)
-
- This error is returned when a pattern that was successfully studied
- using a JIT compile option is being matched, but the memory available
- for the just-in-time processing stack is not large enough. See the
- pcrejit documentation for more details.
-
- PCRE_ERROR_BADMODE (-28)
-
- This error is given if a pattern that was compiled by the 8-bit library
- is passed to a 16-bit or 32-bit library function, or vice versa.
-
- PCRE_ERROR_BADENDIANNESS (-29)
-
- This error is given if a pattern that was compiled and saved is
- reloaded on a host with different endianness. The utility function
- pcre_pattern_to_host_byte_order() can be used to convert such a pattern
- so that it runs on the new host.
-
- PCRE_ERROR_JIT_BADOPTION
-
- This error is returned when a pattern that was successfully studied
- using a JIT compile option is being matched, but the matching mode
- (partial or complete match) does not correspond to any JIT compilation
- mode. When the JIT fast path function is used, this error may be also
- given for invalid options. See the pcrejit documentation for more
- details.
-
- PCRE_ERROR_BADLENGTH (-32)
-
- This error is given if pcre_exec() is called with a negative value for
- the length argument.
-
- Error numbers -16 to -20, -22, and 30 are not used by pcre_exec().
-
- Reason codes for invalid UTF-8 strings
-
- This section applies only to the 8-bit library. The corresponding
- information for the 16-bit and 32-bit libraries is given in the pcre16
- and pcre32 pages.
-
- When pcre_exec() returns either PCRE_ERROR_BADUTF8 or PCRE_ERROR_SHORT-
- UTF8, and the size of the output vector (ovecsize) is at least 2, the
- offset of the start of the invalid UTF-8 character is placed in the
- first output vector element (ovector[0]) and a reason code is placed in
- the second element (ovector[1]). The reason codes are given names in
- the pcre.h header file:
-
- PCRE_UTF8_ERR1
- PCRE_UTF8_ERR2
- PCRE_UTF8_ERR3
- PCRE_UTF8_ERR4
- PCRE_UTF8_ERR5
-
- The string ends with a truncated UTF-8 character; the code specifies
- how many bytes are missing (1 to 5). Although RFC 3629 restricts UTF-8
- characters to be no longer than 4 bytes, the encoding scheme (origi-
- nally defined by RFC 2279) allows for up to 6 bytes, and this is
- checked first; hence the possibility of 4 or 5 missing bytes.
-
- PCRE_UTF8_ERR6
- PCRE_UTF8_ERR7
- PCRE_UTF8_ERR8
- PCRE_UTF8_ERR9
- PCRE_UTF8_ERR10
-
- The two most significant bits of the 2nd, 3rd, 4th, 5th, or 6th byte of
- the character do not have the binary value 0b10 (that is, either the
- most significant bit is 0, or the next bit is 1).
-
- PCRE_UTF8_ERR11
- PCRE_UTF8_ERR12
-
- A character that is valid by the RFC 2279 rules is either 5 or 6 bytes
- long; these code points are excluded by RFC 3629.
-
- PCRE_UTF8_ERR13
-
- A 4-byte character has a value greater than 0x10fff; these code points
- are excluded by RFC 3629.
-
- PCRE_UTF8_ERR14
-
- A 3-byte character has a value in the range 0xd800 to 0xdfff; this
- range of code points are reserved by RFC 3629 for use with UTF-16, and
- so are excluded from UTF-8.
-
- PCRE_UTF8_ERR15
- PCRE_UTF8_ERR16
- PCRE_UTF8_ERR17
- PCRE_UTF8_ERR18
- PCRE_UTF8_ERR19
-
- A 2-, 3-, 4-, 5-, or 6-byte character is "overlong", that is, it codes
- for a value that can be represented by fewer bytes, which is invalid.
- For example, the two bytes 0xc0, 0xae give the value 0x2e, whose cor-
- rect coding uses just one byte.
-
- PCRE_UTF8_ERR20
-
- The two most significant bits of the first byte of a character have the
- binary value 0b10 (that is, the most significant bit is 1 and the sec-
- ond is 0). Such a byte can only validly occur as the second or subse-
- quent byte of a multi-byte character.
-
- PCRE_UTF8_ERR21
-
- The first byte of a character has the value 0xfe or 0xff. These values
- can never occur in a valid UTF-8 string.
-
- PCRE_UTF8_ERR22
-
- This error code was formerly used when the presence of a so-called
- "non-character" caused an error. Unicode corrigendum #9 makes it clear
- that such characters should not cause a string to be rejected, and so
- this code is no longer in use and is never returned.
-
-
-EXTRACTING CAPTURED SUBSTRINGS BY NUMBER
-
- int pcre_copy_substring(const char *subject, int *ovector,
- int stringcount, int stringnumber, char *buffer,
- int buffersize);
-
- int pcre_get_substring(const char *subject, int *ovector,
- int stringcount, int stringnumber,
- const char **stringptr);
-
- int pcre_get_substring_list(const char *subject,
- int *ovector, int stringcount, const char ***listptr);
-
- Captured substrings can be accessed directly by using the offsets
- returned by pcre_exec() in ovector. For convenience, the functions
- pcre_copy_substring(), pcre_get_substring(), and pcre_get_sub-
- string_list() are provided for extracting captured substrings as new,
- separate, zero-terminated strings. These functions identify substrings
- by number. The next section describes functions for extracting named
- substrings.
-
- A substring that contains a binary zero is correctly extracted and has
- a further zero added on the end, but the result is not, of course, a C
- string. However, you can process such a string by referring to the
- length that is returned by pcre_copy_substring() and pcre_get_sub-
- string(). Unfortunately, the interface to pcre_get_substring_list() is
- not adequate for handling strings containing binary zeros, because the
- end of the final string is not independently indicated.
-
- The first three arguments are the same for all three of these func-
- tions: subject is the subject string that has just been successfully
- matched, ovector is a pointer to the vector of integer offsets that was
- passed to pcre_exec(), and stringcount is the number of substrings that
- were captured by the match, including the substring that matched the
- entire regular expression. This is the value returned by pcre_exec() if
- it is greater than zero. If pcre_exec() returned zero, indicating that
- it ran out of space in ovector, the value passed as stringcount should
- be the number of elements in the vector divided by three.
-
- The functions pcre_copy_substring() and pcre_get_substring() extract a
- single substring, whose number is given as stringnumber. A value of
- zero extracts the substring that matched the entire pattern, whereas
- higher values extract the captured substrings. For pcre_copy_sub-
- string(), the string is placed in buffer, whose length is given by
- buffersize, while for pcre_get_substring() a new block of memory is
- obtained via pcre_malloc, and its address is returned via stringptr.
- The yield of the function is the length of the string, not including
- the terminating zero, or one of these error codes:
-
- PCRE_ERROR_NOMEMORY (-6)
-
- The buffer was too small for pcre_copy_substring(), or the attempt to
- get memory failed for pcre_get_substring().
-
- PCRE_ERROR_NOSUBSTRING (-7)
-
- There is no substring whose number is stringnumber.
-
- The pcre_get_substring_list() function extracts all available sub-
- strings and builds a list of pointers to them. All this is done in a
- single block of memory that is obtained via pcre_malloc. The address of
- the memory block is returned via listptr, which is also the start of
- the list of string pointers. The end of the list is marked by a NULL
- pointer. The yield of the function is zero if all went well, or the
- error code
-
- PCRE_ERROR_NOMEMORY (-6)
-
- if the attempt to get the memory block failed.
-
- When any of these functions encounter a substring that is unset, which
- can happen when capturing subpattern number n+1 matches some part of
- the subject, but subpattern n has not been used at all, they return an
- empty string. This can be distinguished from a genuine zero-length sub-
- string by inspecting the appropriate offset in ovector, which is nega-
- tive for unset substrings.
-
- The two convenience functions pcre_free_substring() and pcre_free_sub-
- string_list() can be used to free the memory returned by a previous
- call of pcre_get_substring() or pcre_get_substring_list(), respec-
- tively. They do nothing more than call the function pointed to by
- pcre_free, which of course could be called directly from a C program.
- However, PCRE is used in some situations where it is linked via a spe-
- cial interface to another programming language that cannot use
- pcre_free directly; it is for these cases that the functions are pro-
- vided.
-
-
-EXTRACTING CAPTURED SUBSTRINGS BY NAME
-
- int pcre_get_stringnumber(const pcre *code,
- const char *name);
-
- int pcre_copy_named_substring(const pcre *code,
- const char *subject, int *ovector,
- int stringcount, const char *stringname,
- char *buffer, int buffersize);
-
- int pcre_get_named_substring(const pcre *code,
- const char *subject, int *ovector,
- int stringcount, const char *stringname,
- const char **stringptr);
-
- To extract a substring by name, you first have to find associated num-
- ber. For example, for this pattern
-
- (a+)b(?<xxx>\d+)...
-
- the number of the subpattern called "xxx" is 2. If the name is known to
- be unique (PCRE_DUPNAMES was not set), you can find the number from the
- name by calling pcre_get_stringnumber(). The first argument is the com-
- piled pattern, and the second is the name. The yield of the function is
- the subpattern number, or PCRE_ERROR_NOSUBSTRING (-7) if there is no
- subpattern of that name.
-
- Given the number, you can extract the substring directly, or use one of
- the functions described in the previous section. For convenience, there
- are also two functions that do the whole job.
-
- Most of the arguments of pcre_copy_named_substring() and
- pcre_get_named_substring() are the same as those for the similarly
- named functions that extract by number. As these are described in the
- previous section, they are not re-described here. There are just two
- differences:
-
- First, instead of a substring number, a substring name is given. Sec-
- ond, there is an extra argument, given at the start, which is a pointer
- to the compiled pattern. This is needed in order to gain access to the
- name-to-number translation table.
-
- These functions call pcre_get_stringnumber(), and if it succeeds, they
- then call pcre_copy_substring() or pcre_get_substring(), as appropri-
- ate. NOTE: If PCRE_DUPNAMES is set and there are duplicate names, the
- behaviour may not be what you want (see the next section).
-
- Warning: If the pattern uses the (?| feature to set up multiple subpat-
- terns with the same number, as described in the section on duplicate
- subpattern numbers in the pcrepattern page, you cannot use names to
- distinguish the different subpatterns, because names are not included
- in the compiled code. The matching process uses only numbers. For this
- reason, the use of different names for subpatterns of the same number
- causes an error at compile time.
-
-
-DUPLICATE SUBPATTERN NAMES
-
- int pcre_get_stringtable_entries(const pcre *code,
- const char *name, char **first, char **last);
-
- When a pattern is compiled with the PCRE_DUPNAMES option, names for
- subpatterns are not required to be unique. (Duplicate names are always
- allowed for subpatterns with the same number, created by using the (?|
- feature. Indeed, if such subpatterns are named, they are required to
- use the same names.)
-
- Normally, patterns with duplicate names are such that in any one match,
- only one of the named subpatterns participates. An example is shown in
- the pcrepattern documentation.
-
- When duplicates are present, pcre_copy_named_substring() and
- pcre_get_named_substring() return the first substring corresponding to
- the given name that is set. If none are set, PCRE_ERROR_NOSUBSTRING
- (-7) is returned; no data is returned. The pcre_get_stringnumber()
- function returns one of the numbers that are associated with the name,
- but it is not defined which it is.
-
- If you want to get full details of all captured substrings for a given
- name, you must use the pcre_get_stringtable_entries() function. The
- first argument is the compiled pattern, and the second is the name. The
- third and fourth are pointers to variables which are updated by the
- function. After it has run, they point to the first and last entries in
- the name-to-number table for the given name. The function itself
- returns the length of each entry, or PCRE_ERROR_NOSUBSTRING (-7) if
- there are none. The format of the table is described above in the sec-
- tion entitled Information about a pattern above. Given all the rele-
- vant entries for the name, you can extract each of their numbers, and
- hence the captured data, if any.
-
-
-FINDING ALL POSSIBLE MATCHES
-
- The traditional matching function uses a similar algorithm to Perl,
- which stops when it finds the first match, starting at a given point in
- the subject. If you want to find all possible matches, or the longest
- possible match, consider using the alternative matching function (see
- below) instead. If you cannot use the alternative function, but still
- need to find all possible matches, you can kludge it up by making use
- of the callout facility, which is described in the pcrecallout documen-
- tation.
-
- What you have to do is to insert a callout right at the end of the pat-
- tern. When your callout function is called, extract and save the cur-
- rent matched substring. Then return 1, which forces pcre_exec() to
- backtrack and try other alternatives. Ultimately, when it runs out of
- matches, pcre_exec() will yield PCRE_ERROR_NOMATCH.
-
-
-OBTAINING AN ESTIMATE OF STACK USAGE
-
- Matching certain patterns using pcre_exec() can use a lot of process
- stack, which in certain environments can be rather limited in size.
- Some users find it helpful to have an estimate of the amount of stack
- that is used by pcre_exec(), to help them set recursion limits, as
- described in the pcrestack documentation. The estimate that is output
- by pcretest when called with the -m and -C options is obtained by call-
- ing pcre_exec with the values NULL, NULL, NULL, -999, and -999 for its
- first five arguments.
-
- Normally, if its first argument is NULL, pcre_exec() immediately
- returns the negative error code PCRE_ERROR_NULL, but with this special
- combination of arguments, it returns instead a negative number whose
- absolute value is the approximate stack frame size in bytes. (A nega-
- tive number is used so that it is clear that no match has happened.)
- The value is approximate because in some cases, recursive calls to
- pcre_exec() occur when there are one or two additional variables on the
- stack.
-
- If PCRE has been compiled to use the heap instead of the stack for
- recursion, the value returned is the size of each block that is
- obtained from the heap.
-
-
-MATCHING A PATTERN: THE ALTERNATIVE FUNCTION
-
- 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);
-
- The function pcre_dfa_exec() is called to match a subject string
- against a compiled pattern, using a matching algorithm that scans the
- subject string just once, and does not backtrack. This has different
- characteristics to the normal algorithm, and is not compatible with
- Perl. Some of the features of PCRE patterns are not supported. Never-
- theless, there are times when this kind of matching can be useful. For
- a discussion of the two matching algorithms, and a list of features
- that pcre_dfa_exec() does not support, see the pcrematching documenta-
- tion.
-
- The arguments for the pcre_dfa_exec() function are the same as for
- pcre_exec(), plus two extras. The ovector argument is used in a differ-
- ent way, and this is described below. The other common arguments are
- used in the same way as for pcre_exec(), so their description is not
- repeated here.
-
- The two additional arguments provide workspace for the function. The
- workspace vector should contain at least 20 elements. It is used for
- keeping track of multiple paths through the pattern tree. More
- workspace will be needed for patterns and subjects where there are a
- lot of potential matches.
-
- Here is an example of a simple call to pcre_dfa_exec():
-
- int rc;
- int ovector[10];
- int wspace[20];
- rc = pcre_dfa_exec(
- re, /* result of pcre_compile() */
- NULL, /* we didn't study the pattern */
- "some string", /* the subject string */
- 11, /* the length of the subject string */
- 0, /* start at offset 0 in the subject */
- 0, /* default options */
- ovector, /* vector of integers for substring information */
- 10, /* number of elements (NOT size in bytes) */
- wspace, /* working space vector */
- 20); /* number of elements (NOT size in bytes) */
-
- Option bits for pcre_dfa_exec()
-
- The unused bits of the options argument for pcre_dfa_exec() must be
- zero. The only bits that may be set are PCRE_ANCHORED, PCRE_NEW-
- LINE_xxx, PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY,
- PCRE_NOTEMPTY_ATSTART, PCRE_NO_UTF8_CHECK, PCRE_BSR_ANYCRLF,
- PCRE_BSR_UNICODE, PCRE_NO_START_OPTIMIZE, PCRE_PARTIAL_HARD, PCRE_PAR-
- TIAL_SOFT, PCRE_DFA_SHORTEST, and PCRE_DFA_RESTART. All but the last
- four of these are exactly the same as for pcre_exec(), so their
- description is not repeated here.
-
- PCRE_PARTIAL_HARD
- PCRE_PARTIAL_SOFT
-
- These have the same general effect as they do for pcre_exec(), but the
- details are slightly different. When PCRE_PARTIAL_HARD is set for
- pcre_dfa_exec(), it returns PCRE_ERROR_PARTIAL if the end of the sub-
- ject is reached and there is still at least one matching possibility
- that requires additional characters. This happens even if some complete
- matches have also been found. When PCRE_PARTIAL_SOFT is set, the return
- code PCRE_ERROR_NOMATCH is converted into PCRE_ERROR_PARTIAL if the end
- of the subject is reached, there have been no complete matches, but
- there is still at least one matching possibility. The portion of the
- string that was inspected when the longest partial match was found is
- set as the first matching string in both cases. There is a more
- detailed discussion of partial and multi-segment matching, with exam-
- ples, in the pcrepartial documentation.
-
- PCRE_DFA_SHORTEST
-
- Setting the PCRE_DFA_SHORTEST option causes the matching algorithm to
- stop as soon as it has found one match. Because of the way the alterna-
- tive algorithm works, this is necessarily the shortest possible match
- at the first possible matching point in the subject string.
-
- PCRE_DFA_RESTART
-
- When pcre_dfa_exec() returns a partial match, it is possible to call it
- again, with additional subject characters, and have it continue with
- the same match. The PCRE_DFA_RESTART option requests this action; when
- it is set, the workspace and wscount options must reference the same
- vector as before because data about the match so far is left in them
- after a partial match. There is more discussion of this facility in the
- pcrepartial documentation.
-
- Successful returns from pcre_dfa_exec()
-
- When pcre_dfa_exec() succeeds, it may have matched more than one sub-
- string in the subject. Note, however, that all the matches from one run
- of the function start at the same point in the subject. The shorter
- matches are all initial substrings of the longer matches. For example,
- if the pattern
-
- <.*>
-
- is matched against the string
-
- This is <something> <something else> <something further> no more
-
- the three matched strings are
-
- <something>
- <something> <something else>
- <something> <something else> <something further>
-
- On success, the yield of the function is a number greater than zero,
- which is the number of matched substrings. The substrings themselves
- are returned in ovector. Each string uses two elements; the first is
- the offset to the start, and the second is the offset to the end. In
- fact, all the strings have the same start offset. (Space could have
- been saved by giving this only once, but it was decided to retain some
- compatibility with the way pcre_exec() returns data, even though the
- meaning of the strings is different.)
-
- The strings are returned in reverse order of length; that is, the long-
- est matching string is given first. If there were too many matches to
- fit into ovector, the yield of the function is zero, and the vector is
- filled with the longest matches. Unlike pcre_exec(), pcre_dfa_exec()
- can use the entire ovector for returning matched strings.
-
- NOTE: PCRE's "auto-possessification" optimization usually applies to
- character repeats at the end of a pattern (as well as internally). For
- example, the pattern "a\d+" is compiled as if it were "a\d++" because
- there is no point even considering the possibility of backtracking into
- the repeated digits. For DFA matching, this means that only one possi-
- ble match is found. If you really do want multiple matches in such
- cases, either use an ungreedy repeat ("a\d+?") or set the
- PCRE_NO_AUTO_POSSESS option when compiling.
-
- Error returns from pcre_dfa_exec()
-
- The pcre_dfa_exec() function returns a negative number when it fails.
- Many of the errors are the same as for pcre_exec(), and these are
- described above. There are in addition the following errors that are
- specific to pcre_dfa_exec():
-
- PCRE_ERROR_DFA_UITEM (-16)
-
- This return is given if pcre_dfa_exec() encounters an item in the pat-
- tern that it does not support, for instance, the use of \C or a back
- reference.
-
- PCRE_ERROR_DFA_UCOND (-17)
-
- This return is given if pcre_dfa_exec() encounters a condition item
- that uses a back reference for the condition, or a test for recursion
- in a specific group. These are not supported.
-
- PCRE_ERROR_DFA_UMLIMIT (-18)
-
- This return is given if pcre_dfa_exec() is called with an extra block
- that contains a setting of the match_limit or match_limit_recursion
- fields. This is not supported (these fields are meaningless for DFA
- matching).
-
- PCRE_ERROR_DFA_WSSIZE (-19)
-
- This return is given if pcre_dfa_exec() runs out of space in the
- workspace vector.
-
- PCRE_ERROR_DFA_RECURSE (-20)
-
- When a recursive subpattern is processed, the matching function calls
- itself recursively, using private vectors for ovector and workspace.
- This error is given if the output vector is not large enough. This
- should be extremely rare, as a vector of size 1000 is used.
-
- PCRE_ERROR_DFA_BADRESTART (-30)
-
- When pcre_dfa_exec() is called with the PCRE_DFA_RESTART option, some
- plausibility checks are made on the contents of the workspace, which
- should contain data about the previous partial match. If any of these
- checks fail, this error is given.
-
-
-SEE ALSO
-
- pcre16(3), pcre32(3), pcrebuild(3), pcrecallout(3), pcrecpp(3)(3),
- pcrematching(3), pcrepartial(3), pcreposix(3), pcreprecompile(3), pcre-
- sample(3), pcrestack(3).
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 18 December 2015
- Copyright (c) 1997-2015 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCRECALLOUT(3) Library Functions Manual PCRECALLOUT(3)
-
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
-SYNOPSIS
-
- #include <pcre.h>
-
- int (*pcre_callout)(pcre_callout_block *);
-
- int (*pcre16_callout)(pcre16_callout_block *);
-
- int (*pcre32_callout)(pcre32_callout_block *);
-
-
-DESCRIPTION
-
- PCRE provides a feature called "callout", which is a means of temporar-
- ily passing control to the caller of PCRE in the middle of pattern
- matching. The caller of PCRE provides an external function by putting
- its entry point in the global variable pcre_callout (pcre16_callout for
- the 16-bit library, pcre32_callout for the 32-bit library). By default,
- this variable contains NULL, which disables all calling out.
-
- Within a regular expression, (?C) indicates the points at which the
- external function is to be called. Different callout points can be
- identified by putting a number less than 256 after the letter C. The
- default value is zero. For example, this pattern has two callout
- points:
-
- (?C1)abc(?C2)def
-
- If the PCRE_AUTO_CALLOUT option bit is set when a pattern is compiled,
- PCRE automatically inserts callouts, all with number 255, before each
- item in the pattern. For example, if PCRE_AUTO_CALLOUT is used with the
- pattern
-
- A(\d{2}|--)
-
- it is processed as if it were
-
- (?C255)A(?C255)((?C255)\d{2}(?C255)|(?C255)-(?C255)-(?C255))(?C255)
-
- Notice that there is a callout before and after each parenthesis and
- alternation bar. If the pattern contains a conditional group whose con-
- dition is an assertion, an automatic callout is inserted immediately
- before the condition. Such a callout may also be inserted explicitly,
- for example:
-
- (?(?C9)(?=a)ab|de)
-
- This applies only to assertion conditions (because they are themselves
- independent groups).
-
- Automatic callouts can be used for tracking the progress of pattern
- matching. The pcretest program has a pattern qualifier (/C) that sets
- automatic callouts; when it is used, the output indicates how the pat-
- tern is being matched. This is useful information when you are trying
- to optimize the performance of a particular pattern.
-
-
-MISSING CALLOUTS
-
- You should be aware that, because of optimizations in the way PCRE com-
- piles and matches patterns, callouts sometimes do not happen exactly as
- you might expect.
-
- At compile time, PCRE "auto-possessifies" repeated items when it knows
- that what follows cannot be part of the repeat. For example, a+[bc] is
- compiled as if it were a++[bc]. The pcretest output when this pattern
- is anchored and then applied with automatic callouts to the string
- "aaaa" is:
-
- --->aaaa
- +0 ^ ^
- +1 ^ a+
- +3 ^ ^ [bc]
- No match
-
- This indicates that when matching [bc] fails, there is no backtracking
- into a+ and therefore the callouts that would be taken for the back-
- tracks do not occur. You can disable the auto-possessify feature by
- passing PCRE_NO_AUTO_POSSESS to pcre_compile(), or starting the pattern
- with (*NO_AUTO_POSSESS). If this is done in pcretest (using the /O
- qualifier), the output changes to this:
-
- --->aaaa
- +0 ^ ^
- +1 ^ a+
- +3 ^ ^ [bc]
- +3 ^ ^ [bc]
- +3 ^ ^ [bc]
- +3 ^^ [bc]
- No match
-
- This time, when matching [bc] fails, the matcher backtracks into a+ and
- tries again, repeatedly, until a+ itself fails.
-
- Other optimizations that provide fast "no match" results also affect
- callouts. For example, if the pattern is
-
- ab(?C4)cd
-
- PCRE knows that any matching string must contain the letter "d". If the
- subject string is "abyz", the lack of "d" means that matching doesn't
- ever start, and the callout is never reached. However, with "abyd",
- though the result is still no match, the callout is obeyed.
-
- If the pattern is studied, PCRE knows the minimum length of a matching
- string, and will immediately give a "no match" return without actually
- running a match if the subject is not long enough, or, for unanchored
- patterns, if it has been scanned far enough.
-
- You can disable these optimizations by passing the PCRE_NO_START_OPTI-
- MIZE option to the matching function, or by starting the pattern with
- (*NO_START_OPT). This slows down the matching process, but does ensure
- that callouts such as the example above are obeyed.
-
-
-THE CALLOUT INTERFACE
-
- During matching, when PCRE reaches a callout point, the external func-
- tion defined by pcre_callout or pcre[16|32]_callout is called (if it is
- set). This applies to both normal and DFA matching. The only argument
- to the callout function is a pointer to a pcre_callout or
- pcre[16|32]_callout block. These structures contains the following
- fields:
-
- int version;
- int callout_number;
- int *offset_vector;
- const char *subject; (8-bit version)
- PCRE_SPTR16 subject; (16-bit version)
- PCRE_SPTR32 subject; (32-bit version)
- int subject_length;
- int start_match;
- int current_position;
- int capture_top;
- int capture_last;
- void *callout_data;
- int pattern_position;
- int next_item_length;
- const unsigned char *mark; (8-bit version)
- const PCRE_UCHAR16 *mark; (16-bit version)
- const PCRE_UCHAR32 *mark; (32-bit version)
-
- The version field is an integer containing the version number of the
- block format. The initial version was 0; the current version is 2. The
- version number will change again in future if additional fields are
- added, but the intention is never to remove any of the existing fields.
-
- The callout_number field contains the number of the callout, as com-
- piled into the pattern (that is, the number after ?C for manual call-
- outs, and 255 for automatically generated callouts).
-
- The offset_vector field is a pointer to the vector of offsets that was
- passed by the caller to the matching function. When pcre_exec() or
- pcre[16|32]_exec() is used, the contents can be inspected, in order to
- extract substrings that have been matched so far, in the same way as
- for extracting substrings after a match has completed. For the DFA
- matching functions, this field is not useful.
-
- The subject and subject_length fields contain copies of the values that
- were passed to the matching function.
-
- The start_match field normally contains the offset within the subject
- at which the current match attempt started. However, if the escape
- sequence \K has been encountered, this value is changed to reflect the
- modified starting point. If the pattern is not anchored, the callout
- function may be called several times from the same point in the pattern
- for different starting points in the subject.
-
- The current_position field contains the offset within the subject of
- the current match pointer.
-
- When the pcre_exec() or pcre[16|32]_exec() is used, the capture_top
- field contains one more than the number of the highest numbered cap-
- tured substring so far. If no substrings have been captured, the value
- of capture_top is one. This is always the case when the DFA functions
- are used, because they do not support captured substrings.
-
- The capture_last field contains the number of the most recently cap-
- tured substring. However, when a recursion exits, the value reverts to
- what it was outside the recursion, as do the values of all captured
- substrings. If no substrings have been captured, the value of cap-
- ture_last is -1. This is always the case for the DFA matching func-
- tions.
-
- The callout_data field contains a value that is passed to a matching
- function specifically so that it can be passed back in callouts. It is
- passed in the callout_data field of a pcre_extra or pcre[16|32]_extra
- data structure. If no such data was passed, the value of callout_data
- in a callout block is NULL. There is a description of the pcre_extra
- structure in the pcreapi documentation.
-
- The pattern_position field is present from version 1 of the callout
- structure. It contains the offset to the next item to be matched in the
- pattern string.
-
- The next_item_length field is present from version 1 of the callout
- structure. It contains the length of the next item to be matched in the
- pattern string. When the callout immediately precedes an alternation
- bar, a closing parenthesis, or the end of the pattern, the length is
- zero. When the callout precedes an opening parenthesis, the length is
- that of the entire subpattern.
-
- The pattern_position and next_item_length fields are intended to help
- in distinguishing between different automatic callouts, which all have
- the same callout number. However, they are set for all callouts.
-
- The mark field is present from version 2 of the callout structure. In
- callouts from pcre_exec() or pcre[16|32]_exec() it contains a pointer
- to the zero-terminated name of the most recently passed (*MARK),
- (*PRUNE), or (*THEN) item in the match, or NULL if no such items have
- been passed. Instances of (*PRUNE) or (*THEN) without a name do not
- obliterate a previous (*MARK). In callouts from the DFA matching func-
- tions this field always contains NULL.
-
-
-RETURN VALUES
-
- The external callout function returns an integer to PCRE. If the value
- is zero, matching proceeds as normal. If the value is greater than
- zero, matching fails at the current point, but the testing of other
- matching possibilities goes ahead, just as if a lookahead assertion had
- failed. If the value is less than zero, the match is abandoned, the
- matching function returns the negative value.
-
- Negative values should normally be chosen from the set of
- PCRE_ERROR_xxx values. In particular, PCRE_ERROR_NOMATCH forces a stan-
- dard "no match" failure. The error number PCRE_ERROR_CALLOUT is
- reserved for use by callout functions; it will never be used by PCRE
- itself.
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 12 November 2013
- Copyright (c) 1997-2013 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCRECOMPAT(3) Library Functions Manual PCRECOMPAT(3)
-
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
-DIFFERENCES BETWEEN PCRE AND PERL
-
- This document describes the differences in the ways that PCRE and Perl
- handle regular expressions. The differences described here are with
- respect to Perl versions 5.10 and above.
-
- 1. PCRE has only a subset of Perl's Unicode support. Details of what it
- does have are given in the pcreunicode page.
-
- 2. PCRE allows repeat quantifiers only on parenthesized assertions, but
- they do not mean what you might think. For example, (?!a){3} does not
- assert that the next three characters are not "a". It just asserts that
- the next character is not "a" three times (in principle: PCRE optimizes
- this to run the assertion just once). Perl allows repeat quantifiers on
- other assertions such as \b, but these do not seem to have any use.
-
- 3. Capturing subpatterns that occur inside negative lookahead asser-
- tions are counted, but their entries in the offsets vector are never
- set. Perl sometimes (but not always) sets its numerical variables from
- inside negative assertions.
-
- 4. Though binary zero characters are supported in the subject string,
- they are not allowed in a pattern string because it is passed as a nor-
- mal C string, terminated by zero. The escape sequence \0 can be used in
- the pattern to represent a binary zero.
-
- 5. The following Perl escape sequences are not supported: \l, \u, \L,
- \U, and \N when followed by a character name or Unicode value. (\N on
- its own, matching a non-newline character, is supported.) In fact these
- are implemented by Perl's general string-handling and are not part of
- its pattern matching engine. If any of these are encountered by PCRE,
- an error is generated by default. However, if the PCRE_JAVASCRIPT_COM-
- PAT option is set, \U and \u are interpreted as JavaScript interprets
- them.
-
- 6. The Perl escape sequences \p, \P, and \X are supported only if PCRE
- is built with Unicode character property support. The properties that
- can be tested with \p and \P are limited to the general category prop-
- erties such as Lu and Nd, script names such as Greek or Han, and the
- derived properties Any and L&. PCRE does support the Cs (surrogate)
- property, which Perl does not; the Perl documentation says "Because
- Perl hides the need for the user to understand the internal representa-
- tion of Unicode characters, there is no need to implement the somewhat
- messy concept of surrogates."
-
- 7. PCRE does support the \Q...\E escape for quoting substrings. Charac-
- ters in between are treated as literals. This is slightly different
- from Perl in that $ and @ are also handled as literals inside the
- quotes. In Perl, they cause variable interpolation (but of course PCRE
- does not have variables). Note the following examples:
-
- Pattern PCRE matches Perl matches
-
- \Qabc$xyz\E abc$xyz abc followed by the
- contents of $xyz
- \Qabc\$xyz\E abc\$xyz abc\$xyz
- \Qabc\E\$\Qxyz\E abc$xyz abc$xyz
-
- The \Q...\E sequence is recognized both inside and outside character
- classes.
-
- 8. Fairly obviously, PCRE does not support the (?{code}) and (??{code})
- constructions. However, there is support for recursive patterns. This
- is not available in Perl 5.8, but it is in Perl 5.10. Also, the PCRE
- "callout" feature allows an external function to be called during pat-
- tern matching. See the pcrecallout documentation for details.
-
- 9. Subpatterns that are called as subroutines (whether or not recur-
- sively) are always treated as atomic groups in PCRE. This is like
- Python, but unlike Perl. Captured values that are set outside a sub-
- routine call can be reference from inside in PCRE, but not in Perl.
- There is a discussion that explains these differences in more detail in
- the section on recursion differences from Perl in the pcrepattern page.
-
- 10. If any of the backtracking control verbs are used in a subpattern
- that is called as a subroutine (whether or not recursively), their
- effect is confined to that subpattern; it does not extend to the sur-
- rounding pattern. This is not always the case in Perl. In particular,
- if (*THEN) is present in a group that is called as a subroutine, its
- action is limited to that group, even if the group does not contain any
- | characters. Note that such subpatterns are processed as anchored at
- the point where they are tested.
-
- 11. If a pattern contains more than one backtracking control verb, the
- first one that is backtracked onto acts. For example, in the pattern
- A(*COMMIT)B(*PRUNE)C a failure in B triggers (*COMMIT), but a failure
- in C triggers (*PRUNE). Perl's behaviour is more complex; in many cases
- it is the same as PCRE, but there are examples where it differs.
-
- 12. Most backtracking verbs in assertions have their normal actions.
- They are not confined to the assertion.
-
- 13. There are some differences that are concerned with the settings of
- captured strings when part of a pattern is repeated. For example,
- matching "aba" against the pattern /^(a(b)?)+$/ in Perl leaves $2
- unset, but in PCRE it is set to "b".
-
- 14. PCRE's handling of duplicate subpattern numbers and duplicate sub-
- pattern names is not as general as Perl's. This is a consequence of the
- fact the PCRE works internally just with numbers, using an external ta-
- ble to translate between numbers and names. In particular, a pattern
- such as (?|(?<a>A)|(?<b>B), where the two capturing parentheses have
- the same number but different names, is not supported, and causes an
- error at compile time. If it were allowed, it would not be possible to
- distinguish which parentheses matched, because both names map to cap-
- turing subpattern number 1. To avoid this confusing situation, an error
- is given at compile time.
-
- 15. Perl recognizes comments in some places that PCRE does not, for
- example, between the ( and ? at the start of a subpattern. If the /x
- modifier is set, Perl allows white space between ( and ? (though cur-
- rent Perls warn that this is deprecated) but PCRE never does, even if
- the PCRE_EXTENDED option is set.
-
- 16. Perl, when in warning mode, gives warnings for character classes
- such as [A-\d] or [a-[:digit:]]. It then treats the hyphens as liter-
- als. PCRE has no warning features, so it gives an error in these cases
- because they are almost certainly user mistakes.
-
- 17. In PCRE, the upper/lower case character properties Lu and Ll are
- not affected when case-independent matching is specified. For example,
- \p{Lu} always matches an upper case letter. I think Perl has changed in
- this respect; in the release at the time of writing (5.16), \p{Lu} and
- \p{Ll} match all letters, regardless of case, when case independence is
- specified.
-
- 18. PCRE provides some extensions to the Perl regular expression facil-
- ities. Perl 5.10 includes new features that are not in earlier ver-
- sions of Perl, some of which (such as named parentheses) have been in
- PCRE for some time. This list is with respect to Perl 5.10:
-
- (a) Although lookbehind assertions in PCRE must match fixed length
- strings, each alternative branch of a lookbehind assertion can match a
- different length of string. Perl requires them all to have the same
- length.
-
- (b) If PCRE_DOLLAR_ENDONLY is set and PCRE_MULTILINE is not set, the $
- meta-character matches only at the very end of the string.
-
- (c) If PCRE_EXTRA is set, a backslash followed by a letter with no spe-
- cial meaning is faulted. Otherwise, like Perl, the backslash is quietly
- ignored. (Perl can be made to issue a warning.)
-
- (d) If PCRE_UNGREEDY is set, the greediness of the repetition quanti-
- fiers is inverted, that is, by default they are not greedy, but if fol-
- lowed by a question mark they are.
-
- (e) PCRE_ANCHORED can be used at matching time to force a pattern to be
- tried only at the first matching position in the subject string.
-
- (f) The PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NOTEMPTY_ATSTART,
- and PCRE_NO_AUTO_CAPTURE options for pcre_exec() have no Perl equiva-
- lents.
-
- (g) The \R escape sequence can be restricted to match only CR, LF, or
- CRLF by the PCRE_BSR_ANYCRLF option.
-
- (h) The callout facility is PCRE-specific.
-
- (i) The partial matching facility is PCRE-specific.
-
- (j) Patterns compiled by PCRE can be saved and re-used at a later time,
- even on different hosts that have the other endianness. However, this
- does not apply to optimized data created by the just-in-time compiler.
-
- (k) The alternative matching functions (pcre_dfa_exec(),
- pcre16_dfa_exec() and pcre32_dfa_exec(),) match in a different way and
- are not Perl-compatible.
-
- (l) PCRE recognizes some special sequences such as (*CR) at the start
- of a pattern that set overall options that cannot be changed within the
- pattern.
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 10 November 2013
- Copyright (c) 1997-2013 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCREPATTERN(3) Library Functions Manual PCREPATTERN(3)
-
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
-PCRE REGULAR EXPRESSION DETAILS
-
- The syntax and semantics of the regular expressions that are supported
- by PCRE are described in detail below. There is a quick-reference syn-
- tax summary in the pcresyntax page. PCRE tries to match Perl syntax and
- semantics as closely as it can. PCRE also supports some alternative
- regular expression syntax (which does not conflict with the Perl syn-
- tax) in order to provide some compatibility with regular expressions in
- Python, .NET, and Oniguruma.
-
- Perl's regular expressions are described in its own documentation, and
- regular expressions in general are covered in a number of books, some
- of which have copious examples. Jeffrey Friedl's "Mastering Regular
- Expressions", published by O'Reilly, covers regular expressions in
- great detail. This description of PCRE's regular expressions is
- intended as reference material.
-
- This document discusses the patterns that are supported by PCRE when
- one its main matching functions, pcre_exec() (8-bit) or
- pcre[16|32]_exec() (16- or 32-bit), is used. PCRE also has alternative
- matching functions, pcre_dfa_exec() and pcre[16|32_dfa_exec(), which
- match using a different algorithm that is not Perl-compatible. Some of
- the features discussed below are not available when DFA matching is
- used. The advantages and disadvantages of the alternative functions,
- and how they differ from the normal functions, are discussed in the
- pcrematching page.
-
-
-SPECIAL START-OF-PATTERN ITEMS
-
- A number of options that can be passed to pcre_compile() can also be
- set by special items at the start of a pattern. These are not Perl-com-
- patible, but are provided to make these options accessible to pattern
- writers who are not able to change the program that processes the pat-
- tern. Any number of these items may appear, but they must all be
- together right at the start of the pattern string, and the letters must
- be in upper case.
-
- UTF support
-
- The original operation of PCRE was on strings of one-byte characters.
- However, there is now also support for UTF-8 strings in the original
- library, an extra library that supports 16-bit and UTF-16 character
- strings, and a third library that supports 32-bit and UTF-32 character
- strings. To use these features, PCRE must be built to include appropri-
- ate support. When using UTF strings you must either call the compiling
- function with the PCRE_UTF8, PCRE_UTF16, or PCRE_UTF32 option, or the
- pattern must start with one of these special sequences:
-
- (*UTF8)
- (*UTF16)
- (*UTF32)
- (*UTF)
-
- (*UTF) is a generic sequence that can be used with any of the
- libraries. Starting a pattern with such a sequence is equivalent to
- setting the relevant option. How setting a UTF mode affects pattern
- matching is mentioned in several places below. There is also a summary
- of features in the pcreunicode page.
-
- Some applications that allow their users to supply patterns may wish to
- restrict them to non-UTF data for security reasons. If the
- PCRE_NEVER_UTF option is set at compile time, (*UTF) etc. are not
- allowed, and their appearance causes an error.
-
- Unicode property support
-
- Another special sequence that may appear at the start of a pattern is
- (*UCP). This has the same effect as setting the PCRE_UCP option: it
- causes sequences such as \d and \w to use Unicode properties to deter-
- mine character types, instead of recognizing only characters with codes
- less than 128 via a lookup table.
-
- Disabling auto-possessification
-
- If a pattern starts with (*NO_AUTO_POSSESS), it has the same effect as
- setting the PCRE_NO_AUTO_POSSESS option at compile time. This stops
- PCRE from making quantifiers possessive when what follows cannot match
- the repeated item. For example, by default a+b is treated as a++b. For
- more details, see the pcreapi documentation.
-
- Disabling start-up optimizations
-
- If a pattern starts with (*NO_START_OPT), it has the same effect as
- setting the PCRE_NO_START_OPTIMIZE option either at compile or matching
- time. This disables several optimizations for quickly reaching "no
- match" results. For more details, see the pcreapi documentation.
-
- Newline conventions
-
- PCRE supports five different conventions for indicating line breaks in
- strings: a single CR (carriage return) character, a single LF (line-
- feed) character, the two-character sequence CRLF, any of the three pre-
- ceding, or any Unicode newline sequence. The pcreapi page has further
- discussion about newlines, and shows how to set the newline convention
- in the options arguments for the compiling and matching functions.
-
- It is also possible to specify a newline convention by starting a pat-
- tern string with one of the following five sequences:
-
- (*CR) carriage return
- (*LF) linefeed
- (*CRLF) carriage return, followed by linefeed
- (*ANYCRLF) any of the three above
- (*ANY) all Unicode newline sequences
-
- These override the default and the options given to the compiling func-
- tion. For example, on a Unix system where LF is the default newline
- sequence, the pattern
-
- (*CR)a.b
-
- changes the convention to CR. That pattern matches "a\nb" because LF is
- no longer a newline. If more than one of these settings is present, the
- last one is used.
-
- The newline convention affects where the circumflex and dollar asser-
- tions are true. It also affects the interpretation of the dot metachar-
- acter when PCRE_DOTALL is not set, and the behaviour of \N. However, it
- does not affect what the \R escape sequence matches. By default, this
- is any Unicode newline sequence, for Perl compatibility. However, this
- can be changed; see the description of \R in the section entitled "New-
- line sequences" below. A change of \R setting can be combined with a
- change of newline convention.
-
- Setting match and recursion limits
-
- The caller of pcre_exec() can set a limit on the number of times the
- internal match() function is called and on the maximum depth of recur-
- sive calls. These facilities are provided to catch runaway matches that
- are provoked by patterns with huge matching trees (a typical example is
- a pattern with nested unlimited repeats) and to avoid running out of
- system stack by too much recursion. When one of these limits is
- reached, pcre_exec() gives an error return. The limits can also be set
- by items at the start of the pattern of the form
-
- (*LIMIT_MATCH=d)
- (*LIMIT_RECURSION=d)
-
- where d is any number of decimal digits. However, the value of the set-
- ting must be less than the value set (or defaulted) by the caller of
- pcre_exec() for it to have any effect. In other words, the pattern
- writer can lower the limits set by the programmer, but not raise them.
- If there is more than one setting of one of these limits, the lower
- value is used.
-
-
-EBCDIC CHARACTER CODES
-
- PCRE can be compiled to run in an environment that uses EBCDIC as its
- character code rather than ASCII or Unicode (typically a mainframe sys-
- tem). In the sections below, character code values are ASCII or Uni-
- code; in an EBCDIC environment these characters may have different code
- values, and there are no code points greater than 255.
-
-
-CHARACTERS AND METACHARACTERS
-
- A regular expression is a pattern that is matched against a subject
- string from left to right. Most characters stand for themselves in a
- pattern, and match the corresponding characters in the subject. As a
- trivial example, the pattern
-
- The quick brown fox
-
- matches a portion of a subject string that is identical to itself. When
- caseless matching is specified (the PCRE_CASELESS option), letters are
- matched independently of case. In a UTF mode, PCRE always understands
- the concept of case for characters whose values are less than 128, so
- caseless matching is always possible. For characters with higher val-
- ues, the concept of case is supported if PCRE is compiled with Unicode
- property support, but not otherwise. If you want to use caseless
- matching for characters 128 and above, you must ensure that PCRE is
- compiled with Unicode property support as well as with UTF support.
-
- The power of regular expressions comes from the ability to include
- alternatives and repetitions in the pattern. These are encoded in the
- pattern by the use of metacharacters, which do not stand for themselves
- but instead are interpreted in some special way.
-
- There are two different sets of metacharacters: those that are recog-
- nized anywhere in the pattern except within square brackets, and those
- that are recognized within square brackets. Outside square brackets,
- the metacharacters are as follows:
-
- \ general escape character with several uses
- ^ assert start of string (or line, in multiline mode)
- $ assert end of string (or line, in multiline mode)
- . match any character except newline (by default)
- [ start character class definition
- | start of alternative branch
- ( start subpattern
- ) end subpattern
- ? extends the meaning of (
- also 0 or 1 quantifier
- also quantifier minimizer
- * 0 or more quantifier
- + 1 or more quantifier
- also "possessive quantifier"
- { start min/max quantifier
-
- Part of a pattern that is in square brackets is called a "character
- class". In a character class the only metacharacters are:
-
- \ general escape character
- ^ negate the class, but only if the first character
- - indicates character range
- [ POSIX character class (only if followed by POSIX
- syntax)
- ] terminates the character class
-
- The following sections describe the use of each of the metacharacters.
-
-
-BACKSLASH
-
- The backslash character has several uses. Firstly, if it is followed by
- a character that is not a number or a letter, it takes away any special
- meaning that character may have. This use of backslash as an escape
- character applies both inside and outside character classes.
-
- For example, if you want to match a * character, you write \* in the
- pattern. This escaping action applies whether or not the following
- character would otherwise be interpreted as a metacharacter, so it is
- always safe to precede a non-alphanumeric with backslash to specify
- that it stands for itself. In particular, if you want to match a back-
- slash, you write \\.
-
- In a UTF mode, only ASCII numbers and letters have any special meaning
- after a backslash. All other characters (in particular, those whose
- codepoints are greater than 127) are treated as literals.
-
- If a pattern is compiled with the PCRE_EXTENDED option, most white
- space in the pattern (other than in a character class), and characters
- between a # outside a character class and the next newline, inclusive,
- are ignored. An escaping backslash can be used to include a white space
- or # character as part of the pattern.
-
- If you want to remove the special meaning from a sequence of charac-
- ters, you can do so by putting them between \Q and \E. This is differ-
- ent from Perl in that $ and @ are handled as literals in \Q...\E
- sequences in PCRE, whereas in Perl, $ and @ cause variable interpola-
- tion. Note the following examples:
-
- Pattern PCRE matches Perl matches
-
- \Qabc$xyz\E abc$xyz abc followed by the
- contents of $xyz
- \Qabc\$xyz\E abc\$xyz abc\$xyz
- \Qabc\E\$\Qxyz\E abc$xyz abc$xyz
-
- The \Q...\E sequence is recognized both inside and outside character
- classes. An isolated \E that is not preceded by \Q is ignored. If \Q
- is not followed by \E later in the pattern, the literal interpretation
- continues to the end of the pattern (that is, \E is assumed at the
- end). If the isolated \Q is inside a character class, this causes an
- error, because the character class is not terminated.
-
- Non-printing characters
-
- A second use of backslash provides a way of encoding non-printing char-
- acters in patterns in a visible manner. There is no restriction on the
- appearance of non-printing characters, apart from the binary zero that
- terminates a pattern, but when a pattern is being prepared by text
- editing, it is often easier to use one of the following escape
- sequences than the binary character it represents. In an ASCII or Uni-
- code environment, these escapes are as follows:
-
- \a alarm, that is, the BEL character (hex 07)
- \cx "control-x", where x is any ASCII character
- \e escape (hex 1B)
- \f form feed (hex 0C)
- \n linefeed (hex 0A)
- \r carriage return (hex 0D)
- \t tab (hex 09)
- \0dd character with octal code 0dd
- \ddd character with octal code ddd, or back reference
- \o{ddd..} character with octal code ddd..
- \xhh character with hex code hh
- \x{hhh..} character with hex code hhh.. (non-JavaScript mode)
- \uhhhh character with hex code hhhh (JavaScript mode only)
-
- The precise effect of \cx on ASCII characters is as follows: if x is a
- lower case letter, it is converted to upper case. Then bit 6 of the
- character (hex 40) is inverted. Thus \cA to \cZ become hex 01 to hex 1A
- (A is 41, Z is 5A), but \c{ becomes hex 3B ({ is 7B), and \c; becomes
- hex 7B (; is 3B). If the data item (byte or 16-bit value) following \c
- has a value greater than 127, a compile-time error occurs. This locks
- out non-ASCII characters in all modes.
-
- When PCRE is compiled in EBCDIC mode, \a, \e, \f, \n, \r, and \t gener-
- ate the appropriate EBCDIC code values. The \c escape is processed as
- specified for Perl in the perlebcdic document. The only characters that
- are allowed after \c are A-Z, a-z, or one of @, [, \, ], ^, _, or ?.
- Any other character provokes a compile-time error. The sequence \c@
- encodes character code 0; after \c the letters (in either case) encode
- characters 1-26 (hex 01 to hex 1A); [, \, ], ^, and _ encode characters
- 27-31 (hex 1B to hex 1F), and \c? becomes either 255 (hex FF) or 95
- (hex 5F).
-
- Thus, apart from \c?, these escapes generate the same character code
- values as they do in an ASCII environment, though the meanings of the
- values mostly differ. For example, \cG always generates code value 7,
- which is BEL in ASCII but DEL in EBCDIC.
-
- The sequence \c? generates DEL (127, hex 7F) in an ASCII environment,
- but because 127 is not a control character in EBCDIC, Perl makes it
- generate the APC character. Unfortunately, there are several variants
- of EBCDIC. In most of them the APC character has the value 255 (hex
- FF), but in the one Perl calls POSIX-BC its value is 95 (hex 5F). If
- certain other characters have POSIX-BC values, PCRE makes \c? generate
- 95; otherwise it generates 255.
-
- After \0 up to two further octal digits are read. If there are fewer
- than two digits, just those that are present are used. Thus the
- sequence \0\x\015 specifies two binary zeros followed by a CR character
- (code value 13). Make sure you supply two digits after the initial zero
- if the pattern character that follows is itself an octal digit.
-
- The escape \o must be followed by a sequence of octal digits, enclosed
- in braces. An error occurs if this is not the case. This escape is a
- recent addition to Perl; it provides way of specifying character code
- points as octal numbers greater than 0777, and it also allows octal
- numbers and back references to be unambiguously specified.
-
- For greater clarity and unambiguity, it is best to avoid following \ by
- a digit greater than zero. Instead, use \o{} or \x{} to specify charac-
- ter numbers, and \g{} to specify back references. The following para-
- graphs describe the old, ambiguous syntax.
-
- The handling of a backslash followed by a digit other than 0 is compli-
- cated, and Perl has changed in recent releases, causing PCRE also to
- change. Outside a character class, PCRE reads the digit and any follow-
- ing digits as a decimal number. If the number is less than 8, or if
- there have been at least that many previous capturing left parentheses
- in the expression, the entire sequence is taken as a back reference. A
- description of how this works is given later, following the discussion
- of parenthesized subpatterns.
-
- Inside a character class, or if the decimal number following \ is
- greater than 7 and there have not been that many capturing subpatterns,
- PCRE handles \8 and \9 as the literal characters "8" and "9", and oth-
- erwise re-reads up to three octal digits following the backslash, using
- them to generate a data character. Any subsequent digits stand for
- themselves. For example:
-
- \040 is another way of writing an ASCII space
- \40 is the same, provided there are fewer than 40
- previous capturing subpatterns
- \7 is always a back reference
- \11 might be a back reference, or another way of
- writing a tab
- \011 is always a tab
- \0113 is a tab followed by the character "3"
- \113 might be a back reference, otherwise the
- character with octal code 113
- \377 might be a back reference, otherwise
- the value 255 (decimal)
- \81 is either a back reference, or the two
- characters "8" and "1"
-
- Note that octal values of 100 or greater that are specified using this
- syntax must not be introduced by a leading zero, because no more than
- three octal digits are ever read.
-
- By default, after \x that is not followed by {, from zero to two hexa-
- decimal digits are read (letters can be in upper or lower case). Any
- number of hexadecimal digits may appear between \x{ and }. If a charac-
- ter other than a hexadecimal digit appears between \x{ and }, or if
- there is no terminating }, an error occurs.
-
- If the PCRE_JAVASCRIPT_COMPAT option is set, the interpretation of \x
- is as just described only when it is followed by two hexadecimal dig-
- its. Otherwise, it matches a literal "x" character. In JavaScript
- mode, support for code points greater than 256 is provided by \u, which
- must be followed by four hexadecimal digits; otherwise it matches a
- literal "u" character.
-
- Characters whose value is less than 256 can be defined by either of the
- two syntaxes for \x (or by \u in JavaScript mode). There is no differ-
- ence in the way they are handled. For example, \xdc is exactly the same
- as \x{dc} (or \u00dc in JavaScript mode).
-
- Constraints on character values
-
- Characters that are specified using octal or hexadecimal numbers are
- limited to certain values, as follows:
-
- 8-bit non-UTF mode less than 0x100
- 8-bit UTF-8 mode less than 0x10ffff and a valid codepoint
- 16-bit non-UTF mode less than 0x10000
- 16-bit UTF-16 mode less than 0x10ffff and a valid codepoint
- 32-bit non-UTF mode less than 0x100000000
- 32-bit UTF-32 mode less than 0x10ffff and a valid codepoint
-
- Invalid Unicode codepoints are the range 0xd800 to 0xdfff (the so-
- called "surrogate" codepoints), and 0xffef.
-
- Escape sequences in character classes
-
- All the sequences that define a single character value can be used both
- inside and outside character classes. In addition, inside a character
- class, \b is interpreted as the backspace character (hex 08).
-
- \N is not allowed in a character class. \B, \R, and \X are not special
- inside a character class. Like other unrecognized escape sequences,
- they are treated as the literal characters "B", "R", and "X" by
- default, but cause an error if the PCRE_EXTRA option is set. Outside a
- character class, these sequences have different meanings.
-
- Unsupported escape sequences
-
- In Perl, the sequences \l, \L, \u, and \U are recognized by its string
- handler and used to modify the case of following characters. By
- default, PCRE does not support these escape sequences. However, if the
- PCRE_JAVASCRIPT_COMPAT option is set, \U matches a "U" character, and
- \u can be used to define a character by code point, as described in the
- previous section.
-
- Absolute and relative back references
-
- The sequence \g followed by an unsigned or a negative number, option-
- ally enclosed in braces, is an absolute or relative back reference. A
- named back reference can be coded as \g{name}. Back references are dis-
- cussed later, following the discussion of parenthesized subpatterns.
-
- Absolute and relative subroutine calls
-
- For compatibility with Oniguruma, the non-Perl syntax \g followed by a
- name or a number enclosed either in angle brackets or single quotes, is
- an alternative syntax for referencing a subpattern as a "subroutine".
- Details are discussed later. Note that \g{...} (Perl syntax) and
- \g<...> (Oniguruma syntax) are not synonymous. The former is a back
- reference; the latter is a subroutine call.
-
- Generic character types
-
- Another use of backslash is for specifying generic character types:
-
- \d any decimal digit
- \D any character that is not a decimal digit
- \h any horizontal white space character
- \H any character that is not a horizontal white space character
- \s any white space character
- \S any character that is not a white space character
- \v any vertical white space character
- \V any character that is not a vertical white space character
- \w any "word" character
- \W any "non-word" character
-
- There is also the single sequence \N, which matches a non-newline char-
- acter. This is the same as the "." metacharacter when PCRE_DOTALL is
- not set. Perl also uses \N to match characters by name; PCRE does not
- support this.
-
- Each pair of lower and upper case escape sequences partitions the com-
- plete set of characters into two disjoint sets. Any given character
- matches one, and only one, of each pair. The sequences can appear both
- inside and outside character classes. They each match one character of
- the appropriate type. If the current matching point is at the end of
- the subject string, all of them fail, because there is no character to
- match.
-
- For compatibility with Perl, \s did not used to match the VT character
- (code 11), which made it different from the the POSIX "space" class.
- However, Perl added VT at release 5.18, and PCRE followed suit at
- release 8.34. The default \s characters are now HT (9), LF (10), VT
- (11), FF (12), CR (13), and space (32), which are defined as white
- space in the "C" locale. This list may vary if locale-specific matching
- is taking place. For example, in some locales the "non-breaking space"
- character (\xA0) is recognized as white space, and in others the VT
- character is not.
-
- A "word" character is an underscore or any character that is a letter
- or digit. By default, the definition of letters and digits is con-
- trolled by PCRE's low-valued character tables, and may vary if locale-
- specific matching is taking place (see "Locale support" in the pcreapi
- page). For example, in a French locale such as "fr_FR" in Unix-like
- systems, or "french" in Windows, some character codes greater than 127
- are used for accented letters, and these are then matched by \w. The
- use of locales with Unicode is discouraged.
-
- By default, characters whose code points are greater than 127 never
- match \d, \s, or \w, and always match \D, \S, and \W, although this may
- vary for characters in the range 128-255 when locale-specific matching
- is happening. These escape sequences retain their original meanings
- from before Unicode support was available, mainly for efficiency rea-
- sons. If PCRE is compiled with Unicode property support, and the
- PCRE_UCP option is set, the behaviour is changed so that Unicode prop-
- erties are used to determine character types, as follows:
-
- \d any character that matches \p{Nd} (decimal digit)
- \s any character that matches \p{Z} or \h or \v
- \w any character that matches \p{L} or \p{N}, plus underscore
-
- The upper case escapes match the inverse sets of characters. Note that
- \d matches only decimal digits, whereas \w matches any Unicode digit,
- as well as any Unicode letter, and underscore. Note also that PCRE_UCP
- affects \b, and \B because they are defined in terms of \w and \W.
- Matching these sequences is noticeably slower when PCRE_UCP is set.
-
- The sequences \h, \H, \v, and \V are features that were added to Perl
- at release 5.10. In contrast to the other sequences, which match only
- ASCII characters by default, these always match certain high-valued
- code points, whether or not PCRE_UCP is set. The horizontal space char-
- acters are:
-
- U+0009 Horizontal tab (HT)
- U+0020 Space
- U+00A0 Non-break space
- U+1680 Ogham space mark
- U+180E Mongolian vowel separator
- U+2000 En quad
- U+2001 Em quad
- U+2002 En space
- U+2003 Em space
- U+2004 Three-per-em space
- U+2005 Four-per-em space
- U+2006 Six-per-em space
- U+2007 Figure space
- U+2008 Punctuation space
- U+2009 Thin space
- U+200A Hair space
- U+202F Narrow no-break space
- U+205F Medium mathematical space
- U+3000 Ideographic space
-
- The vertical space characters are:
-
- U+000A Linefeed (LF)
- U+000B Vertical tab (VT)
- U+000C Form feed (FF)
- U+000D Carriage return (CR)
- U+0085 Next line (NEL)
- U+2028 Line separator
- U+2029 Paragraph separator
-
- In 8-bit, non-UTF-8 mode, only the characters with codepoints less than
- 256 are relevant.
-
- Newline sequences
-
- Outside a character class, by default, the escape sequence \R matches
- any Unicode newline sequence. In 8-bit non-UTF-8 mode \R is equivalent
- to the following:
-
- (?>\r\n|\n|\x0b|\f|\r|\x85)
-
- This is an example of an "atomic group", details of which are given
- below. This particular group matches either the two-character sequence
- CR followed by LF, or one of the single characters LF (linefeed,
- U+000A), VT (vertical tab, U+000B), FF (form feed, U+000C), CR (car-
- riage return, U+000D), or NEL (next line, U+0085). The two-character
- sequence is treated as a single unit that cannot be split.
-
- In other modes, two additional characters whose codepoints are greater
- than 255 are added: LS (line separator, U+2028) and PS (paragraph sepa-
- rator, U+2029). Unicode character property support is not needed for
- these characters to be recognized.
-
- It is possible to restrict \R to match only CR, LF, or CRLF (instead of
- the complete set of Unicode line endings) by setting the option
- PCRE_BSR_ANYCRLF either at compile time or when the pattern is matched.
- (BSR is an abbrevation for "backslash R".) This can be made the default
- when PCRE is built; if this is the case, the other behaviour can be
- requested via the PCRE_BSR_UNICODE option. It is also possible to
- specify these settings by starting a pattern string with one of the
- following sequences:
-
- (*BSR_ANYCRLF) CR, LF, or CRLF only
- (*BSR_UNICODE) any Unicode newline sequence
-
- These override the default and the options given to the compiling func-
- tion, but they can themselves be overridden by options given to a
- matching function. Note that these special settings, which are not
- Perl-compatible, are recognized only at the very start of a pattern,
- and that they must be in upper case. If more than one of them is
- present, the last one is used. They can be combined with a change of
- newline convention; for example, a pattern can start with:
-
- (*ANY)(*BSR_ANYCRLF)
-
- They can also be combined with the (*UTF8), (*UTF16), (*UTF32), (*UTF)
- or (*UCP) special sequences. Inside a character class, \R is treated as
- an unrecognized escape sequence, and so matches the letter "R" by
- default, but causes an error if PCRE_EXTRA is set.
-
- Unicode character properties
-
- When PCRE is built with Unicode character property support, three addi-
- tional escape sequences that match characters with specific properties
- are available. When in 8-bit non-UTF-8 mode, these sequences are of
- course limited to testing characters whose codepoints are less than
- 256, but they do work in this mode. The extra escape sequences are:
-
- \p{xx} a character with the xx property
- \P{xx} a character without the xx property
- \X a Unicode extended grapheme cluster
-
- The property names represented by xx above are limited to the Unicode
- script names, the general category properties, "Any", which matches any
- character (including newline), and some special PCRE properties
- (described in the next section). Other Perl properties such as "InMu-
- sicalSymbols" are not currently supported by PCRE. Note that \P{Any}
- does not match any characters, so always causes a match failure.
-
- Sets of Unicode characters are defined as belonging to certain scripts.
- A character from one of these sets can be matched using a script name.
- For example:
-
- \p{Greek}
- \P{Han}
-
- Those that are not part of an identified script are lumped together as
- "Common". The current list of scripts is:
-
- Arabic, Armenian, Avestan, Balinese, Bamum, Bassa_Vah, Batak, Bengali,
- Bopomofo, Brahmi, Braille, Buginese, Buhid, Canadian_Aboriginal, Car-
- ian, Caucasian_Albanian, Chakma, Cham, Cherokee, Common, Coptic, Cunei-
- form, Cypriot, Cyrillic, Deseret, Devanagari, Duployan, Egyptian_Hiero-
- glyphs, Elbasan, Ethiopic, Georgian, Glagolitic, Gothic, Grantha,
- Greek, Gujarati, Gurmukhi, Han, Hangul, Hanunoo, Hebrew, Hiragana,
- Imperial_Aramaic, Inherited, Inscriptional_Pahlavi, Inscrip-
- tional_Parthian, Javanese, Kaithi, Kannada, Katakana, Kayah_Li,
- Kharoshthi, Khmer, Khojki, Khudawadi, Lao, Latin, Lepcha, Limbu, Lin-
- ear_A, Linear_B, Lisu, Lycian, Lydian, Mahajani, Malayalam, Mandaic,
- Manichaean, Meetei_Mayek, Mende_Kikakui, Meroitic_Cursive,
- Meroitic_Hieroglyphs, Miao, Modi, Mongolian, Mro, Myanmar, Nabataean,
- New_Tai_Lue, Nko, Ogham, Ol_Chiki, Old_Italic, Old_North_Arabian,
- Old_Permic, Old_Persian, Old_South_Arabian, Old_Turkic, Oriya, Osmanya,
- Pahawh_Hmong, Palmyrene, Pau_Cin_Hau, Phags_Pa, Phoenician,
- Psalter_Pahlavi, Rejang, Runic, Samaritan, Saurashtra, Sharada, Sha-
- vian, Siddham, Sinhala, Sora_Sompeng, Sundanese, Syloti_Nagri, Syriac,
- Tagalog, Tagbanwa, Tai_Le, Tai_Tham, Tai_Viet, Takri, Tamil, Telugu,
- Thaana, Thai, Tibetan, Tifinagh, Tirhuta, Ugaritic, Vai, Warang_Citi,
- Yi.
-
- Each character has exactly one Unicode general category property, spec-
- ified by a two-letter abbreviation. For compatibility with Perl, nega-
- tion can be specified by including a circumflex between the opening
- brace and the property name. For example, \p{^Lu} is the same as
- \P{Lu}.
-
- If only one letter is specified with \p or \P, it includes all the gen-
- eral category properties that start with that letter. In this case, in
- the absence of negation, the curly brackets in the escape sequence are
- optional; these two examples have the same effect:
-
- \p{L}
- \pL
-
- The following general category property codes are supported:
-
- C Other
- Cc Control
- Cf Format
- Cn Unassigned
- Co Private use
- Cs Surrogate
-
- L Letter
- Ll Lower case letter
- Lm Modifier letter
- Lo Other letter
- Lt Title case letter
- Lu Upper case letter
-
- M Mark
- Mc Spacing mark
- Me Enclosing mark
- Mn Non-spacing mark
-
- N Number
- Nd Decimal number
- Nl Letter number
- No Other number
-
- P Punctuation
- Pc Connector punctuation
- Pd Dash punctuation
- Pe Close punctuation
- Pf Final punctuation
- Pi Initial punctuation
- Po Other punctuation
- Ps Open punctuation
-
- S Symbol
- Sc Currency symbol
- Sk Modifier symbol
- Sm Mathematical symbol
- So Other symbol
-
- Z Separator
- Zl Line separator
- Zp Paragraph separator
- Zs Space separator
-
- The special property L& is also supported: it matches a character that
- has the Lu, Ll, or Lt property, in other words, a letter that is not
- classified as a modifier or "other".
-
- The Cs (Surrogate) property applies only to characters in the range
- U+D800 to U+DFFF. Such characters are not valid in Unicode strings and
- so cannot be tested by PCRE, unless UTF validity checking has been
- turned off (see the discussion of PCRE_NO_UTF8_CHECK,
- PCRE_NO_UTF16_CHECK and PCRE_NO_UTF32_CHECK in the pcreapi page). Perl
- does not support the Cs property.
-
- The long synonyms for property names that Perl supports (such as
- \p{Letter}) are not supported by PCRE, nor is it permitted to prefix
- any of these properties with "Is".
-
- No character that is in the Unicode table has the Cn (unassigned) prop-
- erty. Instead, this property is assumed for any code point that is not
- in the Unicode table.
-
- Specifying caseless matching does not affect these escape sequences.
- For example, \p{Lu} always matches only upper case letters. This is
- different from the behaviour of current versions of Perl.
-
- Matching characters by Unicode property is not fast, because PCRE has
- to do a multistage table lookup in order to find a character's prop-
- erty. That is why the traditional escape sequences such as \d and \w do
- not use Unicode properties in PCRE by default, though you can make them
- do so by setting the PCRE_UCP option or by starting the pattern with
- (*UCP).
-
- Extended grapheme clusters
-
- The \X escape matches any number of Unicode characters that form an
- "extended grapheme cluster", and treats the sequence as an atomic group
- (see below). Up to and including release 8.31, PCRE matched an ear-
- lier, simpler definition that was equivalent to
-
- (?>\PM\pM*)
-
- That is, it matched a character without the "mark" property, followed
- by zero or more characters with the "mark" property. Characters with
- the "mark" property are typically non-spacing accents that affect the
- preceding character.
-
- This simple definition was extended in Unicode to include more compli-
- cated kinds of composite character by giving each character a grapheme
- breaking property, and creating rules that use these properties to
- define the boundaries of extended grapheme clusters. In releases of
- PCRE later than 8.31, \X matches one of these clusters.
-
- \X always matches at least one character. Then it decides whether to
- add additional characters according to the following rules for ending a
- cluster:
-
- 1. End at the end of the subject string.
-
- 2. Do not end between CR and LF; otherwise end after any control char-
- acter.
-
- 3. Do not break Hangul (a Korean script) syllable sequences. Hangul
- characters are of five types: L, V, T, LV, and LVT. An L character may
- be followed by an L, V, LV, or LVT character; an LV or V character may
- be followed by a V or T character; an LVT or T character may be follwed
- only by a T character.
-
- 4. Do not end before extending characters or spacing marks. Characters
- with the "mark" property always have the "extend" grapheme breaking
- property.
-
- 5. Do not end after prepend characters.
-
- 6. Otherwise, end the cluster.
-
- PCRE's additional properties
-
- As well as the standard Unicode properties described above, PCRE sup-
- ports four more that make it possible to convert traditional escape
- sequences such as \w and \s to use Unicode properties. PCRE uses these
- non-standard, non-Perl properties internally when PCRE_UCP is set. How-
- ever, they may also be used explicitly. These properties are:
-
- Xan Any alphanumeric character
- Xps Any POSIX space character
- Xsp Any Perl space character
- Xwd Any Perl "word" character
-
- Xan matches characters that have either the L (letter) or the N (num-
- ber) property. Xps matches the characters tab, linefeed, vertical tab,
- form feed, or carriage return, and any other character that has the Z
- (separator) property. Xsp is the same as Xps; it used to exclude ver-
- tical tab, for Perl compatibility, but Perl changed, and so PCRE fol-
- lowed at release 8.34. Xwd matches the same characters as Xan, plus
- underscore.
-
- There is another non-standard property, Xuc, which matches any charac-
- ter that can be represented by a Universal Character Name in C++ and
- other programming languages. These are the characters $, @, ` (grave
- accent), and all characters with Unicode code points greater than or
- equal to U+00A0, except for the surrogates U+D800 to U+DFFF. Note that
- most base (ASCII) characters are excluded. (Universal Character Names
- are of the form \uHHHH or \UHHHHHHHH where H is a hexadecimal digit.
- Note that the Xuc property does not match these sequences but the char-
- acters that they represent.)
-
- Resetting the match start
-
- The escape sequence \K causes any previously matched characters not to
- be included in the final matched sequence. For example, the pattern:
-
- foo\Kbar
-
- matches "foobar", but reports that it has matched "bar". This feature
- is similar to a lookbehind assertion (described below). However, in
- this case, the part of the subject before the real match does not have
- to be of fixed length, as lookbehind assertions do. The use of \K does
- not interfere with the setting of captured substrings. For example,
- when the pattern
-
- (foo)\Kbar
-
- matches "foobar", the first substring is still set to "foo".
-
- Perl documents that the use of \K within assertions is "not well
- defined". In PCRE, \K is acted upon when it occurs inside positive
- assertions, but is ignored in negative assertions. Note that when a
- pattern such as (?=ab\K) matches, the reported start of the match can
- be greater than the end of the match.
-
- Simple assertions
-
- The final use of backslash is for certain simple assertions. An asser-
- tion specifies a condition that has to be met at a particular point in
- a match, without consuming any characters from the subject string. The
- use of subpatterns for more complicated assertions is described below.
- The backslashed assertions are:
-
- \b matches at a word boundary
- \B matches when not at a word boundary
- \A matches at the start of the subject
- \Z matches at the end of the subject
- also matches before a newline at the end of the subject
- \z matches only at the end of the subject
- \G matches at the first matching position in the subject
-
- Inside a character class, \b has a different meaning; it matches the
- backspace character. If any other of these assertions appears in a
- character class, by default it matches the corresponding literal char-
- acter (for example, \B matches the letter B). However, if the
- PCRE_EXTRA option is set, an "invalid escape sequence" error is gener-
- ated instead.
-
- A word boundary is a position in the subject string where the current
- character and the previous character do not both match \w or \W (i.e.
- one matches \w and the other matches \W), or the start or end of the
- string if the first or last character matches \w, respectively. In a
- UTF mode, the meanings of \w and \W can be changed by setting the
- PCRE_UCP option. When this is done, it also affects \b and \B. Neither
- PCRE nor Perl has a separate "start of word" or "end of word" metase-
- quence. However, whatever follows \b normally determines which it is.
- For example, the fragment \ba matches "a" at the start of a word.
-
- The \A, \Z, and \z assertions differ from the traditional circumflex
- and dollar (described in the next section) in that they only ever match
- at the very start and end of the subject string, whatever options are
- set. Thus, they are independent of multiline mode. These three asser-
- tions are not affected by the PCRE_NOTBOL or PCRE_NOTEOL options, which
- affect only the behaviour of the circumflex and dollar metacharacters.
- However, if the startoffset argument of pcre_exec() is non-zero, indi-
- cating that matching is to start at a point other than the beginning of
- the subject, \A can never match. The difference between \Z and \z is
- that \Z matches before a newline at the end of the string as well as at
- the very end, whereas \z matches only at the end.
-
- The \G assertion is true only when the current matching position is at
- the start point of the match, as specified by the startoffset argument
- of pcre_exec(). It differs from \A when the value of startoffset is
- non-zero. By calling pcre_exec() multiple times with appropriate argu-
- ments, you can mimic Perl's /g option, and it is in this kind of imple-
- mentation where \G can be useful.
-
- Note, however, that PCRE's interpretation of \G, as the start of the
- current match, is subtly different from Perl's, which defines it as the
- end of the previous match. In Perl, these can be different when the
- previously matched string was empty. Because PCRE does just one match
- at a time, it cannot reproduce this behaviour.
-
- If all the alternatives of a pattern begin with \G, the expression is
- anchored to the starting match position, and the "anchored" flag is set
- in the compiled regular expression.
-
-
-CIRCUMFLEX AND DOLLAR
-
- The circumflex and dollar metacharacters are zero-width assertions.
- That is, they test for a particular condition being true without con-
- suming any characters from the subject string.
-
- Outside a character class, in the default matching mode, the circumflex
- character is an assertion that is true only if the current matching
- point is at the start of the subject string. If the startoffset argu-
- ment of pcre_exec() is non-zero, circumflex can never match if the
- PCRE_MULTILINE option is unset. Inside a character class, circumflex
- has an entirely different meaning (see below).
-
- Circumflex need not be the first character of the pattern if a number
- of alternatives are involved, but it should be the first thing in each
- alternative in which it appears if the pattern is ever to match that
- branch. If all possible alternatives start with a circumflex, that is,
- if the pattern is constrained to match only at the start of the sub-
- ject, it is said to be an "anchored" pattern. (There are also other
- constructs that can cause a pattern to be anchored.)
-
- The dollar character is an assertion that is true only if the current
- matching point is at the end of the subject string, or immediately
- before a newline at the end of the string (by default). Note, however,
- that it does not actually match the newline. Dollar need not be the
- last character of the pattern if a number of alternatives are involved,
- but it should be the last item in any branch in which it appears. Dol-
- lar has no special meaning in a character class.
-
- The meaning of dollar can be changed so that it matches only at the
- very end of the string, by setting the PCRE_DOLLAR_ENDONLY option at
- compile time. This does not affect the \Z assertion.
-
- The meanings of the circumflex and dollar characters are changed if the
- PCRE_MULTILINE option is set. When this is the case, a circumflex
- matches immediately after internal newlines as well as at the start of
- the subject string. It does not match after a newline that ends the
- string. A dollar matches before any newlines in the string, as well as
- at the very end, when PCRE_MULTILINE is set. When newline is specified
- as the two-character sequence CRLF, isolated CR and LF characters do
- not indicate newlines.
-
- For example, the pattern /^abc$/ matches the subject string "def\nabc"
- (where \n represents a newline) in multiline mode, but not otherwise.
- Consequently, patterns that are anchored in single line mode because
- all branches start with ^ are not anchored in multiline mode, and a
- match for circumflex is possible when the startoffset argument of
- pcre_exec() is non-zero. The PCRE_DOLLAR_ENDONLY option is ignored if
- PCRE_MULTILINE is set.
-
- Note that the sequences \A, \Z, and \z can be used to match the start
- and end of the subject in both modes, and if all branches of a pattern
- start with \A it is always anchored, whether or not PCRE_MULTILINE is
- set.
-
-
-FULL STOP (PERIOD, DOT) AND \N
-
- Outside a character class, a dot in the pattern matches any one charac-
- ter in the subject string except (by default) a character that signi-
- fies the end of a line.
-
- When a line ending is defined as a single character, dot never matches
- that character; when the two-character sequence CRLF is used, dot does
- not match CR if it is immediately followed by LF, but otherwise it
- matches all characters (including isolated CRs and LFs). When any Uni-
- code line endings are being recognized, dot does not match CR or LF or
- any of the other line ending characters.
-
- The behaviour of dot with regard to newlines can be changed. If the
- PCRE_DOTALL option is set, a dot matches any one character, without
- exception. If the two-character sequence CRLF is present in the subject
- string, it takes two dots to match it.
-
- The handling of dot is entirely independent of the handling of circum-
- flex and dollar, the only relationship being that they both involve
- newlines. Dot has no special meaning in a character class.
-
- The escape sequence \N behaves like a dot, except that it is not
- affected by the PCRE_DOTALL option. In other words, it matches any
- character except one that signifies the end of a line. Perl also uses
- \N to match characters by name; PCRE does not support this.
-
-
-MATCHING A SINGLE DATA UNIT
-
- Outside a character class, the escape sequence \C matches any one data
- unit, whether or not a UTF mode is set. In the 8-bit library, one data
- unit is one byte; in the 16-bit library it is a 16-bit unit; in the
- 32-bit library it is a 32-bit unit. Unlike a dot, \C always matches
- line-ending characters. The feature is provided in Perl in order to
- match individual bytes in UTF-8 mode, but it is unclear how it can use-
- fully be used. Because \C breaks up characters into individual data
- units, matching one unit with \C in a UTF mode means that the rest of
- the string may start with a malformed UTF character. This has undefined
- results, because PCRE assumes that it is dealing with valid UTF strings
- (and by default it checks this at the start of processing unless the
- PCRE_NO_UTF8_CHECK, PCRE_NO_UTF16_CHECK or PCRE_NO_UTF32_CHECK option
- is used).
-
- PCRE does not allow \C to appear in lookbehind assertions (described
- below) in a UTF mode, because this would make it impossible to calcu-
- late the length of the lookbehind.
-
- In general, the \C escape sequence is best avoided. However, one way of
- using it that avoids the problem of malformed UTF characters is to use
- a lookahead to check the length of the next character, as in this pat-
- tern, which could be used with a UTF-8 string (ignore white space and
- line breaks):
-
- (?| (?=[\x00-\x7f])(\C) |
- (?=[\x80-\x{7ff}])(\C)(\C) |
- (?=[\x{800}-\x{ffff}])(\C)(\C)(\C) |
- (?=[\x{10000}-\x{1fffff}])(\C)(\C)(\C)(\C))
-
- A group that starts with (?| resets the capturing parentheses numbers
- in each alternative (see "Duplicate Subpattern Numbers" below). The
- assertions at the start of each branch check the next UTF-8 character
- for values whose encoding uses 1, 2, 3, or 4 bytes, respectively. The
- character's individual bytes are then captured by the appropriate num-
- ber of groups.
-
-
-SQUARE BRACKETS AND CHARACTER CLASSES
-
- An opening square bracket introduces a character class, terminated by a
- closing square bracket. A closing square bracket on its own is not spe-
- cial by default. However, if the PCRE_JAVASCRIPT_COMPAT option is set,
- a lone closing square bracket causes a compile-time error. If a closing
- square bracket is required as a member of the class, it should be the
- first data character in the class (after an initial circumflex, if
- present) or escaped with a backslash.
-
- A character class matches a single character in the subject. In a UTF
- mode, the character may be more than one data unit long. A matched
- character must be in the set of characters defined by the class, unless
- the first character in the class definition is a circumflex, in which
- case the subject character must not be in the set defined by the class.
- If a circumflex is actually required as a member of the class, ensure
- it is not the first character, or escape it with a backslash.
-
- For example, the character class [aeiou] matches any lower case vowel,
- while [^aeiou] matches any character that is not a lower case vowel.
- Note that a circumflex is just a convenient notation for specifying the
- characters that are in the class by enumerating those that are not. A
- class that starts with a circumflex is not an assertion; it still con-
- sumes a character from the subject string, and therefore it fails if
- the current pointer is at the end of the string.
-
- In UTF-8 (UTF-16, UTF-32) mode, characters with values greater than 255
- (0xffff) can be included in a class as a literal string of data units,
- or by using the \x{ escaping mechanism.
-
- When caseless matching is set, any letters in a class represent both
- their upper case and lower case versions, so for example, a caseless
- [aeiou] matches "A" as well as "a", and a caseless [^aeiou] does not
- match "A", whereas a caseful version would. In a UTF mode, PCRE always
- understands the concept of case for characters whose values are less
- than 128, so caseless matching is always possible. For characters with
- higher values, the concept of case is supported if PCRE is compiled
- with Unicode property support, but not otherwise. If you want to use
- caseless matching in a UTF mode for characters 128 and above, you must
- ensure that PCRE is compiled with Unicode property support as well as
- with UTF support.
-
- Characters that might indicate line breaks are never treated in any
- special way when matching character classes, whatever line-ending
- sequence is in use, and whatever setting of the PCRE_DOTALL and
- PCRE_MULTILINE options is used. A class such as [^a] always matches one
- of these characters.
-
- The minus (hyphen) character can be used to specify a range of charac-
- ters in a character class. For example, [d-m] matches any letter
- between d and m, inclusive. If a minus character is required in a
- class, it must be escaped with a backslash or appear in a position
- where it cannot be interpreted as indicating a range, typically as the
- first or last character in the class, or immediately after a range. For
- example, [b-d-z] matches letters in the range b to d, a hyphen charac-
- ter, or z.
-
- It is not possible to have the literal character "]" as the end charac-
- ter of a range. A pattern such as [W-]46] is interpreted as a class of
- two characters ("W" and "-") followed by a literal string "46]", so it
- would match "W46]" or "-46]". However, if the "]" is escaped with a
- backslash it is interpreted as the end of range, so [W-\]46] is inter-
- preted as a class containing a range followed by two other characters.
- The octal or hexadecimal representation of "]" can also be used to end
- a range.
-
- An error is generated if a POSIX character class (see below) or an
- escape sequence other than one that defines a single character appears
- at a point where a range ending character is expected. For example,
- [z-\xff] is valid, but [A-\d] and [A-[:digit:]] are not.
-
- Ranges operate in the collating sequence of character values. They can
- also be used for characters specified numerically, for example
- [\000-\037]. Ranges can include any characters that are valid for the
- current mode.
-
- If a range that includes letters is used when caseless matching is set,
- it matches the letters in either case. For example, [W-c] is equivalent
- to [][\\^_`wxyzabc], matched caselessly, and in a non-UTF mode, if
- character tables for a French locale are in use, [\xc8-\xcb] matches
- accented E characters in both cases. In UTF modes, PCRE supports the
- concept of case for characters with values greater than 128 only when
- it is compiled with Unicode property support.
-
- The character escape sequences \d, \D, \h, \H, \p, \P, \s, \S, \v, \V,
- \w, and \W may appear in a character class, and add the characters that
- they match to the class. For example, [\dABCDEF] matches any hexadeci-
- mal digit. In UTF modes, the PCRE_UCP option affects the meanings of
- \d, \s, \w and their upper case partners, just as it does when they
- appear outside a character class, as described in the section entitled
- "Generic character types" above. The escape sequence \b has a different
- meaning inside a character class; it matches the backspace character.
- The sequences \B, \N, \R, and \X are not special inside a character
- class. Like any other unrecognized escape sequences, they are treated
- as the literal characters "B", "N", "R", and "X" by default, but cause
- an error if the PCRE_EXTRA option is set.
-
- A circumflex can conveniently be used with the upper case character
- types to specify a more restricted set of characters than the matching
- lower case type. For example, the class [^\W_] matches any letter or
- digit, but not underscore, whereas [\w] includes underscore. A positive
- character class should be read as "something OR something OR ..." and a
- negative class as "NOT something AND NOT something AND NOT ...".
-
- The only metacharacters that are recognized in character classes are
- backslash, hyphen (only where it can be interpreted as specifying a
- range), circumflex (only at the start), opening square bracket (only
- when it can be interpreted as introducing a POSIX class name, or for a
- special compatibility feature - see the next two sections), and the
- terminating closing square bracket. However, escaping other non-
- alphanumeric characters does no harm.
-
-
-POSIX CHARACTER CLASSES
-
- Perl supports the POSIX notation for character classes. This uses names
- enclosed by [: and :] within the enclosing square brackets. PCRE also
- supports this notation. For example,
-
- [01[:alpha:]%]
-
- matches "0", "1", any alphabetic character, or "%". The supported class
- names are:
-
- alnum letters and digits
- alpha letters
- ascii character codes 0 - 127
- blank space or tab only
- cntrl control characters
- digit decimal digits (same as \d)
- graph printing characters, excluding space
- lower lower case letters
- print printing characters, including space
- punct printing characters, excluding letters and digits and space
- space white space (the same as \s from PCRE 8.34)
- upper upper case letters
- word "word" characters (same as \w)
- xdigit hexadecimal digits
-
- The default "space" characters are HT (9), LF (10), VT (11), FF (12),
- CR (13), and space (32). If locale-specific matching is taking place,
- the list of space characters may be different; there may be fewer or
- more of them. "Space" used to be different to \s, which did not include
- VT, for Perl compatibility. However, Perl changed at release 5.18, and
- PCRE followed at release 8.34. "Space" and \s now match the same set
- of characters.
-
- The name "word" is a Perl extension, and "blank" is a GNU extension
- from Perl 5.8. Another Perl extension is negation, which is indicated
- by a ^ character after the colon. For example,
-
- [12[:^digit:]]
-
- matches "1", "2", or any non-digit. PCRE (and Perl) also recognize the
- POSIX syntax [.ch.] and [=ch=] where "ch" is a "collating element", but
- these are not supported, and an error is given if they are encountered.
-
- By default, characters with values greater than 128 do not match any of
- the POSIX character classes. However, if the PCRE_UCP option is passed
- to pcre_compile(), some of the classes are changed so that Unicode
- character properties are used. This is achieved by replacing certain
- POSIX classes by other sequences, as follows:
-
- [:alnum:] becomes \p{Xan}
- [:alpha:] becomes \p{L}
- [:blank:] becomes \h
- [:digit:] becomes \p{Nd}
- [:lower:] becomes \p{Ll}
- [:space:] becomes \p{Xps}
- [:upper:] becomes \p{Lu}
- [:word:] becomes \p{Xwd}
-
- Negated versions, such as [:^alpha:] use \P instead of \p. Three other
- POSIX classes are handled specially in UCP mode:
-
- [:graph:] This matches characters that have glyphs that mark the page
- when printed. In Unicode property terms, it matches all char-
- acters with the L, M, N, P, S, or Cf properties, except for:
-
- U+061C Arabic Letter Mark
- U+180E Mongolian Vowel Separator
- U+2066 - U+2069 Various "isolate"s
-
-
- [:print:] This matches the same characters as [:graph:] plus space
- characters that are not controls, that is, characters with
- the Zs property.
-
- [:punct:] This matches all characters that have the Unicode P (punctua-
- tion) property, plus those characters whose code points are
- less than 128 that have the S (Symbol) property.
-
- The other POSIX classes are unchanged, and match only characters with
- code points less than 128.
-
-
-COMPATIBILITY FEATURE FOR WORD BOUNDARIES
-
- In the POSIX.2 compliant library that was included in 4.4BSD Unix, the
- ugly syntax [[:<:]] and [[:>:]] is used for matching "start of word"
- and "end of word". PCRE treats these items as follows:
-
- [[:<:]] is converted to \b(?=\w)
- [[:>:]] is converted to \b(?<=\w)
-
- Only these exact character sequences are recognized. A sequence such as
- [a[:<:]b] provokes error for an unrecognized POSIX class name. This
- support is not compatible with Perl. It is provided to help migrations
- from other environments, and is best not used in any new patterns. Note
- that \b matches at the start and the end of a word (see "Simple asser-
- tions" above), and in a Perl-style pattern the preceding or following
- character normally shows which is wanted, without the need for the
- assertions that are used above in order to give exactly the POSIX be-
- haviour.
-
-
-VERTICAL BAR
-
- Vertical bar characters are used to separate alternative patterns. For
- example, the pattern
-
- gilbert|sullivan
-
- matches either "gilbert" or "sullivan". Any number of alternatives may
- appear, and an empty alternative is permitted (matching the empty
- string). The matching process tries each alternative in turn, from left
- to right, and the first one that succeeds is used. If the alternatives
- are within a subpattern (defined below), "succeeds" means matching the
- rest of the main pattern as well as the alternative in the subpattern.
-
-
-INTERNAL OPTION SETTING
-
- The settings of the PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL, and
- PCRE_EXTENDED options (which are Perl-compatible) can be changed from
- within the pattern by a sequence of Perl option letters enclosed
- between "(?" and ")". The option letters are
-
- i for PCRE_CASELESS
- m for PCRE_MULTILINE
- s for PCRE_DOTALL
- x for PCRE_EXTENDED
-
- For example, (?im) sets caseless, multiline matching. It is also possi-
- ble to unset these options by preceding the letter with a hyphen, and a
- combined setting and unsetting such as (?im-sx), which sets PCRE_CASE-
- LESS and PCRE_MULTILINE while unsetting PCRE_DOTALL and PCRE_EXTENDED,
- is also permitted. If a letter appears both before and after the
- hyphen, the option is unset.
-
- The PCRE-specific options PCRE_DUPNAMES, PCRE_UNGREEDY, and PCRE_EXTRA
- can be changed in the same way as the Perl-compatible options by using
- the characters J, U and X respectively.
-
- When one of these option changes occurs at top level (that is, not
- inside subpattern parentheses), the change applies to the remainder of
- the pattern that follows. An option change within a subpattern (see
- below for a description of subpatterns) affects only that part of the
- subpattern that follows it, so
-
- (a(?i)b)c
-
- matches abc and aBc and no other strings (assuming PCRE_CASELESS is not
- used). By this means, options can be made to have different settings
- in different parts of the pattern. Any changes made in one alternative
- do carry on into subsequent branches within the same subpattern. For
- example,
-
- (a(?i)b|c)
-
- matches "ab", "aB", "c", and "C", even though when matching "C" the
- first branch is abandoned before the option setting. This is because
- the effects of option settings happen at compile time. There would be
- some very weird behaviour otherwise.
-
- Note: There are other PCRE-specific options that can be set by the
- application when the compiling or matching functions are called. In
- some cases the pattern can contain special leading sequences such as
- (*CRLF) to override what the application has set or what has been
- defaulted. Details are given in the section entitled "Newline
- sequences" above. There are also the (*UTF8), (*UTF16),(*UTF32), and
- (*UCP) leading sequences that can be used to set UTF and Unicode prop-
- erty modes; they are equivalent to setting the PCRE_UTF8, PCRE_UTF16,
- PCRE_UTF32 and the PCRE_UCP options, respectively. The (*UTF) sequence
- is a generic version that can be used with any of the libraries. How-
- ever, the application can set the PCRE_NEVER_UTF option, which locks
- out the use of the (*UTF) sequences.
-
-
-SUBPATTERNS
-
- Subpatterns are delimited by parentheses (round brackets), which can be
- nested. Turning part of a pattern into a subpattern does two things:
-
- 1. It localizes a set of alternatives. For example, the pattern
-
- cat(aract|erpillar|)
-
- matches "cataract", "caterpillar", or "cat". Without the parentheses,
- it would match "cataract", "erpillar" or an empty string.
-
- 2. It sets up the subpattern as a capturing subpattern. This means
- that, when the whole pattern matches, that portion of the subject
- string that matched the subpattern is passed back to the caller via the
- ovector argument of the matching function. (This applies only to the
- traditional matching functions; the DFA matching functions do not sup-
- port capturing.)
-
- Opening parentheses are counted from left to right (starting from 1) to
- obtain numbers for the capturing subpatterns. For example, if the
- string "the red king" is matched against the pattern
-
- the ((red|white) (king|queen))
-
- the captured substrings are "red king", "red", and "king", and are num-
- bered 1, 2, and 3, respectively.
-
- The fact that plain parentheses fulfil two functions is not always
- helpful. There are often times when a grouping subpattern is required
- without a capturing requirement. If an opening parenthesis is followed
- by a question mark and a colon, the subpattern does not do any captur-
- ing, and is not counted when computing the number of any subsequent
- capturing subpatterns. For example, if the string "the white queen" is
- matched against the pattern
-
- the ((?:red|white) (king|queen))
-
- the captured substrings are "white queen" and "queen", and are numbered
- 1 and 2. The maximum number of capturing subpatterns is 65535.
-
- As a convenient shorthand, if any option settings are required at the
- start of a non-capturing subpattern, the option letters may appear
- between the "?" and the ":". Thus the two patterns
-
- (?i:saturday|sunday)
- (?:(?i)saturday|sunday)
-
- match exactly the same set of strings. Because alternative branches are
- tried from left to right, and options are not reset until the end of
- the subpattern is reached, an option setting in one branch does affect
- subsequent branches, so the above patterns match "SUNDAY" as well as
- "Saturday".
-
-
-DUPLICATE SUBPATTERN NUMBERS
-
- Perl 5.10 introduced a feature whereby each alternative in a subpattern
- uses the same numbers for its capturing parentheses. Such a subpattern
- starts with (?| and is itself a non-capturing subpattern. For example,
- consider this pattern:
-
- (?|(Sat)ur|(Sun))day
-
- Because the two alternatives are inside a (?| group, both sets of cap-
- turing parentheses are numbered one. Thus, when the pattern matches,
- you can look at captured substring number one, whichever alternative
- matched. This construct is useful when you want to capture part, but
- not all, of one of a number of alternatives. Inside a (?| group, paren-
- theses are numbered as usual, but the number is reset at the start of
- each branch. The numbers of any capturing parentheses that follow the
- subpattern start after the highest number used in any branch. The fol-
- lowing example is taken from the Perl documentation. The numbers under-
- neath show in which buffer the captured content will be stored.
-
- # before ---------------branch-reset----------- after
- / ( a ) (?| x ( y ) z | (p (q) r) | (t) u (v) ) ( z ) /x
- # 1 2 2 3 2 3 4
-
- A back reference to a numbered subpattern uses the most recent value
- that is set for that number by any subpattern. The following pattern
- matches "abcabc" or "defdef":
-
- /(?|(abc)|(def))\1/
-
- In contrast, a subroutine call to a numbered subpattern always refers
- to the first one in the pattern with the given number. The following
- pattern matches "abcabc" or "defabc":
-
- /(?|(abc)|(def))(?1)/
-
- If a condition test for a subpattern's having matched refers to a non-
- unique number, the test is true if any of the subpatterns of that num-
- ber have matched.
-
- An alternative approach to using this "branch reset" feature is to use
- duplicate named subpatterns, as described in the next section.
-
-
-NAMED SUBPATTERNS
-
- Identifying capturing parentheses by number is simple, but it can be
- very hard to keep track of the numbers in complicated regular expres-
- sions. Furthermore, if an expression is modified, the numbers may
- change. To help with this difficulty, PCRE supports the naming of sub-
- patterns. This feature was not added to Perl until release 5.10. Python
- had the feature earlier, and PCRE introduced it at release 4.0, using
- the Python syntax. PCRE now supports both the Perl and the Python syn-
- tax. Perl allows identically numbered subpatterns to have different
- names, but PCRE does not.
-
- In PCRE, a subpattern can be named in one of three ways: (?<name>...)
- or (?'name'...) as in Perl, or (?P<name>...) as in Python. References
- to capturing parentheses from other parts of the pattern, such as back
- references, recursion, and conditions, can be made by name as well as
- by number.
-
- Names consist of up to 32 alphanumeric characters and underscores, but
- must start with a non-digit. Named capturing parentheses are still
- allocated numbers as well as names, exactly as if the names were not
- present. The PCRE API provides function calls for extracting the name-
- to-number translation table from a compiled pattern. There is also a
- convenience function for extracting a captured substring by name.
-
- By default, a name must be unique within a pattern, but it is possible
- to relax this constraint by setting the PCRE_DUPNAMES option at compile
- time. (Duplicate names are also always permitted for subpatterns with
- the same number, set up as described in the previous section.) Dupli-
- cate names can be useful for patterns where only one instance of the
- named parentheses can match. Suppose you want to match the name of a
- weekday, either as a 3-letter abbreviation or as the full name, and in
- both cases you want to extract the abbreviation. This pattern (ignoring
- the line breaks) does the job:
-
- (?<DN>Mon|Fri|Sun)(?:day)?|
- (?<DN>Tue)(?:sday)?|
- (?<DN>Wed)(?:nesday)?|
- (?<DN>Thu)(?:rsday)?|
- (?<DN>Sat)(?:urday)?
-
- There are five capturing substrings, but only one is ever set after a
- match. (An alternative way of solving this problem is to use a "branch
- reset" subpattern, as described in the previous section.)
-
- The convenience function for extracting the data by name returns the
- substring for the first (and in this example, the only) subpattern of
- that name that matched. This saves searching to find which numbered
- subpattern it was.
-
- If you make a back reference to a non-unique named subpattern from
- elsewhere in the pattern, the subpatterns to which the name refers are
- checked in the order in which they appear in the overall pattern. The
- first one that is set is used for the reference. For example, this pat-
- tern matches both "foofoo" and "barbar" but not "foobar" or "barfoo":
-
- (?:(?<n>foo)|(?<n>bar))\k<n>
-
-
- If you make a subroutine call to a non-unique named subpattern, the one
- that corresponds to the first occurrence of the name is used. In the
- absence of duplicate numbers (see the previous section) this is the one
- with the lowest number.
-
- If you use a named reference in a condition test (see the section about
- conditions below), either to check whether a subpattern has matched, or
- to check for recursion, all subpatterns with the same name are tested.
- If the condition is true for any one of them, the overall condition is
- true. This is the same behaviour as testing by number. For further
- details of the interfaces for handling named subpatterns, see the
- pcreapi documentation.
-
- Warning: You cannot use different names to distinguish between two sub-
- patterns with the same number because PCRE uses only the numbers when
- matching. For this reason, an error is given at compile time if differ-
- ent names are given to subpatterns with the same number. However, you
- can always give the same name to subpatterns with the same number, even
- when PCRE_DUPNAMES is not set.
-
-
-REPETITION
-
- Repetition is specified by quantifiers, which can follow any of the
- following items:
-
- a literal data character
- the dot metacharacter
- the \C escape sequence
- the \X escape sequence
- the \R escape sequence
- an escape such as \d or \pL that matches a single character
- a character class
- a back reference (see next section)
- a parenthesized subpattern (including assertions)
- a subroutine call to a subpattern (recursive or otherwise)
-
- The general repetition quantifier specifies a minimum and maximum num-
- ber of permitted matches, by giving the two numbers in curly brackets
- (braces), separated by a comma. The numbers must be less than 65536,
- and the first must be less than or equal to the second. For example:
-
- z{2,4}
-
- matches "zz", "zzz", or "zzzz". A closing brace on its own is not a
- special character. If the second number is omitted, but the comma is
- present, there is no upper limit; if the second number and the comma
- are both omitted, the quantifier specifies an exact number of required
- matches. Thus
-
- [aeiou]{3,}
-
- matches at least 3 successive vowels, but may match many more, while
-
- \d{8}
-
- matches exactly 8 digits. An opening curly bracket that appears in a
- position where a quantifier is not allowed, or one that does not match
- the syntax of a quantifier, is taken as a literal character. For exam-
- ple, {,6} is not a quantifier, but a literal string of four characters.
-
- In UTF modes, quantifiers apply to characters rather than to individual
- data units. Thus, for example, \x{100}{2} matches two characters, each
- of which is represented by a two-byte sequence in a UTF-8 string. Simi-
- larly, \X{3} matches three Unicode extended grapheme clusters, each of
- which may be several data units long (and they may be of different
- lengths).
-
- The quantifier {0} is permitted, causing the expression to behave as if
- the previous item and the quantifier were not present. This may be use-
- ful for subpatterns that are referenced as subroutines from elsewhere
- in the pattern (but see also the section entitled "Defining subpatterns
- for use by reference only" below). Items other than subpatterns that
- have a {0} quantifier are omitted from the compiled pattern.
-
- For convenience, the three most common quantifiers have single-charac-
- ter abbreviations:
-
- * is equivalent to {0,}
- + is equivalent to {1,}
- ? is equivalent to {0,1}
-
- It is possible to construct infinite loops by following a subpattern
- that can match no characters with a quantifier that has no upper limit,
- for example:
-
- (a?)*
-
- Earlier versions of Perl and PCRE used to give an error at compile time
- for such patterns. However, because there are cases where this can be
- useful, such patterns are now accepted, but if any repetition of the
- subpattern does in fact match no characters, the loop is forcibly bro-
- ken.
-
- By default, the quantifiers are "greedy", that is, they match as much
- as possible (up to the maximum number of permitted times), without
- causing the rest of the pattern to fail. The classic example of where
- this gives problems is in trying to match comments in C programs. These
- appear between /* and */ and within the comment, individual * and /
- characters may appear. An attempt to match C comments by applying the
- pattern
-
- /\*.*\*/
-
- to the string
-
- /* first comment */ not comment /* second comment */
-
- fails, because it matches the entire string owing to the greediness of
- the .* item.
-
- However, if a quantifier is followed by a question mark, it ceases to
- be greedy, and instead matches the minimum number of times possible, so
- the pattern
-
- /\*.*?\*/
-
- does the right thing with the C comments. The meaning of the various
- quantifiers is not otherwise changed, just the preferred number of
- matches. Do not confuse this use of question mark with its use as a
- quantifier in its own right. Because it has two uses, it can sometimes
- appear doubled, as in
-
- \d??\d
-
- which matches one digit by preference, but can match two if that is the
- only way the rest of the pattern matches.
-
- If the PCRE_UNGREEDY option is set (an option that is not available in
- Perl), the quantifiers are not greedy by default, but individual ones
- can be made greedy by following them with a question mark. In other
- words, it inverts the default behaviour.
-
- When a parenthesized subpattern is quantified with a minimum repeat
- count that is greater than 1 or with a limited maximum, more memory is
- required for the compiled pattern, in proportion to the size of the
- minimum or maximum.
-
- If a pattern starts with .* or .{0,} and the PCRE_DOTALL option (equiv-
- alent to Perl's /s) is set, thus allowing the dot to match newlines,
- the pattern is implicitly anchored, because whatever follows will be
- tried against every character position in the subject string, so there
- is no point in retrying the overall match at any position after the
- first. PCRE normally treats such a pattern as though it were preceded
- by \A.
-
- In cases where it is known that the subject string contains no new-
- lines, it is worth setting PCRE_DOTALL in order to obtain this opti-
- mization, or alternatively using ^ to indicate anchoring explicitly.
-
- However, there are some cases where the optimization cannot be used.
- When .* is inside capturing parentheses that are the subject of a back
- reference elsewhere in the pattern, a match at the start may fail where
- a later one succeeds. Consider, for example:
-
- (.*)abc\1
-
- If the subject is "xyz123abc123" the match point is the fourth charac-
- ter. For this reason, such a pattern is not implicitly anchored.
-
- Another case where implicit anchoring is not applied is when the lead-
- ing .* is inside an atomic group. Once again, a match at the start may
- fail where a later one succeeds. Consider this pattern:
-
- (?>.*?a)b
-
- It matches "ab" in the subject "aab". The use of the backtracking con-
- trol verbs (*PRUNE) and (*SKIP) also disable this optimization.
-
- When a capturing subpattern is repeated, the value captured is the sub-
- string that matched the final iteration. For example, after
-
- (tweedle[dume]{3}\s*)+
-
- has matched "tweedledum tweedledee" the value of the captured substring
- is "tweedledee". However, if there are nested capturing subpatterns,
- the corresponding captured values may have been set in previous itera-
- tions. For example, after
-
- /(a|(b))+/
-
- matches "aba" the value of the second captured substring is "b".
-
-
-ATOMIC GROUPING AND POSSESSIVE QUANTIFIERS
-
- With both maximizing ("greedy") and minimizing ("ungreedy" or "lazy")
- repetition, failure of what follows normally causes the repeated item
- to be re-evaluated to see if a different number of repeats allows the
- rest of the pattern to match. Sometimes it is useful to prevent this,
- either to change the nature of the match, or to cause it fail earlier
- than it otherwise might, when the author of the pattern knows there is
- no point in carrying on.
-
- Consider, for example, the pattern \d+foo when applied to the subject
- line
-
- 123456bar
-
- After matching all 6 digits and then failing to match "foo", the normal
- action of the matcher is to try again with only 5 digits matching the
- \d+ item, and then with 4, and so on, before ultimately failing.
- "Atomic grouping" (a term taken from Jeffrey Friedl's book) provides
- the means for specifying that once a subpattern has matched, it is not
- to be re-evaluated in this way.
-
- If we use atomic grouping for the previous example, the matcher gives
- up immediately on failing to match "foo" the first time. The notation
- is a kind of special parenthesis, starting with (?> as in this example:
-
- (?>\d+)foo
-
- This kind of parenthesis "locks up" the part of the pattern it con-
- tains once it has matched, and a failure further into the pattern is
- prevented from backtracking into it. Backtracking past it to previous
- items, however, works as normal.
-
- An alternative description is that a subpattern of this type matches
- the string of characters that an identical standalone pattern would
- match, if anchored at the current point in the subject string.
-
- Atomic grouping subpatterns are not capturing subpatterns. Simple cases
- such as the above example can be thought of as a maximizing repeat that
- must swallow everything it can. So, while both \d+ and \d+? are pre-
- pared to adjust the number of digits they match in order to make the
- rest of the pattern match, (?>\d+) can only match an entire sequence of
- digits.
-
- Atomic groups in general can of course contain arbitrarily complicated
- subpatterns, and can be nested. However, when the subpattern for an
- atomic group is just a single repeated item, as in the example above, a
- simpler notation, called a "possessive quantifier" can be used. This
- consists of an additional + character following a quantifier. Using
- this notation, the previous example can be rewritten as
-
- \d++foo
-
- Note that a possessive quantifier can be used with an entire group, for
- example:
-
- (abc|xyz){2,3}+
-
- Possessive quantifiers are always greedy; the setting of the
- PCRE_UNGREEDY option is ignored. They are a convenient notation for the
- simpler forms of atomic group. However, there is no difference in the
- meaning of a possessive quantifier and the equivalent atomic group,
- though there may be a performance difference; possessive quantifiers
- should be slightly faster.
-
- The possessive quantifier syntax is an extension to the Perl 5.8 syn-
- tax. Jeffrey Friedl originated the idea (and the name) in the first
- edition of his book. Mike McCloskey liked it, so implemented it when he
- built Sun's Java package, and PCRE copied it from there. It ultimately
- found its way into Perl at release 5.10.
-
- PCRE has an optimization that automatically "possessifies" certain sim-
- ple pattern constructs. For example, the sequence A+B is treated as
- A++B because there is no point in backtracking into a sequence of A's
- when B must follow.
-
- When a pattern contains an unlimited repeat inside a subpattern that
- can itself be repeated an unlimited number of times, the use of an
- atomic group is the only way to avoid some failing matches taking a
- very long time indeed. The pattern
-
- (\D+|<\d+>)*[!?]
-
- matches an unlimited number of substrings that either consist of non-
- digits, or digits enclosed in <>, followed by either ! or ?. When it
- matches, it runs quickly. However, if it is applied to
-
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
- it takes a long time before reporting failure. This is because the
- string can be divided between the internal \D+ repeat and the external
- * repeat in a large number of ways, and all have to be tried. (The
- example uses [!?] rather than a single character at the end, because
- both PCRE and Perl have an optimization that allows for fast failure
- when a single character is used. They remember the last single charac-
- ter that is required for a match, and fail early if it is not present
- in the string.) If the pattern is changed so that it uses an atomic
- group, like this:
-
- ((?>\D+)|<\d+>)*[!?]
-
- sequences of non-digits cannot be broken, and failure happens quickly.
-
-
-BACK REFERENCES
-
- Outside a character class, a backslash followed by a digit greater than
- 0 (and possibly further digits) is a back reference to a capturing sub-
- pattern earlier (that is, to its left) in the pattern, provided there
- have been that many previous capturing left parentheses.
-
- However, if the decimal number following the backslash is less than 10,
- it is always taken as a back reference, and causes an error only if
- there are not that many capturing left parentheses in the entire pat-
- tern. In other words, the parentheses that are referenced need not be
- to the left of the reference for numbers less than 10. A "forward back
- reference" of this type can make sense when a repetition is involved
- and the subpattern to the right has participated in an earlier itera-
- tion.
-
- It is not possible to have a numerical "forward back reference" to a
- subpattern whose number is 10 or more using this syntax because a
- sequence such as \50 is interpreted as a character defined in octal.
- See the subsection entitled "Non-printing characters" above for further
- details of the handling of digits following a backslash. There is no
- such problem when named parentheses are used. A back reference to any
- subpattern is possible using named parentheses (see below).
-
- Another way of avoiding the ambiguity inherent in the use of digits
- following a backslash is to use the \g escape sequence. This escape
- must be followed by an unsigned number or a negative number, optionally
- enclosed in braces. These examples are all identical:
-
- (ring), \1
- (ring), \g1
- (ring), \g{1}
-
- An unsigned number specifies an absolute reference without the ambigu-
- ity that is present in the older syntax. It is also useful when literal
- digits follow the reference. A negative number is a relative reference.
- Consider this example:
-
- (abc(def)ghi)\g{-1}
-
- The sequence \g{-1} is a reference to the most recently started captur-
- ing subpattern before \g, that is, is it equivalent to \2 in this exam-
- ple. Similarly, \g{-2} would be equivalent to \1. The use of relative
- references can be helpful in long patterns, and also in patterns that
- are created by joining together fragments that contain references
- within themselves.
-
- A back reference matches whatever actually matched the capturing sub-
- pattern in the current subject string, rather than anything matching
- the subpattern itself (see "Subpatterns as subroutines" below for a way
- of doing that). So the pattern
-
- (sens|respons)e and \1ibility
-
- matches "sense and sensibility" and "response and responsibility", but
- not "sense and responsibility". If caseful matching is in force at the
- time of the back reference, the case of letters is relevant. For exam-
- ple,
-
- ((?i)rah)\s+\1
-
- matches "rah rah" and "RAH RAH", but not "RAH rah", even though the
- original capturing subpattern is matched caselessly.
-
- There are several different ways of writing back references to named
- subpatterns. The .NET syntax \k{name} and the Perl syntax \k<name> or
- \k'name' are supported, as is the Python syntax (?P=name). Perl 5.10's
- unified back reference syntax, in which \g can be used for both numeric
- and named references, is also supported. We could rewrite the above
- example in any of the following ways:
-
- (?<p1>(?i)rah)\s+\k<p1>
- (?'p1'(?i)rah)\s+\k{p1}
- (?P<p1>(?i)rah)\s+(?P=p1)
- (?<p1>(?i)rah)\s+\g{p1}
-
- A subpattern that is referenced by name may appear in the pattern
- before or after the reference.
-
- There may be more than one back reference to the same subpattern. If a
- subpattern has not actually been used in a particular match, any back
- references to it always fail by default. For example, the pattern
-
- (a|(bc))\2
-
- always fails if it starts to match "a" rather than "bc". However, if
- the PCRE_JAVASCRIPT_COMPAT option is set at compile time, a back refer-
- ence to an unset value matches an empty string.
-
- Because there may be many capturing parentheses in a pattern, all dig-
- its following a backslash are taken as part of a potential back refer-
- ence number. If the pattern continues with a digit character, some
- delimiter must be used to terminate the back reference. If the
- PCRE_EXTENDED option is set, this can be white space. Otherwise, the
- \g{ syntax or an empty comment (see "Comments" below) can be used.
-
- Recursive back references
-
- A back reference that occurs inside the parentheses to which it refers
- fails when the subpattern is first used, so, for example, (a\1) never
- matches. However, such references can be useful inside repeated sub-
- patterns. For example, the pattern
-
- (a|b\1)+
-
- matches any number of "a"s and also "aba", "ababbaa" etc. At each iter-
- ation of the subpattern, the back reference matches the character
- string corresponding to the previous iteration. In order for this to
- work, the pattern must be such that the first iteration does not need
- to match the back reference. This can be done using alternation, as in
- the example above, or by a quantifier with a minimum of zero.
-
- Back references of this type cause the group that they reference to be
- treated as an atomic group. Once the whole group has been matched, a
- subsequent matching failure cannot cause backtracking into the middle
- of the group.
-
-
-ASSERTIONS
-
- An assertion is a test on the characters following or preceding the
- current matching point that does not actually consume any characters.
- The simple assertions coded as \b, \B, \A, \G, \Z, \z, ^ and $ are
- described above.
-
- More complicated assertions are coded as subpatterns. There are two
- kinds: those that look ahead of the current position in the subject
- string, and those that look behind it. An assertion subpattern is
- matched in the normal way, except that it does not cause the current
- matching position to be changed.
-
- Assertion subpatterns are not capturing subpatterns. If such an asser-
- tion contains capturing subpatterns within it, these are counted for
- the purposes of numbering the capturing subpatterns in the whole pat-
- tern. However, substring capturing is carried out only for positive
- assertions. (Perl sometimes, but not always, does do capturing in nega-
- tive assertions.)
-
- WARNING: If a positive assertion containing one or more capturing sub-
- patterns succeeds, but failure to match later in the pattern causes
- backtracking over this assertion, the captures within the assertion are
- reset only if no higher numbered captures are already set. This is,
- unfortunately, a fundamental limitation of the current implementation,
- and as PCRE1 is now in maintenance-only status, it is unlikely ever to
- change.
-
- For compatibility with Perl, assertion subpatterns may be repeated;
- though it makes no sense to assert the same thing several times, the
- side effect of capturing parentheses may occasionally be useful. In
- practice, there only three cases:
-
- (1) If the quantifier is {0}, the assertion is never obeyed during
- matching. However, it may contain internal capturing parenthesized
- groups that are called from elsewhere via the subroutine mechanism.
-
- (2) If quantifier is {0,n} where n is greater than zero, it is treated
- as if it were {0,1}. At run time, the rest of the pattern match is
- tried with and without the assertion, the order depending on the greed-
- iness of the quantifier.
-
- (3) If the minimum repetition is greater than zero, the quantifier is
- ignored. The assertion is obeyed just once when encountered during
- matching.
-
- Lookahead assertions
-
- Lookahead assertions start with (?= for positive assertions and (?! for
- negative assertions. For example,
-
- \w+(?=;)
-
- matches a word followed by a semicolon, but does not include the semi-
- colon in the match, and
-
- foo(?!bar)
-
- matches any occurrence of "foo" that is not followed by "bar". Note
- that the apparently similar pattern
-
- (?!foo)bar
-
- does not find an occurrence of "bar" that is preceded by something
- other than "foo"; it finds any occurrence of "bar" whatsoever, because
- the assertion (?!foo) is always true when the next three characters are
- "bar". A lookbehind assertion is needed to achieve the other effect.
-
- If you want to force a matching failure at some point in a pattern, the
- most convenient way to do it is with (?!) because an empty string
- always matches, so an assertion that requires there not to be an empty
- string must always fail. The backtracking control verb (*FAIL) or (*F)
- is a synonym for (?!).
-
- Lookbehind assertions
-
- Lookbehind assertions start with (?<= for positive assertions and (?<!
- for negative assertions. For example,
-
- (?<!foo)bar
-
- does find an occurrence of "bar" that is not preceded by "foo". The
- contents of a lookbehind assertion are restricted such that all the
- strings it matches must have a fixed length. However, if there are sev-
- eral top-level alternatives, they do not all have to have the same
- fixed length. Thus
-
- (?<=bullock|donkey)
-
- is permitted, but
-
- (?<!dogs?|cats?)
-
- causes an error at compile time. Branches that match different length
- strings are permitted only at the top level of a lookbehind assertion.
- This is an extension compared with Perl, which requires all branches to
- match the same length of string. An assertion such as
-
- (?<=ab(c|de))
-
- is not permitted, because its single top-level branch can match two
- different lengths, but it is acceptable to PCRE if rewritten to use two
- top-level branches:
-
- (?<=abc|abde)
-
- In some cases, the escape sequence \K (see above) can be used instead
- of a lookbehind assertion to get round the fixed-length restriction.
-
- The implementation of lookbehind assertions is, for each alternative,
- to temporarily move the current position back by the fixed length and
- then try to match. If there are insufficient characters before the cur-
- rent position, the assertion fails.
-
- In a UTF mode, PCRE does not allow the \C escape (which matches a sin-
- gle data unit even in a UTF mode) to appear in lookbehind assertions,
- because it makes it impossible to calculate the length of the lookbe-
- hind. The \X and \R escapes, which can match different numbers of data
- units, are also not permitted.
-
- "Subroutine" calls (see below) such as (?2) or (?&X) are permitted in
- lookbehinds, as long as the subpattern matches a fixed-length string.
- Recursion, however, is not supported.
-
- Possessive quantifiers can be used in conjunction with lookbehind
- assertions to specify efficient matching of fixed-length strings at the
- end of subject strings. Consider a simple pattern such as
-
- abcd$
-
- when applied to a long string that does not match. Because matching
- proceeds from left to right, PCRE will look for each "a" in the subject
- and then see if what follows matches the rest of the pattern. If the
- pattern is specified as
-
- ^.*abcd$
-
- the initial .* matches the entire string at first, but when this fails
- (because there is no following "a"), it backtracks to match all but the
- last character, then all but the last two characters, and so on. Once
- again the search for "a" covers the entire string, from right to left,
- so we are no better off. However, if the pattern is written as
-
- ^.*+(?<=abcd)
-
- there can be no backtracking for the .*+ item; it can match only the
- entire string. The subsequent lookbehind assertion does a single test
- on the last four characters. If it fails, the match fails immediately.
- For long strings, this approach makes a significant difference to the
- processing time.
-
- Using multiple assertions
-
- Several assertions (of any sort) may occur in succession. For example,
-
- (?<=\d{3})(?<!999)foo
-
- matches "foo" preceded by three digits that are not "999". Notice that
- each of the assertions is applied independently at the same point in
- the subject string. First there is a check that the previous three
- characters are all digits, and then there is a check that the same
- three characters are not "999". This pattern does not match "foo" pre-
- ceded by six characters, the first of which are digits and the last
- three of which are not "999". For example, it doesn't match "123abc-
- foo". A pattern to do that is
-
- (?<=\d{3}...)(?<!999)foo
-
- This time the first assertion looks at the preceding six characters,
- checking that the first three are digits, and then the second assertion
- checks that the preceding three characters are not "999".
-
- Assertions can be nested in any combination. For example,
-
- (?<=(?<!foo)bar)baz
-
- matches an occurrence of "baz" that is preceded by "bar" which in turn
- is not preceded by "foo", while
-
- (?<=\d{3}(?!999)...)foo
-
- is another pattern that matches "foo" preceded by three digits and any
- three characters that are not "999".
-
-
-CONDITIONAL SUBPATTERNS
-
- It is possible to cause the matching process to obey a subpattern con-
- ditionally or to choose between two alternative subpatterns, depending
- on the result of an assertion, or whether a specific capturing subpat-
- tern has already been matched. The two possible forms of conditional
- subpattern are:
-
- (?(condition)yes-pattern)
- (?(condition)yes-pattern|no-pattern)
-
- If the condition is satisfied, the yes-pattern is used; otherwise the
- no-pattern (if present) is used. If there are more than two alterna-
- tives in the subpattern, a compile-time error occurs. Each of the two
- alternatives may itself contain nested subpatterns of any form, includ-
- ing conditional subpatterns; the restriction to two alternatives
- applies only at the level of the condition. This pattern fragment is an
- example where the alternatives are complex:
-
- (?(1) (A|B|C) | (D | (?(2)E|F) | E) )
-
-
- There are four kinds of condition: references to subpatterns, refer-
- ences to recursion, a pseudo-condition called DEFINE, and assertions.
-
- Checking for a used subpattern by number
-
- If the text between the parentheses consists of a sequence of digits,
- the condition is true if a capturing subpattern of that number has pre-
- viously matched. If there is more than one capturing subpattern with
- the same number (see the earlier section about duplicate subpattern
- numbers), the condition is true if any of them have matched. An alter-
- native notation is to precede the digits with a plus or minus sign. In
- this case, the subpattern number is relative rather than absolute. The
- most recently opened parentheses can be referenced by (?(-1), the next
- most recent by (?(-2), and so on. Inside loops it can also make sense
- to refer to subsequent groups. The next parentheses to be opened can be
- referenced as (?(+1), and so on. (The value zero in any of these forms
- is not used; it provokes a compile-time error.)
-
- Consider the following pattern, which contains non-significant white
- space to make it more readable (assume the PCRE_EXTENDED option) and to
- divide it into three parts for ease of discussion:
-
- ( \( )? [^()]+ (?(1) \) )
-
- The first part matches an optional opening parenthesis, and if that
- character is present, sets it as the first captured substring. The sec-
- ond part matches one or more characters that are not parentheses. The
- third part is a conditional subpattern that tests whether or not the
- first set of parentheses matched. If they did, that is, if subject
- started with an opening parenthesis, the condition is true, and so the
- yes-pattern is executed and a closing parenthesis is required. Other-
- wise, since no-pattern is not present, the subpattern matches nothing.
- In other words, this pattern matches a sequence of non-parentheses,
- optionally enclosed in parentheses.
-
- If you were embedding this pattern in a larger one, you could use a
- relative reference:
-
- ...other stuff... ( \( )? [^()]+ (?(-1) \) ) ...
-
- This makes the fragment independent of the parentheses in the larger
- pattern.
-
- Checking for a used subpattern by name
-
- Perl uses the syntax (?(<name>)...) or (?('name')...) to test for a
- used subpattern by name. For compatibility with earlier versions of
- PCRE, which had this facility before Perl, the syntax (?(name)...) is
- also recognized.
-
- Rewriting the above example to use a named subpattern gives this:
-
- (?<OPEN> \( )? [^()]+ (?(<OPEN>) \) )
-
- If the name used in a condition of this kind is a duplicate, the test
- is applied to all subpatterns of the same name, and is true if any one
- of them has matched.
-
- Checking for pattern recursion
-
- If the condition is the string (R), and there is no subpattern with the
- name R, the condition is true if a recursive call to the whole pattern
- or any subpattern has been made. If digits or a name preceded by amper-
- sand follow the letter R, for example:
-
- (?(R3)...) or (?(R&name)...)
-
- the condition is true if the most recent recursion is into a subpattern
- whose number or name is given. This condition does not check the entire
- recursion stack. If the name used in a condition of this kind is a
- duplicate, the test is applied to all subpatterns of the same name, and
- is true if any one of them is the most recent recursion.
-
- At "top level", all these recursion test conditions are false. The
- syntax for recursive patterns is described below.
-
- Defining subpatterns for use by reference only
-
- If the condition is the string (DEFINE), and there is no subpattern
- with the name DEFINE, the condition is always false. In this case,
- there may be only one alternative in the subpattern. It is always
- skipped if control reaches this point in the pattern; the idea of
- DEFINE is that it can be used to define subroutines that can be refer-
- enced from elsewhere. (The use of subroutines is described below.) For
- example, a pattern to match an IPv4 address such as "192.168.23.245"
- could be written like this (ignore white space and line breaks):
-
- (?(DEFINE) (?<byte> 2[0-4]\d | 25[0-5] | 1\d\d | [1-9]?\d) )
- \b (?&byte) (\.(?&byte)){3} \b
-
- The first part of the pattern is a DEFINE group inside which a another
- group named "byte" is defined. This matches an individual component of
- an IPv4 address (a number less than 256). When matching takes place,
- this part of the pattern is skipped because DEFINE acts like a false
- condition. The rest of the pattern uses references to the named group
- to match the four dot-separated components of an IPv4 address, insist-
- ing on a word boundary at each end.
-
- Assertion conditions
-
- If the condition is not in any of the above formats, it must be an
- assertion. This may be a positive or negative lookahead or lookbehind
- assertion. Consider this pattern, again containing non-significant
- white space, and with the two alternatives on the second line:
-
- (?(?=[^a-z]*[a-z])
- \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} )
-
- The condition is a positive lookahead assertion that matches an
- optional sequence of non-letters followed by a letter. In other words,
- it tests for the presence of at least one letter in the subject. If a
- letter is found, the subject is matched against the first alternative;
- otherwise it is matched against the second. This pattern matches
- strings in one of the two forms dd-aaa-dd or dd-dd-dd, where aaa are
- letters and dd are digits.
-
-
-COMMENTS
-
- There are two ways of including comments in patterns that are processed
- by PCRE. In both cases, the start of the comment must not be in a char-
- acter class, nor in the middle of any other sequence of related charac-
- ters such as (?: or a subpattern name or number. The characters that
- make up a comment play no part in the pattern matching.
-
- The sequence (?# marks the start of a comment that continues up to the
- next closing parenthesis. Nested parentheses are not permitted. If the
- PCRE_EXTENDED option is set, an unescaped # character also introduces a
- comment, which in this case continues to immediately after the next
- newline character or character sequence in the pattern. Which charac-
- ters are interpreted as newlines is controlled by the options passed to
- a compiling function or by a special sequence at the start of the pat-
- tern, as described in the section entitled "Newline conventions" above.
- Note that the end of this type of comment is a literal newline sequence
- in the pattern; escape sequences that happen to represent a newline do
- not count. For example, consider this pattern when PCRE_EXTENDED is
- set, and the default newline convention is in force:
-
- abc #comment \n still comment
-
- On encountering the # character, pcre_compile() skips along, looking
- for a newline in the pattern. The sequence \n is still literal at this
- stage, so it does not terminate the comment. Only an actual character
- with the code value 0x0a (the default newline) does so.
-
-
-RECURSIVE PATTERNS
-
- Consider the problem of matching a string in parentheses, allowing for
- unlimited nested parentheses. Without the use of recursion, the best
- that can be done is to use a pattern that matches up to some fixed
- depth of nesting. It is not possible to handle an arbitrary nesting
- depth.
-
- For some time, Perl has provided a facility that allows regular expres-
- sions to recurse (amongst other things). It does this by interpolating
- Perl code in the expression at run time, and the code can refer to the
- expression itself. A Perl pattern using code interpolation to solve the
- parentheses problem can be created like this:
-
- $re = qr{\( (?: (?>[^()]+) | (?p{$re}) )* \)}x;
-
- The (?p{...}) item interpolates Perl code at run time, and in this case
- refers recursively to the pattern in which it appears.
-
- Obviously, PCRE cannot support the interpolation of Perl code. Instead,
- it supports special syntax for recursion of the entire pattern, and
- also for individual subpattern recursion. After its introduction in
- PCRE and Python, this kind of recursion was subsequently introduced
- into Perl at release 5.10.
-
- A special item that consists of (? followed by a number greater than
- zero and a closing parenthesis is a recursive subroutine call of the
- subpattern of the given number, provided that it occurs inside that
- subpattern. (If not, it is a non-recursive subroutine call, which is
- described in the next section.) The special item (?R) or (?0) is a
- recursive call of the entire regular expression.
-
- This PCRE pattern solves the nested parentheses problem (assume the
- PCRE_EXTENDED option is set so that white space is ignored):
-
- \( ( [^()]++ | (?R) )* \)
-
- First it matches an opening parenthesis. Then it matches any number of
- substrings which can either be a sequence of non-parentheses, or a
- recursive match of the pattern itself (that is, a correctly parenthe-
- sized substring). Finally there is a closing parenthesis. Note the use
- of a possessive quantifier to avoid backtracking into sequences of non-
- parentheses.
-
- If this were part of a larger pattern, you would not want to recurse
- the entire pattern, so instead you could use this:
-
- ( \( ( [^()]++ | (?1) )* \) )
-
- We have put the pattern into parentheses, and caused the recursion to
- refer to them instead of the whole pattern.
-
- In a larger pattern, keeping track of parenthesis numbers can be
- tricky. This is made easier by the use of relative references. Instead
- of (?1) in the pattern above you can write (?-2) to refer to the second
- most recently opened parentheses preceding the recursion. In other
- words, a negative number counts capturing parentheses leftwards from
- the point at which it is encountered.
-
- It is also possible to refer to subsequently opened parentheses, by
- writing references such as (?+2). However, these cannot be recursive
- because the reference is not inside the parentheses that are refer-
- enced. They are always non-recursive subroutine calls, as described in
- the next section.
-
- An alternative approach is to use named parentheses instead. The Perl
- syntax for this is (?&name); PCRE's earlier syntax (?P>name) is also
- supported. We could rewrite the above example as follows:
-
- (?<pn> \( ( [^()]++ | (?&pn) )* \) )
-
- If there is more than one subpattern with the same name, the earliest
- one is used.
-
- This particular example pattern that we have been looking at contains
- nested unlimited repeats, and so the use of a possessive quantifier for
- matching strings of non-parentheses is important when applying the pat-
- tern to strings that do not match. For example, when this pattern is
- applied to
-
- (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()
-
- it yields "no match" quickly. However, if a possessive quantifier is
- not used, the match runs for a very long time indeed because there are
- so many different ways the + and * repeats can carve up the subject,
- and all have to be tested before failure can be reported.
-
- At the end of a match, the values of capturing parentheses are those
- from the outermost level. If you want to obtain intermediate values, a
- callout function can be used (see below and the pcrecallout documenta-
- tion). If the pattern above is matched against
-
- (ab(cd)ef)
-
- the value for the inner capturing parentheses (numbered 2) is "ef",
- which is the last value taken on at the top level. If a capturing sub-
- pattern is not matched at the top level, its final captured value is
- unset, even if it was (temporarily) set at a deeper level during the
- matching process.
-
- If there are more than 15 capturing parentheses in a pattern, PCRE has
- to obtain extra memory to store data during a recursion, which it does
- by using pcre_malloc, freeing it via pcre_free afterwards. If no memory
- can be obtained, the match fails with the PCRE_ERROR_NOMEMORY error.
-
- Do not confuse the (?R) item with the condition (R), which tests for
- recursion. Consider this pattern, which matches text in angle brack-
- ets, allowing for arbitrary nesting. Only digits are allowed in nested
- brackets (that is, when recursing), whereas any characters are permit-
- ted at the outer level.
-
- < (?: (?(R) \d++ | [^<>]*+) | (?R)) * >
-
- In this pattern, (?(R) is the start of a conditional subpattern, with
- two different alternatives for the recursive and non-recursive cases.
- The (?R) item is the actual recursive call.
-
- Differences in recursion processing between PCRE and Perl
-
- Recursion processing in PCRE differs from Perl in two important ways.
- In PCRE (like Python, but unlike Perl), a recursive subpattern call is
- always treated as an atomic group. That is, once it has matched some of
- the subject string, it is never re-entered, even if it contains untried
- alternatives and there is a subsequent matching failure. This can be
- illustrated by the following pattern, which purports to match a palin-
- dromic string that contains an odd number of characters (for example,
- "a", "aba", "abcba", "abcdcba"):
-
- ^(.|(.)(?1)\2)$
-
- The idea is that it either matches a single character, or two identical
- characters surrounding a sub-palindrome. In Perl, this pattern works;
- in PCRE it does not if the pattern is longer than three characters.
- Consider the subject string "abcba":
-
- At the top level, the first character is matched, but as it is not at
- the end of the string, the first alternative fails; the second alterna-
- tive is taken and the recursion kicks in. The recursive call to subpat-
- tern 1 successfully matches the next character ("b"). (Note that the
- beginning and end of line tests are not part of the recursion).
-
- Back at the top level, the next character ("c") is compared with what
- subpattern 2 matched, which was "a". This fails. Because the recursion
- is treated as an atomic group, there are now no backtracking points,
- and so the entire match fails. (Perl is able, at this point, to re-
- enter the recursion and try the second alternative.) However, if the
- pattern is written with the alternatives in the other order, things are
- different:
-
- ^((.)(?1)\2|.)$
-
- This time, the recursing alternative is tried first, and continues to
- recurse until it runs out of characters, at which point the recursion
- fails. But this time we do have another alternative to try at the
- higher level. That is the big difference: in the previous case the
- remaining alternative is at a deeper recursion level, which PCRE cannot
- use.
-
- To change the pattern so that it matches all palindromic strings, not
- just those with an odd number of characters, it is tempting to change
- the pattern to this:
-
- ^((.)(?1)\2|.?)$
-
- Again, this works in Perl, but not in PCRE, and for the same reason.
- When a deeper recursion has matched a single character, it cannot be
- entered again in order to match an empty string. The solution is to
- separate the two cases, and write out the odd and even cases as alter-
- natives at the higher level:
-
- ^(?:((.)(?1)\2|)|((.)(?3)\4|.))
-
- If you want to match typical palindromic phrases, the pattern has to
- ignore all non-word characters, which can be done like this:
-
- ^\W*+(?:((.)\W*+(?1)\W*+\2|)|((.)\W*+(?3)\W*+\4|\W*+.\W*+))\W*+$
-
- If run with the PCRE_CASELESS option, this pattern matches phrases such
- as "A man, a plan, a canal: Panama!" and it works well in both PCRE and
- Perl. Note the use of the possessive quantifier *+ to avoid backtrack-
- ing into sequences of non-word characters. Without this, PCRE takes a
- great deal longer (ten times or more) to match typical phrases, and
- Perl takes so long that you think it has gone into a loop.
-
- WARNING: The palindrome-matching patterns above work only if the sub-
- ject string does not start with a palindrome that is shorter than the
- entire string. For example, although "abcba" is correctly matched, if
- the subject is "ababa", PCRE finds the palindrome "aba" at the start,
- then fails at top level because the end of the string does not follow.
- Once again, it cannot jump back into the recursion to try other alter-
- natives, so the entire match fails.
-
- The second way in which PCRE and Perl differ in their recursion pro-
- cessing is in the handling of captured values. In Perl, when a subpat-
- tern is called recursively or as a subpattern (see the next section),
- it has no access to any values that were captured outside the recur-
- sion, whereas in PCRE these values can be referenced. Consider this
- pattern:
-
- ^(.)(\1|a(?2))
-
- In PCRE, this pattern matches "bab". The first capturing parentheses
- match "b", then in the second group, when the back reference \1 fails
- to match "b", the second alternative matches "a" and then recurses. In
- the recursion, \1 does now match "b" and so the whole match succeeds.
- In Perl, the pattern fails to match because inside the recursive call
- \1 cannot access the externally set value.
-
-
-SUBPATTERNS AS SUBROUTINES
-
- If the syntax for a recursive subpattern call (either by number or by
- name) is used outside the parentheses to which it refers, it operates
- like a subroutine in a programming language. The called subpattern may
- be defined before or after the reference. A numbered reference can be
- absolute or relative, as in these examples:
-
- (...(absolute)...)...(?2)...
- (...(relative)...)...(?-1)...
- (...(?+1)...(relative)...
-
- An earlier example pointed out that the pattern
-
- (sens|respons)e and \1ibility
-
- matches "sense and sensibility" and "response and responsibility", but
- not "sense and responsibility". If instead the pattern
-
- (sens|respons)e and (?1)ibility
-
- is used, it does match "sense and responsibility" as well as the other
- two strings. Another example is given in the discussion of DEFINE
- above.
-
- All subroutine calls, whether recursive or not, are always treated as
- atomic groups. That is, once a subroutine has matched some of the sub-
- ject string, it is never re-entered, even if it contains untried alter-
- natives and there is a subsequent matching failure. Any capturing
- parentheses that are set during the subroutine call revert to their
- previous values afterwards.
-
- Processing options such as case-independence are fixed when a subpat-
- tern is defined, so if it is used as a subroutine, such options cannot
- be changed for different calls. For example, consider this pattern:
-
- (abc)(?i:(?-1))
-
- It matches "abcabc". It does not match "abcABC" because the change of
- processing option does not affect the called subpattern.
-
-
-ONIGURUMA SUBROUTINE SYNTAX
-
- For compatibility with Oniguruma, the non-Perl syntax \g followed by a
- name or a number enclosed either in angle brackets or single quotes, is
- an alternative syntax for referencing a subpattern as a subroutine,
- possibly recursively. Here are two of the examples used above, rewrit-
- ten using this syntax:
-
- (?<pn> \( ( (?>[^()]+) | \g<pn> )* \) )
- (sens|respons)e and \g'1'ibility
-
- PCRE supports an extension to Oniguruma: if a number is preceded by a
- plus or a minus sign it is taken as a relative reference. For example:
-
- (abc)(?i:\g<-1>)
-
- Note that \g{...} (Perl syntax) and \g<...> (Oniguruma syntax) are not
- synonymous. The former is a back reference; the latter is a subroutine
- call.
-
-
-CALLOUTS
-
- Perl has a feature whereby using the sequence (?{...}) causes arbitrary
- Perl code to be obeyed in the middle of matching a regular expression.
- This makes it possible, amongst other things, to extract different sub-
- strings that match the same pair of parentheses when there is a repeti-
- tion.
-
- PCRE provides a similar feature, but of course it cannot obey arbitrary
- Perl code. The feature is called "callout". The caller of PCRE provides
- an external function by putting its entry point in the global variable
- pcre_callout (8-bit library) or pcre[16|32]_callout (16-bit or 32-bit
- library). By default, this variable contains NULL, which disables all
- calling out.
-
- Within a regular expression, (?C) indicates the points at which the
- external function is to be called. If you want to identify different
- callout points, you can put a number less than 256 after the letter C.
- The default value is zero. For example, this pattern has two callout
- points:
-
- (?C1)abc(?C2)def
-
- If the PCRE_AUTO_CALLOUT flag is passed to a compiling function, call-
- outs are automatically installed before each item in the pattern. They
- are all numbered 255. If there is a conditional group in the pattern
- whose condition is an assertion, an additional callout is inserted just
- before the condition. An explicit callout may also be set at this posi-
- tion, as in this example:
-
- (?(?C9)(?=a)abc|def)
-
- Note that this applies only to assertion conditions, not to other types
- of condition.
-
- During matching, when PCRE reaches a callout point, the external func-
- tion is called. It is provided with the number of the callout, the
- position in the pattern, and, optionally, one item of data originally
- supplied by the caller of the matching function. The callout function
- may cause matching to proceed, to backtrack, or to fail altogether.
-
- By default, PCRE implements a number of optimizations at compile time
- and matching time, and one side-effect is that sometimes callouts are
- skipped. If you need all possible callouts to happen, you need to set
- options that disable the relevant optimizations. More details, and a
- complete description of the interface to the callout function, are
- given in the pcrecallout documentation.
-
-
-BACKTRACKING CONTROL
-
- Perl 5.10 introduced a number of "Special Backtracking Control Verbs",
- which are still described in the Perl documentation as "experimental
- and subject to change or removal in a future version of Perl". It goes
- on to say: "Their usage in production code should be noted to avoid
- problems during upgrades." The same remarks apply to the PCRE features
- described in this section.
-
- The new verbs make use of what was previously invalid syntax: an open-
- ing parenthesis followed by an asterisk. They are generally of the form
- (*VERB) or (*VERB:NAME). Some may take either form, possibly behaving
- differently depending on whether or not a name is present. A name is
- any sequence of characters that does not include a closing parenthesis.
- The maximum length of name is 255 in the 8-bit library and 65535 in the
- 16-bit and 32-bit libraries. If the name is empty, that is, if the
- closing parenthesis immediately follows the colon, the effect is as if
- the colon were not there. Any number of these verbs may occur in a
- pattern.
-
- Since these verbs are specifically related to backtracking, most of
- them can be used only when the pattern is to be matched using one of
- the traditional matching functions, because these use a backtracking
- algorithm. With the exception of (*FAIL), which behaves like a failing
- negative assertion, the backtracking control verbs cause an error if
- encountered by a DFA matching function.
-
- The behaviour of these verbs in repeated groups, assertions, and in
- subpatterns called as subroutines (whether or not recursively) is docu-
- mented below.
-
- Optimizations that affect backtracking verbs
-
- PCRE contains some optimizations that are used to speed up matching by
- running some checks at the start of each match attempt. For example, it
- may know the minimum length of matching subject, or that a particular
- character must be present. When one of these optimizations bypasses the
- running of a match, any included backtracking verbs will not, of
- course, be processed. You can suppress the start-of-match optimizations
- by setting the PCRE_NO_START_OPTIMIZE option when calling pcre_com-
- pile() or pcre_exec(), or by starting the pattern with (*NO_START_OPT).
- There is more discussion of this option in the section entitled "Option
- bits for pcre_exec()" in the pcreapi documentation.
-
- Experiments with Perl suggest that it too has similar optimizations,
- sometimes leading to anomalous results.
-
- Verbs that act immediately
-
- The following verbs act as soon as they are encountered. They may not
- be followed by a name.
-
- (*ACCEPT)
-
- This verb causes the match to end successfully, skipping the remainder
- of the pattern. However, when it is inside a subpattern that is called
- as a subroutine, only that subpattern is ended successfully. Matching
- then continues at the outer level. If (*ACCEPT) in triggered in a posi-
- tive assertion, the assertion succeeds; in a negative assertion, the
- assertion fails.
-
- If (*ACCEPT) is inside capturing parentheses, the data so far is cap-
- tured. For example:
-
- A((?:A|B(*ACCEPT)|C)D)
-
- This matches "AB", "AAD", or "ACD"; when it matches "AB", "B" is cap-
- tured by the outer parentheses.
-
- (*FAIL) or (*F)
-
- This verb causes a matching failure, forcing backtracking to occur. It
- is equivalent to (?!) but easier to read. The Perl documentation notes
- that it is probably useful only when combined with (?{}) or (??{}).
- Those are, of course, Perl features that are not present in PCRE. The
- nearest equivalent is the callout feature, as for example in this pat-
- tern:
-
- a+(?C)(*FAIL)
-
- A match with the string "aaaa" always fails, but the callout is taken
- before each backtrack happens (in this example, 10 times).
-
- Recording which path was taken
-
- There is one verb whose main purpose is to track how a match was
- arrived at, though it also has a secondary use in conjunction with
- advancing the match starting point (see (*SKIP) below).
-
- (*MARK:NAME) or (*:NAME)
-
- A name is always required with this verb. There may be as many
- instances of (*MARK) as you like in a pattern, and their names do not
- have to be unique.
-
- When a match succeeds, the name of the last-encountered (*MARK:NAME),
- (*PRUNE:NAME), or (*THEN:NAME) on the matching path is passed back to
- the caller as described in the section entitled "Extra data for
- pcre_exec()" in the pcreapi documentation. Here is an example of
- pcretest output, where the /K modifier requests the retrieval and out-
- putting of (*MARK) data:
-
- re> /X(*MARK:A)Y|X(*MARK:B)Z/K
- data> XY
- 0: XY
- MK: A
- XZ
- 0: XZ
- MK: B
-
- The (*MARK) name is tagged with "MK:" in this output, and in this exam-
- ple it indicates which of the two alternatives matched. This is a more
- efficient way of obtaining this information than putting each alterna-
- tive in its own capturing parentheses.
-
- If a verb with a name is encountered in a positive assertion that is
- true, the name is recorded and passed back if it is the last-encoun-
- tered. This does not happen for negative assertions or failing positive
- assertions.
-
- After a partial match or a failed match, the last encountered name in
- the entire match process is returned. For example:
-
- re> /X(*MARK:A)Y|X(*MARK:B)Z/K
- data> XP
- No match, mark = B
-
- Note that in this unanchored example the mark is retained from the
- match attempt that started at the letter "X" in the subject. Subsequent
- match attempts starting at "P" and then with an empty string do not get
- as far as the (*MARK) item, but nevertheless do not reset it.
-
- If you are interested in (*MARK) values after failed matches, you
- should probably set the PCRE_NO_START_OPTIMIZE option (see above) to
- ensure that the match is always attempted.
-
- Verbs that act after backtracking
-
- The following verbs do nothing when they are encountered. Matching con-
- tinues with what follows, but if there is no subsequent match, causing
- a backtrack to the verb, a failure is forced. That is, backtracking
- cannot pass to the left of the verb. However, when one of these verbs
- appears inside an atomic group or an assertion that is true, its effect
- is confined to that group, because once the group has been matched,
- there is never any backtracking into it. In this situation, backtrack-
- ing can "jump back" to the left of the entire atomic group or asser-
- tion. (Remember also, as stated above, that this localization also
- applies in subroutine calls.)
-
- These verbs differ in exactly what kind of failure occurs when back-
- tracking reaches them. The behaviour described below is what happens
- when the verb is not in a subroutine or an assertion. Subsequent sec-
- tions cover these special cases.
-
- (*COMMIT)
-
- This verb, which may not be followed by a name, causes the whole match
- to fail outright if there is a later matching failure that causes back-
- tracking to reach it. Even if the pattern is unanchored, no further
- attempts to find a match by advancing the starting point take place. If
- (*COMMIT) is the only backtracking verb that is encountered, once it
- has been passed pcre_exec() is committed to finding a match at the cur-
- rent starting point, or not at all. For example:
-
- a+(*COMMIT)b
-
- This matches "xxaab" but not "aacaab". It can be thought of as a kind
- of dynamic anchor, or "I've started, so I must finish." The name of the
- most recently passed (*MARK) in the path is passed back when (*COMMIT)
- forces a match failure.
-
- If there is more than one backtracking verb in a pattern, a different
- one that follows (*COMMIT) may be triggered first, so merely passing
- (*COMMIT) during a match does not always guarantee that a match must be
- at this starting point.
-
- Note that (*COMMIT) at the start of a pattern is not the same as an
- anchor, unless PCRE's start-of-match optimizations are turned off, as
- shown in this output from pcretest:
-
- re> /(*COMMIT)abc/
- data> xyzabc
- 0: abc
- data> xyzabc\Y
- No match
-
- For this pattern, PCRE knows that any match must start with "a", so the
- optimization skips along the subject to "a" before applying the pattern
- to the first set of data. The match attempt then succeeds. In the sec-
- ond set of data, the escape sequence \Y is interpreted by the pcretest
- program. It causes the PCRE_NO_START_OPTIMIZE option to be set when
- pcre_exec() is called. This disables the optimization that skips along
- to the first character. The pattern is now applied starting at "x", and
- so the (*COMMIT) causes the match to fail without trying any other
- starting points.
-
- (*PRUNE) or (*PRUNE:NAME)
-
- This verb causes the match to fail at the current starting position in
- the subject if there is a later matching failure that causes backtrack-
- ing to reach it. If the pattern is unanchored, the normal "bumpalong"
- advance to the next starting character then happens. Backtracking can
- occur as usual to the left of (*PRUNE), before it is reached, or when
- matching to the right of (*PRUNE), but if there is no match to the
- right, backtracking cannot cross (*PRUNE). In simple cases, the use of
- (*PRUNE) is just an alternative to an atomic group or possessive quan-
- tifier, but there are some uses of (*PRUNE) that cannot be expressed in
- any other way. In an anchored pattern (*PRUNE) has the same effect as
- (*COMMIT).
-
- The behaviour of (*PRUNE:NAME) is the not the same as
- (*MARK:NAME)(*PRUNE). It is like (*MARK:NAME) in that the name is
- remembered for passing back to the caller. However, (*SKIP:NAME)
- searches only for names set with (*MARK).
-
- (*SKIP)
-
- This verb, when given without a name, is like (*PRUNE), except that if
- the pattern is unanchored, the "bumpalong" advance is not to the next
- character, but to the position in the subject where (*SKIP) was encoun-
- tered. (*SKIP) signifies that whatever text was matched leading up to
- it cannot be part of a successful match. Consider:
-
- a+(*SKIP)b
-
- If the subject is "aaaac...", after the first match attempt fails
- (starting at the first character in the string), the starting point
- skips on to start the next attempt at "c". Note that a possessive quan-
- tifer does not have the same effect as this example; although it would
- suppress backtracking during the first match attempt, the second
- attempt would start at the second character instead of skipping on to
- "c".
-
- (*SKIP:NAME)
-
- When (*SKIP) has an associated name, its behaviour is modified. When it
- is triggered, the previous path through the pattern is searched for the
- most recent (*MARK) that has the same name. If one is found, the
- "bumpalong" advance is to the subject position that corresponds to that
- (*MARK) instead of to where (*SKIP) was encountered. If no (*MARK) with
- a matching name is found, the (*SKIP) is ignored.
-
- Note that (*SKIP:NAME) searches only for names set by (*MARK:NAME). It
- ignores names that are set by (*PRUNE:NAME) or (*THEN:NAME).
-
- (*THEN) or (*THEN:NAME)
-
- This verb causes a skip to the next innermost alternative when back-
- tracking reaches it. That is, it cancels any further backtracking
- within the current alternative. Its name comes from the observation
- that it can be used for a pattern-based if-then-else block:
-
- ( COND1 (*THEN) FOO | COND2 (*THEN) BAR | COND3 (*THEN) BAZ ) ...
-
- If the COND1 pattern matches, FOO is tried (and possibly further items
- after the end of the group if FOO succeeds); on failure, the matcher
- skips to the second alternative and tries COND2, without backtracking
- into COND1. If that succeeds and BAR fails, COND3 is tried. If subse-
- quently BAZ fails, there are no more alternatives, so there is a back-
- track to whatever came before the entire group. If (*THEN) is not
- inside an alternation, it acts like (*PRUNE).
-
- The behaviour of (*THEN:NAME) is the not the same as
- (*MARK:NAME)(*THEN). It is like (*MARK:NAME) in that the name is
- remembered for passing back to the caller. However, (*SKIP:NAME)
- searches only for names set with (*MARK).
-
- A subpattern that does not contain a | character is just a part of the
- enclosing alternative; it is not a nested alternation with only one
- alternative. The effect of (*THEN) extends beyond such a subpattern to
- the enclosing alternative. Consider this pattern, where A, B, etc. are
- complex pattern fragments that do not contain any | characters at this
- level:
-
- A (B(*THEN)C) | D
-
- If A and B are matched, but there is a failure in C, matching does not
- backtrack into A; instead it moves to the next alternative, that is, D.
- However, if the subpattern containing (*THEN) is given an alternative,
- it behaves differently:
-
- A (B(*THEN)C | (*FAIL)) | D
-
- The effect of (*THEN) is now confined to the inner subpattern. After a
- failure in C, matching moves to (*FAIL), which causes the whole subpat-
- tern to fail because there are no more alternatives to try. In this
- case, matching does now backtrack into A.
-
- Note that a conditional subpattern is not considered as having two
- alternatives, because only one is ever used. In other words, the |
- character in a conditional subpattern has a different meaning. Ignoring
- white space, consider:
-
- ^.*? (?(?=a) a | b(*THEN)c )
-
- If the subject is "ba", this pattern does not match. Because .*? is
- ungreedy, it initially matches zero characters. The condition (?=a)
- then fails, the character "b" is matched, but "c" is not. At this
- point, matching does not backtrack to .*? as might perhaps be expected
- from the presence of the | character. The conditional subpattern is
- part of the single alternative that comprises the whole pattern, and so
- the match fails. (If there was a backtrack into .*?, allowing it to
- match "b", the match would succeed.)
-
- The verbs just described provide four different "strengths" of control
- when subsequent matching fails. (*THEN) is the weakest, carrying on the
- match at the next alternative. (*PRUNE) comes next, failing the match
- at the current starting position, but allowing an advance to the next
- character (for an unanchored pattern). (*SKIP) is similar, except that
- the advance may be more than one character. (*COMMIT) is the strongest,
- causing the entire match to fail.
-
- More than one backtracking verb
-
- If more than one backtracking verb is present in a pattern, the one
- that is backtracked onto first acts. For example, consider this pat-
- tern, where A, B, etc. are complex pattern fragments:
-
- (A(*COMMIT)B(*THEN)C|ABD)
-
- If A matches but B fails, the backtrack to (*COMMIT) causes the entire
- match to fail. However, if A and B match, but C fails, the backtrack to
- (*THEN) causes the next alternative (ABD) to be tried. This behaviour
- is consistent, but is not always the same as Perl's. It means that if
- two or more backtracking verbs appear in succession, all the the last
- of them has no effect. Consider this example:
-
- ...(*COMMIT)(*PRUNE)...
-
- If there is a matching failure to the right, backtracking onto (*PRUNE)
- causes it to be triggered, and its action is taken. There can never be
- a backtrack onto (*COMMIT).
-
- Backtracking verbs in repeated groups
-
- PCRE differs from Perl in its handling of backtracking verbs in
- repeated groups. For example, consider:
-
- /(a(*COMMIT)b)+ac/
-
- If the subject is "abac", Perl matches, but PCRE fails because the
- (*COMMIT) in the second repeat of the group acts.
-
- Backtracking verbs in assertions
-
- (*FAIL) in an assertion has its normal effect: it forces an immediate
- backtrack.
-
- (*ACCEPT) in a positive assertion causes the assertion to succeed with-
- out any further processing. In a negative assertion, (*ACCEPT) causes
- the assertion to fail without any further processing.
-
- The other backtracking verbs are not treated specially if they appear
- in a positive assertion. In particular, (*THEN) skips to the next
- alternative in the innermost enclosing group that has alternations,
- whether or not this is within the assertion.
-
- Negative assertions are, however, different, in order to ensure that
- changing a positive assertion into a negative assertion changes its
- result. Backtracking into (*COMMIT), (*SKIP), or (*PRUNE) causes a neg-
- ative assertion to be true, without considering any further alternative
- branches in the assertion. Backtracking into (*THEN) causes it to skip
- to the next enclosing alternative within the assertion (the normal be-
- haviour), but if the assertion does not have such an alternative,
- (*THEN) behaves like (*PRUNE).
-
- Backtracking verbs in subroutines
-
- These behaviours occur whether or not the subpattern is called recur-
- sively. Perl's treatment of subroutines is different in some cases.
-
- (*FAIL) in a subpattern called as a subroutine has its normal effect:
- it forces an immediate backtrack.
-
- (*ACCEPT) in a subpattern called as a subroutine causes the subroutine
- match to succeed without any further processing. Matching then contin-
- ues after the subroutine call.
-
- (*COMMIT), (*SKIP), and (*PRUNE) in a subpattern called as a subroutine
- cause the subroutine match to fail.
-
- (*THEN) skips to the next alternative in the innermost enclosing group
- within the subpattern that has alternatives. If there is no such group
- within the subpattern, (*THEN) causes the subroutine match to fail.
-
-
-SEE ALSO
-
- pcreapi(3), pcrecallout(3), pcrematching(3), pcresyntax(3), pcre(3),
- pcre16(3), pcre32(3).
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 23 October 2016
- Copyright (c) 1997-2016 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCRESYNTAX(3) Library Functions Manual PCRESYNTAX(3)
-
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
-PCRE REGULAR EXPRESSION SYNTAX SUMMARY
-
- The full syntax and semantics of the regular expressions that are sup-
- ported by PCRE are described in the pcrepattern documentation. This
- document contains a quick-reference summary of the syntax.
-
-
-QUOTING
-
- \x where x is non-alphanumeric is a literal x
- \Q...\E treat enclosed characters as literal
-
-
-CHARACTERS
-
- \a alarm, that is, the BEL character (hex 07)
- \cx "control-x", where x is any ASCII character
- \e escape (hex 1B)
- \f form feed (hex 0C)
- \n newline (hex 0A)
- \r carriage return (hex 0D)
- \t tab (hex 09)
- \0dd character with octal code 0dd
- \ddd character with octal code ddd, or backreference
- \o{ddd..} character with octal code ddd..
- \xhh character with hex code hh
- \x{hhh..} character with hex code hhh..
-
- Note that \0dd is always an octal code, and that \8 and \9 are the lit-
- eral characters "8" and "9".
-
-
-CHARACTER TYPES
-
- . any character except newline;
- in dotall mode, any character whatsoever
- \C one data unit, even in UTF mode (best avoided)
- \d a decimal digit
- \D a character that is not a decimal digit
- \h a horizontal white space character
- \H a character that is not a horizontal white space character
- \N a character that is not a newline
- \p{xx} a character with the xx property
- \P{xx} a character without the xx property
- \R a newline sequence
- \s a white space character
- \S a character that is not a white space character
- \v a vertical white space character
- \V a character that is not a vertical white space character
- \w a "word" character
- \W a "non-word" character
- \X a Unicode extended grapheme cluster
-
- By default, \d, \s, and \w match only ASCII characters, even in UTF-8
- mode or in the 16- bit and 32-bit libraries. However, if locale-spe-
- cific matching is happening, \s and \w may also match characters with
- code points in the range 128-255. If the PCRE_UCP option is set, the
- behaviour of these escape sequences is changed to use Unicode proper-
- ties and they match many more characters.
-
-
-GENERAL CATEGORY PROPERTIES FOR \p and \P
-
- C Other
- Cc Control
- Cf Format
- Cn Unassigned
- Co Private use
- Cs Surrogate
-
- L Letter
- Ll Lower case letter
- Lm Modifier letter
- Lo Other letter
- Lt Title case letter
- Lu Upper case letter
- L& Ll, Lu, or Lt
-
- M Mark
- Mc Spacing mark
- Me Enclosing mark
- Mn Non-spacing mark
-
- N Number
- Nd Decimal number
- Nl Letter number
- No Other number
-
- P Punctuation
- Pc Connector punctuation
- Pd Dash punctuation
- Pe Close punctuation
- Pf Final punctuation
- Pi Initial punctuation
- Po Other punctuation
- Ps Open punctuation
-
- S Symbol
- Sc Currency symbol
- Sk Modifier symbol
- Sm Mathematical symbol
- So Other symbol
-
- Z Separator
- Zl Line separator
- Zp Paragraph separator
- Zs Space separator
-
-
-PCRE SPECIAL CATEGORY PROPERTIES FOR \p and \P
-
- Xan Alphanumeric: union of properties L and N
- Xps POSIX space: property Z or tab, NL, VT, FF, CR
- Xsp Perl space: property Z or tab, NL, VT, FF, CR
- Xuc Univerally-named character: one that can be
- represented by a Universal Character Name
- Xwd Perl word: property Xan or underscore
-
- Perl and POSIX space are now the same. Perl added VT to its space char-
- acter set at release 5.18 and PCRE changed at release 8.34.
-
-
-SCRIPT NAMES FOR \p AND \P
-
- Arabic, Armenian, Avestan, Balinese, Bamum, Bassa_Vah, Batak, Bengali,
- Bopomofo, Brahmi, Braille, Buginese, Buhid, Canadian_Aboriginal, Car-
- ian, Caucasian_Albanian, Chakma, Cham, Cherokee, Common, Coptic, Cunei-
- form, Cypriot, Cyrillic, Deseret, Devanagari, Duployan, Egyptian_Hiero-
- glyphs, Elbasan, Ethiopic, Georgian, Glagolitic, Gothic, Grantha,
- Greek, Gujarati, Gurmukhi, Han, Hangul, Hanunoo, Hebrew, Hiragana,
- Imperial_Aramaic, Inherited, Inscriptional_Pahlavi, Inscrip-
- tional_Parthian, Javanese, Kaithi, Kannada, Katakana, Kayah_Li,
- Kharoshthi, Khmer, Khojki, Khudawadi, Lao, Latin, Lepcha, Limbu, Lin-
- ear_A, Linear_B, Lisu, Lycian, Lydian, Mahajani, Malayalam, Mandaic,
- Manichaean, Meetei_Mayek, Mende_Kikakui, Meroitic_Cursive,
- Meroitic_Hieroglyphs, Miao, Modi, Mongolian, Mro, Myanmar, Nabataean,
- New_Tai_Lue, Nko, Ogham, Ol_Chiki, Old_Italic, Old_North_Arabian,
- Old_Permic, Old_Persian, Old_South_Arabian, Old_Turkic, Oriya, Osmanya,
- Pahawh_Hmong, Palmyrene, Pau_Cin_Hau, Phags_Pa, Phoenician,
- Psalter_Pahlavi, Rejang, Runic, Samaritan, Saurashtra, Sharada, Sha-
- vian, Siddham, Sinhala, Sora_Sompeng, Sundanese, Syloti_Nagri, Syriac,
- Tagalog, Tagbanwa, Tai_Le, Tai_Tham, Tai_Viet, Takri, Tamil, Telugu,
- Thaana, Thai, Tibetan, Tifinagh, Tirhuta, Ugaritic, Vai, Warang_Citi,
- Yi.
-
-
-CHARACTER CLASSES
-
- [...] positive character class
- [^...] negative character class
- [x-y] range (can be used for hex characters)
- [[:xxx:]] positive POSIX named set
- [[:^xxx:]] negative POSIX named set
-
- alnum alphanumeric
- alpha alphabetic
- ascii 0-127
- blank space or tab
- cntrl control character
- digit decimal digit
- graph printing, excluding space
- lower lower case letter
- print printing, including space
- punct printing, excluding alphanumeric
- space white space
- upper upper case letter
- word same as \w
- xdigit hexadecimal digit
-
- In PCRE, POSIX character set names recognize only ASCII characters by
- default, but some of them use Unicode properties if PCRE_UCP is set.
- You can use \Q...\E inside a character class.
-
-
-QUANTIFIERS
-
- ? 0 or 1, greedy
- ?+ 0 or 1, possessive
- ?? 0 or 1, lazy
- * 0 or more, greedy
- *+ 0 or more, possessive
- *? 0 or more, lazy
- + 1 or more, greedy
- ++ 1 or more, possessive
- +? 1 or more, lazy
- {n} exactly n
- {n,m} at least n, no more than m, greedy
- {n,m}+ at least n, no more than m, possessive
- {n,m}? at least n, no more than m, lazy
- {n,} n or more, greedy
- {n,}+ n or more, possessive
- {n,}? n or more, lazy
-
-
-ANCHORS AND SIMPLE ASSERTIONS
-
- \b word boundary
- \B not a word boundary
- ^ start of subject
- also after internal newline in multiline mode
- \A start of subject
- $ end of subject
- also before newline at end of subject
- also before internal newline in multiline mode
- \Z end of subject
- also before newline at end of subject
- \z end of subject
- \G first matching position in subject
-
-
-MATCH POINT RESET
-
- \K reset start of match
-
- \K is honoured in positive assertions, but ignored in negative ones.
-
-
-ALTERNATION
-
- expr|expr|expr...
-
-
-CAPTURING
-
- (...) capturing group
- (?<name>...) named capturing group (Perl)
- (?'name'...) named capturing group (Perl)
- (?P<name>...) named capturing group (Python)
- (?:...) non-capturing group
- (?|...) non-capturing group; reset group numbers for
- capturing groups in each alternative
-
-
-ATOMIC GROUPS
-
- (?>...) atomic, non-capturing group
-
-
-COMMENT
-
- (?#....) comment (not nestable)
-
-
-OPTION SETTING
-
- (?i) caseless
- (?J) allow duplicate names
- (?m) multiline
- (?s) single line (dotall)
- (?U) default ungreedy (lazy)
- (?x) extended (ignore white space)
- (?-...) unset option(s)
-
- The following are recognized only at the very start of a pattern or
- after one of the newline or \R options with similar syntax. More than
- one of them may appear.
-
- (*LIMIT_MATCH=d) set the match limit to d (decimal number)
- (*LIMIT_RECURSION=d) set the recursion limit to d (decimal number)
- (*NO_AUTO_POSSESS) no auto-possessification (PCRE_NO_AUTO_POSSESS)
- (*NO_START_OPT) no start-match optimization (PCRE_NO_START_OPTIMIZE)
- (*UTF8) set UTF-8 mode: 8-bit library (PCRE_UTF8)
- (*UTF16) set UTF-16 mode: 16-bit library (PCRE_UTF16)
- (*UTF32) set UTF-32 mode: 32-bit library (PCRE_UTF32)
- (*UTF) set appropriate UTF mode for the library in use
- (*UCP) set PCRE_UCP (use Unicode properties for \d etc)
-
- Note that LIMIT_MATCH and LIMIT_RECURSION can only reduce the value of
- the limits set by the caller of pcre_exec(), not increase them.
-
-
-NEWLINE CONVENTION
-
- These are recognized only at the very start of the pattern or after
- option settings with a similar syntax.
-
- (*CR) carriage return only
- (*LF) linefeed only
- (*CRLF) carriage return followed by linefeed
- (*ANYCRLF) all three of the above
- (*ANY) any Unicode newline sequence
-
-
-WHAT \R MATCHES
-
- These are recognized only at the very start of the pattern or after
- option setting with a similar syntax.
-
- (*BSR_ANYCRLF) CR, LF, or CRLF
- (*BSR_UNICODE) any Unicode newline sequence
-
-
-LOOKAHEAD AND LOOKBEHIND ASSERTIONS
-
- (?=...) positive look ahead
- (?!...) negative look ahead
- (?<=...) positive look behind
- (?<!...) negative look behind
-
- Each top-level branch of a look behind must be of a fixed length.
-
-
-BACKREFERENCES
-
- \n reference by number (can be ambiguous)
- \gn reference by number
- \g{n} reference by number
- \g{-n} relative reference by number
- \k<name> reference by name (Perl)
- \k'name' reference by name (Perl)
- \g{name} reference by name (Perl)
- \k{name} reference by name (.NET)
- (?P=name) reference by name (Python)
-
-
-SUBROUTINE REFERENCES (POSSIBLY RECURSIVE)
-
- (?R) recurse whole pattern
- (?n) call subpattern by absolute number
- (?+n) call subpattern by relative number
- (?-n) call subpattern by relative number
- (?&name) call subpattern by name (Perl)
- (?P>name) call subpattern by name (Python)
- \g<name> call subpattern by name (Oniguruma)
- \g'name' call subpattern by name (Oniguruma)
- \g<n> call subpattern by absolute number (Oniguruma)
- \g'n' call subpattern by absolute number (Oniguruma)
- \g<+n> call subpattern by relative number (PCRE extension)
- \g'+n' call subpattern by relative number (PCRE extension)
- \g<-n> call subpattern by relative number (PCRE extension)
- \g'-n' call subpattern by relative number (PCRE extension)
-
-
-CONDITIONAL PATTERNS
-
- (?(condition)yes-pattern)
- (?(condition)yes-pattern|no-pattern)
-
- (?(n)... absolute reference condition
- (?(+n)... relative reference condition
- (?(-n)... relative reference condition
- (?(<name>)... named reference condition (Perl)
- (?('name')... named reference condition (Perl)
- (?(name)... named reference condition (PCRE)
- (?(R)... overall recursion condition
- (?(Rn)... specific group recursion condition
- (?(R&name)... specific recursion condition
- (?(DEFINE)... define subpattern for reference
- (?(assert)... assertion condition
-
-
-BACKTRACKING CONTROL
-
- The following act immediately they are reached:
-
- (*ACCEPT) force successful match
- (*FAIL) force backtrack; synonym (*F)
- (*MARK:NAME) set name to be passed back; synonym (*:NAME)
-
- The following act only when a subsequent match failure causes a back-
- track to reach them. They all force a match failure, but they differ in
- what happens afterwards. Those that advance the start-of-match point do
- so only if the pattern is not anchored.
-
- (*COMMIT) overall failure, no advance of starting point
- (*PRUNE) advance to next starting character
- (*PRUNE:NAME) equivalent to (*MARK:NAME)(*PRUNE)
- (*SKIP) advance to current matching position
- (*SKIP:NAME) advance to position corresponding to an earlier
- (*MARK:NAME); if not found, the (*SKIP) is ignored
- (*THEN) local failure, backtrack to next alternation
- (*THEN:NAME) equivalent to (*MARK:NAME)(*THEN)
-
-
-CALLOUTS
-
- (?C) callout
- (?Cn) callout with data n
-
-
-SEE ALSO
-
- pcrepattern(3), pcreapi(3), pcrecallout(3), pcrematching(3), pcre(3).
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 08 January 2014
- Copyright (c) 1997-2014 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCREUNICODE(3) Library Functions Manual PCREUNICODE(3)
-
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
-UTF-8, UTF-16, UTF-32, AND UNICODE PROPERTY SUPPORT
-
- As well as UTF-8 support, PCRE also supports UTF-16 (from release 8.30)
- and UTF-32 (from release 8.32), by means of two additional libraries.
- They can be built as well as, or instead of, the 8-bit library.
-
-
-UTF-8 SUPPORT
-
- In order process UTF-8 strings, you must build PCRE's 8-bit library
- with UTF support, and, in addition, you must call pcre_compile() with
- the PCRE_UTF8 option flag, or the pattern must start with the sequence
- (*UTF8) or (*UTF). When either of these is the case, both the pattern
- and any subject strings that are matched against it are treated as
- UTF-8 strings instead of strings of individual 1-byte characters.
-
-
-UTF-16 AND UTF-32 SUPPORT
-
- In order process UTF-16 or UTF-32 strings, you must build PCRE's 16-bit
- or 32-bit library with UTF support, and, in addition, you must call
- pcre16_compile() or pcre32_compile() with the PCRE_UTF16 or PCRE_UTF32
- option flag, as appropriate. Alternatively, the pattern must start with
- the sequence (*UTF16), (*UTF32), as appropriate, or (*UTF), which can
- be used with either library. When UTF mode is set, both the pattern and
- any subject strings that are matched against it are treated as UTF-16
- or UTF-32 strings instead of strings of individual 16-bit or 32-bit
- characters.
-
-
-UTF SUPPORT OVERHEAD
-
- If you compile PCRE with UTF 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_UTF[8|16|32] flag occasionally, so
- should not be very big.
-
-
-UNICODE PROPERTY SUPPORT
-
- If PCRE is built with Unicode character property support (which implies
- UTF support), the escape sequences \p{..}, \P{..}, and \X can be used.
- 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, the Unicode script names such as Arabic or Han, and the
- derived properties Any and L&. Full lists is given in the pcrepattern
- and pcresyntax 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 byte strings passed as patterns
- and subjects are (by default) checked for validity on entry to the rel-
- evant functions. The entire string is checked before any other process-
- ing takes place. From release 7.3 of PCRE, the check is according the
- rules of RFC 3629, which are themselves derived from the Unicode speci-
- fication. 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, exclud-
- ing the surrogate area. (From release 8.33 the so-called "non-charac-
- ter" code points are no longer excluded because Unicode corrigendum #9
- makes it clear that they should not be.)
-
- Characters in the "Surrogate Area" of Unicode are reserved for use by
- UTF-16, where they are used in pairs to encode codepoints with values
- greater than 0xFFFF. The code points that are encoded by UTF-16 pairs
- are available independently in the UTF-8 and UTF-32 encodings. (In
- other words, the whole surrogate thing is a fudge for UTF-16 which
- unfortunately messes up UTF-8 and UTF-32.)
-
- If an invalid UTF-8 string is passed to PCRE, an error return is given.
- At compile time, the only additional information is the offset to the
- first byte of the failing character. The run-time functions pcre_exec()
- and pcre_dfa_exec() also pass back this information, as well as a more
- detailed reason code if the caller has provided memory in which to do
- this.
-
- In some situations, you may already know that your strings are valid,
- and therefore want to skip these checks in order to improve perfor-
- mance, for example in the case of a long subject string that is being
- scanned repeatedly. 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.
-
- Note that passing PCRE_NO_UTF8_CHECK to pcre_compile() just disables
- the check for the pattern; it does not also apply to subject strings.
- If you want to disable the check for a subject string you must pass
- this option to pcre_exec() or pcre_dfa_exec().
-
- If you pass an invalid UTF-8 string when PCRE_NO_UTF8_CHECK is set, the
- result is undefined and your program may crash.
-
- Validity of UTF-16 strings
-
- When you set the PCRE_UTF16 flag, the strings of 16-bit data units that
- are passed as patterns and subjects are (by default) checked for valid-
- ity on entry to the relevant functions. Values other than those in the
- surrogate range U+D800 to U+DFFF are independent code points. Values in
- the surrogate range must be used in pairs in the correct manner.
-
- If an invalid UTF-16 string is passed to PCRE, an error return is
- given. At compile time, the only additional information is the offset
- to the first data unit of the failing character. The run-time functions
- pcre16_exec() and pcre16_dfa_exec() also pass back this information, as
- well as a more detailed reason code if the caller has provided memory
- in which to do this.
-
- In some situations, you may already know that your strings are valid,
- and therefore want to skip these checks in order to improve perfor-
- mance. If you set the PCRE_NO_UTF16_CHECK flag at compile time or at
- run time, PCRE assumes that the pattern or subject it is given (respec-
- tively) contains only valid UTF-16 sequences. In this case, it does not
- diagnose an invalid UTF-16 string. However, if an invalid string is
- passed, the result is undefined.
-
- Validity of UTF-32 strings
-
- When you set the PCRE_UTF32 flag, the strings of 32-bit data units that
- are passed as patterns and subjects are (by default) checked for valid-
- ity on entry to the relevant functions. This check allows only values
- in the range U+0 to U+10FFFF, excluding the surrogate area U+D800 to
- U+DFFF.
-
- If an invalid UTF-32 string is passed to PCRE, an error return is
- given. At compile time, the only additional information is the offset
- to the first data unit of the failing character. The run-time functions
- pcre32_exec() and pcre32_dfa_exec() also pass back this information, as
- well as a more detailed reason code if the caller has provided memory
- in which to do this.
-
- In some situations, you may already know that your strings are valid,
- and therefore want to skip these checks in order to improve perfor-
- mance. If you set the PCRE_NO_UTF32_CHECK flag at compile time or at
- run time, PCRE assumes that the pattern or subject it is given (respec-
- tively) contains only valid UTF-32 sequences. In this case, it does not
- diagnose an invalid UTF-32 string. However, if an invalid string is
- passed, the result is undefined.
-
- General comments about UTF modes
-
- 1. Codepoints less than 256 can be specified in patterns by either
- braced or unbraced hexadecimal escape sequences (for example, \x{b3} or
- \xb3). Larger values have to use braced sequences.
-
- 2. Octal numbers up to \777 are recognized, and in UTF-8 mode they
- match two-byte characters for values greater than \177.
-
- 3. Repeat quantifiers apply to complete UTF characters, not to individ-
- ual data units, for example: \x{100}{3}.
-
- 4. The dot metacharacter matches one UTF character instead of a single
- data unit.
-
- 5. The escape sequence \C can be used to match a single byte in UTF-8
- mode, or a single 16-bit data unit in UTF-16 mode, or a single 32-bit
- data unit in UTF-32 mode, but its use can lead to some strange effects
- because it breaks up multi-unit characters (see the description of \C
- in the pcrepattern documentation). The use of \C is not supported in
- the alternative matching function pcre[16|32]_dfa_exec(), nor is it
- supported in UTF mode by the JIT optimization of pcre[16|32]_exec(). If
- JIT optimization is requested for a UTF pattern that contains \C, it
- will not succeed, and so the matching will be carried out by the normal
- interpretive function.
-
- 6. The character escapes \b, \B, \d, \D, \s, \S, \w, and \W correctly
- test characters of any code value, but, by default, the characters that
- PCRE recognizes as digits, spaces, or word characters remain the same
- set as in non-UTF mode, all with values less than 256. This remains
- true even when PCRE is built to include Unicode property support,
- because to do otherwise would slow down PCRE in many common cases. Note
- in particular that this applies to \b and \B, because they are defined
- in terms of \w and \W. If you really want to test for a wider sense of,
- say, "digit", you can use explicit Unicode property tests such as
- \p{Nd}. Alternatively, if you set the PCRE_UCP option, the way that the
- character escapes work is changed so that Unicode properties are used
- to determine which characters match. There are more details in the sec-
- tion on generic character types in the pcrepattern documentation.
-
- 7. Similarly, characters that match the POSIX named character classes
- are all low-valued characters, unless the PCRE_UCP option is set.
-
- 8. However, the horizontal and vertical white space matching escapes
- (\h, \H, \v, and \V) do match all the appropriate Unicode characters,
- whether or not PCRE_UCP is set.
-
- 9. Case-insensitive matching applies only to characters whose values
- are less than 128, unless PCRE is built with Unicode property support.
- A few Unicode characters such as Greek sigma have more than two code-
- points that are case-equivalent. Up to and including PCRE release 8.31,
- only one-to-one case mappings were supported, but later releases (with
- Unicode property support) do treat as case-equivalent all versions of
- characters such as Greek sigma.
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 27 February 2013
- Copyright (c) 1997-2013 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCREJIT(3) Library Functions Manual PCREJIT(3)
-
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
-PCRE JUST-IN-TIME COMPILER SUPPORT
-
- Just-in-time compiling is a heavyweight optimization that can greatly
- speed up pattern matching. However, it comes at the cost of extra pro-
- cessing before the match is performed. Therefore, it is of most benefit
- when the same pattern is going to be matched many times. This does not
- necessarily mean many calls of a matching function; if the pattern is
- not anchored, matching attempts may take place many times at various
- positions in the subject, even for a single call. Therefore, if the
- subject string is very long, it may still pay to use JIT for one-off
- matches.
-
- JIT support applies only to the traditional Perl-compatible matching
- function. It does not apply when the DFA matching function is being
- used. The code for this support was written by Zoltan Herczeg.
-
-
-8-BIT, 16-BIT AND 32-BIT SUPPORT
-
- JIT support is available for all of the 8-bit, 16-bit and 32-bit PCRE
- libraries. To keep this documentation simple, only the 8-bit interface
- is described in what follows. If you are using the 16-bit library, sub-
- stitute the 16-bit functions and 16-bit structures (for example,
- pcre16_jit_stack instead of pcre_jit_stack). If you are using the
- 32-bit library, substitute the 32-bit functions and 32-bit structures
- (for example, pcre32_jit_stack instead of pcre_jit_stack).
-
-
-AVAILABILITY OF JIT SUPPORT
-
- JIT support is an optional feature of PCRE. The "configure" option
- --enable-jit (or equivalent CMake option) must be set when PCRE is
- built if you want to use JIT. The support is limited to the following
- hardware platforms:
-
- ARM v5, v7, and Thumb2
- Intel x86 32-bit and 64-bit
- MIPS 32-bit
- Power PC 32-bit and 64-bit
- SPARC 32-bit (experimental)
-
- If --enable-jit is set on an unsupported platform, compilation fails.
-
- A program that is linked with PCRE 8.20 or later can tell if JIT sup-
- port is available by calling pcre_config() with the PCRE_CONFIG_JIT
- option. The result is 1 when JIT is available, and 0 otherwise. How-
- ever, a simple program does not need to check this in order to use JIT.
- The normal API is implemented in a way that falls back to the interpre-
- tive code if JIT is not available. For programs that need the best pos-
- sible performance, there is also a "fast path" API that is JIT-spe-
- cific.
-
- If your program may sometimes be linked with versions of PCRE that are
- older than 8.20, but you want to use JIT when it is available, you can
- test the values of PCRE_MAJOR and PCRE_MINOR, or the existence of a JIT
- macro such as PCRE_CONFIG_JIT, for compile-time control of your code.
- Also beware that the pcre_jit_exec() function was not available at all
- before 8.32, and may not be available at all if PCRE isn't compiled
- with --enable-jit. See the "JIT FAST PATH API" section below for
- details.
-
-
-SIMPLE USE OF JIT
-
- You have to do two things to make use of the JIT support in the sim-
- plest way:
-
- (1) Call pcre_study() with the PCRE_STUDY_JIT_COMPILE option for
- each compiled pattern, and pass the resulting pcre_extra block to
- pcre_exec().
-
- (2) Use pcre_free_study() to free the pcre_extra block when it is
- no longer needed, instead of just freeing it yourself. This
- ensures that
- any JIT data is also freed.
-
- For a program that may be linked with pre-8.20 versions of PCRE, you
- can insert
-
- #ifndef PCRE_STUDY_JIT_COMPILE
- #define PCRE_STUDY_JIT_COMPILE 0
- #endif
-
- so that no option is passed to pcre_study(), and then use something
- like this to free the study data:
-
- #ifdef PCRE_CONFIG_JIT
- pcre_free_study(study_ptr);
- #else
- pcre_free(study_ptr);
- #endif
-
- PCRE_STUDY_JIT_COMPILE requests the JIT compiler to generate code for
- complete matches. If you want to run partial matches using the
- PCRE_PARTIAL_HARD or PCRE_PARTIAL_SOFT options of pcre_exec(), you
- should set one or both of the following options in addition to, or
- instead of, PCRE_STUDY_JIT_COMPILE when you call pcre_study():
-
- PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE
- PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE
-
- If using pcre_jit_exec() and supporting a pre-8.32 version of PCRE, you
- can insert:
-
- #if PCRE_MAJOR >= 8 && PCRE_MINOR >= 32
- pcre_jit_exec(...);
- #else
- pcre_exec(...)
- #endif
-
- but as described in the "JIT FAST PATH API" section below this assumes
- version 8.32 and later are compiled with --enable-jit, which may break.
-
- The JIT compiler generates different optimized code for each of the
- three modes (normal, soft partial, hard partial). When pcre_exec() is
- called, the appropriate code is run if it is available. Otherwise, the
- pattern is matched using interpretive code.
-
- In some circumstances you may need to call additional functions. These
- are described in the section entitled "Controlling the JIT stack"
- below.
-
- If JIT support is not available, PCRE_STUDY_JIT_COMPILE etc. are
- ignored, and no JIT data is created. Otherwise, the compiled pattern is
- passed to the JIT compiler, which turns it into machine code that exe-
- cutes much faster than the normal interpretive code. When pcre_exec()
- is passed a pcre_extra block containing a pointer to JIT code of the
- appropriate mode (normal or hard/soft partial), it obeys that code
- instead of running the interpreter. The result is identical, but the
- compiled JIT code runs much faster.
-
- There are some pcre_exec() options that are not supported for JIT exe-
- cution. There are also some pattern items that JIT cannot handle.
- Details are given below. In both cases, execution automatically falls
- back to the interpretive code. If you want to know whether JIT was
- actually used for a particular match, you should arrange for a JIT
- callback function to be set up as described in the section entitled
- "Controlling the JIT stack" below, even if you do not need to supply a
- non-default JIT stack. Such a callback function is called whenever JIT
- code is about to be obeyed. If the execution options are not right for
- JIT execution, the callback function is not obeyed.
-
- If the JIT compiler finds an unsupported item, no JIT data is gener-
- ated. You can find out if JIT execution is available after studying a
- pattern by calling pcre_fullinfo() with the PCRE_INFO_JIT option. A
- result of 1 means that JIT compilation was successful. A result of 0
- means that JIT support is not available, or the pattern was not studied
- with PCRE_STUDY_JIT_COMPILE etc., or the JIT compiler was not able to
- handle the pattern.
-
- Once a pattern has been studied, with or without JIT, it can be used as
- many times as you like for matching different subject strings.
-
-
-UNSUPPORTED OPTIONS AND PATTERN ITEMS
-
- The only pcre_exec() options that are supported for JIT execution are
- PCRE_NO_UTF8_CHECK, PCRE_NO_UTF16_CHECK, PCRE_NO_UTF32_CHECK, PCRE_NOT-
- BOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NOTEMPTY_ATSTART, PCRE_PAR-
- TIAL_HARD, and PCRE_PARTIAL_SOFT.
-
- The only unsupported pattern items are \C (match a single data unit)
- when running in a UTF mode, and a callout immediately before an asser-
- tion condition in a conditional group.
-
-
-RETURN VALUES FROM JIT EXECUTION
-
- When a pattern is matched using JIT execution, the return values are
- the same as those given by the interpretive pcre_exec() code, with the
- addition of one new error code: PCRE_ERROR_JIT_STACKLIMIT. This means
- that the memory used for the JIT stack was insufficient. See "Control-
- ling the JIT stack" below for a discussion of JIT stack usage. For com-
- patibility with the interpretive pcre_exec() code, no more than two-
- thirds of the ovector argument is used for passing back captured sub-
- strings.
-
- The error code PCRE_ERROR_MATCHLIMIT is returned by the JIT code if
- searching a very large pattern tree goes on for too long, as it is in
- the same circumstance when JIT is not used, but the details of exactly
- what is counted are not the same. The PCRE_ERROR_RECURSIONLIMIT error
- code is never returned by JIT execution.
-
-
-SAVING AND RESTORING COMPILED PATTERNS
-
- The code that is generated by the JIT compiler is architecture-spe-
- cific, and is also position dependent. For those reasons it cannot be
- saved (in a file or database) and restored later like the bytecode and
- other data of a compiled pattern. Saving and restoring compiled pat-
- terns is not something many people do. More detail about this facility
- is given in the pcreprecompile documentation. It should be possible to
- run pcre_study() on a saved and restored pattern, and thereby recreate
- the JIT data, but because JIT compilation uses significant resources,
- it is probably not worth doing this; you might as well recompile the
- original pattern.
-
-
-CONTROLLING THE JIT STACK
-
- When the compiled JIT code runs, it needs a block of memory to use as a
- stack. By default, it uses 32K on the machine stack. However, some
- large or complicated patterns need more than this. The error
- PCRE_ERROR_JIT_STACKLIMIT is given when there is not enough stack.
- Three functions are provided for managing blocks of memory for use as
- JIT stacks. There is further discussion about the use of JIT stacks in
- the section entitled "JIT stack FAQ" below.
-
- The pcre_jit_stack_alloc() function creates a JIT stack. Its arguments
- are a starting size and a maximum size, and it returns a pointer to an
- opaque structure of type pcre_jit_stack, or NULL if there is an error.
- The pcre_jit_stack_free() function can be used to free a stack that is
- no longer needed. (For the technically minded: the address space is
- allocated by mmap or VirtualAlloc.)
-
- JIT uses far less memory for recursion than the interpretive code, and
- a maximum stack size of 512K to 1M should be more than enough for any
- pattern.
-
- The pcre_assign_jit_stack() function specifies which stack JIT code
- should use. Its arguments are as follows:
-
- pcre_extra *extra
- pcre_jit_callback callback
- void *data
-
- The extra argument must be the result of studying a pattern with
- PCRE_STUDY_JIT_COMPILE etc. There are three cases for the values of the
- other two options:
-
- (1) If callback is NULL and data is NULL, an internal 32K block
- on the machine stack is used.
-
- (2) If callback is NULL and data is not NULL, data must be
- a valid JIT stack, the result of calling pcre_jit_stack_alloc().
-
- (3) If callback is not NULL, it must point to a function that is
- called with data as an argument at the start of matching, in
- order to set up a JIT stack. If the return from the callback
- function is NULL, the internal 32K stack is used; otherwise the
- return value must be a valid JIT stack, the result of calling
- pcre_jit_stack_alloc().
-
- A callback function is obeyed whenever JIT code is about to be run; it
- is not obeyed when pcre_exec() is called with options that are incom-
- patible for JIT execution. A callback function can therefore be used to
- determine whether a match operation was executed by JIT or by the
- interpreter.
-
- You may safely use the same JIT stack for more than one pattern (either
- by assigning directly or by callback), as long as the patterns are all
- matched sequentially in the same thread. In a multithread application,
- if you do not specify a JIT stack, or if you assign or pass back NULL
- from a callback, that is thread-safe, because each thread has its own
- machine stack. However, if you assign or pass back a non-NULL JIT
- stack, this must be a different stack for each thread so that the
- application is thread-safe.
-
- Strictly speaking, even more is allowed. You can assign the same non-
- NULL stack to any number of patterns as long as they are not used for
- matching by multiple threads at the same time. For example, you can
- assign the same stack to all compiled patterns, and use a global mutex
- in the callback to wait until the stack is available for use. However,
- this is an inefficient solution, and not recommended.
-
- This is a suggestion for how a multithreaded program that needs to set
- up non-default JIT stacks might operate:
-
- During thread initalization
- thread_local_var = pcre_jit_stack_alloc(...)
-
- During thread exit
- pcre_jit_stack_free(thread_local_var)
-
- Use a one-line callback function
- return thread_local_var
-
- All the functions described in this section do nothing if JIT is not
- available, and pcre_assign_jit_stack() does nothing unless the extra
- argument is non-NULL and points to a pcre_extra block that is the
- result of a successful study with PCRE_STUDY_JIT_COMPILE etc.
-
-
-JIT STACK FAQ
-
- (1) Why do we need JIT stacks?
-
- PCRE (and JIT) is a recursive, depth-first engine, so it needs a stack
- where the local data of the current node is pushed before checking its
- child nodes. Allocating real machine stack on some platforms is diffi-
- cult. For example, the stack chain needs to be updated every time if we
- extend the stack on PowerPC. Although it is possible, its updating
- time overhead decreases performance. So we do the recursion in memory.
-
- (2) Why don't we simply allocate blocks of memory with malloc()?
-
- Modern operating systems have a nice feature: they can reserve an
- address space instead of allocating memory. We can safely allocate mem-
- ory pages inside this address space, so the stack could grow without
- moving memory data (this is important because of pointers). Thus we can
- allocate 1M address space, and use only a single memory page (usually
- 4K) if that is enough. However, we can still grow up to 1M anytime if
- needed.
-
- (3) Who "owns" a JIT stack?
-
- The owner of the stack is the user program, not the JIT studied pattern
- or anything else. The user program must ensure that if a stack is used
- by pcre_exec(), (that is, it is assigned to the pattern currently run-
- ning), that stack must not be used by any other threads (to avoid over-
- writing the same memory area). The best practice for multithreaded pro-
- grams is to allocate a stack for each thread, and return this stack
- through the JIT callback function.
-
- (4) When should a JIT stack be freed?
-
- You can free a JIT stack at any time, as long as it will not be used by
- pcre_exec() again. When you assign the stack to a pattern, only a
- pointer is set. There is no reference counting or any other magic. You
- can free the patterns and stacks in any order, anytime. Just do not
- call pcre_exec() with a pattern pointing to an already freed stack, as
- that will cause SEGFAULT. (Also, do not free a stack currently used by
- pcre_exec() in another thread). You can also replace the stack for a
- pattern at any time. You can even free the previous stack before
- assigning a replacement.
-
- (5) Should I allocate/free a stack every time before/after calling
- pcre_exec()?
-
- No, because this is too costly in terms of resources. However, you
- could implement some clever idea which release the stack if it is not
- used in let's say two minutes. The JIT callback can help to achieve
- this without keeping a list of the currently JIT studied patterns.
-
- (6) OK, the stack is for long term memory allocation. But what happens
- if a pattern causes stack overflow with a stack of 1M? Is that 1M kept
- until the stack is freed?
-
- Especially on embedded sytems, it might be a good idea to release mem-
- ory sometimes without freeing the stack. There is no API for this at
- the moment. Probably a function call which returns with the currently
- allocated memory for any stack and another which allows releasing mem-
- ory (shrinking the stack) would be a good idea if someone needs this.
-
- (7) This is too much of a headache. Isn't there any better solution for
- JIT stack handling?
-
- No, thanks to Windows. If POSIX threads were used everywhere, we could
- throw out this complicated API.
-
-
-EXAMPLE CODE
-
- This is a single-threaded example that specifies a JIT stack without
- using a callback.
-
- int rc;
- int ovector[30];
- pcre *re;
- pcre_extra *extra;
- pcre_jit_stack *jit_stack;
-
- re = pcre_compile(pattern, 0, &error, &erroffset, NULL);
- /* Check for errors */
- extra = pcre_study(re, PCRE_STUDY_JIT_COMPILE, &error);
- jit_stack = pcre_jit_stack_alloc(32*1024, 512*1024);
- /* Check for error (NULL) */
- pcre_assign_jit_stack(extra, NULL, jit_stack);
- rc = pcre_exec(re, extra, subject, length, 0, 0, ovector, 30);
- /* Check results */
- pcre_free(re);
- pcre_free_study(extra);
- pcre_jit_stack_free(jit_stack);
-
-
-JIT FAST PATH API
-
- Because the API described above falls back to interpreted execution
- when JIT is not available, it is convenient for programs that are writ-
- ten for general use in many environments. However, calling JIT via
- pcre_exec() does have a performance impact. Programs that are written
- for use where JIT is known to be available, and which need the best
- possible performance, can instead use a "fast path" API to call JIT
- execution directly instead of calling pcre_exec() (obviously only for
- patterns that have been successfully studied by JIT).
-
- The fast path function is called pcre_jit_exec(), and it takes exactly
- the same arguments as pcre_exec(), plus one additional argument that
- must point to a JIT stack. The JIT stack arrangements described above
- do not apply. The return values are the same as for pcre_exec().
-
- When you call pcre_exec(), as well as testing for invalid options, a
- number of other sanity checks are performed on the arguments. For exam-
- ple, if the subject pointer is NULL, or its length is negative, an
- immediate error is given. Also, unless PCRE_NO_UTF[8|16|32] is set, a
- UTF subject string is tested for validity. In the interests of speed,
- these checks do not happen on the JIT fast path, and if invalid data is
- passed, the result is undefined.
-
- Bypassing the sanity checks and the pcre_exec() wrapping can give
- speedups of more than 10%.
-
- Note that the pcre_jit_exec() function is not available in versions of
- PCRE before 8.32 (released in November 2012). If you need to support
- versions that old you must either use the slower pcre_exec(), or switch
- between the two codepaths by checking the values of PCRE_MAJOR and
- PCRE_MINOR.
-
- Due to an unfortunate implementation oversight, even in versions 8.32
- and later there will be no pcre_jit_exec() stub function defined when
- PCRE is compiled with --disable-jit, which is the default, and there's
- no way to detect whether PCRE was compiled with --enable-jit via a
- macro.
-
- If you need to support versions older than 8.32, or versions that may
- not build with --enable-jit, you must either use the slower
- pcre_exec(), or switch between the two codepaths by checking the values
- of PCRE_MAJOR and PCRE_MINOR.
-
- Switching between the two by checking the version assumes that all the
- versions being targeted are built with --enable-jit. To also support
- builds that may use --disable-jit either pcre_exec() must be used, or a
- compile-time check for JIT via pcre_config() (which assumes the runtime
- environment will be the same), or as the Git project decided to do,
- simply assume that pcre_jit_exec() is present in 8.32 or later unless a
- compile-time flag is provided, see the "grep: un-break building with
- PCRE >= 8.32 without --enable-jit" commit in git.git for an example of
- that.
-
-
-SEE ALSO
-
- pcreapi(3)
-
-
-AUTHOR
-
- Philip Hazel (FAQ by Zoltan Herczeg)
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 05 July 2017
- Copyright (c) 1997-2017 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCREPARTIAL(3) Library Functions Manual PCREPARTIAL(3)
-
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
-PARTIAL MATCHING IN PCRE
-
- In normal use of PCRE, if the subject string that is passed to a match-
- ing function matches as far as it goes, but is too short to match the
- entire pattern, PCRE_ERROR_NOMATCH is returned. There are circumstances
- where it might be helpful to distinguish this case from other cases in
- which there is no match.
-
- Consider, for example, an application where a human is required to type
- in data for a field with specific formatting requirements. An example
- might be a date in the form ddmmmyy, defined by this pattern:
-
- ^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$
-
- If the application sees the user's keystrokes one by one, and can check
- that what has been typed so far is potentially valid, it is able to
- raise an error as soon as a mistake is made, by beeping and not
- reflecting the character that has been typed, for example. This immedi-
- ate feedback is likely to be a better user interface than a check that
- is delayed until the entire string has been entered. Partial matching
- can also be useful when the subject string is very long and is not all
- available at once.
-
- PCRE supports partial matching by means of the PCRE_PARTIAL_SOFT and
- PCRE_PARTIAL_HARD options, which can be set when calling any of the
- matching functions. For backwards compatibility, PCRE_PARTIAL is a syn-
- onym for PCRE_PARTIAL_SOFT. The essential difference between the two
- options is whether or not a partial match is preferred to an alterna-
- tive complete match, though the details differ between the two types of
- matching function. If both options are set, PCRE_PARTIAL_HARD takes
- precedence.
-
- If you want to use partial matching with just-in-time optimized code,
- you must call pcre_study(), pcre16_study() or pcre32_study() with one
- or both of these options:
-
- PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE
- PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE
-
- PCRE_STUDY_JIT_COMPILE should also be set if you are going to run non-
- partial matches on the same pattern. If the appropriate JIT study mode
- has not been set for a match, the interpretive matching code is used.
-
- Setting a partial matching option disables two of PCRE's standard opti-
- mizations. PCRE remembers the last literal data unit in a pattern, and
- abandons matching immediately if it is not present in the subject
- string. This optimization cannot be used for a subject string that
- might match only partially. If the pattern was studied, PCRE knows the
- minimum length of a matching string, and does not bother to run the
- matching function on shorter strings. This optimization is also dis-
- abled for partial matching.
-
-
-PARTIAL MATCHING USING pcre_exec() OR pcre[16|32]_exec()
-
- A partial match occurs during a call to pcre_exec() or
- pcre[16|32]_exec() when the end of the subject string is reached suc-
- cessfully, but matching cannot continue because more characters are
- needed. However, at least one character in the subject must have been
- inspected. This character need not form part of the final matched
- string; lookbehind assertions and the \K escape sequence provide ways
- of inspecting characters before the start of a matched substring. The
- requirement for inspecting at least one character exists because an
- empty string can always be matched; without such a restriction there
- would always be a partial match of an empty string at the end of the
- subject.
-
- If there are at least two slots in the offsets vector when a partial
- match is returned, the first slot is set to the offset of the earliest
- character that was inspected. For convenience, the second offset points
- to the end of the subject so that a substring can easily be identified.
- If there are at least three slots in the offsets vector, the third slot
- is set to the offset of the character where matching started.
-
- For the majority of patterns, the contents of the first and third slots
- will be the same. However, for patterns that contain lookbehind asser-
- tions, or begin with \b or \B, characters before the one where matching
- started may have been inspected while carrying out the match. For exam-
- ple, consider this pattern:
-
- /(?<=abc)123/
-
- This pattern matches "123", but only if it is preceded by "abc". If the
- subject string is "xyzabc12", the first two offsets after a partial
- match are for the substring "abc12", because all these characters were
- inspected. However, the third offset is set to 6, because that is the
- offset where matching began.
-
- What happens when a partial match is identified depends on which of the
- two partial matching options are set.
-
- PCRE_PARTIAL_SOFT WITH pcre_exec() OR pcre[16|32]_exec()
-
- If PCRE_PARTIAL_SOFT is set when pcre_exec() or pcre[16|32]_exec()
- identifies a partial match, the partial match is remembered, but match-
- ing continues as normal, and other alternatives in the pattern are
- tried. If no complete match can be found, PCRE_ERROR_PARTIAL is
- returned instead of PCRE_ERROR_NOMATCH.
-
- This option is "soft" because it prefers a complete match over a par-
- tial match. All the various matching items in a pattern behave as if
- the subject string is potentially complete. For example, \z, \Z, and $
- match at the end of the subject, as normal, and for \b and \B the end
- of the subject is treated as a non-alphanumeric.
-
- If there is more than one partial match, the first one that was found
- provides the data that is returned. Consider this pattern:
-
- /123\w+X|dogY/
-
- If this is matched against the subject string "abc123dog", both alter-
- natives fail to match, but the end of the subject is reached during
- matching, so PCRE_ERROR_PARTIAL is returned. The offsets are set to 3
- and 9, identifying "123dog" as the first partial match that was found.
- (In this example, there are two partial matches, because "dog" on its
- own partially matches the second alternative.)
-
- PCRE_PARTIAL_HARD WITH pcre_exec() OR pcre[16|32]_exec()
-
- If PCRE_PARTIAL_HARD is set for pcre_exec() or pcre[16|32]_exec(),
- PCRE_ERROR_PARTIAL is returned as soon as a partial match is found,
- without continuing to search for possible complete matches. This option
- is "hard" because it prefers an earlier partial match over a later com-
- plete match. For this reason, the assumption is made that the end of
- the supplied subject string may not be the true end of the available
- data, and so, if \z, \Z, \b, \B, or $ are encountered at the end of the
- subject, the result is PCRE_ERROR_PARTIAL, provided that at least one
- character in the subject has been inspected.
-
- Setting PCRE_PARTIAL_HARD also affects the way UTF-8 and UTF-16 subject
- strings are checked for validity. Normally, an invalid sequence causes
- the error PCRE_ERROR_BADUTF8 or PCRE_ERROR_BADUTF16. However, in the
- special case of a truncated character at the end of the subject,
- PCRE_ERROR_SHORTUTF8 or PCRE_ERROR_SHORTUTF16 is returned when
- PCRE_PARTIAL_HARD is set.
-
- Comparing hard and soft partial matching
-
- The difference between the two partial matching options can be illus-
- trated by a pattern such as:
-
- /dog(sbody)?/
-
- This matches either "dog" or "dogsbody", greedily (that is, it prefers
- the longer string if possible). If it is matched against the string
- "dog" with PCRE_PARTIAL_SOFT, it yields a complete match for "dog".
- However, if PCRE_PARTIAL_HARD is set, the result is PCRE_ERROR_PARTIAL.
- On the other hand, if the pattern is made ungreedy the result is dif-
- ferent:
-
- /dog(sbody)??/
-
- In this case the result is always a complete match because that is
- found first, and matching never continues after finding a complete
- match. It might be easier to follow this explanation by thinking of the
- two patterns like this:
-
- /dog(sbody)?/ is the same as /dogsbody|dog/
- /dog(sbody)??/ is the same as /dog|dogsbody/
-
- The second pattern will never match "dogsbody", because it will always
- find the shorter match first.
-
-
-PARTIAL MATCHING USING pcre_dfa_exec() OR pcre[16|32]_dfa_exec()
-
- The DFA functions move along the subject string character by character,
- without backtracking, searching for all possible matches simultane-
- ously. If the end of the subject is reached before the end of the pat-
- tern, there is the possibility of a partial match, again provided that
- at least one character has been inspected.
-
- When PCRE_PARTIAL_SOFT is set, PCRE_ERROR_PARTIAL is returned only if
- there have been no complete matches. Otherwise, the complete matches
- are returned. However, if PCRE_PARTIAL_HARD is set, a partial match
- takes precedence over any complete matches. The portion of the string
- that was inspected when the longest partial match was found is set as
- the first matching string, provided there are at least two slots in the
- offsets vector.
-
- Because the DFA functions always search for all possible matches, and
- there is no difference between greedy and ungreedy repetition, their
- behaviour is different from the standard functions when PCRE_PAR-
- TIAL_HARD is set. Consider the string "dog" matched against the
- ungreedy pattern shown above:
-
- /dog(sbody)??/
-
- Whereas the standard functions stop as soon as they find the complete
- match for "dog", the DFA functions also find the partial match for
- "dogsbody", and so return that when PCRE_PARTIAL_HARD is set.
-
-
-PARTIAL MATCHING AND WORD BOUNDARIES
-
- If a pattern ends with one of sequences \b or \B, which test for word
- boundaries, partial matching with PCRE_PARTIAL_SOFT can give counter-
- intuitive results. Consider this pattern:
-
- /\bcat\b/
-
- This matches "cat", provided there is a word boundary at either end. If
- the subject string is "the cat", the comparison of the final "t" with a
- following character cannot take place, so a partial match is found.
- However, normal matching carries on, and \b matches at the end of the
- subject when the last character is a letter, so a complete match is
- found. The result, therefore, is not PCRE_ERROR_PARTIAL. Using
- PCRE_PARTIAL_HARD in this case does yield PCRE_ERROR_PARTIAL, because
- then the partial match takes precedence.
-
-
-FORMERLY RESTRICTED PATTERNS
-
- For releases of PCRE prior to 8.00, because of the way certain internal
- optimizations were implemented in the pcre_exec() function, the
- PCRE_PARTIAL option (predecessor of PCRE_PARTIAL_SOFT) could not be
- used with all patterns. From release 8.00 onwards, the restrictions no
- longer apply, and partial matching with can be requested for any pat-
- tern.
-
- Items that were formerly restricted were repeated single characters and
- repeated metasequences. If PCRE_PARTIAL was set for a pattern that did
- not conform to the restrictions, pcre_exec() returned the error code
- PCRE_ERROR_BADPARTIAL (-13). This error code is no longer in use. The
- PCRE_INFO_OKPARTIAL call to pcre_fullinfo() to find out if a compiled
- pattern can be used for partial matching now always returns 1.
-
-
-EXAMPLE OF PARTIAL MATCHING USING PCRETEST
-
- If the escape sequence \P is present in a pcretest data line, the
- PCRE_PARTIAL_SOFT option is used for the match. Here is a run of
- pcretest that uses the date example quoted above:
-
- re> /^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$/
- data> 25jun04\P
- 0: 25jun04
- 1: jun
- data> 25dec3\P
- Partial match: 23dec3
- data> 3ju\P
- Partial match: 3ju
- data> 3juj\P
- No match
- data> j\P
- No match
-
- The first data string is matched completely, so pcretest shows the
- matched substrings. The remaining four strings do not match the com-
- plete pattern, but the first two are partial matches. Similar output is
- obtained if DFA matching is used.
-
- If the escape sequence \P is present more than once in a pcretest data
- line, the PCRE_PARTIAL_HARD option is set for the match.
-
-
-MULTI-SEGMENT MATCHING WITH pcre_dfa_exec() OR pcre[16|32]_dfa_exec()
-
- When a partial match has been found using a DFA matching function, it
- is possible to continue the match by providing additional subject data
- and calling the function again with the same compiled regular expres-
- sion, this time setting the PCRE_DFA_RESTART option. You must pass the
- same working space as before, because this is where details of the pre-
- vious partial match are stored. Here is an example using pcretest,
- using the \R escape sequence to set the PCRE_DFA_RESTART option (\D
- specifies the use of the DFA matching function):
-
- re> /^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$/
- data> 23ja\P\D
- Partial match: 23ja
- data> n05\R\D
- 0: n05
-
- The first call has "23ja" as the subject, and requests partial match-
- ing; the second call has "n05" as the subject for the continued
- (restarted) match. Notice that when the match is complete, only the
- last part is shown; PCRE does not retain the previously partially-
- matched string. It is up to the calling program to do that if it needs
- to.
-
- That means that, for an unanchored pattern, if a continued match fails,
- it is not possible to try again at a new starting point. All this
- facility is capable of doing is continuing with the previous match
- attempt. In the previous example, if the second set of data is "ug23"
- the result is no match, even though there would be a match for "aug23"
- if the entire string were given at once. Depending on the application,
- this may or may not be what you want. The only way to allow for start-
- ing again at the next character is to retain the matched part of the
- subject and try a new complete match.
-
- You can set the PCRE_PARTIAL_SOFT or PCRE_PARTIAL_HARD options with
- PCRE_DFA_RESTART to continue partial matching over multiple segments.
- This facility can be used to pass very long subject strings to the DFA
- matching functions.
-
-
-MULTI-SEGMENT MATCHING WITH pcre_exec() OR pcre[16|32]_exec()
-
- From release 8.00, the standard matching functions can also be used to
- do multi-segment matching. Unlike the DFA functions, it is not possible
- to restart the previous match with a new segment of data. Instead, new
- data must be added to the previous subject string, and the entire match
- re-run, starting from the point where the partial match occurred. Ear-
- lier data can be discarded.
-
- It is best to use PCRE_PARTIAL_HARD in this situation, because it does
- not treat the end of a segment as the end of the subject when matching
- \z, \Z, \b, \B, and $. Consider an unanchored pattern that matches
- dates:
-
- re> /\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d/
- data> The date is 23ja\P\P
- Partial match: 23ja
-
- At this stage, an application could discard the text preceding "23ja",
- add on text from the next segment, and call the matching function
- again. Unlike the DFA matching functions, the entire matching string
- must always be available, and the complete matching process occurs for
- each call, so more memory and more processing time is needed.
-
- Note: If the pattern contains lookbehind assertions, or \K, or starts
- with \b or \B, the string that is returned for a partial match includes
- characters that precede the start of what would be returned for a com-
- plete match, because it contains all the characters that were inspected
- during the partial match.
-
-
-ISSUES WITH MULTI-SEGMENT MATCHING
-
- Certain types of pattern may give problems with multi-segment matching,
- whichever matching function is used.
-
- 1. If the pattern contains a test for the beginning of a line, you need
- to pass the PCRE_NOTBOL option when the subject string for any call
- does start at the beginning of a line. There is also a PCRE_NOTEOL
- option, but in practice when doing multi-segment matching you should be
- using PCRE_PARTIAL_HARD, which includes the effect of PCRE_NOTEOL.
-
- 2. Lookbehind assertions that have already been obeyed are catered for
- in the offsets that are returned for a partial match. However a lookbe-
- hind assertion later in the pattern could require even earlier charac-
- ters to be inspected. You can handle this case by using the
- PCRE_INFO_MAXLOOKBEHIND option of the pcre_fullinfo() or
- pcre[16|32]_fullinfo() functions to obtain the length of the longest
- lookbehind in the pattern. This length is given in characters, not
- bytes. If you always retain at least that many characters before the
- partially matched string, all should be well. (Of course, near the
- start of the subject, fewer characters may be present; in that case all
- characters should be retained.)
-
- From release 8.33, there is a more accurate way of deciding which char-
- acters to retain. Instead of subtracting the length of the longest
- lookbehind from the earliest inspected character (offsets[0]), the
- match start position (offsets[2]) should be used, and the next match
- attempt started at the offsets[2] character by setting the startoffset
- argument of pcre_exec() or pcre_dfa_exec().
-
- For example, if the pattern "(?<=123)abc" is partially matched against
- the string "xx123a", the three offset values returned are 2, 6, and 5.
- This indicates that the matching process that gave a partial match
- started at offset 5, but the characters "123a" were all inspected. The
- maximum lookbehind for that pattern is 3, so taking that away from 5
- shows that we need only keep "123a", and the next match attempt can be
- started at offset 3 (that is, at "a") when further characters have been
- added. When the match start is not the earliest inspected character,
- pcretest shows it explicitly:
-
- re> "(?<=123)abc"
- data> xx123a\P\P
- Partial match at offset 5: 123a
-
- 3. Because a partial match must always contain at least one character,
- what might be considered a partial match of an empty string actually
- gives a "no match" result. For example:
-
- re> /c(?<=abc)x/
- data> ab\P
- No match
-
- If the next segment begins "cx", a match should be found, but this will
- only happen if characters from the previous segment are retained. For
- this reason, a "no match" result should be interpreted as "partial
- match of an empty string" when the pattern contains lookbehinds.
-
- 4. Matching a subject string that is split into multiple segments may
- not always produce exactly the same result as matching over one single
- long string, especially when PCRE_PARTIAL_SOFT is used. The section
- "Partial Matching and Word Boundaries" above describes an issue that
- arises if the pattern ends with \b or \B. Another kind of difference
- may occur when there are multiple matching possibilities, because (for
- PCRE_PARTIAL_SOFT) a partial match result is given only when there are
- no completed matches. This means that as soon as the shortest match has
- been found, continuation to a new subject segment is no longer possi-
- ble. Consider again this pcretest example:
-
- re> /dog(sbody)?/
- data> dogsb\P
- 0: dog
- data> do\P\D
- Partial match: do
- data> gsb\R\P\D
- 0: g
- data> dogsbody\D
- 0: dogsbody
- 1: dog
-
- The first data line passes the string "dogsb" to a standard matching
- function, setting the PCRE_PARTIAL_SOFT option. Although the string is
- a partial match for "dogsbody", the result is not PCRE_ERROR_PARTIAL,
- because the shorter string "dog" is a complete match. Similarly, when
- the subject is presented to a DFA matching function in several parts
- ("do" and "gsb" being the first two) the match stops when "dog" has
- been found, and it is not possible to continue. On the other hand, if
- "dogsbody" is presented as a single string, a DFA matching function
- finds both matches.
-
- Because of these problems, it is best to use PCRE_PARTIAL_HARD when
- matching multi-segment data. The example above then behaves differ-
- ently:
-
- re> /dog(sbody)?/
- data> dogsb\P\P
- Partial match: dogsb
- data> do\P\D
- Partial match: do
- data> gsb\R\P\P\D
- Partial match: gsb
-
- 5. Patterns that contain alternatives at the top level which do not all
- start with the same pattern item may not work as expected when
- PCRE_DFA_RESTART is used. For example, consider this pattern:
-
- 1234|3789
-
- If the first part of the subject is "ABC123", a partial match of the
- first alternative is found at offset 3. There is no partial match for
- the second alternative, because such a match does not start at the same
- point in the subject string. Attempting to continue with the string
- "7890" does not yield a match because only those alternatives that
- match at one point in the subject are remembered. The problem arises
- because the start of the second alternative matches within the first
- alternative. There is no problem with anchored patterns or patterns
- such as:
-
- 1234|ABCD
-
- where no string can be a partial match for both alternatives. This is
- not a problem if a standard matching function is used, because the
- entire match has to be rerun each time:
-
- re> /1234|3789/
- data> ABC123\P\P
- Partial match: 123
- data> 1237890
- 0: 3789
-
- Of course, instead of using PCRE_DFA_RESTART, the same technique of re-
- running the entire match can also be used with the DFA matching func-
- tions. Another possibility is to work with two buffers. If a partial
- match at offset n in the first buffer is followed by "no match" when
- PCRE_DFA_RESTART is used on the second buffer, you can then try a new
- match starting at offset n+1 in the first buffer.
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 02 July 2013
- Copyright (c) 1997-2013 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCREPRECOMPILE(3) Library Functions Manual PCREPRECOMPILE(3)
-
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
-SAVING AND RE-USING PRECOMPILED PCRE PATTERNS
-
- If you are running an application that uses a large number of regular
- expression patterns, it may be useful to store them in a precompiled
- form instead of having to compile them every time the application is
- run. If you are not using any private character tables (see the
- pcre_maketables() documentation), this is relatively straightforward.
- If you are using private tables, it is a little bit more complicated.
- However, if you are using the just-in-time optimization feature, it is
- not possible to save and reload the JIT data.
-
- If you save compiled patterns to a file, you can copy them to a differ-
- ent host and run them there. If the two hosts have different endianness
- (byte order), you should run the pcre[16|32]_pat-
- tern_to_host_byte_order() function on the new host before trying to
- match the pattern. The matching functions return PCRE_ERROR_BADENDIAN-
- NESS if they detect a pattern with the wrong endianness.
-
- Compiling regular expressions with one version of PCRE for use with a
- different version is not guaranteed to work and may cause crashes, and
- saving and restoring a compiled pattern loses any JIT optimization
- data.
-
-
-SAVING A COMPILED PATTERN
-
- The value returned by pcre[16|32]_compile() points to a single block of
- memory that holds the compiled pattern and associated data. You can
- find the length of this block in bytes by calling
- pcre[16|32]_fullinfo() with an argument of PCRE_INFO_SIZE. You can then
- save the data in any appropriate manner. Here is sample code for the
- 8-bit library that compiles a pattern and writes it to a file. It
- assumes that the variable fd refers to a file that is open for output:
-
- int erroroffset, rc, size;
- char *error;
- pcre *re;
-
- re = pcre_compile("my pattern", 0, &error, &erroroffset, NULL);
- if (re == NULL) { ... handle errors ... }
- rc = pcre_fullinfo(re, NULL, PCRE_INFO_SIZE, &size);
- if (rc < 0) { ... handle errors ... }
- rc = fwrite(re, 1, size, fd);
- if (rc != size) { ... handle errors ... }
-
- In this example, the bytes that comprise the compiled pattern are
- copied exactly. Note that this is binary data that may contain any of
- the 256 possible byte values. On systems that make a distinction
- between binary and non-binary data, be sure that the file is opened for
- binary output.
-
- If you want to write more than one pattern to a file, you will have to
- devise a way of separating them. For binary data, preceding each pat-
- tern with its length is probably the most straightforward approach.
- Another possibility is to write out the data in hexadecimal instead of
- binary, one pattern to a line.
-
- Saving compiled patterns in a file is only one possible way of storing
- them for later use. They could equally well be saved in a database, or
- in the memory of some daemon process that passes them via sockets to
- the processes that want them.
-
- If the pattern has been studied, it is also possible to save the normal
- study data in a similar way to the compiled pattern itself. However, if
- the PCRE_STUDY_JIT_COMPILE was used, the just-in-time data that is cre-
- ated cannot be saved because it is too dependent on the current envi-
- ronment. When studying generates additional information,
- pcre[16|32]_study() returns a pointer to a pcre[16|32]_extra data
- block. Its format is defined in the section on matching a pattern in
- the pcreapi documentation. The study_data field points to the binary
- study data, and this is what you must save (not the pcre[16|32]_extra
- block itself). The length of the study data can be obtained by calling
- pcre[16|32]_fullinfo() with an argument of PCRE_INFO_STUDYSIZE. Remem-
- ber to check that pcre[16|32]_study() did return a non-NULL value
- before trying to save the study data.
-
-
-RE-USING A PRECOMPILED PATTERN
-
- Re-using a precompiled pattern is straightforward. Having reloaded it
- into main memory, called pcre[16|32]_pattern_to_host_byte_order() if
- necessary, you pass its pointer to pcre[16|32]_exec() or
- pcre[16|32]_dfa_exec() in the usual way.
-
- However, if you passed a pointer to custom character tables when the
- pattern was compiled (the tableptr argument of pcre[16|32]_compile()),
- you must now pass a similar pointer to pcre[16|32]_exec() or
- pcre[16|32]_dfa_exec(), because the value saved with the compiled pat-
- tern will obviously be nonsense. A field in a pcre[16|32]_extra() block
- is used to pass this data, as described in the section on matching a
- pattern in the pcreapi documentation.
-
- Warning: The tables that pcre_exec() and pcre_dfa_exec() use must be
- the same as those that were used when the pattern was compiled. If this
- is not the case, the behaviour is undefined.
-
- If you did not provide custom character tables when the pattern was
- compiled, the pointer in the compiled pattern is NULL, which causes the
- matching functions to use PCRE's internal tables. Thus, you do not need
- to take any special action at run time in this case.
-
- If you saved study data with the compiled pattern, you need to create
- your own pcre[16|32]_extra data block and set the study_data field to
- point to the reloaded study data. You must also set the
- PCRE_EXTRA_STUDY_DATA bit in the flags field to indicate that study
- data is present. Then pass the pcre[16|32]_extra block to the matching
- function in the usual way. If the pattern was studied for just-in-time
- optimization, that data cannot be saved, and so is lost by a
- save/restore cycle.
-
-
-COMPATIBILITY WITH DIFFERENT PCRE RELEASES
-
- In general, it is safest to recompile all saved patterns when you
- update to a new PCRE release, though not all updates actually require
- this.
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 12 November 2013
- Copyright (c) 1997-2013 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCREPERFORM(3) Library Functions Manual PCREPERFORM(3)
-
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
-PCRE PERFORMANCE
-
- Two aspects of performance are discussed below: memory usage and pro-
- cessing time. The way you express your pattern as a regular expression
- can affect both of them.
-
-
-COMPILED PATTERN MEMORY USAGE
-
- Patterns are compiled by PCRE into a reasonably efficient interpretive
- code, so that most simple patterns do not use much memory. However,
- there is one case where the memory usage of a compiled pattern can be
- unexpectedly large. If a parenthesized subpattern has a quantifier with
- a minimum greater than 1 and/or a limited maximum, the whole subpattern
- is repeated in the compiled code. For example, the pattern
-
- (abc|def){2,4}
-
- is compiled as if it were
-
- (abc|def)(abc|def)((abc|def)(abc|def)?)?
-
- (Technical aside: It is done this way so that backtrack points within
- each of the repetitions can be independently maintained.)
-
- For regular expressions whose quantifiers use only small numbers, this
- is not usually a problem. However, if the numbers are large, and par-
- ticularly if such repetitions are nested, the memory usage can become
- an embarrassment. For example, the very simple pattern
-
- ((ab){1,1000}c){1,3}
-
- uses 51K bytes when compiled using the 8-bit library. When PCRE is com-
- piled with its default internal pointer size of two bytes, the size
- limit on a compiled pattern is 64K data units, and this is reached with
- the above pattern if the outer repetition is increased from 3 to 4.
- PCRE can be compiled to use larger internal pointers and thus handle
- larger compiled patterns, but it is better to try to rewrite your pat-
- tern to use less memory if you can.
-
- One way of reducing the memory usage for such patterns is to make use
- of PCRE's "subroutine" facility. Re-writing the above pattern as
-
- ((ab)(?2){0,999}c)(?1){0,2}
-
- reduces the memory requirements to 18K, and indeed it remains under 20K
- even with the outer repetition increased to 100. However, this pattern
- is not exactly equivalent, because the "subroutine" calls are treated
- as atomic groups into which there can be no backtracking if there is a
- subsequent matching failure. Therefore, PCRE cannot do this kind of
- rewriting automatically. Furthermore, there is a noticeable loss of
- speed when executing the modified pattern. Nevertheless, if the atomic
- grouping is not a problem and the loss of speed is acceptable, this
- kind of rewriting will allow you to process patterns that PCRE cannot
- otherwise handle.
-
-
-STACK USAGE AT RUN TIME
-
- When pcre_exec() or pcre[16|32]_exec() is used for matching, certain
- kinds of pattern can cause it to use large amounts of the process
- stack. In some environments the default process stack is quite small,
- and if it runs out the result is often SIGSEGV. This issue is probably
- the most frequently raised problem with PCRE. Rewriting your pattern
- can often help. The pcrestack documentation discusses this issue in
- detail.
-
-
-PROCESSING TIME
-
- Certain items in regular expression patterns are processed more effi-
- ciently than others. It is more efficient to use a character class like
- [aeiou] than a set of single-character alternatives such as
- (a|e|i|o|u). In general, the simplest construction that provides the
- required behaviour is usually the most efficient. Jeffrey Friedl's book
- contains a lot of useful general discussion about optimizing regular
- expressions for efficient performance. This document contains a few
- observations about PCRE.
-
- Using Unicode character properties (the \p, \P, and \X escapes) is
- slow, because PCRE has to use a multi-stage table lookup whenever it
- needs a character's property. If you can find an alternative pattern
- that does not use character properties, it will probably be faster.
-
- By default, the escape sequences \b, \d, \s, and \w, and the POSIX
- character classes such as [:alpha:] do not use Unicode properties,
- partly for backwards compatibility, and partly for performance reasons.
- However, you can set PCRE_UCP if you want Unicode character properties
- to be used. This can double the matching time for items such as \d,
- when matched with a traditional matching function; the performance loss
- is less with a DFA matching function, and in both cases there is not
- much difference for \b.
-
- When a pattern begins with .* not in parentheses, or in parentheses
- that are not the subject of a backreference, and the PCRE_DOTALL option
- is set, the pattern is implicitly anchored by PCRE, since it can match
- only at the start of a subject string. However, if PCRE_DOTALL is not
- set, PCRE cannot make this optimization, because the . metacharacter
- does not then match a newline, and if the subject string contains new-
- lines, the pattern may match from the character immediately following
- one of them instead of from the very start. For example, the pattern
-
- .*second
-
- matches the subject "first\nand second" (where \n stands for a newline
- character), with the match starting at the seventh character. In order
- to do this, PCRE has to retry the match starting after every newline in
- the subject.
-
- If you are using such a pattern with subject strings that do not con-
- tain newlines, the best performance is obtained by setting PCRE_DOTALL,
- or starting the pattern with ^.* or ^.*? to indicate explicit anchor-
- ing. That saves PCRE from having to scan along the subject looking for
- a newline to restart at.
-
- Beware of patterns that contain nested indefinite repeats. These can
- take a long time to run when applied to a string that does not match.
- Consider the pattern fragment
-
- ^(a+)*
-
- This can match "aaaa" in 16 different ways, and this number increases
- very rapidly as the string gets longer. (The * repeat can match 0, 1,
- 2, 3, or 4 times, and for each of those cases other than 0 or 4, the +
- repeats can match different numbers of times.) When the remainder of
- the pattern is such that the entire match is going to fail, PCRE has in
- principle to try every possible variation, and this can take an
- extremely long time, even for relatively short strings.
-
- An optimization catches some of the more simple cases such as
-
- (a+)*b
-
- where a literal character follows. Before embarking on the standard
- matching procedure, PCRE checks that there is a "b" later in the sub-
- ject string, and if there is not, it fails the match immediately. How-
- ever, when there is no following literal this optimization cannot be
- used. You can see the difference by comparing the behaviour of
-
- (a+)*\d
-
- with the pattern above. The former gives a failure almost instantly
- when applied to a whole line of "a" characters, whereas the latter
- takes an appreciable time with strings longer than about 20 characters.
-
- In many cases, the solution to this kind of performance issue is to use
- an atomic group or a possessive quantifier.
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 25 August 2012
- Copyright (c) 1997-2012 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCREPOSIX(3) Library Functions Manual PCREPOSIX(3)
-
-
-
-NAME
- PCRE - Perl-compatible regular expressions.
-
-SYNOPSIS
-
- #include <pcreposix.h>
-
- int regcomp(regex_t *preg, const char *pattern,
- int cflags);
-
- int regexec(regex_t *preg, const char *string,
- size_t nmatch, regmatch_t pmatch[], int eflags);
- size_t regerror(int errcode, const regex_t *preg,
- char *errbuf, size_t errbuf_size);
-
- void regfree(regex_t *preg);
-
-
-DESCRIPTION
-
- This set of functions provides a POSIX-style API for the PCRE regular
- expression 8-bit library. See the pcreapi documentation for a descrip-
- tion of PCRE's native API, which contains much additional functional-
- ity. There is no POSIX-style wrapper for PCRE's 16-bit and 32-bit
- library.
-
- The functions described here are just wrapper functions that ultimately
- call the PCRE native API. Their prototypes are defined in the
- pcreposix.h header file, and on Unix systems the library itself is
- called pcreposix.a, so can be accessed by adding -lpcreposix to the
- command for linking an application that uses them. Because the POSIX
- functions call the native ones, it is also necessary to add -lpcre.
-
- I have implemented only those POSIX option bits that can be reasonably
- mapped to PCRE native options. In addition, the option REG_EXTENDED is
- defined with the value zero. This has no effect, but since programs
- that are written to the POSIX interface often use it, this makes it
- easier to slot in PCRE as a replacement library. Other POSIX options
- are not even defined.
-
- There are also some other options that are not defined by POSIX. These
- have been added at the request of users who want to make use of certain
- PCRE-specific features via the POSIX calling interface.
-
- When PCRE is called via these functions, it is only the API that is
- POSIX-like in style. The syntax and semantics of the regular expres-
- sions themselves are still those of Perl, subject to the setting of
- various PCRE options, as described below. "POSIX-like in style" means
- that the API approximates to the POSIX definition; it is not fully
- POSIX-compatible, and in multi-byte encoding domains it is probably
- even less compatible.
-
- The header for these functions is supplied as pcreposix.h to avoid any
- potential clash with other POSIX libraries. It can, of course, be
- renamed or aliased as regex.h, which is the "correct" name. It provides
- two structure types, regex_t for compiled internal forms, and reg-
- match_t for returning captured substrings. It also defines some con-
- stants whose names start with "REG_"; these are used for setting
- options and identifying error codes.
-
-
-COMPILING A PATTERN
-
- The function regcomp() is called to compile a pattern into an internal
- form. The pattern is a C string terminated by a binary zero, and is
- passed in the argument pattern. The preg argument is a pointer to a
- regex_t structure that is used as a base for storing information about
- the compiled regular expression.
-
- The argument cflags is either zero, or contains one or more of the bits
- defined by the following macros:
-
- REG_DOTALL
-
- The PCRE_DOTALL option is set when the regular expression is passed for
- compilation to the native function. Note that REG_DOTALL is not part of
- the POSIX standard.
-
- REG_ICASE
-
- The PCRE_CASELESS option is set when the regular expression is passed
- for compilation to the native function.
-
- REG_NEWLINE
-
- The PCRE_MULTILINE option is set when the regular expression is passed
- for compilation to the native function. Note that this does not mimic
- the defined POSIX behaviour for REG_NEWLINE (see the following sec-
- tion).
-
- REG_NOSUB
-
- The PCRE_NO_AUTO_CAPTURE option is set when the regular expression is
- passed for compilation to the native function. In addition, when a pat-
- tern that is compiled with this flag is passed to regexec() for match-
- ing, the nmatch and pmatch arguments are ignored, and no captured
- strings are returned.
-
- REG_UCP
-
- The PCRE_UCP option is set when the regular expression is passed for
- compilation to the native function. This causes PCRE to use Unicode
- properties when matchine \d, \w, etc., instead of just recognizing
- ASCII values. Note that REG_UTF8 is not part of the POSIX standard.
-
- REG_UNGREEDY
-
- The PCRE_UNGREEDY option is set when the regular expression is passed
- for compilation to the native function. Note that REG_UNGREEDY is not
- part of the POSIX standard.
-
- REG_UTF8
-
- The PCRE_UTF8 option is set when the regular expression is passed for
- compilation to the native function. This causes the pattern itself and
- all data strings used for matching it to be treated as UTF-8 strings.
- Note that REG_UTF8 is not part of the POSIX standard.
-
- In the absence of these flags, no options are passed to the native
- function. This means the the regex is compiled with PCRE default
- semantics. In particular, the way it handles newline characters in the
- subject string is the Perl way, not the POSIX way. Note that setting
- PCRE_MULTILINE has only some of the effects specified for REG_NEWLINE.
- It does not affect the way newlines are matched by . (they are not) or
- by a negative class such as [^a] (they are).
-
- The yield of regcomp() is zero on success, and non-zero otherwise. The
- preg structure is filled in on success, and one member of the structure
- is public: re_nsub contains the number of capturing subpatterns in the
- regular expression. Various error codes are defined in the header file.
-
- NOTE: If the yield of regcomp() is non-zero, you must not attempt to
- use the contents of the preg structure. If, for example, you pass it to
- regexec(), the result is undefined and your program is likely to crash.
-
-
-MATCHING NEWLINE CHARACTERS
-
- This area is not simple, because POSIX and Perl take different views of
- things. It is not possible to get PCRE to obey POSIX semantics, but
- then PCRE was never intended to be a POSIX engine. The following table
- lists the different possibilities for matching newline characters in
- PCRE:
-
- Default Change with
-
- . matches newline no PCRE_DOTALL
- newline matches [^a] yes not changeable
- $ matches \n at end yes PCRE_DOLLARENDONLY
- $ matches \n in middle no PCRE_MULTILINE
- ^ matches \n in middle no PCRE_MULTILINE
-
- This is the equivalent table for POSIX:
-
- Default Change with
-
- . matches newline yes REG_NEWLINE
- newline matches [^a] yes REG_NEWLINE
- $ matches \n at end no REG_NEWLINE
- $ matches \n in middle no REG_NEWLINE
- ^ matches \n in middle no REG_NEWLINE
-
- PCRE's behaviour is the same as Perl's, except that there is no equiva-
- lent for PCRE_DOLLAR_ENDONLY in Perl. In both PCRE and Perl, there is
- no way to stop newline from matching [^a].
-
- The default POSIX newline handling can be obtained by setting
- PCRE_DOTALL and PCRE_DOLLAR_ENDONLY, but there is no way to make PCRE
- behave exactly as for the REG_NEWLINE action.
-
-
-MATCHING A PATTERN
-
- The function regexec() is called to match a compiled pattern preg
- against a given string, which is by default terminated by a zero byte
- (but see REG_STARTEND below), subject to the options in eflags. These
- can be:
-
- REG_NOTBOL
-
- The PCRE_NOTBOL option is set when calling the underlying PCRE matching
- function.
-
- REG_NOTEMPTY
-
- The PCRE_NOTEMPTY option is set when calling the underlying PCRE match-
- ing function. Note that REG_NOTEMPTY is not part of the POSIX standard.
- However, setting this option can give more POSIX-like behaviour in some
- situations.
-
- REG_NOTEOL
-
- The PCRE_NOTEOL option is set when calling the underlying PCRE matching
- function.
-
- REG_STARTEND
-
- The string is considered to start at string + pmatch[0].rm_so and to
- have a terminating NUL located at string + pmatch[0].rm_eo (there need
- not actually be a NUL at that location), regardless of the value of
- nmatch. This is a BSD extension, compatible with but not specified by
- IEEE Standard 1003.2 (POSIX.2), and should be used with caution in
- software intended to be portable to other systems. Note that a non-zero
- rm_so does not imply REG_NOTBOL; REG_STARTEND affects only the location
- of the string, not how it is matched.
-
- If the pattern was compiled with the REG_NOSUB flag, no data about any
- matched strings is returned. The nmatch and pmatch arguments of
- regexec() are ignored.
-
- If the value of nmatch is zero, or if the value pmatch is NULL, no data
- about any matched strings is returned.
-
- Otherwise,the portion of the string that was matched, and also any cap-
- tured substrings, are returned via the pmatch argument, which points to
- an array of nmatch structures of type regmatch_t, containing the mem-
- bers rm_so and rm_eo. These contain the offset to the first character
- of each substring and the offset to the first character after the end
- of each substring, respectively. The 0th element of the vector relates
- to the entire portion of string that was matched; subsequent elements
- relate to the capturing subpatterns of the regular expression. Unused
- entries in the array have both structure members set to -1.
-
- A successful match yields a zero return; various error codes are
- defined in the header file, of which REG_NOMATCH is the "expected"
- failure code.
-
-
-ERROR MESSAGES
-
- The regerror() function maps a non-zero errorcode from either regcomp()
- or regexec() to a printable message. If preg is not NULL, the error
- should have arisen from the use of that structure. A message terminated
- by a binary zero is placed in errbuf. The length of the message,
- including the zero, is limited to errbuf_size. The yield of the func-
- tion is the size of buffer needed to hold the whole message.
-
-
-MEMORY USAGE
-
- Compiling a regular expression causes memory to be allocated and asso-
- ciated with the preg structure. The function regfree() frees all such
- memory, after which preg may no longer be used as a compiled expres-
- sion.
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 09 January 2012
- Copyright (c) 1997-2012 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCRECPP(3) Library Functions Manual PCRECPP(3)
-
-
-
-NAME
- PCRE - Perl-compatible regular expressions.
-
-SYNOPSIS OF C++ WRAPPER
-
- #include <pcrecpp.h>
-
-
-DESCRIPTION
-
- The C++ wrapper for PCRE was provided by Google Inc. Some additional
- functionality was added by Giuseppe Maxia. This brief man page was con-
- structed from the notes in the pcrecpp.h file, which should be con-
- sulted for further details. Note that the C++ wrapper supports only the
- original 8-bit PCRE library. There is no 16-bit or 32-bit support at
- present.
-
-
-MATCHING INTERFACE
-
- The "FullMatch" operation checks that supplied text matches a supplied
- pattern exactly. If pointer arguments are supplied, it copies matched
- sub-strings that match sub-patterns into them.
-
- Example: successful match
- pcrecpp::RE re("h.*o");
- re.FullMatch("hello");
-
- Example: unsuccessful match (requires full match):
- pcrecpp::RE re("e");
- !re.FullMatch("hello");
-
- Example: creating a temporary RE object:
- pcrecpp::RE("h.*o").FullMatch("hello");
-
- You can pass in a "const char*" or a "string" for "text". The examples
- below tend to use a const char*. You can, as in the different examples
- above, store the RE object explicitly in a variable or use a temporary
- RE object. The examples below use one mode or the other arbitrarily.
- Either could correctly be used for any of these examples.
-
- You must supply extra pointer arguments to extract matched subpieces.
-
- Example: extracts "ruby" into "s" and 1234 into "i"
- int i;
- string s;
- pcrecpp::RE re("(\\w+):(\\d+)");
- re.FullMatch("ruby:1234", &s, &i);
-
- Example: does not try to extract any extra sub-patterns
- re.FullMatch("ruby:1234", &s);
-
- Example: does not try to extract into NULL
- re.FullMatch("ruby:1234", NULL, &i);
-
- Example: integer overflow causes failure
- !re.FullMatch("ruby:1234567891234", NULL, &i);
-
- Example: fails because there aren't enough sub-patterns:
- !pcrecpp::RE("\\w+:\\d+").FullMatch("ruby:1234", &s);
-
- Example: fails because string cannot be stored in integer
- !pcrecpp::RE("(.*)").FullMatch("ruby", &i);
-
- The provided pointer arguments can be pointers to any scalar numeric
- type, or one of:
-
- string (matched piece is copied to string)
- StringPiece (StringPiece is mutated to point to matched piece)
- T (where "bool T::ParseFrom(const char*, int)" exists)
- NULL (the corresponding matched sub-pattern is not copied)
-
- The function returns true iff all of the following conditions are sat-
- isfied:
-
- a. "text" matches "pattern" exactly;
-
- b. The number of matched sub-patterns is >= number of supplied
- pointers;
-
- c. The "i"th argument has a suitable type for holding the
- string captured as the "i"th sub-pattern. If you pass in
- void * NULL for the "i"th argument, or a non-void * NULL
- of the correct type, or pass fewer arguments than the
- number of sub-patterns, "i"th captured sub-pattern is
- ignored.
-
- CAVEAT: An optional sub-pattern that does not exist in the matched
- string is assigned the empty string. Therefore, the following will
- return false (because the empty string is not a valid number):
-
- int number;
- pcrecpp::RE::FullMatch("abc", "[a-z]+(\\d+)?", &number);
-
- The matching interface supports at most 16 arguments per call. If you
- need more, consider using the more general interface
- pcrecpp::RE::DoMatch. See pcrecpp.h for the signature for DoMatch.
-
- NOTE: Do not use no_arg, which is used internally to mark the end of a
- list of optional arguments, as a placeholder for missing arguments, as
- this can lead to segfaults.
-
-
-QUOTING METACHARACTERS
-
- You can use the "QuoteMeta" operation to insert backslashes before all
- potentially meaningful characters in a string. The returned string,
- used as a regular expression, will exactly match the original string.
-
- Example:
- string quoted = RE::QuoteMeta(unquoted);
-
- Note that it's legal to escape a character even if it has no special
- meaning in a regular expression -- so this function does that. (This
- also makes it identical to the perl function of the same name; see
- "perldoc -f quotemeta".) For example, "1.5-2.0?" becomes
- "1\.5\-2\.0\?".
-
-
-PARTIAL MATCHES
-
- You can use the "PartialMatch" operation when you want the pattern to
- match any substring of the text.
-
- Example: simple search for a string:
- pcrecpp::RE("ell").PartialMatch("hello");
-
- Example: find first number in a string:
- int number;
- pcrecpp::RE re("(\\d+)");
- re.PartialMatch("x*100 + 20", &number);
- assert(number == 100);
-
-
-UTF-8 AND THE MATCHING INTERFACE
-
- By default, pattern and text are plain text, one byte per character.
- The UTF8 flag, passed to the constructor, causes both pattern and
- string to be treated as UTF-8 text, still a byte stream but potentially
- multiple bytes per character. In practice, the text is likelier to be
- UTF-8 than the pattern, but the match returned may depend on the UTF8
- flag, so always use it when matching UTF8 text. For example, "." will
- match one byte normally but with UTF8 set may match up to three bytes
- of a multi-byte character.
-
- Example:
- pcrecpp::RE_Options options;
- options.set_utf8();
- pcrecpp::RE re(utf8_pattern, options);
- re.FullMatch(utf8_string);
-
- Example: using the convenience function UTF8():
- pcrecpp::RE re(utf8_pattern, pcrecpp::UTF8());
- re.FullMatch(utf8_string);
-
- NOTE: The UTF8 flag is ignored if pcre was not configured with the
- --enable-utf8 flag.
-
-
-PASSING MODIFIERS TO THE REGULAR EXPRESSION ENGINE
-
- PCRE defines some modifiers to change the behavior of the regular
- expression engine. The C++ wrapper defines an auxiliary class,
- RE_Options, as a vehicle to pass such modifiers to a RE class. Cur-
- rently, the following modifiers are supported:
-
- modifier description Perl corresponding
-
- PCRE_CASELESS case insensitive match /i
- PCRE_MULTILINE multiple lines match /m
- PCRE_DOTALL dot matches newlines /s
- PCRE_DOLLAR_ENDONLY $ matches only at end N/A
- PCRE_EXTRA strict escape parsing N/A
- PCRE_EXTENDED ignore white spaces /x
- PCRE_UTF8 handles UTF8 chars built-in
- PCRE_UNGREEDY reverses * and *? N/A
- PCRE_NO_AUTO_CAPTURE disables capturing parens N/A (*)
-
- (*) Both Perl and PCRE allow non capturing parentheses by means of the
- "?:" modifier within the pattern itself. e.g. (?:ab|cd) does not cap-
- ture, while (ab|cd) does.
-
- For a full account on how each modifier works, please check the PCRE
- API reference page.
-
- For each modifier, there are two member functions whose name is made
- out of the modifier in lowercase, without the "PCRE_" prefix. For
- instance, PCRE_CASELESS is handled by
-
- bool caseless()
-
- which returns true if the modifier is set, and
-
- RE_Options & set_caseless(bool)
-
- which sets or unsets the modifier. Moreover, PCRE_EXTRA_MATCH_LIMIT can
- be accessed through the set_match_limit() and match_limit() member
- functions. Setting match_limit to a non-zero value will limit the exe-
- cution of pcre to keep it from doing bad things like blowing the stack
- or taking an eternity to return a result. A value of 5000 is good
- enough to stop stack blowup in a 2MB thread stack. Setting match_limit
- to zero disables match limiting. Alternatively, you can call
- match_limit_recursion() which uses PCRE_EXTRA_MATCH_LIMIT_RECURSION to
- limit how much PCRE recurses. match_limit() limits the number of
- matches PCRE does; match_limit_recursion() limits the depth of internal
- recursion, and therefore the amount of stack that is used.
-
- Normally, to pass one or more modifiers to a RE class, you declare a
- RE_Options object, set the appropriate options, and pass this object to
- a RE constructor. Example:
-
- RE_Options opt;
- opt.set_caseless(true);
- if (RE("HELLO", opt).PartialMatch("hello world")) ...
-
- RE_options has two constructors. The default constructor takes no argu-
- ments and creates a set of flags that are off by default. The optional
- parameter option_flags is to facilitate transfer of legacy code from C
- programs. This lets you do
-
- RE(pattern,
- RE_Options(PCRE_CASELESS|PCRE_MULTILINE)).PartialMatch(str);
-
- However, new code is better off doing
-
- RE(pattern,
- RE_Options().set_caseless(true).set_multiline(true))
- .PartialMatch(str);
-
- If you are going to pass one of the most used modifiers, there are some
- convenience functions that return a RE_Options class with the appropri-
- ate modifier already set: CASELESS(), UTF8(), MULTILINE(), DOTALL(),
- and EXTENDED().
-
- If you need to set several options at once, and you don't want to go
- through the pains of declaring a RE_Options object and setting several
- options, there is a parallel method that give you such ability on the
- fly. You can concatenate several set_xxxxx() member functions, since
- each of them returns a reference to its class object. For example, to
- pass PCRE_CASELESS, PCRE_EXTENDED, and PCRE_MULTILINE to a RE with one
- statement, you may write:
-
- RE(" ^ xyz \\s+ .* blah$",
- RE_Options()
- .set_caseless(true)
- .set_extended(true)
- .set_multiline(true)).PartialMatch(sometext);
-
-
-SCANNING TEXT INCREMENTALLY
-
- The "Consume" operation may be useful if you want to repeatedly match
- regular expressions at the front of a string and skip over them as they
- match. This requires use of the "StringPiece" type, which represents a
- sub-range of a real string. Like RE, StringPiece is defined in the
- pcrecpp namespace.
-
- Example: read lines of the form "var = value" from a string.
- string contents = ...; // Fill string somehow
- pcrecpp::StringPiece input(contents); // Wrap in a StringPiece
-
- string var;
- int value;
- pcrecpp::RE re("(\\w+) = (\\d+)\n");
- while (re.Consume(&input, &var, &value)) {
- ...;
- }
-
- Each successful call to "Consume" will set "var/value", and also
- advance "input" so it points past the matched text.
-
- The "FindAndConsume" operation is similar to "Consume" but does not
- anchor your match at the beginning of the string. For example, you
- could extract all words from a string by repeatedly calling
-
- pcrecpp::RE("(\\w+)").FindAndConsume(&input, &word)
-
-
-PARSING HEX/OCTAL/C-RADIX NUMBERS
-
- By default, if you pass a pointer to a numeric value, the corresponding
- text is interpreted as a base-10 number. You can instead wrap the
- pointer with a call to one of the operators Hex(), Octal(), or CRadix()
- to interpret the text in another base. The CRadix operator interprets
- C-style "0" (base-8) and "0x" (base-16) prefixes, but defaults to
- base-10.
-
- Example:
- int a, b, c, d;
- pcrecpp::RE re("(.*) (.*) (.*) (.*)");
- re.FullMatch("100 40 0100 0x40",
- pcrecpp::Octal(&a), pcrecpp::Hex(&b),
- pcrecpp::CRadix(&c), pcrecpp::CRadix(&d));
-
- will leave 64 in a, b, c, and d.
-
-
-REPLACING PARTS OF STRINGS
-
- You can replace the first match of "pattern" in "str" with "rewrite".
- Within "rewrite", backslash-escaped digits (\1 to \9) can be used to
- insert text matching corresponding parenthesized group from the pat-
- tern. \0 in "rewrite" refers to the entire matching text. For example:
-
- string s = "yabba dabba doo";
- pcrecpp::RE("b+").Replace("d", &s);
-
- will leave "s" containing "yada dabba doo". The result is true if the
- pattern matches and a replacement occurs, false otherwise.
-
- GlobalReplace is like Replace except that it replaces all occurrences
- of the pattern in the string with the rewrite. Replacements are not
- subject to re-matching. For example:
-
- string s = "yabba dabba doo";
- pcrecpp::RE("b+").GlobalReplace("d", &s);
-
- will leave "s" containing "yada dada doo". It returns the number of
- replacements made.
-
- Extract is like Replace, except that if the pattern matches, "rewrite"
- is copied into "out" (an additional argument) with substitutions. The
- non-matching portions of "text" are ignored. Returns true iff a match
- occurred and the extraction happened successfully; if no match occurs,
- the string is left unaffected.
-
-
-AUTHOR
-
- The C++ wrapper was contributed by Google Inc.
- Copyright (c) 2007 Google Inc.
-
-
-REVISION
-
- Last updated: 08 January 2012
-------------------------------------------------------------------------------
-
-
-PCRESAMPLE(3) Library Functions Manual PCRESAMPLE(3)
-
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
-PCRE SAMPLE PROGRAM
-
- A simple, complete demonstration program, to get you started with using
- PCRE, is supplied in the file pcredemo.c in the PCRE distribution. A
- listing of this program is given in the pcredemo documentation. If you
- do not have a copy of the PCRE distribution, you can save this listing
- to re-create pcredemo.c.
-
- The demonstration program, which uses the original PCRE 8-bit library,
- compiles the regular expression that is its first argument, and matches
- it against the subject string in its second argument. No PCRE options
- are set, and default character tables are used. If matching succeeds,
- the program outputs the portion of the subject that matched, together
- with the contents of any captured substrings.
-
- If the -g option is given on the command line, the program then goes on
- to check for further matches of the same regular expression in the same
- subject string. The logic is a little bit tricky because of the possi-
- bility of matching an empty string. Comments in the code explain what
- is going on.
-
- If PCRE is installed in the standard include and library directories
- for your operating system, you should be able to compile the demonstra-
- tion program using this command:
-
- gcc -o pcredemo pcredemo.c -lpcre
-
- If PCRE is installed elsewhere, you may need to add additional options
- to the command line. For example, on a Unix-like system that has PCRE
- installed in /usr/local, you can compile the demonstration program
- using a command like this:
-
- gcc -o pcredemo -I/usr/local/include pcredemo.c \
- -L/usr/local/lib -lpcre
-
- In a Windows environment, if you want to statically link the program
- against a non-dll pcre.a file, you must uncomment the line that defines
- PCRE_STATIC before including pcre.h, because otherwise the pcre_mal-
- loc() and pcre_free() exported functions will be declared
- __declspec(dllimport), with unwanted results.
-
- Once you have compiled and linked the demonstration program, you can
- run simple tests like this:
-
- ./pcredemo 'cat|dog' 'the cat sat on the mat'
- ./pcredemo -g 'cat|dog' 'the dog sat on the cat'
-
- Note that there is a much more comprehensive test program, called
- pcretest, which supports many more facilities for testing regular
- expressions and both PCRE libraries. The pcredemo program is provided
- as a simple coding example.
-
- If you try to run pcredemo when PCRE is not installed in the standard
- library directory, you may get an error like this on some operating
- systems (e.g. Solaris):
-
- ld.so.1: a.out: fatal: libpcre.so.0: open failed: No such file or
- directory
-
- This is caused by the way shared library support works on those sys-
- tems. You need to add
-
- -R/usr/local/lib
-
- (for example) to the compile command to get round this problem.
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 10 January 2012
- Copyright (c) 1997-2012 University of Cambridge.
-------------------------------------------------------------------------------
-PCRELIMITS(3) Library Functions Manual PCRELIMITS(3)
-
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
-SIZE AND OTHER LIMITATIONS
-
- There are some size limitations in PCRE but it is hoped that they will
- never in practice be relevant.
-
- The maximum length of a compiled pattern is approximately 64K data
- units (bytes for the 8-bit library, 16-bit units for the 16-bit
- library, and 32-bit units for the 32-bit library) if PCRE is compiled
- with the default internal linkage size, which is 2 bytes for the 8-bit
- and 16-bit libraries, and 4 bytes for the 32-bit library. If you want
- to process regular expressions that are truly enormous, you can compile
- PCRE with an internal linkage size of 3 or 4 (when building the 16-bit
- or 32-bit library, 3 is rounded up to 4). See the README file in the
- source distribution and the pcrebuild documentation for details. In
- these cases the limit is substantially larger. However, the speed of
- execution is slower.
-
- All values in repeating quantifiers must be less than 65536.
-
- There is no limit to the number of parenthesized subpatterns, but there
- can be no more than 65535 capturing subpatterns. There is, however, a
- limit to the depth of nesting of parenthesized subpatterns of all
- kinds. This is imposed in order to limit the amount of system stack
- used at compile time. The limit can be specified when PCRE is built;
- the default is 250.
-
- There is a limit to the number of forward references to subsequent sub-
- patterns of around 200,000. Repeated forward references with fixed
- upper limits, for example, (?2){0,100} when subpattern number 2 is to
- the right, are included in the count. There is no limit to the number
- of backward references.
-
- 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 name in a (*MARK), (*PRUNE), (*SKIP), or
- (*THEN) verb is 255 for the 8-bit library and 65535 for the 16-bit and
- 32-bit libraries.
-
- The maximum length of a subject string is the largest positive number
- that an integer variable can hold. However, when using the traditional
- matching function, PCRE uses recursion to handle subpatterns and indef-
- inite 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.
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 05 November 2013
- Copyright (c) 1997-2013 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCRESTACK(3) Library Functions Manual PCRESTACK(3)
-
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
-PCRE DISCUSSION OF STACK USAGE
-
- When you call pcre[16|32]_exec(), it makes use of an internal function
- called match(). This calls itself recursively at branch points in the
- pattern, in order to remember the state of the match so that it can
- back up and try a different alternative if the first one fails. As
- matching proceeds deeper and deeper into the tree of possibilities, the
- recursion depth increases. The match() function is also called in other
- circumstances, for example, whenever a parenthesized sub-pattern is
- entered, and in certain cases of repetition.
-
- Not all calls of match() increase the recursion depth; for an item such
- as a* it may be called several times at the same level, after matching
- different numbers of a's. Furthermore, in a number of cases where the
- result of the recursive call would immediately be passed back as the
- result of the current call (a "tail recursion"), the function is just
- restarted instead.
-
- The above comments apply when pcre[16|32]_exec() is run in its normal
- interpretive manner. If the pattern was studied with the
- PCRE_STUDY_JIT_COMPILE option, and just-in-time compiling was success-
- ful, and the options passed to pcre[16|32]_exec() were not incompati-
- ble, the matching process uses the JIT-compiled code instead of the
- match() function. In this case, the memory requirements are handled
- entirely differently. See the pcrejit documentation for details.
-
- The pcre[16|32]_dfa_exec() function operates in an entirely different
- way, and uses recursion only when there is a regular expression recur-
- sion or subroutine call in the pattern. This includes the processing of
- assertion and "once-only" subpatterns, which are handled like subrou-
- tine calls. Normally, these are never very deep, and the limit on the
- complexity of pcre[16|32]_dfa_exec() is controlled by the amount of
- workspace it is given. However, it is possible to write patterns with
- runaway infinite recursions; such patterns will cause
- pcre[16|32]_dfa_exec() to run out of stack. At present, there is no
- protection against this.
-
- The comments that follow do NOT apply to pcre[16|32]_dfa_exec(); they
- are relevant only for pcre[16|32]_exec() without the JIT optimization.
-
- Reducing pcre[16|32]_exec()'s stack usage
-
- Each time that match() is actually called recursively, it uses memory
- from the process stack. For certain kinds of pattern and data, very
- large amounts of stack may be needed, despite the recognition of "tail
- recursion". You can often reduce the amount of recursion, and there-
- fore the amount of stack used, by modifying the pattern that is being
- matched. Consider, for example, this pattern:
-
- ([^<]|<(?!inet))+
-
- It matches from wherever it starts until it encounters "<inet" or the
- end of the data, and is the kind of pattern that might be used when
- processing an XML file. Each iteration of the outer parentheses matches
- either one character that is not "<" or a "<" that is not followed by
- "inet". However, each time a parenthesis is processed, a recursion
- occurs, so this formulation uses a stack frame for each matched charac-
- ter. For a long string, a lot of stack is required. Consider now this
- rewritten pattern, which matches exactly the same strings:
-
- ([^<]++|<(?!inet))+
-
- This uses very much less stack, because runs of characters that do not
- contain "<" are "swallowed" in one item inside the parentheses. Recur-
- sion happens only when a "<" character that is not followed by "inet"
- is encountered (and we assume this is relatively rare). A possessive
- quantifier is used to stop any backtracking into the runs of non-"<"
- characters, but that is not related to stack usage.
-
- This example shows that one way of avoiding stack problems when match-
- ing long subject strings is to write repeated parenthesized subpatterns
- to match more than one character whenever possible.
-
- Compiling PCRE to use heap instead of stack for pcre[16|32]_exec()
-
- In environments where stack memory is constrained, you might want to
- compile PCRE to use heap memory instead of stack for remembering back-
- up points when pcre[16|32]_exec() is running. This makes it run a lot
- more slowly, however. Details of how to do this are given in the pcre-
- build documentation. When built in this way, instead of using the
- stack, PCRE obtains and frees memory by calling the functions that are
- pointed to by the pcre[16|32]_stack_malloc and pcre[16|32]_stack_free
- variables. By default, these point to malloc() and free(), but you can
- replace the pointers to cause PCRE to use your own functions. Since the
- block sizes are always the same, and are always freed in reverse order,
- it may be possible to implement customized memory handlers that are
- more efficient than the standard functions.
-
- Limiting pcre[16|32]_exec()'s stack usage
-
- You can set limits on the number of times that match() is called, both
- in total and recursively. If a limit is exceeded, pcre[16|32]_exec()
- returns an error code. Setting suitable limits should prevent it from
- running out of stack. The default values of the limits are very large,
- and unlikely ever to operate. They can be changed when PCRE is built,
- and they can also be set when pcre[16|32]_exec() is called. For details
- of these interfaces, see the pcrebuild documentation and the section on
- extra data for pcre[16|32]_exec() in the pcreapi documentation.
-
- As a very rough rule of thumb, you should reckon on about 500 bytes per
- recursion. Thus, if you want to limit your stack usage to 8Mb, you
- should set the limit at 16000 recursions. A 64Mb stack, on the other
- hand, can support around 128000 recursions.
-
- In Unix-like environments, the pcretest test program has a command line
- option (-S) that can be used to increase the size of its stack. As long
- as the stack is large enough, another option (-M) can be used to find
- the smallest limits that allow a particular pattern to match a given
- subject string. This is done by calling pcre[16|32]_exec() repeatedly
- with different limits.
-
- Obtaining an estimate of stack usage
-
- The actual amount of stack used per recursion can vary quite a lot,
- depending on the compiler that was used to build PCRE and the optimiza-
- tion or debugging options that were set for it. The rule of thumb value
- of 500 bytes mentioned above may be larger or smaller than what is
- actually needed. A better approximation can be obtained by running this
- command:
-
- pcretest -m -C
-
- The -C option causes pcretest to output information about the options
- with which PCRE was compiled. When -m is also given (before -C), infor-
- mation about stack use is given in a line like this:
-
- Match recursion uses stack: approximate frame size = 640 bytes
-
- The value is approximate because some recursions need a bit more (up to
- perhaps 16 more bytes).
-
- If the above command is given when PCRE is compiled to use the heap
- instead of the stack for recursion, the value that is output is the
- size of each block that is obtained from the heap.
-
- Changing stack size in Unix-like systems
-
- In Unix-like environments, there is not often a problem with the stack
- unless very long strings are involved, though the default limit on
- stack size varies from system to system. Values from 8Mb to 64Mb are
- common. You can find your default limit by running the command:
-
- ulimit -s
-
- Unfortunately, the effect of running out of stack is often SIGSEGV,
- though sometimes a more explicit error message is given. You can nor-
- mally increase the limit on stack size by code such as this:
-
- struct rlimit rlim;
- getrlimit(RLIMIT_STACK, &rlim);
- rlim.rlim_cur = 100*1024*1024;
- setrlimit(RLIMIT_STACK, &rlim);
-
- This reads the current limits (soft and hard) using getrlimit(), then
- attempts to increase the soft limit to 100Mb using setrlimit(). You
- must do this before calling pcre[16|32]_exec().
-
- Changing stack size in Mac OS X
-
- Using setrlimit(), as described above, should also work on Mac OS X. It
- is also possible to set a stack size when linking a program. There is a
- discussion about stack sizes in Mac OS X at this web site:
- http://developer.apple.com/qa/qa2005/qa1419.html.
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 24 June 2012
- Copyright (c) 1997-2012 University of Cambridge.
-------------------------------------------------------------------------------
-
-
diff --git a/libs/Pcre16/docs/doc/pcre16.3 b/libs/Pcre16/docs/doc/pcre16.3
deleted file mode 100644
index 85126a6792..0000000000
--- a/libs/Pcre16/docs/doc/pcre16.3
+++ /dev/null
@@ -1,371 +0,0 @@
-.TH PCRE 3 "12 May 2013" "PCRE 8.33"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.sp
-.B #include <pcre.h>
-.
-.
-.SH "PCRE 16-BIT API BASIC FUNCTIONS"
-.rs
-.sp
-.nf
-.B pcre16 *pcre16_compile(PCRE_SPTR16 \fIpattern\fP, int \fIoptions\fP,
-.B " const char **\fIerrptr\fP, int *\fIerroffset\fP,"
-.B " const unsigned char *\fItableptr\fP);"
-.sp
-.B pcre16 *pcre16_compile2(PCRE_SPTR16 \fIpattern\fP, int \fIoptions\fP,
-.B " int *\fIerrorcodeptr\fP,"
-.B " const char **\fIerrptr\fP, int *\fIerroffset\fP,"
-.B " const unsigned char *\fItableptr\fP);"
-.sp
-.B pcre16_extra *pcre16_study(const pcre16 *\fIcode\fP, int \fIoptions\fP,
-.B " const char **\fIerrptr\fP);"
-.sp
-.B void pcre16_free_study(pcre16_extra *\fIextra\fP);
-.sp
-.B int pcre16_exec(const pcre16 *\fIcode\fP, "const pcre16_extra *\fIextra\fP,"
-.B " PCRE_SPTR16 \fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
-.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);"
-.sp
-.B int pcre16_dfa_exec(const pcre16 *\fIcode\fP, "const pcre16_extra *\fIextra\fP,"
-.B " PCRE_SPTR16 \fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
-.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,"
-.B " int *\fIworkspace\fP, int \fIwscount\fP);"
-.fi
-.
-.
-.SH "PCRE 16-BIT API STRING EXTRACTION FUNCTIONS"
-.rs
-.sp
-.nf
-.B int pcre16_copy_named_substring(const pcre16 *\fIcode\fP,
-.B " PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP,"
-.B " int \fIstringcount\fP, PCRE_SPTR16 \fIstringname\fP,"
-.B " PCRE_UCHAR16 *\fIbuffer\fP, int \fIbuffersize\fP);"
-.sp
-.B int pcre16_copy_substring(PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP,
-.B " int \fIstringcount\fP, int \fIstringnumber\fP, PCRE_UCHAR16 *\fIbuffer\fP,"
-.B " int \fIbuffersize\fP);"
-.sp
-.B int pcre16_get_named_substring(const pcre16 *\fIcode\fP,
-.B " PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP,"
-.B " int \fIstringcount\fP, PCRE_SPTR16 \fIstringname\fP,"
-.B " PCRE_SPTR16 *\fIstringptr\fP);"
-.sp
-.B int pcre16_get_stringnumber(const pcre16 *\fIcode\fP,
-.B " PCRE_SPTR16 \fIname\fP);
-.sp
-.B int pcre16_get_stringtable_entries(const pcre16 *\fIcode\fP,
-.B " PCRE_SPTR16 \fIname\fP, PCRE_UCHAR16 **\fIfirst\fP, PCRE_UCHAR16 **\fIlast\fP);"
-.sp
-.B int pcre16_get_substring(PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP,
-.B " int \fIstringcount\fP, int \fIstringnumber\fP,"
-.B " PCRE_SPTR16 *\fIstringptr\fP);"
-.sp
-.B int pcre16_get_substring_list(PCRE_SPTR16 \fIsubject\fP,
-.B " int *\fIovector\fP, int \fIstringcount\fP, PCRE_SPTR16 **\fIlistptr\fP);"
-.sp
-.B void pcre16_free_substring(PCRE_SPTR16 \fIstringptr\fP);
-.sp
-.B void pcre16_free_substring_list(PCRE_SPTR16 *\fIstringptr\fP);
-.fi
-.
-.
-.SH "PCRE 16-BIT API AUXILIARY FUNCTIONS"
-.rs
-.sp
-.nf
-.B pcre16_jit_stack *pcre16_jit_stack_alloc(int \fIstartsize\fP, int \fImaxsize\fP);
-.sp
-.B void pcre16_jit_stack_free(pcre16_jit_stack *\fIstack\fP);
-.sp
-.B void pcre16_assign_jit_stack(pcre16_extra *\fIextra\fP,
-.B " pcre16_jit_callback \fIcallback\fP, void *\fIdata\fP);"
-.sp
-.B const unsigned char *pcre16_maketables(void);
-.sp
-.B int pcre16_fullinfo(const pcre16 *\fIcode\fP, "const pcre16_extra *\fIextra\fP,"
-.B " int \fIwhat\fP, void *\fIwhere\fP);"
-.sp
-.B int pcre16_refcount(pcre16 *\fIcode\fP, int \fIadjust\fP);
-.sp
-.B int pcre16_config(int \fIwhat\fP, void *\fIwhere\fP);
-.sp
-.B const char *pcre16_version(void);
-.sp
-.B int pcre16_pattern_to_host_byte_order(pcre16 *\fIcode\fP,
-.B " pcre16_extra *\fIextra\fP, const unsigned char *\fItables\fP);"
-.fi
-.
-.
-.SH "PCRE 16-BIT API INDIRECTED FUNCTIONS"
-.rs
-.sp
-.nf
-.B void *(*pcre16_malloc)(size_t);
-.sp
-.B void (*pcre16_free)(void *);
-.sp
-.B void *(*pcre16_stack_malloc)(size_t);
-.sp
-.B void (*pcre16_stack_free)(void *);
-.sp
-.B int (*pcre16_callout)(pcre16_callout_block *);
-.fi
-.
-.
-.SH "PCRE 16-BIT API 16-BIT-ONLY FUNCTION"
-.rs
-.sp
-.nf
-.B int pcre16_utf16_to_host_byte_order(PCRE_UCHAR16 *\fIoutput\fP,
-.B " PCRE_SPTR16 \fIinput\fP, int \fIlength\fP, int *\fIbyte_order\fP,"
-.B " int \fIkeep_boms\fP);"
-.fi
-.
-.
-.SH "THE PCRE 16-BIT LIBRARY"
-.rs
-.sp
-Starting with release 8.30, it is possible to compile a PCRE library that
-supports 16-bit character strings, including UTF-16 strings, as well as or
-instead of the original 8-bit library. The majority of the work to make this
-possible was done by Zoltan Herczeg. The two libraries contain identical sets
-of functions, used in exactly the same way. Only the names of the functions and
-the data types of their arguments and results are different. To avoid
-over-complication and reduce the documentation maintenance load, most of the
-PCRE documentation describes the 8-bit library, with only occasional references
-to the 16-bit library. This page describes what is different when you use the
-16-bit library.
-.P
-WARNING: A single application can be linked with both libraries, but you must
-take care when processing any particular pattern to use functions from just one
-library. For example, if you want to study a pattern that was compiled with
-\fBpcre16_compile()\fP, you must do so with \fBpcre16_study()\fP, not
-\fBpcre_study()\fP, and you must free the study data with
-\fBpcre16_free_study()\fP.
-.
-.
-.SH "THE HEADER FILE"
-.rs
-.sp
-There is only one header file, \fBpcre.h\fP. It contains prototypes for all the
-functions in all libraries, as well as definitions of flags, structures, error
-codes, etc.
-.
-.
-.SH "THE LIBRARY NAME"
-.rs
-.sp
-In Unix-like systems, the 16-bit library is called \fBlibpcre16\fP, and can
-normally be accesss by adding \fB-lpcre16\fP to the command for linking an
-application that uses PCRE.
-.
-.
-.SH "STRING TYPES"
-.rs
-.sp
-In the 8-bit library, strings are passed to PCRE library functions as vectors
-of bytes with the C type "char *". In the 16-bit library, strings are passed as
-vectors of unsigned 16-bit quantities. The macro PCRE_UCHAR16 specifies an
-appropriate data type, and PCRE_SPTR16 is defined as "const PCRE_UCHAR16 *". In
-very many environments, "short int" is a 16-bit data type. When PCRE is built,
-it defines PCRE_UCHAR16 as "unsigned short int", but checks that it really is a
-16-bit data type. If it is not, the build fails with an error message telling
-the maintainer to modify the definition appropriately.
-.
-.
-.SH "STRUCTURE TYPES"
-.rs
-.sp
-The types of the opaque structures that are used for compiled 16-bit patterns
-and JIT stacks are \fBpcre16\fP and \fBpcre16_jit_stack\fP respectively. The
-type of the user-accessible structure that is returned by \fBpcre16_study()\fP
-is \fBpcre16_extra\fP, and the type of the structure that is used for passing
-data to a callout function is \fBpcre16_callout_block\fP. These structures
-contain the same fields, with the same names, as their 8-bit counterparts. The
-only difference is that pointers to character strings are 16-bit instead of
-8-bit types.
-.
-.
-.SH "16-BIT FUNCTIONS"
-.rs
-.sp
-For every function in the 8-bit library there is a corresponding function in
-the 16-bit library with a name that starts with \fBpcre16_\fP instead of
-\fBpcre_\fP. The prototypes are listed above. In addition, there is one extra
-function, \fBpcre16_utf16_to_host_byte_order()\fP. This is a utility function
-that converts a UTF-16 character string to host byte order if necessary. The
-other 16-bit functions expect the strings they are passed to be in host byte
-order.
-.P
-The \fIinput\fP and \fIoutput\fP arguments of
-\fBpcre16_utf16_to_host_byte_order()\fP may point to the same address, that is,
-conversion in place is supported. The output buffer must be at least as long as
-the input.
-.P
-The \fIlength\fP argument specifies the number of 16-bit data units in the
-input string; a negative value specifies a zero-terminated string.
-.P
-If \fIbyte_order\fP is NULL, it is assumed that the string starts off in host
-byte order. This may be changed by byte-order marks (BOMs) anywhere in the
-string (commonly as the first character).
-.P
-If \fIbyte_order\fP is not NULL, a non-zero value of the integer to which it
-points means that the input starts off in host byte order, otherwise the
-opposite order is assumed. Again, BOMs in the string can change this. The final
-byte order is passed back at the end of processing.
-.P
-If \fIkeep_boms\fP is not zero, byte-order mark characters (0xfeff) are copied
-into the output string. Otherwise they are discarded.
-.P
-The result of the function is the number of 16-bit units placed into the output
-buffer, including the zero terminator if the string was zero-terminated.
-.
-.
-.SH "SUBJECT STRING OFFSETS"
-.rs
-.sp
-The lengths and starting offsets of subject strings must be specified in 16-bit
-data units, and the offsets within subject strings that are returned by the
-matching functions are in also 16-bit units rather than bytes.
-.
-.
-.SH "NAMED SUBPATTERNS"
-.rs
-.sp
-The name-to-number translation table that is maintained for named subpatterns
-uses 16-bit characters. The \fBpcre16_get_stringtable_entries()\fP function
-returns the length of each entry in the table as the number of 16-bit data
-units.
-.
-.
-.SH "OPTION NAMES"
-.rs
-.sp
-There are two new general option names, PCRE_UTF16 and PCRE_NO_UTF16_CHECK,
-which correspond to PCRE_UTF8 and PCRE_NO_UTF8_CHECK in the 8-bit library. In
-fact, these new options define the same bits in the options word. There is a
-discussion about the
-.\" HTML <a href="pcreunicode.html#utf16strings">
-.\" </a>
-validity of UTF-16 strings
-.\"
-in the
-.\" HREF
-\fBpcreunicode\fP
-.\"
-page.
-.P
-For the \fBpcre16_config()\fP function there is an option PCRE_CONFIG_UTF16
-that returns 1 if UTF-16 support is configured, otherwise 0. If this option is
-given to \fBpcre_config()\fP or \fBpcre32_config()\fP, or if the
-PCRE_CONFIG_UTF8 or PCRE_CONFIG_UTF32 option is given to \fBpcre16_config()\fP,
-the result is the PCRE_ERROR_BADOPTION error.
-.
-.
-.SH "CHARACTER CODES"
-.rs
-.sp
-In 16-bit mode, when PCRE_UTF16 is not set, character values are treated in the
-same way as in 8-bit, non UTF-8 mode, except, of course, that they can range
-from 0 to 0xffff instead of 0 to 0xff. Character types for characters less than
-0xff can therefore be influenced by the locale in the same way as before.
-Characters greater than 0xff have only one case, and no "type" (such as letter
-or digit).
-.P
-In UTF-16 mode, the character code is Unicode, in the range 0 to 0x10ffff, with
-the exception of values in the range 0xd800 to 0xdfff because those are
-"surrogate" values that are used in pairs to encode values greater than 0xffff.
-.P
-A UTF-16 string can indicate its endianness by special code knows as a
-byte-order mark (BOM). The PCRE functions do not handle this, expecting strings
-to be in host byte order. A utility function called
-\fBpcre16_utf16_to_host_byte_order()\fP is provided to help with this (see
-above).
-.
-.
-.SH "ERROR NAMES"
-.rs
-.sp
-The errors PCRE_ERROR_BADUTF16_OFFSET and PCRE_ERROR_SHORTUTF16 correspond to
-their 8-bit counterparts. The error PCRE_ERROR_BADMODE is given when a compiled
-pattern is passed to a function that processes patterns in the other
-mode, for example, if a pattern compiled with \fBpcre_compile()\fP is passed to
-\fBpcre16_exec()\fP.
-.P
-There are new error codes whose names begin with PCRE_UTF16_ERR for invalid
-UTF-16 strings, corresponding to the PCRE_UTF8_ERR codes for UTF-8 strings that
-are described in the section entitled
-.\" HTML <a href="pcreapi.html#badutf8reasons">
-.\" </a>
-"Reason codes for invalid UTF-8 strings"
-.\"
-in the main
-.\" HREF
-\fBpcreapi\fP
-.\"
-page. The UTF-16 errors are:
-.sp
- PCRE_UTF16_ERR1 Missing low surrogate at end of string
- PCRE_UTF16_ERR2 Invalid low surrogate follows high surrogate
- PCRE_UTF16_ERR3 Isolated low surrogate
- PCRE_UTF16_ERR4 Non-character
-.
-.
-.SH "ERROR TEXTS"
-.rs
-.sp
-If there is an error while compiling a pattern, the error text that is passed
-back by \fBpcre16_compile()\fP or \fBpcre16_compile2()\fP is still an 8-bit
-character string, zero-terminated.
-.
-.
-.SH "CALLOUTS"
-.rs
-.sp
-The \fIsubject\fP and \fImark\fP fields in the callout block that is passed to
-a callout function point to 16-bit vectors.
-.
-.
-.SH "TESTING"
-.rs
-.sp
-The \fBpcretest\fP program continues to operate with 8-bit input and output
-files, but it can be used for testing the 16-bit library. If it is run with the
-command line option \fB-16\fP, patterns and subject strings are converted from
-8-bit to 16-bit before being passed to PCRE, and the 16-bit library functions
-are used instead of the 8-bit ones. Returned 16-bit strings are converted to
-8-bit for output. If both the 8-bit and the 32-bit libraries were not compiled,
-\fBpcretest\fP defaults to 16-bit and the \fB-16\fP option is ignored.
-.P
-When PCRE is being built, the \fBRunTest\fP script that is called by "make
-check" uses the \fBpcretest\fP \fB-C\fP option to discover which of the 8-bit,
-16-bit and 32-bit libraries has been built, and runs the tests appropriately.
-.
-.
-.SH "NOT SUPPORTED IN 16-BIT MODE"
-.rs
-.sp
-Not all the features of the 8-bit library are available with the 16-bit
-library. The C++ and POSIX wrapper functions support only the 8-bit library,
-and the \fBpcregrep\fP program is at present 8-bit only.
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 12 May 2013
-Copyright (c) 1997-2013 University of Cambridge.
-.fi
diff --git a/libs/Pcre16/docs/doc/pcre32.3 b/libs/Pcre16/docs/doc/pcre32.3
deleted file mode 100644
index 7cde8c0877..0000000000
--- a/libs/Pcre16/docs/doc/pcre32.3
+++ /dev/null
@@ -1,369 +0,0 @@
-.TH PCRE 3 "12 May 2013" "PCRE 8.33"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.sp
-.B #include <pcre.h>
-.
-.
-.SH "PCRE 32-BIT API BASIC FUNCTIONS"
-.rs
-.sp
-.nf
-.B pcre32 *pcre32_compile(PCRE_SPTR32 \fIpattern\fP, int \fIoptions\fP,
-.B " const char **\fIerrptr\fP, int *\fIerroffset\fP,"
-.B " const unsigned char *\fItableptr\fP);"
-.sp
-.B pcre32 *pcre32_compile2(PCRE_SPTR32 \fIpattern\fP, int \fIoptions\fP,
-.B " int *\fIerrorcodeptr\fP,"
-.B " const unsigned char *\fItableptr\fP);"
-.sp
-.B pcre32_extra *pcre32_study(const pcre32 *\fIcode\fP, int \fIoptions\fP,
-.B " const char **\fIerrptr\fP);"
-.sp
-.B void pcre32_free_study(pcre32_extra *\fIextra\fP);
-.sp
-.B int pcre32_exec(const pcre32 *\fIcode\fP, "const pcre32_extra *\fIextra\fP,"
-.B " PCRE_SPTR32 \fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
-.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);"
-.sp
-.B int pcre32_dfa_exec(const pcre32 *\fIcode\fP, "const pcre32_extra *\fIextra\fP,"
-.B " PCRE_SPTR32 \fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
-.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,"
-.B " int *\fIworkspace\fP, int \fIwscount\fP);"
-.fi
-.
-.
-.SH "PCRE 32-BIT API STRING EXTRACTION FUNCTIONS"
-.rs
-.sp
-.nf
-.B int pcre32_copy_named_substring(const pcre32 *\fIcode\fP,
-.B " PCRE_SPTR32 \fIsubject\fP, int *\fIovector\fP,"
-.B " int \fIstringcount\fP, PCRE_SPTR32 \fIstringname\fP,"
-.B " PCRE_UCHAR32 *\fIbuffer\fP, int \fIbuffersize\fP);"
-.sp
-.B int pcre32_copy_substring(PCRE_SPTR32 \fIsubject\fP, int *\fIovector\fP,
-.B " int \fIstringcount\fP, int \fIstringnumber\fP, PCRE_UCHAR32 *\fIbuffer\fP,"
-.B " int \fIbuffersize\fP);"
-.sp
-.B int pcre32_get_named_substring(const pcre32 *\fIcode\fP,
-.B " PCRE_SPTR32 \fIsubject\fP, int *\fIovector\fP,"
-.B " int \fIstringcount\fP, PCRE_SPTR32 \fIstringname\fP,"
-.B " PCRE_SPTR32 *\fIstringptr\fP);"
-.sp
-.B int pcre32_get_stringnumber(const pcre32 *\fIcode\fP,
-.B " PCRE_SPTR32 \fIname\fP);"
-.sp
-.B int pcre32_get_stringtable_entries(const pcre32 *\fIcode\fP,
-.B " PCRE_SPTR32 \fIname\fP, PCRE_UCHAR32 **\fIfirst\fP, PCRE_UCHAR32 **\fIlast\fP);"
-.sp
-.B int pcre32_get_substring(PCRE_SPTR32 \fIsubject\fP, int *\fIovector\fP,
-.B " int \fIstringcount\fP, int \fIstringnumber\fP,"
-.B " PCRE_SPTR32 *\fIstringptr\fP);"
-.sp
-.B int pcre32_get_substring_list(PCRE_SPTR32 \fIsubject\fP,
-.B " int *\fIovector\fP, int \fIstringcount\fP, PCRE_SPTR32 **\fIlistptr\fP);"
-.sp
-.B void pcre32_free_substring(PCRE_SPTR32 \fIstringptr\fP);
-.sp
-.B void pcre32_free_substring_list(PCRE_SPTR32 *\fIstringptr\fP);
-.fi
-.
-.
-.SH "PCRE 32-BIT API AUXILIARY FUNCTIONS"
-.rs
-.sp
-.nf
-.B pcre32_jit_stack *pcre32_jit_stack_alloc(int \fIstartsize\fP, int \fImaxsize\fP);
-.sp
-.B void pcre32_jit_stack_free(pcre32_jit_stack *\fIstack\fP);
-.sp
-.B void pcre32_assign_jit_stack(pcre32_extra *\fIextra\fP,
-.B " pcre32_jit_callback \fIcallback\fP, void *\fIdata\fP);"
-.sp
-.B const unsigned char *pcre32_maketables(void);
-.sp
-.B int pcre32_fullinfo(const pcre32 *\fIcode\fP, "const pcre32_extra *\fIextra\fP,"
-.B " int \fIwhat\fP, void *\fIwhere\fP);"
-.sp
-.B int pcre32_refcount(pcre32 *\fIcode\fP, int \fIadjust\fP);
-.sp
-.B int pcre32_config(int \fIwhat\fP, void *\fIwhere\fP);
-.sp
-.B const char *pcre32_version(void);
-.sp
-.B int pcre32_pattern_to_host_byte_order(pcre32 *\fIcode\fP,
-.B " pcre32_extra *\fIextra\fP, const unsigned char *\fItables\fP);"
-.fi
-.
-.
-.SH "PCRE 32-BIT API INDIRECTED FUNCTIONS"
-.rs
-.sp
-.nf
-.B void *(*pcre32_malloc)(size_t);
-.sp
-.B void (*pcre32_free)(void *);
-.sp
-.B void *(*pcre32_stack_malloc)(size_t);
-.sp
-.B void (*pcre32_stack_free)(void *);
-.sp
-.B int (*pcre32_callout)(pcre32_callout_block *);
-.fi
-.
-.
-.SH "PCRE 32-BIT API 32-BIT-ONLY FUNCTION"
-.rs
-.sp
-.nf
-.B int pcre32_utf32_to_host_byte_order(PCRE_UCHAR32 *\fIoutput\fP,
-.B " PCRE_SPTR32 \fIinput\fP, int \fIlength\fP, int *\fIbyte_order\fP,"
-.B " int \fIkeep_boms\fP);"
-.fi
-.
-.
-.SH "THE PCRE 32-BIT LIBRARY"
-.rs
-.sp
-Starting with release 8.32, it is possible to compile a PCRE library that
-supports 32-bit character strings, including UTF-32 strings, as well as or
-instead of the original 8-bit library. This work was done by Christian Persch,
-based on the work done by Zoltan Herczeg for the 16-bit library. All three
-libraries contain identical sets of functions, used in exactly the same way.
-Only the names of the functions and the data types of their arguments and
-results are different. To avoid over-complication and reduce the documentation
-maintenance load, most of the PCRE documentation describes the 8-bit library,
-with only occasional references to the 16-bit and 32-bit libraries. This page
-describes what is different when you use the 32-bit library.
-.P
-WARNING: A single application can be linked with all or any of the three
-libraries, but you must take care when processing any particular pattern
-to use functions from just one library. For example, if you want to study
-a pattern that was compiled with \fBpcre32_compile()\fP, you must do so
-with \fBpcre32_study()\fP, not \fBpcre_study()\fP, and you must free the
-study data with \fBpcre32_free_study()\fP.
-.
-.
-.SH "THE HEADER FILE"
-.rs
-.sp
-There is only one header file, \fBpcre.h\fP. It contains prototypes for all the
-functions in all libraries, as well as definitions of flags, structures, error
-codes, etc.
-.
-.
-.SH "THE LIBRARY NAME"
-.rs
-.sp
-In Unix-like systems, the 32-bit library is called \fBlibpcre32\fP, and can
-normally be accesss by adding \fB-lpcre32\fP to the command for linking an
-application that uses PCRE.
-.
-.
-.SH "STRING TYPES"
-.rs
-.sp
-In the 8-bit library, strings are passed to PCRE library functions as vectors
-of bytes with the C type "char *". In the 32-bit library, strings are passed as
-vectors of unsigned 32-bit quantities. The macro PCRE_UCHAR32 specifies an
-appropriate data type, and PCRE_SPTR32 is defined as "const PCRE_UCHAR32 *". In
-very many environments, "unsigned int" is a 32-bit data type. When PCRE is
-built, it defines PCRE_UCHAR32 as "unsigned int", but checks that it really is
-a 32-bit data type. If it is not, the build fails with an error message telling
-the maintainer to modify the definition appropriately.
-.
-.
-.SH "STRUCTURE TYPES"
-.rs
-.sp
-The types of the opaque structures that are used for compiled 32-bit patterns
-and JIT stacks are \fBpcre32\fP and \fBpcre32_jit_stack\fP respectively. The
-type of the user-accessible structure that is returned by \fBpcre32_study()\fP
-is \fBpcre32_extra\fP, and the type of the structure that is used for passing
-data to a callout function is \fBpcre32_callout_block\fP. These structures
-contain the same fields, with the same names, as their 8-bit counterparts. The
-only difference is that pointers to character strings are 32-bit instead of
-8-bit types.
-.
-.
-.SH "32-BIT FUNCTIONS"
-.rs
-.sp
-For every function in the 8-bit library there is a corresponding function in
-the 32-bit library with a name that starts with \fBpcre32_\fP instead of
-\fBpcre_\fP. The prototypes are listed above. In addition, there is one extra
-function, \fBpcre32_utf32_to_host_byte_order()\fP. This is a utility function
-that converts a UTF-32 character string to host byte order if necessary. The
-other 32-bit functions expect the strings they are passed to be in host byte
-order.
-.P
-The \fIinput\fP and \fIoutput\fP arguments of
-\fBpcre32_utf32_to_host_byte_order()\fP may point to the same address, that is,
-conversion in place is supported. The output buffer must be at least as long as
-the input.
-.P
-The \fIlength\fP argument specifies the number of 32-bit data units in the
-input string; a negative value specifies a zero-terminated string.
-.P
-If \fIbyte_order\fP is NULL, it is assumed that the string starts off in host
-byte order. This may be changed by byte-order marks (BOMs) anywhere in the
-string (commonly as the first character).
-.P
-If \fIbyte_order\fP is not NULL, a non-zero value of the integer to which it
-points means that the input starts off in host byte order, otherwise the
-opposite order is assumed. Again, BOMs in the string can change this. The final
-byte order is passed back at the end of processing.
-.P
-If \fIkeep_boms\fP is not zero, byte-order mark characters (0xfeff) are copied
-into the output string. Otherwise they are discarded.
-.P
-The result of the function is the number of 32-bit units placed into the output
-buffer, including the zero terminator if the string was zero-terminated.
-.
-.
-.SH "SUBJECT STRING OFFSETS"
-.rs
-.sp
-The lengths and starting offsets of subject strings must be specified in 32-bit
-data units, and the offsets within subject strings that are returned by the
-matching functions are in also 32-bit units rather than bytes.
-.
-.
-.SH "NAMED SUBPATTERNS"
-.rs
-.sp
-The name-to-number translation table that is maintained for named subpatterns
-uses 32-bit characters. The \fBpcre32_get_stringtable_entries()\fP function
-returns the length of each entry in the table as the number of 32-bit data
-units.
-.
-.
-.SH "OPTION NAMES"
-.rs
-.sp
-There are two new general option names, PCRE_UTF32 and PCRE_NO_UTF32_CHECK,
-which correspond to PCRE_UTF8 and PCRE_NO_UTF8_CHECK in the 8-bit library. In
-fact, these new options define the same bits in the options word. There is a
-discussion about the
-.\" HTML <a href="pcreunicode.html#utf32strings">
-.\" </a>
-validity of UTF-32 strings
-.\"
-in the
-.\" HREF
-\fBpcreunicode\fP
-.\"
-page.
-.P
-For the \fBpcre32_config()\fP function there is an option PCRE_CONFIG_UTF32
-that returns 1 if UTF-32 support is configured, otherwise 0. If this option is
-given to \fBpcre_config()\fP or \fBpcre16_config()\fP, or if the
-PCRE_CONFIG_UTF8 or PCRE_CONFIG_UTF16 option is given to \fBpcre32_config()\fP,
-the result is the PCRE_ERROR_BADOPTION error.
-.
-.
-.SH "CHARACTER CODES"
-.rs
-.sp
-In 32-bit mode, when PCRE_UTF32 is not set, character values are treated in the
-same way as in 8-bit, non UTF-8 mode, except, of course, that they can range
-from 0 to 0x7fffffff instead of 0 to 0xff. Character types for characters less
-than 0xff can therefore be influenced by the locale in the same way as before.
-Characters greater than 0xff have only one case, and no "type" (such as letter
-or digit).
-.P
-In UTF-32 mode, the character code is Unicode, in the range 0 to 0x10ffff, with
-the exception of values in the range 0xd800 to 0xdfff because those are
-"surrogate" values that are ill-formed in UTF-32.
-.P
-A UTF-32 string can indicate its endianness by special code knows as a
-byte-order mark (BOM). The PCRE functions do not handle this, expecting strings
-to be in host byte order. A utility function called
-\fBpcre32_utf32_to_host_byte_order()\fP is provided to help with this (see
-above).
-.
-.
-.SH "ERROR NAMES"
-.rs
-.sp
-The error PCRE_ERROR_BADUTF32 corresponds to its 8-bit counterpart.
-The error PCRE_ERROR_BADMODE is given when a compiled
-pattern is passed to a function that processes patterns in the other
-mode, for example, if a pattern compiled with \fBpcre_compile()\fP is passed to
-\fBpcre32_exec()\fP.
-.P
-There are new error codes whose names begin with PCRE_UTF32_ERR for invalid
-UTF-32 strings, corresponding to the PCRE_UTF8_ERR codes for UTF-8 strings that
-are described in the section entitled
-.\" HTML <a href="pcreapi.html#badutf8reasons">
-.\" </a>
-"Reason codes for invalid UTF-8 strings"
-.\"
-in the main
-.\" HREF
-\fBpcreapi\fP
-.\"
-page. The UTF-32 errors are:
-.sp
- PCRE_UTF32_ERR1 Surrogate character (range from 0xd800 to 0xdfff)
- PCRE_UTF32_ERR2 Non-character
- PCRE_UTF32_ERR3 Character > 0x10ffff
-.
-.
-.SH "ERROR TEXTS"
-.rs
-.sp
-If there is an error while compiling a pattern, the error text that is passed
-back by \fBpcre32_compile()\fP or \fBpcre32_compile2()\fP is still an 8-bit
-character string, zero-terminated.
-.
-.
-.SH "CALLOUTS"
-.rs
-.sp
-The \fIsubject\fP and \fImark\fP fields in the callout block that is passed to
-a callout function point to 32-bit vectors.
-.
-.
-.SH "TESTING"
-.rs
-.sp
-The \fBpcretest\fP program continues to operate with 8-bit input and output
-files, but it can be used for testing the 32-bit library. If it is run with the
-command line option \fB-32\fP, patterns and subject strings are converted from
-8-bit to 32-bit before being passed to PCRE, and the 32-bit library functions
-are used instead of the 8-bit ones. Returned 32-bit strings are converted to
-8-bit for output. If both the 8-bit and the 16-bit libraries were not compiled,
-\fBpcretest\fP defaults to 32-bit and the \fB-32\fP option is ignored.
-.P
-When PCRE is being built, the \fBRunTest\fP script that is called by "make
-check" uses the \fBpcretest\fP \fB-C\fP option to discover which of the 8-bit,
-16-bit and 32-bit libraries has been built, and runs the tests appropriately.
-.
-.
-.SH "NOT SUPPORTED IN 32-BIT MODE"
-.rs
-.sp
-Not all the features of the 8-bit library are available with the 32-bit
-library. The C++ and POSIX wrapper functions support only the 8-bit library,
-and the \fBpcregrep\fP program is at present 8-bit only.
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 12 May 2013
-Copyright (c) 1997-2013 University of Cambridge.
-.fi
diff --git a/libs/Pcre16/docs/doc/pcre_assign_jit_stack.3 b/libs/Pcre16/docs/doc/pcre_assign_jit_stack.3
deleted file mode 100644
index 0ecf6f2c60..0000000000
--- a/libs/Pcre16/docs/doc/pcre_assign_jit_stack.3
+++ /dev/null
@@ -1,59 +0,0 @@
-.TH PCRE_ASSIGN_JIT_STACK 3 "24 June 2012" "PCRE 8.30"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.nf
-.B void pcre_assign_jit_stack(pcre_extra *\fIextra\fP,
-.B " pcre_jit_callback \fIcallback\fP, void *\fIdata\fP);"
-.sp
-.B void pcre16_assign_jit_stack(pcre16_extra *\fIextra\fP,
-.B " pcre16_jit_callback \fIcallback\fP, void *\fIdata\fP);"
-.sp
-.B void pcre32_assign_jit_stack(pcre32_extra *\fIextra\fP,
-.B " pcre32_jit_callback \fIcallback\fP, void *\fIdata\fP);"
-.fi
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function provides control over the memory used as a stack at run-time by a
-call to \fBpcre[16|32]_exec()\fP with a pattern that has been successfully
-compiled with JIT optimization. The arguments are:
-.sp
- extra the data pointer returned by \fBpcre[16|32]_study()\fP
- callback a callback function
- data a JIT stack or a value to be passed to the callback
- function
-.P
-If \fIcallback\fP is NULL and \fIdata\fP is NULL, an internal 32K block on
-the machine stack is used.
-.P
-If \fIcallback\fP is NULL and \fIdata\fP is not NULL, \fIdata\fP must
-be a valid JIT stack, the result of calling \fBpcre[16|32]_jit_stack_alloc()\fP.
-.P
-If \fIcallback\fP not NULL, it is called with \fIdata\fP as an argument at
-the start of matching, in order to set up a JIT stack. If the result is NULL,
-the internal 32K stack is used; otherwise the return value must be a valid JIT
-stack, the result of calling \fBpcre[16|32]_jit_stack_alloc()\fP.
-.P
-You may safely assign the same JIT stack to multiple patterns, as long as they
-are all matched in the same thread. In a multithread application, each thread
-must use its own JIT stack. For more details, see the
-.\" HREF
-\fBpcrejit\fP
-.\"
-page.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/libs/Pcre16/docs/doc/pcre_compile.3 b/libs/Pcre16/docs/doc/pcre_compile.3
deleted file mode 100644
index 5c16ebe26d..0000000000
--- a/libs/Pcre16/docs/doc/pcre_compile.3
+++ /dev/null
@@ -1,96 +0,0 @@
-.TH PCRE_COMPILE 3 "01 October 2013" "PCRE 8.34"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.nf
-.B pcre *pcre_compile(const char *\fIpattern\fP, int \fIoptions\fP,
-.B " const char **\fIerrptr\fP, int *\fIerroffset\fP,"
-.B " const unsigned char *\fItableptr\fP);"
-.sp
-.B pcre16 *pcre16_compile(PCRE_SPTR16 \fIpattern\fP, int \fIoptions\fP,
-.B " const char **\fIerrptr\fP, int *\fIerroffset\fP,"
-.B " const unsigned char *\fItableptr\fP);"
-.sp
-.B pcre32 *pcre32_compile(PCRE_SPTR32 \fIpattern\fP, int \fIoptions\fP,
-.B " const char **\fIerrptr\fP, int *\fIerroffset\fP,"
-.B " const unsigned char *\fItableptr\fP);"
-.fi
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function compiles a regular expression into an internal form. It is the
-same as \fBpcre[16|32]_compile2()\fP, except for the absence of the
-\fIerrorcodeptr\fP argument. Its arguments are:
-.sp
- \fIpattern\fP A zero-terminated string containing the
- regular expression to be compiled
- \fIoptions\fP Zero or more option bits
- \fIerrptr\fP Where to put an error message
- \fIerroffset\fP Offset in pattern where error was found
- \fItableptr\fP Pointer to character tables, or NULL to
- use the built-in default
-.sp
-The option bits are:
-.sp
- PCRE_ANCHORED Force pattern anchoring
- PCRE_AUTO_CALLOUT Compile automatic callouts
- PCRE_BSR_ANYCRLF \eR matches only CR, LF, or CRLF
- PCRE_BSR_UNICODE \eR 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 white space and # comments
- PCRE_EXTRA PCRE extra features
- (not much use currently)
- PCRE_FIRSTLINE Force matching to be before newline
- PCRE_JAVASCRIPT_COMPAT JavaScript compatibility
- PCRE_MULTILINE ^ and $ match newlines within data
- PCRE_NEVER_UTF Lock out UTF, e.g. via (*UTF)
- 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_NO_AUTO_POSSESS Disable auto-possessification
- PCRE_NO_START_OPTIMIZE Disable match-time start optimizations
- PCRE_NO_UTF16_CHECK Do not check the pattern for UTF-16
- validity (only relevant if
- PCRE_UTF16 is set)
- PCRE_NO_UTF32_CHECK Do not check the pattern for UTF-32
- validity (only relevant if
- PCRE_UTF32 is set)
- PCRE_NO_UTF8_CHECK Do not check the pattern for UTF-8
- validity (only relevant if
- PCRE_UTF8 is set)
- PCRE_UCP Use Unicode properties for \ed, \ew, etc.
- PCRE_UNGREEDY Invert greediness of quantifiers
- PCRE_UTF16 Run in \fBpcre16_compile()\fP UTF-16 mode
- PCRE_UTF32 Run in \fBpcre32_compile()\fP UTF-32 mode
- PCRE_UTF8 Run in \fBpcre_compile()\fP UTF-8 mode
-.sp
-PCRE must be built with UTF support in order to use PCRE_UTF8/16/32 and
-PCRE_NO_UTF8/16/32_CHECK, and with UCP support if PCRE_UCP is used.
-.P
-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.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/libs/Pcre16/docs/doc/pcre_compile2.3 b/libs/Pcre16/docs/doc/pcre_compile2.3
deleted file mode 100644
index 377420180e..0000000000
--- a/libs/Pcre16/docs/doc/pcre_compile2.3
+++ /dev/null
@@ -1,101 +0,0 @@
-.TH PCRE_COMPILE2 3 "01 October 2013" "PCRE 8.34"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.nf
-.B pcre *pcre_compile2(const char *\fIpattern\fP, int \fIoptions\fP,
-.B " int *\fIerrorcodeptr\fP,"
-.B " const char **\fIerrptr\fP, int *\fIerroffset\fP,"
-.B " const unsigned char *\fItableptr\fP);"
-.sp
-.B pcre16 *pcre16_compile2(PCRE_SPTR16 \fIpattern\fP, int \fIoptions\fP,
-.B " int *\fIerrorcodeptr\fP,"
-.B " const char **\fIerrptr\fP, int *\fIerroffset\fP,"
-.B " const unsigned char *\fItableptr\fP);"
-.sp
-.B pcre32 *pcre32_compile2(PCRE_SPTR32 \fIpattern\fP, int \fIoptions\fP,
-.B " int *\fIerrorcodeptr\fP,£
-.B " const char **\fIerrptr\fP, int *\fIerroffset\fP,"
-.B " const unsigned char *\fItableptr\fP);"
-.fi
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function compiles a regular expression into an internal form. It is the
-same as \fBpcre[16|32]_compile()\fP, except for the addition of the
-\fIerrorcodeptr\fP argument. The arguments are:
-.
-.sp
- \fIpattern\fP A zero-terminated string containing the
- regular expression to be compiled
- \fIoptions\fP Zero or more option bits
- \fIerrorcodeptr\fP Where to put an error code
- \fIerrptr\fP Where to put an error message
- \fIerroffset\fP Offset in pattern where error was found
- \fItableptr\fP Pointer to character tables, or NULL to
- use the built-in default
-.sp
-The option bits are:
-.sp
- PCRE_ANCHORED Force pattern anchoring
- PCRE_AUTO_CALLOUT Compile automatic callouts
- PCRE_BSR_ANYCRLF \eR matches only CR, LF, or CRLF
- PCRE_BSR_UNICODE \eR 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 white space and # comments
- PCRE_EXTRA PCRE extra features
- (not much use currently)
- PCRE_FIRSTLINE Force matching to be before newline
- PCRE_JAVASCRIPT_COMPAT JavaScript compatibility
- PCRE_MULTILINE ^ and $ match newlines within data
- PCRE_NEVER_UTF Lock out UTF, e.g. via (*UTF)
- 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_NO_AUTO_POSSESS Disable auto-possessification
- PCRE_NO_START_OPTIMIZE Disable match-time start optimizations
- PCRE_NO_UTF16_CHECK Do not check the pattern for UTF-16
- validity (only relevant if
- PCRE_UTF16 is set)
- PCRE_NO_UTF32_CHECK Do not check the pattern for UTF-32
- validity (only relevant if
- PCRE_UTF32 is set)
- PCRE_NO_UTF8_CHECK Do not check the pattern for UTF-8
- validity (only relevant if
- PCRE_UTF8 is set)
- PCRE_UCP Use Unicode properties for \ed, \ew, etc.
- PCRE_UNGREEDY Invert greediness of quantifiers
- PCRE_UTF16 Run \fBpcre16_compile()\fP in UTF-16 mode
- PCRE_UTF32 Run \fBpcre32_compile()\fP in UTF-32 mode
- PCRE_UTF8 Run \fBpcre_compile()\fP in UTF-8 mode
-.sp
-PCRE must be built with UTF support in order to use PCRE_UTF8/16/32 and
-PCRE_NO_UTF8/16/32_CHECK, and with UCP support if PCRE_UCP is used.
-.P
-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.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/libs/Pcre16/docs/doc/pcre_config.3 b/libs/Pcre16/docs/doc/pcre_config.3
deleted file mode 100644
index d14ffdadeb..0000000000
--- a/libs/Pcre16/docs/doc/pcre_config.3
+++ /dev/null
@@ -1,79 +0,0 @@
-.TH PCRE_CONFIG 3 "20 April 2014" "PCRE 8.36"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B int pcre_config(int \fIwhat\fP, void *\fIwhere\fP);
-.PP
-.B int pcre16_config(int \fIwhat\fP, void *\fIwhere\fP);
-.PP
-.B int pcre32_config(int \fIwhat\fP, void *\fIwhere\fP);
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function makes it possible for a client program to find out which optional
-features are available in the version of the PCRE library it is using. The
-arguments are as follows:
-.sp
- \fIwhat\fP A code specifying what information is required
- \fIwhere\fP Points to where to put the data
-.sp
-The \fIwhere\fP argument must point to an integer variable, except for
-PCRE_CONFIG_MATCH_LIMIT, PCRE_CONFIG_MATCH_LIMIT_RECURSION, and
-PCRE_CONFIG_PARENS_LIMIT, when it must point to an unsigned long integer,
-and for PCRE_CONFIG_JITTARGET, when it must point to a const char*.
-The available codes are:
-.sp
- PCRE_CONFIG_JIT Availability of just-in-time compiler
- support (1=yes 0=no)
- PCRE_CONFIG_JITTARGET String containing information about the
- target architecture for the JIT compiler,
- or NULL if there is no JIT support
- PCRE_CONFIG_LINK_SIZE Internal link size: 2, 3, or 4
- PCRE_CONFIG_PARENS_LIMIT Parentheses nesting limit
- PCRE_CONFIG_MATCH_LIMIT Internal resource limit
- 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 \eR 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
- \fBmalloc()\fP is used by the POSIX API
- PCRE_CONFIG_STACKRECURSE Recursion implementation (1=stack 0=heap)
- PCRE_CONFIG_UTF16 Availability of UTF-16 support (1=yes
- 0=no); option for \fBpcre16_config()\fP
- PCRE_CONFIG_UTF32 Availability of UTF-32 support (1=yes
- 0=no); option for \fBpcre32_config()\fP
- PCRE_CONFIG_UTF8 Availability of UTF-8 support (1=yes 0=no);
- option for \fBpcre_config()\fP
- PCRE_CONFIG_UNICODE_PROPERTIES
- Availability of Unicode property support
- (1=yes 0=no)
-.sp
-The function yields 0 on success or PCRE_ERROR_BADOPTION otherwise. That error
-is also given if PCRE_CONFIG_UTF16 or PCRE_CONFIG_UTF32 is passed to
-\fBpcre_config()\fP, if PCRE_CONFIG_UTF8 or PCRE_CONFIG_UTF32 is passed to
-\fBpcre16_config()\fP, or if PCRE_CONFIG_UTF8 or PCRE_CONFIG_UTF16 is passed to
-\fBpcre32_config()\fP.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/libs/Pcre16/docs/doc/pcre_copy_named_substring.3 b/libs/Pcre16/docs/doc/pcre_copy_named_substring.3
deleted file mode 100644
index 52582aecb2..0000000000
--- a/libs/Pcre16/docs/doc/pcre_copy_named_substring.3
+++ /dev/null
@@ -1,51 +0,0 @@
-.TH PCRE_COPY_NAMED_SUBSTRING 3 "24 June 2012" "PCRE 8.30"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.nf
-.B int pcre_copy_named_substring(const pcre *\fIcode\fP,
-.B " const char *\fIsubject\fP, int *\fIovector\fP,"
-.B " int \fIstringcount\fP, const char *\fIstringname\fP,"
-.B " char *\fIbuffer\fP, int \fIbuffersize\fP);"
-.sp
-.B int pcre16_copy_named_substring(const pcre16 *\fIcode\fP,
-.B " PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP,"
-.B " int \fIstringcount\fP, PCRE_SPTR16 \fIstringname\fP,"
-.B " PCRE_UCHAR16 *\fIbuffer\fP, int \fIbuffersize\fP);"
-.sp
-.B int pcre32_copy_named_substring(const pcre32 *\fIcode\fP,
-.B " PCRE_SPTR32 \fIsubject\fP, int *\fIovector\fP,"
-.B " int \fIstringcount\fP, PCRE_SPTR32 \fIstringname\fP,"
-.B " PCRE_UCHAR32 *\fIbuffer\fP, int \fIbuffersize\fP);"
-.fi
-.
-.SH DESCRIPTION
-.rs
-.sp
-This is a convenience function for extracting a captured substring, identified
-by name, into a given buffer. The arguments are:
-.sp
- \fIcode\fP Pattern that was successfully matched
- \fIsubject\fP Subject that has been successfully matched
- \fIovector\fP Offset vector that \fBpcre[16|32]_exec()\fP used
- \fIstringcount\fP Value returned by \fBpcre[16|32]_exec()\fP
- \fIstringname\fP Name of the required substring
- \fIbuffer\fP Buffer to receive the string
- \fIbuffersize\fP Size of buffer
-.sp
-The yield is the length of the substring, PCRE_ERROR_NOMEMORY if the buffer was
-too small, or PCRE_ERROR_NOSUBSTRING if the string name is invalid.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/libs/Pcre16/docs/doc/pcre_copy_substring.3 b/libs/Pcre16/docs/doc/pcre_copy_substring.3
deleted file mode 100644
index 83af6e800a..0000000000
--- a/libs/Pcre16/docs/doc/pcre_copy_substring.3
+++ /dev/null
@@ -1,47 +0,0 @@
-.TH PCRE_COPY_SUBSTRING 3 "24 June 2012" "PCRE 8.30"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.nf
-.B int pcre_copy_substring(const char *\fIsubject\fP, int *\fIovector\fP,
-.B " int \fIstringcount\fP, int \fIstringnumber\fP, char *\fIbuffer\fP,"
-.B " int \fIbuffersize\fP);"
-.sp
-.B int pcre16_copy_substring(PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP,
-.B " int \fIstringcount\fP, int \fIstringnumber\fP, PCRE_UCHAR16 *\fIbuffer\fP,"
-.B " int \fIbuffersize\fP);"
-.sp
-.B int pcre32_copy_substring(PCRE_SPTR32 \fIsubject\fP, int *\fIovector\fP,
-.B " int \fIstringcount\fP, int \fIstringnumber\fP, PCRE_UCHAR32 *\fIbuffer\fP,"
-.B " int \fIbuffersize\fP);"
-.fi
-.
-.SH DESCRIPTION
-.rs
-.sp
-This is a convenience function for extracting a captured substring into a given
-buffer. The arguments are:
-.sp
- \fIsubject\fP Subject that has been successfully matched
- \fIovector\fP Offset vector that \fBpcre[16|32]_exec()\fP used
- \fIstringcount\fP Value returned by \fBpcre[16|32]_exec()\fP
- \fIstringnumber\fP Number of the required substring
- \fIbuffer\fP Buffer to receive the string
- \fIbuffersize\fP Size of buffer
-.sp
-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.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/libs/Pcre16/docs/doc/pcre_dfa_exec.3 b/libs/Pcre16/docs/doc/pcre_dfa_exec.3
deleted file mode 100644
index 39c2e836da..0000000000
--- a/libs/Pcre16/docs/doc/pcre_dfa_exec.3
+++ /dev/null
@@ -1,118 +0,0 @@
-.TH PCRE_DFA_EXEC 3 "12 May 2013" "PCRE 8.33"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.nf
-.B int pcre_dfa_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
-.B " const char *\fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
-.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,"
-.B " int *\fIworkspace\fP, int \fIwscount\fP);"
-.sp
-.B int pcre16_dfa_exec(const pcre16 *\fIcode\fP, "const pcre16_extra *\fIextra\fP,"
-.B " PCRE_SPTR16 \fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
-.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,"
-.B " int *\fIworkspace\fP, int \fIwscount\fP);"
-.sp
-.B int pcre32_dfa_exec(const pcre32 *\fIcode\fP, "const pcre32_extra *\fIextra\fP,"
-.B " PCRE_SPTR32 \fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
-.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,"
-.B " int *\fIworkspace\fP, int \fIwscount\fP);"
-.fi
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function matches a compiled regular expression against a given subject
-string, using an alternative matching algorithm that scans the subject string
-just once (\fInot\fP Perl-compatible). Note that the main, Perl-compatible,
-matching function is \fBpcre[16|32]_exec()\fP. The arguments for this function
-are:
-.sp
- \fIcode\fP Points to the compiled pattern
- \fIextra\fP Points to an associated \fBpcre[16|32]_extra\fP structure,
- or is NULL
- \fIsubject\fP Points to the subject string
- \fIlength\fP Length of the subject string
- \fIstartoffset\fP Offset in the subject at which to start matching
- \fIoptions\fP Option bits
- \fIovector\fP Points to a vector of ints for result offsets
- \fIovecsize\fP Number of elements in the vector
- \fIworkspace\fP Points to a vector of ints used as working space
- \fIwscount\fP Number of elements in the vector
-.sp
-The units for \fIlength\fP and \fIstartoffset\fP are bytes for
-\fBpcre_exec()\fP, 16-bit data items for \fBpcre16_exec()\fP, and 32-bit items
-for \fBpcre32_exec()\fP. The options are:
-.sp
- PCRE_ANCHORED Match only at the first position
- PCRE_BSR_ANYCRLF \eR matches only CR, LF, or CRLF
- PCRE_BSR_UNICODE \eR matches all Unicode line endings
- PCRE_NEWLINE_ANY Recognize any Unicode newline sequence
- PCRE_NEWLINE_ANYCRLF Recognize CR, LF, & CRLF as newline sequences
- PCRE_NEWLINE_CR Recognize CR as the only newline sequence
- PCRE_NEWLINE_CRLF Recognize CRLF as the only newline sequence
- PCRE_NEWLINE_LF Recognize LF as the only 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_NOTEMPTY_ATSTART An empty string at the start of the subject
- is not a valid match
- PCRE_NO_START_OPTIMIZE Do not do "start-match" optimizations
- PCRE_NO_UTF16_CHECK Do not check the subject for UTF-16
- validity (only relevant if PCRE_UTF16
- was set at compile time)
- PCRE_NO_UTF32_CHECK Do not check the subject for UTF-32
- validity (only relevant if PCRE_UTF32
- was set at compile time)
- 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
- PCRE_PARTIAL_SOFT ) match if no full matches are found
- PCRE_PARTIAL_HARD Return PCRE_ERROR_PARTIAL for a partial match
- even if there is a full match as well
- PCRE_DFA_SHORTEST Return only the shortest match
- PCRE_DFA_RESTART Restart after a partial match
-.sp
-There are restrictions on what may appear in a pattern when using this matching
-function. Details are given in the
-.\" HREF
-\fBpcrematching\fP
-.\"
-documentation. For details of partial matching, see the
-.\" HREF
-\fBpcrepartial\fP
-.\"
-page.
-.P
-A \fBpcre[16|32]_extra\fP structure contains the following fields:
-.sp
- \fIflags\fP Bits indicating which fields are set
- \fIstudy_data\fP Opaque data from \fBpcre[16|32]_study()\fP
- \fImatch_limit\fP Limit on internal resource use
- \fImatch_limit_recursion\fP Limit on internal recursion depth
- \fIcallout_data\fP Opaque data passed back to callouts
- \fItables\fP Points to character tables or is NULL
- \fImark\fP For passing back a *MARK pointer
- \fIexecutable_jit\fP Opaque data from JIT compilation
-.sp
-The flag bits are PCRE_EXTRA_STUDY_DATA, PCRE_EXTRA_MATCH_LIMIT,
-PCRE_EXTRA_MATCH_LIMIT_RECURSION, PCRE_EXTRA_CALLOUT_DATA,
-PCRE_EXTRA_TABLES, PCRE_EXTRA_MARK and PCRE_EXTRA_EXECUTABLE_JIT. For this
-matching function, the \fImatch_limit\fP and \fImatch_limit_recursion\fP fields
-are not used, and must not be set. The PCRE_EXTRA_EXECUTABLE_JIT flag and
-the corresponding variable are ignored.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/libs/Pcre16/docs/doc/pcre_exec.3 b/libs/Pcre16/docs/doc/pcre_exec.3
deleted file mode 100644
index 4686bd6de0..0000000000
--- a/libs/Pcre16/docs/doc/pcre_exec.3
+++ /dev/null
@@ -1,99 +0,0 @@
-.TH PCRE_EXEC 3 "12 May 2013" "PCRE 8.33"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.nf
-.B int pcre_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
-.B " const char *\fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
-.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);"
-.sp
-.B int pcre16_exec(const pcre16 *\fIcode\fP, "const pcre16_extra *\fIextra\fP,"
-.B " PCRE_SPTR16 \fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
-.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);"
-.sp
-.B int pcre32_exec(const pcre32 *\fIcode\fP, "const pcre32_extra *\fIextra\fP,"
-.B " PCRE_SPTR32 \fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
-.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);"
-.fi
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function matches a compiled regular expression against a given subject
-string, using a matching algorithm that is similar to Perl's. It returns
-offsets to captured substrings. Its arguments are:
-.sp
- \fIcode\fP Points to the compiled pattern
- \fIextra\fP Points to an associated \fBpcre[16|32]_extra\fP structure,
- or is NULL
- \fIsubject\fP Points to the subject string
- \fIlength\fP Length of the subject string
- \fIstartoffset\fP Offset in the subject at which to start matching
- \fIoptions\fP Option bits
- \fIovector\fP Points to a vector of ints for result offsets
- \fIovecsize\fP Number of elements in the vector (a multiple of 3)
-.sp
-The units for \fIlength\fP and \fIstartoffset\fP are bytes for
-\fBpcre_exec()\fP, 16-bit data items for \fBpcre16_exec()\fP, and 32-bit items
-for \fBpcre32_exec()\fP. The options are:
-.sp
- PCRE_ANCHORED Match only at the first position
- PCRE_BSR_ANYCRLF \eR matches only CR, LF, or CRLF
- PCRE_BSR_UNICODE \eR matches all Unicode line endings
- PCRE_NEWLINE_ANY Recognize any Unicode newline sequence
- PCRE_NEWLINE_ANYCRLF Recognize CR, LF, & CRLF as newline sequences
- PCRE_NEWLINE_CR Recognize CR as the only newline sequence
- PCRE_NEWLINE_CRLF Recognize CRLF as the only newline sequence
- PCRE_NEWLINE_LF Recognize LF as the only newline sequence
- PCRE_NOTBOL Subject string is not the beginning of a line
- PCRE_NOTEOL Subject string is not the end of a line
- PCRE_NOTEMPTY An empty string is not a valid match
- PCRE_NOTEMPTY_ATSTART An empty string at the start of the subject
- is not a valid match
- PCRE_NO_START_OPTIMIZE Do not do "start-match" optimizations
- PCRE_NO_UTF16_CHECK Do not check the subject for UTF-16
- validity (only relevant if PCRE_UTF16
- was set at compile time)
- PCRE_NO_UTF32_CHECK Do not check the subject for UTF-32
- validity (only relevant if PCRE_UTF32
- was set at compile time)
- 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
- PCRE_PARTIAL_SOFT ) match if no full matches are found
- PCRE_PARTIAL_HARD Return PCRE_ERROR_PARTIAL for a partial match
- if that is found before a full match
-.sp
-For details of partial matching, see the
-.\" HREF
-\fBpcrepartial\fP
-.\"
-page. A \fBpcre_extra\fP structure contains the following fields:
-.sp
- \fIflags\fP Bits indicating which fields are set
- \fIstudy_data\fP Opaque data from \fBpcre[16|32]_study()\fP
- \fImatch_limit\fP Limit on internal resource use
- \fImatch_limit_recursion\fP Limit on internal recursion depth
- \fIcallout_data\fP Opaque data passed back to callouts
- \fItables\fP Points to character tables or is NULL
- \fImark\fP For passing back a *MARK pointer
- \fIexecutable_jit\fP Opaque data from JIT compilation
-.sp
-The flag bits are PCRE_EXTRA_STUDY_DATA, PCRE_EXTRA_MATCH_LIMIT,
-PCRE_EXTRA_MATCH_LIMIT_RECURSION, PCRE_EXTRA_CALLOUT_DATA,
-PCRE_EXTRA_TABLES, PCRE_EXTRA_MARK and PCRE_EXTRA_EXECUTABLE_JIT.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/libs/Pcre16/docs/doc/pcre_free_study.3 b/libs/Pcre16/docs/doc/pcre_free_study.3
deleted file mode 100644
index 8826b73597..0000000000
--- a/libs/Pcre16/docs/doc/pcre_free_study.3
+++ /dev/null
@@ -1,31 +0,0 @@
-.TH PCRE_FREE_STUDY 3 "24 June 2012" "PCRE 8.30"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B void pcre_free_study(pcre_extra *\fIextra\fP);
-.PP
-.B void pcre16_free_study(pcre16_extra *\fIextra\fP);
-.PP
-.B void pcre32_free_study(pcre32_extra *\fIextra\fP);
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function is used to free the memory used for the data generated by a call
-to \fBpcre[16|32]_study()\fP when it is no longer needed. The argument must be the
-result of such a call.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/libs/Pcre16/docs/doc/pcre_free_substring.3 b/libs/Pcre16/docs/doc/pcre_free_substring.3
deleted file mode 100644
index 88c04019f4..0000000000
--- a/libs/Pcre16/docs/doc/pcre_free_substring.3
+++ /dev/null
@@ -1,31 +0,0 @@
-.TH PCRE_FREE_SUBSTRING 3 "24 June 2012" "PCRE 8.30"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B void pcre_free_substring(const char *\fIstringptr\fP);
-.PP
-.B void pcre16_free_substring(PCRE_SPTR16 \fIstringptr\fP);
-.PP
-.B void pcre32_free_substring(PCRE_SPTR32 \fIstringptr\fP);
-.
-.SH DESCRIPTION
-.rs
-.sp
-This is a convenience function for freeing the store obtained by a previous
-call to \fBpcre[16|32]_get_substring()\fP or \fBpcre[16|32]_get_named_substring()\fP.
-Its only argument is a pointer to the string.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/libs/Pcre16/docs/doc/pcre_free_substring_list.3 b/libs/Pcre16/docs/doc/pcre_free_substring_list.3
deleted file mode 100644
index 248b4bd01b..0000000000
--- a/libs/Pcre16/docs/doc/pcre_free_substring_list.3
+++ /dev/null
@@ -1,31 +0,0 @@
-.TH PCRE_FREE_SUBSTRING_LIST 3 "24 June 2012" "PCRE 8.30"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B void pcre_free_substring_list(const char **\fIstringptr\fP);
-.PP
-.B void pcre16_free_substring_list(PCRE_SPTR16 *\fIstringptr\fP);
-.PP
-.B void pcre32_free_substring_list(PCRE_SPTR32 *\fIstringptr\fP);
-.
-.SH DESCRIPTION
-.rs
-.sp
-This is a convenience function for freeing the store obtained by a previous
-call to \fBpcre[16|32]_get_substring_list()\fP. Its only argument is a pointer to
-the list of string pointers.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/libs/Pcre16/docs/doc/pcre_fullinfo.3 b/libs/Pcre16/docs/doc/pcre_fullinfo.3
deleted file mode 100644
index c9b2c656da..0000000000
--- a/libs/Pcre16/docs/doc/pcre_fullinfo.3
+++ /dev/null
@@ -1,103 +0,0 @@
-.TH PCRE_FULLINFO 3 "21 April 2014" "PCRE 8.36"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.nf
-.B int pcre_fullinfo(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
-.B " int \fIwhat\fP, void *\fIwhere\fP);"
-.sp
-.B int pcre16_fullinfo(const pcre16 *\fIcode\fP, "const pcre16_extra *\fIextra\fP,"
-.B " int \fIwhat\fP, void *\fIwhere\fP);"
-.sp
-.B int pcre32_fullinfo(const pcre32 *\fIcode\fP, "const pcre32_extra *\fIextra\fP,"
-.B " int \fIwhat\fP, void *\fIwhere\fP);"
-.fi
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function returns information about a compiled pattern. Its arguments are:
-.sp
- \fIcode\fP Compiled regular expression
- \fIextra\fP Result of \fBpcre[16|32]_study()\fP or NULL
- \fIwhat\fP What information is required
- \fIwhere\fP Where to put the information
-.sp
-The following information is available:
-.sp
- PCRE_INFO_BACKREFMAX Number of highest back reference
- PCRE_INFO_CAPTURECOUNT Number of capturing subpatterns
- PCRE_INFO_DEFAULT_TABLES Pointer to default tables
- PCRE_INFO_FIRSTBYTE Fixed first data unit for a match, or
- -1 for start of string
- or after newline, or
- -2 otherwise
- PCRE_INFO_FIRSTTABLE Table of first data units (after studying)
- PCRE_INFO_HASCRORLF Return 1 if explicit CR or LF matches exist
- PCRE_INFO_JCHANGED Return 1 if (?J) or (?-J) was used
- PCRE_INFO_JIT Return 1 after successful JIT compilation
- PCRE_INFO_JITSIZE Size of JIT compiled code
- PCRE_INFO_LASTLITERAL Literal last data unit required
- PCRE_INFO_MINLENGTH Lower bound length of matching strings
- PCRE_INFO_MATCHEMPTY Return 1 if the pattern can match an empty string,
- 0 otherwise
- PCRE_INFO_MATCHLIMIT Match limit if set, otherwise PCRE_RROR_UNSET
- PCRE_INFO_MAXLOOKBEHIND Length (in characters) of the longest lookbehind assertion
- PCRE_INFO_NAMECOUNT Number of named subpatterns
- PCRE_INFO_NAMEENTRYSIZE Size of name table entry
- PCRE_INFO_NAMETABLE Pointer to name table
- PCRE_INFO_OKPARTIAL Return 1 if partial matching can be tried
- (always returns 1 after release 8.00)
- PCRE_INFO_OPTIONS Option bits used for compilation
- PCRE_INFO_SIZE Size of compiled pattern
- PCRE_INFO_STUDYSIZE Size of study data
- PCRE_INFO_FIRSTCHARACTER Fixed first data unit for a match
- PCRE_INFO_FIRSTCHARACTERFLAGS Returns
- 1 if there is a first data character set, which can
- then be retrieved using PCRE_INFO_FIRSTCHARACTER,
- 2 if the first character is at the start of the data
- string or after a newline, and
- 0 otherwise
- PCRE_INFO_RECURSIONLIMIT Recursion limit if set, otherwise PCRE_ERROR_UNSET
- PCRE_INFO_REQUIREDCHAR Literal last data unit required
- PCRE_INFO_REQUIREDCHARFLAGS Returns 1 if the last data character is set (which can then
- be retrieved using PCRE_INFO_REQUIREDCHAR); 0 otherwise
-.sp
-The \fIwhere\fP argument must point to an integer variable, except for the
-following \fIwhat\fP values:
-.sp
- PCRE_INFO_DEFAULT_TABLES const uint8_t *
- PCRE_INFO_FIRSTCHARACTER uint32_t
- PCRE_INFO_FIRSTTABLE const uint8_t *
- PCRE_INFO_JITSIZE size_t
- PCRE_INFO_MATCHLIMIT uint32_t
- PCRE_INFO_NAMETABLE PCRE_SPTR16 (16-bit library)
- PCRE_INFO_NAMETABLE PCRE_SPTR32 (32-bit library)
- PCRE_INFO_NAMETABLE const unsigned char * (8-bit library)
- PCRE_INFO_OPTIONS unsigned long int
- PCRE_INFO_SIZE size_t
- PCRE_INFO_STUDYSIZE size_t
- PCRE_INFO_RECURSIONLIMIT uint32_t
- PCRE_INFO_REQUIREDCHAR uint32_t
-.sp
-The yield of the function is zero on success or:
-.sp
- PCRE_ERROR_NULL the argument \fIcode\fP was NULL
- the argument \fIwhere\fP was NULL
- PCRE_ERROR_BADMAGIC the "magic number" was not found
- PCRE_ERROR_BADOPTION the value of \fIwhat\fP was invalid
- PCRE_ERROR_UNSET the option was not set
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/libs/Pcre16/docs/doc/pcre_get_named_substring.3 b/libs/Pcre16/docs/doc/pcre_get_named_substring.3
deleted file mode 100644
index 84d4ee7dbb..0000000000
--- a/libs/Pcre16/docs/doc/pcre_get_named_substring.3
+++ /dev/null
@@ -1,54 +0,0 @@
-.TH PCRE_GET_NAMED_SUBSTRING 3 "24 June 2012" "PCRE 8.30"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.nf
-.B int pcre_get_named_substring(const pcre *\fIcode\fP,
-.B " const char *\fIsubject\fP, int *\fIovector\fP,"
-.B " int \fIstringcount\fP, const char *\fIstringname\fP,"
-.B " const char **\fIstringptr\fP);"
-.sp
-.B int pcre16_get_named_substring(const pcre16 *\fIcode\fP,
-.B " PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP,"
-.B " int \fIstringcount\fP, PCRE_SPTR16 \fIstringname\fP,"
-.B " PCRE_SPTR16 *\fIstringptr\fP);"
-.sp
-.B int pcre32_get_named_substring(const pcre32 *\fIcode\fP,
-.B " PCRE_SPTR32 \fIsubject\fP, int *\fIovector\fP,"
-.B " int \fIstringcount\fP, PCRE_SPTR32 \fIstringname\fP,"
-.B " PCRE_SPTR32 *\fIstringptr\fP);"
-.fi
-.
-.SH DESCRIPTION
-.rs
-.sp
-This is a convenience function for extracting a captured substring by name. The
-arguments are:
-.sp
- \fIcode\fP Compiled pattern
- \fIsubject\fP Subject that has been successfully matched
- \fIovector\fP Offset vector that \fBpcre[16|32]_exec()\fP used
- \fIstringcount\fP Value returned by \fBpcre[16|32]_exec()\fP
- \fIstringname\fP Name of the required substring
- \fIstringptr\fP Where to put the string pointer
-.sp
-The memory in which the substring is placed is obtained by calling
-\fBpcre[16|32]_malloc()\fP. The convenience function
-\fBpcre[16|32]_free_substring()\fP 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.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/libs/Pcre16/docs/doc/pcre_get_stringnumber.3 b/libs/Pcre16/docs/doc/pcre_get_stringnumber.3
deleted file mode 100644
index 9fc5291dc8..0000000000
--- a/libs/Pcre16/docs/doc/pcre_get_stringnumber.3
+++ /dev/null
@@ -1,43 +0,0 @@
-.TH PCRE_GET_STRINGNUMBER 3 "24 June 2012" "PCRE 8.30"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.nf
-.B int pcre_get_stringnumber(const pcre *\fIcode\fP,
-.B " const char *\fIname\fP);"
-.sp
-.B int pcre16_get_stringnumber(const pcre16 *\fIcode\fP,
-.B " PCRE_SPTR16 \fIname\fP);"
-.sp
-.B int pcre32_get_stringnumber(const pcre32 *\fIcode\fP,
-.B " PCRE_SPTR32 \fIname\fP);"
-.fi
-.
-.SH DESCRIPTION
-.rs
-.sp
-This convenience function finds the number of a named substring capturing
-parenthesis in a compiled pattern. Its arguments are:
-.sp
- \fIcode\fP Compiled regular expression
- \fIname\fP Name whose number is required
-.sp
-The yield of the function is the number of the parenthesis if the name is
-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
-\fBpcre[16|32]_get_stringnumber()\fP. You can obtain the complete list by calling
-\fBpcre[16|32]_get_stringtable_entries()\fP.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/libs/Pcre16/docs/doc/pcre_get_stringtable_entries.3 b/libs/Pcre16/docs/doc/pcre_get_stringtable_entries.3
deleted file mode 100644
index 5c58c90c0e..0000000000
--- a/libs/Pcre16/docs/doc/pcre_get_stringtable_entries.3
+++ /dev/null
@@ -1,46 +0,0 @@
-.TH PCRE_GET_STRINGTABLE_ENTRIES 3 "24 June 2012" "PCRE 8.30"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.nf
-.B int pcre_get_stringtable_entries(const pcre *\fIcode\fP,
-.B " const char *\fIname\fP, char **\fIfirst\fP, char **\fIlast\fP);"
-.sp
-.B int pcre16_get_stringtable_entries(const pcre16 *\fIcode\fP,
-.B " PCRE_SPTR16 \fIname\fP, PCRE_UCHAR16 **\fIfirst\fP, PCRE_UCHAR16 **\fIlast\fP);"
-.sp
-.B int pcre32_get_stringtable_entries(const pcre32 *\fIcode\fP,
-.B " PCRE_SPTR32 \fIname\fP, PCRE_UCHAR32 **\fIfirst\fP, PCRE_UCHAR32 **\fIlast\fP);"
-.fi
-.
-.SH DESCRIPTION
-.rs
-.sp
-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
-\fInot\fP set), it is usually easier to use \fBpcre[16|32]_get_stringnumber()\fP
-instead.
-.sp
- \fIcode\fP Compiled regular expression
- \fIname\fP Name whose entries required
- \fIfirst\fP Where to return a pointer to the first entry
- \fIlast\fP Where to return a pointer to the last entry
-.sp
-The yield of the function is the length of each entry, or
-PCRE_ERROR_NOSUBSTRING if none are found.
-.P
-There is a complete description of the PCRE native API, including the format of
-the table entries, in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page, and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/libs/Pcre16/docs/doc/pcre_get_substring.3 b/libs/Pcre16/docs/doc/pcre_get_substring.3
deleted file mode 100644
index 1e62b2c0c6..0000000000
--- a/libs/Pcre16/docs/doc/pcre_get_substring.3
+++ /dev/null
@@ -1,50 +0,0 @@
-.TH PCRE_GET_SUBSTRING 3 "24 June 2012" "PCRE 8.30"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.nf
-.B int pcre_get_substring(const char *\fIsubject\fP, int *\fIovector\fP,
-.B " int \fIstringcount\fP, int \fIstringnumber\fP,"
-.B " const char **\fIstringptr\fP);"
-.sp
-.B int pcre16_get_substring(PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP,
-.B " int \fIstringcount\fP, int \fIstringnumber\fP,"
-.B " PCRE_SPTR16 *\fIstringptr\fP);"
-.sp
-.B int pcre32_get_substring(PCRE_SPTR32 \fIsubject\fP, int *\fIovector\fP,
-.B " int \fIstringcount\fP, int \fIstringnumber\fP,"
-.B " PCRE_SPTR32 *\fIstringptr\fP);"
-.fi
-.
-.SH DESCRIPTION
-.rs
-.sp
-This is a convenience function for extracting a captured substring. The
-arguments are:
-.sp
- \fIsubject\fP Subject that has been successfully matched
- \fIovector\fP Offset vector that \fBpcre[16|32]_exec()\fP used
- \fIstringcount\fP Value returned by \fBpcre[16|32]_exec()\fP
- \fIstringnumber\fP Number of the required substring
- \fIstringptr\fP Where to put the string pointer
-.sp
-The memory in which the substring is placed is obtained by calling
-\fBpcre[16|32]_malloc()\fP. The convenience function
-\fBpcre[16|32]_free_substring()\fP 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.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/libs/Pcre16/docs/doc/pcre_get_substring_list.3 b/libs/Pcre16/docs/doc/pcre_get_substring_list.3
deleted file mode 100644
index 511a4a39d6..0000000000
--- a/libs/Pcre16/docs/doc/pcre_get_substring_list.3
+++ /dev/null
@@ -1,47 +0,0 @@
-.TH PCRE_GET_SUBSTRING_LIST 3 "24 June 2012" "PCRE 8.30"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.nf
-.B int pcre_get_substring_list(const char *\fIsubject\fP,
-.B " int *\fIovector\fP, int \fIstringcount\fP, const char ***\fIlistptr\fP);"
-.sp
-.B int pcre16_get_substring_list(PCRE_SPTR16 \fIsubject\fP,
-.B " int *\fIovector\fP, int \fIstringcount\fP, PCRE_SPTR16 **\fIlistptr\fP);"
-.sp
-.B int pcre32_get_substring_list(PCRE_SPTR32 \fIsubject\fP,
-.B " int *\fIovector\fP, int \fIstringcount\fP, PCRE_SPTR32 **\fIlistptr\fP);"
-.fi
-.
-.SH DESCRIPTION
-.rs
-.sp
-This is a convenience function for extracting a list of all the captured
-substrings. The arguments are:
-.sp
- \fIsubject\fP Subject that has been successfully matched
- \fIovector\fP Offset vector that \fBpcre[16|32]_exec\fP used
- \fIstringcount\fP Value returned by \fBpcre[16|32]_exec\fP
- \fIlistptr\fP Where to put a pointer to the list
-.sp
-The memory in which the substrings and the list are placed is obtained by
-calling \fBpcre[16|32]_malloc()\fP. The convenience function
-\fBpcre[16|32]_free_substring_list()\fP can be used to free it when it is no
-longer needed. A pointer to a list of pointers is put in the variable whose
-address is in \fIlistptr\fP. The list is terminated by a NULL pointer. The
-yield of the function is zero on success or PCRE_ERROR_NOMEMORY if sufficient
-memory could not be obtained.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/libs/Pcre16/docs/doc/pcre_jit_exec.3 b/libs/Pcre16/docs/doc/pcre_jit_exec.3
deleted file mode 100644
index ba85168178..0000000000
--- a/libs/Pcre16/docs/doc/pcre_jit_exec.3
+++ /dev/null
@@ -1,96 +0,0 @@
-.TH PCRE_EXEC 3 "31 October 2012" "PCRE 8.30"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.nf
-.B int pcre_jit_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
-.B " const char *\fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
-.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,"
-.B " pcre_jit_stack *\fIjstack\fP);"
-.sp
-.B int pcre16_jit_exec(const pcre16 *\fIcode\fP, "const pcre16_extra *\fIextra\fP,"
-.B " PCRE_SPTR16 \fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
-.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,"
-.B " pcre_jit_stack *\fIjstack\fP);"
-.sp
-.B int pcre32_jit_exec(const pcre32 *\fIcode\fP, "const pcre32_extra *\fIextra\fP,"
-.B " PCRE_SPTR32 \fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
-.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,"
-.B " pcre_jit_stack *\fIjstack\fP);"
-.fi
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function matches a compiled regular expression that has been successfully
-studied with one of the JIT options against a given subject string, using a
-matching algorithm that is similar to Perl's. It is a "fast path" interface to
-JIT, and it bypasses some of the sanity checks that \fBpcre_exec()\fP applies.
-It returns offsets to captured substrings. Its arguments are:
-.sp
- \fIcode\fP Points to the compiled pattern
- \fIextra\fP Points to an associated \fBpcre[16|32]_extra\fP structure,
- or is NULL
- \fIsubject\fP Points to the subject string
- \fIlength\fP Length of the subject string, in bytes
- \fIstartoffset\fP Offset in bytes in the subject at which to
- start matching
- \fIoptions\fP Option bits
- \fIovector\fP Points to a vector of ints for result offsets
- \fIovecsize\fP Number of elements in the vector (a multiple of 3)
- \fIjstack\fP Pointer to a JIT stack
-.sp
-The allowed options are:
-.sp
- PCRE_NOTBOL Subject string is not the beginning of a line
- PCRE_NOTEOL Subject string is not the end of a line
- PCRE_NOTEMPTY An empty string is not a valid match
- PCRE_NOTEMPTY_ATSTART An empty string at the start of the subject
- is not a valid match
- PCRE_NO_UTF16_CHECK Do not check the subject for UTF-16
- validity (only relevant if PCRE_UTF16
- was set at compile time)
- PCRE_NO_UTF32_CHECK Do not check the subject for UTF-32
- validity (only relevant if PCRE_UTF32
- was set at compile time)
- 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
- PCRE_PARTIAL_SOFT ) match if no full matches are found
- PCRE_PARTIAL_HARD Return PCRE_ERROR_PARTIAL for a partial match
- if that is found before a full match
-.sp
-However, the PCRE_NO_UTF[8|16|32]_CHECK options have no effect, as this check
-is never applied. For details of partial matching, see the
-.\" HREF
-\fBpcrepartial\fP
-.\"
-page. A \fBpcre_extra\fP structure contains the following fields:
-.sp
- \fIflags\fP Bits indicating which fields are set
- \fIstudy_data\fP Opaque data from \fBpcre[16|32]_study()\fP
- \fImatch_limit\fP Limit on internal resource use
- \fImatch_limit_recursion\fP Limit on internal recursion depth
- \fIcallout_data\fP Opaque data passed back to callouts
- \fItables\fP Points to character tables or is NULL
- \fImark\fP For passing back a *MARK pointer
- \fIexecutable_jit\fP Opaque data from JIT compilation
-.sp
-The flag bits are PCRE_EXTRA_STUDY_DATA, PCRE_EXTRA_MATCH_LIMIT,
-PCRE_EXTRA_MATCH_LIMIT_RECURSION, PCRE_EXTRA_CALLOUT_DATA,
-PCRE_EXTRA_TABLES, PCRE_EXTRA_MARK and PCRE_EXTRA_EXECUTABLE_JIT.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the JIT API in the
-.\" HREF
-\fBpcrejit\fP
-.\"
-page.
diff --git a/libs/Pcre16/docs/doc/pcre_jit_stack_alloc.3 b/libs/Pcre16/docs/doc/pcre_jit_stack_alloc.3
deleted file mode 100644
index 11c97a0fc8..0000000000
--- a/libs/Pcre16/docs/doc/pcre_jit_stack_alloc.3
+++ /dev/null
@@ -1,43 +0,0 @@
-.TH PCRE_JIT_STACK_ALLOC 3 "24 June 2012" "PCRE 8.30"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.nf
-.B pcre_jit_stack *pcre_jit_stack_alloc(int \fIstartsize\fP,
-.B " int \fImaxsize\fP);"
-.sp
-.B pcre16_jit_stack *pcre16_jit_stack_alloc(int \fIstartsize\fP,
-.B " int \fImaxsize\fP);"
-.sp
-.B pcre32_jit_stack *pcre32_jit_stack_alloc(int \fIstartsize\fP,
-.B " int \fImaxsize\fP);"
-.fi
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function is used to create a stack for use by the code compiled by the JIT
-optimization of \fBpcre[16|32]_study()\fP. The arguments are a starting size for
-the stack, and a maximum size to which it is allowed to grow. The result can be
-passed to the JIT run-time code by \fBpcre[16|32]_assign_jit_stack()\fP, or that
-function can set up a callback for obtaining a stack. A maximum stack size of
-512K to 1M should be more than enough for any pattern. For more details, see
-the
-.\" HREF
-\fBpcrejit\fP
-.\"
-page.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/libs/Pcre16/docs/doc/pcre_jit_stack_free.3 b/libs/Pcre16/docs/doc/pcre_jit_stack_free.3
deleted file mode 100644
index 494724e844..0000000000
--- a/libs/Pcre16/docs/doc/pcre_jit_stack_free.3
+++ /dev/null
@@ -1,35 +0,0 @@
-.TH PCRE_JIT_STACK_FREE 3 "24 June 2012" "PCRE 8.30"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B void pcre_jit_stack_free(pcre_jit_stack *\fIstack\fP);
-.PP
-.B void pcre16_jit_stack_free(pcre16_jit_stack *\fIstack\fP);
-.PP
-.B void pcre32_jit_stack_free(pcre32_jit_stack *\fIstack\fP);
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function is used to free a JIT stack that was created by
-\fBpcre[16|32]_jit_stack_alloc()\fP when it is no longer needed. For more details,
-see the
-.\" HREF
-\fBpcrejit\fP
-.\"
-page.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/libs/Pcre16/docs/doc/pcre_maketables.3 b/libs/Pcre16/docs/doc/pcre_maketables.3
deleted file mode 100644
index b2c3d23aa6..0000000000
--- a/libs/Pcre16/docs/doc/pcre_maketables.3
+++ /dev/null
@@ -1,33 +0,0 @@
-.TH PCRE_MAKETABLES 3 "24 June 2012" "PCRE 8.30"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B const unsigned char *pcre_maketables(void);
-.PP
-.B const unsigned char *pcre16_maketables(void);
-.PP
-.B const unsigned char *pcre32_maketables(void);
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function builds a set of character tables for character values less than
-256. These can be passed to \fBpcre[16|32]_compile()\fP to override PCRE's
-internal, built-in tables (which were made by \fBpcre[16|32]_maketables()\fP when
-PCRE was compiled). You might want to do this if you are using a non-standard
-locale. The function yields a pointer to the tables.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/libs/Pcre16/docs/doc/pcre_pattern_to_host_byte_order.3 b/libs/Pcre16/docs/doc/pcre_pattern_to_host_byte_order.3
deleted file mode 100644
index b0c41c38e8..0000000000
--- a/libs/Pcre16/docs/doc/pcre_pattern_to_host_byte_order.3
+++ /dev/null
@@ -1,44 +0,0 @@
-.TH PCRE_PATTERN_TO_HOST_BYTE_ORDER 3 "24 June 2012" "PCRE 8.30"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.nf
-.B int pcre_pattern_to_host_byte_order(pcre *\fIcode\fP,
-.B " pcre_extra *\fIextra\fP, const unsigned char *\fItables\fP);"
-.sp
-.B int pcre16_pattern_to_host_byte_order(pcre16 *\fIcode\fP,
-.B " pcre16_extra *\fIextra\fP, const unsigned char *\fItables\fP);"
-.sp
-.B int pcre32_pattern_to_host_byte_order(pcre32 *\fIcode\fP,
-.B " pcre32_extra *\fIextra\fP, const unsigned char *\fItables\fP);"
-.fi
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function ensures that the bytes in 2-byte and 4-byte values in a compiled
-pattern are in the correct order for the current host. It is useful when a
-pattern that has been compiled on one host is transferred to another that might
-have different endianness. The arguments are:
-.sp
- \fIcode\fP A compiled regular expression
- \fIextra\fP Points to an associated \fBpcre[16|32]_extra\fP structure,
- or is NULL
- \fItables\fP Pointer to character tables, or NULL to
- set the built-in default
-.sp
-The result is 0 for success, a negative PCRE_ERROR_xxx value otherwise.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/libs/Pcre16/docs/doc/pcre_refcount.3 b/libs/Pcre16/docs/doc/pcre_refcount.3
deleted file mode 100644
index 45a41fef6a..0000000000
--- a/libs/Pcre16/docs/doc/pcre_refcount.3
+++ /dev/null
@@ -1,36 +0,0 @@
-.TH PCRE_REFCOUNT 3 "24 June 2012" "PCRE 8.30"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B int pcre_refcount(pcre *\fIcode\fP, int \fIadjust\fP);
-.PP
-.B int pcre16_refcount(pcre16 *\fIcode\fP, int \fIadjust\fP);
-.PP
-.B int pcre32_refcount(pcre32 *\fIcode\fP, int \fIadjust\fP);
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function is used to maintain a reference count inside a data block that
-contains a compiled pattern. Its arguments are:
-.sp
- \fIcode\fP Compiled regular expression
- \fIadjust\fP Adjustment to reference value
-.sp
-The yield of the function is the adjusted reference value, which is constrained
-to lie between 0 and 65535.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/libs/Pcre16/docs/doc/pcre_study.3 b/libs/Pcre16/docs/doc/pcre_study.3
deleted file mode 100644
index 1200e0a668..0000000000
--- a/libs/Pcre16/docs/doc/pcre_study.3
+++ /dev/null
@@ -1,54 +0,0 @@
-.TH PCRE_STUDY 3 " 24 June 2012" "PCRE 8.30"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.nf
-.B pcre_extra *pcre_study(const pcre *\fIcode\fP, int \fIoptions\fP,
-.B " const char **\fIerrptr\fP);"
-.sp
-.B pcre16_extra *pcre16_study(const pcre16 *\fIcode\fP, int \fIoptions\fP,
-.B " const char **\fIerrptr\fP);"
-.sp
-.B pcre32_extra *pcre32_study(const pcre32 *\fIcode\fP, int \fIoptions\fP,
-.B " const char **\fIerrptr\fP);"
-.fi
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function studies a compiled pattern, to see if additional information can
-be extracted that might speed up matching. Its arguments are:
-.sp
- \fIcode\fP A compiled regular expression
- \fIoptions\fP Options for \fBpcre[16|32]_study()\fP
- \fIerrptr\fP Where to put an error message
-.sp
-If the function succeeds, it returns a value that can be passed to
-\fBpcre[16|32]_exec()\fP or \fBpcre[16|32]_dfa_exec()\fP via their \fIextra\fP
-arguments.
-.P
-If the function returns NULL, either it could not find any additional
-information, or there was an error. You can tell the difference by looking at
-the error value. It is NULL in first case.
-.P
-The only option is PCRE_STUDY_JIT_COMPILE. It requests just-in-time compilation
-if possible. If PCRE has been compiled without JIT support, this option is
-ignored. See the
-.\" HREF
-\fBpcrejit\fP
-.\"
-page for further details.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/libs/Pcre16/docs/doc/pcre_utf16_to_host_byte_order.3 b/libs/Pcre16/docs/doc/pcre_utf16_to_host_byte_order.3
deleted file mode 100644
index 1851b619da..0000000000
--- a/libs/Pcre16/docs/doc/pcre_utf16_to_host_byte_order.3
+++ /dev/null
@@ -1,45 +0,0 @@
-.TH PCRE_UTF16_TO_HOST_BYTE_ORDER 3 "21 January 2012" "PCRE 8.30"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.nf
-.B int pcre16_utf16_to_host_byte_order(PCRE_UCHAR16 *\fIoutput\fP,
-.B " PCRE_SPTR16 \fIinput\fP, int \fIlength\fP, int *\fIhost_byte_order\fP,"
-.B " int \fIkeep_boms\fP);"
-.fi
-.
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function, which exists only in the 16-bit library, converts a UTF-16
-string to the correct order for the current host, taking account of any byte
-order marks (BOMs) within the string. Its arguments are:
-.sp
- \fIoutput\fP pointer to output buffer, may be the same as \fIinput\fP
- \fIinput\fP pointer to input buffer
- \fIlength\fP number of 16-bit units in the input, or negative for
- a zero-terminated string
- \fIhost_byte_order\fP a NULL value or a non-zero value pointed to means
- start in host byte order
- \fIkeep_boms\fP if non-zero, BOMs are copied to the output string
-.sp
-The result of the function is the number of 16-bit units placed into the output
-buffer, including the zero terminator if the string was zero-terminated.
-.P
-If \fIhost_byte_order\fP is not NULL, it is set to indicate the byte order that
-is current at the end of the string.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/libs/Pcre16/docs/doc/pcre_utf32_to_host_byte_order.3 b/libs/Pcre16/docs/doc/pcre_utf32_to_host_byte_order.3
deleted file mode 100644
index a415dcf5fa..0000000000
--- a/libs/Pcre16/docs/doc/pcre_utf32_to_host_byte_order.3
+++ /dev/null
@@ -1,45 +0,0 @@
-.TH PCRE_UTF32_TO_HOST_BYTE_ORDER 3 "24 June 2012" "PCRE 8.30"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.nf
-.B int pcre32_utf32_to_host_byte_order(PCRE_UCHAR32 *\fIoutput\fP,
-.B " PCRE_SPTR32 \fIinput\fP, int \fIlength\fP, int *\fIhost_byte_order\fP,"
-.B " int \fIkeep_boms\fP);"
-.fi
-.
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function, which exists only in the 32-bit library, converts a UTF-32
-string to the correct order for the current host, taking account of any byte
-order marks (BOMs) within the string. Its arguments are:
-.sp
- \fIoutput\fP pointer to output buffer, may be the same as \fIinput\fP
- \fIinput\fP pointer to input buffer
- \fIlength\fP number of 32-bit units in the input, or negative for
- a zero-terminated string
- \fIhost_byte_order\fP a NULL value or a non-zero value pointed to means
- start in host byte order
- \fIkeep_boms\fP if non-zero, BOMs are copied to the output string
-.sp
-The result of the function is the number of 32-bit units placed into the output
-buffer, including the zero terminator if the string was zero-terminated.
-.P
-If \fIhost_byte_order\fP is not NULL, it is set to indicate the byte order that
-is current at the end of the string.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/libs/Pcre16/docs/doc/pcre_version.3 b/libs/Pcre16/docs/doc/pcre_version.3
deleted file mode 100644
index 0f4973f9c7..0000000000
--- a/libs/Pcre16/docs/doc/pcre_version.3
+++ /dev/null
@@ -1,31 +0,0 @@
-.TH PCRE_VERSION 3 "24 June 2012" "PCRE 8.30"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B const char *pcre_version(void);
-.PP
-.B const char *pcre16_version(void);
-.PP
-.B const char *pcre32_version(void);
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function (even in the 16-bit and 32-bit libraries) returns a
-zero-terminated, 8-bit character string that gives the version number of the
-PCRE library and the date of its release.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/libs/Pcre16/docs/doc/pcreapi.3 b/libs/Pcre16/docs/doc/pcreapi.3
deleted file mode 100644
index 6e7c7c6e3c..0000000000
--- a/libs/Pcre16/docs/doc/pcreapi.3
+++ /dev/null
@@ -1,2918 +0,0 @@
-.TH PCREAPI 3 "18 December 2015" "PCRE 8.39"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.sp
-.B #include <pcre.h>
-.
-.
-.SH "PCRE NATIVE API BASIC FUNCTIONS"
-.rs
-.sp
-.nf
-.B pcre *pcre_compile(const char *\fIpattern\fP, int \fIoptions\fP,
-.B " const char **\fIerrptr\fP, int *\fIerroffset\fP,"
-.B " const unsigned char *\fItableptr\fP);"
-.sp
-.B pcre *pcre_compile2(const char *\fIpattern\fP, int \fIoptions\fP,
-.B " int *\fIerrorcodeptr\fP,"
-.B " const char **\fIerrptr\fP, int *\fIerroffset\fP,"
-.B " const unsigned char *\fItableptr\fP);"
-.sp
-.B pcre_extra *pcre_study(const pcre *\fIcode\fP, int \fIoptions\fP,
-.B " const char **\fIerrptr\fP);"
-.sp
-.B void pcre_free_study(pcre_extra *\fIextra\fP);
-.sp
-.B int pcre_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
-.B " const char *\fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
-.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);"
-.sp
-.B int pcre_dfa_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
-.B " const char *\fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
-.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,"
-.B " int *\fIworkspace\fP, int \fIwscount\fP);"
-.fi
-.
-.
-.SH "PCRE NATIVE API STRING EXTRACTION FUNCTIONS"
-.rs
-.sp
-.nf
-.B int pcre_copy_named_substring(const pcre *\fIcode\fP,
-.B " const char *\fIsubject\fP, int *\fIovector\fP,"
-.B " int \fIstringcount\fP, const char *\fIstringname\fP,"
-.B " char *\fIbuffer\fP, int \fIbuffersize\fP);"
-.sp
-.B int pcre_copy_substring(const char *\fIsubject\fP, int *\fIovector\fP,
-.B " int \fIstringcount\fP, int \fIstringnumber\fP, char *\fIbuffer\fP,"
-.B " int \fIbuffersize\fP);"
-.sp
-.B int pcre_get_named_substring(const pcre *\fIcode\fP,
-.B " const char *\fIsubject\fP, int *\fIovector\fP,"
-.B " int \fIstringcount\fP, const char *\fIstringname\fP,"
-.B " const char **\fIstringptr\fP);"
-.sp
-.B int pcre_get_stringnumber(const pcre *\fIcode\fP,
-.B " const char *\fIname\fP);"
-.sp
-.B int pcre_get_stringtable_entries(const pcre *\fIcode\fP,
-.B " const char *\fIname\fP, char **\fIfirst\fP, char **\fIlast\fP);"
-.sp
-.B int pcre_get_substring(const char *\fIsubject\fP, int *\fIovector\fP,
-.B " int \fIstringcount\fP, int \fIstringnumber\fP,"
-.B " const char **\fIstringptr\fP);"
-.sp
-.B int pcre_get_substring_list(const char *\fIsubject\fP,
-.B " int *\fIovector\fP, int \fIstringcount\fP, const char ***\fIlistptr\fP);"
-.sp
-.B void pcre_free_substring(const char *\fIstringptr\fP);
-.sp
-.B void pcre_free_substring_list(const char **\fIstringptr\fP);
-.fi
-.
-.
-.SH "PCRE NATIVE API AUXILIARY FUNCTIONS"
-.rs
-.sp
-.nf
-.B int pcre_jit_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
-.B " const char *\fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
-.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,"
-.B " pcre_jit_stack *\fIjstack\fP);"
-.sp
-.B pcre_jit_stack *pcre_jit_stack_alloc(int \fIstartsize\fP, int \fImaxsize\fP);
-.sp
-.B void pcre_jit_stack_free(pcre_jit_stack *\fIstack\fP);
-.sp
-.B void pcre_assign_jit_stack(pcre_extra *\fIextra\fP,
-.B " pcre_jit_callback \fIcallback\fP, void *\fIdata\fP);"
-.sp
-.B const unsigned char *pcre_maketables(void);
-.sp
-.B int pcre_fullinfo(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
-.B " int \fIwhat\fP, void *\fIwhere\fP);"
-.sp
-.B int pcre_refcount(pcre *\fIcode\fP, int \fIadjust\fP);
-.sp
-.B int pcre_config(int \fIwhat\fP, void *\fIwhere\fP);
-.sp
-.B const char *pcre_version(void);
-.sp
-.B int pcre_pattern_to_host_byte_order(pcre *\fIcode\fP,
-.B " pcre_extra *\fIextra\fP, const unsigned char *\fItables\fP);"
-.fi
-.
-.
-.SH "PCRE NATIVE API INDIRECTED FUNCTIONS"
-.rs
-.sp
-.nf
-.B void *(*pcre_malloc)(size_t);
-.sp
-.B void (*pcre_free)(void *);
-.sp
-.B void *(*pcre_stack_malloc)(size_t);
-.sp
-.B void (*pcre_stack_free)(void *);
-.sp
-.B int (*pcre_callout)(pcre_callout_block *);
-.sp
-.B int (*pcre_stack_guard)(void);
-.fi
-.
-.
-.SH "PCRE 8-BIT, 16-BIT, AND 32-BIT LIBRARIES"
-.rs
-.sp
-As well as support for 8-bit character strings, PCRE also supports 16-bit
-strings (from release 8.30) and 32-bit strings (from release 8.32), by means of
-two additional libraries. They can be built as well as, or instead of, the
-8-bit library. To avoid too much complication, this document describes the
-8-bit versions of the functions, with only occasional references to the 16-bit
-and 32-bit libraries.
-.P
-The 16-bit and 32-bit functions operate in the same way as their 8-bit
-counterparts; they just use different data types for their arguments and
-results, and their names start with \fBpcre16_\fP or \fBpcre32_\fP instead of
-\fBpcre_\fP. For every option that has UTF8 in its name (for example,
-PCRE_UTF8), there are corresponding 16-bit and 32-bit names with UTF8 replaced
-by UTF16 or UTF32, respectively. This facility is in fact just cosmetic; the
-16-bit and 32-bit option names define the same bit values.
-.P
-References to bytes and UTF-8 in this document should be read as references to
-16-bit data units and UTF-16 when using the 16-bit library, or 32-bit data
-units and UTF-32 when using the 32-bit library, unless specified otherwise.
-More details of the specific differences for the 16-bit and 32-bit libraries
-are given in the
-.\" HREF
-\fBpcre16\fP
-.\"
-and
-.\" HREF
-\fBpcre32\fP
-.\"
-pages.
-.
-.
-.SH "PCRE API OVERVIEW"
-.rs
-.sp
-PCRE has its own native API, which is described in this document. There are
-also some wrapper functions (for the 8-bit library only) that correspond to the
-POSIX regular expression API, but they do not give access to all the
-functionality. They are described in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-documentation. Both of these APIs define a set of C function calls. A C++
-wrapper (again for the 8-bit library only) is also distributed with PCRE. It is
-documented in the
-.\" HREF
-\fBpcrecpp\fP
-.\"
-page.
-.P
-The native API C function prototypes are defined in the header file
-\fBpcre.h\fP, and on Unix-like systems the (8-bit) library itself is called
-\fBlibpcre\fP. It can normally be accessed by adding \fB-lpcre\fP to the
-command for linking an application that uses PCRE. The header file defines the
-macros PCRE_MAJOR and PCRE_MINOR to contain the major and minor release numbers
-for the library. Applications can use these to include support for different
-releases of PCRE.
-.P
-In a Windows environment, if you want to statically link an application program
-against a non-dll \fBpcre.a\fP file, you must define PCRE_STATIC before
-including \fBpcre.h\fP or \fBpcrecpp.h\fP, because otherwise the
-\fBpcre_malloc()\fP and \fBpcre_free()\fP exported functions will be declared
-\fB__declspec(dllimport)\fP, with unwanted results.
-.P
-The functions \fBpcre_compile()\fP, \fBpcre_compile2()\fP, \fBpcre_study()\fP,
-and \fBpcre_exec()\fP are used for compiling and matching regular expressions
-in a Perl-compatible manner. A sample program that demonstrates the simplest
-way of using them is provided in the file called \fIpcredemo.c\fP in the PCRE
-source distribution. A listing of this program is given in the
-.\" HREF
-\fBpcredemo\fP
-.\"
-documentation, and the
-.\" HREF
-\fBpcresample\fP
-.\"
-documentation describes how to compile and run it.
-.P
-Just-in-time compiler support is an optional feature of PCRE that can be built
-in appropriate hardware environments. It greatly speeds up the matching
-performance of many patterns. Simple programs can easily request that it be
-used if available, by setting an option that is ignored when it is not
-relevant. More complicated programs might need to make use of the functions
-\fBpcre_jit_stack_alloc()\fP, \fBpcre_jit_stack_free()\fP, and
-\fBpcre_assign_jit_stack()\fP in order to control the JIT code's memory usage.
-.P
-From release 8.32 there is also a direct interface for JIT execution, which
-gives improved performance. The JIT-specific functions are discussed in the
-.\" HREF
-\fBpcrejit\fP
-.\"
-documentation.
-.P
-A second matching function, \fBpcre_dfa_exec()\fP, which is not
-Perl-compatible, is also provided. This uses a different algorithm for the
-matching. The alternative algorithm finds all possible matches (at a given
-point in the subject), and scans the subject just once (unless there are
-lookbehind assertions). However, this algorithm does not return captured
-substrings. A description of the two matching algorithms and their advantages
-and disadvantages is given in the
-.\" HREF
-\fBpcrematching\fP
-.\"
-documentation.
-.P
-In addition to the main compiling and matching functions, there are convenience
-functions for extracting captured substrings from a subject string that is
-matched by \fBpcre_exec()\fP. They are:
-.sp
- \fBpcre_copy_substring()\fP
- \fBpcre_copy_named_substring()\fP
- \fBpcre_get_substring()\fP
- \fBpcre_get_named_substring()\fP
- \fBpcre_get_substring_list()\fP
- \fBpcre_get_stringnumber()\fP
- \fBpcre_get_stringtable_entries()\fP
-.sp
-\fBpcre_free_substring()\fP and \fBpcre_free_substring_list()\fP are also
-provided, to free the memory used for extracted strings.
-.P
-The function \fBpcre_maketables()\fP is used to build a set of character tables
-in the current locale for passing to \fBpcre_compile()\fP, \fBpcre_exec()\fP,
-or \fBpcre_dfa_exec()\fP. This is an optional facility that is provided for
-specialist use. Most commonly, no special tables are passed, in which case
-internal tables that are generated when PCRE is built are used.
-.P
-The function \fBpcre_fullinfo()\fP is used to find out information about a
-compiled pattern. The function \fBpcre_version()\fP returns a pointer to a
-string containing the version of PCRE and its date of release.
-.P
-The function \fBpcre_refcount()\fP maintains a reference count in a data block
-containing a compiled pattern. This is provided for the benefit of
-object-oriented applications.
-.P
-The global variables \fBpcre_malloc\fP and \fBpcre_free\fP initially contain
-the entry points of the standard \fBmalloc()\fP and \fBfree()\fP functions,
-respectively. PCRE calls the memory management functions via these variables,
-so a calling program can replace them if it wishes to intercept the calls. This
-should be done before calling any PCRE functions.
-.P
-The global variables \fBpcre_stack_malloc\fP and \fBpcre_stack_free\fP are also
-indirections to memory management functions. These special functions are used
-only when PCRE is compiled to use the heap for remembering data, instead of
-recursive function calls, when running the \fBpcre_exec()\fP function. See the
-.\" HREF
-\fBpcrebuild\fP
-.\"
-documentation for details of how to do this. It is a non-standard way of
-building PCRE, for use in environments that have limited stacks. Because of the
-greater use of memory management, it runs more slowly. Separate functions are
-provided so that special-purpose external code can be used for this case. When
-used, these functions always allocate memory blocks of the same size. There is
-a discussion about PCRE's stack usage in the
-.\" HREF
-\fBpcrestack\fP
-.\"
-documentation.
-.P
-The global variable \fBpcre_callout\fP initially contains NULL. It can be set
-by the caller to a "callout" function, which PCRE will then call at specified
-points during a matching operation. Details are given in the
-.\" HREF
-\fBpcrecallout\fP
-.\"
-documentation.
-.P
-The global variable \fBpcre_stack_guard\fP initially contains NULL. It can be
-set by the caller to a function that is called by PCRE whenever it starts
-to compile a parenthesized part of a pattern. When parentheses are nested, PCRE
-uses recursive function calls, which use up the system stack. This function is
-provided so that applications with restricted stacks can force a compilation
-error if the stack runs out. The function should return zero if all is well, or
-non-zero to force an error.
-.
-.
-.\" HTML <a name="newlines"></a>
-.SH NEWLINES
-.rs
-.sp
-PCRE supports five different conventions for indicating line breaks in
-strings: a single CR (carriage return) character, a single LF (linefeed)
-character, the two-character sequence CRLF, any of the three preceding, or any
-Unicode newline sequence. The Unicode newline sequences are the three just
-mentioned, plus the single characters VT (vertical tab, U+000B), FF (form feed,
-U+000C), NEL (next line, U+0085), LS (line separator, U+2028), and PS
-(paragraph separator, U+2029).
-.P
-Each of the first three conventions is used by at least one operating system as
-its standard newline sequence. When PCRE is built, a default can be specified.
-The default default is LF, which is the Unix standard. When PCRE is run, the
-default can be overridden, either when a pattern is compiled, or when it is
-matched.
-.P
-At compile time, the newline convention can be specified by the \fIoptions\fP
-argument of \fBpcre_compile()\fP, or it can be specified by special text at the
-start of the pattern itself; this overrides any other settings. See the
-.\" HREF
-\fBpcrepattern\fP
-.\"
-page for details of the special character sequences.
-.P
-In the PCRE documentation the word "newline" is used to mean "the character or
-pair of characters that indicate a line break". The choice of newline
-convention affects the handling of the dot, circumflex, and dollar
-metacharacters, the handling of #-comments in /x mode, and, when CRLF is a
-recognized line ending sequence, the match position advancement for a
-non-anchored pattern. There is more detail about this in the
-.\" HTML <a href="#execoptions">
-.\" </a>
-section on \fBpcre_exec()\fP options
-.\"
-below.
-.P
-The choice of newline convention does not affect the interpretation of
-the \en or \er escape sequences, nor does it affect what \eR matches, which is
-controlled in a similar way, but by separate options.
-.
-.
-.SH MULTITHREADING
-.rs
-.sp
-The PCRE functions can be used in multi-threading applications, with the
-proviso that the memory management functions pointed to by \fBpcre_malloc\fP,
-\fBpcre_free\fP, \fBpcre_stack_malloc\fP, and \fBpcre_stack_free\fP, and the
-callout and stack-checking functions pointed to by \fBpcre_callout\fP and
-\fBpcre_stack_guard\fP, are shared by all threads.
-.P
-The compiled form of a regular expression is not altered during matching, so
-the same compiled pattern can safely be used by several threads at once.
-.P
-If the just-in-time optimization feature is being used, it needs separate
-memory stack areas for each thread. See the
-.\" HREF
-\fBpcrejit\fP
-.\"
-documentation for more details.
-.
-.
-.SH "SAVING PRECOMPILED PATTERNS FOR LATER USE"
-.rs
-.sp
-The compiled form of a regular expression can be saved and re-used at a later
-time, possibly by a different program, and even on a host other than the one on
-which it was compiled. Details are given in the
-.\" HREF
-\fBpcreprecompile\fP
-.\"
-documentation, which includes a description of the
-\fBpcre_pattern_to_host_byte_order()\fP function. However, compiling a regular
-expression with one version of PCRE for use with a different version is not
-guaranteed to work and may cause crashes.
-.
-.
-.SH "CHECKING BUILD-TIME OPTIONS"
-.rs
-.sp
-.B int pcre_config(int \fIwhat\fP, void *\fIwhere\fP);
-.PP
-The function \fBpcre_config()\fP makes it possible for a PCRE client to
-discover which optional features have been compiled into the PCRE library. The
-.\" HREF
-\fBpcrebuild\fP
-.\"
-documentation has more details about these optional features.
-.P
-The first argument for \fBpcre_config()\fP is an integer, specifying which
-information is required; the second argument is a pointer to a variable into
-which the information is placed. The returned value is zero on success, or the
-negative error code PCRE_ERROR_BADOPTION if the value in the first argument is
-not recognized. The following information is available:
-.sp
- PCRE_CONFIG_UTF8
-.sp
-The output is an integer that is set to one if UTF-8 support is available;
-otherwise it is set to zero. This value should normally be given to the 8-bit
-version of this function, \fBpcre_config()\fP. If it is given to the 16-bit
-or 32-bit version of this function, the result is PCRE_ERROR_BADOPTION.
-.sp
- PCRE_CONFIG_UTF16
-.sp
-The output is an integer that is set to one if UTF-16 support is available;
-otherwise it is set to zero. This value should normally be given to the 16-bit
-version of this function, \fBpcre16_config()\fP. If it is given to the 8-bit
-or 32-bit version of this function, the result is PCRE_ERROR_BADOPTION.
-.sp
- PCRE_CONFIG_UTF32
-.sp
-The output is an integer that is set to one if UTF-32 support is available;
-otherwise it is set to zero. This value should normally be given to the 32-bit
-version of this function, \fBpcre32_config()\fP. If it is given to the 8-bit
-or 16-bit version of this function, the result is PCRE_ERROR_BADOPTION.
-.sp
- PCRE_CONFIG_UNICODE_PROPERTIES
-.sp
-The output is an integer that is set to one if support for Unicode character
-properties is available; otherwise it is set to zero.
-.sp
- PCRE_CONFIG_JIT
-.sp
-The output is an integer that is set to one if support for just-in-time
-compiling is available; otherwise it is set to zero.
-.sp
- PCRE_CONFIG_JITTARGET
-.sp
-The output is a pointer to a zero-terminated "const char *" string. If JIT
-support is available, the string contains the name of the architecture for
-which the JIT compiler is configured, for example "x86 32bit (little endian +
-unaligned)". If JIT support is not available, the result is NULL.
-.sp
- PCRE_CONFIG_NEWLINE
-.sp
-The output is an integer whose value specifies the default character sequence
-that is recognized as meaning "newline". The values that are supported in
-ASCII/Unicode environments are: 10 for LF, 13 for CR, 3338 for CRLF, -2 for
-ANYCRLF, and -1 for ANY. In EBCDIC environments, CR, ANYCRLF, and ANY yield the
-same values. However, the value for LF is normally 21, though some EBCDIC
-environments use 37. The corresponding values for CRLF are 3349 and 3365. The
-default should normally correspond to the standard sequence for your operating
-system.
-.sp
- PCRE_CONFIG_BSR
-.sp
-The output is an integer whose value indicates what character sequences the \eR
-escape sequence matches by default. A value of 0 means that \eR matches any
-Unicode line ending sequence; a value of 1 means that \eR matches only CR, LF,
-or CRLF. The default can be overridden when a pattern is compiled or matched.
-.sp
- PCRE_CONFIG_LINK_SIZE
-.sp
-The output is an integer that contains the number of bytes used for internal
-linkage in compiled regular expressions. For the 8-bit library, the value can
-be 2, 3, or 4. For the 16-bit library, the value is either 2 or 4 and is still
-a number of bytes. For the 32-bit library, the value is either 2 or 4 and is
-still a number of bytes. The default value of 2 is sufficient for all but the
-most massive patterns, since it allows the compiled pattern to be up to 64K in
-size. Larger values allow larger regular expressions to be compiled, at the
-expense of slower matching.
-.sp
- PCRE_CONFIG_POSIX_MALLOC_THRESHOLD
-.sp
-The output is an integer that contains the threshold above which the POSIX
-interface uses \fBmalloc()\fP for output vectors. Further details are given in
-the
-.\" HREF
-\fBpcreposix\fP
-.\"
-documentation.
-.sp
- PCRE_CONFIG_PARENS_LIMIT
-.sp
-The output is a long integer that gives the maximum depth of nesting of
-parentheses (of any kind) in a pattern. This limit is imposed to cap the amount
-of system stack used when a pattern is compiled. It is specified when PCRE is
-built; the default is 250. This limit does not take into account the stack that
-may already be used by the calling application. For finer control over
-compilation stack usage, you can set a pointer to an external checking function
-in \fBpcre_stack_guard\fP.
-.sp
- PCRE_CONFIG_MATCH_LIMIT
-.sp
-The output is a long integer that gives the default limit for the number of
-internal matching function calls in a \fBpcre_exec()\fP execution. Further
-details are given with \fBpcre_exec()\fP below.
-.sp
- PCRE_CONFIG_MATCH_LIMIT_RECURSION
-.sp
-The output is a long integer that gives the default limit for the depth of
-recursion when calling the internal matching function in a \fBpcre_exec()\fP
-execution. Further details are given with \fBpcre_exec()\fP below.
-.sp
- PCRE_CONFIG_STACKRECURSE
-.sp
-The output is an integer that is set to one if internal recursion when running
-\fBpcre_exec()\fP is implemented by recursive function calls that use the stack
-to remember their state. This is the usual way that PCRE is compiled. The
-output is zero if PCRE was compiled to use blocks of data on the heap instead
-of recursive function calls. In this case, \fBpcre_stack_malloc\fP and
-\fBpcre_stack_free\fP are called to manage memory blocks on the heap, thus
-avoiding the use of the stack.
-.
-.
-.SH "COMPILING A PATTERN"
-.rs
-.sp
-.nf
-.B pcre *pcre_compile(const char *\fIpattern\fP, int \fIoptions\fP,
-.B " const char **\fIerrptr\fP, int *\fIerroffset\fP,"
-.B " const unsigned char *\fItableptr\fP);"
-.sp
-.B pcre *pcre_compile2(const char *\fIpattern\fP, int \fIoptions\fP,
-.B " int *\fIerrorcodeptr\fP,"
-.B " const char **\fIerrptr\fP, int *\fIerroffset\fP,"
-.B " const unsigned char *\fItableptr\fP);"
-.fi
-.P
-Either of the functions \fBpcre_compile()\fP or \fBpcre_compile2()\fP can be
-called to compile a pattern into an internal form. The only difference between
-the two interfaces is that \fBpcre_compile2()\fP has an additional argument,
-\fIerrorcodeptr\fP, via which a numerical error code can be returned. To avoid
-too much repetition, we refer just to \fBpcre_compile()\fP below, but the
-information applies equally to \fBpcre_compile2()\fP.
-.P
-The pattern is a C string terminated by a binary zero, and is passed in the
-\fIpattern\fP argument. A pointer to a single block of memory that is obtained
-via \fBpcre_malloc\fP is returned. This contains the compiled code and related
-data. The \fBpcre\fP type is defined for the returned block; this is a typedef
-for a structure whose contents are not externally defined. It is up to the
-caller to free the memory (via \fBpcre_free\fP) when it is no longer required.
-.P
-Although the compiled code of a PCRE regex is relocatable, that is, it does not
-depend on memory location, the complete \fBpcre\fP data block is not
-fully relocatable, because it may contain a copy of the \fItableptr\fP
-argument, which is an address (see below).
-.P
-The \fIoptions\fP argument contains various bit settings that affect the
-compilation. It should be zero if no options are required. The available
-options are described below. Some of them (in particular, those that are
-compatible with Perl, but some others as well) can also be set and unset from
-within the pattern (see the detailed description in the
-.\" HREF
-\fBpcrepattern\fP
-.\"
-documentation). For those options that can be different in different parts of
-the pattern, the contents of the \fIoptions\fP argument specifies their
-settings at the start of compilation and execution. The PCRE_ANCHORED,
-PCRE_BSR_\fIxxx\fP, PCRE_NEWLINE_\fIxxx\fP, PCRE_NO_UTF8_CHECK, and
-PCRE_NO_START_OPTIMIZE options can be set at the time of matching as well as at
-compile time.
-.P
-If \fIerrptr\fP is NULL, \fBpcre_compile()\fP returns NULL immediately.
-Otherwise, if compilation of a pattern fails, \fBpcre_compile()\fP returns
-NULL, and sets the variable pointed to by \fIerrptr\fP to point to a textual
-error message. This is a static string that is part of the library. You must
-not try to free it. Normally, the offset from the start of the pattern to the
-data unit that was being processed when the error was discovered is placed in
-the variable pointed to by \fIerroffset\fP, which must not be NULL (if it is,
-an immediate error is given). However, for an invalid UTF-8 or UTF-16 string,
-the offset is that of the first data unit of the failing character.
-.P
-Some errors are not detected until the whole pattern has been scanned; in these
-cases, the offset passed back is the length of the pattern. Note that the
-offset is in data units, not characters, even in a UTF mode. It may sometimes
-point into the middle of a UTF-8 or UTF-16 character.
-.P
-If \fBpcre_compile2()\fP is used instead of \fBpcre_compile()\fP, and the
-\fIerrorcodeptr\fP argument is not NULL, a non-zero error code number is
-returned via this argument in the event of an error. This is in addition to the
-textual error message. Error codes and messages are listed below.
-.P
-If the final argument, \fItableptr\fP, is NULL, PCRE uses a default set of
-character tables that are built when PCRE is compiled, using the default C
-locale. Otherwise, \fItableptr\fP must be an address that is the result of a
-call to \fBpcre_maketables()\fP. This value is stored with the compiled
-pattern, and used again by \fBpcre_exec()\fP and \fBpcre_dfa_exec()\fP when the
-pattern is matched. For more discussion, see the section on locale support
-below.
-.P
-This code fragment shows a typical straightforward call to \fBpcre_compile()\fP:
-.sp
- pcre *re;
- const char *error;
- int erroffset;
- re = pcre_compile(
- "^A.*Z", /* the pattern */
- 0, /* default options */
- &error, /* for error message */
- &erroffset, /* for error offset */
- NULL); /* use default character tables */
-.sp
-The following names for option bits are defined in the \fBpcre.h\fP header
-file:
-.sp
- PCRE_ANCHORED
-.sp
-If this bit is set, the pattern is forced to be "anchored", that is, it is
-constrained to match only at the first matching point in the string that is
-being searched (the "subject string"). This effect can also be achieved by
-appropriate constructs in the pattern itself, which is the only way to do it in
-Perl.
-.sp
- PCRE_AUTO_CALLOUT
-.sp
-If this bit is set, \fBpcre_compile()\fP automatically inserts callout items,
-all with number 255, before each pattern item. For discussion of the callout
-facility, see the
-.\" HREF
-\fBpcrecallout\fP
-.\"
-documentation.
-.sp
- PCRE_BSR_ANYCRLF
- PCRE_BSR_UNICODE
-.sp
-These options (which are mutually exclusive) control what the \eR escape
-sequence matches. The choice is either to match only CR, LF, or CRLF, or to
-match any Unicode newline sequence. The default is specified when PCRE is
-built. It can be overridden from within the pattern, or by setting an option
-when a compiled pattern is matched.
-.sp
- PCRE_CASELESS
-.sp
-If this bit is set, letters in the pattern match both upper and lower case
-letters. It is equivalent to Perl's /i option, and it can be changed within a
-pattern by a (?i) option setting. In UTF-8 mode, PCRE always understands the
-concept of case for characters whose values are less than 128, so caseless
-matching is always possible. For characters with higher values, the concept of
-case is supported if PCRE is compiled with Unicode property support, but not
-otherwise. If you want to use caseless matching for characters 128 and above,
-you must ensure that PCRE is compiled with Unicode property support as well as
-with UTF-8 support.
-.sp
- PCRE_DOLLAR_ENDONLY
-.sp
-If this bit is set, a dollar metacharacter in the pattern matches only at the
-end of the subject string. Without this option, a dollar also matches
-immediately before a newline at the end of the string (but not before any other
-newlines). The PCRE_DOLLAR_ENDONLY option is ignored if PCRE_MULTILINE is set.
-There is no equivalent to this option in Perl, and no way to set it within a
-pattern.
-.sp
- PCRE_DOTALL
-.sp
-If this bit is set, a dot metacharacter in the pattern matches a character of
-any value, including one that indicates a newline. However, it only ever
-matches one character, even if newlines are coded as CRLF. Without this option,
-a dot does not match when the current position is at a newline. This option is
-equivalent to Perl's /s option, and it can be changed within a pattern by a
-(?s) option setting. A negative class such as [^a] always matches newline
-characters, independent of the setting of this option.
-.sp
- PCRE_DUPNAMES
-.sp
-If this bit is set, names used to identify capturing subpatterns need not be
-unique. This can be helpful for certain types of pattern when it is known that
-only one instance of the named subpattern can ever be matched. There are more
-details of named subpatterns below; see also the
-.\" HREF
-\fBpcrepattern\fP
-.\"
-documentation.
-.sp
- PCRE_EXTENDED
-.sp
-If this bit is set, most white space characters in the pattern are totally
-ignored except when escaped or inside a character class. However, white space
-is not allowed within sequences such as (?> that introduce various
-parenthesized subpatterns, nor within a numerical quantifier such as {1,3}.
-However, ignorable white space is permitted between an item and a following
-quantifier and between a quantifier and a following + that indicates
-possessiveness.
-.P
-White space did not used to include the VT character (code 11), because Perl
-did not treat this character as white space. However, Perl changed at release
-5.18, so PCRE followed at release 8.34, and VT is now treated as white space.
-.P
-PCRE_EXTENDED also causes characters between an unescaped # outside a character
-class and the next newline, inclusive, to be ignored. PCRE_EXTENDED is
-equivalent to Perl's /x option, and it can be changed within a pattern by a
-(?x) option setting.
-.P
-Which characters are interpreted as newlines is controlled by the options
-passed to \fBpcre_compile()\fP or by a special sequence at the start of the
-pattern, as described in the section entitled
-.\" HTML <a href="pcrepattern.html#newlines">
-.\" </a>
-"Newline conventions"
-.\"
-in the \fBpcrepattern\fP documentation. Note that the end of this type of
-comment is a literal newline sequence in the pattern; escape sequences that
-happen to represent a newline do not count.
-.P
-This option makes it possible to include comments inside complicated patterns.
-Note, however, that this applies only to data characters. White space characters
-may never appear within special character sequences in a pattern, for example
-within the sequence (?( that introduces a conditional subpattern.
-.sp
- PCRE_EXTRA
-.sp
-This option was invented in order to turn on additional functionality of PCRE
-that is incompatible with Perl, but it is currently of very little use. When
-set, any backslash in a pattern that is followed by a letter that has no
-special meaning causes an error, thus reserving these combinations for future
-expansion. By default, as in Perl, a backslash followed by a letter with no
-special meaning is treated as a literal. (Perl can, however, be persuaded to
-give an error for this, by running it with the -w option.) There are at present
-no other features controlled by this option. It can also be set by a (?X)
-option setting within a pattern.
-.sp
- PCRE_FIRSTLINE
-.sp
-If this option is set, an unanchored pattern is required to match before or at
-the first newline in the subject string, though the matched text may continue
-over the newline.
-.sp
- PCRE_JAVASCRIPT_COMPAT
-.sp
-If this option is set, PCRE's behaviour is changed in some ways so that it is
-compatible with JavaScript rather than Perl. The changes are as follows:
-.P
-(1) A lone closing square bracket in a pattern causes a compile-time error,
-because this is illegal in JavaScript (by default it is treated as a data
-character). Thus, the pattern AB]CD becomes illegal when this option is set.
-.P
-(2) At run time, a back reference to an unset subpattern group matches an empty
-string (by default this causes the current matching alternative to fail). A
-pattern such as (\e1)(a) succeeds when this option is set (assuming it can find
-an "a" in the subject), whereas it fails by default, for Perl compatibility.
-.P
-(3) \eU matches an upper case "U" character; by default \eU causes a compile
-time error (Perl uses \eU to upper case subsequent characters).
-.P
-(4) \eu matches a lower case "u" character unless it is followed by four
-hexadecimal digits, in which case the hexadecimal number defines the code point
-to match. By default, \eu causes a compile time error (Perl uses it to upper
-case the following character).
-.P
-(5) \ex matches a lower case "x" character unless it is followed by two
-hexadecimal digits, in which case the hexadecimal number defines the code point
-to match. By default, as in Perl, a hexadecimal number is always expected after
-\ex, but it may have zero, one, or two digits (so, for example, \exz matches a
-binary zero character followed by z).
-.sp
- PCRE_MULTILINE
-.sp
-By default, for the purposes of matching "start of line" and "end of line",
-PCRE treats the subject string as consisting of a single line of characters,
-even if it actually contains newlines. The "start of line" metacharacter (^)
-matches only at the start of the string, and the "end of line" metacharacter
-($) matches only at the end of the string, or before a terminating newline
-(except when PCRE_DOLLAR_ENDONLY is set). Note, however, that unless
-PCRE_DOTALL is set, the "any character" metacharacter (.) does not match at a
-newline. This behaviour (for ^, $, and dot) is the same as Perl.
-.P
-When PCRE_MULTILINE it is set, the "start of line" and "end of line" constructs
-match immediately following or immediately before internal newlines in the
-subject string, respectively, as well as at the very start and end. This is
-equivalent to Perl's /m option, and it can be changed within a pattern by a
-(?m) option setting. If there are no newlines in a subject string, or no
-occurrences of ^ or $ in a pattern, setting PCRE_MULTILINE has no effect.
-.sp
- PCRE_NEVER_UTF
-.sp
-This option locks out interpretation of the pattern as UTF-8 (or UTF-16 or
-UTF-32 in the 16-bit and 32-bit libraries). In particular, it prevents the
-creator of the pattern from switching to UTF interpretation by starting the
-pattern with (*UTF). This may be useful in applications that process patterns
-from external sources. The combination of PCRE_UTF8 and PCRE_NEVER_UTF also
-causes an error.
-.sp
- PCRE_NEWLINE_CR
- PCRE_NEWLINE_LF
- PCRE_NEWLINE_CRLF
- PCRE_NEWLINE_ANYCRLF
- PCRE_NEWLINE_ANY
-.sp
-These options override the default newline definition that was chosen when PCRE
-was built. Setting the first or the second specifies that a newline is
-indicated by a single character (CR or LF, respectively). Setting
-PCRE_NEWLINE_CRLF specifies that a newline is indicated by the two-character
-CRLF sequence. Setting PCRE_NEWLINE_ANYCRLF specifies that any of the three
-preceding sequences should be recognized. Setting PCRE_NEWLINE_ANY specifies
-that any Unicode newline sequence should be recognized.
-.P
-In an ASCII/Unicode environment, the Unicode newline sequences are the three
-just mentioned, plus the single characters VT (vertical tab, U+000B), FF (form
-feed, U+000C), NEL (next line, U+0085), LS (line separator, U+2028), and PS
-(paragraph separator, U+2029). For the 8-bit library, the last two are
-recognized only in UTF-8 mode.
-.P
-When PCRE is compiled to run in an EBCDIC (mainframe) environment, the code for
-CR is 0x0d, the same as ASCII. However, the character code for LF is normally
-0x15, though in some EBCDIC environments 0x25 is used. Whichever of these is
-not LF is made to correspond to Unicode's NEL character. EBCDIC codes are all
-less than 256. For more details, see the
-.\" HREF
-\fBpcrebuild\fP
-.\"
-documentation.
-.P
-The newline setting in the options word uses three bits that are treated
-as a number, giving eight possibilities. Currently only six are used (default
-plus the five values above). This means that if you set more than one newline
-option, the combination may or may not be sensible. For example,
-PCRE_NEWLINE_CR with PCRE_NEWLINE_LF is equivalent to PCRE_NEWLINE_CRLF, but
-other combinations may yield unused numbers and cause an error.
-.P
-The only time that a line break in a pattern is specially recognized when
-compiling is when PCRE_EXTENDED is set. CR and LF are white space characters,
-and so are ignored in this mode. Also, an unescaped # outside a character class
-indicates a comment that lasts until after the next line break sequence. In
-other circumstances, line break sequences in patterns are treated as literal
-data.
-.P
-The newline option that is set at compile time becomes the default that is used
-for \fBpcre_exec()\fP and \fBpcre_dfa_exec()\fP, but it can be overridden.
-.sp
- PCRE_NO_AUTO_CAPTURE
-.sp
-If this option is set, it disables the use of numbered capturing parentheses in
-the pattern. Any opening parenthesis that is not followed by ? behaves as if it
-were followed by ?: but named parentheses can still be used for capturing (and
-they acquire numbers in the usual way). There is no equivalent of this option
-in Perl.
-.sp
- PCRE_NO_AUTO_POSSESS
-.sp
-If this option is set, it disables "auto-possessification". This is an
-optimization that, for example, turns a+b into a++b in order to avoid
-backtracks into a+ that can never be successful. However, if callouts are in
-use, auto-possessification means that some of them are never taken. You can set
-this option if you want the matching functions to do a full unoptimized search
-and run all the callouts, but it is mainly provided for testing purposes.
-.sp
- PCRE_NO_START_OPTIMIZE
-.sp
-This is an option that acts at matching time; that is, it is really an option
-for \fBpcre_exec()\fP or \fBpcre_dfa_exec()\fP. If it is set at compile time,
-it is remembered with the compiled pattern and assumed at matching time. This
-is necessary if you want to use JIT execution, because the JIT compiler needs
-to know whether or not this option is set. For details see the discussion of
-PCRE_NO_START_OPTIMIZE
-.\" HTML <a href="#execoptions">
-.\" </a>
-below.
-.\"
-.sp
- PCRE_UCP
-.sp
-This option changes the way PCRE processes \eB, \eb, \eD, \ed, \eS, \es, \eW,
-\ew, and some of the POSIX character classes. By default, only ASCII characters
-are recognized, but if PCRE_UCP is set, Unicode properties are used instead to
-classify characters. More details are given in the section on
-.\" HTML <a href="pcre.html#genericchartypes">
-.\" </a>
-generic character types
-.\"
-in the
-.\" HREF
-\fBpcrepattern\fP
-.\"
-page. If you set PCRE_UCP, matching one of the items it affects takes much
-longer. The option is available only if PCRE has been compiled with Unicode
-property support.
-.sp
- PCRE_UNGREEDY
-.sp
-This option inverts the "greediness" of the quantifiers so that they are not
-greedy by default, but become greedy if followed by "?". It is not compatible
-with Perl. It can also be set by a (?U) option setting within the pattern.
-.sp
- PCRE_UTF8
-.sp
-This option causes PCRE to regard both the pattern and the subject as strings
-of UTF-8 characters instead of single-byte strings. However, it is available
-only when PCRE is built to include UTF support. If not, the use of this option
-provokes an error. Details of how this option changes the behaviour of PCRE are
-given in the
-.\" HREF
-\fBpcreunicode\fP
-.\"
-page.
-.sp
- PCRE_NO_UTF8_CHECK
-.sp
-When PCRE_UTF8 is set, the validity of the pattern as a UTF-8 string is
-automatically checked. There is a discussion about the
-.\" HTML <a href="pcreunicode.html#utf8strings">
-.\" </a>
-validity of UTF-8 strings
-.\"
-in the
-.\" HREF
-\fBpcreunicode\fP
-.\"
-page. If an invalid UTF-8 sequence is found, \fBpcre_compile()\fP returns an
-error. If you already know that your pattern is valid, and you want to skip
-this check for performance reasons, you can set the PCRE_NO_UTF8_CHECK option.
-When it is set, the effect of passing an invalid UTF-8 string as a pattern is
-undefined. It may cause your program to crash or loop. Note that this option
-can also be passed to \fBpcre_exec()\fP and \fBpcre_dfa_exec()\fP, to suppress
-the validity checking of subject strings only. If the same string is being
-matched many times, the option can be safely set for the second and subsequent
-matchings to improve performance.
-.
-.
-.SH "COMPILATION ERROR CODES"
-.rs
-.sp
-The following table lists the error codes than may be returned by
-\fBpcre_compile2()\fP, along with the error messages that may be returned by
-both compiling functions. Note that error messages are always 8-bit ASCII
-strings, even in 16-bit or 32-bit mode. As PCRE has developed, some error codes
-have fallen out of use. To avoid confusion, they have not been re-used.
-.sp
- 0 no error
- 1 \e at end of pattern
- 2 \ec at end of pattern
- 3 unrecognized character follows \e
- 4 numbers out of order in {} quantifier
- 5 number too big in {} quantifier
- 6 missing terminating ] for character class
- 7 invalid escape sequence in character class
- 8 range out of order in character class
- 9 nothing to repeat
- 10 [this code is not in use]
- 11 internal error: unexpected repeat
- 12 unrecognized character after (? or (?-
- 13 POSIX named classes are supported only within a class
- 14 missing )
- 15 reference to non-existent subpattern
- 16 erroffset passed as NULL
- 17 unknown option bit(s) set
- 18 missing ) after comment
- 19 [this code is not in use]
- 20 regular expression is too large
- 21 failed to get memory
- 22 unmatched parentheses
- 23 internal error: code overflow
- 24 unrecognized character after (?<
- 25 lookbehind assertion is not fixed length
- 26 malformed number or name after (?(
- 27 conditional group contains more than two branches
- 28 assertion expected after (?(
- 29 (?R or (?[+-]digits must be followed by )
- 30 unknown POSIX class name
- 31 POSIX collating elements are not supported
- 32 this version of PCRE is compiled without UTF support
- 33 [this code is not in use]
- 34 character value in \ex{} or \eo{} is too large
- 35 invalid condition (?(0)
- 36 \eC not allowed in lookbehind assertion
- 37 PCRE does not support \eL, \el, \eN{name}, \eU, or \eu
- 38 number after (?C is > 255
- 39 closing ) for (?C expected
- 40 recursive call could loop indefinitely
- 41 unrecognized character after (?P
- 42 syntax error in subpattern name (missing terminator)
- 43 two named subpatterns have the same name
- 44 invalid UTF-8 string (specifically UTF-8)
- 45 support for \eP, \ep, and \eX has not been compiled
- 46 malformed \eP or \ep sequence
- 47 unknown property name after \eP or \ep
- 48 subpattern name is too long (maximum 32 characters)
- 49 too many named subpatterns (maximum 10000)
- 50 [this code is not in use]
- 51 octal value is greater than \e377 in 8-bit non-UTF-8 mode
- 52 internal error: overran compiling workspace
- 53 internal error: previously-checked referenced subpattern
- not found
- 54 DEFINE group contains more than one branch
- 55 repeating a DEFINE group is not allowed
- 56 inconsistent NEWLINE options
- 57 \eg is not followed by a braced, angle-bracketed, or quoted
- name/number or by a plain number
- 58 a numbered reference must not be zero
- 59 an argument is not allowed for (*ACCEPT), (*FAIL), or (*COMMIT)
- 60 (*VERB) not recognized or malformed
- 61 number is too big
- 62 subpattern name expected
- 63 digit expected after (?+
- 64 ] is an invalid data character in JavaScript compatibility mode
- 65 different names for subpatterns of the same number are
- not allowed
- 66 (*MARK) must have an argument
- 67 this version of PCRE is not compiled with Unicode property
- support
- 68 \ec must be followed by an ASCII character
- 69 \ek is not followed by a braced, angle-bracketed, or quoted name
- 70 internal error: unknown opcode in find_fixedlength()
- 71 \eN is not supported in a class
- 72 too many forward references
- 73 disallowed Unicode code point (>= 0xd800 && <= 0xdfff)
- 74 invalid UTF-16 string (specifically UTF-16)
- 75 name is too long in (*MARK), (*PRUNE), (*SKIP), or (*THEN)
- 76 character value in \eu.... sequence is too large
- 77 invalid UTF-32 string (specifically UTF-32)
- 78 setting UTF is disabled by the application
- 79 non-hex character in \ex{} (closing brace missing?)
- 80 non-octal character in \eo{} (closing brace missing?)
- 81 missing opening brace after \eo
- 82 parentheses are too deeply nested
- 83 invalid range in character class
- 84 group name must start with a non-digit
- 85 parentheses are too deeply nested (stack check)
-.sp
-The numbers 32 and 10000 in errors 48 and 49 are defaults; different values may
-be used if the limits were changed when PCRE was built.
-.
-.
-.\" HTML <a name="studyingapattern"></a>
-.SH "STUDYING A PATTERN"
-.rs
-.sp
-.nf
-.B pcre_extra *pcre_study(const pcre *\fIcode\fP, int \fIoptions\fP,
-.B " const char **\fIerrptr\fP);"
-.fi
-.PP
-If a compiled pattern is going to be used several times, it is worth spending
-more time analyzing it in order to speed up the time taken for matching. The
-function \fBpcre_study()\fP takes a pointer to a compiled pattern as its first
-argument. If studying the pattern produces additional information that will
-help speed up matching, \fBpcre_study()\fP returns a pointer to a
-\fBpcre_extra\fP block, in which the \fIstudy_data\fP field points to the
-results of the study.
-.P
-The returned value from \fBpcre_study()\fP can be passed directly to
-\fBpcre_exec()\fP or \fBpcre_dfa_exec()\fP. However, a \fBpcre_extra\fP block
-also contains other fields that can be set by the caller before the block is
-passed; these are described
-.\" HTML <a href="#extradata">
-.\" </a>
-below
-.\"
-in the section on matching a pattern.
-.P
-If studying the pattern does not produce any useful information,
-\fBpcre_study()\fP returns NULL by default. In that circumstance, if the
-calling program wants to pass any of the other fields to \fBpcre_exec()\fP or
-\fBpcre_dfa_exec()\fP, it must set up its own \fBpcre_extra\fP block. However,
-if \fBpcre_study()\fP is called with the PCRE_STUDY_EXTRA_NEEDED option, it
-returns a \fBpcre_extra\fP block even if studying did not find any additional
-information. It may still return NULL, however, if an error occurs in
-\fBpcre_study()\fP.
-.P
-The second argument of \fBpcre_study()\fP contains option bits. There are three
-further options in addition to PCRE_STUDY_EXTRA_NEEDED:
-.sp
- PCRE_STUDY_JIT_COMPILE
- PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE
- PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE
-.sp
-If any of these are set, and the just-in-time compiler is available, the
-pattern is further compiled into machine code that executes much faster than
-the \fBpcre_exec()\fP interpretive matching function. If the just-in-time
-compiler is not available, these options are ignored. All undefined bits in the
-\fIoptions\fP argument must be zero.
-.P
-JIT compilation is a heavyweight optimization. It can take some time for
-patterns to be analyzed, and for one-off matches and simple patterns the
-benefit of faster execution might be offset by a much slower study time.
-Not all patterns can be optimized by the JIT compiler. For those that cannot be
-handled, matching automatically falls back to the \fBpcre_exec()\fP
-interpreter. For more details, see the
-.\" HREF
-\fBpcrejit\fP
-.\"
-documentation.
-.P
-The third argument for \fBpcre_study()\fP is a pointer for an error message. If
-studying succeeds (even if no data is returned), the variable it points to is
-set to NULL. Otherwise it is set to point to a textual error message. This is a
-static string that is part of the library. You must not try to free it. You
-should test the error pointer for NULL after calling \fBpcre_study()\fP, to be
-sure that it has run successfully.
-.P
-When you are finished with a pattern, you can free the memory used for the
-study data by calling \fBpcre_free_study()\fP. This function was added to the
-API for release 8.20. For earlier versions, the memory could be freed with
-\fBpcre_free()\fP, just like the pattern itself. This will still work in cases
-where JIT optimization is not used, but it is advisable to change to the new
-function when convenient.
-.P
-This is a typical way in which \fBpcre_study\fP() is used (except that in a
-real application there should be tests for errors):
-.sp
- int rc;
- pcre *re;
- pcre_extra *sd;
- re = pcre_compile("pattern", 0, &error, &erroroffset, NULL);
- sd = pcre_study(
- re, /* result of pcre_compile() */
- 0, /* no options */
- &error); /* set to NULL or points to a message */
- rc = pcre_exec( /* see below for details of pcre_exec() options */
- re, sd, "subject", 7, 0, 0, ovector, 30);
- ...
- pcre_free_study(sd);
- pcre_free(re);
-.sp
-Studying a pattern does two things: first, a lower bound for the length of
-subject string that is needed to match the pattern is computed. This does not
-mean that there are any strings of that length that match, but it does
-guarantee that no shorter strings match. The value is used to avoid wasting
-time by trying to match strings that are shorter than the lower bound. You can
-find out the value in a calling program via the \fBpcre_fullinfo()\fP function.
-.P
-Studying a pattern is also useful for non-anchored patterns that do not have a
-single fixed starting character. A bitmap of possible starting bytes is
-created. This speeds up finding a position in the subject at which to start
-matching. (In 16-bit mode, the bitmap is used for 16-bit values less than 256.
-In 32-bit mode, the bitmap is used for 32-bit values less than 256.)
-.P
-These two optimizations apply to both \fBpcre_exec()\fP and
-\fBpcre_dfa_exec()\fP, and the information is also used by the JIT compiler.
-The optimizations can be disabled by setting the PCRE_NO_START_OPTIMIZE option.
-You might want to do this if your pattern contains callouts or (*MARK) and you
-want to make use of these facilities in cases where matching fails.
-.P
-PCRE_NO_START_OPTIMIZE can be specified at either compile time or execution
-time. However, if PCRE_NO_START_OPTIMIZE is passed to \fBpcre_exec()\fP, (that
-is, after any JIT compilation has happened) JIT execution is disabled. For JIT
-execution to work with PCRE_NO_START_OPTIMIZE, the option must be set at
-compile time.
-.P
-There is a longer discussion of PCRE_NO_START_OPTIMIZE
-.\" HTML <a href="#execoptions">
-.\" </a>
-below.
-.\"
-.
-.
-.\" HTML <a name="localesupport"></a>
-.SH "LOCALE SUPPORT"
-.rs
-.sp
-PCRE handles caseless matching, and determines whether characters are letters,
-digits, or whatever, by reference to a set of tables, indexed by character
-code point. When running in UTF-8 mode, or in the 16- or 32-bit libraries, this
-applies only to characters with code points less than 256. By default,
-higher-valued code points never match escapes such as \ew or \ed. However, if
-PCRE is built with Unicode property support, all characters can be tested with
-\ep and \eP, or, alternatively, the PCRE_UCP option can be set when a pattern
-is compiled; this causes \ew and friends to use Unicode property support
-instead of the built-in tables.
-.P
-The use of locales with Unicode is discouraged. If you are handling characters
-with code points greater than 128, you should either use Unicode support, or
-use locales, but not try to mix the two.
-.P
-PCRE contains an internal set of tables that are used when the final argument
-of \fBpcre_compile()\fP is NULL. These are sufficient for many applications.
-Normally, the internal tables recognize only ASCII characters. However, when
-PCRE is built, it is possible to cause the internal tables to be rebuilt in the
-default "C" locale of the local system, which may cause them to be different.
-.P
-The internal tables can always be overridden by tables supplied by the
-application that calls PCRE. These may be created in a different locale from
-the default. As more and more applications change to using Unicode, the need
-for this locale support is expected to die away.
-.P
-External tables are built by calling the \fBpcre_maketables()\fP function,
-which has no arguments, in the relevant locale. The result can then be passed
-to \fBpcre_compile()\fP as often as necessary. For example, to build and use
-tables that are appropriate for the French locale (where accented characters
-with values greater than 128 are treated as letters), the following code could
-be used:
-.sp
- setlocale(LC_CTYPE, "fr_FR");
- tables = pcre_maketables();
- re = pcre_compile(..., tables);
-.sp
-The locale name "fr_FR" is used on Linux and other Unix-like systems; if you
-are using Windows, the name for the French locale is "french".
-.P
-When \fBpcre_maketables()\fP runs, the tables are built in memory that is
-obtained via \fBpcre_malloc\fP. It is the caller's responsibility to ensure
-that the memory containing the tables remains available for as long as it is
-needed.
-.P
-The pointer that is passed to \fBpcre_compile()\fP is saved with the compiled
-pattern, and the same tables are used via this pointer by \fBpcre_study()\fP
-and also by \fBpcre_exec()\fP and \fBpcre_dfa_exec()\fP. Thus, for any single
-pattern, compilation, studying and matching all happen in the same locale, but
-different patterns can be processed in different locales.
-.P
-It is possible to pass a table pointer or NULL (indicating the use of the
-internal tables) to \fBpcre_exec()\fP or \fBpcre_dfa_exec()\fP (see the
-discussion below in the section on matching a pattern). This facility is
-provided for use with pre-compiled patterns that have been saved and reloaded.
-Character tables are not saved with patterns, so if a non-standard table was
-used at compile time, it must be provided again when the reloaded pattern is
-matched. Attempting to use this facility to match a pattern in a different
-locale from the one in which it was compiled is likely to lead to anomalous
-(usually incorrect) results.
-.
-.
-.\" HTML <a name="infoaboutpattern"></a>
-.SH "INFORMATION ABOUT A PATTERN"
-.rs
-.sp
-.nf
-.B int pcre_fullinfo(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
-.B " int \fIwhat\fP, void *\fIwhere\fP);"
-.fi
-.PP
-The \fBpcre_fullinfo()\fP function returns information about a compiled
-pattern. It replaces the \fBpcre_info()\fP function, which was removed from the
-library at version 8.30, after more than 10 years of obsolescence.
-.P
-The first argument for \fBpcre_fullinfo()\fP is a pointer to the compiled
-pattern. The second argument is the result of \fBpcre_study()\fP, or NULL if
-the pattern was not studied. The third argument specifies which piece of
-information is required, and the fourth argument is a pointer to a variable
-to receive the data. The yield of the function is zero for success, or one of
-the following negative numbers:
-.sp
- PCRE_ERROR_NULL the argument \fIcode\fP was NULL
- the argument \fIwhere\fP was NULL
- PCRE_ERROR_BADMAGIC the "magic number" was not found
- PCRE_ERROR_BADENDIANNESS the pattern was compiled with different
- endianness
- PCRE_ERROR_BADOPTION the value of \fIwhat\fP was invalid
- PCRE_ERROR_UNSET the requested field is not set
-.sp
-The "magic number" is placed at the start of each compiled pattern as an simple
-check against passing an arbitrary memory pointer. The endianness error can
-occur if a compiled pattern is saved and reloaded on a different host. Here is
-a typical call of \fBpcre_fullinfo()\fP, to obtain the length of the compiled
-pattern:
-.sp
- int rc;
- size_t length;
- rc = pcre_fullinfo(
- re, /* result of pcre_compile() */
- sd, /* result of pcre_study(), or NULL */
- PCRE_INFO_SIZE, /* what is required */
- &length); /* where to put the data */
-.sp
-The possible values for the third argument are defined in \fBpcre.h\fP, and are
-as follows:
-.sp
- PCRE_INFO_BACKREFMAX
-.sp
-Return the number of the highest back reference in the pattern. The fourth
-argument should point to an \fBint\fP variable. Zero is returned if there are
-no back references.
-.sp
- PCRE_INFO_CAPTURECOUNT
-.sp
-Return the number of capturing subpatterns in the pattern. The fourth argument
-should point to an \fBint\fP variable.
-.sp
- PCRE_INFO_DEFAULT_TABLES
-.sp
-Return a pointer to the internal default character tables within PCRE. The
-fourth argument should point to an \fBunsigned char *\fP variable. This
-information call is provided for internal use by the \fBpcre_study()\fP
-function. External callers can cause PCRE to use its internal tables by passing
-a NULL table pointer.
-.sp
- PCRE_INFO_FIRSTBYTE (deprecated)
-.sp
-Return information about the first data unit of any matched string, for a
-non-anchored pattern. The name of this option refers to the 8-bit library,
-where data units are bytes. The fourth argument should point to an \fBint\fP
-variable. Negative values are used for special cases. However, this means that
-when the 32-bit library is in non-UTF-32 mode, the full 32-bit range of
-characters cannot be returned. For this reason, this value is deprecated; use
-PCRE_INFO_FIRSTCHARACTERFLAGS and PCRE_INFO_FIRSTCHARACTER instead.
-.P
-If there is a fixed first value, for example, the letter "c" from a pattern
-such as (cat|cow|coyote), its value is returned. In the 8-bit library, the
-value is always less than 256. In the 16-bit library the value can be up to
-0xffff. In the 32-bit library the value can be up to 0x10ffff.
-.P
-If there is no fixed first value, and if either
-.sp
-(a) the pattern was compiled with the PCRE_MULTILINE option, and every branch
-starts with "^", or
-.sp
-(b) every branch of the pattern starts with ".*" and PCRE_DOTALL is not set
-(if it were set, the pattern would be anchored),
-.sp
--1 is returned, indicating that the pattern matches only at the start of a
-subject string or after any newline within the string. Otherwise -2 is
-returned. For anchored patterns, -2 is returned.
-.sp
- PCRE_INFO_FIRSTCHARACTER
-.sp
-Return the value of the first data unit (non-UTF character) of any matched
-string in the situation where PCRE_INFO_FIRSTCHARACTERFLAGS returns 1;
-otherwise return 0. The fourth argument should point to an \fBuint_t\fP
-variable.
-.P
-In the 8-bit library, the value is always less than 256. In the 16-bit library
-the value can be up to 0xffff. In the 32-bit library in UTF-32 mode the value
-can be up to 0x10ffff, and up to 0xffffffff when not using UTF-32 mode.
-.sp
- PCRE_INFO_FIRSTCHARACTERFLAGS
-.sp
-Return information about the first data unit of any matched string, for a
-non-anchored pattern. The fourth argument should point to an \fBint\fP
-variable.
-.P
-If there is a fixed first value, for example, the letter "c" from a pattern
-such as (cat|cow|coyote), 1 is returned, and the character value can be
-retrieved using PCRE_INFO_FIRSTCHARACTER. If there is no fixed first value, and
-if either
-.sp
-(a) the pattern was compiled with the PCRE_MULTILINE option, and every branch
-starts with "^", or
-.sp
-(b) every branch of the pattern starts with ".*" and PCRE_DOTALL is not set
-(if it were set, the pattern would be anchored),
-.sp
-2 is returned, indicating that the pattern matches only at the start of a
-subject string or after any newline within the string. Otherwise 0 is
-returned. For anchored patterns, 0 is returned.
-.sp
- PCRE_INFO_FIRSTTABLE
-.sp
-If the pattern was studied, and this resulted in the construction of a 256-bit
-table indicating a fixed set of values for the first data unit in any matching
-string, a pointer to the table is returned. Otherwise NULL is returned. The
-fourth argument should point to an \fBunsigned char *\fP variable.
-.sp
- PCRE_INFO_HASCRORLF
-.sp
-Return 1 if the pattern contains any explicit matches for CR or LF characters,
-otherwise 0. The fourth argument should point to an \fBint\fP variable. An
-explicit match is either a literal CR or LF character, or \er or \en.
-.sp
- PCRE_INFO_JCHANGED
-.sp
-Return 1 if the (?J) or (?-J) option setting is used in the pattern, otherwise
-0. The fourth argument should point to an \fBint\fP variable. (?J) and
-(?-J) set and unset the local PCRE_DUPNAMES option, respectively.
-.sp
- PCRE_INFO_JIT
-.sp
-Return 1 if the pattern was studied with one of the JIT options, and
-just-in-time compiling was successful. The fourth argument should point to an
-\fBint\fP variable. A return value of 0 means that JIT support is not available
-in this version of PCRE, or that the pattern was not studied with a JIT option,
-or that the JIT compiler could not handle this particular pattern. See the
-.\" HREF
-\fBpcrejit\fP
-.\"
-documentation for details of what can and cannot be handled.
-.sp
- PCRE_INFO_JITSIZE
-.sp
-If the pattern was successfully studied with a JIT option, return the size of
-the JIT compiled code, otherwise return zero. The fourth argument should point
-to a \fBsize_t\fP variable.
-.sp
- PCRE_INFO_LASTLITERAL
-.sp
-Return the value of the rightmost literal data unit that must exist in any
-matched string, other than at its start, if such a value has been recorded. The
-fourth argument should point to an \fBint\fP variable. If there is no such
-value, -1 is returned. For anchored patterns, a last literal value is recorded
-only if it follows something of variable length. For example, for the pattern
-/^a\ed+z\ed+/ the returned value is "z", but for /^a\edz\ed/ the returned value
-is -1.
-.P
-Since for the 32-bit library using the non-UTF-32 mode, this function is unable
-to return the full 32-bit range of characters, this value is deprecated;
-instead the PCRE_INFO_REQUIREDCHARFLAGS and PCRE_INFO_REQUIREDCHAR values should
-be used.
-.sp
- PCRE_INFO_MATCH_EMPTY
-.sp
-Return 1 if the pattern can match an empty string, otherwise 0. The fourth
-argument should point to an \fBint\fP variable.
-.sp
- PCRE_INFO_MATCHLIMIT
-.sp
-If the pattern set a match limit by including an item of the form
-(*LIMIT_MATCH=nnnn) at the start, the value is returned. The fourth argument
-should point to an unsigned 32-bit integer. If no such value has been set, the
-call to \fBpcre_fullinfo()\fP returns the error PCRE_ERROR_UNSET.
-.sp
- PCRE_INFO_MAXLOOKBEHIND
-.sp
-Return the number of characters (NB not data units) in the longest lookbehind
-assertion in the pattern. This information is useful when doing multi-segment
-matching using the partial matching facilities. Note that the simple assertions
-\eb and \eB require a one-character lookbehind. \eA also registers a
-one-character lookbehind, though it does not actually inspect the previous
-character. This is to ensure that at least one character from the old segment
-is retained when a new segment is processed. Otherwise, if there are no
-lookbehinds in the pattern, \eA might match incorrectly at the start of a new
-segment.
-.sp
- PCRE_INFO_MINLENGTH
-.sp
-If the pattern was studied and a minimum length for matching subject strings
-was computed, its value is returned. Otherwise the returned value is -1. The
-value is a number of characters, which in UTF mode may be different from the
-number of data units. The fourth argument should point to an \fBint\fP
-variable. A non-negative value is a lower bound to the length of any matching
-string. There may not be any strings of that length that do actually match, but
-every string that does match is at least that long.
-.sp
- PCRE_INFO_NAMECOUNT
- PCRE_INFO_NAMEENTRYSIZE
- PCRE_INFO_NAMETABLE
-.sp
-PCRE supports the use of named as well as numbered capturing parentheses. The
-names are just an additional way of identifying the parentheses, which still
-acquire numbers. Several convenience functions such as
-\fBpcre_get_named_substring()\fP are provided for extracting captured
-substrings by name. It is also possible to extract the data directly, by first
-converting the name to a number in order to access the correct pointers in the
-output vector (described with \fBpcre_exec()\fP below). To do the conversion,
-you need to use the name-to-number map, which is described by these three
-values.
-.P
-The map consists of a number of fixed-size entries. PCRE_INFO_NAMECOUNT gives
-the number of entries, and PCRE_INFO_NAMEENTRYSIZE gives the size of each
-entry; both of these return an \fBint\fP value. The entry size depends on the
-length of the longest name. PCRE_INFO_NAMETABLE returns a pointer to the first
-entry of the table. This is a pointer to \fBchar\fP in the 8-bit library, where
-the first two bytes of each entry are the number of the capturing parenthesis,
-most significant byte first. In the 16-bit library, the pointer points to
-16-bit data units, the first of which contains the parenthesis number. In the
-32-bit library, the pointer points to 32-bit data units, the first of which
-contains the parenthesis number. The rest of the entry is the corresponding
-name, zero terminated.
-.P
-The names are in alphabetical order. If (?| is used to create multiple groups
-with the same number, as described in the
-.\" HTML <a href="pcrepattern.html#dupsubpatternnumber">
-.\" </a>
-section on duplicate subpattern numbers
-.\"
-in the
-.\" HREF
-\fBpcrepattern\fP
-.\"
-page, the groups may be given the same name, but there is only one entry in the
-table. Different names for groups of the same number are not permitted.
-Duplicate names for subpatterns with different numbers are permitted,
-but only if PCRE_DUPNAMES is set. They appear in the table in the order in
-which they were found in the pattern. In the absence of (?| this is the order
-of increasing number; when (?| is used this is not necessarily the case because
-later subpatterns may have lower numbers.
-.P
-As a simple example of the name/number table, consider the following pattern
-after compilation by the 8-bit library (assume PCRE_EXTENDED is set, so white
-space - including newlines - is ignored):
-.sp
-.\" JOIN
- (?<date> (?<year>(\ed\ed)?\ed\ed) -
- (?<month>\ed\ed) - (?<day>\ed\ed) )
-.sp
-There are four named subpatterns, so the table has four entries, and each entry
-in the table is eight bytes long. The table is as follows, with non-printing
-bytes shows in hexadecimal, and undefined bytes shown as ??:
-.sp
- 00 01 d a t e 00 ??
- 00 05 d a y 00 ?? ??
- 00 04 m o n t h 00
- 00 02 y e a r 00 ??
-.sp
-When writing code to extract data from named subpatterns using the
-name-to-number map, remember that the length of the entries is likely to be
-different for each compiled pattern.
-.sp
- PCRE_INFO_OKPARTIAL
-.sp
-Return 1 if the pattern can be used for partial matching with
-\fBpcre_exec()\fP, otherwise 0. The fourth argument should point to an
-\fBint\fP variable. From release 8.00, this always returns 1, because the
-restrictions that previously applied to partial matching have been lifted. The
-.\" HREF
-\fBpcrepartial\fP
-.\"
-documentation gives details of partial matching.
-.sp
- PCRE_INFO_OPTIONS
-.sp
-Return a copy of the options with which the pattern was compiled. The fourth
-argument should point to an \fBunsigned long int\fP variable. These option bits
-are those specified in the call to \fBpcre_compile()\fP, modified by any
-top-level option settings at the start of the pattern itself. In other words,
-they are the options that will be in force when matching starts. For example,
-if the pattern /(?im)abc(?-i)d/ is compiled with the PCRE_EXTENDED option, the
-result is PCRE_CASELESS, PCRE_MULTILINE, and PCRE_EXTENDED.
-.P
-A pattern is automatically anchored by PCRE if all of its top-level
-alternatives begin with one of the following:
-.sp
- ^ unless PCRE_MULTILINE is set
- \eA always
- \eG always
-.\" JOIN
- .* if PCRE_DOTALL is set and there are no back
- references to the subpattern in which .* appears
-.sp
-For such patterns, the PCRE_ANCHORED bit is set in the options returned by
-\fBpcre_fullinfo()\fP.
-.sp
- PCRE_INFO_RECURSIONLIMIT
-.sp
-If the pattern set a recursion limit by including an item of the form
-(*LIMIT_RECURSION=nnnn) at the start, the value is returned. The fourth
-argument should point to an unsigned 32-bit integer. If no such value has been
-set, the call to \fBpcre_fullinfo()\fP returns the error PCRE_ERROR_UNSET.
-.sp
- PCRE_INFO_SIZE
-.sp
-Return the size of the compiled pattern in bytes (for all three libraries). The
-fourth argument should point to a \fBsize_t\fP variable. This value does not
-include the size of the \fBpcre\fP structure that is returned by
-\fBpcre_compile()\fP. The value that is passed as the argument to
-\fBpcre_malloc()\fP when \fBpcre_compile()\fP is getting memory in which to
-place the compiled data is the value returned by this option plus the size of
-the \fBpcre\fP structure. Studying a compiled pattern, with or without JIT,
-does not alter the value returned by this option.
-.sp
- PCRE_INFO_STUDYSIZE
-.sp
-Return the size in bytes (for all three libraries) of the data block pointed to
-by the \fIstudy_data\fP field in a \fBpcre_extra\fP block. If \fBpcre_extra\fP
-is NULL, or there is no study data, zero is returned. The fourth argument
-should point to a \fBsize_t\fP variable. The \fIstudy_data\fP field is set by
-\fBpcre_study()\fP to record information that will speed up matching (see the
-section entitled
-.\" HTML <a href="#studyingapattern">
-.\" </a>
-"Studying a pattern"
-.\"
-above). The format of the \fIstudy_data\fP block is private, but its length
-is made available via this option so that it can be saved and restored (see the
-.\" HREF
-\fBpcreprecompile\fP
-.\"
-documentation for details).
-.sp
- PCRE_INFO_REQUIREDCHARFLAGS
-.sp
-Returns 1 if there is a rightmost literal data unit that must exist in any
-matched string, other than at its start. The fourth argument should point to
-an \fBint\fP variable. If there is no such value, 0 is returned. If returning
-1, the character value itself can be retrieved using PCRE_INFO_REQUIREDCHAR.
-.P
-For anchored patterns, a last literal value is recorded only if it follows
-something of variable length. For example, for the pattern /^a\ed+z\ed+/ the
-returned value 1 (with "z" returned from PCRE_INFO_REQUIREDCHAR), but for
-/^a\edz\ed/ the returned value is 0.
-.sp
- PCRE_INFO_REQUIREDCHAR
-.sp
-Return the value of the rightmost literal data unit that must exist in any
-matched string, other than at its start, if such a value has been recorded. The
-fourth argument should point to an \fBuint32_t\fP variable. If there is no such
-value, 0 is returned.
-.
-.
-.SH "REFERENCE COUNTS"
-.rs
-.sp
-.B int pcre_refcount(pcre *\fIcode\fP, int \fIadjust\fP);
-.PP
-The \fBpcre_refcount()\fP function is used to maintain a reference count in the
-data block that contains a compiled pattern. It is provided for the benefit of
-applications that operate in an object-oriented manner, where different parts
-of the application may be using the same compiled pattern, but you want to free
-the block when they are all done.
-.P
-When a pattern is compiled, the reference count field is initialized to zero.
-It is changed only by calling this function, whose action is to add the
-\fIadjust\fP value (which may be positive or negative) to it. The yield of the
-function is the new value. However, the value of the count is constrained to
-lie between 0 and 65535, inclusive. If the new value is outside these limits,
-it is forced to the appropriate limit value.
-.P
-Except when it is zero, the reference count is not correctly preserved if a
-pattern is compiled on one host and then transferred to a host whose byte-order
-is different. (This seems a highly unlikely scenario.)
-.
-.
-.SH "MATCHING A PATTERN: THE TRADITIONAL FUNCTION"
-.rs
-.sp
-.nf
-.B int pcre_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
-.B " const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
-.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);"
-.fi
-.P
-The function \fBpcre_exec()\fP is called to match a subject string against a
-compiled pattern, which is passed in the \fIcode\fP argument. If the
-pattern was studied, the result of the study should be passed in the
-\fIextra\fP argument. You can call \fBpcre_exec()\fP with the same \fIcode\fP
-and \fIextra\fP arguments as many times as you like, in order to match
-different subject strings with the same pattern.
-.P
-This function is the main matching facility of the library, and it operates in
-a Perl-like manner. For specialist use there is also an alternative matching
-function, which is described
-.\" HTML <a href="#dfamatch">
-.\" </a>
-below
-.\"
-in the section about the \fBpcre_dfa_exec()\fP function.
-.P
-In most applications, the pattern will have been compiled (and optionally
-studied) in the same process that calls \fBpcre_exec()\fP. However, it is
-possible to save compiled patterns and study data, and then use them later
-in different processes, possibly even on different hosts. For a discussion
-about this, see the
-.\" HREF
-\fBpcreprecompile\fP
-.\"
-documentation.
-.P
-Here is an example of a simple call to \fBpcre_exec()\fP:
-.sp
- int rc;
- int ovector[30];
- rc = pcre_exec(
- re, /* result of pcre_compile() */
- NULL, /* we didn't study the pattern */
- "some string", /* the subject string */
- 11, /* the length of the subject string */
- 0, /* start at offset 0 in the subject */
- 0, /* default options */
- ovector, /* vector of integers for substring information */
- 30); /* number of elements (NOT size in bytes) */
-.
-.
-.\" HTML <a name="extradata"></a>
-.SS "Extra data for \fBpcre_exec()\fR"
-.rs
-.sp
-If the \fIextra\fP argument is not NULL, it must point to a \fBpcre_extra\fP
-data block. The \fBpcre_study()\fP function returns such a block (when it
-doesn't return NULL), but you can also create one for yourself, and pass
-additional information in it. The \fBpcre_extra\fP block contains the following
-fields (not necessarily in this order):
-.sp
- unsigned long int \fIflags\fP;
- void *\fIstudy_data\fP;
- void *\fIexecutable_jit\fP;
- unsigned long int \fImatch_limit\fP;
- unsigned long int \fImatch_limit_recursion\fP;
- void *\fIcallout_data\fP;
- const unsigned char *\fItables\fP;
- unsigned char **\fImark\fP;
-.sp
-In the 16-bit version of this structure, the \fImark\fP field has type
-"PCRE_UCHAR16 **".
-.sp
-In the 32-bit version of this structure, the \fImark\fP field has type
-"PCRE_UCHAR32 **".
-.P
-The \fIflags\fP field is used to specify which of the other fields are set. The
-flag bits are:
-.sp
- PCRE_EXTRA_CALLOUT_DATA
- PCRE_EXTRA_EXECUTABLE_JIT
- PCRE_EXTRA_MARK
- PCRE_EXTRA_MATCH_LIMIT
- PCRE_EXTRA_MATCH_LIMIT_RECURSION
- PCRE_EXTRA_STUDY_DATA
- PCRE_EXTRA_TABLES
-.sp
-Other flag bits should be set to zero. The \fIstudy_data\fP field and sometimes
-the \fIexecutable_jit\fP field are set in the \fBpcre_extra\fP block that is
-returned by \fBpcre_study()\fP, together with the appropriate flag bits. You
-should not set these yourself, but you may add to the block by setting other
-fields and their corresponding flag bits.
-.P
-The \fImatch_limit\fP field provides a means of preventing PCRE from using up a
-vast amount of resources when running patterns that are not going to match,
-but which have a very large number of possibilities in their search trees. The
-classic example is a pattern that uses nested unlimited repeats.
-.P
-Internally, \fBpcre_exec()\fP uses a function called \fBmatch()\fP, which it
-calls repeatedly (sometimes recursively). The limit set by \fImatch_limit\fP is
-imposed on the number of times this function is called during a match, which
-has the effect of limiting the amount of backtracking that can take place. For
-patterns that are not anchored, the count restarts from zero for each position
-in the subject string.
-.P
-When \fBpcre_exec()\fP is called with a pattern that was successfully studied
-with a JIT option, the way that the matching is executed is entirely different.
-However, there is still the possibility of runaway matching that goes on for a
-very long time, and so the \fImatch_limit\fP value is also used in this case
-(but in a different way) to limit how long the matching can continue.
-.P
-The default value for the limit can be set when PCRE is built; the default
-default is 10 million, which handles all but the most extreme cases. You can
-override the default by suppling \fBpcre_exec()\fP with a \fBpcre_extra\fP
-block in which \fImatch_limit\fP is set, and PCRE_EXTRA_MATCH_LIMIT is set in
-the \fIflags\fP field. If the limit is exceeded, \fBpcre_exec()\fP returns
-PCRE_ERROR_MATCHLIMIT.
-.P
-A value for the match limit may also be supplied by an item at the start of a
-pattern of the form
-.sp
- (*LIMIT_MATCH=d)
-.sp
-where d is a decimal number. However, such a setting is ignored unless d is
-less than the limit set by the caller of \fBpcre_exec()\fP or, if no such limit
-is set, less than the default.
-.P
-The \fImatch_limit_recursion\fP field is similar to \fImatch_limit\fP, but
-instead of limiting the total number of times that \fBmatch()\fP is called, it
-limits the depth of recursion. The recursion depth is a smaller number than the
-total number of calls, because not all calls to \fBmatch()\fP are recursive.
-This limit is of use only if it is set smaller than \fImatch_limit\fP.
-.P
-Limiting the recursion depth limits the amount of machine stack that can be
-used, or, when PCRE has been compiled to use memory on the heap instead of the
-stack, the amount of heap memory that can be used. This limit is not relevant,
-and is ignored, when matching is done using JIT compiled code.
-.P
-The default value for \fImatch_limit_recursion\fP can be set when PCRE is
-built; the default default is the same value as the default for
-\fImatch_limit\fP. You can override the default by suppling \fBpcre_exec()\fP
-with a \fBpcre_extra\fP block in which \fImatch_limit_recursion\fP is set, and
-PCRE_EXTRA_MATCH_LIMIT_RECURSION is set in the \fIflags\fP field. If the limit
-is exceeded, \fBpcre_exec()\fP returns PCRE_ERROR_RECURSIONLIMIT.
-.P
-A value for the recursion limit may also be supplied by an item at the start of
-a pattern of the form
-.sp
- (*LIMIT_RECURSION=d)
-.sp
-where d is a decimal number. However, such a setting is ignored unless d is
-less than the limit set by the caller of \fBpcre_exec()\fP or, if no such limit
-is set, less than the default.
-.P
-The \fIcallout_data\fP field is used in conjunction with the "callout" feature,
-and is described in the
-.\" HREF
-\fBpcrecallout\fP
-.\"
-documentation.
-.P
-The \fItables\fP field is provided for use with patterns that have been
-pre-compiled using custom character tables, saved to disc or elsewhere, and
-then reloaded, because the tables that were used to compile a pattern are not
-saved with it. See the
-.\" HREF
-\fBpcreprecompile\fP
-.\"
-documentation for a discussion of saving compiled patterns for later use. If
-NULL is passed using this mechanism, it forces PCRE's internal tables to be
-used.
-.P
-\fBWarning:\fP The tables that \fBpcre_exec()\fP uses must be the same as those
-that were used when the pattern was compiled. If this is not the case, the
-behaviour of \fBpcre_exec()\fP is undefined. Therefore, when a pattern is
-compiled and matched in the same process, this field should never be set. In
-this (the most common) case, the correct table pointer is automatically passed
-with the compiled pattern from \fBpcre_compile()\fP to \fBpcre_exec()\fP.
-.P
-If PCRE_EXTRA_MARK is set in the \fIflags\fP field, the \fImark\fP field must
-be set to point to a suitable variable. If the pattern contains any
-backtracking control verbs such as (*MARK:NAME), and the execution ends up with
-a name to pass back, a pointer to the name string (zero terminated) is placed
-in the variable pointed to by the \fImark\fP field. The names are within the
-compiled pattern; if you wish to retain such a name you must copy it before
-freeing the memory of a compiled pattern. If there is no name to pass back, the
-variable pointed to by the \fImark\fP field is set to NULL. For details of the
-backtracking control verbs, see the section entitled
-.\" HTML <a href="pcrepattern#backtrackcontrol">
-.\" </a>
-"Backtracking control"
-.\"
-in the
-.\" HREF
-\fBpcrepattern\fP
-.\"
-documentation.
-.
-.
-.\" HTML <a name="execoptions"></a>
-.SS "Option bits for \fBpcre_exec()\fP"
-.rs
-.sp
-The unused bits of the \fIoptions\fP argument for \fBpcre_exec()\fP must be
-zero. The only bits that may be set are PCRE_ANCHORED, PCRE_NEWLINE_\fIxxx\fP,
-PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NOTEMPTY_ATSTART,
-PCRE_NO_START_OPTIMIZE, PCRE_NO_UTF8_CHECK, PCRE_PARTIAL_HARD, and
-PCRE_PARTIAL_SOFT.
-.P
-If the pattern was successfully studied with one of the just-in-time (JIT)
-compile options, the only supported options for JIT execution are
-PCRE_NO_UTF8_CHECK, PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY,
-PCRE_NOTEMPTY_ATSTART, PCRE_PARTIAL_HARD, and PCRE_PARTIAL_SOFT. If an
-unsupported option is used, JIT execution is disabled and the normal
-interpretive code in \fBpcre_exec()\fP is run.
-.sp
- PCRE_ANCHORED
-.sp
-The PCRE_ANCHORED option limits \fBpcre_exec()\fP to matching at the first
-matching position. If a pattern was compiled with PCRE_ANCHORED, or turned out
-to be anchored by virtue of its contents, it cannot be made unachored at
-matching time.
-.sp
- PCRE_BSR_ANYCRLF
- PCRE_BSR_UNICODE
-.sp
-These options (which are mutually exclusive) control what the \eR escape
-sequence matches. The choice is either to match only CR, LF, or CRLF, or to
-match any Unicode newline sequence. These options override the choice that was
-made or defaulted when the pattern was compiled.
-.sp
- PCRE_NEWLINE_CR
- PCRE_NEWLINE_LF
- PCRE_NEWLINE_CRLF
- PCRE_NEWLINE_ANYCRLF
- PCRE_NEWLINE_ANY
-.sp
-These options override the newline definition that was chosen or defaulted when
-the pattern was compiled. For details, see the description of
-\fBpcre_compile()\fP above. During matching, the newline choice affects the
-behaviour of the dot, circumflex, and dollar metacharacters. It may also alter
-the way the match position is advanced after a match failure for an unanchored
-pattern.
-.P
-When PCRE_NEWLINE_CRLF, PCRE_NEWLINE_ANYCRLF, or PCRE_NEWLINE_ANY is set, and a
-match attempt for an unanchored pattern fails when the current position is at a
-CRLF sequence, and the pattern contains no explicit matches for CR or LF
-characters, the match position is advanced by two characters instead of one, in
-other words, to after the CRLF.
-.P
-The above rule is a compromise that makes the most common cases work as
-expected. For example, if the pattern is .+A (and the PCRE_DOTALL option is not
-set), it does not match the string "\er\enA" because, after failing at the
-start, it skips both the CR and the LF before retrying. However, the pattern
-[\er\en]A does match that string, because it contains an explicit CR or LF
-reference, and so advances only by one character after the first failure.
-.P
-An explicit match for CR of LF is either a literal appearance of one of those
-characters, or one of the \er or \en escape sequences. Implicit matches such as
-[^X] do not count, nor does \es (which includes CR and LF in the characters
-that it matches).
-.P
-Notwithstanding the above, anomalous effects may still occur when CRLF is a
-valid newline sequence and explicit \er or \en escapes appear in the pattern.
-.sp
- PCRE_NOTBOL
-.sp
-This option specifies that first character of the subject string is not the
-beginning of a line, so the circumflex metacharacter should not match before
-it. Setting this without PCRE_MULTILINE (at compile time) causes circumflex
-never to match. This option affects only the behaviour of the circumflex
-metacharacter. It does not affect \eA.
-.sp
- PCRE_NOTEOL
-.sp
-This option specifies that the end of the subject string is not the end of a
-line, so the dollar metacharacter should not match it nor (except in multiline
-mode) a newline immediately before it. Setting this without PCRE_MULTILINE (at
-compile time) causes dollar never to match. This option affects only the
-behaviour of the dollar metacharacter. It does not affect \eZ or \ez.
-.sp
- PCRE_NOTEMPTY
-.sp
-An empty string is not considered to be a valid match if this option is set. If
-there are alternatives in the pattern, they are tried. If all the alternatives
-match the empty string, the entire match fails. For example, if the pattern
-.sp
- a?b?
-.sp
-is applied to a string not beginning with "a" or "b", it matches an empty
-string at the start of the subject. With PCRE_NOTEMPTY set, this match is not
-valid, so PCRE searches further into the string for occurrences of "a" or "b".
-.sp
- PCRE_NOTEMPTY_ATSTART
-.sp
-This is like PCRE_NOTEMPTY, except that an empty string match that is not at
-the start of the subject is permitted. If the pattern is anchored, such a match
-can occur only if the pattern contains \eK.
-.P
-Perl has no direct equivalent of PCRE_NOTEMPTY or PCRE_NOTEMPTY_ATSTART, but it
-does make a special case of a pattern match of the empty string within its
-\fBsplit()\fP function, and when using the /g modifier. It is possible to
-emulate Perl's behaviour after matching a null string by first trying the match
-again at the same offset with PCRE_NOTEMPTY_ATSTART and PCRE_ANCHORED, and then
-if that fails, by advancing the starting offset (see below) and trying an
-ordinary match again. There is some code that demonstrates how to do this in
-the
-.\" HREF
-\fBpcredemo\fP
-.\"
-sample program. In the most general case, you have to check to see if the
-newline convention recognizes CRLF as a newline, and if so, and the current
-character is CR followed by LF, advance the starting offset by two characters
-instead of one.
-.sp
- PCRE_NO_START_OPTIMIZE
-.sp
-There are a number of optimizations that \fBpcre_exec()\fP uses at the start of
-a match, in order to speed up the process. For example, if it is known that an
-unanchored match must start with a specific character, it searches the subject
-for that character, and fails immediately if it cannot find it, without
-actually running the main matching function. This means that a special item
-such as (*COMMIT) at the start of a pattern is not considered until after a
-suitable starting point for the match has been found. Also, when callouts or
-(*MARK) items are in use, these "start-up" optimizations can cause them to be
-skipped if the pattern is never actually used. The start-up optimizations are
-in effect a pre-scan of the subject that takes place before the pattern is run.
-.P
-The PCRE_NO_START_OPTIMIZE option disables the start-up optimizations, possibly
-causing performance to suffer, but ensuring that in cases where the result is
-"no match", the callouts do occur, and that items such as (*COMMIT) and (*MARK)
-are considered at every possible starting position in the subject string. If
-PCRE_NO_START_OPTIMIZE is set at compile time, it cannot be unset at matching
-time. The use of PCRE_NO_START_OPTIMIZE at matching time (that is, passing it
-to \fBpcre_exec()\fP) disables JIT execution; in this situation, matching is
-always done using interpretively.
-.P
-Setting PCRE_NO_START_OPTIMIZE can change the outcome of a matching operation.
-Consider the pattern
-.sp
- (*COMMIT)ABC
-.sp
-When this is compiled, PCRE records the fact that a match must start with the
-character "A". Suppose the subject string is "DEFABC". The start-up
-optimization scans along the subject, finds "A" and runs the first match
-attempt from there. The (*COMMIT) item means that the pattern must match the
-current starting position, which in this case, it does. However, if the same
-match is run with PCRE_NO_START_OPTIMIZE set, the initial scan along the
-subject string does not happen. The first match attempt is run starting from
-"D" and when this fails, (*COMMIT) prevents any further matches being tried, so
-the overall result is "no match". If the pattern is studied, more start-up
-optimizations may be used. For example, a minimum length for the subject may be
-recorded. Consider the pattern
-.sp
- (*MARK:A)(X|Y)
-.sp
-The minimum length for a match is one character. If the subject is "ABC", there
-will be attempts to match "ABC", "BC", "C", and then finally an empty string.
-If the pattern is studied, the final attempt does not take place, because PCRE
-knows that the subject is too short, and so the (*MARK) is never encountered.
-In this case, studying the pattern does not affect the overall match result,
-which is still "no match", but it does affect the auxiliary information that is
-returned.
-.sp
- PCRE_NO_UTF8_CHECK
-.sp
-When PCRE_UTF8 is set at compile time, the validity of the subject as a UTF-8
-string is automatically checked when \fBpcre_exec()\fP is subsequently called.
-The entire string is checked before any other processing takes place. The value
-of \fIstartoffset\fP is also checked to ensure that it points to the start of a
-UTF-8 character. There is a discussion about the
-.\" HTML <a href="pcreunicode.html#utf8strings">
-.\" </a>
-validity of UTF-8 strings
-.\"
-in the
-.\" HREF
-\fBpcreunicode\fP
-.\"
-page. If an invalid sequence of bytes is found, \fBpcre_exec()\fP returns the
-error PCRE_ERROR_BADUTF8 or, if PCRE_PARTIAL_HARD is set and the problem is a
-truncated character at the end of the subject, PCRE_ERROR_SHORTUTF8. In both
-cases, information about the precise nature of the error may also be returned
-(see the descriptions of these errors in the section entitled \fIError return
-values from\fP \fBpcre_exec()\fP
-.\" HTML <a href="#errorlist">
-.\" </a>
-below).
-.\"
-If \fIstartoffset\fP contains a value that does not point to the start of a
-UTF-8 character (or to the end of the subject), PCRE_ERROR_BADUTF8_OFFSET is
-returned.
-.P
-If you already know that your subject is valid, and you want to skip these
-checks for performance reasons, you can set the PCRE_NO_UTF8_CHECK option when
-calling \fBpcre_exec()\fP. You might want to do this for the second and
-subsequent calls to \fBpcre_exec()\fP if you are making repeated calls to find
-all the matches in a single subject string. However, you should be sure that
-the value of \fIstartoffset\fP points to the start of a character (or the end
-of the subject). When PCRE_NO_UTF8_CHECK is set, the effect of passing an
-invalid string as a subject or an invalid value of \fIstartoffset\fP is
-undefined. Your program may crash or loop.
-.sp
- PCRE_PARTIAL_HARD
- PCRE_PARTIAL_SOFT
-.sp
-These options turn on the partial matching feature. For backwards
-compatibility, PCRE_PARTIAL is a synonym for PCRE_PARTIAL_SOFT. A partial match
-occurs if the end of the subject string is reached successfully, but there are
-not enough subject characters to complete the match. If this happens when
-PCRE_PARTIAL_SOFT (but not PCRE_PARTIAL_HARD) is set, matching continues by
-testing any remaining alternatives. Only if no complete match can be found is
-PCRE_ERROR_PARTIAL returned instead of PCRE_ERROR_NOMATCH. In other words,
-PCRE_PARTIAL_SOFT says that the caller is prepared to handle a partial match,
-but only if no complete match can be found.
-.P
-If PCRE_PARTIAL_HARD is set, it overrides PCRE_PARTIAL_SOFT. In this case, if a
-partial match is found, \fBpcre_exec()\fP immediately returns
-PCRE_ERROR_PARTIAL, without considering any other alternatives. In other words,
-when PCRE_PARTIAL_HARD is set, a partial match is considered to be more
-important that an alternative complete match.
-.P
-In both cases, the portion of the string that was inspected when the partial
-match was found is set as the first matching string. There is a more detailed
-discussion of partial and multi-segment matching, with examples, in the
-.\" HREF
-\fBpcrepartial\fP
-.\"
-documentation.
-.
-.
-.SS "The string to be matched by \fBpcre_exec()\fP"
-.rs
-.sp
-The subject string is passed to \fBpcre_exec()\fP as a pointer in
-\fIsubject\fP, a length in \fIlength\fP, and a starting offset in
-\fIstartoffset\fP. The units for \fIlength\fP and \fIstartoffset\fP are bytes
-for the 8-bit library, 16-bit data items for the 16-bit library, and 32-bit
-data items for the 32-bit library.
-.P
-If \fIstartoffset\fP is negative or greater than the length of the subject,
-\fBpcre_exec()\fP returns PCRE_ERROR_BADOFFSET. When the starting offset is
-zero, the search for a match starts at the beginning of the subject, and this
-is by far the most common case. In UTF-8 or UTF-16 mode, the offset must point
-to the start of a character, or the end of the subject (in UTF-32 mode, one
-data unit equals one character, so all offsets are valid). Unlike the pattern
-string, the subject may contain binary zeroes.
-.P
-A non-zero starting offset is useful when searching for another match in the
-same subject by calling \fBpcre_exec()\fP again after a previous success.
-Setting \fIstartoffset\fP differs from just passing over a shortened string and
-setting PCRE_NOTBOL in the case of a pattern that begins with any kind of
-lookbehind. For example, consider the pattern
-.sp
- \eBiss\eB
-.sp
-which finds occurrences of "iss" in the middle of words. (\eB matches only if
-the current position in the subject is not a word boundary.) When applied to
-the string "Mississipi" the first call to \fBpcre_exec()\fP finds the first
-occurrence. If \fBpcre_exec()\fP is called again with just the remainder of the
-subject, namely "issipi", it does not match, because \eB is always false at the
-start of the subject, which is deemed to be a word boundary. However, if
-\fBpcre_exec()\fP is passed the entire string again, but with \fIstartoffset\fP
-set to 4, it finds the second occurrence of "iss" because it is able to look
-behind the starting point to discover that it is preceded by a letter.
-.P
-Finding all the matches in a subject is tricky when the pattern can match an
-empty string. It is possible to emulate Perl's /g behaviour by first trying the
-match again at the same offset, with the PCRE_NOTEMPTY_ATSTART and
-PCRE_ANCHORED options, and then if that fails, advancing the starting offset
-and trying an ordinary match again. There is some code that demonstrates how to
-do this in the
-.\" HREF
-\fBpcredemo\fP
-.\"
-sample program. In the most general case, you have to check to see if the
-newline convention recognizes CRLF as a newline, and if so, and the current
-character is CR followed by LF, advance the starting offset by two characters
-instead of one.
-.P
-If a non-zero starting offset is passed when the pattern is anchored, one
-attempt to match at the given offset is made. This can only succeed if the
-pattern does not require the match to be at the start of the subject.
-.
-.
-.SS "How \fBpcre_exec()\fP returns captured substrings"
-.rs
-.sp
-In general, a pattern matches a certain portion of the subject, and in
-addition, further substrings from the subject may be picked out by parts of the
-pattern. Following the usage in Jeffrey Friedl's book, this is called
-"capturing" in what follows, and the phrase "capturing subpattern" is used for
-a fragment of a pattern that picks out a substring. PCRE supports several other
-kinds of parenthesized subpattern that do not cause substrings to be captured.
-.P
-Captured substrings are returned to the caller via a vector of integers whose
-address is passed in \fIovector\fP. The number of elements in the vector is
-passed in \fIovecsize\fP, which must be a non-negative number. \fBNote\fP: this
-argument is NOT the size of \fIovector\fP in bytes.
-.P
-The first two-thirds of the vector is used to pass back captured substrings,
-each substring using a pair of integers. The remaining third of the vector is
-used as workspace by \fBpcre_exec()\fP while matching capturing subpatterns,
-and is not available for passing back information. The number passed in
-\fIovecsize\fP should always be a multiple of three. If it is not, it is
-rounded down.
-.P
-When a match is successful, information about captured substrings is returned
-in pairs of integers, starting at the beginning of \fIovector\fP, and
-continuing up to two-thirds of its length at the most. The first element of
-each pair is set to the offset of the first character in a substring, and the
-second is set to the offset of the first character after the end of a
-substring. These values are always data unit offsets, even in UTF mode. They
-are byte offsets in the 8-bit library, 16-bit data item offsets in the 16-bit
-library, and 32-bit data item offsets in the 32-bit library. \fBNote\fP: they
-are not character counts.
-.P
-The first pair of integers, \fIovector[0]\fP and \fIovector[1]\fP, identify the
-portion of the subject string matched by the entire pattern. The next pair is
-used for the first capturing subpattern, and so on. The value returned by
-\fBpcre_exec()\fP is one more than the highest numbered pair that has been set.
-For example, if two substrings have been captured, the returned value is 3. If
-there are no capturing subpatterns, the return value from a successful match is
-1, indicating that just the first pair of offsets has been set.
-.P
-If a capturing subpattern is matched repeatedly, it is the last portion of the
-string that it matched that is returned.
-.P
-If the vector is too small to hold all the captured substring offsets, it is
-used as far as possible (up to two-thirds of its length), and the function
-returns a value of zero. If neither the actual string matched nor any captured
-substrings are of interest, \fBpcre_exec()\fP may be called with \fIovector\fP
-passed as NULL and \fIovecsize\fP as zero. However, if the pattern contains
-back references and the \fIovector\fP is not big enough to remember the related
-substrings, PCRE has to get additional memory for use during matching. Thus it
-is usually advisable to supply an \fIovector\fP of reasonable size.
-.P
-There are some cases where zero is returned (indicating vector overflow) when
-in fact the vector is exactly the right size for the final match. For example,
-consider the pattern
-.sp
- (a)(?:(b)c|bd)
-.sp
-If a vector of 6 elements (allowing for only 1 captured substring) is given
-with subject string "abd", \fBpcre_exec()\fP will try to set the second
-captured string, thereby recording a vector overflow, before failing to match
-"c" and backing up to try the second alternative. The zero return, however,
-does correctly indicate that the maximum number of slots (namely 2) have been
-filled. In similar cases where there is temporary overflow, but the final
-number of used slots is actually less than the maximum, a non-zero value is
-returned.
-.P
-The \fBpcre_fullinfo()\fP function can be used to find out how many capturing
-subpatterns there are in a compiled pattern. The smallest size for
-\fIovector\fP that will allow for \fIn\fP captured substrings, in addition to
-the offsets of the substring matched by the whole pattern, is (\fIn\fP+1)*3.
-.P
-It is possible for capturing subpattern number \fIn+1\fP to match some part of
-the subject when subpattern \fIn\fP has not been used at all. For example, if
-the string "abc" is matched against the pattern (a|(z))(bc) the return from the
-function is 4, and subpatterns 1 and 3 are matched, but 2 is not. When this
-happens, both values in the offset pairs corresponding to unused subpatterns
-are set to -1.
-.P
-Offset values that correspond to unused subpatterns at the end of the
-expression are also set to -1. For example, if the string "abc" is matched
-against the pattern (abc)(x(yz)?)? subpatterns 2 and 3 are not matched. The
-return from the function is 2, because the highest used capturing subpattern
-number is 1, and the offsets for for the second and third capturing subpatterns
-(assuming the vector is large enough, of course) are set to -1.
-.P
-\fBNote\fP: Elements in the first two-thirds of \fIovector\fP that do not
-correspond to capturing parentheses in the pattern are never changed. That is,
-if a pattern contains \fIn\fP capturing parentheses, no more than
-\fIovector[0]\fP to \fIovector[2n+1]\fP are set by \fBpcre_exec()\fP. The other
-elements (in the first two-thirds) retain whatever values they previously had.
-.P
-Some convenience functions are provided for extracting the captured substrings
-as separate strings. These are described below.
-.
-.
-.\" HTML <a name="errorlist"></a>
-.SS "Error return values from \fBpcre_exec()\fP"
-.rs
-.sp
-If \fBpcre_exec()\fP fails, it returns a negative number. The following are
-defined in the header file:
-.sp
- PCRE_ERROR_NOMATCH (-1)
-.sp
-The subject string did not match the pattern.
-.sp
- PCRE_ERROR_NULL (-2)
-.sp
-Either \fIcode\fP or \fIsubject\fP was passed as NULL, or \fIovector\fP was
-NULL and \fIovecsize\fP was not zero.
-.sp
- PCRE_ERROR_BADOPTION (-3)
-.sp
-An unrecognized bit was set in the \fIoptions\fP argument.
-.sp
- PCRE_ERROR_BADMAGIC (-4)
-.sp
-PCRE stores a 4-byte "magic number" at the start of the compiled code, to catch
-the case when it is passed a junk pointer and to detect when a pattern that was
-compiled in an environment of one endianness is run in an environment with the
-other endianness. This is the error that PCRE gives when the magic number is
-not present.
-.sp
- PCRE_ERROR_UNKNOWN_OPCODE (-5)
-.sp
-While running the pattern match, an unknown item was encountered in the
-compiled pattern. This error could be caused by a bug in PCRE or by overwriting
-of the compiled pattern.
-.sp
- PCRE_ERROR_NOMEMORY (-6)
-.sp
-If a pattern contains back references, but the \fIovector\fP that is passed to
-\fBpcre_exec()\fP is not big enough to remember the referenced substrings, PCRE
-gets a block of memory at the start of matching to use for this purpose. If the
-call via \fBpcre_malloc()\fP fails, this error is given. The memory is
-automatically freed at the end of matching.
-.P
-This error is also given if \fBpcre_stack_malloc()\fP fails in
-\fBpcre_exec()\fP. This can happen only when PCRE has been compiled with
-\fB--disable-stack-for-recursion\fP.
-.sp
- PCRE_ERROR_NOSUBSTRING (-7)
-.sp
-This error is used by the \fBpcre_copy_substring()\fP,
-\fBpcre_get_substring()\fP, and \fBpcre_get_substring_list()\fP functions (see
-below). It is never returned by \fBpcre_exec()\fP.
-.sp
- PCRE_ERROR_MATCHLIMIT (-8)
-.sp
-The backtracking limit, as specified by the \fImatch_limit\fP field in a
-\fBpcre_extra\fP structure (or defaulted) was reached. See the description
-above.
-.sp
- PCRE_ERROR_CALLOUT (-9)
-.sp
-This error is never generated by \fBpcre_exec()\fP itself. It is provided for
-use by callout functions that want to yield a distinctive error code. See the
-.\" HREF
-\fBpcrecallout\fP
-.\"
-documentation for details.
-.sp
- PCRE_ERROR_BADUTF8 (-10)
-.sp
-A string that contains an invalid UTF-8 byte sequence was passed as a subject,
-and the PCRE_NO_UTF8_CHECK option was not set. If the size of the output vector
-(\fIovecsize\fP) is at least 2, the byte offset to the start of the the invalid
-UTF-8 character is placed in the first element, and a reason code is placed in
-the second element. The reason codes are listed in the
-.\" HTML <a href="#badutf8reasons">
-.\" </a>
-following section.
-.\"
-For backward compatibility, if PCRE_PARTIAL_HARD is set and the problem is a
-truncated UTF-8 character at the end of the subject (reason codes 1 to 5),
-PCRE_ERROR_SHORTUTF8 is returned instead of PCRE_ERROR_BADUTF8.
-.sp
- PCRE_ERROR_BADUTF8_OFFSET (-11)
-.sp
-The UTF-8 byte sequence that was passed as a subject was checked and found to
-be valid (the PCRE_NO_UTF8_CHECK option was not set), but the value of
-\fIstartoffset\fP did not point to the beginning of a UTF-8 character or the
-end of the subject.
-.sp
- PCRE_ERROR_PARTIAL (-12)
-.sp
-The subject string did not match, but it did match partially. See the
-.\" HREF
-\fBpcrepartial\fP
-.\"
-documentation for details of partial matching.
-.sp
- PCRE_ERROR_BADPARTIAL (-13)
-.sp
-This code is no longer in use. It was formerly returned when the PCRE_PARTIAL
-option was used with a compiled pattern containing items that were not
-supported for partial matching. From release 8.00 onwards, there are no
-restrictions on partial matching.
-.sp
- PCRE_ERROR_INTERNAL (-14)
-.sp
-An unexpected internal error has occurred. This error could be caused by a bug
-in PCRE or by overwriting of the compiled pattern.
-.sp
- PCRE_ERROR_BADCOUNT (-15)
-.sp
-This error is given if the value of the \fIovecsize\fP argument is negative.
-.sp
- PCRE_ERROR_RECURSIONLIMIT (-21)
-.sp
-The internal recursion limit, as specified by the \fImatch_limit_recursion\fP
-field in a \fBpcre_extra\fP structure (or defaulted) was reached. See the
-description above.
-.sp
- PCRE_ERROR_BADNEWLINE (-23)
-.sp
-An invalid combination of PCRE_NEWLINE_\fIxxx\fP options was given.
-.sp
- PCRE_ERROR_BADOFFSET (-24)
-.sp
-The value of \fIstartoffset\fP was negative or greater than the length of the
-subject, that is, the value in \fIlength\fP.
-.sp
- PCRE_ERROR_SHORTUTF8 (-25)
-.sp
-This error is returned instead of PCRE_ERROR_BADUTF8 when the subject string
-ends with a truncated UTF-8 character and the PCRE_PARTIAL_HARD option is set.
-Information about the failure is returned as for PCRE_ERROR_BADUTF8. It is in
-fact sufficient to detect this case, but this special error code for
-PCRE_PARTIAL_HARD precedes the implementation of returned information; it is
-retained for backwards compatibility.
-.sp
- PCRE_ERROR_RECURSELOOP (-26)
-.sp
-This error is returned when \fBpcre_exec()\fP detects a recursion loop within
-the pattern. Specifically, it means that either the whole pattern or a
-subpattern has been called recursively for the second time at the same position
-in the subject string. Some simple patterns that might do this are detected and
-faulted at compile time, but more complicated cases, in particular mutual
-recursions between two different subpatterns, cannot be detected until run
-time.
-.sp
- PCRE_ERROR_JIT_STACKLIMIT (-27)
-.sp
-This error is returned when a pattern that was successfully studied using a
-JIT compile option is being matched, but the memory available for the
-just-in-time processing stack is not large enough. See the
-.\" HREF
-\fBpcrejit\fP
-.\"
-documentation for more details.
-.sp
- PCRE_ERROR_BADMODE (-28)
-.sp
-This error is given if a pattern that was compiled by the 8-bit library is
-passed to a 16-bit or 32-bit library function, or vice versa.
-.sp
- PCRE_ERROR_BADENDIANNESS (-29)
-.sp
-This error is given if a pattern that was compiled and saved is reloaded on a
-host with different endianness. The utility function
-\fBpcre_pattern_to_host_byte_order()\fP can be used to convert such a pattern
-so that it runs on the new host.
-.sp
- PCRE_ERROR_JIT_BADOPTION
-.sp
-This error is returned when a pattern that was successfully studied using a JIT
-compile option is being matched, but the matching mode (partial or complete
-match) does not correspond to any JIT compilation mode. When the JIT fast path
-function is used, this error may be also given for invalid options. See the
-.\" HREF
-\fBpcrejit\fP
-.\"
-documentation for more details.
-.sp
- PCRE_ERROR_BADLENGTH (-32)
-.sp
-This error is given if \fBpcre_exec()\fP is called with a negative value for
-the \fIlength\fP argument.
-.P
-Error numbers -16 to -20, -22, and 30 are not used by \fBpcre_exec()\fP.
-.
-.
-.\" HTML <a name="badutf8reasons"></a>
-.SS "Reason codes for invalid UTF-8 strings"
-.rs
-.sp
-This section applies only to the 8-bit library. The corresponding information
-for the 16-bit and 32-bit libraries is given in the
-.\" HREF
-\fBpcre16\fP
-.\"
-and
-.\" HREF
-\fBpcre32\fP
-.\"
-pages.
-.P
-When \fBpcre_exec()\fP returns either PCRE_ERROR_BADUTF8 or
-PCRE_ERROR_SHORTUTF8, and the size of the output vector (\fIovecsize\fP) is at
-least 2, the offset of the start of the invalid UTF-8 character is placed in
-the first output vector element (\fIovector[0]\fP) and a reason code is placed
-in the second element (\fIovector[1]\fP). The reason codes are given names in
-the \fBpcre.h\fP header file:
-.sp
- PCRE_UTF8_ERR1
- PCRE_UTF8_ERR2
- PCRE_UTF8_ERR3
- PCRE_UTF8_ERR4
- PCRE_UTF8_ERR5
-.sp
-The string ends with a truncated UTF-8 character; the code specifies how many
-bytes are missing (1 to 5). Although RFC 3629 restricts UTF-8 characters to be
-no longer than 4 bytes, the encoding scheme (originally defined by RFC 2279)
-allows for up to 6 bytes, and this is checked first; hence the possibility of
-4 or 5 missing bytes.
-.sp
- PCRE_UTF8_ERR6
- PCRE_UTF8_ERR7
- PCRE_UTF8_ERR8
- PCRE_UTF8_ERR9
- PCRE_UTF8_ERR10
-.sp
-The two most significant bits of the 2nd, 3rd, 4th, 5th, or 6th byte of the
-character do not have the binary value 0b10 (that is, either the most
-significant bit is 0, or the next bit is 1).
-.sp
- PCRE_UTF8_ERR11
- PCRE_UTF8_ERR12
-.sp
-A character that is valid by the RFC 2279 rules is either 5 or 6 bytes long;
-these code points are excluded by RFC 3629.
-.sp
- PCRE_UTF8_ERR13
-.sp
-A 4-byte character has a value greater than 0x10fff; these code points are
-excluded by RFC 3629.
-.sp
- PCRE_UTF8_ERR14
-.sp
-A 3-byte character has a value in the range 0xd800 to 0xdfff; this range of
-code points are reserved by RFC 3629 for use with UTF-16, and so are excluded
-from UTF-8.
-.sp
- PCRE_UTF8_ERR15
- PCRE_UTF8_ERR16
- PCRE_UTF8_ERR17
- PCRE_UTF8_ERR18
- PCRE_UTF8_ERR19
-.sp
-A 2-, 3-, 4-, 5-, or 6-byte character is "overlong", that is, it codes for a
-value that can be represented by fewer bytes, which is invalid. For example,
-the two bytes 0xc0, 0xae give the value 0x2e, whose correct coding uses just
-one byte.
-.sp
- PCRE_UTF8_ERR20
-.sp
-The two most significant bits of the first byte of a character have the binary
-value 0b10 (that is, the most significant bit is 1 and the second is 0). Such a
-byte can only validly occur as the second or subsequent byte of a multi-byte
-character.
-.sp
- PCRE_UTF8_ERR21
-.sp
-The first byte of a character has the value 0xfe or 0xff. These values can
-never occur in a valid UTF-8 string.
-.sp
- PCRE_UTF8_ERR22
-.sp
-This error code was formerly used when the presence of a so-called
-"non-character" caused an error. Unicode corrigendum #9 makes it clear that
-such characters should not cause a string to be rejected, and so this code is
-no longer in use and is never returned.
-.
-.
-.SH "EXTRACTING CAPTURED SUBSTRINGS BY NUMBER"
-.rs
-.sp
-.nf
-.B int pcre_copy_substring(const char *\fIsubject\fP, int *\fIovector\fP,
-.B " int \fIstringcount\fP, int \fIstringnumber\fP, char *\fIbuffer\fP,"
-.B " int \fIbuffersize\fP);"
-.sp
-.B int pcre_get_substring(const char *\fIsubject\fP, int *\fIovector\fP,
-.B " int \fIstringcount\fP, int \fIstringnumber\fP,"
-.B " const char **\fIstringptr\fP);"
-.sp
-.B int pcre_get_substring_list(const char *\fIsubject\fP,
-.B " int *\fIovector\fP, int \fIstringcount\fP, const char ***\fIlistptr\fP);"
-.fi
-.PP
-Captured substrings can be accessed directly by using the offsets returned by
-\fBpcre_exec()\fP in \fIovector\fP. For convenience, the functions
-\fBpcre_copy_substring()\fP, \fBpcre_get_substring()\fP, and
-\fBpcre_get_substring_list()\fP are provided for extracting captured substrings
-as new, separate, zero-terminated strings. These functions identify substrings
-by number. The next section describes functions for extracting named
-substrings.
-.P
-A substring that contains a binary zero is correctly extracted and has a
-further zero added on the end, but the result is not, of course, a C string.
-However, you can process such a string by referring to the length that is
-returned by \fBpcre_copy_substring()\fP and \fBpcre_get_substring()\fP.
-Unfortunately, the interface to \fBpcre_get_substring_list()\fP is not adequate
-for handling strings containing binary zeros, because the end of the final
-string is not independently indicated.
-.P
-The first three arguments are the same for all three of these functions:
-\fIsubject\fP is the subject string that has just been successfully matched,
-\fIovector\fP is a pointer to the vector of integer offsets that was passed to
-\fBpcre_exec()\fP, and \fIstringcount\fP is the number of substrings that were
-captured by the match, including the substring that matched the entire regular
-expression. This is the value returned by \fBpcre_exec()\fP if it is greater
-than zero. If \fBpcre_exec()\fP returned zero, indicating that it ran out of
-space in \fIovector\fP, the value passed as \fIstringcount\fP should be the
-number of elements in the vector divided by three.
-.P
-The functions \fBpcre_copy_substring()\fP and \fBpcre_get_substring()\fP
-extract a single substring, whose number is given as \fIstringnumber\fP. A
-value of zero extracts the substring that matched the entire pattern, whereas
-higher values extract the captured substrings. For \fBpcre_copy_substring()\fP,
-the string is placed in \fIbuffer\fP, whose length is given by
-\fIbuffersize\fP, while for \fBpcre_get_substring()\fP a new block of memory is
-obtained via \fBpcre_malloc\fP, and its address is returned via
-\fIstringptr\fP. The yield of the function is the length of the string, not
-including the terminating zero, or one of these error codes:
-.sp
- PCRE_ERROR_NOMEMORY (-6)
-.sp
-The buffer was too small for \fBpcre_copy_substring()\fP, or the attempt to get
-memory failed for \fBpcre_get_substring()\fP.
-.sp
- PCRE_ERROR_NOSUBSTRING (-7)
-.sp
-There is no substring whose number is \fIstringnumber\fP.
-.P
-The \fBpcre_get_substring_list()\fP function extracts all available substrings
-and builds a list of pointers to them. All this is done in a single block of
-memory that is obtained via \fBpcre_malloc\fP. The address of the memory block
-is returned via \fIlistptr\fP, which is also the start of the list of string
-pointers. The end of the list is marked by a NULL pointer. The yield of the
-function is zero if all went well, or the error code
-.sp
- PCRE_ERROR_NOMEMORY (-6)
-.sp
-if the attempt to get the memory block failed.
-.P
-When any of these functions encounter a substring that is unset, which can
-happen when capturing subpattern number \fIn+1\fP matches some part of the
-subject, but subpattern \fIn\fP has not been used at all, they return an empty
-string. This can be distinguished from a genuine zero-length substring by
-inspecting the appropriate offset in \fIovector\fP, which is negative for unset
-substrings.
-.P
-The two convenience functions \fBpcre_free_substring()\fP and
-\fBpcre_free_substring_list()\fP can be used to free the memory returned by
-a previous call of \fBpcre_get_substring()\fP or
-\fBpcre_get_substring_list()\fP, respectively. They do nothing more than call
-the function pointed to by \fBpcre_free\fP, which of course could be called
-directly from a C program. However, PCRE is used in some situations where it is
-linked via a special interface to another programming language that cannot use
-\fBpcre_free\fP directly; it is for these cases that the functions are
-provided.
-.
-.
-.SH "EXTRACTING CAPTURED SUBSTRINGS BY NAME"
-.rs
-.sp
-.nf
-.B int pcre_get_stringnumber(const pcre *\fIcode\fP,
-.B " const char *\fIname\fP);"
-.sp
-.B int pcre_copy_named_substring(const pcre *\fIcode\fP,
-.B " const char *\fIsubject\fP, int *\fIovector\fP,"
-.B " int \fIstringcount\fP, const char *\fIstringname\fP,"
-.B " char *\fIbuffer\fP, int \fIbuffersize\fP);"
-.sp
-.B int pcre_get_named_substring(const pcre *\fIcode\fP,
-.B " const char *\fIsubject\fP, int *\fIovector\fP,"
-.B " int \fIstringcount\fP, const char *\fIstringname\fP,"
-.B " const char **\fIstringptr\fP);"
-.fi
-.PP
-To extract a substring by name, you first have to find associated number.
-For example, for this pattern
-.sp
- (a+)b(?<xxx>\ed+)...
-.sp
-the number of the subpattern called "xxx" is 2. If the name is known to be
-unique (PCRE_DUPNAMES was not set), you can find the number from the name by
-calling \fBpcre_get_stringnumber()\fP. The first argument is the compiled
-pattern, and the second is the name. The yield of the function is the
-subpattern number, or PCRE_ERROR_NOSUBSTRING (-7) if there is no subpattern of
-that name.
-.P
-Given the number, you can extract the substring directly, or use one of the
-functions described in the previous section. For convenience, there are also
-two functions that do the whole job.
-.P
-Most of the arguments of \fBpcre_copy_named_substring()\fP and
-\fBpcre_get_named_substring()\fP are the same as those for the similarly named
-functions that extract by number. As these are described in the previous
-section, they are not re-described here. There are just two differences:
-.P
-First, instead of a substring number, a substring name is given. Second, there
-is an extra argument, given at the start, which is a pointer to the compiled
-pattern. This is needed in order to gain access to the name-to-number
-translation table.
-.P
-These functions call \fBpcre_get_stringnumber()\fP, and if it succeeds, they
-then call \fBpcre_copy_substring()\fP or \fBpcre_get_substring()\fP, as
-appropriate. \fBNOTE:\fP If PCRE_DUPNAMES is set and there are duplicate names,
-the behaviour may not be what you want (see the next section).
-.P
-\fBWarning:\fP If the pattern uses the (?| feature to set up multiple
-subpatterns with the same number, as described in the
-.\" HTML <a href="pcrepattern.html#dupsubpatternnumber">
-.\" </a>
-section on duplicate subpattern numbers
-.\"
-in the
-.\" HREF
-\fBpcrepattern\fP
-.\"
-page, you cannot use names to distinguish the different subpatterns, because
-names are not included in the compiled code. The matching process uses only
-numbers. For this reason, the use of different names for subpatterns of the
-same number causes an error at compile time.
-.
-.
-.SH "DUPLICATE SUBPATTERN NAMES"
-.rs
-.sp
-.nf
-.B int pcre_get_stringtable_entries(const pcre *\fIcode\fP,
-.B " const char *\fIname\fP, char **\fIfirst\fP, char **\fIlast\fP);"
-.fi
-.PP
-When a pattern is compiled with the PCRE_DUPNAMES option, names for subpatterns
-are not required to be unique. (Duplicate names are always allowed for
-subpatterns with the same number, created by using the (?| feature. Indeed, if
-such subpatterns are named, they are required to use the same names.)
-.P
-Normally, patterns with duplicate names are such that in any one match, only
-one of the named subpatterns participates. An example is shown in the
-.\" HREF
-\fBpcrepattern\fP
-.\"
-documentation.
-.P
-When duplicates are present, \fBpcre_copy_named_substring()\fP and
-\fBpcre_get_named_substring()\fP return the first substring corresponding to
-the given name that is set. If none are set, PCRE_ERROR_NOSUBSTRING (-7) is
-returned; no data is returned. The \fBpcre_get_stringnumber()\fP function
-returns one of the numbers that are associated with the name, but it is not
-defined which it is.
-.P
-If you want to get full details of all captured substrings for a given name,
-you must use the \fBpcre_get_stringtable_entries()\fP function. The first
-argument is the compiled pattern, and the second is the name. The third and
-fourth are pointers to variables which are updated by the function. After it
-has run, they point to the first and last entries in the name-to-number table
-for the given name. The function itself returns the length of each entry, or
-PCRE_ERROR_NOSUBSTRING (-7) if there are none. The format of the table is
-described above in the section entitled \fIInformation about a pattern\fP
-.\" HTML <a href="#infoaboutpattern">
-.\" </a>
-above.
-.\"
-Given all the relevant entries for the name, you can extract each of their
-numbers, and hence the captured data, if any.
-.
-.
-.SH "FINDING ALL POSSIBLE MATCHES"
-.rs
-.sp
-The traditional matching function uses a similar algorithm to Perl, which stops
-when it finds the first match, starting at a given point in the subject. If you
-want to find all possible matches, or the longest possible match, consider
-using the alternative matching function (see below) instead. If you cannot use
-the alternative function, but still need to find all possible matches, you
-can kludge it up by making use of the callout facility, which is described in
-the
-.\" HREF
-\fBpcrecallout\fP
-.\"
-documentation.
-.P
-What you have to do is to insert a callout right at the end of the pattern.
-When your callout function is called, extract and save the current matched
-substring. Then return 1, which forces \fBpcre_exec()\fP to backtrack and try
-other alternatives. Ultimately, when it runs out of matches, \fBpcre_exec()\fP
-will yield PCRE_ERROR_NOMATCH.
-.
-.
-.SH "OBTAINING AN ESTIMATE OF STACK USAGE"
-.rs
-.sp
-Matching certain patterns using \fBpcre_exec()\fP can use a lot of process
-stack, which in certain environments can be rather limited in size. Some users
-find it helpful to have an estimate of the amount of stack that is used by
-\fBpcre_exec()\fP, to help them set recursion limits, as described in the
-.\" HREF
-\fBpcrestack\fP
-.\"
-documentation. The estimate that is output by \fBpcretest\fP when called with
-the \fB-m\fP and \fB-C\fP options is obtained by calling \fBpcre_exec\fP with
-the values NULL, NULL, NULL, -999, and -999 for its first five arguments.
-.P
-Normally, if its first argument is NULL, \fBpcre_exec()\fP immediately returns
-the negative error code PCRE_ERROR_NULL, but with this special combination of
-arguments, it returns instead a negative number whose absolute value is the
-approximate stack frame size in bytes. (A negative number is used so that it is
-clear that no match has happened.) The value is approximate because in some
-cases, recursive calls to \fBpcre_exec()\fP occur when there are one or two
-additional variables on the stack.
-.P
-If PCRE has been compiled to use the heap instead of the stack for recursion,
-the value returned is the size of each block that is obtained from the heap.
-.
-.
-.\" HTML <a name="dfamatch"></a>
-.SH "MATCHING A PATTERN: THE ALTERNATIVE FUNCTION"
-.rs
-.sp
-.nf
-.B int pcre_dfa_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
-.B " const char *\fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
-.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,"
-.B " int *\fIworkspace\fP, int \fIwscount\fP);"
-.fi
-.P
-The function \fBpcre_dfa_exec()\fP is called to match a subject string against
-a compiled pattern, using a matching algorithm that scans the subject string
-just once, and does not backtrack. This has different characteristics to the
-normal algorithm, and is not compatible with Perl. Some of the features of PCRE
-patterns are not supported. Nevertheless, there are times when this kind of
-matching can be useful. For a discussion of the two matching algorithms, and a
-list of features that \fBpcre_dfa_exec()\fP does not support, see the
-.\" HREF
-\fBpcrematching\fP
-.\"
-documentation.
-.P
-The arguments for the \fBpcre_dfa_exec()\fP function are the same as for
-\fBpcre_exec()\fP, plus two extras. The \fIovector\fP argument is used in a
-different way, and this is described below. The other common arguments are used
-in the same way as for \fBpcre_exec()\fP, so their description is not repeated
-here.
-.P
-The two additional arguments provide workspace for the function. The workspace
-vector should contain at least 20 elements. It is used for keeping track of
-multiple paths through the pattern tree. More workspace will be needed for
-patterns and subjects where there are a lot of potential matches.
-.P
-Here is an example of a simple call to \fBpcre_dfa_exec()\fP:
-.sp
- int rc;
- int ovector[10];
- int wspace[20];
- rc = pcre_dfa_exec(
- re, /* result of pcre_compile() */
- NULL, /* we didn't study the pattern */
- "some string", /* the subject string */
- 11, /* the length of the subject string */
- 0, /* start at offset 0 in the subject */
- 0, /* default options */
- ovector, /* vector of integers for substring information */
- 10, /* number of elements (NOT size in bytes) */
- wspace, /* working space vector */
- 20); /* number of elements (NOT size in bytes) */
-.
-.SS "Option bits for \fBpcre_dfa_exec()\fP"
-.rs
-.sp
-The unused bits of the \fIoptions\fP argument for \fBpcre_dfa_exec()\fP must be
-zero. The only bits that may be set are PCRE_ANCHORED, PCRE_NEWLINE_\fIxxx\fP,
-PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NOTEMPTY_ATSTART,
-PCRE_NO_UTF8_CHECK, PCRE_BSR_ANYCRLF, PCRE_BSR_UNICODE, PCRE_NO_START_OPTIMIZE,
-PCRE_PARTIAL_HARD, PCRE_PARTIAL_SOFT, PCRE_DFA_SHORTEST, and PCRE_DFA_RESTART.
-All but the last four of these are exactly the same as for \fBpcre_exec()\fP,
-so their description is not repeated here.
-.sp
- PCRE_PARTIAL_HARD
- PCRE_PARTIAL_SOFT
-.sp
-These have the same general effect as they do for \fBpcre_exec()\fP, but the
-details are slightly different. When PCRE_PARTIAL_HARD is set for
-\fBpcre_dfa_exec()\fP, it returns PCRE_ERROR_PARTIAL if the end of the subject
-is reached and there is still at least one matching possibility that requires
-additional characters. This happens even if some complete matches have also
-been found. When PCRE_PARTIAL_SOFT is set, the return code PCRE_ERROR_NOMATCH
-is converted into PCRE_ERROR_PARTIAL if the end of the subject is reached,
-there have been no complete matches, but there is still at least one matching
-possibility. The portion of the string that was inspected when the longest
-partial match was found is set as the first matching string in both cases.
-There is a more detailed discussion of partial and multi-segment matching, with
-examples, in the
-.\" HREF
-\fBpcrepartial\fP
-.\"
-documentation.
-.sp
- PCRE_DFA_SHORTEST
-.sp
-Setting the PCRE_DFA_SHORTEST option causes the matching algorithm to stop as
-soon as it has found one match. Because of the way the alternative algorithm
-works, this is necessarily the shortest possible match at the first possible
-matching point in the subject string.
-.sp
- PCRE_DFA_RESTART
-.sp
-When \fBpcre_dfa_exec()\fP returns a partial match, it is possible to call it
-again, with additional subject characters, and have it continue with the same
-match. The PCRE_DFA_RESTART option requests this action; when it is set, the
-\fIworkspace\fP and \fIwscount\fP options must reference the same vector as
-before because data about the match so far is left in them after a partial
-match. There is more discussion of this facility in the
-.\" HREF
-\fBpcrepartial\fP
-.\"
-documentation.
-.
-.
-.SS "Successful returns from \fBpcre_dfa_exec()\fP"
-.rs
-.sp
-When \fBpcre_dfa_exec()\fP succeeds, it may have matched more than one
-substring in the subject. Note, however, that all the matches from one run of
-the function start at the same point in the subject. The shorter matches are
-all initial substrings of the longer matches. For example, if the pattern
-.sp
- <.*>
-.sp
-is matched against the string
-.sp
- This is <something> <something else> <something further> no more
-.sp
-the three matched strings are
-.sp
- <something>
- <something> <something else>
- <something> <something else> <something further>
-.sp
-On success, the yield of the function is a number greater than zero, which is
-the number of matched substrings. The substrings themselves are returned in
-\fIovector\fP. Each string uses two elements; the first is the offset to the
-start, and the second is the offset to the end. In fact, all the strings have
-the same start offset. (Space could have been saved by giving this only once,
-but it was decided to retain some compatibility with the way \fBpcre_exec()\fP
-returns data, even though the meaning of the strings is different.)
-.P
-The strings are returned in reverse order of length; that is, the longest
-matching string is given first. If there were too many matches to fit into
-\fIovector\fP, the yield of the function is zero, and the vector is filled with
-the longest matches. Unlike \fBpcre_exec()\fP, \fBpcre_dfa_exec()\fP can use
-the entire \fIovector\fP for returning matched strings.
-.P
-NOTE: PCRE's "auto-possessification" optimization usually applies to character
-repeats at the end of a pattern (as well as internally). For example, the
-pattern "a\ed+" is compiled as if it were "a\ed++" because there is no point
-even considering the possibility of backtracking into the repeated digits. For
-DFA matching, this means that only one possible match is found. If you really
-do want multiple matches in such cases, either use an ungreedy repeat
-("a\ed+?") or set the PCRE_NO_AUTO_POSSESS option when compiling.
-.
-.
-.SS "Error returns from \fBpcre_dfa_exec()\fP"
-.rs
-.sp
-The \fBpcre_dfa_exec()\fP function returns a negative number when it fails.
-Many of the errors are the same as for \fBpcre_exec()\fP, and these are
-described
-.\" HTML <a href="#errorlist">
-.\" </a>
-above.
-.\"
-There are in addition the following errors that are specific to
-\fBpcre_dfa_exec()\fP:
-.sp
- PCRE_ERROR_DFA_UITEM (-16)
-.sp
-This return is given if \fBpcre_dfa_exec()\fP encounters an item in the pattern
-that it does not support, for instance, the use of \eC or a back reference.
-.sp
- PCRE_ERROR_DFA_UCOND (-17)
-.sp
-This return is given if \fBpcre_dfa_exec()\fP encounters a condition item that
-uses a back reference for the condition, or a test for recursion in a specific
-group. These are not supported.
-.sp
- PCRE_ERROR_DFA_UMLIMIT (-18)
-.sp
-This return is given if \fBpcre_dfa_exec()\fP is called with an \fIextra\fP
-block that contains a setting of the \fImatch_limit\fP or
-\fImatch_limit_recursion\fP fields. This is not supported (these fields are
-meaningless for DFA matching).
-.sp
- PCRE_ERROR_DFA_WSSIZE (-19)
-.sp
-This return is given if \fBpcre_dfa_exec()\fP runs out of space in the
-\fIworkspace\fP vector.
-.sp
- PCRE_ERROR_DFA_RECURSE (-20)
-.sp
-When a recursive subpattern is processed, the matching function calls itself
-recursively, using private vectors for \fIovector\fP and \fIworkspace\fP. This
-error is given if the output vector is not large enough. This should be
-extremely rare, as a vector of size 1000 is used.
-.sp
- PCRE_ERROR_DFA_BADRESTART (-30)
-.sp
-When \fBpcre_dfa_exec()\fP is called with the \fBPCRE_DFA_RESTART\fP option,
-some plausibility checks are made on the contents of the workspace, which
-should contain data about the previous partial match. If any of these checks
-fail, this error is given.
-.
-.
-.SH "SEE ALSO"
-.rs
-.sp
-\fBpcre16\fP(3), \fBpcre32\fP(3), \fBpcrebuild\fP(3), \fBpcrecallout\fP(3),
-\fBpcrecpp(3)\fP(3), \fBpcrematching\fP(3), \fBpcrepartial\fP(3),
-\fBpcreposix\fP(3), \fBpcreprecompile\fP(3), \fBpcresample\fP(3),
-\fBpcrestack\fP(3).
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 18 December 2015
-Copyright (c) 1997-2015 University of Cambridge.
-.fi
diff --git a/libs/Pcre16/docs/doc/pcrebuild.3 b/libs/Pcre16/docs/doc/pcrebuild.3
deleted file mode 100644
index 403f2ae32f..0000000000
--- a/libs/Pcre16/docs/doc/pcrebuild.3
+++ /dev/null
@@ -1,550 +0,0 @@
-.TH PCREBUILD 3 "12 May 2013" "PCRE 8.33"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.
-.
-.SH "BUILDING PCRE"
-.rs
-.sp
-PCRE is distributed with a \fBconfigure\fP script that can be used to build the
-library in Unix-like environments using the applications known as Autotools.
-Also in the distribution are files to support building using \fBCMake\fP
-instead of \fBconfigure\fP. The text file
-.\" HTML <a href="README.txt">
-.\" </a>
-\fBREADME\fP
-.\"
-contains general information about building with Autotools (some of which is
-repeated below), and also has some comments about building on various operating
-systems. There is a lot more information about building PCRE without using
-Autotools (including information about using \fBCMake\fP and building "by
-hand") in the text file called
-.\" HTML <a href="NON-AUTOTOOLS-BUILD.txt">
-.\" </a>
-\fBNON-AUTOTOOLS-BUILD\fP.
-.\"
-You should consult this file as well as the
-.\" HTML <a href="README.txt">
-.\" </a>
-\fBREADME\fP
-.\"
-file if you are building in a non-Unix-like environment.
-.
-.
-.SH "PCRE BUILD-TIME OPTIONS"
-.rs
-.sp
-The rest of this document describes the optional features of PCRE that can be
-selected when the library is compiled. It assumes use of the \fBconfigure\fP
-script, where the optional features are selected or deselected by providing
-options to \fBconfigure\fP before running the \fBmake\fP command. However, the
-same options can be selected in both Unix-like and non-Unix-like environments
-using the GUI facility of \fBcmake-gui\fP if you are using \fBCMake\fP instead
-of \fBconfigure\fP to build PCRE.
-.P
-If you are not using Autotools or \fBCMake\fP, option selection can be done by
-editing the \fBconfig.h\fP file, or by passing parameter settings to the
-compiler, as described in
-.\" HTML <a href="NON-AUTOTOOLS-BUILD.txt">
-.\" </a>
-\fBNON-AUTOTOOLS-BUILD\fP.
-.\"
-.P
-The complete list of options for \fBconfigure\fP (which includes the standard
-ones such as the selection of the installation directory) can be obtained by
-running
-.sp
- ./configure --help
-.sp
-The following sections include descriptions of options whose names begin with
---enable or --disable. These settings specify changes to the defaults for the
-\fBconfigure\fP command. Because of the way that \fBconfigure\fP works,
---enable and --disable always come in pairs, so the complementary option always
-exists as well, but as it specifies the default, it is not described.
-.
-.
-.SH "BUILDING 8-BIT, 16-BIT AND 32-BIT LIBRARIES"
-.rs
-.sp
-By default, a library called \fBlibpcre\fP is built, containing functions that
-take string arguments contained in vectors of bytes, either as single-byte
-characters, or interpreted as UTF-8 strings. You can also build a separate
-library, called \fBlibpcre16\fP, in which strings are contained in vectors of
-16-bit data units and interpreted either as single-unit characters or UTF-16
-strings, by adding
-.sp
- --enable-pcre16
-.sp
-to the \fBconfigure\fP command. You can also build yet another separate
-library, called \fBlibpcre32\fP, in which strings are contained in vectors of
-32-bit data units and interpreted either as single-unit characters or UTF-32
-strings, by adding
-.sp
- --enable-pcre32
-.sp
-to the \fBconfigure\fP command. If you do not want the 8-bit library, add
-.sp
- --disable-pcre8
-.sp
-as well. At least one of the three libraries must be built. Note that the C++
-and POSIX wrappers are for the 8-bit library only, and that \fBpcregrep\fP is
-an 8-bit program. None of these are built if you select only the 16-bit or
-32-bit libraries.
-.
-.
-.SH "BUILDING SHARED AND STATIC LIBRARIES"
-.rs
-.sp
-The Autotools PCRE building process uses \fBlibtool\fP to build both shared and
-static libraries by default. You can suppress one of these by adding one of
-.sp
- --disable-shared
- --disable-static
-.sp
-to the \fBconfigure\fP command, as required.
-.
-.
-.SH "C++ SUPPORT"
-.rs
-.sp
-By default, if the 8-bit library is being built, the \fBconfigure\fP script
-will search for a C++ compiler and C++ header files. If it finds them, it
-automatically builds the C++ wrapper library (which supports only 8-bit
-strings). You can disable this by adding
-.sp
- --disable-cpp
-.sp
-to the \fBconfigure\fP command.
-.
-.
-.SH "UTF-8, UTF-16 AND UTF-32 SUPPORT"
-.rs
-.sp
-To build PCRE with support for UTF Unicode character strings, add
-.sp
- --enable-utf
-.sp
-to the \fBconfigure\fP command. This setting applies to all three libraries,
-adding support for UTF-8 to the 8-bit library, support for UTF-16 to the 16-bit
-library, and support for UTF-32 to the to the 32-bit library. There are no
-separate options for enabling UTF-8, UTF-16 and UTF-32 independently because
-that would allow ridiculous settings such as requesting UTF-16 support while
-building only the 8-bit library. It is not possible to build one library with
-UTF support and another without in the same configuration. (For backwards
-compatibility, --enable-utf8 is a synonym of --enable-utf.)
-.P
-Of itself, this setting does not make PCRE treat strings as UTF-8, UTF-16 or
-UTF-32. As well as compiling PCRE with this option, you also have have to set
-the PCRE_UTF8, PCRE_UTF16 or PCRE_UTF32 option (as appropriate) when you call
-one of the pattern compiling functions.
-.P
-If you set --enable-utf when compiling in an EBCDIC environment, PCRE expects
-its input to be either ASCII or UTF-8 (depending on the run-time option). It is
-not possible to support both EBCDIC and UTF-8 codes in the same version of the
-library. Consequently, --enable-utf and --enable-ebcdic are mutually
-exclusive.
-.
-.
-.SH "UNICODE CHARACTER PROPERTY SUPPORT"
-.rs
-.sp
-UTF support allows the libraries to process character codepoints up to 0x10ffff
-in the strings that they handle. On its own, however, it does not provide any
-facilities for accessing the properties of such characters. If you want to be
-able to use the pattern escapes \eP, \ep, and \eX, which refer to Unicode
-character properties, you must add
-.sp
- --enable-unicode-properties
-.sp
-to the \fBconfigure\fP command. This implies UTF support, even if you have
-not explicitly requested it.
-.P
-Including Unicode property support adds around 30K of tables to the PCRE
-library. Only the general category properties such as \fILu\fP and \fINd\fP are
-supported. Details are given in the
-.\" HREF
-\fBpcrepattern\fP
-.\"
-documentation.
-.
-.
-.SH "JUST-IN-TIME COMPILER SUPPORT"
-.rs
-.sp
-Just-in-time compiler support is included in the build by specifying
-.sp
- --enable-jit
-.sp
-This support is available only for certain hardware architectures. If this
-option is set for an unsupported architecture, a compile time error occurs.
-See the
-.\" HREF
-\fBpcrejit\fP
-.\"
-documentation for a discussion of JIT usage. When JIT support is enabled,
-pcregrep automatically makes use of it, unless you add
-.sp
- --disable-pcregrep-jit
-.sp
-to the "configure" command.
-.
-.
-.SH "CODE VALUE OF NEWLINE"
-.rs
-.sp
-By default, PCRE interprets the linefeed (LF) character as indicating the end
-of a line. This is the normal newline character on Unix-like systems. You can
-compile PCRE to use carriage return (CR) instead, by adding
-.sp
- --enable-newline-is-cr
-.sp
-to the \fBconfigure\fP command. There is also a --enable-newline-is-lf option,
-which explicitly specifies linefeed as the newline character.
-.sp
-Alternatively, you can specify that line endings are to be indicated by the two
-character sequence CRLF. If you want this, add
-.sp
- --enable-newline-is-crlf
-.sp
-to the \fBconfigure\fP command. There is a fourth option, specified by
-.sp
- --enable-newline-is-anycrlf
-.sp
-which causes PCRE to recognize any of the three sequences CR, LF, or CRLF as
-indicating a line ending. Finally, a fifth option, specified by
-.sp
- --enable-newline-is-any
-.sp
-causes PCRE to recognize any Unicode newline sequence.
-.P
-Whatever line ending convention is selected when PCRE is built can be
-overridden when the library functions are called. At build time it is
-conventional to use the standard for your operating system.
-.
-.
-.SH "WHAT \eR MATCHES"
-.rs
-.sp
-By default, the sequence \eR in a pattern matches any Unicode newline sequence,
-whatever has been selected as the line ending sequence. If you specify
-.sp
- --enable-bsr-anycrlf
-.sp
-the default is changed so that \eR matches only CR, LF, or CRLF. Whatever is
-selected when PCRE is built can be overridden when the library functions are
-called.
-.
-.
-.SH "POSIX MALLOC USAGE"
-.rs
-.sp
-When the 8-bit library is called through the POSIX interface (see the
-.\" HREF
-\fBpcreposix\fP
-.\"
-documentation), 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 \fBmalloc()\fP for each call. The default threshold above
-which the stack is no longer used is 10; it can be changed by adding a setting
-such as
-.sp
- --with-posix-malloc-threshold=20
-.sp
-to the \fBconfigure\fP command.
-.
-.
-.SH "HANDLING VERY LARGE PATTERNS"
-.rs
-.sp
-Within a compiled pattern, offset values are used to point from one part to
-another (for example, from an opening parenthesis to an alternation
-metacharacter). By default, in the 8-bit and 16-bit libraries, two-byte values
-are used for these offsets, leading to a maximum size for a compiled pattern of
-around 64K. This is sufficient to handle all but the most gigantic patterns.
-Nevertheless, some people do want to process truly enormous patterns, so it is
-possible to compile PCRE to use three-byte or four-byte offsets by adding a
-setting such as
-.sp
- --with-link-size=3
-.sp
-to the \fBconfigure\fP command. The value given must be 2, 3, or 4. For the
-16-bit library, a value of 3 is rounded up to 4. In these libraries, using
-longer offsets slows down the operation of PCRE because it has to load
-additional data when handling them. For the 32-bit library the value is always
-4 and cannot be overridden; the value of --with-link-size is ignored.
-.
-.
-.SH "AVOIDING EXCESSIVE STACK USAGE"
-.rs
-.sp
-When matching with the \fBpcre_exec()\fP function, PCRE implements backtracking
-by making recursive calls to an internal function called \fBmatch()\fP. In
-environments where the size of the stack is limited, this can severely limit
-PCRE's operation. (The Unix environment does not usually suffer from this
-problem, but it may sometimes be necessary to increase the maximum stack size.
-There is a discussion in the
-.\" HREF
-\fBpcrestack\fP
-.\"
-documentation.) An alternative approach to recursion that uses memory from the
-heap to remember data, instead of using recursive function calls, has been
-implemented to work round the problem of limited stack size. If you want to
-build a version of PCRE that works this way, add
-.sp
- --disable-stack-for-recursion
-.sp
-to the \fBconfigure\fP command. With this configuration, PCRE will use the
-\fBpcre_stack_malloc\fP and \fBpcre_stack_free\fP variables to call memory
-management functions. By default these point to \fBmalloc()\fP and
-\fBfree()\fP, but you can replace the pointers so that your own functions are
-used instead.
-.P
-Separate functions are provided rather than using \fBpcre_malloc\fP and
-\fBpcre_free\fP because the usage is very predictable: the block sizes
-requested are always the same, and the blocks are always freed in reverse
-order. A calling program might be able to implement optimized functions that
-perform better than \fBmalloc()\fP and \fBfree()\fP. PCRE runs noticeably more
-slowly when built in this way. This option affects only the \fBpcre_exec()\fP
-function; it is not relevant for \fBpcre_dfa_exec()\fP.
-.
-.
-.SH "LIMITING PCRE RESOURCE USAGE"
-.rs
-.sp
-Internally, PCRE has a function called \fBmatch()\fP, which it calls repeatedly
-(sometimes recursively) when matching a pattern with the \fBpcre_exec()\fP
-function. By controlling the maximum number of times this function may be
-called during a single matching operation, a limit can be placed on the
-resources used by a single call to \fBpcre_exec()\fP. The limit can be changed
-at run time, as described in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-documentation. The default is 10 million, but this can be changed by adding a
-setting such as
-.sp
- --with-match-limit=500000
-.sp
-to the \fBconfigure\fP command. This setting has no effect on the
-\fBpcre_dfa_exec()\fP matching function.
-.P
-In some environments it is desirable to limit the depth of recursive calls of
-\fBmatch()\fP more strictly than the total number of calls, in order to
-restrict the maximum amount of stack (or heap, if --disable-stack-for-recursion
-is specified) that is used. A second limit controls this; it defaults to the
-value that is set for --with-match-limit, which imposes no additional
-constraints. However, you can set a lower limit by adding, for example,
-.sp
- --with-match-limit-recursion=10000
-.sp
-to the \fBconfigure\fP command. This value can also be overridden at run time.
-.
-.
-.SH "CREATING CHARACTER TABLES AT BUILD TIME"
-.rs
-.sp
-PCRE uses fixed tables for processing characters whose code values are less
-than 256. By default, PCRE is built with a set of tables that are distributed
-in the file \fIpcre_chartables.c.dist\fP. These tables are for ASCII codes
-only. If you add
-.sp
- --enable-rebuild-chartables
-.sp
-to the \fBconfigure\fP command, the distributed tables are no longer used.
-Instead, a program called \fBdftables\fP is compiled and run. This outputs the
-source for new set of tables, created in the default locale of your C run-time
-system. (This method of replacing the tables does not work if you are cross
-compiling, because \fBdftables\fP is run on the local host. If you need to
-create alternative tables when cross compiling, you will have to do so "by
-hand".)
-.
-.
-.SH "USING EBCDIC CODE"
-.rs
-.sp
-PCRE assumes by default that it will run in an environment where the character
-code is ASCII (or Unicode, which is a superset of ASCII). This is the case for
-most computer operating systems. PCRE can, however, be compiled to run in an
-EBCDIC environment by adding
-.sp
- --enable-ebcdic
-.sp
-to the \fBconfigure\fP command. This setting implies
---enable-rebuild-chartables. You should only use it if you know that you are in
-an EBCDIC environment (for example, an IBM mainframe operating system). The
---enable-ebcdic option is incompatible with --enable-utf.
-.P
-The EBCDIC character that corresponds to an ASCII LF is assumed to have the
-value 0x15 by default. However, in some EBCDIC environments, 0x25 is used. In
-such an environment you should use
-.sp
- --enable-ebcdic-nl25
-.sp
-as well as, or instead of, --enable-ebcdic. The EBCDIC character for CR has the
-same value as in ASCII, namely, 0x0d. Whichever of 0x15 and 0x25 is \fInot\fP
-chosen as LF is made to correspond to the Unicode NEL character (which, in
-Unicode, is 0x85).
-.P
-The options that select newline behaviour, such as --enable-newline-is-cr,
-and equivalent run-time options, refer to these character values in an EBCDIC
-environment.
-.
-.
-.SH "PCREGREP OPTIONS FOR COMPRESSED FILE SUPPORT"
-.rs
-.sp
-By default, \fBpcregrep\fP reads all files as plain text. You can build it so
-that it recognizes files whose names end in \fB.gz\fP or \fB.bz2\fP, and reads
-them with \fBlibz\fP or \fBlibbz2\fP, respectively, by adding one or both of
-.sp
- --enable-pcregrep-libz
- --enable-pcregrep-libbz2
-.sp
-to the \fBconfigure\fP command. These options naturally require that the
-relevant libraries are installed on your system. Configuration will fail if
-they are not.
-.
-.
-.SH "PCREGREP BUFFER SIZE"
-.rs
-.sp
-\fBpcregrep\fP uses an internal buffer to hold a "window" on the file it is
-scanning, in order to be able to output "before" and "after" lines when it
-finds a match. The size of the buffer is controlled by a parameter whose
-default value is 20K. The buffer itself is three times this size, but because
-of the way it is used for holding "before" lines, the longest line that is
-guaranteed to be processable is the parameter size. You can change the default
-parameter value by adding, for example,
-.sp
- --with-pcregrep-bufsize=50K
-.sp
-to the \fBconfigure\fP command. The caller of \fPpcregrep\fP can, however,
-override this value by specifying a run-time option.
-.
-.
-.SH "PCRETEST OPTION FOR LIBREADLINE SUPPORT"
-.rs
-.sp
-If you add
-.sp
- --enable-pcretest-libreadline
-.sp
-to the \fBconfigure\fP command, \fBpcretest\fP is linked with the
-\fBlibreadline\fP library, and when its input is from a terminal, it reads it
-using the \fBreadline()\fP function. This provides line-editing and history
-facilities. Note that \fBlibreadline\fP is GPL-licensed, so if you distribute a
-binary of \fBpcretest\fP linked in this way, there may be licensing issues.
-.P
-Setting this option causes the \fB-lreadline\fP option to be added to the
-\fBpcretest\fP build. In many operating environments with a sytem-installed
-\fBlibreadline\fP this is sufficient. However, in some environments (e.g.
-if an unmodified distribution version of readline is in use), some extra
-configuration may be necessary. The INSTALL file for \fBlibreadline\fP says
-this:
-.sp
- "Readline uses the termcap functions, but does not link with the
- termcap or curses library itself, allowing applications which link
- with readline the to choose an appropriate library."
-.sp
-If your environment has not been set up so that an appropriate library is
-automatically included, you may need to add something like
-.sp
- LIBS="-ncurses"
-.sp
-immediately before the \fBconfigure\fP command.
-.
-.
-.SH "DEBUGGING WITH VALGRIND SUPPORT"
-.rs
-.sp
-By adding the
-.sp
- --enable-valgrind
-.sp
-option to to the \fBconfigure\fP command, PCRE will use valgrind annotations
-to mark certain memory regions as unaddressable. This allows it to detect
-invalid memory accesses, and is mostly useful for debugging PCRE itself.
-.
-.
-.SH "CODE COVERAGE REPORTING"
-.rs
-.sp
-If your C compiler is gcc, you can build a version of PCRE that can generate a
-code coverage report for its test suite. To enable this, you must install
-\fBlcov\fP version 1.6 or above. Then specify
-.sp
- --enable-coverage
-.sp
-to the \fBconfigure\fP command and build PCRE in the usual way.
-.P
-Note that using \fBccache\fP (a caching C compiler) is incompatible with code
-coverage reporting. If you have configured \fBccache\fP to run automatically
-on your system, you must set the environment variable
-.sp
- CCACHE_DISABLE=1
-.sp
-before running \fBmake\fP to build PCRE, so that \fBccache\fP is not used.
-.P
-When --enable-coverage is used, the following addition targets are added to the
-\fIMakefile\fP:
-.sp
- make coverage
-.sp
-This creates a fresh coverage report for the PCRE test suite. It is equivalent
-to running "make coverage-reset", "make coverage-baseline", "make check", and
-then "make coverage-report".
-.sp
- make coverage-reset
-.sp
-This zeroes the coverage counters, but does nothing else.
-.sp
- make coverage-baseline
-.sp
-This captures baseline coverage information.
-.sp
- make coverage-report
-.sp
-This creates the coverage report.
-.sp
- make coverage-clean-report
-.sp
-This removes the generated coverage report without cleaning the coverage data
-itself.
-.sp
- make coverage-clean-data
-.sp
-This removes the captured coverage data without removing the coverage files
-created at compile time (*.gcno).
-.sp
- make coverage-clean
-.sp
-This cleans all coverage data including the generated coverage report. For more
-information about code coverage, see the \fBgcov\fP and \fBlcov\fP
-documentation.
-.
-.
-.SH "SEE ALSO"
-.rs
-.sp
-\fBpcreapi\fP(3), \fBpcre16\fP, \fBpcre32\fP, \fBpcre_config\fP(3).
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 12 May 2013
-Copyright (c) 1997-2013 University of Cambridge.
-.fi
diff --git a/libs/Pcre16/docs/doc/pcrecallout.3 b/libs/Pcre16/docs/doc/pcrecallout.3
deleted file mode 100644
index 8ebc995952..0000000000
--- a/libs/Pcre16/docs/doc/pcrecallout.3
+++ /dev/null
@@ -1,255 +0,0 @@
-.TH PCRECALLOUT 3 "12 November 2013" "PCRE 8.34"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B int (*pcre_callout)(pcre_callout_block *);
-.PP
-.B int (*pcre16_callout)(pcre16_callout_block *);
-.PP
-.B int (*pcre32_callout)(pcre32_callout_block *);
-.
-.SH DESCRIPTION
-.rs
-.sp
-PCRE provides a feature called "callout", which is a means of temporarily
-passing control to the caller of PCRE in the middle of pattern matching. The
-caller of PCRE provides an external function by putting its entry point in the
-global variable \fIpcre_callout\fP (\fIpcre16_callout\fP for the 16-bit
-library, \fIpcre32_callout\fP for the 32-bit library). By default, this
-variable contains NULL, which disables all calling out.
-.P
-Within a regular expression, (?C) indicates the points at which the external
-function is to be called. Different callout points can be identified by putting
-a number less than 256 after the letter C. The default value is zero.
-For example, this pattern has two callout points:
-.sp
- (?C1)abc(?C2)def
-.sp
-If the PCRE_AUTO_CALLOUT option bit is set when a pattern is compiled, PCRE
-automatically inserts callouts, all with number 255, before each item in the
-pattern. For example, if PCRE_AUTO_CALLOUT is used with the pattern
-.sp
- A(\ed{2}|--)
-.sp
-it is processed as if it were
-.sp
-(?C255)A(?C255)((?C255)\ed{2}(?C255)|(?C255)-(?C255)-(?C255))(?C255)
-.sp
-Notice that there is a callout before and after each parenthesis and
-alternation bar. If the pattern contains a conditional group whose condition is
-an assertion, an automatic callout is inserted immediately before the
-condition. Such a callout may also be inserted explicitly, for example:
-.sp
- (?(?C9)(?=a)ab|de)
-.sp
-This applies only to assertion conditions (because they are themselves
-independent groups).
-.P
-Automatic callouts can be used for tracking the progress of pattern matching.
-The
-.\" HREF
-\fBpcretest\fP
-.\"
-program has a pattern qualifier (/C) that sets automatic callouts; when it is
-used, the output indicates how the pattern is being matched. This is useful
-information when you are trying to optimize the performance of a particular
-pattern.
-.
-.
-.SH "MISSING CALLOUTS"
-.rs
-.sp
-You should be aware that, because of optimizations in the way PCRE compiles and
-matches patterns, callouts sometimes do not happen exactly as you might expect.
-.P
-At compile time, PCRE "auto-possessifies" repeated items when it knows that
-what follows cannot be part of the repeat. For example, a+[bc] is compiled as
-if it were a++[bc]. The \fBpcretest\fP output when this pattern is anchored and
-then applied with automatic callouts to the string "aaaa" is:
-.sp
- --->aaaa
- +0 ^ ^
- +1 ^ a+
- +3 ^ ^ [bc]
- No match
-.sp
-This indicates that when matching [bc] fails, there is no backtracking into a+
-and therefore the callouts that would be taken for the backtracks do not occur.
-You can disable the auto-possessify feature by passing PCRE_NO_AUTO_POSSESS
-to \fBpcre_compile()\fP, or starting the pattern with (*NO_AUTO_POSSESS). If
-this is done in \fBpcretest\fP (using the /O qualifier), the output changes to
-this:
-.sp
- --->aaaa
- +0 ^ ^
- +1 ^ a+
- +3 ^ ^ [bc]
- +3 ^ ^ [bc]
- +3 ^ ^ [bc]
- +3 ^^ [bc]
- No match
-.sp
-This time, when matching [bc] fails, the matcher backtracks into a+ and tries
-again, repeatedly, until a+ itself fails.
-.P
-Other optimizations that provide fast "no match" results also affect callouts.
-For example, if the pattern is
-.sp
- ab(?C4)cd
-.sp
-PCRE knows that any matching string must contain the letter "d". If the subject
-string is "abyz", the lack of "d" means that matching doesn't ever start, and
-the callout is never reached. However, with "abyd", though the result is still
-no match, the callout is obeyed.
-.P
-If the pattern is studied, PCRE knows the minimum length of a matching string,
-and will immediately give a "no match" return without actually running a match
-if the subject is not long enough, or, for unanchored patterns, if it has
-been scanned far enough.
-.P
-You can disable these optimizations by passing the PCRE_NO_START_OPTIMIZE
-option to the matching function, or by starting the pattern with
-(*NO_START_OPT). This slows down the matching process, but does ensure that
-callouts such as the example above are obeyed.
-.
-.
-.SH "THE CALLOUT INTERFACE"
-.rs
-.sp
-During matching, when PCRE reaches a callout point, the external function
-defined by \fIpcre_callout\fP or \fIpcre[16|32]_callout\fP is called (if it is
-set). This applies to both normal and DFA matching. The only argument to the
-callout function is a pointer to a \fBpcre_callout\fP or
-\fBpcre[16|32]_callout\fP block. These structures contains the following
-fields:
-.sp
- int \fIversion\fP;
- int \fIcallout_number\fP;
- int *\fIoffset_vector\fP;
- const char *\fIsubject\fP; (8-bit version)
- PCRE_SPTR16 \fIsubject\fP; (16-bit version)
- PCRE_SPTR32 \fIsubject\fP; (32-bit version)
- int \fIsubject_length\fP;
- int \fIstart_match\fP;
- int \fIcurrent_position\fP;
- int \fIcapture_top\fP;
- int \fIcapture_last\fP;
- void *\fIcallout_data\fP;
- int \fIpattern_position\fP;
- int \fInext_item_length\fP;
- const unsigned char *\fImark\fP; (8-bit version)
- const PCRE_UCHAR16 *\fImark\fP; (16-bit version)
- const PCRE_UCHAR32 *\fImark\fP; (32-bit version)
-.sp
-The \fIversion\fP field is an integer containing the version number of the
-block format. The initial version was 0; the current version is 2. The version
-number will change again in future if additional fields are added, but the
-intention is never to remove any of the existing fields.
-.P
-The \fIcallout_number\fP field contains the number of the callout, as compiled
-into the pattern (that is, the number after ?C for manual callouts, and 255 for
-automatically generated callouts).
-.P
-The \fIoffset_vector\fP field is a pointer to the vector of offsets that was
-passed by the caller to the matching function. When \fBpcre_exec()\fP or
-\fBpcre[16|32]_exec()\fP is used, the contents can be inspected, in order to
-extract substrings that have been matched so far, in the same way as for
-extracting substrings after a match has completed. For the DFA matching
-functions, this field is not useful.
-.P
-The \fIsubject\fP and \fIsubject_length\fP fields contain copies of the values
-that were passed to the matching function.
-.P
-The \fIstart_match\fP field normally contains the offset within the subject at
-which the current match attempt started. However, if the escape sequence \eK
-has been encountered, this value is changed to reflect the modified starting
-point. If the pattern is not anchored, the callout function may be called
-several times from the same point in the pattern for different starting points
-in the subject.
-.P
-The \fIcurrent_position\fP field contains the offset within the subject of the
-current match pointer.
-.P
-When the \fBpcre_exec()\fP or \fBpcre[16|32]_exec()\fP is used, the
-\fIcapture_top\fP field contains one more than the number of the highest
-numbered captured substring so far. If no substrings have been captured, the
-value of \fIcapture_top\fP is one. This is always the case when the DFA
-functions are used, because they do not support captured substrings.
-.P
-The \fIcapture_last\fP field contains the number of the most recently captured
-substring. However, when a recursion exits, the value reverts to what it was
-outside the recursion, as do the values of all captured substrings. If no
-substrings have been captured, the value of \fIcapture_last\fP is -1. This is
-always the case for the DFA matching functions.
-.P
-The \fIcallout_data\fP field contains a value that is passed to a matching
-function specifically so that it can be passed back in callouts. It is passed
-in the \fIcallout_data\fP field of a \fBpcre_extra\fP or \fBpcre[16|32]_extra\fP
-data structure. If no such data was passed, the value of \fIcallout_data\fP in
-a callout block is NULL. There is a description of the \fBpcre_extra\fP
-structure in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-documentation.
-.P
-The \fIpattern_position\fP field is present from version 1 of the callout
-structure. It contains the offset to the next item to be matched in the pattern
-string.
-.P
-The \fInext_item_length\fP field is present from version 1 of the callout
-structure. It contains the length of the next item to be matched in the pattern
-string. When the callout immediately precedes an alternation bar, a closing
-parenthesis, or the end of the pattern, the length is zero. When the callout
-precedes an opening parenthesis, the length is that of the entire subpattern.
-.P
-The \fIpattern_position\fP and \fInext_item_length\fP fields are intended to
-help in distinguishing between different automatic callouts, which all have the
-same callout number. However, they are set for all callouts.
-.P
-The \fImark\fP field is present from version 2 of the callout structure. In
-callouts from \fBpcre_exec()\fP or \fBpcre[16|32]_exec()\fP it contains a
-pointer to the zero-terminated name of the most recently passed (*MARK),
-(*PRUNE), or (*THEN) item in the match, or NULL if no such items have been
-passed. Instances of (*PRUNE) or (*THEN) without a name do not obliterate a
-previous (*MARK). In callouts from the DFA matching functions this field always
-contains NULL.
-.
-.
-.SH "RETURN VALUES"
-.rs
-.sp
-The external callout function returns an integer to PCRE. If the value is zero,
-matching proceeds as normal. If the value is greater than zero, matching fails
-at the current point, but the testing of other matching possibilities goes
-ahead, just as if a lookahead assertion had failed. If the value is less than
-zero, the match is abandoned, the matching function returns the negative value.
-.P
-Negative values should normally be chosen from the set of PCRE_ERROR_xxx
-values. In particular, PCRE_ERROR_NOMATCH forces a standard "no match" failure.
-The error number PCRE_ERROR_CALLOUT is reserved for use by callout functions;
-it will never be used by PCRE itself.
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 12 November 2013
-Copyright (c) 1997-2013 University of Cambridge.
-.fi
diff --git a/libs/Pcre16/docs/doc/pcrecompat.3 b/libs/Pcre16/docs/doc/pcrecompat.3
deleted file mode 100644
index 6156e776f5..0000000000
--- a/libs/Pcre16/docs/doc/pcrecompat.3
+++ /dev/null
@@ -1,200 +0,0 @@
-.TH PCRECOMPAT 3 "10 November 2013" "PCRE 8.34"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH "DIFFERENCES BETWEEN PCRE AND PERL"
-.rs
-.sp
-This document describes the differences in the ways that PCRE and Perl handle
-regular expressions. The differences described here are with respect to Perl
-versions 5.10 and above.
-.P
-1. PCRE has only a subset of Perl's Unicode support. Details of what it does
-have are given in the
-.\" HREF
-\fBpcreunicode\fP
-.\"
-page.
-.P
-2. PCRE allows repeat quantifiers only on parenthesized assertions, but they do
-not mean what you might think. For example, (?!a){3} does not assert that the
-next three characters are not "a". It just asserts that the next character is
-not "a" three times (in principle: PCRE optimizes this to run the assertion
-just once). Perl allows repeat quantifiers on other assertions such as \eb, but
-these do not seem to have any use.
-.P
-3. Capturing subpatterns that occur inside negative lookahead assertions are
-counted, but their entries in the offsets vector are never set. Perl sometimes
-(but not always) sets its numerical variables from inside negative assertions.
-.P
-4. Though binary zero characters are supported in the subject string, they are
-not allowed in a pattern string because it is passed as a normal C string,
-terminated by zero. The escape sequence \e0 can be used in the pattern to
-represent a binary zero.
-.P
-5. The following Perl escape sequences are not supported: \el, \eu, \eL,
-\eU, and \eN when followed by a character name or Unicode value. (\eN on its
-own, matching a non-newline character, is supported.) In fact these are
-implemented by Perl's general string-handling and are not part of its pattern
-matching engine. If any of these are encountered by PCRE, an error is
-generated by default. However, if the PCRE_JAVASCRIPT_COMPAT option is set,
-\eU and \eu are interpreted as JavaScript interprets them.
-.P
-6. The Perl escape sequences \ep, \eP, and \eX are supported only if PCRE is
-built with Unicode character property support. The properties that can be
-tested with \ep and \eP are limited to the general category properties such as
-Lu and Nd, script names such as Greek or Han, and the derived properties Any
-and L&. PCRE does support the Cs (surrogate) property, which Perl does not; the
-Perl documentation says "Because Perl hides the need for the user to understand
-the internal representation of Unicode characters, there is no need to
-implement the somewhat messy concept of surrogates."
-.P
-7. PCRE does support the \eQ...\eE escape for quoting substrings. Characters in
-between are treated as literals. This is slightly different from Perl in that $
-and @ are also handled as literals inside the quotes. In Perl, they cause
-variable interpolation (but of course PCRE does not have variables). Note the
-following examples:
-.sp
- Pattern PCRE matches Perl matches
-.sp
-.\" JOIN
- \eQabc$xyz\eE abc$xyz abc followed by the
- contents of $xyz
- \eQabc\e$xyz\eE abc\e$xyz abc\e$xyz
- \eQabc\eE\e$\eQxyz\eE abc$xyz abc$xyz
-.sp
-The \eQ...\eE sequence is recognized both inside and outside character classes.
-.P
-8. Fairly obviously, PCRE does not support the (?{code}) and (??{code})
-constructions. However, there is support for recursive patterns. This is not
-available in Perl 5.8, but it is in Perl 5.10. Also, the PCRE "callout"
-feature allows an external function to be called during pattern matching. See
-the
-.\" HREF
-\fBpcrecallout\fP
-.\"
-documentation for details.
-.P
-9. Subpatterns that are called as subroutines (whether or not recursively) are
-always treated as atomic groups in PCRE. This is like Python, but unlike Perl.
-Captured values that are set outside a subroutine call can be reference from
-inside in PCRE, but not in Perl. There is a discussion that explains these
-differences in more detail in the
-.\" HTML <a href="pcrepattern.html#recursiondifference">
-.\" </a>
-section on recursion differences from Perl
-.\"
-in the
-.\" HREF
-\fBpcrepattern\fP
-.\"
-page.
-.P
-10. If any of the backtracking control verbs are used in a subpattern that is
-called as a subroutine (whether or not recursively), their effect is confined
-to that subpattern; it does not extend to the surrounding pattern. This is not
-always the case in Perl. In particular, if (*THEN) is present in a group that
-is called as a subroutine, its action is limited to that group, even if the
-group does not contain any | characters. Note that such subpatterns are
-processed as anchored at the point where they are tested.
-.P
-11. If a pattern contains more than one backtracking control verb, the first
-one that is backtracked onto acts. For example, in the pattern
-A(*COMMIT)B(*PRUNE)C a failure in B triggers (*COMMIT), but a failure in C
-triggers (*PRUNE). Perl's behaviour is more complex; in many cases it is the
-same as PCRE, but there are examples where it differs.
-.P
-12. Most backtracking verbs in assertions have their normal actions. They are
-not confined to the assertion.
-.P
-13. There are some differences that are concerned with the settings of captured
-strings when part of a pattern is repeated. For example, matching "aba" against
-the pattern /^(a(b)?)+$/ in Perl leaves $2 unset, but in PCRE it is set to "b".
-.P
-14. PCRE's handling of duplicate subpattern numbers and duplicate subpattern
-names is not as general as Perl's. This is a consequence of the fact the PCRE
-works internally just with numbers, using an external table to translate
-between numbers and names. In particular, a pattern such as (?|(?<a>A)|(?<b>B),
-where the two capturing parentheses have the same number but different names,
-is not supported, and causes an error at compile time. If it were allowed, it
-would not be possible to distinguish which parentheses matched, because both
-names map to capturing subpattern number 1. To avoid this confusing situation,
-an error is given at compile time.
-.P
-15. Perl recognizes comments in some places that PCRE does not, for example,
-between the ( and ? at the start of a subpattern. If the /x modifier is set,
-Perl allows white space between ( and ? (though current Perls warn that this is
-deprecated) but PCRE never does, even if the PCRE_EXTENDED option is set.
-.P
-16. Perl, when in warning mode, gives warnings for character classes such as
-[A-\ed] or [a-[:digit:]]. It then treats the hyphens as literals. PCRE has no
-warning features, so it gives an error in these cases because they are almost
-certainly user mistakes.
-.P
-17. In PCRE, the upper/lower case character properties Lu and Ll are not
-affected when case-independent matching is specified. For example, \ep{Lu}
-always matches an upper case letter. I think Perl has changed in this respect;
-in the release at the time of writing (5.16), \ep{Lu} and \ep{Ll} match all
-letters, regardless of case, when case independence is specified.
-.P
-18. PCRE provides some extensions to the Perl regular expression facilities.
-Perl 5.10 includes new features that are not in earlier versions of Perl, some
-of which (such as named parentheses) have been in PCRE for some time. This list
-is with respect to Perl 5.10:
-.sp
-(a) Although lookbehind assertions in PCRE must match fixed length strings,
-each alternative branch of a lookbehind assertion can match a different length
-of string. Perl requires them all to have the same length.
-.sp
-(b) If PCRE_DOLLAR_ENDONLY is set and PCRE_MULTILINE is not set, the $
-meta-character matches only at the very end of the string.
-.sp
-(c) If PCRE_EXTRA is set, a backslash followed by a letter with no special
-meaning is faulted. Otherwise, like Perl, the backslash is quietly ignored.
-(Perl can be made to issue a warning.)
-.sp
-(d) If PCRE_UNGREEDY is set, the greediness of the repetition quantifiers is
-inverted, that is, by default they are not greedy, but if followed by a
-question mark they are.
-.sp
-(e) PCRE_ANCHORED can be used at matching time to force a pattern to be tried
-only at the first matching position in the subject string.
-.sp
-(f) The PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NOTEMPTY_ATSTART, and
-PCRE_NO_AUTO_CAPTURE options for \fBpcre_exec()\fP have no Perl equivalents.
-.sp
-(g) The \eR escape sequence can be restricted to match only CR, LF, or CRLF
-by the PCRE_BSR_ANYCRLF option.
-.sp
-(h) The callout facility is PCRE-specific.
-.sp
-(i) The partial matching facility is PCRE-specific.
-.sp
-(j) Patterns compiled by PCRE can be saved and re-used at a later time, even on
-different hosts that have the other endianness. However, this does not apply to
-optimized data created by the just-in-time compiler.
-.sp
-(k) The alternative matching functions (\fBpcre_dfa_exec()\fP,
-\fBpcre16_dfa_exec()\fP and \fBpcre32_dfa_exec()\fP,) match in a different way
-and are not Perl-compatible.
-.sp
-(l) PCRE recognizes some special sequences such as (*CR) at the start of
-a pattern that set overall options that cannot be changed within the pattern.
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 10 November 2013
-Copyright (c) 1997-2013 University of Cambridge.
-.fi
diff --git a/libs/Pcre16/docs/doc/pcrecpp.3 b/libs/Pcre16/docs/doc/pcrecpp.3
deleted file mode 100644
index fbddd86ab3..0000000000
--- a/libs/Pcre16/docs/doc/pcrecpp.3
+++ /dev/null
@@ -1,348 +0,0 @@
-.TH PCRECPP 3 "08 January 2012" "PCRE 8.30"
-.SH NAME
-PCRE - Perl-compatible regular expressions.
-.SH "SYNOPSIS OF C++ WRAPPER"
-.rs
-.sp
-.B #include <pcrecpp.h>
-.
-.SH DESCRIPTION
-.rs
-.sp
-The C++ wrapper for PCRE was provided by Google Inc. Some additional
-functionality was added by Giuseppe Maxia. This brief man page was constructed
-from the notes in the \fIpcrecpp.h\fP file, which should be consulted for
-further details. Note that the C++ wrapper supports only the original 8-bit
-PCRE library. There is no 16-bit or 32-bit support at present.
-.
-.
-.SH "MATCHING INTERFACE"
-.rs
-.sp
-The "FullMatch" operation checks that supplied text matches a supplied pattern
-exactly. If pointer arguments are supplied, it copies matched sub-strings that
-match sub-patterns into them.
-.sp
- Example: successful match
- pcrecpp::RE re("h.*o");
- re.FullMatch("hello");
-.sp
- Example: unsuccessful match (requires full match):
- pcrecpp::RE re("e");
- !re.FullMatch("hello");
-.sp
- Example: creating a temporary RE object:
- pcrecpp::RE("h.*o").FullMatch("hello");
-.sp
-You can pass in a "const char*" or a "string" for "text". The examples below
-tend to use a const char*. You can, as in the different examples above, store
-the RE object explicitly in a variable or use a temporary RE object. The
-examples below use one mode or the other arbitrarily. Either could correctly be
-used for any of these examples.
-.P
-You must supply extra pointer arguments to extract matched subpieces.
-.sp
- Example: extracts "ruby" into "s" and 1234 into "i"
- int i;
- string s;
- pcrecpp::RE re("(\e\ew+):(\e\ed+)");
- re.FullMatch("ruby:1234", &s, &i);
-.sp
- Example: does not try to extract any extra sub-patterns
- re.FullMatch("ruby:1234", &s);
-.sp
- Example: does not try to extract into NULL
- re.FullMatch("ruby:1234", NULL, &i);
-.sp
- Example: integer overflow causes failure
- !re.FullMatch("ruby:1234567891234", NULL, &i);
-.sp
- Example: fails because there aren't enough sub-patterns:
- !pcrecpp::RE("\e\ew+:\e\ed+").FullMatch("ruby:1234", &s);
-.sp
- Example: fails because string cannot be stored in integer
- !pcrecpp::RE("(.*)").FullMatch("ruby", &i);
-.sp
-The provided pointer arguments can be pointers to any scalar numeric
-type, or one of:
-.sp
- string (matched piece is copied to string)
- StringPiece (StringPiece is mutated to point to matched piece)
- T (where "bool T::ParseFrom(const char*, int)" exists)
- NULL (the corresponding matched sub-pattern is not copied)
-.sp
-The function returns true iff all of the following conditions are satisfied:
-.sp
- a. "text" matches "pattern" exactly;
-.sp
- b. The number of matched sub-patterns is >= number of supplied
- pointers;
-.sp
- c. The "i"th argument has a suitable type for holding the
- string captured as the "i"th sub-pattern. If you pass in
- void * NULL for the "i"th argument, or a non-void * NULL
- of the correct type, or pass fewer arguments than the
- number of sub-patterns, "i"th captured sub-pattern is
- ignored.
-.sp
-CAVEAT: An optional sub-pattern that does not exist in the matched
-string is assigned the empty string. Therefore, the following will
-return false (because the empty string is not a valid number):
-.sp
- int number;
- pcrecpp::RE::FullMatch("abc", "[a-z]+(\e\ed+)?", &number);
-.sp
-The matching interface supports at most 16 arguments per call.
-If you need more, consider using the more general interface
-\fBpcrecpp::RE::DoMatch\fP. See \fBpcrecpp.h\fP for the signature for
-\fBDoMatch\fP.
-.P
-NOTE: Do not use \fBno_arg\fP, which is used internally to mark the end of a
-list of optional arguments, as a placeholder for missing arguments, as this can
-lead to segfaults.
-.
-.
-.SH "QUOTING METACHARACTERS"
-.rs
-.sp
-You can use the "QuoteMeta" operation to insert backslashes before all
-potentially meaningful characters in a string. The returned string, used as a
-regular expression, will exactly match the original string.
-.sp
- Example:
- string quoted = RE::QuoteMeta(unquoted);
-.sp
-Note that it's legal to escape a character even if it has no special meaning in
-a regular expression -- so this function does that. (This also makes it
-identical to the perl function of the same name; see "perldoc -f quotemeta".)
-For example, "1.5-2.0?" becomes "1\e.5\e-2\e.0\e?".
-.
-.SH "PARTIAL MATCHES"
-.rs
-.sp
-You can use the "PartialMatch" operation when you want the pattern
-to match any substring of the text.
-.sp
- Example: simple search for a string:
- pcrecpp::RE("ell").PartialMatch("hello");
-.sp
- Example: find first number in a string:
- int number;
- pcrecpp::RE re("(\e\ed+)");
- re.PartialMatch("x*100 + 20", &number);
- assert(number == 100);
-.
-.
-.SH "UTF-8 AND THE MATCHING INTERFACE"
-.rs
-.sp
-By default, pattern and text are plain text, one byte per character. The UTF8
-flag, passed to the constructor, causes both pattern and string to be treated
-as UTF-8 text, still a byte stream but potentially multiple bytes per
-character. In practice, the text is likelier to be UTF-8 than the pattern, but
-the match returned may depend on the UTF8 flag, so always use it when matching
-UTF8 text. For example, "." will match one byte normally but with UTF8 set may
-match up to three bytes of a multi-byte character.
-.sp
- Example:
- pcrecpp::RE_Options options;
- options.set_utf8();
- pcrecpp::RE re(utf8_pattern, options);
- re.FullMatch(utf8_string);
-.sp
- Example: using the convenience function UTF8():
- pcrecpp::RE re(utf8_pattern, pcrecpp::UTF8());
- re.FullMatch(utf8_string);
-.sp
-NOTE: The UTF8 flag is ignored if pcre was not configured with the
- --enable-utf8 flag.
-.
-.
-.SH "PASSING MODIFIERS TO THE REGULAR EXPRESSION ENGINE"
-.rs
-.sp
-PCRE defines some modifiers to change the behavior of the regular expression
-engine. The C++ wrapper defines an auxiliary class, RE_Options, as a vehicle to
-pass such modifiers to a RE class. Currently, the following modifiers are
-supported:
-.sp
- modifier description Perl corresponding
-.sp
- PCRE_CASELESS case insensitive match /i
- PCRE_MULTILINE multiple lines match /m
- PCRE_DOTALL dot matches newlines /s
- PCRE_DOLLAR_ENDONLY $ matches only at end N/A
- PCRE_EXTRA strict escape parsing N/A
- PCRE_EXTENDED ignore white spaces /x
- PCRE_UTF8 handles UTF8 chars built-in
- PCRE_UNGREEDY reverses * and *? N/A
- PCRE_NO_AUTO_CAPTURE disables capturing parens N/A (*)
-.sp
-(*) Both Perl and PCRE allow non capturing parentheses by means of the
-"?:" modifier within the pattern itself. e.g. (?:ab|cd) does not
-capture, while (ab|cd) does.
-.P
-For a full account on how each modifier works, please check the
-PCRE API reference page.
-.P
-For each modifier, there are two member functions whose name is made
-out of the modifier in lowercase, without the "PCRE_" prefix. For
-instance, PCRE_CASELESS is handled by
-.sp
- bool caseless()
-.sp
-which returns true if the modifier is set, and
-.sp
- RE_Options & set_caseless(bool)
-.sp
-which sets or unsets the modifier. Moreover, PCRE_EXTRA_MATCH_LIMIT can be
-accessed through the \fBset_match_limit()\fP and \fBmatch_limit()\fP member
-functions. Setting \fImatch_limit\fP to a non-zero value will limit the
-execution of pcre to keep it from doing bad things like blowing the stack or
-taking an eternity to return a result. A value of 5000 is good enough to stop
-stack blowup in a 2MB thread stack. Setting \fImatch_limit\fP to zero disables
-match limiting. Alternatively, you can call \fBmatch_limit_recursion()\fP
-which uses PCRE_EXTRA_MATCH_LIMIT_RECURSION to limit how much PCRE
-recurses. \fBmatch_limit()\fP limits the number of matches PCRE does;
-\fBmatch_limit_recursion()\fP limits the depth of internal recursion, and
-therefore the amount of stack that is used.
-.P
-Normally, to pass one or more modifiers to a RE class, you declare
-a \fIRE_Options\fP object, set the appropriate options, and pass this
-object to a RE constructor. Example:
-.sp
- RE_Options opt;
- opt.set_caseless(true);
- if (RE("HELLO", opt).PartialMatch("hello world")) ...
-.sp
-RE_options has two constructors. The default constructor takes no arguments and
-creates a set of flags that are off by default. The optional parameter
-\fIoption_flags\fP is to facilitate transfer of legacy code from C programs.
-This lets you do
-.sp
- RE(pattern,
- RE_Options(PCRE_CASELESS|PCRE_MULTILINE)).PartialMatch(str);
-.sp
-However, new code is better off doing
-.sp
- RE(pattern,
- RE_Options().set_caseless(true).set_multiline(true))
- .PartialMatch(str);
-.sp
-If you are going to pass one of the most used modifiers, there are some
-convenience functions that return a RE_Options class with the
-appropriate modifier already set: \fBCASELESS()\fP, \fBUTF8()\fP,
-\fBMULTILINE()\fP, \fBDOTALL\fP(), and \fBEXTENDED()\fP.
-.P
-If you need to set several options at once, and you don't want to go through
-the pains of declaring a RE_Options object and setting several options, there
-is a parallel method that give you such ability on the fly. You can concatenate
-several \fBset_xxxxx()\fP member functions, since each of them returns a
-reference to its class object. For example, to pass PCRE_CASELESS,
-PCRE_EXTENDED, and PCRE_MULTILINE to a RE with one statement, you may write:
-.sp
- RE(" ^ xyz \e\es+ .* blah$",
- RE_Options()
- .set_caseless(true)
- .set_extended(true)
- .set_multiline(true)).PartialMatch(sometext);
-.sp
-.
-.
-.SH "SCANNING TEXT INCREMENTALLY"
-.rs
-.sp
-The "Consume" operation may be useful if you want to repeatedly
-match regular expressions at the front of a string and skip over
-them as they match. This requires use of the "StringPiece" type,
-which represents a sub-range of a real string. Like RE, StringPiece
-is defined in the pcrecpp namespace.
-.sp
- Example: read lines of the form "var = value" from a string.
- string contents = ...; // Fill string somehow
- pcrecpp::StringPiece input(contents); // Wrap in a StringPiece
-.sp
- string var;
- int value;
- pcrecpp::RE re("(\e\ew+) = (\e\ed+)\en");
- while (re.Consume(&input, &var, &value)) {
- ...;
- }
-.sp
-Each successful call to "Consume" will set "var/value", and also
-advance "input" so it points past the matched text.
-.P
-The "FindAndConsume" operation is similar to "Consume" but does not
-anchor your match at the beginning of the string. For example, you
-could extract all words from a string by repeatedly calling
-.sp
- pcrecpp::RE("(\e\ew+)").FindAndConsume(&input, &word)
-.
-.
-.SH "PARSING HEX/OCTAL/C-RADIX NUMBERS"
-.rs
-.sp
-By default, if you pass a pointer to a numeric value, the
-corresponding text is interpreted as a base-10 number. You can
-instead wrap the pointer with a call to one of the operators Hex(),
-Octal(), or CRadix() to interpret the text in another base. The
-CRadix operator interprets C-style "0" (base-8) and "0x" (base-16)
-prefixes, but defaults to base-10.
-.sp
- Example:
- int a, b, c, d;
- pcrecpp::RE re("(.*) (.*) (.*) (.*)");
- re.FullMatch("100 40 0100 0x40",
- pcrecpp::Octal(&a), pcrecpp::Hex(&b),
- pcrecpp::CRadix(&c), pcrecpp::CRadix(&d));
-.sp
-will leave 64 in a, b, c, and d.
-.
-.
-.SH "REPLACING PARTS OF STRINGS"
-.rs
-.sp
-You can replace the first match of "pattern" in "str" with "rewrite".
-Within "rewrite", backslash-escaped digits (\e1 to \e9) can be
-used to insert text matching corresponding parenthesized group
-from the pattern. \e0 in "rewrite" refers to the entire matching
-text. For example:
-.sp
- string s = "yabba dabba doo";
- pcrecpp::RE("b+").Replace("d", &s);
-.sp
-will leave "s" containing "yada dabba doo". The result is true if the pattern
-matches and a replacement occurs, false otherwise.
-.P
-\fBGlobalReplace\fP is like \fBReplace\fP except that it replaces all
-occurrences of the pattern in the string with the rewrite. Replacements are
-not subject to re-matching. For example:
-.sp
- string s = "yabba dabba doo";
- pcrecpp::RE("b+").GlobalReplace("d", &s);
-.sp
-will leave "s" containing "yada dada doo". It returns the number of
-replacements made.
-.P
-\fBExtract\fP is like \fBReplace\fP, except that if the pattern matches,
-"rewrite" is copied into "out" (an additional argument) with substitutions.
-The non-matching portions of "text" are ignored. Returns true iff a match
-occurred and the extraction happened successfully; if no match occurs, the
-string is left unaffected.
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-The C++ wrapper was contributed by Google Inc.
-Copyright (c) 2007 Google Inc.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 08 January 2012
-.fi
diff --git a/libs/Pcre16/docs/doc/pcredemo.3 b/libs/Pcre16/docs/doc/pcredemo.3
deleted file mode 100644
index 194629b1fa..0000000000
--- a/libs/Pcre16/docs/doc/pcredemo.3
+++ /dev/null
@@ -1,424 +0,0 @@
-.\" Start example.
-.de EX
-. nr mE \\n(.f
-. nf
-. nh
-. ft CW
-..
-.
-.
-.\" End example.
-.de EE
-. ft \\n(mE
-. fi
-. hy \\n(HY
-..
-.
-.EX
-/*************************************************
-* PCRE DEMONSTRATION PROGRAM *
-*************************************************/
-
-/* This is a demonstration program to illustrate the most straightforward ways
-of calling the PCRE regular expression library from a C program. See the
-pcresample documentation for a short discussion ("man pcresample" if you have
-the PCRE man pages installed).
-
-In Unix-like environments, if PCRE is installed in your standard system
-libraries, you should be able to compile this program using this command:
-
-gcc -Wall pcredemo.c -lpcre -o pcredemo
-
-If PCRE is not installed in a standard place, it is likely to be installed with
-support for the pkg-config mechanism. If you have pkg-config, you can compile
-this program using this command:
-
-gcc -Wall pcredemo.c `pkg-config --cflags --libs libpcre` -o pcredemo
-
-If you do not have pkg-config, you may have to use this:
-
-gcc -Wall pcredemo.c -I/usr/local/include -L/usr/local/lib \e
- -R/usr/local/lib -lpcre -o pcredemo
-
-Replace "/usr/local/include" and "/usr/local/lib" with wherever the include and
-library files for PCRE are installed on your system. Only some operating
-systems (e.g. Solaris) use the -R option.
-
-Building under Windows:
-
-If you want to statically link this 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. So in this environment, uncomment the following line. */
-
-/* #define PCRE_STATIC */
-
-#include <stdio.h>
-#include <string.h>
-#include <pcre.h>
-
-#define OVECCOUNT 30 /* should be a multiple of 3 */
-
-
-int main(int argc, char **argv)
-{
-pcre *re;
-const char *error;
-char *pattern;
-char *subject;
-unsigned char *name_table;
-unsigned int option_bits;
-int erroffset;
-int find_all;
-int crlf_is_newline;
-int namecount;
-int name_entry_size;
-int ovector[OVECCOUNT];
-int subject_length;
-int rc, i;
-int utf8;
-
-
-/**************************************************************************
-* First, sort out the command line. There is only one possible option at *
-* the moment, "-g" to request repeated matching to find all occurrences, *
-* like Perl's /g option. We set the variable find_all to a non-zero value *
-* if the -g option is present. Apart from that, there must be exactly two *
-* arguments. *
-**************************************************************************/
-
-find_all = 0;
-for (i = 1; i < argc; i++)
- {
- if (strcmp(argv[i], "-g") == 0) find_all = 1;
- else break;
- }
-
-/* After the options, we require exactly two arguments, which are the pattern,
-and the subject string. */
-
-if (argc - i != 2)
- {
- printf("Two arguments required: a regex and a subject string\en");
- return 1;
- }
-
-pattern = argv[i];
-subject = argv[i+1];
-subject_length = (int)strlen(subject);
-
-
-/*************************************************************************
-* Now we are going to compile the regular expression pattern, and handle *
-* and errors that are detected. *
-*************************************************************************/
-
-re = pcre_compile(
- pattern, /* the pattern */
- 0, /* default options */
- &error, /* for error message */
- &erroffset, /* for error offset */
- NULL); /* use default character tables */
-
-/* Compilation failed: print the error message and exit */
-
-if (re == NULL)
- {
- printf("PCRE compilation failed at offset %d: %s\en", erroffset, error);
- return 1;
- }
-
-
-/*************************************************************************
-* If the compilation succeeded, we call PCRE again, in order to do a *
-* pattern match against the subject string. This does just ONE match. If *
-* further matching is needed, it will be done below. *
-*************************************************************************/
-
-rc = pcre_exec(
- re, /* the compiled pattern */
- NULL, /* no extra data - we didn't study the pattern */
- subject, /* the subject string */
- subject_length, /* the length of the subject */
- 0, /* start at offset 0 in the subject */
- 0, /* default options */
- ovector, /* output vector for substring information */
- OVECCOUNT); /* number of elements in the output vector */
-
-/* Matching failed: handle error cases */
-
-if (rc < 0)
- {
- switch(rc)
- {
- case PCRE_ERROR_NOMATCH: printf("No match\en"); break;
- /*
- Handle other special cases if you like
- */
- default: printf("Matching error %d\en", rc); break;
- }
- pcre_free(re); /* Release memory used for the compiled pattern */
- return 1;
- }
-
-/* Match succeded */
-
-printf("\enMatch succeeded at offset %d\en", ovector[0]);
-
-
-/*************************************************************************
-* We have found the first match within the subject string. If the output *
-* vector wasn't big enough, say so. Then output any substrings that were *
-* captured. *
-*************************************************************************/
-
-/* The output vector wasn't big enough */
-
-if (rc == 0)
- {
- rc = OVECCOUNT/3;
- printf("ovector only has room for %d captured substrings\en", rc - 1);
- }
-
-/* Show substrings stored in the output vector by number. Obviously, in a real
-application you might want to do things other than print them. */
-
-for (i = 0; i < rc; i++)
- {
- char *substring_start = subject + ovector[2*i];
- int substring_length = ovector[2*i+1] - ovector[2*i];
- printf("%2d: %.*s\en", i, substring_length, substring_start);
- }
-
-
-/**************************************************************************
-* That concludes the basic part of this demonstration program. We have *
-* compiled a pattern, and performed a single match. The code that follows *
-* shows first how to access named substrings, and then how to code for *
-* repeated matches on the same subject. *
-**************************************************************************/
-
-/* See if there are any named substrings, and if so, show them by name. First
-we have to extract the count of named parentheses from the pattern. */
-
-(void)pcre_fullinfo(
- re, /* the compiled pattern */
- NULL, /* no extra data - we didn't study the pattern */
- PCRE_INFO_NAMECOUNT, /* number of named substrings */
- &namecount); /* where to put the answer */
-
-if (namecount <= 0) printf("No named substrings\en"); else
- {
- unsigned char *tabptr;
- printf("Named substrings\en");
-
- /* Before we can access the substrings, we must extract the table for
- translating names to numbers, and the size of each entry in the table. */
-
- (void)pcre_fullinfo(
- re, /* the compiled pattern */
- NULL, /* no extra data - we didn't study the pattern */
- PCRE_INFO_NAMETABLE, /* address of the table */
- &name_table); /* where to put the answer */
-
- (void)pcre_fullinfo(
- re, /* the compiled pattern */
- NULL, /* no extra data - we didn't study the pattern */
- PCRE_INFO_NAMEENTRYSIZE, /* size of each entry in the table */
- &name_entry_size); /* where to put the answer */
-
- /* Now we can scan the table and, for each entry, print the number, the name,
- and the substring itself. */
-
- tabptr = name_table;
- for (i = 0; i < namecount; i++)
- {
- int n = (tabptr[0] << 8) | tabptr[1];
- printf("(%d) %*s: %.*s\en", n, name_entry_size - 3, tabptr + 2,
- ovector[2*n+1] - ovector[2*n], subject + ovector[2*n]);
- tabptr += name_entry_size;
- }
- }
-
-
-/*************************************************************************
-* If the "-g" option was given on the command line, we want to continue *
-* to search for additional matches in the subject string, in a similar *
-* way to the /g option in Perl. This turns out to be trickier than you *
-* might think because of the possibility of matching an empty string. *
-* What happens is as follows: *
-* *
-* If the previous match was NOT for an empty string, we can just start *
-* the next match at the end of the previous one. *
-* *
-* If the previous match WAS for an empty string, we can't do that, as it *
-* would lead to an infinite loop. Instead, a special call of pcre_exec() *
-* is made with the PCRE_NOTEMPTY_ATSTART and PCRE_ANCHORED flags set. *
-* The first of these tells PCRE that an empty string at the start of the *
-* subject is not a valid match; other possibilities must be tried. The *
-* second flag restricts PCRE to one match attempt at the initial string *
-* position. If this match succeeds, an alternative to the empty string *
-* match has been found, and we can print it and proceed round the loop, *
-* advancing by the length of whatever was found. If this match does not *
-* succeed, we still stay in the loop, advancing by just one character. *
-* In UTF-8 mode, which can be set by (*UTF8) in the pattern, this may be *
-* more than one byte. *
-* *
-* However, there is a complication concerned with newlines. When the *
-* newline convention is such that CRLF is a valid newline, we must *
-* advance by two characters rather than one. The newline convention can *
-* be set in the regex by (*CR), etc.; if not, we must find the default. *
-*************************************************************************/
-
-if (!find_all) /* Check for -g */
- {
- pcre_free(re); /* Release the memory used for the compiled pattern */
- return 0; /* Finish unless -g was given */
- }
-
-/* Before running the loop, check for UTF-8 and whether CRLF is a valid newline
-sequence. First, find the options with which the regex was compiled; extract
-the UTF-8 state, and mask off all but the newline options. */
-
-(void)pcre_fullinfo(re, NULL, PCRE_INFO_OPTIONS, &option_bits);
-utf8 = option_bits & PCRE_UTF8;
-option_bits &= PCRE_NEWLINE_CR|PCRE_NEWLINE_LF|PCRE_NEWLINE_CRLF|
- PCRE_NEWLINE_ANY|PCRE_NEWLINE_ANYCRLF;
-
-/* If no newline options were set, find the default newline convention from the
-build configuration. */
-
-if (option_bits == 0)
- {
- int d;
- (void)pcre_config(PCRE_CONFIG_NEWLINE, &d);
- /* Note that these values are always the ASCII ones, even in
- EBCDIC environments. CR = 13, NL = 10. */
- option_bits = (d == 13)? PCRE_NEWLINE_CR :
- (d == 10)? PCRE_NEWLINE_LF :
- (d == (13<<8 | 10))? PCRE_NEWLINE_CRLF :
- (d == -2)? PCRE_NEWLINE_ANYCRLF :
- (d == -1)? PCRE_NEWLINE_ANY : 0;
- }
-
-/* See if CRLF is a valid newline sequence. */
-
-crlf_is_newline =
- option_bits == PCRE_NEWLINE_ANY ||
- option_bits == PCRE_NEWLINE_CRLF ||
- option_bits == PCRE_NEWLINE_ANYCRLF;
-
-/* Loop for second and subsequent matches */
-
-for (;;)
- {
- int options = 0; /* Normally no options */
- int start_offset = ovector[1]; /* Start at end of previous match */
-
- /* If the previous match was for an empty string, we are finished if we are
- at the end of the subject. Otherwise, arrange to run another match at the
- same point to see if a non-empty match can be found. */
-
- if (ovector[0] == ovector[1])
- {
- if (ovector[0] == subject_length) break;
- options = PCRE_NOTEMPTY_ATSTART | PCRE_ANCHORED;
- }
-
- /* Run the next matching operation */
-
- rc = pcre_exec(
- re, /* the compiled pattern */
- NULL, /* no extra data - we didn't study the pattern */
- subject, /* the subject string */
- subject_length, /* the length of the subject */
- start_offset, /* starting offset in the subject */
- options, /* options */
- ovector, /* output vector for substring information */
- OVECCOUNT); /* number of elements in the output vector */
-
- /* This time, a result of NOMATCH isn't an error. If the value in "options"
- is zero, it just means we have found all possible matches, so the loop ends.
- Otherwise, it means we have failed to find a non-empty-string match at a
- point where there was a previous empty-string match. In this case, we do what
- Perl does: advance the matching position by one character, and continue. We
- do this by setting the "end of previous match" offset, because that is picked
- up at the top of the loop as the point at which to start again.
-
- There are two complications: (a) When CRLF is a valid newline sequence, and
- the current position is just before it, advance by an extra byte. (b)
- Otherwise we must ensure that we skip an entire UTF-8 character if we are in
- UTF-8 mode. */
-
- if (rc == PCRE_ERROR_NOMATCH)
- {
- if (options == 0) break; /* All matches found */
- ovector[1] = start_offset + 1; /* Advance one byte */
- if (crlf_is_newline && /* If CRLF is newline & */
- start_offset < subject_length - 1 && /* we are at CRLF, */
- subject[start_offset] == '\er' &&
- subject[start_offset + 1] == '\en')
- ovector[1] += 1; /* Advance by one more. */
- else if (utf8) /* Otherwise, ensure we */
- { /* advance a whole UTF-8 */
- while (ovector[1] < subject_length) /* character. */
- {
- if ((subject[ovector[1]] & 0xc0) != 0x80) break;
- ovector[1] += 1;
- }
- }
- continue; /* Go round the loop again */
- }
-
- /* Other matching errors are not recoverable. */
-
- if (rc < 0)
- {
- printf("Matching error %d\en", rc);
- pcre_free(re); /* Release memory used for the compiled pattern */
- return 1;
- }
-
- /* Match succeded */
-
- printf("\enMatch succeeded again at offset %d\en", ovector[0]);
-
- /* The match succeeded, but the output vector wasn't big enough. */
-
- if (rc == 0)
- {
- rc = OVECCOUNT/3;
- printf("ovector only has room for %d captured substrings\en", rc - 1);
- }
-
- /* As before, show substrings stored in the output vector by number, and then
- also any named substrings. */
-
- for (i = 0; i < rc; i++)
- {
- char *substring_start = subject + ovector[2*i];
- int substring_length = ovector[2*i+1] - ovector[2*i];
- printf("%2d: %.*s\en", i, substring_length, substring_start);
- }
-
- if (namecount <= 0) printf("No named substrings\en"); else
- {
- unsigned char *tabptr = name_table;
- printf("Named substrings\en");
- for (i = 0; i < namecount; i++)
- {
- int n = (tabptr[0] << 8) | tabptr[1];
- printf("(%d) %*s: %.*s\en", n, name_entry_size - 3, tabptr + 2,
- ovector[2*n+1] - ovector[2*n], subject + ovector[2*n]);
- tabptr += name_entry_size;
- }
- }
- } /* End of loop to find second and subsequent matches */
-
-printf("\en");
-pcre_free(re); /* Release memory used for the compiled pattern */
-return 0;
-}
-
-/* End of pcredemo.c */
-.EE
diff --git a/libs/Pcre16/docs/doc/pcregrep.1 b/libs/Pcre16/docs/doc/pcregrep.1
deleted file mode 100644
index 988667542f..0000000000
--- a/libs/Pcre16/docs/doc/pcregrep.1
+++ /dev/null
@@ -1,683 +0,0 @@
-.TH PCREGREP 1 "03 April 2014" "PCRE 8.35"
-.SH NAME
-pcregrep - a grep with Perl-compatible regular expressions.
-.SH SYNOPSIS
-.B pcregrep [options] [long options] [pattern] [path1 path2 ...]
-.
-.SH DESCRIPTION
-.rs
-.sp
-\fBpcregrep\fP searches files for character patterns, in the same way as other
-grep commands do, but it uses the PCRE regular expression library to support
-patterns that are compatible with the regular expressions of Perl 5. See
-.\" HREF
-\fBpcresyntax\fP(3)
-.\"
-for a quick-reference summary of pattern syntax, or
-.\" HREF
-\fBpcrepattern\fP(3)
-.\"
-for a full description of the syntax and semantics of the regular expressions
-that PCRE supports.
-.P
-Patterns, whether supplied on the command line or in a separate file, are given
-without delimiters. For example:
-.sp
- pcregrep Thursday /etc/motd
-.sp
-If you attempt to use delimiters (for example, by surrounding a pattern with
-slashes, as is common in Perl scripts), they are interpreted as part of the
-pattern. Quotes can of course be used to delimit patterns on the command line
-because they are interpreted by the shell, and indeed quotes are required if a
-pattern contains white space or shell metacharacters.
-.P
-The first argument that follows any option settings is treated as the single
-pattern to be matched when neither \fB-e\fP nor \fB-f\fP is present.
-Conversely, when one or both of these options are used to specify patterns, all
-arguments are treated as path names. At least one of \fB-e\fP, \fB-f\fP, or an
-argument pattern must be provided.
-.P
-If no files are specified, \fBpcregrep\fP reads the standard input. The
-standard input can also be referenced by a name consisting of a single hyphen.
-For example:
-.sp
- pcregrep some-pattern /file1 - /file3
-.sp
-By default, each line that matches a pattern is copied to the standard
-output, and if there is more than one file, the file name is output at the
-start of each line, followed by a colon. However, there are options that can
-change how \fBpcregrep\fP behaves. In particular, the \fB-M\fP option makes it
-possible to search for patterns that span line boundaries. What defines a line
-boundary is controlled by the \fB-N\fP (\fB--newline\fP) option.
-.P
-The amount of memory used for buffering files that are being scanned is
-controlled by a parameter that can be set by the \fB--buffer-size\fP option.
-The default value for this parameter is specified when \fBpcregrep\fP is built,
-with the default default being 20K. A block of memory three times this size is
-used (to allow for buffering "before" and "after" lines). An error occurs if a
-line overflows the buffer.
-.P
-Patterns can be no longer than 8K or BUFSIZ bytes, whichever is the greater.
-BUFSIZ is defined in \fB<stdio.h>\fP. When there is more than one pattern
-(specified by the use of \fB-e\fP and/or \fB-f\fP), each pattern is applied to
-each line in the order in which they are defined, except that all the \fB-e\fP
-patterns are tried before the \fB-f\fP patterns.
-.P
-By default, as soon as one pattern matches a line, no further patterns are
-considered. However, if \fB--colour\fP (or \fB--color\fP) is used to colour the
-matching substrings, or if \fB--only-matching\fP, \fB--file-offsets\fP, or
-\fB--line-offsets\fP is used to output only the part of the line that matched
-(either shown literally, or as an offset), scanning resumes immediately
-following the match, so that further matches on the same line can be found. If
-there are multiple patterns, they are all tried on the remainder of the line,
-but patterns that follow the one that matched are not tried on the earlier part
-of the line.
-.P
-This behaviour means that the order in which multiple patterns are specified
-can affect the output when one of the above options is used. This is no longer
-the same behaviour as GNU grep, which now manages to display earlier matches
-for later patterns (as long as there is no overlap).
-.P
-Patterns that can match an empty string are accepted, but empty string
-matches are never recognized. An example is the pattern "(super)?(man)?", in
-which all components are optional. This pattern finds all occurrences of both
-"super" and "man"; the output differs from matching with "super|man" when only
-the matching substrings are being shown.
-.P
-If the \fBLC_ALL\fP or \fBLC_CTYPE\fP environment variable is set,
-\fBpcregrep\fP uses the value to set a locale when calling the PCRE library.
-The \fB--locale\fP option can be used to override this.
-.
-.
-.SH "SUPPORT FOR COMPRESSED FILES"
-.rs
-.sp
-It is possible to compile \fBpcregrep\fP so that it uses \fBlibz\fP or
-\fBlibbz2\fP to read files whose names end in \fB.gz\fP or \fB.bz2\fP,
-respectively. You can find out whether your binary has support for one or both
-of these file types by running it with the \fB--help\fP option. If the
-appropriate support is not present, files are treated as plain text. The
-standard input is always so treated.
-.
-.
-.SH "BINARY FILES"
-.rs
-.sp
-By default, a file that contains a binary zero byte within the first 1024 bytes
-is identified as a binary file, and is processed specially. (GNU grep also
-identifies binary files in this manner.) See the \fB--binary-files\fP option
-for a means of changing the way binary files are handled.
-.
-.
-.SH OPTIONS
-.rs
-.sp
-The order in which some of the options appear can affect the output. For
-example, both the \fB-h\fP and \fB-l\fP options affect the printing of file
-names. Whichever comes later in the command line will be the one that takes
-effect. Similarly, except where noted below, if an option is given twice, the
-later setting is used. Numerical values for options may be followed by K or M,
-to signify multiplication by 1024 or 1024*1024 respectively.
-.TP 10
-\fB--\fP
-This terminates the list of options. It is useful if the next item on the
-command line starts with a hyphen but is not an option. This allows for the
-processing of patterns and filenames that start with hyphens.
-.TP
-\fB-A\fP \fInumber\fP, \fB--after-context=\fP\fInumber\fP
-Output \fInumber\fP lines of context after each matching line. If filenames
-and/or line numbers are being output, a hyphen separator is used instead of a
-colon for the context lines. A line containing "--" is output between each
-group of lines, unless they are in fact contiguous in the input file. The value
-of \fInumber\fP is expected to be relatively small. However, \fBpcregrep\fP
-guarantees to have up to 8K of following text available for context output.
-.TP
-\fB-a\fP, \fB--text\fP
-Treat binary files as text. This is equivalent to
-\fB--binary-files\fP=\fItext\fP.
-.TP
-\fB-B\fP \fInumber\fP, \fB--before-context=\fP\fInumber\fP
-Output \fInumber\fP lines of context before each matching line. If filenames
-and/or line numbers are being output, a hyphen separator is used instead of a
-colon for the context lines. A line containing "--" is output between each
-group of lines, unless they are in fact contiguous in the input file. The value
-of \fInumber\fP is expected to be relatively small. However, \fBpcregrep\fP
-guarantees to have up to 8K of preceding text available for context output.
-.TP
-\fB--binary-files=\fP\fIword\fP
-Specify how binary files are to be processed. If the word is "binary" (the
-default), pattern matching is performed on binary files, but the only output is
-"Binary file <name> matches" when a match succeeds. If the word is "text",
-which is equivalent to the \fB-a\fP or \fB--text\fP option, binary files are
-processed in the same way as any other file. In this case, when a match
-succeeds, the output may be binary garbage, which can have nasty effects if
-sent to a terminal. If the word is "without-match", which is equivalent to the
-\fB-I\fP option, binary files are not processed at all; they are assumed not to
-be of interest.
-.TP
-\fB--buffer-size=\fP\fInumber\fP
-Set the parameter that controls how much memory is used for buffering files
-that are being scanned.
-.TP
-\fB-C\fP \fInumber\fP, \fB--context=\fP\fInumber\fP
-Output \fInumber\fP lines of context both before and after each matching line.
-This is equivalent to setting both \fB-A\fP and \fB-B\fP to the same value.
-.TP
-\fB-c\fP, \fB--count\fP
-Do not output individual lines from the files that are being scanned; instead
-output the number of lines that would otherwise have been shown. If no lines
-are selected, the number zero is output. If several files are are being
-scanned, a count is output for each of them. However, if the
-\fB--files-with-matches\fP option is also used, only those files whose counts
-are greater than zero are listed. When \fB-c\fP is used, the \fB-A\fP,
-\fB-B\fP, and \fB-C\fP options are ignored.
-.TP
-\fB--colour\fP, \fB--color\fP
-If this option is given without any data, it is equivalent to "--colour=auto".
-If data is required, it must be given in the same shell item, separated by an
-equals sign.
-.TP
-\fB--colour=\fP\fIvalue\fP, \fB--color=\fP\fIvalue\fP
-This option specifies under what circumstances the parts of a line that matched
-a pattern should be coloured in the output. By default, the output is not
-coloured. The value (which is optional, see above) may be "never", "always", or
-"auto". In the latter case, colouring happens only if the standard output is
-connected to a terminal. More resources are used when colouring is enabled,
-because \fBpcregrep\fP has to search for all possible matches in a line, not
-just one, in order to colour them all.
-.sp
-The colour that is used can be specified by setting the environment variable
-PCREGREP_COLOUR or PCREGREP_COLOR. The value of this variable should be a
-string of two numbers, separated by a semicolon. They are copied directly into
-the control string for setting colour on a terminal, so it is your
-responsibility to ensure that they make sense. If neither of the environment
-variables is set, the default is "1;31", which gives red.
-.TP
-\fB-D\fP \fIaction\fP, \fB--devices=\fP\fIaction\fP
-If an input path is not a regular file or a directory, "action" specifies how
-it is to be processed. Valid values are "read" (the default) or "skip"
-(silently skip the path).
-.TP
-\fB-d\fP \fIaction\fP, \fB--directories=\fP\fIaction\fP
-If an input path is a directory, "action" specifies how it is to be processed.
-Valid values are "read" (the default in non-Windows environments, for
-compatibility with GNU grep), "recurse" (equivalent to the \fB-r\fP option), or
-"skip" (silently skip the path, the default in Windows environments). In the
-"read" case, directories are read as if they were ordinary files. In some
-operating systems the effect of reading a directory like this is an immediate
-end-of-file; in others it may provoke an error.
-.TP
-\fB-e\fP \fIpattern\fP, \fB--regex=\fP\fIpattern\fP, \fB--regexp=\fP\fIpattern\fP
-Specify a pattern to be matched. This option can be used multiple times in
-order to specify several patterns. It can also be used as a way of specifying a
-single pattern that starts with a hyphen. When \fB-e\fP is used, no argument
-pattern is taken from the command line; all arguments are treated as file
-names. There is no limit to the number of patterns. They are applied to each
-line in the order in which they are defined until one matches.
-.sp
-If \fB-f\fP is used with \fB-e\fP, the command line patterns are matched first,
-followed by the patterns from the file(s), independent of the order in which
-these options are specified. Note that multiple use of \fB-e\fP is not the same
-as a single pattern with alternatives. For example, X|Y finds the first
-character in a line that is X or Y, whereas if the two patterns are given
-separately, with X first, \fBpcregrep\fP finds X if it is present, even if it
-follows Y in the line. It finds Y only if there is no X in the line. This
-matters only if you are using \fB-o\fP or \fB--colo(u)r\fP to show the part(s)
-of the line that matched.
-.TP
-\fB--exclude\fP=\fIpattern\fP
-Files (but not directories) whose names match the pattern are skipped without
-being processed. This applies to all files, whether listed on the command line,
-obtained from \fB--file-list\fP, or by scanning a directory. The pattern is a
-PCRE regular expression, and is matched against the final component of the file
-name, not the entire path. The \fB-F\fP, \fB-w\fP, and \fB-x\fP options do not
-apply to this pattern. The option may be given any number of times in order to
-specify multiple patterns. If a file name matches both an \fB--include\fP
-and an \fB--exclude\fP pattern, it is excluded. There is no short form for this
-option.
-.TP
-\fB--exclude-from=\fP\fIfilename\fP
-Treat each non-empty line of the file as the data for an \fB--exclude\fP
-option. What constitutes a newline when reading the file is the operating
-system's default. The \fB--newline\fP option has no effect on this option. This
-option may be given more than once in order to specify a number of files to
-read.
-.TP
-\fB--exclude-dir\fP=\fIpattern\fP
-Directories whose names match the pattern are skipped without being processed,
-whatever the setting of the \fB--recursive\fP option. This applies to all
-directories, whether listed on the command line, obtained from
-\fB--file-list\fP, or by scanning a parent directory. The pattern is a PCRE
-regular expression, and is matched against the final component of the directory
-name, not the entire path. The \fB-F\fP, \fB-w\fP, and \fB-x\fP options do not
-apply to this pattern. The option may be given any number of times in order to
-specify more than one pattern. If a directory matches both \fB--include-dir\fP
-and \fB--exclude-dir\fP, it is excluded. There is no short form for this
-option.
-.TP
-\fB-F\fP, \fB--fixed-strings\fP
-Interpret each data-matching pattern as a list of fixed strings, separated by
-newlines, instead of as a regular expression. What constitutes a newline for
-this purpose is controlled by the \fB--newline\fP option. The \fB-w\fP (match
-as a word) and \fB-x\fP (match whole line) options can be used with \fB-F\fP.
-They apply to each of the fixed strings. A line is selected if any of the fixed
-strings are found in it (subject to \fB-w\fP or \fB-x\fP, if present). This
-option applies only to the patterns that are matched against the contents of
-files; it does not apply to patterns specified by any of the \fB--include\fP or
-\fB--exclude\fP options.
-.TP
-\fB-f\fP \fIfilename\fP, \fB--file=\fP\fIfilename\fP
-Read patterns from the file, one per line, and match them against
-each line of input. What constitutes a newline when reading the file is the
-operating system's default. The \fB--newline\fP option has no effect on this
-option. Trailing white space is removed from each line, and blank lines are
-ignored. An empty file contains no patterns and therefore matches nothing. See
-also the comments about multiple patterns versus a single pattern with
-alternatives in the description of \fB-e\fP above.
-.sp
-If this option is given more than once, all the specified files are
-read. A data line is output if any of the patterns match it. A filename can
-be given as "-" to refer to the standard input. When \fB-f\fP is used, patterns
-specified on the command line using \fB-e\fP may also be present; they are
-tested before the file's patterns. However, no other pattern is taken from the
-command line; all arguments are treated as the names of paths to be searched.
-.TP
-\fB--file-list\fP=\fIfilename\fP
-Read a list of files and/or directories that are to be scanned from the given
-file, one per line. Trailing white space is removed from each line, and blank
-lines are ignored. These paths are processed before any that are listed on the
-command line. The filename can be given as "-" to refer to the standard input.
-If \fB--file\fP and \fB--file-list\fP are both specified as "-", patterns are
-read first. This is useful only when the standard input is a terminal, from
-which further lines (the list of files) can be read after an end-of-file
-indication. If this option is given more than once, all the specified files are
-read.
-.TP
-\fB--file-offsets\fP
-Instead of showing lines or parts of lines that match, show each match as an
-offset from the start of the file and a length, separated by a comma. In this
-mode, no context is shown. That is, the \fB-A\fP, \fB-B\fP, and \fB-C\fP
-options are ignored. If there is more than one match in a line, each of them is
-shown separately. This option is mutually exclusive with \fB--line-offsets\fP
-and \fB--only-matching\fP.
-.TP
-\fB-H\fP, \fB--with-filename\fP
-Force the inclusion of the filename at the start of output lines when searching
-a single file. By default, the filename is not shown in this case. For matching
-lines, the filename is followed by a colon; for context lines, a hyphen
-separator is used. If a line number is also being output, it follows the file
-name.
-.TP
-\fB-h\fP, \fB--no-filename\fP
-Suppress the output filenames when searching multiple files. By default,
-filenames are shown when multiple files are searched. For matching lines, the
-filename is followed by a colon; for context lines, a hyphen separator is used.
-If a line number is also being output, it follows the file name.
-.TP
-\fB--help\fP
-Output a help message, giving brief details of the command options and file
-type support, and then exit. Anything else on the command line is
-ignored.
-.TP
-\fB-I\fP
-Treat binary files as never matching. This is equivalent to
-\fB--binary-files\fP=\fIwithout-match\fP.
-.TP
-\fB-i\fP, \fB--ignore-case\fP
-Ignore upper/lower case distinctions during comparisons.
-.TP
-\fB--include\fP=\fIpattern\fP
-If any \fB--include\fP patterns are specified, the only files that are
-processed are those that match one of the patterns (and do not match an
-\fB--exclude\fP pattern). This option does not affect directories, but it
-applies to all files, whether listed on the command line, obtained from
-\fB--file-list\fP, or by scanning a directory. The pattern is a PCRE regular
-expression, and is matched against the final component of the file name, not
-the entire path. The \fB-F\fP, \fB-w\fP, and \fB-x\fP options do not apply to
-this pattern. The option may be given any number of times. If a file name
-matches both an \fB--include\fP and an \fB--exclude\fP pattern, it is excluded.
-There is no short form for this option.
-.TP
-\fB--include-from=\fP\fIfilename\fP
-Treat each non-empty line of the file as the data for an \fB--include\fP
-option. What constitutes a newline for this purpose is the operating system's
-default. The \fB--newline\fP option has no effect on this option. This option
-may be given any number of times; all the files are read.
-.TP
-\fB--include-dir\fP=\fIpattern\fP
-If any \fB--include-dir\fP patterns are specified, the only directories that
-are processed are those that match one of the patterns (and do not match an
-\fB--exclude-dir\fP pattern). This applies to all directories, whether listed
-on the command line, obtained from \fB--file-list\fP, or by scanning a parent
-directory. The pattern is a PCRE regular expression, and is matched against the
-final component of the directory name, not the entire path. The \fB-F\fP,
-\fB-w\fP, and \fB-x\fP options do not apply to this pattern. The option may be
-given any number of times. If a directory matches both \fB--include-dir\fP and
-\fB--exclude-dir\fP, it is excluded. There is no short form for this option.
-.TP
-\fB-L\fP, \fB--files-without-match\fP
-Instead of outputting lines from the files, just output the names of the files
-that do not contain any lines that would have been output. Each file name is
-output once, on a separate line.
-.TP
-\fB-l\fP, \fB--files-with-matches\fP
-Instead of outputting lines from the files, just output the names of the files
-containing lines that would have been output. Each file name is output
-once, on a separate line. Searching normally stops as soon as a matching line
-is found in a file. However, if the \fB-c\fP (count) option is also used,
-matching continues in order to obtain the correct count, and those files that
-have at least one match are listed along with their counts. Using this option
-with \fB-c\fP is a way of suppressing the listing of files with no matches.
-.TP
-\fB--label\fP=\fIname\fP
-This option supplies a name to be used for the standard input when file names
-are being output. If not supplied, "(standard input)" is used. There is no
-short form for this option.
-.TP
-\fB--line-buffered\fP
-When this option is given, input is read and processed line by line, and the
-output is flushed after each write. By default, input is read in large chunks,
-unless \fBpcregrep\fP can determine that it is reading from a terminal (which
-is currently possible only in Unix-like environments). Output to terminal is
-normally automatically flushed by the operating system. This option can be
-useful when the input or output is attached to a pipe and you do not want
-\fBpcregrep\fP to buffer up large amounts of data. However, its use will affect
-performance, and the \fB-M\fP (multiline) option ceases to work.
-.TP
-\fB--line-offsets\fP
-Instead of showing lines or parts of lines that match, show each match as a
-line number, the offset from the start of the line, and a length. The line
-number is terminated by a colon (as usual; see the \fB-n\fP option), and the
-offset and length are separated by a comma. In this mode, no context is shown.
-That is, the \fB-A\fP, \fB-B\fP, and \fB-C\fP options are ignored. If there is
-more than one match in a line, each of them is shown separately. This option is
-mutually exclusive with \fB--file-offsets\fP and \fB--only-matching\fP.
-.TP
-\fB--locale\fP=\fIlocale-name\fP
-This option specifies a locale to be used for pattern matching. It overrides
-the value in the \fBLC_ALL\fP or \fBLC_CTYPE\fP environment variables. If no
-locale is specified, the PCRE library's default (usually the "C" locale) is
-used. There is no short form for this option.
-.TP
-\fB--match-limit\fP=\fInumber\fP
-Processing some regular expression patterns can require a very large amount of
-memory, leading in some cases to a program crash if not enough is available.
-Other patterns may take a very long time to search for all possible matching
-strings. The \fBpcre_exec()\fP function that is called by \fBpcregrep\fP to do
-the matching has two parameters that can limit the resources that it uses.
-.sp
-The \fB--match-limit\fP option provides a means of limiting resource usage
-when processing patterns that are not going to match, but which have a very
-large number of possibilities in their search trees. The classic example is a
-pattern that uses nested unlimited repeats. Internally, PCRE uses a function
-called \fBmatch()\fP which it calls repeatedly (sometimes recursively). The
-limit set by \fB--match-limit\fP is imposed on the number of times this
-function is called during a match, which has the effect of limiting the amount
-of backtracking that can take place.
-.sp
-The \fB--recursion-limit\fP option is similar to \fB--match-limit\fP, but
-instead of limiting the total number of times that \fBmatch()\fP is called, it
-limits the depth of recursive calls, which in turn limits the amount of memory
-that can be used. The recursion depth is a smaller number than the total number
-of calls, because not all calls to \fBmatch()\fP are recursive. This limit is
-of use only if it is set smaller than \fB--match-limit\fP.
-.sp
-There are no short forms for these options. The default settings are specified
-when the PCRE library is compiled, with the default default being 10 million.
-.TP
-\fB-M\fP, \fB--multiline\fP
-Allow patterns to match more than one line. When this option is given, patterns
-may usefully contain literal newline characters and internal occurrences of ^
-and $ characters. The output for a successful match may consist of more than
-one line, the last of which is the one in which the match ended. If the matched
-string ends with a newline sequence the output ends at the end of that line.
-.sp
-When this option is set, the PCRE library is called in "multiline" mode.
-There is a limit to the number of lines that can be matched, imposed by the way
-that \fBpcregrep\fP buffers the input file as it scans it. However,
-\fBpcregrep\fP ensures that at least 8K characters or the rest of the document
-(whichever is the shorter) are available for forward matching, and similarly
-the previous 8K characters (or all the previous characters, if fewer than 8K)
-are guaranteed to be available for lookbehind assertions. This option does not
-work when input is read line by line (see \fP--line-buffered\fP.)
-.TP
-\fB-N\fP \fInewline-type\fP, \fB--newline\fP=\fInewline-type\fP
-The PCRE library supports five different conventions for indicating
-the ends of lines. They are the single-character sequences CR (carriage return)
-and LF (linefeed), the two-character sequence CRLF, an "anycrlf" convention,
-which recognizes any of the preceding three types, and an "any" convention, in
-which any Unicode line ending sequence is assumed to end a line. The Unicode
-sequences are the three just mentioned, plus VT (vertical tab, U+000B), FF
-(form feed, U+000C), NEL (next line, U+0085), LS (line separator, U+2028), and
-PS (paragraph separator, U+2029).
-.sp
-When the PCRE library is built, a default line-ending sequence is specified.
-This is normally the standard sequence for the operating system. Unless
-otherwise specified by this option, \fBpcregrep\fP uses the library's default.
-The possible values for this option are CR, LF, CRLF, ANYCRLF, or ANY. This
-makes it possible to use \fBpcregrep\fP to scan files that have come from other
-environments without having to modify their line endings. If the data that is
-being scanned does not agree with the convention set by this option,
-\fBpcregrep\fP may behave in strange ways. Note that this option does not
-apply to files specified by the \fB-f\fP, \fB--exclude-from\fP, or
-\fB--include-from\fP options, which are expected to use the operating system's
-standard newline sequence.
-.TP
-\fB-n\fP, \fB--line-number\fP
-Precede each output line by its line number in the file, followed by a colon
-for matching lines or a hyphen for context lines. If the filename is also being
-output, it precedes the line number. This option is forced if
-\fB--line-offsets\fP is used.
-.TP
-\fB--no-jit\fP
-If the PCRE library is built with support for just-in-time compiling (which
-speeds up matching), \fBpcregrep\fP automatically makes use of this, unless it
-was explicitly disabled at build time. This option can be used to disable the
-use of JIT at run time. It is provided for testing and working round problems.
-It should never be needed in normal use.
-.TP
-\fB-o\fP, \fB--only-matching\fP
-Show only the part of the line that matched a pattern instead of the whole
-line. In this mode, no context is shown. That is, the \fB-A\fP, \fB-B\fP, and
-\fB-C\fP options are ignored. If there is more than one match in a line, each
-of them is shown separately. If \fB-o\fP is combined with \fB-v\fP (invert the
-sense of the match to find non-matching lines), no output is generated, but the
-return code is set appropriately. If the matched portion of the line is empty,
-nothing is output unless the file name or line number are being printed, in
-which case they are shown on an otherwise empty line. This option is mutually
-exclusive with \fB--file-offsets\fP and \fB--line-offsets\fP.
-.TP
-\fB-o\fP\fInumber\fP, \fB--only-matching\fP=\fInumber\fP
-Show only the part of the line that matched the capturing parentheses of the
-given number. Up to 32 capturing parentheses are supported, and -o0 is
-equivalent to \fB-o\fP without a number. Because these options can be given
-without an argument (see above), if an argument is present, it must be given in
-the same shell item, for example, -o3 or --only-matching=2. The comments given
-for the non-argument case above also apply to this case. If the specified
-capturing parentheses do not exist in the pattern, or were not set in the
-match, nothing is output unless the file name or line number are being printed.
-.sp
-If this option is given multiple times, multiple substrings are output, in the
-order the options are given. For example, -o3 -o1 -o3 causes the substrings
-matched by capturing parentheses 3 and 1 and then 3 again to be output. By
-default, there is no separator (but see the next option).
-.TP
-\fB--om-separator\fP=\fItext\fP
-Specify a separating string for multiple occurrences of \fB-o\fP. The default
-is an empty string. Separating strings are never coloured.
-.TP
-\fB-q\fP, \fB--quiet\fP
-Work quietly, that is, display nothing except error messages. The exit
-status indicates whether or not any matches were found.
-.TP
-\fB-r\fP, \fB--recursive\fP
-If any given path is a directory, recursively scan the files it contains,
-taking note of any \fB--include\fP and \fB--exclude\fP settings. By default, a
-directory is read as a normal file; in some operating systems this gives an
-immediate end-of-file. This option is a shorthand for setting the \fB-d\fP
-option to "recurse".
-.TP
-\fB--recursion-limit\fP=\fInumber\fP
-See \fB--match-limit\fP above.
-.TP
-\fB-s\fP, \fB--no-messages\fP
-Suppress error messages about non-existent or unreadable files. Such files are
-quietly skipped. However, the return code is still 2, even if matches were
-found in other files.
-.TP
-\fB-u\fP, \fB--utf-8\fP
-Operate in UTF-8 mode. This option is available only if PCRE has been compiled
-with UTF-8 support. All patterns (including those for any \fB--exclude\fP and
-\fB--include\fP options) and all subject lines that are scanned must be valid
-strings of UTF-8 characters.
-.TP
-\fB-V\fP, \fB--version\fP
-Write the version numbers of \fBpcregrep\fP and the PCRE library to the
-standard output and then exit. Anything else on the command line is
-ignored.
-.TP
-\fB-v\fP, \fB--invert-match\fP
-Invert the sense of the match, so that lines which do \fInot\fP match any of
-the patterns are the ones that are found.
-.TP
-\fB-w\fP, \fB--word-regex\fP, \fB--word-regexp\fP
-Force the patterns to match only whole words. This is equivalent to having \eb
-at the start and end of the pattern. This option applies only to the patterns
-that are matched against the contents of files; it does not apply to patterns
-specified by any of the \fB--include\fP or \fB--exclude\fP options.
-.TP
-\fB-x\fP, \fB--line-regex\fP, \fB--line-regexp\fP
-Force the patterns to be anchored (each must start matching at the beginning of
-a line) and in addition, require them to match entire lines. This is equivalent
-to having ^ and $ characters at the start and end of each alternative branch in
-every pattern. This option applies only to the patterns that are matched
-against the contents of files; it does not apply to patterns specified by any
-of the \fB--include\fP or \fB--exclude\fP options.
-.
-.
-.SH "ENVIRONMENT VARIABLES"
-.rs
-.sp
-The environment variables \fBLC_ALL\fP and \fBLC_CTYPE\fP are examined, in that
-order, for a locale. The first one that is set is used. This can be overridden
-by the \fB--locale\fP option. If no locale is set, the PCRE library's default
-(usually the "C" locale) is used.
-.
-.
-.SH "NEWLINES"
-.rs
-.sp
-The \fB-N\fP (\fB--newline\fP) option allows \fBpcregrep\fP to scan files with
-different newline conventions from the default. Any parts of the input files
-that are written to the standard output are copied identically, with whatever
-newline sequences they have in the input. However, the setting of this option
-does not affect the interpretation of files specified by the \fB-f\fP,
-\fB--exclude-from\fP, or \fB--include-from\fP options, which are assumed to use
-the operating system's standard newline sequence, nor does it affect the way in
-which \fBpcregrep\fP writes informational messages to the standard error and
-output streams. For these it uses the string "\en" to indicate newlines,
-relying on the C I/O library to convert this to an appropriate sequence.
-.
-.
-.SH "OPTIONS COMPATIBILITY"
-.rs
-.sp
-Many of the short and long forms of \fBpcregrep\fP's options are the same
-as in the GNU \fBgrep\fP program. Any long option of the form
-\fB--xxx-regexp\fP (GNU terminology) is also available as \fB--xxx-regex\fP
-(PCRE terminology). However, the \fB--file-list\fP, \fB--file-offsets\fP,
-\fB--include-dir\fP, \fB--line-offsets\fP, \fB--locale\fP, \fB--match-limit\fP,
-\fB-M\fP, \fB--multiline\fP, \fB-N\fP, \fB--newline\fP, \fB--om-separator\fP,
-\fB--recursion-limit\fP, \fB-u\fP, and \fB--utf-8\fP options are specific to
-\fBpcregrep\fP, as is the use of the \fB--only-matching\fP option with a
-capturing parentheses number.
-.P
-Although most of the common options work the same way, a few are different in
-\fBpcregrep\fP. For example, the \fB--include\fP option's argument is a glob
-for GNU \fBgrep\fP, but a regular expression for \fBpcregrep\fP. If both the
-\fB-c\fP and \fB-l\fP options are given, GNU grep lists only file names,
-without counts, but \fBpcregrep\fP gives the counts.
-.
-.
-.SH "OPTIONS WITH DATA"
-.rs
-.sp
-There are four different ways in which an option with data can be specified.
-If a short form option is used, the data may follow immediately, or (with one
-exception) in the next command line item. For example:
-.sp
- -f/some/file
- -f /some/file
-.sp
-The exception is the \fB-o\fP option, which may appear with or without data.
-Because of this, if data is present, it must follow immediately in the same
-item, for example -o3.
-.P
-If a long form option is used, the data may appear in the same command line
-item, separated by an equals character, or (with two exceptions) it may appear
-in the next command line item. For example:
-.sp
- --file=/some/file
- --file /some/file
-.sp
-Note, however, that if you want to supply a file name beginning with ~ as data
-in a shell command, and have the shell expand ~ to a home directory, you must
-separate the file name from the option, because the shell does not treat ~
-specially unless it is at the start of an item.
-.P
-The exceptions to the above are the \fB--colour\fP (or \fB--color\fP) and
-\fB--only-matching\fP options, for which the data is optional. If one of these
-options does have data, it must be given in the first form, using an equals
-character. Otherwise \fBpcregrep\fP will assume that it has no data.
-.
-.
-.SH "MATCHING ERRORS"
-.rs
-.sp
-It is possible to supply a regular expression that takes a very long time to
-fail to match certain lines. Such patterns normally involve nested indefinite
-repeats, for example: (a+)*\ed when matched against a line of a's with no final
-digit. The PCRE matching function has a resource limit that causes it to abort
-in these circumstances. If this happens, \fBpcregrep\fP outputs an error
-message and the line that caused the problem to the standard error stream. If
-there are more than 20 such errors, \fBpcregrep\fP gives up.
-.P
-The \fB--match-limit\fP option of \fBpcregrep\fP can be used to set the overall
-resource limit; there is a second option called \fB--recursion-limit\fP that
-sets a limit on the amount of memory (usually stack) that is used (see the
-discussion of these options above).
-.
-.
-.SH DIAGNOSTICS
-.rs
-.sp
-Exit status is 0 if any matches were found, 1 if no matches were found, and 2
-for syntax errors, overlong lines, non-existent or inaccessible files (even if
-matches were found in other files) or too many matching errors. Using the
-\fB-s\fP option to suppress error messages about inaccessible files does not
-affect the return code.
-.
-.
-.SH "SEE ALSO"
-.rs
-.sp
-\fBpcrepattern\fP(3), \fBpcresyntax\fP(3), \fBpcretest\fP(1).
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 03 April 2014
-Copyright (c) 1997-2014 University of Cambridge.
-.fi
diff --git a/libs/Pcre16/docs/doc/pcregrep.txt b/libs/Pcre16/docs/doc/pcregrep.txt
deleted file mode 100644
index 97d9a7bd37..0000000000
--- a/libs/Pcre16/docs/doc/pcregrep.txt
+++ /dev/null
@@ -1,741 +0,0 @@
-PCREGREP(1) General Commands Manual PCREGREP(1)
-
-
-
-NAME
- pcregrep - a grep with Perl-compatible regular expressions.
-
-SYNOPSIS
- pcregrep [options] [long options] [pattern] [path1 path2 ...]
-
-
-DESCRIPTION
-
- pcregrep searches files for character patterns, in the same way as
- other grep commands do, but it uses the PCRE regular expression library
- to support patterns that are compatible with the regular expressions of
- Perl 5. See pcresyntax(3) for a quick-reference summary of pattern syn-
- tax, or pcrepattern(3) for a full description of the syntax and seman-
- tics of the regular expressions that PCRE supports.
-
- Patterns, whether supplied on the command line or in a separate file,
- are given without delimiters. For example:
-
- pcregrep Thursday /etc/motd
-
- If you attempt to use delimiters (for example, by surrounding a pattern
- with slashes, as is common in Perl scripts), they are interpreted as
- part of the pattern. Quotes can of course be used to delimit patterns
- on the command line because they are interpreted by the shell, and
- indeed quotes are required if a pattern contains white space or shell
- metacharacters.
-
- The first argument that follows any option settings is treated as the
- single pattern to be matched when neither -e nor -f is present. Con-
- versely, when one or both of these options are used to specify pat-
- terns, all arguments are treated as path names. At least one of -e, -f,
- or an argument pattern must be provided.
-
- If no files are specified, pcregrep reads the standard input. The stan-
- dard input can also be referenced by a name consisting of a single
- hyphen. For example:
-
- pcregrep some-pattern /file1 - /file3
-
- By default, each line that matches a pattern is copied to the standard
- output, and if there is more than one file, the file name is output at
- the start of each line, followed by a colon. However, there are options
- that can change how pcregrep behaves. In particular, the -M option
- makes it possible to search for patterns that span line boundaries.
- What defines a line boundary is controlled by the -N (--newline)
- option.
-
- The amount of memory used for buffering files that are being scanned is
- controlled by a parameter that can be set by the --buffer-size option.
- The default value for this parameter is specified when pcregrep is
- built, with the default default being 20K. A block of memory three
- times this size is used (to allow for buffering "before" and "after"
- lines). An error occurs if a line overflows the buffer.
-
- Patterns can be no longer than 8K or BUFSIZ bytes, whichever is the
- greater. BUFSIZ is defined in <stdio.h>. When there is more than one
- pattern (specified by the use of -e and/or -f), each pattern is applied
- to each line in the order in which they are defined, except that all
- the -e patterns are tried before the -f patterns.
-
- By default, as soon as one pattern matches a line, no further patterns
- are considered. However, if --colour (or --color) is used to colour the
- matching substrings, or if --only-matching, --file-offsets, or --line-
- offsets is used to output only the part of the line that matched
- (either shown literally, or as an offset), scanning resumes immediately
- following the match, so that further matches on the same line can be
- found. If there are multiple patterns, they are all tried on the
- remainder of the line, but patterns that follow the one that matched
- are not tried on the earlier part of the line.
-
- This behaviour means that the order in which multiple patterns are
- specified can affect the output when one of the above options is used.
- This is no longer the same behaviour as GNU grep, which now manages to
- display earlier matches for later patterns (as long as there is no
- overlap).
-
- Patterns that can match an empty string are accepted, but empty string
- matches are never recognized. An example is the pattern
- "(super)?(man)?", in which all components are optional. This pattern
- finds all occurrences of both "super" and "man"; the output differs
- from matching with "super|man" when only the matching substrings are
- being shown.
-
- If the LC_ALL or LC_CTYPE environment variable is set, pcregrep uses
- the value to set a locale when calling the PCRE library. The --locale
- option can be used to override this.
-
-
-SUPPORT FOR COMPRESSED FILES
-
- It is possible to compile pcregrep so that it uses libz or libbz2 to
- read files whose names end in .gz or .bz2, respectively. You can find
- out whether your binary has support for one or both of these file types
- by running it with the --help option. If the appropriate support is not
- present, files are treated as plain text. The standard input is always
- so treated.
-
-
-BINARY FILES
-
- By default, a file that contains a binary zero byte within the first
- 1024 bytes is identified as a binary file, and is processed specially.
- (GNU grep also identifies binary files in this manner.) See the
- --binary-files option for a means of changing the way binary files are
- handled.
-
-
-OPTIONS
-
- The order in which some of the options appear can affect the output.
- For example, both the -h and -l options affect the printing of file
- names. Whichever comes later in the command line will be the one that
- takes effect. Similarly, except where noted below, if an option is
- given twice, the later setting is used. Numerical values for options
- may be followed by K or M, to signify multiplication by 1024 or
- 1024*1024 respectively.
-
- -- This terminates the list of options. It is useful if the next
- item on the command line starts with a hyphen but is not an
- option. This allows for the processing of patterns and file-
- names that start with hyphens.
-
- -A number, --after-context=number
- Output number lines of context after each matching line. If
- filenames and/or line numbers are being output, a hyphen sep-
- arator is used instead of a colon for the context lines. A
- line containing "--" is output between each group of lines,
- unless they are in fact contiguous in the input file. The
- value of number is expected to be relatively small. However,
- pcregrep guarantees to have up to 8K of following text avail-
- able for context output.
-
- -a, --text
- Treat binary files as text. This is equivalent to --binary-
- files=text.
-
- -B number, --before-context=number
- Output number lines of context before each matching line. If
- filenames and/or line numbers are being output, a hyphen sep-
- arator is used instead of a colon for the context lines. A
- line containing "--" is output between each group of lines,
- unless they are in fact contiguous in the input file. The
- value of number is expected to be relatively small. However,
- pcregrep guarantees to have up to 8K of preceding text avail-
- able for context output.
-
- --binary-files=word
- Specify how binary files are to be processed. If the word is
- "binary" (the default), pattern matching is performed on
- binary files, but the only output is "Binary file <name>
- matches" when a match succeeds. If the word is "text", which
- is equivalent to the -a or --text option, binary files are
- processed in the same way as any other file. In this case,
- when a match succeeds, the output may be binary garbage,
- which can have nasty effects if sent to a terminal. If the
- word is "without-match", which is equivalent to the -I
- option, binary files are not processed at all; they are
- assumed not to be of interest.
-
- --buffer-size=number
- Set the parameter that controls how much memory is used for
- buffering files that are being scanned.
-
- -C number, --context=number
- Output number lines of context both before and after each
- matching line. This is equivalent to setting both -A and -B
- to the same value.
-
- -c, --count
- Do not output individual lines from the files that are being
- scanned; instead output the number of lines that would other-
- wise have been shown. If no lines are selected, the number
- zero is output. If several files are are being scanned, a
- count is output for each of them. However, if the --files-
- with-matches option is also used, only those files whose
- counts are greater than zero are listed. When -c is used, the
- -A, -B, and -C options are ignored.
-
- --colour, --color
- If this option is given without any data, it is equivalent to
- "--colour=auto". If data is required, it must be given in
- the same shell item, separated by an equals sign.
-
- --colour=value, --color=value
- This option specifies under what circumstances the parts of a
- line that matched a pattern should be coloured in the output.
- By default, the output is not coloured. The value (which is
- optional, see above) may be "never", "always", or "auto". In
- the latter case, colouring happens only if the standard out-
- put is connected to a terminal. More resources are used when
- colouring is enabled, because pcregrep has to search for all
- possible matches in a line, not just one, in order to colour
- them all.
-
- The colour that is used can be specified by setting the envi-
- ronment variable PCREGREP_COLOUR or PCREGREP_COLOR. The value
- of this variable should be a string of two numbers, separated
- by a semicolon. They are copied directly into the control
- string for setting colour on a terminal, so it is your
- responsibility to ensure that they make sense. If neither of
- the environment variables is set, the default is "1;31",
- which gives red.
-
- -D action, --devices=action
- If an input path is not a regular file or a directory,
- "action" specifies how it is to be processed. Valid values
- are "read" (the default) or "skip" (silently skip the path).
-
- -d action, --directories=action
- If an input path is a directory, "action" specifies how it is
- to be processed. Valid values are "read" (the default in
- non-Windows environments, for compatibility with GNU grep),
- "recurse" (equivalent to the -r option), or "skip" (silently
- skip the path, the default in Windows environments). In the
- "read" case, directories are read as if they were ordinary
- files. In some operating systems the effect of reading a
- directory like this is an immediate end-of-file; in others it
- may provoke an error.
-
- -e pattern, --regex=pattern, --regexp=pattern
- Specify a pattern to be matched. This option can be used mul-
- tiple times in order to specify several patterns. It can also
- be used as a way of specifying a single pattern that starts
- with a hyphen. When -e is used, no argument pattern is taken
- from the command line; all arguments are treated as file
- names. There is no limit to the number of patterns. They are
- applied to each line in the order in which they are defined
- until one matches.
-
- If -f is used with -e, the command line patterns are matched
- first, followed by the patterns from the file(s), independent
- of the order in which these options are specified. Note that
- multiple use of -e is not the same as a single pattern with
- alternatives. For example, X|Y finds the first character in a
- line that is X or Y, whereas if the two patterns are given
- separately, with X first, pcregrep finds X if it is present,
- even if it follows Y in the line. It finds Y only if there is
- no X in the line. This matters only if you are using -o or
- --colo(u)r to show the part(s) of the line that matched.
-
- --exclude=pattern
- Files (but not directories) whose names match the pattern are
- skipped without being processed. This applies to all files,
- whether listed on the command line, obtained from --file-
- list, or by scanning a directory. The pattern is a PCRE regu-
- lar expression, and is matched against the final component of
- the file name, not the entire path. The -F, -w, and -x
- options do not apply to this pattern. The option may be given
- any number of times in order to specify multiple patterns. If
- a file name matches both an --include and an --exclude pat-
- tern, it is excluded. There is no short form for this option.
-
- --exclude-from=filename
- Treat each non-empty line of the file as the data for an
- --exclude option. What constitutes a newline when reading the
- file is the operating system's default. The --newline option
- has no effect on this option. This option may be given more
- than once in order to specify a number of files to read.
-
- --exclude-dir=pattern
- Directories whose names match the pattern are skipped without
- being processed, whatever the setting of the --recursive
- option. This applies to all directories, whether listed on
- the command line, obtained from --file-list, or by scanning a
- parent directory. The pattern is a PCRE regular expression,
- and is matched against the final component of the directory
- name, not the entire path. The -F, -w, and -x options do not
- apply to this pattern. The option may be given any number of
- times in order to specify more than one pattern. If a direc-
- tory matches both --include-dir and --exclude-dir, it is
- excluded. There is no short form for this option.
-
- -F, --fixed-strings
- Interpret each data-matching pattern as a list of fixed
- strings, separated by newlines, instead of as a regular
- expression. What constitutes a newline for this purpose is
- controlled by the --newline option. The -w (match as a word)
- and -x (match whole line) options can be used with -F. They
- apply to each of the fixed strings. A line is selected if any
- of the fixed strings are found in it (subject to -w or -x, if
- present). This option applies only to the patterns that are
- matched against the contents of files; it does not apply to
- patterns specified by any of the --include or --exclude
- options.
-
- -f filename, --file=filename
- Read patterns from the file, one per line, and match them
- against each line of input. What constitutes a newline when
- reading the file is the operating system's default. The
- --newline option has no effect on this option. Trailing white
- space is removed from each line, and blank lines are ignored.
- An empty file contains no patterns and therefore matches
- nothing. See also the comments about multiple patterns versus
- a single pattern with alternatives in the description of -e
- above.
-
- If this option is given more than once, all the specified
- files are read. A data line is output if any of the patterns
- match it. A filename can be given as "-" to refer to the
- standard input. When -f is used, patterns specified on the
- command line using -e may also be present; they are tested
- before the file's patterns. However, no other pattern is
- taken from the command line; all arguments are treated as the
- names of paths to be searched.
-
- --file-list=filename
- Read a list of files and/or directories that are to be
- scanned from the given file, one per line. Trailing white
- space is removed from each line, and blank lines are ignored.
- These paths are processed before any that are listed on the
- command line. The filename can be given as "-" to refer to
- the standard input. If --file and --file-list are both spec-
- ified as "-", patterns are read first. This is useful only
- when the standard input is a terminal, from which further
- lines (the list of files) can be read after an end-of-file
- indication. If this option is given more than once, all the
- specified files are read.
-
- --file-offsets
- Instead of showing lines or parts of lines that match, show
- each match as an offset from the start of the file and a
- length, separated by a comma. In this mode, no context is
- shown. That is, the -A, -B, and -C options are ignored. If
- there is more than one match in a line, each of them is shown
- separately. This option is mutually exclusive with --line-
- offsets and --only-matching.
-
- -H, --with-filename
- Force the inclusion of the filename at the start of output
- lines when searching a single file. By default, the filename
- is not shown in this case. For matching lines, the filename
- is followed by a colon; for context lines, a hyphen separator
- is used. If a line number is also being output, it follows
- the file name.
-
- -h, --no-filename
- Suppress the output filenames when searching multiple files.
- By default, filenames are shown when multiple files are
- searched. For matching lines, the filename is followed by a
- colon; for context lines, a hyphen separator is used. If a
- line number is also being output, it follows the file name.
-
- --help Output a help message, giving brief details of the command
- options and file type support, and then exit. Anything else
- on the command line is ignored.
-
- -I Treat binary files as never matching. This is equivalent to
- --binary-files=without-match.
-
- -i, --ignore-case
- Ignore upper/lower case distinctions during comparisons.
-
- --include=pattern
- If any --include patterns are specified, the only files that
- are processed are those that match one of the patterns (and
- do not match an --exclude pattern). This option does not
- affect directories, but it applies to all files, whether
- listed on the command line, obtained from --file-list, or by
- scanning a directory. The pattern is a PCRE regular expres-
- sion, and is matched against the final component of the file
- name, not the entire path. The -F, -w, and -x options do not
- apply to this pattern. The option may be given any number of
- times. If a file name matches both an --include and an
- --exclude pattern, it is excluded. There is no short form
- for this option.
-
- --include-from=filename
- Treat each non-empty line of the file as the data for an
- --include option. What constitutes a newline for this purpose
- is the operating system's default. The --newline option has
- no effect on this option. This option may be given any number
- of times; all the files are read.
-
- --include-dir=pattern
- If any --include-dir patterns are specified, the only direc-
- tories that are processed are those that match one of the
- patterns (and do not match an --exclude-dir pattern). This
- applies to all directories, whether listed on the command
- line, obtained from --file-list, or by scanning a parent
- directory. The pattern is a PCRE regular expression, and is
- matched against the final component of the directory name,
- not the entire path. The -F, -w, and -x options do not apply
- to this pattern. The option may be given any number of times.
- If a directory matches both --include-dir and --exclude-dir,
- it is excluded. There is no short form for this option.
-
- -L, --files-without-match
- Instead of outputting lines from the files, just output the
- names of the files that do not contain any lines that would
- have been output. Each file name is output once, on a sepa-
- rate line.
-
- -l, --files-with-matches
- Instead of outputting lines from the files, just output the
- names of the files containing lines that would have been out-
- put. Each file name is output once, on a separate line.
- Searching normally stops as soon as a matching line is found
- in a file. However, if the -c (count) option is also used,
- matching continues in order to obtain the correct count, and
- those files that have at least one match are listed along
- with their counts. Using this option with -c is a way of sup-
- pressing the listing of files with no matches.
-
- --label=name
- This option supplies a name to be used for the standard input
- when file names are being output. If not supplied, "(standard
- input)" is used. There is no short form for this option.
-
- --line-buffered
- When this option is given, input is read and processed line
- by line, and the output is flushed after each write. By
- default, input is read in large chunks, unless pcregrep can
- determine that it is reading from a terminal (which is cur-
- rently possible only in Unix-like environments). Output to
- terminal is normally automatically flushed by the operating
- system. This option can be useful when the input or output is
- attached to a pipe and you do not want pcregrep to buffer up
- large amounts of data. However, its use will affect perfor-
- mance, and the -M (multiline) option ceases to work.
-
- --line-offsets
- Instead of showing lines or parts of lines that match, show
- each match as a line number, the offset from the start of the
- line, and a length. The line number is terminated by a colon
- (as usual; see the -n option), and the offset and length are
- separated by a comma. In this mode, no context is shown.
- That is, the -A, -B, and -C options are ignored. If there is
- more than one match in a line, each of them is shown sepa-
- rately. This option is mutually exclusive with --file-offsets
- and --only-matching.
-
- --locale=locale-name
- This option specifies a locale to be used for pattern match-
- ing. It overrides the value in the LC_ALL or LC_CTYPE envi-
- ronment variables. If no locale is specified, the PCRE
- library's default (usually the "C" locale) is used. There is
- no short form for this option.
-
- --match-limit=number
- Processing some regular expression patterns can require a
- very large amount of memory, leading in some cases to a pro-
- gram crash if not enough is available. Other patterns may
- take a very long time to search for all possible matching
- strings. The pcre_exec() function that is called by pcregrep
- to do the matching has two parameters that can limit the
- resources that it uses.
-
- The --match-limit option provides a means of limiting
- resource usage when processing patterns that are not going to
- match, but which have a very large number of possibilities in
- their search trees. The classic example is a pattern that
- uses nested unlimited repeats. Internally, PCRE uses a func-
- tion called match() which it calls repeatedly (sometimes
- recursively). The limit set by --match-limit is imposed on
- the number of times this function is called during a match,
- which has the effect of limiting the amount of backtracking
- that can take place.
-
- The --recursion-limit option is similar to --match-limit, but
- instead of limiting the total number of times that match() is
- called, it limits the depth of recursive calls, which in turn
- limits the amount of memory that can be used. The recursion
- depth is a smaller number than the total number of calls,
- because not all calls to match() are recursive. This limit is
- of use only if it is set smaller than --match-limit.
-
- There are no short forms for these options. The default set-
- tings are specified when the PCRE library is compiled, with
- the default default being 10 million.
-
- -M, --multiline
- Allow patterns to match more than one line. When this option
- is given, patterns may usefully contain literal newline char-
- acters and internal occurrences of ^ and $ characters. The
- output for a successful match may consist of more than one
- line, the last of which is the one in which the match ended.
- If the matched string ends with a newline sequence the output
- ends at the end of that line.
-
- When this option is set, the PCRE library is called in "mul-
- tiline" mode. There is a limit to the number of lines that
- can be matched, imposed by the way that pcregrep buffers the
- input file as it scans it. However, pcregrep ensures that at
- least 8K characters or the rest of the document (whichever is
- the shorter) are available for forward matching, and simi-
- larly the previous 8K characters (or all the previous charac-
- ters, if fewer than 8K) are guaranteed to be available for
- lookbehind assertions. This option does not work when input
- is read line by line (see --line-buffered.)
-
- -N newline-type, --newline=newline-type
- The PCRE library supports five different conventions for
- indicating the ends of lines. They are the single-character
- sequences CR (carriage return) and LF (linefeed), the two-
- character sequence CRLF, an "anycrlf" convention, which rec-
- ognizes any of the preceding three types, and an "any" con-
- vention, in which any Unicode line ending sequence is assumed
- to end a line. The Unicode sequences are the three just men-
- tioned, plus VT (vertical tab, U+000B), FF (form feed,
- U+000C), NEL (next line, U+0085), LS (line separator,
- U+2028), and PS (paragraph separator, U+2029).
-
- When the PCRE library is built, a default line-ending
- sequence is specified. This is normally the standard
- sequence for the operating system. Unless otherwise specified
- by this option, pcregrep uses the library's default. The
- possible values for this option are CR, LF, CRLF, ANYCRLF, or
- ANY. This makes it possible to use pcregrep to scan files
- that have come from other environments without having to mod-
- ify their line endings. If the data that is being scanned
- does not agree with the convention set by this option, pcre-
- grep may behave in strange ways. Note that this option does
- not apply to files specified by the -f, --exclude-from, or
- --include-from options, which are expected to use the operat-
- ing system's standard newline sequence.
-
- -n, --line-number
- Precede each output line by its line number in the file, fol-
- lowed by a colon for matching lines or a hyphen for context
- lines. If the filename is also being output, it precedes the
- line number. This option is forced if --line-offsets is used.
-
- --no-jit If the PCRE library is built with support for just-in-time
- compiling (which speeds up matching), pcregrep automatically
- makes use of this, unless it was explicitly disabled at build
- time. This option can be used to disable the use of JIT at
- run time. It is provided for testing and working round prob-
- lems. It should never be needed in normal use.
-
- -o, --only-matching
- Show only the part of the line that matched a pattern instead
- of the whole line. In this mode, no context is shown. That
- is, the -A, -B, and -C options are ignored. If there is more
- than one match in a line, each of them is shown separately.
- If -o is combined with -v (invert the sense of the match to
- find non-matching lines), no output is generated, but the
- return code is set appropriately. If the matched portion of
- the line is empty, nothing is output unless the file name or
- line number are being printed, in which case they are shown
- on an otherwise empty line. This option is mutually exclusive
- with --file-offsets and --line-offsets.
-
- -onumber, --only-matching=number
- Show only the part of the line that matched the capturing
- parentheses of the given number. Up to 32 capturing parenthe-
- ses are supported, and -o0 is equivalent to -o without a num-
- ber. Because these options can be given without an argument
- (see above), if an argument is present, it must be given in
- the same shell item, for example, -o3 or --only-matching=2.
- The comments given for the non-argument case above also apply
- to this case. If the specified capturing parentheses do not
- exist in the pattern, or were not set in the match, nothing
- is output unless the file name or line number are being
- printed.
-
- If this option is given multiple times, multiple substrings
- are output, in the order the options are given. For example,
- -o3 -o1 -o3 causes the substrings matched by capturing paren-
- theses 3 and 1 and then 3 again to be output. By default,
- there is no separator (but see the next option).
-
- --om-separator=text
- Specify a separating string for multiple occurrences of -o.
- The default is an empty string. Separating strings are never
- coloured.
-
- -q, --quiet
- Work quietly, that is, display nothing except error messages.
- The exit status indicates whether or not any matches were
- found.
-
- -r, --recursive
- If any given path is a directory, recursively scan the files
- it contains, taking note of any --include and --exclude set-
- tings. By default, a directory is read as a normal file; in
- some operating systems this gives an immediate end-of-file.
- This option is a shorthand for setting the -d option to
- "recurse".
-
- --recursion-limit=number
- See --match-limit above.
-
- -s, --no-messages
- Suppress error messages about non-existent or unreadable
- files. Such files are quietly skipped. However, the return
- code is still 2, even if matches were found in other files.
-
- -u, --utf-8
- Operate in UTF-8 mode. This option is available only if PCRE
- has been compiled with UTF-8 support. All patterns (including
- those for any --exclude and --include options) and all sub-
- ject lines that are scanned must be valid strings of UTF-8
- characters.
-
- -V, --version
- Write the version numbers of pcregrep and the PCRE library to
- the standard output and then exit. Anything else on the com-
- mand line is ignored.
-
- -v, --invert-match
- Invert the sense of the match, so that lines which do not
- match any of the patterns are the ones that are found.
-
- -w, --word-regex, --word-regexp
- Force the patterns to match only whole words. This is equiva-
- lent to having \b at the start and end of the pattern. This
- option applies only to the patterns that are matched against
- the contents of files; it does not apply to patterns speci-
- fied by any of the --include or --exclude options.
-
- -x, --line-regex, --line-regexp
- Force the patterns to be anchored (each must start matching
- at the beginning of a line) and in addition, require them to
- match entire lines. This is equivalent to having ^ and $
- characters at the start and end of each alternative branch in
- every pattern. This option applies only to the patterns that
- are matched against the contents of files; it does not apply
- to patterns specified by any of the --include or --exclude
- options.
-
-
-ENVIRONMENT VARIABLES
-
- The environment variables LC_ALL and LC_CTYPE are examined, in that
- order, for a locale. The first one that is set is used. This can be
- overridden by the --locale option. If no locale is set, the PCRE
- library's default (usually the "C" locale) is used.
-
-
-NEWLINES
-
- The -N (--newline) option allows pcregrep to scan files with different
- newline conventions from the default. Any parts of the input files that
- are written to the standard output are copied identically, with what-
- ever newline sequences they have in the input. However, the setting of
- this option does not affect the interpretation of files specified by
- the -f, --exclude-from, or --include-from options, which are assumed to
- use the operating system's standard newline sequence, nor does it
- affect the way in which pcregrep writes informational messages to the
- standard error and output streams. For these it uses the string "\n" to
- indicate newlines, relying on the C I/O library to convert this to an
- appropriate sequence.
-
-
-OPTIONS COMPATIBILITY
-
- Many of the short and long forms of pcregrep's options are the same as
- in the GNU grep program. Any long option of the form --xxx-regexp (GNU
- terminology) is also available as --xxx-regex (PCRE terminology). How-
- ever, the --file-list, --file-offsets, --include-dir, --line-offsets,
- --locale, --match-limit, -M, --multiline, -N, --newline, --om-separa-
- tor, --recursion-limit, -u, and --utf-8 options are specific to pcre-
- grep, as is the use of the --only-matching option with a capturing
- parentheses number.
-
- Although most of the common options work the same way, a few are dif-
- ferent in pcregrep. For example, the --include option's argument is a
- glob for GNU grep, but a regular expression for pcregrep. If both the
- -c and -l options are given, GNU grep lists only file names, without
- counts, but pcregrep gives the counts.
-
-
-OPTIONS WITH DATA
-
- There are four different ways in which an option with data can be spec-
- ified. If a short form option is used, the data may follow immedi-
- ately, or (with one exception) in the next command line item. For exam-
- ple:
-
- -f/some/file
- -f /some/file
-
- The exception is the -o option, which may appear with or without data.
- Because of this, if data is present, it must follow immediately in the
- same item, for example -o3.
-
- If a long form option is used, the data may appear in the same command
- line item, separated by an equals character, or (with two exceptions)
- it may appear in the next command line item. For example:
-
- --file=/some/file
- --file /some/file
-
- Note, however, that if you want to supply a file name beginning with ~
- as data in a shell command, and have the shell expand ~ to a home
- directory, you must separate the file name from the option, because the
- shell does not treat ~ specially unless it is at the start of an item.
-
- The exceptions to the above are the --colour (or --color) and --only-
- matching options, for which the data is optional. If one of these
- options does have data, it must be given in the first form, using an
- equals character. Otherwise pcregrep will assume that it has no data.
-
-
-MATCHING ERRORS
-
- It is possible to supply a regular expression that takes a very long
- time to fail to match certain lines. Such patterns normally involve
- nested indefinite repeats, for example: (a+)*\d when matched against a
- line of a's with no final digit. The PCRE matching function has a
- resource limit that causes it to abort in these circumstances. If this
- happens, pcregrep outputs an error message and the line that caused the
- problem to the standard error stream. If there are more than 20 such
- errors, pcregrep gives up.
-
- The --match-limit option of pcregrep can be used to set the overall
- resource limit; there is a second option called --recursion-limit that
- sets a limit on the amount of memory (usually stack) that is used (see
- the discussion of these options above).
-
-
-DIAGNOSTICS
-
- Exit status is 0 if any matches were found, 1 if no matches were found,
- and 2 for syntax errors, overlong lines, non-existent or inaccessible
- files (even if matches were found in other files) or too many matching
- errors. Using the -s option to suppress error messages about inaccessi-
- ble files does not affect the return code.
-
-
-SEE ALSO
-
- pcrepattern(3), pcresyntax(3), pcretest(1).
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 03 April 2014
- Copyright (c) 1997-2014 University of Cambridge.
diff --git a/libs/Pcre16/docs/doc/pcrejit.3 b/libs/Pcre16/docs/doc/pcrejit.3
deleted file mode 100644
index 3b785f0f63..0000000000
--- a/libs/Pcre16/docs/doc/pcrejit.3
+++ /dev/null
@@ -1,473 +0,0 @@
-.TH PCREJIT 3 "05 July 2017" "PCRE 8.41"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH "PCRE JUST-IN-TIME COMPILER SUPPORT"
-.rs
-.sp
-Just-in-time compiling is a heavyweight optimization that can greatly speed up
-pattern matching. However, it comes at the cost of extra processing before the
-match is performed. Therefore, it is of most benefit when the same pattern is
-going to be matched many times. This does not necessarily mean many calls of a
-matching function; if the pattern is not anchored, matching attempts may take
-place many times at various positions in the subject, even for a single call.
-Therefore, if the subject string is very long, it may still pay to use JIT for
-one-off matches.
-.P
-JIT support applies only to the traditional Perl-compatible matching function.
-It does not apply when the DFA matching function is being used. The code for
-this support was written by Zoltan Herczeg.
-.
-.
-.SH "8-BIT, 16-BIT AND 32-BIT SUPPORT"
-.rs
-.sp
-JIT support is available for all of the 8-bit, 16-bit and 32-bit PCRE
-libraries. To keep this documentation simple, only the 8-bit interface is
-described in what follows. If you are using the 16-bit library, substitute the
-16-bit functions and 16-bit structures (for example, \fIpcre16_jit_stack\fP
-instead of \fIpcre_jit_stack\fP). If you are using the 32-bit library,
-substitute the 32-bit functions and 32-bit structures (for example,
-\fIpcre32_jit_stack\fP instead of \fIpcre_jit_stack\fP).
-.
-.
-.SH "AVAILABILITY OF JIT SUPPORT"
-.rs
-.sp
-JIT support is an optional feature of PCRE. The "configure" option --enable-jit
-(or equivalent CMake option) must be set when PCRE is built if you want to use
-JIT. The support is limited to the following hardware platforms:
-.sp
- ARM v5, v7, and Thumb2
- Intel x86 32-bit and 64-bit
- MIPS 32-bit
- Power PC 32-bit and 64-bit
- SPARC 32-bit (experimental)
-.sp
-If --enable-jit is set on an unsupported platform, compilation fails.
-.P
-A program that is linked with PCRE 8.20 or later can tell if JIT support is
-available by calling \fBpcre_config()\fP with the PCRE_CONFIG_JIT option. The
-result is 1 when JIT is available, and 0 otherwise. However, a simple program
-does not need to check this in order to use JIT. The normal API is implemented
-in a way that falls back to the interpretive code if JIT is not available. For
-programs that need the best possible performance, there is also a "fast path"
-API that is JIT-specific.
-.P
-If your program may sometimes be linked with versions of PCRE that are older
-than 8.20, but you want to use JIT when it is available, you can test the
-values of PCRE_MAJOR and PCRE_MINOR, or the existence of a JIT macro such as
-PCRE_CONFIG_JIT, for compile-time control of your code. Also beware that the
-\fBpcre_jit_exec()\fP function was not available at all before 8.32,
-and may not be available at all if PCRE isn't compiled with
---enable-jit. See the "JIT FAST PATH API" section below for details.
-.
-.
-.SH "SIMPLE USE OF JIT"
-.rs
-.sp
-You have to do two things to make use of the JIT support in the simplest way:
-.sp
- (1) Call \fBpcre_study()\fP with the PCRE_STUDY_JIT_COMPILE option for
- each compiled pattern, and pass the resulting \fBpcre_extra\fP block to
- \fBpcre_exec()\fP.
-.sp
- (2) Use \fBpcre_free_study()\fP to free the \fBpcre_extra\fP block when it is
- no longer needed, instead of just freeing it yourself. This ensures that
- any JIT data is also freed.
-.sp
-For a program that may be linked with pre-8.20 versions of PCRE, you can insert
-.sp
- #ifndef PCRE_STUDY_JIT_COMPILE
- #define PCRE_STUDY_JIT_COMPILE 0
- #endif
-.sp
-so that no option is passed to \fBpcre_study()\fP, and then use something like
-this to free the study data:
-.sp
- #ifdef PCRE_CONFIG_JIT
- pcre_free_study(study_ptr);
- #else
- pcre_free(study_ptr);
- #endif
-.sp
-PCRE_STUDY_JIT_COMPILE requests the JIT compiler to generate code for complete
-matches. If you want to run partial matches using the PCRE_PARTIAL_HARD or
-PCRE_PARTIAL_SOFT options of \fBpcre_exec()\fP, you should set one or both of
-the following options in addition to, or instead of, PCRE_STUDY_JIT_COMPILE
-when you call \fBpcre_study()\fP:
-.sp
- PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE
- PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE
-.sp
-If using \fBpcre_jit_exec()\fP and supporting a pre-8.32 version of
-PCRE, you can insert:
-.sp
- #if PCRE_MAJOR >= 8 && PCRE_MINOR >= 32
- pcre_jit_exec(...);
- #else
- pcre_exec(...)
- #endif
-.sp
-but as described in the "JIT FAST PATH API" section below this assumes
-version 8.32 and later are compiled with --enable-jit, which may
-break.
-.sp
-The JIT compiler generates different optimized code for each of the three
-modes (normal, soft partial, hard partial). When \fBpcre_exec()\fP is called,
-the appropriate code is run if it is available. Otherwise, the pattern is
-matched using interpretive code.
-.P
-In some circumstances you may need to call additional functions. These are
-described in the section entitled
-.\" HTML <a href="#stackcontrol">
-.\" </a>
-"Controlling the JIT stack"
-.\"
-below.
-.P
-If JIT support is not available, PCRE_STUDY_JIT_COMPILE etc. are ignored, and
-no JIT data is created. Otherwise, the compiled pattern is passed to the JIT
-compiler, which turns it into machine code that executes much faster than the
-normal interpretive code. When \fBpcre_exec()\fP is passed a \fBpcre_extra\fP
-block containing a pointer to JIT code of the appropriate mode (normal or
-hard/soft partial), it obeys that code instead of running the interpreter. The
-result is identical, but the compiled JIT code runs much faster.
-.P
-There are some \fBpcre_exec()\fP options that are not supported for JIT
-execution. There are also some pattern items that JIT cannot handle. Details
-are given below. In both cases, execution automatically falls back to the
-interpretive code. If you want to know whether JIT was actually used for a
-particular match, you should arrange for a JIT callback function to be set up
-as described in the section entitled
-.\" HTML <a href="#stackcontrol">
-.\" </a>
-"Controlling the JIT stack"
-.\"
-below, even if you do not need to supply a non-default JIT stack. Such a
-callback function is called whenever JIT code is about to be obeyed. If the
-execution options are not right for JIT execution, the callback function is not
-obeyed.
-.P
-If the JIT compiler finds an unsupported item, no JIT data is generated. You
-can find out if JIT execution is available after studying a pattern by calling
-\fBpcre_fullinfo()\fP with the PCRE_INFO_JIT option. A result of 1 means that
-JIT compilation was successful. A result of 0 means that JIT support is not
-available, or the pattern was not studied with PCRE_STUDY_JIT_COMPILE etc., or
-the JIT compiler was not able to handle the pattern.
-.P
-Once a pattern has been studied, with or without JIT, it can be used as many
-times as you like for matching different subject strings.
-.
-.
-.SH "UNSUPPORTED OPTIONS AND PATTERN ITEMS"
-.rs
-.sp
-The only \fBpcre_exec()\fP options that are supported for JIT execution are
-PCRE_NO_UTF8_CHECK, PCRE_NO_UTF16_CHECK, PCRE_NO_UTF32_CHECK, PCRE_NOTBOL,
-PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NOTEMPTY_ATSTART, PCRE_PARTIAL_HARD, and
-PCRE_PARTIAL_SOFT.
-.P
-The only unsupported pattern items are \eC (match a single data unit) when
-running in a UTF mode, and a callout immediately before an assertion condition
-in a conditional group.
-.
-.
-.SH "RETURN VALUES FROM JIT EXECUTION"
-.rs
-.sp
-When a pattern is matched using JIT execution, the return values are the same
-as those given by the interpretive \fBpcre_exec()\fP code, with the addition of
-one new error code: PCRE_ERROR_JIT_STACKLIMIT. This means that the memory used
-for the JIT stack was insufficient. See
-.\" HTML <a href="#stackcontrol">
-.\" </a>
-"Controlling the JIT stack"
-.\"
-below for a discussion of JIT stack usage. For compatibility with the
-interpretive \fBpcre_exec()\fP code, no more than two-thirds of the
-\fIovector\fP argument is used for passing back captured substrings.
-.P
-The error code PCRE_ERROR_MATCHLIMIT is returned by the JIT code if searching a
-very large pattern tree goes on for too long, as it is in the same circumstance
-when JIT is not used, but the details of exactly what is counted are not the
-same. The PCRE_ERROR_RECURSIONLIMIT error code is never returned by JIT
-execution.
-.
-.
-.SH "SAVING AND RESTORING COMPILED PATTERNS"
-.rs
-.sp
-The code that is generated by the JIT compiler is architecture-specific, and is
-also position dependent. For those reasons it cannot be saved (in a file or
-database) and restored later like the bytecode and other data of a compiled
-pattern. Saving and restoring compiled patterns is not something many people
-do. More detail about this facility is given in the
-.\" HREF
-\fBpcreprecompile\fP
-.\"
-documentation. It should be possible to run \fBpcre_study()\fP on a saved and
-restored pattern, and thereby recreate the JIT data, but because JIT
-compilation uses significant resources, it is probably not worth doing this;
-you might as well recompile the original pattern.
-.
-.
-.\" HTML <a name="stackcontrol"></a>
-.SH "CONTROLLING THE JIT STACK"
-.rs
-.sp
-When the compiled JIT code runs, it needs a block of memory to use as a stack.
-By default, it uses 32K on the machine stack. However, some large or
-complicated patterns need more than this. The error PCRE_ERROR_JIT_STACKLIMIT
-is given when there is not enough stack. Three functions are provided for
-managing blocks of memory for use as JIT stacks. There is further discussion
-about the use of JIT stacks in the section entitled
-.\" HTML <a href="#stackcontrol">
-.\" </a>
-"JIT stack FAQ"
-.\"
-below.
-.P
-The \fBpcre_jit_stack_alloc()\fP function creates a JIT stack. Its arguments
-are a starting size and a maximum size, and it returns a pointer to an opaque
-structure of type \fBpcre_jit_stack\fP, or NULL if there is an error. The
-\fBpcre_jit_stack_free()\fP function can be used to free a stack that is no
-longer needed. (For the technically minded: the address space is allocated by
-mmap or VirtualAlloc.)
-.P
-JIT uses far less memory for recursion than the interpretive code,
-and a maximum stack size of 512K to 1M should be more than enough for any
-pattern.
-.P
-The \fBpcre_assign_jit_stack()\fP function specifies which stack JIT code
-should use. Its arguments are as follows:
-.sp
- pcre_extra *extra
- pcre_jit_callback callback
- void *data
-.sp
-The \fIextra\fP argument must be the result of studying a pattern with
-PCRE_STUDY_JIT_COMPILE etc. There are three cases for the values of the other
-two options:
-.sp
- (1) If \fIcallback\fP is NULL and \fIdata\fP is NULL, an internal 32K block
- on the machine stack is used.
-.sp
- (2) If \fIcallback\fP is NULL and \fIdata\fP is not NULL, \fIdata\fP must be
- a valid JIT stack, the result of calling \fBpcre_jit_stack_alloc()\fP.
-.sp
- (3) If \fIcallback\fP is not NULL, it must point to a function that is
- called with \fIdata\fP as an argument at the start of matching, in
- order to set up a JIT stack. If the return from the callback
- function is NULL, the internal 32K stack is used; otherwise the
- return value must be a valid JIT stack, the result of calling
- \fBpcre_jit_stack_alloc()\fP.
-.sp
-A callback function is obeyed whenever JIT code is about to be run; it is not
-obeyed when \fBpcre_exec()\fP is called with options that are incompatible for
-JIT execution. A callback function can therefore be used to determine whether a
-match operation was executed by JIT or by the interpreter.
-.P
-You may safely use the same JIT stack for more than one pattern (either by
-assigning directly or by callback), as long as the patterns are all matched
-sequentially in the same thread. In a multithread application, if you do not
-specify a JIT stack, or if you assign or pass back NULL from a callback, that
-is thread-safe, because each thread has its own machine stack. However, if you
-assign or pass back a non-NULL JIT stack, this must be a different stack for
-each thread so that the application is thread-safe.
-.P
-Strictly speaking, even more is allowed. You can assign the same non-NULL stack
-to any number of patterns as long as they are not used for matching by multiple
-threads at the same time. For example, you can assign the same stack to all
-compiled patterns, and use a global mutex in the callback to wait until the
-stack is available for use. However, this is an inefficient solution, and not
-recommended.
-.P
-This is a suggestion for how a multithreaded program that needs to set up
-non-default JIT stacks might operate:
-.sp
- During thread initalization
- thread_local_var = pcre_jit_stack_alloc(...)
-.sp
- During thread exit
- pcre_jit_stack_free(thread_local_var)
-.sp
- Use a one-line callback function
- return thread_local_var
-.sp
-All the functions described in this section do nothing if JIT is not available,
-and \fBpcre_assign_jit_stack()\fP does nothing unless the \fBextra\fP argument
-is non-NULL and points to a \fBpcre_extra\fP block that is the result of a
-successful study with PCRE_STUDY_JIT_COMPILE etc.
-.
-.
-.\" HTML <a name="stackfaq"></a>
-.SH "JIT STACK FAQ"
-.rs
-.sp
-(1) Why do we need JIT stacks?
-.sp
-PCRE (and JIT) is a recursive, depth-first engine, so it needs a stack where
-the local data of the current node is pushed before checking its child nodes.
-Allocating real machine stack on some platforms is difficult. For example, the
-stack chain needs to be updated every time if we extend the stack on PowerPC.
-Although it is possible, its updating time overhead decreases performance. So
-we do the recursion in memory.
-.P
-(2) Why don't we simply allocate blocks of memory with \fBmalloc()\fP?
-.sp
-Modern operating systems have a nice feature: they can reserve an address space
-instead of allocating memory. We can safely allocate memory pages inside this
-address space, so the stack could grow without moving memory data (this is
-important because of pointers). Thus we can allocate 1M address space, and use
-only a single memory page (usually 4K) if that is enough. However, we can still
-grow up to 1M anytime if needed.
-.P
-(3) Who "owns" a JIT stack?
-.sp
-The owner of the stack is the user program, not the JIT studied pattern or
-anything else. The user program must ensure that if a stack is used by
-\fBpcre_exec()\fP, (that is, it is assigned to the pattern currently running),
-that stack must not be used by any other threads (to avoid overwriting the same
-memory area). The best practice for multithreaded programs is to allocate a
-stack for each thread, and return this stack through the JIT callback function.
-.P
-(4) When should a JIT stack be freed?
-.sp
-You can free a JIT stack at any time, as long as it will not be used by
-\fBpcre_exec()\fP again. When you assign the stack to a pattern, only a pointer
-is set. There is no reference counting or any other magic. You can free the
-patterns and stacks in any order, anytime. Just \fIdo not\fP call
-\fBpcre_exec()\fP with a pattern pointing to an already freed stack, as that
-will cause SEGFAULT. (Also, do not free a stack currently used by
-\fBpcre_exec()\fP in another thread). You can also replace the stack for a
-pattern at any time. You can even free the previous stack before assigning a
-replacement.
-.P
-(5) Should I allocate/free a stack every time before/after calling
-\fBpcre_exec()\fP?
-.sp
-No, because this is too costly in terms of resources. However, you could
-implement some clever idea which release the stack if it is not used in let's
-say two minutes. The JIT callback can help to achieve this without keeping a
-list of the currently JIT studied patterns.
-.P
-(6) OK, the stack is for long term memory allocation. But what happens if a
-pattern causes stack overflow with a stack of 1M? Is that 1M kept until the
-stack is freed?
-.sp
-Especially on embedded sytems, it might be a good idea to release memory
-sometimes without freeing the stack. There is no API for this at the moment.
-Probably a function call which returns with the currently allocated memory for
-any stack and another which allows releasing memory (shrinking the stack) would
-be a good idea if someone needs this.
-.P
-(7) This is too much of a headache. Isn't there any better solution for JIT
-stack handling?
-.sp
-No, thanks to Windows. If POSIX threads were used everywhere, we could throw
-out this complicated API.
-.
-.
-.SH "EXAMPLE CODE"
-.rs
-.sp
-This is a single-threaded example that specifies a JIT stack without using a
-callback.
-.sp
- int rc;
- int ovector[30];
- pcre *re;
- pcre_extra *extra;
- pcre_jit_stack *jit_stack;
-.sp
- re = pcre_compile(pattern, 0, &error, &erroffset, NULL);
- /* Check for errors */
- extra = pcre_study(re, PCRE_STUDY_JIT_COMPILE, &error);
- jit_stack = pcre_jit_stack_alloc(32*1024, 512*1024);
- /* Check for error (NULL) */
- pcre_assign_jit_stack(extra, NULL, jit_stack);
- rc = pcre_exec(re, extra, subject, length, 0, 0, ovector, 30);
- /* Check results */
- pcre_free(re);
- pcre_free_study(extra);
- pcre_jit_stack_free(jit_stack);
-.sp
-.
-.
-.SH "JIT FAST PATH API"
-.rs
-.sp
-Because the API described above falls back to interpreted execution when JIT is
-not available, it is convenient for programs that are written for general use
-in many environments. However, calling JIT via \fBpcre_exec()\fP does have a
-performance impact. Programs that are written for use where JIT is known to be
-available, and which need the best possible performance, can instead use a
-"fast path" API to call JIT execution directly instead of calling
-\fBpcre_exec()\fP (obviously only for patterns that have been successfully
-studied by JIT).
-.P
-The fast path function is called \fBpcre_jit_exec()\fP, and it takes exactly
-the same arguments as \fBpcre_exec()\fP, plus one additional argument that
-must point to a JIT stack. The JIT stack arrangements described above do not
-apply. The return values are the same as for \fBpcre_exec()\fP.
-.P
-When you call \fBpcre_exec()\fP, as well as testing for invalid options, a
-number of other sanity checks are performed on the arguments. For example, if
-the subject pointer is NULL, or its length is negative, an immediate error is
-given. Also, unless PCRE_NO_UTF[8|16|32] is set, a UTF subject string is tested
-for validity. In the interests of speed, these checks do not happen on the JIT
-fast path, and if invalid data is passed, the result is undefined.
-.P
-Bypassing the sanity checks and the \fBpcre_exec()\fP wrapping can give
-speedups of more than 10%.
-.P
-Note that the \fBpcre_jit_exec()\fP function is not available in versions of
-PCRE before 8.32 (released in November 2012). If you need to support versions
-that old you must either use the slower \fBpcre_exec()\fP, or switch between
-the two codepaths by checking the values of PCRE_MAJOR and PCRE_MINOR.
-.P
-Due to an unfortunate implementation oversight, even in versions 8.32
-and later there will be no \fBpcre_jit_exec()\fP stub function defined
-when PCRE is compiled with --disable-jit, which is the default, and
-there's no way to detect whether PCRE was compiled with --enable-jit
-via a macro.
-.P
-If you need to support versions older than 8.32, or versions that may
-not build with --enable-jit, you must either use the slower
-\fBpcre_exec()\fP, or switch between the two codepaths by checking the
-values of PCRE_MAJOR and PCRE_MINOR.
-.P
-Switching between the two by checking the version assumes that all the
-versions being targeted are built with --enable-jit. To also support
-builds that may use --disable-jit either \fBpcre_exec()\fP must be
-used, or a compile-time check for JIT via \fBpcre_config()\fP (which
-assumes the runtime environment will be the same), or as the Git
-project decided to do, simply assume that \fBpcre_jit_exec()\fP is
-present in 8.32 or later unless a compile-time flag is provided, see
-the "grep: un-break building with PCRE >= 8.32 without --enable-jit"
-commit in git.git for an example of that.
-.
-.
-.SH "SEE ALSO"
-.rs
-.sp
-\fBpcreapi\fP(3)
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel (FAQ by Zoltan Herczeg)
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 05 July 2017
-Copyright (c) 1997-2017 University of Cambridge.
-.fi
diff --git a/libs/Pcre16/docs/doc/pcrelimits.3 b/libs/Pcre16/docs/doc/pcrelimits.3
deleted file mode 100644
index 423d6a2768..0000000000
--- a/libs/Pcre16/docs/doc/pcrelimits.3
+++ /dev/null
@@ -1,71 +0,0 @@
-.TH PCRELIMITS 3 "05 November 2013" "PCRE 8.34"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH "SIZE AND OTHER LIMITATIONS"
-.rs
-.sp
-There are some size limitations in PCRE but it is hoped that they will never in
-practice be relevant.
-.P
-The maximum length of a compiled pattern is approximately 64K data units (bytes
-for the 8-bit library, 16-bit units for the 16-bit library, and 32-bit units for
-the 32-bit library) if PCRE is compiled with the default internal linkage size,
-which is 2 bytes for the 8-bit and 16-bit libraries, and 4 bytes for the 32-bit
-library. If you want to process regular expressions that are truly enormous,
-you can compile PCRE with an internal linkage size of 3 or 4 (when building the
-16-bit or 32-bit library, 3 is rounded up to 4). See the \fBREADME\fP file in
-the source distribution and the
-.\" HREF
-\fBpcrebuild\fP
-.\"
-documentation for details. In these cases the limit is substantially larger.
-However, the speed of execution is slower.
-.P
-All values in repeating quantifiers must be less than 65536.
-.P
-There is no limit to the number of parenthesized subpatterns, but there can be
-no more than 65535 capturing subpatterns. There is, however, a limit to the
-depth of nesting of parenthesized subpatterns of all kinds. This is imposed in
-order to limit the amount of system stack used at compile time. The limit can
-be specified when PCRE is built; the default is 250.
-.P
-There is a limit to the number of forward references to subsequent subpatterns
-of around 200,000. Repeated forward references with fixed upper limits, for
-example, (?2){0,100} when subpattern number 2 is to the right, are included in
-the count. There is no limit to the number of backward references.
-.P
-The maximum length of name for a named subpattern is 32 characters, and the
-maximum number of named subpatterns is 10000.
-.P
-The maximum length of a name in a (*MARK), (*PRUNE), (*SKIP), or (*THEN) verb
-is 255 for the 8-bit library and 65535 for the 16-bit and 32-bit libraries.
-.P
-The maximum length of a subject string is the largest positive number that an
-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
-.\" HREF
-\fBpcrestack\fP
-.\"
-documentation.
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 05 November 2013
-Copyright (c) 1997-2013 University of Cambridge.
-.fi
diff --git a/libs/Pcre16/docs/doc/pcrematching.3 b/libs/Pcre16/docs/doc/pcrematching.3
deleted file mode 100644
index 268baf9b8c..0000000000
--- a/libs/Pcre16/docs/doc/pcrematching.3
+++ /dev/null
@@ -1,214 +0,0 @@
-.TH PCREMATCHING 3 "12 November 2013" "PCRE 8.34"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH "PCRE MATCHING ALGORITHMS"
-.rs
-.sp
-This document describes the two different algorithms that are available in PCRE
-for matching a compiled regular expression against a given subject string. The
-"standard" algorithm is the one provided by the \fBpcre_exec()\fP,
-\fBpcre16_exec()\fP and \fBpcre32_exec()\fP functions. These work in the same
-as as Perl's matching function, and provide a Perl-compatible matching operation.
-The just-in-time (JIT) optimization that is described in the
-.\" HREF
-\fBpcrejit\fP
-.\"
-documentation is compatible with these functions.
-.P
-An alternative algorithm is provided by the \fBpcre_dfa_exec()\fP,
-\fBpcre16_dfa_exec()\fP and \fBpcre32_dfa_exec()\fP functions; they operate in
-a different way, and are not Perl-compatible. This alternative has advantages
-and disadvantages compared with the standard algorithm, and these are described
-below.
-.P
-When there is only one possible way in which a given subject string can match a
-pattern, the two algorithms give the same answer. A difference arises, however,
-when there are multiple possibilities. For example, if the pattern
-.sp
- ^<.*>
-.sp
-is matched against the string
-.sp
- <something> <something else> <something further>
-.sp
-there are three possible answers. The standard algorithm finds only one of
-them, whereas the alternative algorithm finds all three.
-.
-.
-.SH "REGULAR EXPRESSIONS AS TREES"
-.rs
-.sp
-The set of strings that are matched by a regular expression can be represented
-as a tree structure. An unlimited repetition in the pattern makes the tree of
-infinite size, but it is still a tree. Matching the pattern to a given subject
-string (from a given starting point) can be thought of as a search of the tree.
-There are two ways to search a tree: depth-first and breadth-first, and these
-correspond to the two matching algorithms provided by PCRE.
-.
-.
-.SH "THE STANDARD MATCHING ALGORITHM"
-.rs
-.sp
-In the terminology of Jeffrey Friedl's book "Mastering Regular
-Expressions", the standard algorithm is an "NFA algorithm". It conducts a
-depth-first search of the pattern tree. That is, it proceeds along a single
-path through the tree, checking that the subject matches what is required. When
-there is a mismatch, the algorithm tries any alternatives at the current point,
-and if they all fail, it backs up to the previous branch point in the tree, and
-tries the next alternative branch at that level. This often involves backing up
-(moving to the left) in the subject string as well. The order in which
-repetition branches are tried is controlled by the greedy or ungreedy nature of
-the quantifier.
-.P
-If a leaf node is reached, a matching string has been found, and at that point
-the algorithm stops. Thus, if there is more than one possible match, this
-algorithm returns the first one that it finds. Whether this is the shortest,
-the longest, or some intermediate length depends on the way the greedy and
-ungreedy repetition quantifiers are specified in the pattern.
-.P
-Because it ends up with a single path through the tree, it is relatively
-straightforward for this algorithm to keep track of the substrings that are
-matched by portions of the pattern in parentheses. This provides support for
-capturing parentheses and back references.
-.
-.
-.SH "THE ALTERNATIVE MATCHING ALGORITHM"
-.rs
-.sp
-This algorithm conducts a breadth-first search of the tree. Starting from the
-first matching point in the subject, it scans the subject string from left to
-right, once, character by character, and as it does this, it remembers all the
-paths through the tree that represent valid matches. In Friedl's terminology,
-this is a kind of "DFA algorithm", though it is not implemented as a
-traditional finite state machine (it keeps multiple states active
-simultaneously).
-.P
-Although the general principle of this matching algorithm is that it scans the
-subject string only once, without backtracking, there is one exception: when a
-lookaround assertion is encountered, the characters following or preceding the
-current point have to be independently inspected.
-.P
-The scan continues until either the end of the subject is reached, or there are
-no more unterminated paths. At this point, terminated paths represent the
-different matching possibilities (if there are none, the match has failed).
-Thus, if there is more than one possible match, this algorithm finds all of
-them, and in particular, it finds the longest. The matches are returned in
-decreasing order of length. There is an option to stop the algorithm after the
-first match (which is necessarily the shortest) is found.
-.P
-Note that all the matches that are found start at the same point in the
-subject. If the pattern
-.sp
- cat(er(pillar)?)?
-.sp
-is matched against the string "the caterpillar catchment", the result will be
-the three strings "caterpillar", "cater", and "cat" that start at the fifth
-character of the subject. The algorithm does not automatically move on to find
-matches that start at later positions.
-.P
-PCRE's "auto-possessification" optimization usually applies to character
-repeats at the end of a pattern (as well as internally). For example, the
-pattern "a\ed+" is compiled as if it were "a\ed++" because there is no point
-even considering the possibility of backtracking into the repeated digits. For
-DFA matching, this means that only one possible match is found. If you really
-do want multiple matches in such cases, either use an ungreedy repeat
-("a\ed+?") or set the PCRE_NO_AUTO_POSSESS option when compiling.
-.P
-There are a number of features of PCRE regular expressions that are not
-supported by the alternative matching algorithm. They are as follows:
-.P
-1. Because the algorithm finds all possible matches, the greedy or ungreedy
-nature of repetition quantifiers is not relevant. Greedy and ungreedy
-quantifiers are treated in exactly the same way. However, possessive
-quantifiers can make a difference when what follows could also match what is
-quantified, for example in a pattern like this:
-.sp
- ^a++\ew!
-.sp
-This pattern matches "aaab!" but not "aaa!", which would be matched by a
-non-possessive quantifier. Similarly, if an atomic group is present, it is
-matched as if it were a standalone pattern at the current point, and the
-longest match is then "locked in" for the rest of the overall pattern.
-.P
-2. When dealing with multiple paths through the tree simultaneously, it is not
-straightforward to keep track of captured substrings for the different matching
-possibilities, and PCRE's implementation of this algorithm does not attempt to
-do this. This means that no captured substrings are available.
-.P
-3. Because no substrings are captured, back references within the pattern are
-not supported, and cause errors if encountered.
-.P
-4. For the same reason, conditional expressions that use a backreference as the
-condition or test for a specific group recursion are not supported.
-.P
-5. Because many paths through the tree may be active, the \eK escape sequence,
-which resets the start of the match when encountered (but may be on some paths
-and not on others), is not supported. It causes an error if encountered.
-.P
-6. Callouts are supported, but the value of the \fIcapture_top\fP field is
-always 1, and the value of the \fIcapture_last\fP field is always -1.
-.P
-7. The \eC escape sequence, which (in the standard algorithm) always matches a
-single data unit, even in UTF-8, UTF-16 or UTF-32 modes, is not supported in
-these modes, because the alternative algorithm moves through the subject string
-one character (not data unit) at a time, for all active paths through the tree.
-.P
-8. Except for (*FAIL), the backtracking control verbs such as (*PRUNE) are not
-supported. (*FAIL) is supported, and behaves like a failing negative assertion.
-.
-.
-.SH "ADVANTAGES OF THE ALTERNATIVE ALGORITHM"
-.rs
-.sp
-Using the alternative matching algorithm provides the following advantages:
-.P
-1. All possible matches (at a single point in the subject) are automatically
-found, and in particular, the longest match is found. To find more than one
-match using the standard algorithm, you have to do kludgy things with
-callouts.
-.P
-2. Because the alternative algorithm scans the subject string just once, and
-never needs to backtrack (except for lookbehinds), it is possible to pass very
-long subject strings to the matching function in several pieces, checking for
-partial matching each time. Although it is possible to do multi-segment
-matching using the standard algorithm by retaining partially matched
-substrings, it is more complicated. The
-.\" HREF
-\fBpcrepartial\fP
-.\"
-documentation gives details of partial matching and discusses multi-segment
-matching.
-.
-.
-.SH "DISADVANTAGES OF THE ALTERNATIVE ALGORITHM"
-.rs
-.sp
-The alternative algorithm suffers from a number of disadvantages:
-.P
-1. It is substantially slower than the standard algorithm. This is partly
-because it has to search for all possible matches, but is also because it is
-less susceptible to optimization.
-.P
-2. Capturing parentheses and back references are not supported.
-.P
-3. Although atomic groups are supported, their use does not provide the
-performance advantage that it does for the standard algorithm.
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 12 November 2013
-Copyright (c) 1997-2012 University of Cambridge.
-.fi
diff --git a/libs/Pcre16/docs/doc/pcrepartial.3 b/libs/Pcre16/docs/doc/pcrepartial.3
deleted file mode 100644
index 14d0124f1c..0000000000
--- a/libs/Pcre16/docs/doc/pcrepartial.3
+++ /dev/null
@@ -1,476 +0,0 @@
-.TH PCREPARTIAL 3 "02 July 2013" "PCRE 8.34"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH "PARTIAL MATCHING IN PCRE"
-.rs
-.sp
-In normal use of PCRE, if the subject string that is passed to a matching
-function matches as far as it goes, but is too short to match the entire
-pattern, PCRE_ERROR_NOMATCH is returned. There are circumstances where it might
-be helpful to distinguish this case from other cases in which there is no
-match.
-.P
-Consider, for example, an application where a human is required to type in data
-for a field with specific formatting requirements. An example might be a date
-in the form \fIddmmmyy\fP, defined by this pattern:
-.sp
- ^\ed?\ed(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\ed\ed$
-.sp
-If the application sees the user's keystrokes one by one, and can check that
-what has been typed so far is potentially valid, it is able to raise an error
-as soon as a mistake is made, by beeping and not reflecting the character that
-has been typed, for example. This immediate feedback is likely to be a better
-user interface than a check that is delayed until the entire string has been
-entered. Partial matching can also be useful when the subject string is very
-long and is not all available at once.
-.P
-PCRE supports partial matching by means of the PCRE_PARTIAL_SOFT and
-PCRE_PARTIAL_HARD options, which can be set when calling any of the matching
-functions. For backwards compatibility, PCRE_PARTIAL is a synonym for
-PCRE_PARTIAL_SOFT. The essential difference between the two options is whether
-or not a partial match is preferred to an alternative complete match, though
-the details differ between the two types of matching function. If both options
-are set, PCRE_PARTIAL_HARD takes precedence.
-.P
-If you want to use partial matching with just-in-time optimized code, you must
-call \fBpcre_study()\fP, \fBpcre16_study()\fP or \fBpcre32_study()\fP with one
-or both of these options:
-.sp
- PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE
- PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE
-.sp
-PCRE_STUDY_JIT_COMPILE should also be set if you are going to run non-partial
-matches on the same pattern. If the appropriate JIT study mode has not been set
-for a match, the interpretive matching code is used.
-.P
-Setting a partial matching option disables two of PCRE's standard
-optimizations. PCRE remembers the last literal data unit in a pattern, and
-abandons matching immediately if it is not present in the subject string. This
-optimization cannot be used for a subject string that might match only
-partially. If the pattern was studied, PCRE knows the minimum length of a
-matching string, and does not bother to run the matching function on shorter
-strings. This optimization is also disabled for partial matching.
-.
-.
-.SH "PARTIAL MATCHING USING pcre_exec() OR pcre[16|32]_exec()"
-.rs
-.sp
-A partial match occurs during a call to \fBpcre_exec()\fP or
-\fBpcre[16|32]_exec()\fP when the end of the subject string is reached
-successfully, but matching cannot continue because more characters are needed.
-However, at least one character in the subject must have been inspected. This
-character need not form part of the final matched string; lookbehind assertions
-and the \eK escape sequence provide ways of inspecting characters before the
-start of a matched substring. The requirement for inspecting at least one
-character exists because an empty string can always be matched; without such a
-restriction there would always be a partial match of an empty string at the end
-of the subject.
-.P
-If there are at least two slots in the offsets vector when a partial match is
-returned, the first slot is set to the offset of the earliest character that
-was inspected. For convenience, the second offset points to the end of the
-subject so that a substring can easily be identified. If there are at least
-three slots in the offsets vector, the third slot is set to the offset of the
-character where matching started.
-.P
-For the majority of patterns, the contents of the first and third slots will be
-the same. However, for patterns that contain lookbehind assertions, or begin
-with \eb or \eB, characters before the one where matching started may have been
-inspected while carrying out the match. For example, consider this pattern:
-.sp
- /(?<=abc)123/
-.sp
-This pattern matches "123", but only if it is preceded by "abc". If the subject
-string is "xyzabc12", the first two offsets after a partial match are for the
-substring "abc12", because all these characters were inspected. However, the
-third offset is set to 6, because that is the offset where matching began.
-.P
-What happens when a partial match is identified depends on which of the two
-partial matching options are set.
-.
-.
-.SS "PCRE_PARTIAL_SOFT WITH pcre_exec() OR pcre[16|32]_exec()"
-.rs
-.sp
-If PCRE_PARTIAL_SOFT is set when \fBpcre_exec()\fP or \fBpcre[16|32]_exec()\fP
-identifies a partial match, the partial match is remembered, but matching
-continues as normal, and other alternatives in the pattern are tried. If no
-complete match can be found, PCRE_ERROR_PARTIAL is returned instead of
-PCRE_ERROR_NOMATCH.
-.P
-This option is "soft" because it prefers a complete match over a partial match.
-All the various matching items in a pattern behave as if the subject string is
-potentially complete. For example, \ez, \eZ, and $ match at the end of the
-subject, as normal, and for \eb and \eB the end of the subject is treated as a
-non-alphanumeric.
-.P
-If there is more than one partial match, the first one that was found provides
-the data that is returned. Consider this pattern:
-.sp
- /123\ew+X|dogY/
-.sp
-If this is matched against the subject string "abc123dog", both
-alternatives fail to match, but the end of the subject is reached during
-matching, so PCRE_ERROR_PARTIAL is returned. The offsets are set to 3 and 9,
-identifying "123dog" as the first partial match that was found. (In this
-example, there are two partial matches, because "dog" on its own partially
-matches the second alternative.)
-.
-.
-.SS "PCRE_PARTIAL_HARD WITH pcre_exec() OR pcre[16|32]_exec()"
-.rs
-.sp
-If PCRE_PARTIAL_HARD is set for \fBpcre_exec()\fP or \fBpcre[16|32]_exec()\fP,
-PCRE_ERROR_PARTIAL is returned as soon as a partial match is found, without
-continuing to search for possible complete matches. This option is "hard"
-because it prefers an earlier partial match over a later complete match. For
-this reason, the assumption is made that the end of the supplied subject string
-may not be the true end of the available data, and so, if \ez, \eZ, \eb, \eB,
-or $ are encountered at the end of the subject, the result is
-PCRE_ERROR_PARTIAL, provided that at least one character in the subject has
-been inspected.
-.P
-Setting PCRE_PARTIAL_HARD also affects the way UTF-8 and UTF-16
-subject strings are checked for validity. Normally, an invalid sequence
-causes the error PCRE_ERROR_BADUTF8 or PCRE_ERROR_BADUTF16. However, in the
-special case of a truncated character at the end of the subject,
-PCRE_ERROR_SHORTUTF8 or PCRE_ERROR_SHORTUTF16 is returned when
-PCRE_PARTIAL_HARD is set.
-.
-.
-.SS "Comparing hard and soft partial matching"
-.rs
-.sp
-The difference between the two partial matching options can be illustrated by a
-pattern such as:
-.sp
- /dog(sbody)?/
-.sp
-This matches either "dog" or "dogsbody", greedily (that is, it prefers the
-longer string if possible). If it is matched against the string "dog" with
-PCRE_PARTIAL_SOFT, it yields a complete match for "dog". However, if
-PCRE_PARTIAL_HARD is set, the result is PCRE_ERROR_PARTIAL. On the other hand,
-if the pattern is made ungreedy the result is different:
-.sp
- /dog(sbody)??/
-.sp
-In this case the result is always a complete match because that is found first,
-and matching never continues after finding a complete match. It might be easier
-to follow this explanation by thinking of the two patterns like this:
-.sp
- /dog(sbody)?/ is the same as /dogsbody|dog/
- /dog(sbody)??/ is the same as /dog|dogsbody/
-.sp
-The second pattern will never match "dogsbody", because it will always find the
-shorter match first.
-.
-.
-.SH "PARTIAL MATCHING USING pcre_dfa_exec() OR pcre[16|32]_dfa_exec()"
-.rs
-.sp
-The DFA functions move along the subject string character by character, without
-backtracking, searching for all possible matches simultaneously. If the end of
-the subject is reached before the end of the pattern, there is the possibility
-of a partial match, again provided that at least one character has been
-inspected.
-.P
-When PCRE_PARTIAL_SOFT is set, PCRE_ERROR_PARTIAL is returned only if there
-have been no complete matches. Otherwise, the complete matches are returned.
-However, if PCRE_PARTIAL_HARD is set, a partial match takes precedence over any
-complete matches. The portion of the string that was inspected when the longest
-partial match was found is set as the first matching string, provided there are
-at least two slots in the offsets vector.
-.P
-Because the DFA functions always search for all possible matches, and there is
-no difference between greedy and ungreedy repetition, their behaviour is
-different from the standard functions when PCRE_PARTIAL_HARD is set. Consider
-the string "dog" matched against the ungreedy pattern shown above:
-.sp
- /dog(sbody)??/
-.sp
-Whereas the standard functions stop as soon as they find the complete match for
-"dog", the DFA functions also find the partial match for "dogsbody", and so
-return that when PCRE_PARTIAL_HARD is set.
-.
-.
-.SH "PARTIAL MATCHING AND WORD BOUNDARIES"
-.rs
-.sp
-If a pattern ends with one of sequences \eb or \eB, which test for word
-boundaries, partial matching with PCRE_PARTIAL_SOFT can give counter-intuitive
-results. Consider this pattern:
-.sp
- /\ebcat\eb/
-.sp
-This matches "cat", provided there is a word boundary at either end. If the
-subject string is "the cat", the comparison of the final "t" with a following
-character cannot take place, so a partial match is found. However, normal
-matching carries on, and \eb matches at the end of the subject when the last
-character is a letter, so a complete match is found. The result, therefore, is
-\fInot\fP PCRE_ERROR_PARTIAL. Using PCRE_PARTIAL_HARD in this case does yield
-PCRE_ERROR_PARTIAL, because then the partial match takes precedence.
-.
-.
-.SH "FORMERLY RESTRICTED PATTERNS"
-.rs
-.sp
-For releases of PCRE prior to 8.00, because of the way certain internal
-optimizations were implemented in the \fBpcre_exec()\fP function, the
-PCRE_PARTIAL option (predecessor of PCRE_PARTIAL_SOFT) could not be used with
-all patterns. From release 8.00 onwards, the restrictions no longer apply, and
-partial matching with can be requested for any pattern.
-.P
-Items that were formerly restricted were repeated single characters and
-repeated metasequences. If PCRE_PARTIAL was set for a pattern that did not
-conform to the restrictions, \fBpcre_exec()\fP returned the error code
-PCRE_ERROR_BADPARTIAL (-13). This error code is no longer in use. The
-PCRE_INFO_OKPARTIAL call to \fBpcre_fullinfo()\fP to find out if a compiled
-pattern can be used for partial matching now always returns 1.
-.
-.
-.SH "EXAMPLE OF PARTIAL MATCHING USING PCRETEST"
-.rs
-.sp
-If the escape sequence \eP is present in a \fBpcretest\fP data line, the
-PCRE_PARTIAL_SOFT option is used for the match. Here is a run of \fBpcretest\fP
-that uses the date example quoted above:
-.sp
- re> /^\ed?\ed(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\ed\ed$/
- data> 25jun04\eP
- 0: 25jun04
- 1: jun
- data> 25dec3\eP
- Partial match: 23dec3
- data> 3ju\eP
- Partial match: 3ju
- data> 3juj\eP
- No match
- data> j\eP
- No match
-.sp
-The first data string is matched completely, so \fBpcretest\fP shows the
-matched substrings. The remaining four strings do not match the complete
-pattern, but the first two are partial matches. Similar output is obtained
-if DFA matching is used.
-.P
-If the escape sequence \eP is present more than once in a \fBpcretest\fP data
-line, the PCRE_PARTIAL_HARD option is set for the match.
-.
-.
-.SH "MULTI-SEGMENT MATCHING WITH pcre_dfa_exec() OR pcre[16|32]_dfa_exec()"
-.rs
-.sp
-When a partial match has been found using a DFA matching function, it is
-possible to continue the match by providing additional subject data and calling
-the function again with the same compiled regular expression, this time setting
-the PCRE_DFA_RESTART option. You must pass the same working space as before,
-because this is where details of the previous partial match are stored. Here is
-an example using \fBpcretest\fP, using the \eR escape sequence to set the
-PCRE_DFA_RESTART option (\eD specifies the use of the DFA matching function):
-.sp
- re> /^\ed?\ed(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\ed\ed$/
- data> 23ja\eP\eD
- Partial match: 23ja
- data> n05\eR\eD
- 0: n05
-.sp
-The first call has "23ja" as the subject, and requests partial matching; the
-second call has "n05" as the subject for the continued (restarted) match.
-Notice that when the match is complete, only the last part is shown; PCRE does
-not retain the previously partially-matched string. It is up to the calling
-program to do that if it needs to.
-.P
-That means that, for an unanchored pattern, if a continued match fails, it is
-not possible to try again at a new starting point. All this facility is capable
-of doing is continuing with the previous match attempt. In the previous
-example, if the second set of data is "ug23" the result is no match, even
-though there would be a match for "aug23" if the entire string were given at
-once. Depending on the application, this may or may not be what you want.
-The only way to allow for starting again at the next character is to retain the
-matched part of the subject and try a new complete match.
-.P
-You can set the PCRE_PARTIAL_SOFT or PCRE_PARTIAL_HARD options with
-PCRE_DFA_RESTART to continue partial matching over multiple segments. This
-facility can be used to pass very long subject strings to the DFA matching
-functions.
-.
-.
-.SH "MULTI-SEGMENT MATCHING WITH pcre_exec() OR pcre[16|32]_exec()"
-.rs
-.sp
-From release 8.00, the standard matching functions can also be used to do
-multi-segment matching. Unlike the DFA functions, it is not possible to
-restart the previous match with a new segment of data. Instead, new data must
-be added to the previous subject string, and the entire match re-run, starting
-from the point where the partial match occurred. Earlier data can be discarded.
-.P
-It is best to use PCRE_PARTIAL_HARD in this situation, because it does not
-treat the end of a segment as the end of the subject when matching \ez, \eZ,
-\eb, \eB, and $. Consider an unanchored pattern that matches dates:
-.sp
- re> /\ed?\ed(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\ed\ed/
- data> The date is 23ja\eP\eP
- Partial match: 23ja
-.sp
-At this stage, an application could discard the text preceding "23ja", add on
-text from the next segment, and call the matching function again. Unlike the
-DFA matching functions, the entire matching string must always be available,
-and the complete matching process occurs for each call, so more memory and more
-processing time is needed.
-.P
-\fBNote:\fP If the pattern contains lookbehind assertions, or \eK, or starts
-with \eb or \eB, the string that is returned for a partial match includes
-characters that precede the start of what would be returned for a complete
-match, because it contains all the characters that were inspected during the
-partial match.
-.
-.
-.SH "ISSUES WITH MULTI-SEGMENT MATCHING"
-.rs
-.sp
-Certain types of pattern may give problems with multi-segment matching,
-whichever matching function is used.
-.P
-1. If the pattern contains a test for the beginning of a line, you need to pass
-the PCRE_NOTBOL option when the subject string for any call does start at the
-beginning of a line. There is also a PCRE_NOTEOL option, but in practice when
-doing multi-segment matching you should be using PCRE_PARTIAL_HARD, which
-includes the effect of PCRE_NOTEOL.
-.P
-2. Lookbehind assertions that have already been obeyed are catered for in the
-offsets that are returned for a partial match. However a lookbehind assertion
-later in the pattern could require even earlier characters to be inspected. You
-can handle this case by using the PCRE_INFO_MAXLOOKBEHIND option of the
-\fBpcre_fullinfo()\fP or \fBpcre[16|32]_fullinfo()\fP functions to obtain the
-length of the longest lookbehind in the pattern. This length is given in
-characters, not bytes. If you always retain at least that many characters
-before the partially matched string, all should be well. (Of course, near the
-start of the subject, fewer characters may be present; in that case all
-characters should be retained.)
-.P
-From release 8.33, there is a more accurate way of deciding which characters to
-retain. Instead of subtracting the length of the longest lookbehind from the
-earliest inspected character (\fIoffsets[0]\fP), the match start position
-(\fIoffsets[2]\fP) should be used, and the next match attempt started at the
-\fIoffsets[2]\fP character by setting the \fIstartoffset\fP argument of
-\fBpcre_exec()\fP or \fBpcre_dfa_exec()\fP.
-.P
-For example, if the pattern "(?<=123)abc" is partially
-matched against the string "xx123a", the three offset values returned are 2, 6,
-and 5. This indicates that the matching process that gave a partial match
-started at offset 5, but the characters "123a" were all inspected. The maximum
-lookbehind for that pattern is 3, so taking that away from 5 shows that we need
-only keep "123a", and the next match attempt can be started at offset 3 (that
-is, at "a") when further characters have been added. When the match start is
-not the earliest inspected character, \fBpcretest\fP shows it explicitly:
-.sp
- re> "(?<=123)abc"
- data> xx123a\eP\eP
- Partial match at offset 5: 123a
-.P
-3. Because a partial match must always contain at least one character, what
-might be considered a partial match of an empty string actually gives a "no
-match" result. For example:
-.sp
- re> /c(?<=abc)x/
- data> ab\eP
- No match
-.sp
-If the next segment begins "cx", a match should be found, but this will only
-happen if characters from the previous segment are retained. For this reason, a
-"no match" result should be interpreted as "partial match of an empty string"
-when the pattern contains lookbehinds.
-.P
-4. Matching a subject string that is split into multiple segments may not
-always produce exactly the same result as matching over one single long string,
-especially when PCRE_PARTIAL_SOFT is used. The section "Partial Matching and
-Word Boundaries" above describes an issue that arises if the pattern ends with
-\eb or \eB. Another kind of difference may occur when there are multiple
-matching possibilities, because (for PCRE_PARTIAL_SOFT) a partial match result
-is given only when there are no completed matches. This means that as soon as
-the shortest match has been found, continuation to a new subject segment is no
-longer possible. Consider again this \fBpcretest\fP example:
-.sp
- re> /dog(sbody)?/
- data> dogsb\eP
- 0: dog
- data> do\eP\eD
- Partial match: do
- data> gsb\eR\eP\eD
- 0: g
- data> dogsbody\eD
- 0: dogsbody
- 1: dog
-.sp
-The first data line passes the string "dogsb" to a standard matching function,
-setting the PCRE_PARTIAL_SOFT option. Although the string is a partial match
-for "dogsbody", the result is not PCRE_ERROR_PARTIAL, because the shorter
-string "dog" is a complete match. Similarly, when the subject is presented to
-a DFA matching function in several parts ("do" and "gsb" being the first two)
-the match stops when "dog" has been found, and it is not possible to continue.
-On the other hand, if "dogsbody" is presented as a single string, a DFA
-matching function finds both matches.
-.P
-Because of these problems, it is best to use PCRE_PARTIAL_HARD when matching
-multi-segment data. The example above then behaves differently:
-.sp
- re> /dog(sbody)?/
- data> dogsb\eP\eP
- Partial match: dogsb
- data> do\eP\eD
- Partial match: do
- data> gsb\eR\eP\eP\eD
- Partial match: gsb
-.sp
-5. Patterns that contain alternatives at the top level which do not all start
-with the same pattern item may not work as expected when PCRE_DFA_RESTART is
-used. For example, consider this pattern:
-.sp
- 1234|3789
-.sp
-If the first part of the subject is "ABC123", a partial match of the first
-alternative is found at offset 3. There is no partial match for the second
-alternative, because such a match does not start at the same point in the
-subject string. Attempting to continue with the string "7890" does not yield a
-match because only those alternatives that match at one point in the subject
-are remembered. The problem arises because the start of the second alternative
-matches within the first alternative. There is no problem with anchored
-patterns or patterns such as:
-.sp
- 1234|ABCD
-.sp
-where no string can be a partial match for both alternatives. This is not a
-problem if a standard matching function is used, because the entire match has
-to be rerun each time:
-.sp
- re> /1234|3789/
- data> ABC123\eP\eP
- Partial match: 123
- data> 1237890
- 0: 3789
-.sp
-Of course, instead of using PCRE_DFA_RESTART, the same technique of re-running
-the entire match can also be used with the DFA matching functions. Another
-possibility is to work with two buffers. If a partial match at offset \fIn\fP
-in the first buffer is followed by "no match" when PCRE_DFA_RESTART is used on
-the second buffer, you can then try a new match starting at offset \fIn+1\fP in
-the first buffer.
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 02 July 2013
-Copyright (c) 1997-2013 University of Cambridge.
-.fi
diff --git a/libs/Pcre16/docs/doc/pcrepattern.3 b/libs/Pcre16/docs/doc/pcrepattern.3
deleted file mode 100644
index 97df217fdb..0000000000
--- a/libs/Pcre16/docs/doc/pcrepattern.3
+++ /dev/null
@@ -1,3304 +0,0 @@
-.TH PCREPATTERN 3 "23 October 2016" "PCRE 8.40"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH "PCRE REGULAR EXPRESSION DETAILS"
-.rs
-.sp
-The syntax and semantics of the regular expressions that are supported by PCRE
-are described in detail below. There is a quick-reference syntax summary in the
-.\" HREF
-\fBpcresyntax\fP
-.\"
-page. PCRE tries to match Perl syntax and semantics as closely as it can. PCRE
-also supports some alternative regular expression syntax (which does not
-conflict with the Perl syntax) in order to provide some compatibility with
-regular expressions in Python, .NET, and Oniguruma.
-.P
-Perl's regular expressions are described in its own documentation, and
-regular expressions in general are covered in a number of books, some of which
-have copious examples. Jeffrey Friedl's "Mastering Regular Expressions",
-published by O'Reilly, covers regular expressions in great detail. This
-description of PCRE's regular expressions is intended as reference material.
-.P
-This document discusses the patterns that are supported by PCRE when one its
-main matching functions, \fBpcre_exec()\fP (8-bit) or \fBpcre[16|32]_exec()\fP
-(16- or 32-bit), is used. PCRE also has alternative matching functions,
-\fBpcre_dfa_exec()\fP and \fBpcre[16|32_dfa_exec()\fP, which match using a
-different algorithm that is not Perl-compatible. Some of the features discussed
-below are not available when DFA matching is used. The advantages and
-disadvantages of the alternative functions, and how they differ from the normal
-functions, are discussed in the
-.\" HREF
-\fBpcrematching\fP
-.\"
-page.
-.
-.
-.SH "SPECIAL START-OF-PATTERN ITEMS"
-.rs
-.sp
-A number of options that can be passed to \fBpcre_compile()\fP can also be set
-by special items at the start of a pattern. These are not Perl-compatible, but
-are provided to make these options accessible to pattern writers who are not
-able to change the program that processes the pattern. Any number of these
-items may appear, but they must all be together right at the start of the
-pattern string, and the letters must be in upper case.
-.
-.
-.SS "UTF support"
-.rs
-.sp
-The original operation of PCRE was on strings of one-byte characters. However,
-there is now also support for UTF-8 strings in the original library, an
-extra library that supports 16-bit and UTF-16 character strings, and a
-third library that supports 32-bit and UTF-32 character strings. To use these
-features, PCRE must be built to include appropriate support. When using UTF
-strings you must either call the compiling function with the PCRE_UTF8,
-PCRE_UTF16, or PCRE_UTF32 option, or the pattern must start with one of
-these special sequences:
-.sp
- (*UTF8)
- (*UTF16)
- (*UTF32)
- (*UTF)
-.sp
-(*UTF) is a generic sequence that can be used with any of the libraries.
-Starting a pattern with such a sequence is equivalent to setting the relevant
-option. How setting a UTF mode affects pattern matching is mentioned in several
-places below. There is also a summary of features in the
-.\" HREF
-\fBpcreunicode\fP
-.\"
-page.
-.P
-Some applications that allow their users to supply patterns may wish to
-restrict them to non-UTF data for security reasons. If the PCRE_NEVER_UTF
-option is set at compile time, (*UTF) etc. are not allowed, and their
-appearance causes an error.
-.
-.
-.SS "Unicode property support"
-.rs
-.sp
-Another special sequence that may appear at the start of a pattern is (*UCP).
-This has the same effect as setting the PCRE_UCP option: it causes sequences
-such as \ed and \ew to use Unicode properties to determine character types,
-instead of recognizing only characters with codes less than 128 via a lookup
-table.
-.
-.
-.SS "Disabling auto-possessification"
-.rs
-.sp
-If a pattern starts with (*NO_AUTO_POSSESS), it has the same effect as setting
-the PCRE_NO_AUTO_POSSESS option at compile time. This stops PCRE from making
-quantifiers possessive when what follows cannot match the repeated item. For
-example, by default a+b is treated as a++b. For more details, see the
-.\" HREF
-\fBpcreapi\fP
-.\"
-documentation.
-.
-.
-.SS "Disabling start-up optimizations"
-.rs
-.sp
-If a pattern starts with (*NO_START_OPT), it has the same effect as setting the
-PCRE_NO_START_OPTIMIZE option either at compile or matching time. This disables
-several optimizations for quickly reaching "no match" results. For more
-details, see the
-.\" HREF
-\fBpcreapi\fP
-.\"
-documentation.
-.
-.
-.\" HTML <a name="newlines"></a>
-.SS "Newline conventions"
-.rs
-.sp
-PCRE supports five different conventions for indicating line breaks in
-strings: a single CR (carriage return) character, a single LF (linefeed)
-character, the two-character sequence CRLF, any of the three preceding, or any
-Unicode newline sequence. The
-.\" HREF
-\fBpcreapi\fP
-.\"
-page has
-.\" HTML <a href="pcreapi.html#newlines">
-.\" </a>
-further discussion
-.\"
-about newlines, and shows how to set the newline convention in the
-\fIoptions\fP arguments for the compiling and matching functions.
-.P
-It is also possible to specify a newline convention by starting a pattern
-string with one of the following five sequences:
-.sp
- (*CR) carriage return
- (*LF) linefeed
- (*CRLF) carriage return, followed by linefeed
- (*ANYCRLF) any of the three above
- (*ANY) all Unicode newline sequences
-.sp
-These override the default and the options given to the compiling function. For
-example, on a Unix system where LF is the default newline sequence, the pattern
-.sp
- (*CR)a.b
-.sp
-changes the convention to CR. That pattern matches "a\enb" because LF is no
-longer a newline. If more than one of these settings is present, the last one
-is used.
-.P
-The newline convention affects where the circumflex and dollar assertions are
-true. It also affects the interpretation of the dot metacharacter when
-PCRE_DOTALL is not set, and the behaviour of \eN. However, it does not affect
-what the \eR escape sequence matches. By default, this is any Unicode newline
-sequence, for Perl compatibility. However, this can be changed; see the
-description of \eR in the section entitled
-.\" HTML <a href="#newlineseq">
-.\" </a>
-"Newline sequences"
-.\"
-below. A change of \eR setting can be combined with a change of newline
-convention.
-.
-.
-.SS "Setting match and recursion limits"
-.rs
-.sp
-The caller of \fBpcre_exec()\fP can set a limit on the number of times the
-internal \fBmatch()\fP function is called and on the maximum depth of
-recursive calls. These facilities are provided to catch runaway matches that
-are provoked by patterns with huge matching trees (a typical example is a
-pattern with nested unlimited repeats) and to avoid running out of system stack
-by too much recursion. When one of these limits is reached, \fBpcre_exec()\fP
-gives an error return. The limits can also be set by items at the start of the
-pattern of the form
-.sp
- (*LIMIT_MATCH=d)
- (*LIMIT_RECURSION=d)
-.sp
-where d is any number of decimal digits. However, the value of the setting must
-be less than the value set (or defaulted) by the caller of \fBpcre_exec()\fP
-for it to have any effect. In other words, the pattern writer can lower the
-limits set by the programmer, but not raise them. If there is more than one
-setting of one of these limits, the lower value is used.
-.
-.
-.SH "EBCDIC CHARACTER CODES"
-.rs
-.sp
-PCRE can be compiled to run in an environment that uses EBCDIC as its character
-code rather than ASCII or Unicode (typically a mainframe system). In the
-sections below, character code values are ASCII or Unicode; in an EBCDIC
-environment these characters may have different code values, and there are no
-code points greater than 255.
-.
-.
-.SH "CHARACTERS AND METACHARACTERS"
-.rs
-.sp
-A regular expression is a pattern that is matched against a subject string from
-left to right. Most characters stand for themselves in a pattern, and match the
-corresponding characters in the subject. As a trivial example, the pattern
-.sp
- The quick brown fox
-.sp
-matches a portion of a subject string that is identical to itself. When
-caseless matching is specified (the PCRE_CASELESS option), letters are matched
-independently of case. In a UTF mode, PCRE always understands the concept of
-case for characters whose values are less than 128, so caseless matching is
-always possible. For characters with higher values, the concept of case is
-supported if PCRE is compiled with Unicode property support, but not otherwise.
-If you want to use caseless matching for characters 128 and above, you must
-ensure that PCRE is compiled with Unicode property support as well as with
-UTF support.
-.P
-The power of regular expressions comes from the ability to include alternatives
-and repetitions in the pattern. These are encoded in the pattern by the use of
-\fImetacharacters\fP, which do not stand for themselves but instead are
-interpreted in some special way.
-.P
-There are two different sets of metacharacters: those that are recognized
-anywhere in the pattern except within square brackets, and those that are
-recognized within square brackets. Outside square brackets, the metacharacters
-are as follows:
-.sp
- \e general escape character with several uses
- ^ assert start of string (or line, in multiline mode)
- $ assert end of string (or line, in multiline mode)
- . match any character except newline (by default)
- [ start character class definition
- | start of alternative branch
- ( start subpattern
- ) end subpattern
- ? extends the meaning of (
- also 0 or 1 quantifier
- also quantifier minimizer
- * 0 or more quantifier
- + 1 or more quantifier
- also "possessive quantifier"
- { start min/max quantifier
-.sp
-Part of a pattern that is in square brackets is called a "character class". In
-a character class the only metacharacters are:
-.sp
- \e general escape character
- ^ negate the class, but only if the first character
- - indicates character range
-.\" JOIN
- [ POSIX character class (only if followed by POSIX
- syntax)
- ] terminates the character class
-.sp
-The following sections describe the use of each of the metacharacters.
-.
-.
-.SH BACKSLASH
-.rs
-.sp
-The backslash character has several uses. Firstly, if it is followed by a
-character that is not a number or a letter, it takes away any special meaning
-that character may have. This use of backslash as an escape character applies
-both inside and outside character classes.
-.P
-For example, if you want to match a * character, you write \e* in the pattern.
-This escaping action applies whether or not the following character would
-otherwise be interpreted as a metacharacter, so it is always safe to precede a
-non-alphanumeric with backslash to specify that it stands for itself. In
-particular, if you want to match a backslash, you write \e\e.
-.P
-In a UTF mode, only ASCII numbers and letters have any special meaning after a
-backslash. All other characters (in particular, those whose codepoints are
-greater than 127) are treated as literals.
-.P
-If a pattern is compiled with the PCRE_EXTENDED option, most white space in the
-pattern (other than in a character class), and characters between a # outside a
-character class and the next newline, inclusive, are ignored. An escaping
-backslash can be used to include a white space or # character as part of the
-pattern.
-.P
-If you want to remove the special meaning from a sequence of characters, you
-can do so by putting them between \eQ and \eE. This is different from Perl in
-that $ and @ are handled as literals in \eQ...\eE sequences in PCRE, whereas in
-Perl, $ and @ cause variable interpolation. Note the following examples:
-.sp
- Pattern PCRE matches Perl matches
-.sp
-.\" JOIN
- \eQabc$xyz\eE abc$xyz abc followed by the
- contents of $xyz
- \eQabc\e$xyz\eE abc\e$xyz abc\e$xyz
- \eQabc\eE\e$\eQxyz\eE abc$xyz abc$xyz
-.sp
-The \eQ...\eE sequence is recognized both inside and outside character classes.
-An isolated \eE that is not preceded by \eQ is ignored. If \eQ is not followed
-by \eE later in the pattern, the literal interpretation continues to the end of
-the pattern (that is, \eE is assumed at the end). If the isolated \eQ is inside
-a character class, this causes an error, because the character class is not
-terminated.
-.
-.
-.\" HTML <a name="digitsafterbackslash"></a>
-.SS "Non-printing characters"
-.rs
-.sp
-A second use of backslash provides a way of encoding non-printing characters
-in patterns in a visible manner. There is no restriction on the appearance of
-non-printing characters, apart from the binary zero that terminates a pattern,
-but when a pattern is being prepared by text editing, it is often easier to use
-one of the following escape sequences than the binary character it represents.
-In an ASCII or Unicode environment, these escapes are as follows:
-.sp
- \ea alarm, that is, the BEL character (hex 07)
- \ecx "control-x", where x is any ASCII character
- \ee escape (hex 1B)
- \ef form feed (hex 0C)
- \en linefeed (hex 0A)
- \er carriage return (hex 0D)
- \et tab (hex 09)
- \e0dd character with octal code 0dd
- \eddd character with octal code ddd, or back reference
- \eo{ddd..} character with octal code ddd..
- \exhh character with hex code hh
- \ex{hhh..} character with hex code hhh.. (non-JavaScript mode)
- \euhhhh character with hex code hhhh (JavaScript mode only)
-.sp
-The precise effect of \ecx on ASCII characters is as follows: if x is a lower
-case letter, it is converted to upper case. Then bit 6 of the character (hex
-40) is inverted. Thus \ecA to \ecZ become hex 01 to hex 1A (A is 41, Z is 5A),
-but \ec{ becomes hex 3B ({ is 7B), and \ec; becomes hex 7B (; is 3B). If the
-data item (byte or 16-bit value) following \ec has a value greater than 127, a
-compile-time error occurs. This locks out non-ASCII characters in all modes.
-.P
-When PCRE is compiled in EBCDIC mode, \ea, \ee, \ef, \en, \er, and \et
-generate the appropriate EBCDIC code values. The \ec escape is processed
-as specified for Perl in the \fBperlebcdic\fP document. The only characters
-that are allowed after \ec are A-Z, a-z, or one of @, [, \e, ], ^, _, or ?. Any
-other character provokes a compile-time error. The sequence \ec@ encodes
-character code 0; after \ec the letters (in either case) encode characters 1-26
-(hex 01 to hex 1A); [, \e, ], ^, and _ encode characters 27-31 (hex 1B to hex
-1F), and \ec? becomes either 255 (hex FF) or 95 (hex 5F).
-.P
-Thus, apart from \ec?, these escapes generate the same character code values as
-they do in an ASCII environment, though the meanings of the values mostly
-differ. For example, \ecG always generates code value 7, which is BEL in ASCII
-but DEL in EBCDIC.
-.P
-The sequence \ec? generates DEL (127, hex 7F) in an ASCII environment, but
-because 127 is not a control character in EBCDIC, Perl makes it generate the
-APC character. Unfortunately, there are several variants of EBCDIC. In most of
-them the APC character has the value 255 (hex FF), but in the one Perl calls
-POSIX-BC its value is 95 (hex 5F). If certain other characters have POSIX-BC
-values, PCRE makes \ec? generate 95; otherwise it generates 255.
-.P
-After \e0 up to two further octal digits are read. If there are fewer than two
-digits, just those that are present are used. Thus the sequence \e0\ex\e015
-specifies two binary zeros followed by a CR character (code value 13). Make
-sure you supply two digits after the initial zero if the pattern character that
-follows is itself an octal digit.
-.P
-The escape \eo must be followed by a sequence of octal digits, enclosed in
-braces. An error occurs if this is not the case. This escape is a recent
-addition to Perl; it provides way of specifying character code points as octal
-numbers greater than 0777, and it also allows octal numbers and back references
-to be unambiguously specified.
-.P
-For greater clarity and unambiguity, it is best to avoid following \e by a
-digit greater than zero. Instead, use \eo{} or \ex{} to specify character
-numbers, and \eg{} to specify back references. The following paragraphs
-describe the old, ambiguous syntax.
-.P
-The handling of a backslash followed by a digit other than 0 is complicated,
-and Perl has changed in recent releases, causing PCRE also to change. Outside a
-character class, PCRE reads the digit and any following digits as a decimal
-number. If the number is less than 8, or if there have been at least that many
-previous capturing left parentheses in the expression, the entire sequence is
-taken as a \fIback reference\fP. A description of how this works is given
-.\" HTML <a href="#backreferences">
-.\" </a>
-later,
-.\"
-following the discussion of
-.\" HTML <a href="#subpattern">
-.\" </a>
-parenthesized subpatterns.
-.\"
-.P
-Inside a character class, or if the decimal number following \e is greater than
-7 and there have not been that many capturing subpatterns, PCRE handles \e8 and
-\e9 as the literal characters "8" and "9", and otherwise re-reads up to three
-octal digits following the backslash, using them to generate a data character.
-Any subsequent digits stand for themselves. For example:
-.sp
- \e040 is another way of writing an ASCII space
-.\" JOIN
- \e40 is the same, provided there are fewer than 40
- previous capturing subpatterns
- \e7 is always a back reference
-.\" JOIN
- \e11 might be a back reference, or another way of
- writing a tab
- \e011 is always a tab
- \e0113 is a tab followed by the character "3"
-.\" JOIN
- \e113 might be a back reference, otherwise the
- character with octal code 113
-.\" JOIN
- \e377 might be a back reference, otherwise
- the value 255 (decimal)
-.\" JOIN
- \e81 is either a back reference, or the two
- characters "8" and "1"
-.sp
-Note that octal values of 100 or greater that are specified using this syntax
-must not be introduced by a leading zero, because no more than three octal
-digits are ever read.
-.P
-By default, after \ex that is not followed by {, from zero to two hexadecimal
-digits are read (letters can be in upper or lower case). Any number of
-hexadecimal digits may appear between \ex{ and }. If a character other than
-a hexadecimal digit appears between \ex{ and }, or if there is no terminating
-}, an error occurs.
-.P
-If the PCRE_JAVASCRIPT_COMPAT option is set, the interpretation of \ex is
-as just described only when it is followed by two hexadecimal digits.
-Otherwise, it matches a literal "x" character. In JavaScript mode, support for
-code points greater than 256 is provided by \eu, which must be followed by
-four hexadecimal digits; otherwise it matches a literal "u" character.
-.P
-Characters whose value is less than 256 can be defined by either of the two
-syntaxes for \ex (or by \eu in JavaScript mode). There is no difference in the
-way they are handled. For example, \exdc is exactly the same as \ex{dc} (or
-\eu00dc in JavaScript mode).
-.
-.
-.SS "Constraints on character values"
-.rs
-.sp
-Characters that are specified using octal or hexadecimal numbers are
-limited to certain values, as follows:
-.sp
- 8-bit non-UTF mode less than 0x100
- 8-bit UTF-8 mode less than 0x10ffff and a valid codepoint
- 16-bit non-UTF mode less than 0x10000
- 16-bit UTF-16 mode less than 0x10ffff and a valid codepoint
- 32-bit non-UTF mode less than 0x100000000
- 32-bit UTF-32 mode less than 0x10ffff and a valid codepoint
-.sp
-Invalid Unicode codepoints are the range 0xd800 to 0xdfff (the so-called
-"surrogate" codepoints), and 0xffef.
-.
-.
-.SS "Escape sequences in character classes"
-.rs
-.sp
-All the sequences that define a single character value can be used both inside
-and outside character classes. In addition, inside a character class, \eb is
-interpreted as the backspace character (hex 08).
-.P
-\eN is not allowed in a character class. \eB, \eR, and \eX are not special
-inside a character class. Like other unrecognized escape sequences, they are
-treated as the literal characters "B", "R", and "X" by default, but cause an
-error if the PCRE_EXTRA option is set. Outside a character class, these
-sequences have different meanings.
-.
-.
-.SS "Unsupported escape sequences"
-.rs
-.sp
-In Perl, the sequences \el, \eL, \eu, and \eU are recognized by its string
-handler and used to modify the case of following characters. By default, PCRE
-does not support these escape sequences. However, if the PCRE_JAVASCRIPT_COMPAT
-option is set, \eU matches a "U" character, and \eu can be used to define a
-character by code point, as described in the previous section.
-.
-.
-.SS "Absolute and relative back references"
-.rs
-.sp
-The sequence \eg followed by an unsigned or a negative number, optionally
-enclosed in braces, is an absolute or relative back reference. A named back
-reference can be coded as \eg{name}. Back references are discussed
-.\" HTML <a href="#backreferences">
-.\" </a>
-later,
-.\"
-following the discussion of
-.\" HTML <a href="#subpattern">
-.\" </a>
-parenthesized subpatterns.
-.\"
-.
-.
-.SS "Absolute and relative subroutine calls"
-.rs
-.sp
-For compatibility with Oniguruma, the non-Perl syntax \eg followed by a name or
-a number enclosed either in angle brackets or single quotes, is an alternative
-syntax for referencing a subpattern as a "subroutine". Details are discussed
-.\" HTML <a href="#onigurumasubroutines">
-.\" </a>
-later.
-.\"
-Note that \eg{...} (Perl syntax) and \eg<...> (Oniguruma syntax) are \fInot\fP
-synonymous. The former is a back reference; the latter is a
-.\" HTML <a href="#subpatternsassubroutines">
-.\" </a>
-subroutine
-.\"
-call.
-.
-.
-.\" HTML <a name="genericchartypes"></a>
-.SS "Generic character types"
-.rs
-.sp
-Another use of backslash is for specifying generic character types:
-.sp
- \ed any decimal digit
- \eD any character that is not a decimal digit
- \eh any horizontal white space character
- \eH any character that is not a horizontal white space character
- \es any white space character
- \eS any character that is not a white space character
- \ev any vertical white space character
- \eV any character that is not a vertical white space character
- \ew any "word" character
- \eW any "non-word" character
-.sp
-There is also the single sequence \eN, which matches a non-newline character.
-This is the same as
-.\" HTML <a href="#fullstopdot">
-.\" </a>
-the "." metacharacter
-.\"
-when PCRE_DOTALL is not set. Perl also uses \eN to match characters by name;
-PCRE does not support this.
-.P
-Each pair of lower and upper case escape sequences partitions the complete set
-of characters into two disjoint sets. Any given character matches one, and only
-one, of each pair. The sequences can appear both inside and outside character
-classes. They each match one character of the appropriate type. If the current
-matching point is at the end of the subject string, all of them fail, because
-there is no character to match.
-.P
-For compatibility with Perl, \es did not used to match the VT character (code
-11), which made it different from the the POSIX "space" class. However, Perl
-added VT at release 5.18, and PCRE followed suit at release 8.34. The default
-\es characters are now HT (9), LF (10), VT (11), FF (12), CR (13), and space
-(32), which are defined as white space in the "C" locale. This list may vary if
-locale-specific matching is taking place. For example, in some locales the
-"non-breaking space" character (\exA0) is recognized as white space, and in
-others the VT character is not.
-.P
-A "word" character is an underscore or any character that is a letter or digit.
-By default, the definition of letters and digits is controlled by PCRE's
-low-valued character tables, and may vary if locale-specific matching is taking
-place (see
-.\" HTML <a href="pcreapi.html#localesupport">
-.\" </a>
-"Locale support"
-.\"
-in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page). For example, in a French locale such as "fr_FR" in Unix-like systems,
-or "french" in Windows, some character codes greater than 127 are used for
-accented letters, and these are then matched by \ew. The use of locales with
-Unicode is discouraged.
-.P
-By default, characters whose code points are greater than 127 never match \ed,
-\es, or \ew, and always match \eD, \eS, and \eW, although this may vary for
-characters in the range 128-255 when locale-specific matching is happening.
-These escape sequences retain their original meanings from before Unicode
-support was available, mainly for efficiency reasons. If PCRE is compiled with
-Unicode property support, and the PCRE_UCP option is set, the behaviour is
-changed so that Unicode properties are used to determine character types, as
-follows:
-.sp
- \ed any character that matches \ep{Nd} (decimal digit)
- \es any character that matches \ep{Z} or \eh or \ev
- \ew any character that matches \ep{L} or \ep{N}, plus underscore
-.sp
-The upper case escapes match the inverse sets of characters. Note that \ed
-matches only decimal digits, whereas \ew matches any Unicode digit, as well as
-any Unicode letter, and underscore. Note also that PCRE_UCP affects \eb, and
-\eB because they are defined in terms of \ew and \eW. Matching these sequences
-is noticeably slower when PCRE_UCP is set.
-.P
-The sequences \eh, \eH, \ev, and \eV are features that were added to Perl at
-release 5.10. In contrast to the other sequences, which match only ASCII
-characters by default, these always match certain high-valued code points,
-whether or not PCRE_UCP is set. The horizontal space characters are:
-.sp
- U+0009 Horizontal tab (HT)
- U+0020 Space
- U+00A0 Non-break space
- U+1680 Ogham space mark
- U+180E Mongolian vowel separator
- U+2000 En quad
- U+2001 Em quad
- U+2002 En space
- U+2003 Em space
- U+2004 Three-per-em space
- U+2005 Four-per-em space
- U+2006 Six-per-em space
- U+2007 Figure space
- U+2008 Punctuation space
- U+2009 Thin space
- U+200A Hair space
- U+202F Narrow no-break space
- U+205F Medium mathematical space
- U+3000 Ideographic space
-.sp
-The vertical space characters are:
-.sp
- U+000A Linefeed (LF)
- U+000B Vertical tab (VT)
- U+000C Form feed (FF)
- U+000D Carriage return (CR)
- U+0085 Next line (NEL)
- U+2028 Line separator
- U+2029 Paragraph separator
-.sp
-In 8-bit, non-UTF-8 mode, only the characters with codepoints less than 256 are
-relevant.
-.
-.
-.\" HTML <a name="newlineseq"></a>
-.SS "Newline sequences"
-.rs
-.sp
-Outside a character class, by default, the escape sequence \eR matches any
-Unicode newline sequence. In 8-bit non-UTF-8 mode \eR is equivalent to the
-following:
-.sp
- (?>\er\en|\en|\ex0b|\ef|\er|\ex85)
-.sp
-This is an example of an "atomic group", details of which are given
-.\" HTML <a href="#atomicgroup">
-.\" </a>
-below.
-.\"
-This particular group matches either the two-character sequence CR followed by
-LF, or one of the single characters LF (linefeed, U+000A), VT (vertical tab,
-U+000B), FF (form feed, U+000C), CR (carriage return, U+000D), or NEL (next
-line, U+0085). The two-character sequence is treated as a single unit that
-cannot be split.
-.P
-In other modes, two additional characters whose codepoints are greater than 255
-are added: LS (line separator, U+2028) and PS (paragraph separator, U+2029).
-Unicode character property support is not needed for these characters to be
-recognized.
-.P
-It is possible to restrict \eR to match only CR, LF, or CRLF (instead of the
-complete set of Unicode line endings) by setting the option PCRE_BSR_ANYCRLF
-either at compile time or when the pattern is matched. (BSR is an abbrevation
-for "backslash R".) This can be made the default when PCRE is built; if this is
-the case, the other behaviour can be requested via the PCRE_BSR_UNICODE option.
-It is also possible to specify these settings by starting a pattern string with
-one of the following sequences:
-.sp
- (*BSR_ANYCRLF) CR, LF, or CRLF only
- (*BSR_UNICODE) any Unicode newline sequence
-.sp
-These override the default and the options given to the compiling function, but
-they can themselves be overridden by options given to a matching function. Note
-that these special settings, which are not Perl-compatible, are recognized only
-at the very start of a pattern, and that they must be in upper case. If more
-than one of them is present, the last one is used. They can be combined with a
-change of newline convention; for example, a pattern can start with:
-.sp
- (*ANY)(*BSR_ANYCRLF)
-.sp
-They can also be combined with the (*UTF8), (*UTF16), (*UTF32), (*UTF) or
-(*UCP) special sequences. Inside a character class, \eR is treated as an
-unrecognized escape sequence, and so matches the letter "R" by default, but
-causes an error if PCRE_EXTRA is set.
-.
-.
-.\" HTML <a name="uniextseq"></a>
-.SS Unicode character properties
-.rs
-.sp
-When PCRE is built with Unicode character property support, three additional
-escape sequences that match characters with specific properties are available.
-When in 8-bit non-UTF-8 mode, these sequences are of course limited to testing
-characters whose codepoints are less than 256, but they do work in this mode.
-The extra escape sequences are:
-.sp
- \ep{\fIxx\fP} a character with the \fIxx\fP property
- \eP{\fIxx\fP} a character without the \fIxx\fP property
- \eX a Unicode extended grapheme cluster
-.sp
-The property names represented by \fIxx\fP above are limited to the Unicode
-script names, the general category properties, "Any", which matches any
-character (including newline), and some special PCRE properties (described
-in the
-.\" HTML <a href="#extraprops">
-.\" </a>
-next section).
-.\"
-Other Perl properties such as "InMusicalSymbols" are not currently supported by
-PCRE. Note that \eP{Any} does not match any characters, so always causes a
-match failure.
-.P
-Sets of Unicode characters are defined as belonging to certain scripts. A
-character from one of these sets can be matched using a script name. For
-example:
-.sp
- \ep{Greek}
- \eP{Han}
-.sp
-Those that are not part of an identified script are lumped together as
-"Common". The current list of scripts is:
-.P
-Arabic,
-Armenian,
-Avestan,
-Balinese,
-Bamum,
-Bassa_Vah,
-Batak,
-Bengali,
-Bopomofo,
-Brahmi,
-Braille,
-Buginese,
-Buhid,
-Canadian_Aboriginal,
-Carian,
-Caucasian_Albanian,
-Chakma,
-Cham,
-Cherokee,
-Common,
-Coptic,
-Cuneiform,
-Cypriot,
-Cyrillic,
-Deseret,
-Devanagari,
-Duployan,
-Egyptian_Hieroglyphs,
-Elbasan,
-Ethiopic,
-Georgian,
-Glagolitic,
-Gothic,
-Grantha,
-Greek,
-Gujarati,
-Gurmukhi,
-Han,
-Hangul,
-Hanunoo,
-Hebrew,
-Hiragana,
-Imperial_Aramaic,
-Inherited,
-Inscriptional_Pahlavi,
-Inscriptional_Parthian,
-Javanese,
-Kaithi,
-Kannada,
-Katakana,
-Kayah_Li,
-Kharoshthi,
-Khmer,
-Khojki,
-Khudawadi,
-Lao,
-Latin,
-Lepcha,
-Limbu,
-Linear_A,
-Linear_B,
-Lisu,
-Lycian,
-Lydian,
-Mahajani,
-Malayalam,
-Mandaic,
-Manichaean,
-Meetei_Mayek,
-Mende_Kikakui,
-Meroitic_Cursive,
-Meroitic_Hieroglyphs,
-Miao,
-Modi,
-Mongolian,
-Mro,
-Myanmar,
-Nabataean,
-New_Tai_Lue,
-Nko,
-Ogham,
-Ol_Chiki,
-Old_Italic,
-Old_North_Arabian,
-Old_Permic,
-Old_Persian,
-Old_South_Arabian,
-Old_Turkic,
-Oriya,
-Osmanya,
-Pahawh_Hmong,
-Palmyrene,
-Pau_Cin_Hau,
-Phags_Pa,
-Phoenician,
-Psalter_Pahlavi,
-Rejang,
-Runic,
-Samaritan,
-Saurashtra,
-Sharada,
-Shavian,
-Siddham,
-Sinhala,
-Sora_Sompeng,
-Sundanese,
-Syloti_Nagri,
-Syriac,
-Tagalog,
-Tagbanwa,
-Tai_Le,
-Tai_Tham,
-Tai_Viet,
-Takri,
-Tamil,
-Telugu,
-Thaana,
-Thai,
-Tibetan,
-Tifinagh,
-Tirhuta,
-Ugaritic,
-Vai,
-Warang_Citi,
-Yi.
-.P
-Each character has exactly one Unicode general category property, specified by
-a two-letter abbreviation. For compatibility with Perl, negation can be
-specified by including a circumflex between the opening brace and the property
-name. For example, \ep{^Lu} is the same as \eP{Lu}.
-.P
-If only one letter is specified with \ep or \eP, it includes all the general
-category properties that start with that letter. In this case, in the absence
-of negation, the curly brackets in the escape sequence are optional; these two
-examples have the same effect:
-.sp
- \ep{L}
- \epL
-.sp
-The following general category property codes are supported:
-.sp
- C Other
- Cc Control
- Cf Format
- Cn Unassigned
- Co Private use
- Cs Surrogate
-.sp
- L Letter
- Ll Lower case letter
- Lm Modifier letter
- Lo Other letter
- Lt Title case letter
- Lu Upper case letter
-.sp
- M Mark
- Mc Spacing mark
- Me Enclosing mark
- Mn Non-spacing mark
-.sp
- N Number
- Nd Decimal number
- Nl Letter number
- No Other number
-.sp
- P Punctuation
- Pc Connector punctuation
- Pd Dash punctuation
- Pe Close punctuation
- Pf Final punctuation
- Pi Initial punctuation
- Po Other punctuation
- Ps Open punctuation
-.sp
- S Symbol
- Sc Currency symbol
- Sk Modifier symbol
- Sm Mathematical symbol
- So Other symbol
-.sp
- Z Separator
- Zl Line separator
- Zp Paragraph separator
- Zs Space separator
-.sp
-The special property L& is also supported: it matches a character that has
-the Lu, Ll, or Lt property, in other words, a letter that is not classified as
-a modifier or "other".
-.P
-The Cs (Surrogate) property applies only to characters in the range U+D800 to
-U+DFFF. Such characters are not valid in Unicode strings and so
-cannot be tested by PCRE, unless UTF validity checking has been turned off
-(see the discussion of PCRE_NO_UTF8_CHECK, PCRE_NO_UTF16_CHECK and
-PCRE_NO_UTF32_CHECK in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page). Perl does not support the Cs property.
-.P
-The long synonyms for property names that Perl supports (such as \ep{Letter})
-are not supported by PCRE, nor is it permitted to prefix any of these
-properties with "Is".
-.P
-No character that is in the Unicode table has the Cn (unassigned) property.
-Instead, this property is assumed for any code point that is not in the
-Unicode table.
-.P
-Specifying caseless matching does not affect these escape sequences. For
-example, \ep{Lu} always matches only upper case letters. This is different from
-the behaviour of current versions of Perl.
-.P
-Matching characters by Unicode property is not fast, because PCRE has to do a
-multistage table lookup in order to find a character's property. That is why
-the traditional escape sequences such as \ed and \ew do not use Unicode
-properties in PCRE by default, though you can make them do so by setting the
-PCRE_UCP option or by starting the pattern with (*UCP).
-.
-.
-.SS Extended grapheme clusters
-.rs
-.sp
-The \eX escape matches any number of Unicode characters that form an "extended
-grapheme cluster", and treats the sequence as an atomic group
-.\" HTML <a href="#atomicgroup">
-.\" </a>
-(see below).
-.\"
-Up to and including release 8.31, PCRE matched an earlier, simpler definition
-that was equivalent to
-.sp
- (?>\ePM\epM*)
-.sp
-That is, it matched a character without the "mark" property, followed by zero
-or more characters with the "mark" property. Characters with the "mark"
-property are typically non-spacing accents that affect the preceding character.
-.P
-This simple definition was extended in Unicode to include more complicated
-kinds of composite character by giving each character a grapheme breaking
-property, and creating rules that use these properties to define the boundaries
-of extended grapheme clusters. In releases of PCRE later than 8.31, \eX matches
-one of these clusters.
-.P
-\eX always matches at least one character. Then it decides whether to add
-additional characters according to the following rules for ending a cluster:
-.P
-1. End at the end of the subject string.
-.P
-2. Do not end between CR and LF; otherwise end after any control character.
-.P
-3. Do not break Hangul (a Korean script) syllable sequences. Hangul characters
-are of five types: L, V, T, LV, and LVT. An L character may be followed by an
-L, V, LV, or LVT character; an LV or V character may be followed by a V or T
-character; an LVT or T character may be follwed only by a T character.
-.P
-4. Do not end before extending characters or spacing marks. Characters with
-the "mark" property always have the "extend" grapheme breaking property.
-.P
-5. Do not end after prepend characters.
-.P
-6. Otherwise, end the cluster.
-.
-.
-.\" HTML <a name="extraprops"></a>
-.SS PCRE's additional properties
-.rs
-.sp
-As well as the standard Unicode properties described above, PCRE supports four
-more that make it possible to convert traditional escape sequences such as \ew
-and \es to use Unicode properties. PCRE uses these non-standard, non-Perl
-properties internally when PCRE_UCP is set. However, they may also be used
-explicitly. These properties are:
-.sp
- Xan Any alphanumeric character
- Xps Any POSIX space character
- Xsp Any Perl space character
- Xwd Any Perl "word" character
-.sp
-Xan matches characters that have either the L (letter) or the N (number)
-property. Xps matches the characters tab, linefeed, vertical tab, form feed, or
-carriage return, and any other character that has the Z (separator) property.
-Xsp is the same as Xps; it used to exclude vertical tab, for Perl
-compatibility, but Perl changed, and so PCRE followed at release 8.34. Xwd
-matches the same characters as Xan, plus underscore.
-.P
-There is another non-standard property, Xuc, which matches any character that
-can be represented by a Universal Character Name in C++ and other programming
-languages. These are the characters $, @, ` (grave accent), and all characters
-with Unicode code points greater than or equal to U+00A0, except for the
-surrogates U+D800 to U+DFFF. Note that most base (ASCII) characters are
-excluded. (Universal Character Names are of the form \euHHHH or \eUHHHHHHHH
-where H is a hexadecimal digit. Note that the Xuc property does not match these
-sequences but the characters that they represent.)
-.
-.
-.\" HTML <a name="resetmatchstart"></a>
-.SS "Resetting the match start"
-.rs
-.sp
-The escape sequence \eK causes any previously matched characters not to be
-included in the final matched sequence. For example, the pattern:
-.sp
- foo\eKbar
-.sp
-matches "foobar", but reports that it has matched "bar". This feature is
-similar to a lookbehind assertion
-.\" HTML <a href="#lookbehind">
-.\" </a>
-(described below).
-.\"
-However, in this case, the part of the subject before the real match does not
-have to be of fixed length, as lookbehind assertions do. The use of \eK does
-not interfere with the setting of
-.\" HTML <a href="#subpattern">
-.\" </a>
-captured substrings.
-.\"
-For example, when the pattern
-.sp
- (foo)\eKbar
-.sp
-matches "foobar", the first substring is still set to "foo".
-.P
-Perl documents that the use of \eK within assertions is "not well defined". In
-PCRE, \eK is acted upon when it occurs inside positive assertions, but is
-ignored in negative assertions. Note that when a pattern such as (?=ab\eK)
-matches, the reported start of the match can be greater than the end of the
-match.
-.
-.
-.\" HTML <a name="smallassertions"></a>
-.SS "Simple assertions"
-.rs
-.sp
-The final use of backslash is for certain simple assertions. An assertion
-specifies a condition that has to be met at a particular point in a match,
-without consuming any characters from the subject string. The use of
-subpatterns for more complicated assertions is described
-.\" HTML <a href="#bigassertions">
-.\" </a>
-below.
-.\"
-The backslashed assertions are:
-.sp
- \eb matches at a word boundary
- \eB matches when not at a word boundary
- \eA matches at the start of the subject
- \eZ matches at the end of the subject
- also matches before a newline at the end of the subject
- \ez matches only at the end of the subject
- \eG matches at the first matching position in the subject
-.sp
-Inside a character class, \eb has a different meaning; it matches the backspace
-character. If any other of these assertions appears in a character class, by
-default it matches the corresponding literal character (for example, \eB
-matches the letter B). However, if the PCRE_EXTRA option is set, an "invalid
-escape sequence" error is generated instead.
-.P
-A word boundary is a position in the subject string where the current character
-and the previous character do not both match \ew or \eW (i.e. one matches
-\ew and the other matches \eW), or the start or end of the string if the
-first or last character matches \ew, respectively. In a UTF mode, the meanings
-of \ew and \eW can be changed by setting the PCRE_UCP option. When this is
-done, it also affects \eb and \eB. Neither PCRE nor Perl has a separate "start
-of word" or "end of word" metasequence. However, whatever follows \eb normally
-determines which it is. For example, the fragment \eba matches "a" at the start
-of a word.
-.P
-The \eA, \eZ, and \ez assertions differ from the traditional circumflex and
-dollar (described in the next section) in that they only ever match at the very
-start and end of the subject string, whatever options are set. Thus, they are
-independent of multiline mode. These three assertions are not affected by the
-PCRE_NOTBOL or PCRE_NOTEOL options, which affect only the behaviour of the
-circumflex and dollar metacharacters. However, if the \fIstartoffset\fP
-argument of \fBpcre_exec()\fP is non-zero, indicating that matching is to start
-at a point other than the beginning of the subject, \eA can never match. The
-difference between \eZ and \ez is that \eZ matches before a newline at the end
-of the string as well as at the very end, whereas \ez matches only at the end.
-.P
-The \eG assertion is true only when the current matching position is at the
-start point of the match, as specified by the \fIstartoffset\fP argument of
-\fBpcre_exec()\fP. It differs from \eA when the value of \fIstartoffset\fP is
-non-zero. By calling \fBpcre_exec()\fP multiple times with appropriate
-arguments, you can mimic Perl's /g option, and it is in this kind of
-implementation where \eG can be useful.
-.P
-Note, however, that PCRE's interpretation of \eG, as the start of the current
-match, is subtly different from Perl's, which defines it as the end of the
-previous match. In Perl, these can be different when the previously matched
-string was empty. Because PCRE does just one match at a time, it cannot
-reproduce this behaviour.
-.P
-If all the alternatives of a pattern begin with \eG, the expression is anchored
-to the starting match position, and the "anchored" flag is set in the compiled
-regular expression.
-.
-.
-.SH "CIRCUMFLEX AND DOLLAR"
-.rs
-.sp
-The circumflex and dollar metacharacters are zero-width assertions. That is,
-they test for a particular condition being true without consuming any
-characters from the subject string.
-.P
-Outside a character class, in the default matching mode, the circumflex
-character is an assertion that is true only if the current matching point is at
-the start of the subject string. If the \fIstartoffset\fP argument of
-\fBpcre_exec()\fP is non-zero, circumflex can never match if the PCRE_MULTILINE
-option is unset. Inside a character class, circumflex has an entirely different
-meaning
-.\" HTML <a href="#characterclass">
-.\" </a>
-(see below).
-.\"
-.P
-Circumflex need not be the first character of the pattern if a number of
-alternatives are involved, but it should be the first thing in each alternative
-in which it appears if the pattern is ever to match that branch. If all
-possible alternatives start with a circumflex, that is, if the pattern is
-constrained to match only at the start of the subject, it is said to be an
-"anchored" pattern. (There are also other constructs that can cause a pattern
-to be anchored.)
-.P
-The dollar character is an assertion that is true only if the current matching
-point is at the end of the subject string, or immediately before a newline at
-the end of the string (by default). Note, however, that it does not actually
-match the newline. Dollar need not be the last character of the pattern if a
-number of alternatives are involved, but it should be the last item in any
-branch in which it appears. Dollar has no special meaning in a character class.
-.P
-The meaning of dollar can be changed so that it matches only at the very end of
-the string, by setting the PCRE_DOLLAR_ENDONLY option at compile time. This
-does not affect the \eZ assertion.
-.P
-The meanings of the circumflex and dollar characters are changed if the
-PCRE_MULTILINE option is set. When this is the case, a circumflex matches
-immediately after internal newlines as well as at the start of the subject
-string. It does not match after a newline that ends the string. A dollar
-matches before any newlines in the string, as well as at the very end, when
-PCRE_MULTILINE is set. When newline is specified as the two-character
-sequence CRLF, isolated CR and LF characters do not indicate newlines.
-.P
-For example, the pattern /^abc$/ matches the subject string "def\enabc" (where
-\en represents a newline) in multiline mode, but not otherwise. Consequently,
-patterns that are anchored in single line mode because all branches start with
-^ are not anchored in multiline mode, and a match for circumflex is possible
-when the \fIstartoffset\fP argument of \fBpcre_exec()\fP is non-zero. The
-PCRE_DOLLAR_ENDONLY option is ignored if PCRE_MULTILINE is set.
-.P
-Note that the sequences \eA, \eZ, and \ez can be used to match the start and
-end of the subject in both modes, and if all branches of a pattern start with
-\eA it is always anchored, whether or not PCRE_MULTILINE is set.
-.
-.
-.\" HTML <a name="fullstopdot"></a>
-.SH "FULL STOP (PERIOD, DOT) AND \eN"
-.rs
-.sp
-Outside a character class, a dot in the pattern matches any one character in
-the subject string except (by default) a character that signifies the end of a
-line.
-.P
-When a line ending is defined as a single character, dot never matches that
-character; when the two-character sequence CRLF is used, dot does not match CR
-if it is immediately followed by LF, but otherwise it matches all characters
-(including isolated CRs and LFs). When any Unicode line endings are being
-recognized, dot does not match CR or LF or any of the other line ending
-characters.
-.P
-The behaviour of dot with regard to newlines can be changed. If the PCRE_DOTALL
-option is set, a dot matches any one character, without exception. If the
-two-character sequence CRLF is present in the subject string, it takes two dots
-to match it.
-.P
-The handling of dot is entirely independent of the handling of circumflex and
-dollar, the only relationship being that they both involve newlines. Dot has no
-special meaning in a character class.
-.P
-The escape sequence \eN behaves like a dot, except that it is not affected by
-the PCRE_DOTALL option. In other words, it matches any character except one
-that signifies the end of a line. Perl also uses \eN to match characters by
-name; PCRE does not support this.
-.
-.
-.SH "MATCHING A SINGLE DATA UNIT"
-.rs
-.sp
-Outside a character class, the escape sequence \eC matches any one data unit,
-whether or not a UTF mode is set. In the 8-bit library, one data unit is one
-byte; in the 16-bit library it is a 16-bit unit; in the 32-bit library it is
-a 32-bit unit. Unlike a dot, \eC always
-matches line-ending characters. The feature is provided in Perl in order to
-match individual bytes in UTF-8 mode, but it is unclear how it can usefully be
-used. Because \eC breaks up characters into individual data units, matching one
-unit with \eC in a UTF mode means that the rest of the string may start with a
-malformed UTF character. This has undefined results, because PCRE assumes that
-it is dealing with valid UTF strings (and by default it checks this at the
-start of processing unless the PCRE_NO_UTF8_CHECK, PCRE_NO_UTF16_CHECK or
-PCRE_NO_UTF32_CHECK option is used).
-.P
-PCRE does not allow \eC to appear in lookbehind assertions
-.\" HTML <a href="#lookbehind">
-.\" </a>
-(described below)
-.\"
-in a UTF mode, because this would make it impossible to calculate the length of
-the lookbehind.
-.P
-In general, the \eC escape sequence is best avoided. However, one
-way of using it that avoids the problem of malformed UTF characters is to use a
-lookahead to check the length of the next character, as in this pattern, which
-could be used with a UTF-8 string (ignore white space and line breaks):
-.sp
- (?| (?=[\ex00-\ex7f])(\eC) |
- (?=[\ex80-\ex{7ff}])(\eC)(\eC) |
- (?=[\ex{800}-\ex{ffff}])(\eC)(\eC)(\eC) |
- (?=[\ex{10000}-\ex{1fffff}])(\eC)(\eC)(\eC)(\eC))
-.sp
-A group that starts with (?| resets the capturing parentheses numbers in each
-alternative (see
-.\" HTML <a href="#dupsubpatternnumber">
-.\" </a>
-"Duplicate Subpattern Numbers"
-.\"
-below). The assertions at the start of each branch check the next UTF-8
-character for values whose encoding uses 1, 2, 3, or 4 bytes, respectively. The
-character's individual bytes are then captured by the appropriate number of
-groups.
-.
-.
-.\" HTML <a name="characterclass"></a>
-.SH "SQUARE BRACKETS AND CHARACTER CLASSES"
-.rs
-.sp
-An opening square bracket introduces a character class, terminated by a closing
-square bracket. A closing square bracket on its own is not special by default.
-However, if the PCRE_JAVASCRIPT_COMPAT option is set, a lone closing square
-bracket causes a compile-time error. If a closing square bracket is required as
-a member of the class, it should be the first data character in the class
-(after an initial circumflex, if present) or escaped with a backslash.
-.P
-A character class matches a single character in the subject. In a UTF mode, the
-character may be more than one data unit long. A matched character must be in
-the set of characters defined by the class, unless the first character in the
-class definition is a circumflex, in which case the subject character must not
-be in the set defined by the class. If a circumflex is actually required as a
-member of the class, ensure it is not the first character, or escape it with a
-backslash.
-.P
-For example, the character class [aeiou] matches any lower case vowel, while
-[^aeiou] matches any character that is not a lower case vowel. Note that a
-circumflex is just a convenient notation for specifying the characters that
-are in the class by enumerating those that are not. A class that starts with a
-circumflex is not an assertion; it still consumes a character from the subject
-string, and therefore it fails if the current pointer is at the end of the
-string.
-.P
-In UTF-8 (UTF-16, UTF-32) mode, characters with values greater than 255 (0xffff)
-can be included in a class as a literal string of data units, or by using the
-\ex{ escaping mechanism.
-.P
-When caseless matching is set, any letters in a class represent both their
-upper case and lower case versions, so for example, a caseless [aeiou] matches
-"A" as well as "a", and a caseless [^aeiou] does not match "A", whereas a
-caseful version would. In a UTF mode, PCRE always understands the concept of
-case for characters whose values are less than 128, so caseless matching is
-always possible. For characters with higher values, the concept of case is
-supported if PCRE is compiled with Unicode property support, but not otherwise.
-If you want to use caseless matching in a UTF mode for characters 128 and
-above, you must ensure that PCRE is compiled with Unicode property support as
-well as with UTF support.
-.P
-Characters that might indicate line breaks are never treated in any special way
-when matching character classes, whatever line-ending sequence is in use, and
-whatever setting of the PCRE_DOTALL and PCRE_MULTILINE options is used. A class
-such as [^a] always matches one of these characters.
-.P
-The minus (hyphen) character can be used to specify a range of characters in a
-character class. For example, [d-m] matches any letter between d and m,
-inclusive. If a minus character is required in a class, it must be escaped with
-a backslash or appear in a position where it cannot be interpreted as
-indicating a range, typically as the first or last character in the class, or
-immediately after a range. For example, [b-d-z] matches letters in the range b
-to d, a hyphen character, or z.
-.P
-It is not possible to have the literal character "]" as the end character of a
-range. A pattern such as [W-]46] is interpreted as a class of two characters
-("W" and "-") followed by a literal string "46]", so it would match "W46]" or
-"-46]". However, if the "]" is escaped with a backslash it is interpreted as
-the end of range, so [W-\e]46] is interpreted as a class containing a range
-followed by two other characters. The octal or hexadecimal representation of
-"]" can also be used to end a range.
-.P
-An error is generated if a POSIX character class (see below) or an escape
-sequence other than one that defines a single character appears at a point
-where a range ending character is expected. For example, [z-\exff] is valid,
-but [A-\ed] and [A-[:digit:]] are not.
-.P
-Ranges operate in the collating sequence of character values. They can also be
-used for characters specified numerically, for example [\e000-\e037]. Ranges
-can include any characters that are valid for the current mode.
-.P
-If a range that includes letters is used when caseless matching is set, it
-matches the letters in either case. For example, [W-c] is equivalent to
-[][\e\e^_`wxyzabc], matched caselessly, and in a non-UTF mode, if character
-tables for a French locale are in use, [\exc8-\excb] matches accented E
-characters in both cases. In UTF modes, PCRE supports the concept of case for
-characters with values greater than 128 only when it is compiled with Unicode
-property support.
-.P
-The character escape sequences \ed, \eD, \eh, \eH, \ep, \eP, \es, \eS, \ev,
-\eV, \ew, and \eW may appear in a character class, and add the characters that
-they match to the class. For example, [\edABCDEF] matches any hexadecimal
-digit. In UTF modes, the PCRE_UCP option affects the meanings of \ed, \es, \ew
-and their upper case partners, just as it does when they appear outside a
-character class, as described in the section entitled
-.\" HTML <a href="#genericchartypes">
-.\" </a>
-"Generic character types"
-.\"
-above. The escape sequence \eb has a different meaning inside a character
-class; it matches the backspace character. The sequences \eB, \eN, \eR, and \eX
-are not special inside a character class. Like any other unrecognized escape
-sequences, they are treated as the literal characters "B", "N", "R", and "X" by
-default, but cause an error if the PCRE_EXTRA option is set.
-.P
-A circumflex can conveniently be used with the upper case character types to
-specify a more restricted set of characters than the matching lower case type.
-For example, the class [^\eW_] matches any letter or digit, but not underscore,
-whereas [\ew] includes underscore. A positive character class should be read as
-"something OR something OR ..." and a negative class as "NOT something AND NOT
-something AND NOT ...".
-.P
-The only metacharacters that are recognized in character classes are backslash,
-hyphen (only where it can be interpreted as specifying a range), circumflex
-(only at the start), opening square bracket (only when it can be interpreted as
-introducing a POSIX class name, or for a special compatibility feature - see
-the next two sections), and the terminating closing square bracket. However,
-escaping other non-alphanumeric characters does no harm.
-.
-.
-.SH "POSIX CHARACTER CLASSES"
-.rs
-.sp
-Perl supports the POSIX notation for character classes. This uses names
-enclosed by [: and :] within the enclosing square brackets. PCRE also supports
-this notation. For example,
-.sp
- [01[:alpha:]%]
-.sp
-matches "0", "1", any alphabetic character, or "%". The supported class names
-are:
-.sp
- alnum letters and digits
- alpha letters
- ascii character codes 0 - 127
- blank space or tab only
- cntrl control characters
- digit decimal digits (same as \ed)
- graph printing characters, excluding space
- lower lower case letters
- print printing characters, including space
- punct printing characters, excluding letters and digits and space
- space white space (the same as \es from PCRE 8.34)
- upper upper case letters
- word "word" characters (same as \ew)
- xdigit hexadecimal digits
-.sp
-The default "space" characters are HT (9), LF (10), VT (11), FF (12), CR (13),
-and space (32). If locale-specific matching is taking place, the list of space
-characters may be different; there may be fewer or more of them. "Space" used
-to be different to \es, which did not include VT, for Perl compatibility.
-However, Perl changed at release 5.18, and PCRE followed at release 8.34.
-"Space" and \es now match the same set of characters.
-.P
-The name "word" is a Perl extension, and "blank" is a GNU extension from Perl
-5.8. Another Perl extension is negation, which is indicated by a ^ character
-after the colon. For example,
-.sp
- [12[:^digit:]]
-.sp
-matches "1", "2", or any non-digit. PCRE (and Perl) also recognize the POSIX
-syntax [.ch.] and [=ch=] where "ch" is a "collating element", but these are not
-supported, and an error is given if they are encountered.
-.P
-By default, characters with values greater than 128 do not match any of the
-POSIX character classes. However, if the PCRE_UCP option is passed to
-\fBpcre_compile()\fP, some of the classes are changed so that Unicode character
-properties are used. This is achieved by replacing certain POSIX classes by
-other sequences, as follows:
-.sp
- [:alnum:] becomes \ep{Xan}
- [:alpha:] becomes \ep{L}
- [:blank:] becomes \eh
- [:digit:] becomes \ep{Nd}
- [:lower:] becomes \ep{Ll}
- [:space:] becomes \ep{Xps}
- [:upper:] becomes \ep{Lu}
- [:word:] becomes \ep{Xwd}
-.sp
-Negated versions, such as [:^alpha:] use \eP instead of \ep. Three other POSIX
-classes are handled specially in UCP mode:
-.TP 10
-[:graph:]
-This matches characters that have glyphs that mark the page when printed. In
-Unicode property terms, it matches all characters with the L, M, N, P, S, or Cf
-properties, except for:
-.sp
- U+061C Arabic Letter Mark
- U+180E Mongolian Vowel Separator
- U+2066 - U+2069 Various "isolate"s
-.sp
-.TP 10
-[:print:]
-This matches the same characters as [:graph:] plus space characters that are
-not controls, that is, characters with the Zs property.
-.TP 10
-[:punct:]
-This matches all characters that have the Unicode P (punctuation) property,
-plus those characters whose code points are less than 128 that have the S
-(Symbol) property.
-.P
-The other POSIX classes are unchanged, and match only characters with code
-points less than 128.
-.
-.
-.SH "COMPATIBILITY FEATURE FOR WORD BOUNDARIES"
-.rs
-.sp
-In the POSIX.2 compliant library that was included in 4.4BSD Unix, the ugly
-syntax [[:<:]] and [[:>:]] is used for matching "start of word" and "end of
-word". PCRE treats these items as follows:
-.sp
- [[:<:]] is converted to \eb(?=\ew)
- [[:>:]] is converted to \eb(?<=\ew)
-.sp
-Only these exact character sequences are recognized. A sequence such as
-[a[:<:]b] provokes error for an unrecognized POSIX class name. This support is
-not compatible with Perl. It is provided to help migrations from other
-environments, and is best not used in any new patterns. Note that \eb matches
-at the start and the end of a word (see
-.\" HTML <a href="#smallassertions">
-.\" </a>
-"Simple assertions"
-.\"
-above), and in a Perl-style pattern the preceding or following character
-normally shows which is wanted, without the need for the assertions that are
-used above in order to give exactly the POSIX behaviour.
-.
-.
-.SH "VERTICAL BAR"
-.rs
-.sp
-Vertical bar characters are used to separate alternative patterns. For example,
-the pattern
-.sp
- gilbert|sullivan
-.sp
-matches either "gilbert" or "sullivan". Any number of alternatives may appear,
-and an empty alternative is permitted (matching the empty string). The matching
-process tries each alternative in turn, from left to right, and the first one
-that succeeds is used. If the alternatives are within a subpattern
-.\" HTML <a href="#subpattern">
-.\" </a>
-(defined below),
-.\"
-"succeeds" means matching the rest of the main pattern as well as the
-alternative in the subpattern.
-.
-.
-.SH "INTERNAL OPTION SETTING"
-.rs
-.sp
-The settings of the PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL, and
-PCRE_EXTENDED options (which are Perl-compatible) can be changed from within
-the pattern by a sequence of Perl option letters enclosed between "(?" and ")".
-The option letters are
-.sp
- i for PCRE_CASELESS
- m for PCRE_MULTILINE
- s for PCRE_DOTALL
- x for PCRE_EXTENDED
-.sp
-For example, (?im) sets caseless, multiline matching. It is also possible to
-unset these options by preceding the letter with a hyphen, and a combined
-setting and unsetting such as (?im-sx), which sets PCRE_CASELESS and
-PCRE_MULTILINE while unsetting PCRE_DOTALL and PCRE_EXTENDED, is also
-permitted. If a letter appears both before and after the hyphen, the option is
-unset.
-.P
-The PCRE-specific options PCRE_DUPNAMES, PCRE_UNGREEDY, and PCRE_EXTRA can be
-changed in the same way as the Perl-compatible options by using the characters
-J, U and X respectively.
-.P
-When one of these option changes occurs at top level (that is, not inside
-subpattern parentheses), the change applies to the remainder of the pattern
-that follows. An option change within a subpattern (see below for a description
-of subpatterns) affects only that part of the subpattern that follows it, so
-.sp
- (a(?i)b)c
-.sp
-matches abc and aBc and no other strings (assuming PCRE_CASELESS is not used).
-By this means, options can be made to have different settings in different
-parts of the pattern. Any changes made in one alternative do carry on
-into subsequent branches within the same subpattern. For example,
-.sp
- (a(?i)b|c)
-.sp
-matches "ab", "aB", "c", and "C", even though when matching "C" the first
-branch is abandoned before the option setting. This is because the effects of
-option settings happen at compile time. There would be some very weird
-behaviour otherwise.
-.P
-\fBNote:\fP There are other PCRE-specific options that can be set by the
-application when the compiling or matching functions are called. In some cases
-the pattern can contain special leading sequences such as (*CRLF) to override
-what the application has set or what has been defaulted. Details are given in
-the section entitled
-.\" HTML <a href="#newlineseq">
-.\" </a>
-"Newline sequences"
-.\"
-above. There are also the (*UTF8), (*UTF16),(*UTF32), and (*UCP) leading
-sequences that can be used to set UTF and Unicode property modes; they are
-equivalent to setting the PCRE_UTF8, PCRE_UTF16, PCRE_UTF32 and the PCRE_UCP
-options, respectively. The (*UTF) sequence is a generic version that can be
-used with any of the libraries. However, the application can set the
-PCRE_NEVER_UTF option, which locks out the use of the (*UTF) sequences.
-.
-.
-.\" HTML <a name="subpattern"></a>
-.SH SUBPATTERNS
-.rs
-.sp
-Subpatterns are delimited by parentheses (round brackets), which can be nested.
-Turning part of a pattern into a subpattern does two things:
-.sp
-1. It localizes a set of alternatives. For example, the pattern
-.sp
- cat(aract|erpillar|)
-.sp
-matches "cataract", "caterpillar", or "cat". Without the parentheses, it would
-match "cataract", "erpillar" or an empty string.
-.sp
-2. It sets up the subpattern as a capturing subpattern. This means that, when
-the whole pattern matches, that portion of the subject string that matched the
-subpattern is passed back to the caller via the \fIovector\fP argument of the
-matching function. (This applies only to the traditional matching functions;
-the DFA matching functions do not support capturing.)
-.P
-Opening parentheses are counted from left to right (starting from 1) to obtain
-numbers for the capturing subpatterns. For example, if the string "the red
-king" is matched against the pattern
-.sp
- the ((red|white) (king|queen))
-.sp
-the captured substrings are "red king", "red", and "king", and are numbered 1,
-2, and 3, respectively.
-.P
-The fact that plain parentheses fulfil two functions is not always helpful.
-There are often times when a grouping subpattern is required without a
-capturing requirement. If an opening parenthesis is followed by a question mark
-and a colon, the subpattern does not do any capturing, and is not counted when
-computing the number of any subsequent capturing subpatterns. For example, if
-the string "the white queen" is matched against the pattern
-.sp
- the ((?:red|white) (king|queen))
-.sp
-the captured substrings are "white queen" and "queen", and are numbered 1 and
-2. The maximum number of capturing subpatterns is 65535.
-.P
-As a convenient shorthand, if any option settings are required at the start of
-a non-capturing subpattern, the option letters may appear between the "?" and
-the ":". Thus the two patterns
-.sp
- (?i:saturday|sunday)
- (?:(?i)saturday|sunday)
-.sp
-match exactly the same set of strings. Because alternative branches are tried
-from left to right, and options are not reset until the end of the subpattern
-is reached, an option setting in one branch does affect subsequent branches, so
-the above patterns match "SUNDAY" as well as "Saturday".
-.
-.
-.\" HTML <a name="dupsubpatternnumber"></a>
-.SH "DUPLICATE SUBPATTERN NUMBERS"
-.rs
-.sp
-Perl 5.10 introduced a feature whereby each alternative in a subpattern uses
-the same numbers for its capturing parentheses. Such a subpattern starts with
-(?| and is itself a non-capturing subpattern. For example, consider this
-pattern:
-.sp
- (?|(Sat)ur|(Sun))day
-.sp
-Because the two alternatives are inside a (?| group, both sets of capturing
-parentheses are numbered one. Thus, when the pattern matches, you can look
-at captured substring number one, whichever alternative matched. This construct
-is useful when you want to capture part, but not all, of one of a number of
-alternatives. Inside a (?| group, parentheses are numbered as usual, but the
-number is reset at the start of each branch. The numbers of any capturing
-parentheses that follow the subpattern start after the highest number used in
-any branch. The following example is taken from the Perl documentation. The
-numbers underneath show in which buffer the captured content will be stored.
-.sp
- # before ---------------branch-reset----------- after
- / ( a ) (?| x ( y ) z | (p (q) r) | (t) u (v) ) ( z ) /x
- # 1 2 2 3 2 3 4
-.sp
-A back reference to a numbered subpattern uses the most recent value that is
-set for that number by any subpattern. The following pattern matches "abcabc"
-or "defdef":
-.sp
- /(?|(abc)|(def))\e1/
-.sp
-In contrast, a subroutine call to a numbered subpattern always refers to the
-first one in the pattern with the given number. The following pattern matches
-"abcabc" or "defabc":
-.sp
- /(?|(abc)|(def))(?1)/
-.sp
-If a
-.\" HTML <a href="#conditions">
-.\" </a>
-condition test
-.\"
-for a subpattern's having matched refers to a non-unique number, the test is
-true if any of the subpatterns of that number have matched.
-.P
-An alternative approach to using this "branch reset" feature is to use
-duplicate named subpatterns, as described in the next section.
-.
-.
-.SH "NAMED SUBPATTERNS"
-.rs
-.sp
-Identifying capturing parentheses by number is simple, but it can be very hard
-to keep track of the numbers in complicated regular expressions. Furthermore,
-if an expression is modified, the numbers may change. To help with this
-difficulty, PCRE supports the naming of subpatterns. This feature was not
-added to Perl until release 5.10. Python had the feature earlier, and PCRE
-introduced it at release 4.0, using the Python syntax. PCRE now supports both
-the Perl and the Python syntax. Perl allows identically numbered subpatterns to
-have different names, but PCRE does not.
-.P
-In PCRE, a subpattern can be named in one of three ways: (?<name>...) or
-(?'name'...) as in Perl, or (?P<name>...) as in Python. References to capturing
-parentheses from other parts of the pattern, such as
-.\" HTML <a href="#backreferences">
-.\" </a>
-back references,
-.\"
-.\" HTML <a href="#recursion">
-.\" </a>
-recursion,
-.\"
-and
-.\" HTML <a href="#conditions">
-.\" </a>
-conditions,
-.\"
-can be made by name as well as by number.
-.P
-Names consist of up to 32 alphanumeric characters and underscores, but must
-start with a non-digit. Named capturing parentheses are still allocated numbers
-as well as names, exactly as if the names were not present. The PCRE API
-provides function calls for extracting the name-to-number translation table
-from a compiled pattern. There is also a convenience function for extracting a
-captured substring by name.
-.P
-By default, a name must be unique within a pattern, but it is possible to relax
-this constraint by setting the PCRE_DUPNAMES option at compile time. (Duplicate
-names are also always permitted for subpatterns with the same number, set up as
-described in the previous section.) Duplicate names can be useful for patterns
-where only one instance of the named parentheses can match. Suppose you want to
-match the name of a weekday, either as a 3-letter abbreviation or as the full
-name, and in both cases you want to extract the abbreviation. This pattern
-(ignoring the line breaks) does the job:
-.sp
- (?<DN>Mon|Fri|Sun)(?:day)?|
- (?<DN>Tue)(?:sday)?|
- (?<DN>Wed)(?:nesday)?|
- (?<DN>Thu)(?:rsday)?|
- (?<DN>Sat)(?:urday)?
-.sp
-There are five capturing substrings, but only one is ever set after a match.
-(An alternative way of solving this problem is to use a "branch reset"
-subpattern, as described in the previous section.)
-.P
-The convenience function for extracting the data by name returns the substring
-for the first (and in this example, the only) subpattern of that name that
-matched. This saves searching to find which numbered subpattern it was.
-.P
-If you make a back reference to a non-unique named subpattern from elsewhere in
-the pattern, the subpatterns to which the name refers are checked in the order
-in which they appear in the overall pattern. The first one that is set is used
-for the reference. For example, this pattern matches both "foofoo" and
-"barbar" but not "foobar" or "barfoo":
-.sp
- (?:(?<n>foo)|(?<n>bar))\ek<n>
-.sp
-.P
-If you make a subroutine call to a non-unique named subpattern, the one that
-corresponds to the first occurrence of the name is used. In the absence of
-duplicate numbers (see the previous section) this is the one with the lowest
-number.
-.P
-If you use a named reference in a condition
-test (see the
-.\"
-.\" HTML <a href="#conditions">
-.\" </a>
-section about conditions
-.\"
-below), either to check whether a subpattern has matched, or to check for
-recursion, all subpatterns with the same name are tested. If the condition is
-true for any one of them, the overall condition is true. This is the same
-behaviour as testing by number. For further details of the interfaces for
-handling named subpatterns, see the
-.\" HREF
-\fBpcreapi\fP
-.\"
-documentation.
-.P
-\fBWarning:\fP You cannot use different names to distinguish between two
-subpatterns with the same number because PCRE uses only the numbers when
-matching. For this reason, an error is given at compile time if different names
-are given to subpatterns with the same number. However, you can always give the
-same name to subpatterns with the same number, even when PCRE_DUPNAMES is not
-set.
-.
-.
-.SH REPETITION
-.rs
-.sp
-Repetition is specified by quantifiers, which can follow any of the following
-items:
-.sp
- a literal data character
- the dot metacharacter
- the \eC escape sequence
- the \eX escape sequence
- the \eR escape sequence
- an escape such as \ed or \epL that matches a single character
- a character class
- a back reference (see next section)
- a parenthesized subpattern (including assertions)
- a subroutine call to a subpattern (recursive or otherwise)
-.sp
-The general repetition quantifier specifies a minimum and maximum number of
-permitted matches, by giving the two numbers in curly brackets (braces),
-separated by a comma. The numbers must be less than 65536, and the first must
-be less than or equal to the second. For example:
-.sp
- z{2,4}
-.sp
-matches "zz", "zzz", or "zzzz". A closing brace on its own is not a special
-character. If the second number is omitted, but the comma is present, there is
-no upper limit; if the second number and the comma are both omitted, the
-quantifier specifies an exact number of required matches. Thus
-.sp
- [aeiou]{3,}
-.sp
-matches at least 3 successive vowels, but may match many more, while
-.sp
- \ed{8}
-.sp
-matches exactly 8 digits. An opening curly bracket that appears in a position
-where a quantifier is not allowed, or one that does not match the syntax of a
-quantifier, is taken as a literal character. For example, {,6} is not a
-quantifier, but a literal string of four characters.
-.P
-In UTF modes, quantifiers apply to characters rather than to individual data
-units. Thus, for example, \ex{100}{2} matches two characters, each of
-which is represented by a two-byte sequence in a UTF-8 string. Similarly,
-\eX{3} matches three Unicode extended grapheme clusters, each of which may be
-several data units long (and they may be of different lengths).
-.P
-The quantifier {0} is permitted, causing the expression to behave as if the
-previous item and the quantifier were not present. This may be useful for
-subpatterns that are referenced as
-.\" HTML <a href="#subpatternsassubroutines">
-.\" </a>
-subroutines
-.\"
-from elsewhere in the pattern (but see also the section entitled
-.\" HTML <a href="#subdefine">
-.\" </a>
-"Defining subpatterns for use by reference only"
-.\"
-below). Items other than subpatterns that have a {0} quantifier are omitted
-from the compiled pattern.
-.P
-For convenience, the three most common quantifiers have single-character
-abbreviations:
-.sp
- * is equivalent to {0,}
- + is equivalent to {1,}
- ? is equivalent to {0,1}
-.sp
-It is possible to construct infinite loops by following a subpattern that can
-match no characters with a quantifier that has no upper limit, for example:
-.sp
- (a?)*
-.sp
-Earlier versions of Perl and PCRE used to give an error at compile time for
-such patterns. However, because there are cases where this can be useful, such
-patterns are now accepted, but if any repetition of the subpattern does in fact
-match no characters, the loop is forcibly broken.
-.P
-By default, the quantifiers are "greedy", that is, they match as much as
-possible (up to the maximum number of permitted times), without causing the
-rest of the pattern to fail. The classic example of where this gives problems
-is in trying to match comments in C programs. These appear between /* and */
-and within the comment, individual * and / characters may appear. An attempt to
-match C comments by applying the pattern
-.sp
- /\e*.*\e*/
-.sp
-to the string
-.sp
- /* first comment */ not comment /* second comment */
-.sp
-fails, because it matches the entire string owing to the greediness of the .*
-item.
-.P
-However, if a quantifier is followed by a question mark, it ceases to be
-greedy, and instead matches the minimum number of times possible, so the
-pattern
-.sp
- /\e*.*?\e*/
-.sp
-does the right thing with the C comments. The meaning of the various
-quantifiers is not otherwise changed, just the preferred number of matches.
-Do not confuse this use of question mark with its use as a quantifier in its
-own right. Because it has two uses, it can sometimes appear doubled, as in
-.sp
- \ed??\ed
-.sp
-which matches one digit by preference, but can match two if that is the only
-way the rest of the pattern matches.
-.P
-If the PCRE_UNGREEDY option is set (an option that is not available in Perl),
-the quantifiers are not greedy by default, but individual ones can be made
-greedy by following them with a question mark. In other words, it inverts the
-default behaviour.
-.P
-When a parenthesized subpattern is quantified with a minimum repeat count that
-is greater than 1 or with a limited maximum, more memory is required for the
-compiled pattern, in proportion to the size of the minimum or maximum.
-.P
-If a pattern starts with .* or .{0,} and the PCRE_DOTALL option (equivalent
-to Perl's /s) is set, thus allowing the dot to match newlines, the pattern is
-implicitly anchored, because whatever follows will be tried against every
-character position in the subject string, so there is no point in retrying the
-overall match at any position after the first. PCRE normally treats such a
-pattern as though it were preceded by \eA.
-.P
-In cases where it is known that the subject string contains no newlines, it is
-worth setting PCRE_DOTALL in order to obtain this optimization, or
-alternatively using ^ to indicate anchoring explicitly.
-.P
-However, there are some cases where the optimization cannot be used. When .*
-is inside capturing parentheses that are the subject of a back reference
-elsewhere in the pattern, a match at the start may fail where a later one
-succeeds. Consider, for example:
-.sp
- (.*)abc\e1
-.sp
-If the subject is "xyz123abc123" the match point is the fourth character. For
-this reason, such a pattern is not implicitly anchored.
-.P
-Another case where implicit anchoring is not applied is when the leading .* is
-inside an atomic group. Once again, a match at the start may fail where a later
-one succeeds. Consider this pattern:
-.sp
- (?>.*?a)b
-.sp
-It matches "ab" in the subject "aab". The use of the backtracking control verbs
-(*PRUNE) and (*SKIP) also disable this optimization.
-.P
-When a capturing subpattern is repeated, the value captured is the substring
-that matched the final iteration. For example, after
-.sp
- (tweedle[dume]{3}\es*)+
-.sp
-has matched "tweedledum tweedledee" the value of the captured substring is
-"tweedledee". However, if there are nested capturing subpatterns, the
-corresponding captured values may have been set in previous iterations. For
-example, after
-.sp
- /(a|(b))+/
-.sp
-matches "aba" the value of the second captured substring is "b".
-.
-.
-.\" HTML <a name="atomicgroup"></a>
-.SH "ATOMIC GROUPING AND POSSESSIVE QUANTIFIERS"
-.rs
-.sp
-With both maximizing ("greedy") and minimizing ("ungreedy" or "lazy")
-repetition, failure of what follows normally causes the repeated item to be
-re-evaluated to see if a different number of repeats allows the rest of the
-pattern to match. Sometimes it is useful to prevent this, either to change the
-nature of the match, or to cause it fail earlier than it otherwise might, when
-the author of the pattern knows there is no point in carrying on.
-.P
-Consider, for example, the pattern \ed+foo when applied to the subject line
-.sp
- 123456bar
-.sp
-After matching all 6 digits and then failing to match "foo", the normal
-action of the matcher is to try again with only 5 digits matching the \ed+
-item, and then with 4, and so on, before ultimately failing. "Atomic grouping"
-(a term taken from Jeffrey Friedl's book) provides the means for specifying
-that once a subpattern has matched, it is not to be re-evaluated in this way.
-.P
-If we use atomic grouping for the previous example, the matcher gives up
-immediately on failing to match "foo" the first time. The notation is a kind of
-special parenthesis, starting with (?> as in this example:
-.sp
- (?>\ed+)foo
-.sp
-This kind of parenthesis "locks up" the part of the pattern it contains once
-it has matched, and a failure further into the pattern is prevented from
-backtracking into it. Backtracking past it to previous items, however, works as
-normal.
-.P
-An alternative description is that a subpattern of this type matches the string
-of characters that an identical standalone pattern would match, if anchored at
-the current point in the subject string.
-.P
-Atomic grouping subpatterns are not capturing subpatterns. Simple cases such as
-the above example can be thought of as a maximizing repeat that must swallow
-everything it can. So, while both \ed+ and \ed+? are prepared to adjust the
-number of digits they match in order to make the rest of the pattern match,
-(?>\ed+) can only match an entire sequence of digits.
-.P
-Atomic groups in general can of course contain arbitrarily complicated
-subpatterns, and can be nested. However, when the subpattern for an atomic
-group is just a single repeated item, as in the example above, a simpler
-notation, called a "possessive quantifier" can be used. This consists of an
-additional + character following a quantifier. Using this notation, the
-previous example can be rewritten as
-.sp
- \ed++foo
-.sp
-Note that a possessive quantifier can be used with an entire group, for
-example:
-.sp
- (abc|xyz){2,3}+
-.sp
-Possessive quantifiers are always greedy; the setting of the PCRE_UNGREEDY
-option is ignored. They are a convenient notation for the simpler forms of
-atomic group. However, there is no difference in the meaning of a possessive
-quantifier and the equivalent atomic group, though there may be a performance
-difference; possessive quantifiers should be slightly faster.
-.P
-The possessive quantifier syntax is an extension to the Perl 5.8 syntax.
-Jeffrey Friedl originated the idea (and the name) in the first edition of his
-book. Mike McCloskey liked it, so implemented it when he built Sun's Java
-package, and PCRE copied it from there. It ultimately found its way into Perl
-at release 5.10.
-.P
-PCRE has an optimization that automatically "possessifies" certain simple
-pattern constructs. For example, the sequence A+B is treated as A++B because
-there is no point in backtracking into a sequence of A's when B must follow.
-.P
-When a pattern contains an unlimited repeat inside a subpattern that can itself
-be repeated an unlimited number of times, the use of an atomic group is the
-only way to avoid some failing matches taking a very long time indeed. The
-pattern
-.sp
- (\eD+|<\ed+>)*[!?]
-.sp
-matches an unlimited number of substrings that either consist of non-digits, or
-digits enclosed in <>, followed by either ! or ?. When it matches, it runs
-quickly. However, if it is applied to
-.sp
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-.sp
-it takes a long time before reporting failure. This is because the string can
-be divided between the internal \eD+ repeat and the external * repeat in a
-large number of ways, and all have to be tried. (The example uses [!?] rather
-than a single character at the end, because both PCRE and Perl have an
-optimization that allows for fast failure when a single character is used. They
-remember the last single character that is required for a match, and fail early
-if it is not present in the string.) If the pattern is changed so that it uses
-an atomic group, like this:
-.sp
- ((?>\eD+)|<\ed+>)*[!?]
-.sp
-sequences of non-digits cannot be broken, and failure happens quickly.
-.
-.
-.\" HTML <a name="backreferences"></a>
-.SH "BACK REFERENCES"
-.rs
-.sp
-Outside a character class, a backslash followed by a digit greater than 0 (and
-possibly further digits) is a back reference to a capturing subpattern earlier
-(that is, to its left) in the pattern, provided there have been that many
-previous capturing left parentheses.
-.P
-However, if the decimal number following the backslash is less than 10, it is
-always taken as a back reference, and causes an error only if there are not
-that many capturing left parentheses in the entire pattern. In other words, the
-parentheses that are referenced need not be to the left of the reference for
-numbers less than 10. A "forward back reference" of this type can make sense
-when a repetition is involved and the subpattern to the right has participated
-in an earlier iteration.
-.P
-It is not possible to have a numerical "forward back reference" to a subpattern
-whose number is 10 or more using this syntax because a sequence such as \e50 is
-interpreted as a character defined in octal. See the subsection entitled
-"Non-printing characters"
-.\" HTML <a href="#digitsafterbackslash">
-.\" </a>
-above
-.\"
-for further details of the handling of digits following a backslash. There is
-no such problem when named parentheses are used. A back reference to any
-subpattern is possible using named parentheses (see below).
-.P
-Another way of avoiding the ambiguity inherent in the use of digits following a
-backslash is to use the \eg escape sequence. This escape must be followed by an
-unsigned number or a negative number, optionally enclosed in braces. These
-examples are all identical:
-.sp
- (ring), \e1
- (ring), \eg1
- (ring), \eg{1}
-.sp
-An unsigned number specifies an absolute reference without the ambiguity that
-is present in the older syntax. It is also useful when literal digits follow
-the reference. A negative number is a relative reference. Consider this
-example:
-.sp
- (abc(def)ghi)\eg{-1}
-.sp
-The sequence \eg{-1} is a reference to the most recently started capturing
-subpattern before \eg, that is, is it equivalent to \e2 in this example.
-Similarly, \eg{-2} would be equivalent to \e1. The use of relative references
-can be helpful in long patterns, and also in patterns that are created by
-joining together fragments that contain references within themselves.
-.P
-A back reference matches whatever actually matched the capturing subpattern in
-the current subject string, rather than anything matching the subpattern
-itself (see
-.\" HTML <a href="#subpatternsassubroutines">
-.\" </a>
-"Subpatterns as subroutines"
-.\"
-below for a way of doing that). So the pattern
-.sp
- (sens|respons)e and \e1ibility
-.sp
-matches "sense and sensibility" and "response and responsibility", but not
-"sense and responsibility". If caseful matching is in force at the time of the
-back reference, the case of letters is relevant. For example,
-.sp
- ((?i)rah)\es+\e1
-.sp
-matches "rah rah" and "RAH RAH", but not "RAH rah", even though the original
-capturing subpattern is matched caselessly.
-.P
-There are several different ways of writing back references to named
-subpatterns. The .NET syntax \ek{name} and the Perl syntax \ek<name> or
-\ek'name' are supported, as is the Python syntax (?P=name). Perl 5.10's unified
-back reference syntax, in which \eg can be used for both numeric and named
-references, is also supported. We could rewrite the above example in any of
-the following ways:
-.sp
- (?<p1>(?i)rah)\es+\ek<p1>
- (?'p1'(?i)rah)\es+\ek{p1}
- (?P<p1>(?i)rah)\es+(?P=p1)
- (?<p1>(?i)rah)\es+\eg{p1}
-.sp
-A subpattern that is referenced by name may appear in the pattern before or
-after the reference.
-.P
-There may be more than one back reference to the same subpattern. If a
-subpattern has not actually been used in a particular match, any back
-references to it always fail by default. For example, the pattern
-.sp
- (a|(bc))\e2
-.sp
-always fails if it starts to match "a" rather than "bc". However, if the
-PCRE_JAVASCRIPT_COMPAT option is set at compile time, a back reference to an
-unset value matches an empty string.
-.P
-Because there may be many capturing parentheses in a pattern, all digits
-following a backslash are taken as part of a potential back reference number.
-If the pattern continues with a digit character, some delimiter must be used to
-terminate the back reference. If the PCRE_EXTENDED option is set, this can be
-white space. Otherwise, the \eg{ syntax or an empty comment (see
-.\" HTML <a href="#comments">
-.\" </a>
-"Comments"
-.\"
-below) can be used.
-.
-.SS "Recursive back references"
-.rs
-.sp
-A back reference that occurs inside the parentheses to which it refers fails
-when the subpattern is first used, so, for example, (a\e1) never matches.
-However, such references can be useful inside repeated subpatterns. For
-example, the pattern
-.sp
- (a|b\e1)+
-.sp
-matches any number of "a"s and also "aba", "ababbaa" etc. At each iteration of
-the subpattern, the back reference matches the character string corresponding
-to the previous iteration. In order for this to work, the pattern must be such
-that the first iteration does not need to match the back reference. This can be
-done using alternation, as in the example above, or by a quantifier with a
-minimum of zero.
-.P
-Back references of this type cause the group that they reference to be treated
-as an
-.\" HTML <a href="#atomicgroup">
-.\" </a>
-atomic group.
-.\"
-Once the whole group has been matched, a subsequent matching failure cannot
-cause backtracking into the middle of the group.
-.
-.
-.\" HTML <a name="bigassertions"></a>
-.SH ASSERTIONS
-.rs
-.sp
-An assertion is a test on the characters following or preceding the current
-matching point that does not actually consume any characters. The simple
-assertions coded as \eb, \eB, \eA, \eG, \eZ, \ez, ^ and $ are described
-.\" HTML <a href="#smallassertions">
-.\" </a>
-above.
-.\"
-.P
-More complicated assertions are coded as subpatterns. There are two kinds:
-those that look ahead of the current position in the subject string, and those
-that look behind it. An assertion subpattern is matched in the normal way,
-except that it does not cause the current matching position to be changed.
-.P
-Assertion subpatterns are not capturing subpatterns. If such an assertion
-contains capturing subpatterns within it, these are counted for the purposes of
-numbering the capturing subpatterns in the whole pattern. However, substring
-capturing is carried out only for positive assertions. (Perl sometimes, but not
-always, does do capturing in negative assertions.)
-.P
-WARNING: If a positive assertion containing one or more capturing subpatterns
-succeeds, but failure to match later in the pattern causes backtracking over
-this assertion, the captures within the assertion are reset only if no higher
-numbered captures are already set. This is, unfortunately, a fundamental
-limitation of the current implementation, and as PCRE1 is now in
-maintenance-only status, it is unlikely ever to change.
-.P
-For compatibility with Perl, assertion subpatterns may be repeated; though
-it makes no sense to assert the same thing several times, the side effect of
-capturing parentheses may occasionally be useful. In practice, there only three
-cases:
-.sp
-(1) If the quantifier is {0}, the assertion is never obeyed during matching.
-However, it may contain internal capturing parenthesized groups that are called
-from elsewhere via the
-.\" HTML <a href="#subpatternsassubroutines">
-.\" </a>
-subroutine mechanism.
-.\"
-.sp
-(2) If quantifier is {0,n} where n is greater than zero, it is treated as if it
-were {0,1}. At run time, the rest of the pattern match is tried with and
-without the assertion, the order depending on the greediness of the quantifier.
-.sp
-(3) If the minimum repetition is greater than zero, the quantifier is ignored.
-The assertion is obeyed just once when encountered during matching.
-.
-.
-.SS "Lookahead assertions"
-.rs
-.sp
-Lookahead assertions start with (?= for positive assertions and (?! for
-negative assertions. For example,
-.sp
- \ew+(?=;)
-.sp
-matches a word followed by a semicolon, but does not include the semicolon in
-the match, and
-.sp
- foo(?!bar)
-.sp
-matches any occurrence of "foo" that is not followed by "bar". Note that the
-apparently similar pattern
-.sp
- (?!foo)bar
-.sp
-does not find an occurrence of "bar" that is preceded by something other than
-"foo"; it finds any occurrence of "bar" whatsoever, because the assertion
-(?!foo) is always true when the next three characters are "bar". A
-lookbehind assertion is needed to achieve the other effect.
-.P
-If you want to force a matching failure at some point in a pattern, the most
-convenient way to do it is with (?!) because an empty string always matches, so
-an assertion that requires there not to be an empty string must always fail.
-The backtracking control verb (*FAIL) or (*F) is a synonym for (?!).
-.
-.
-.\" HTML <a name="lookbehind"></a>
-.SS "Lookbehind assertions"
-.rs
-.sp
-Lookbehind assertions start with (?<= for positive assertions and (?<! for
-negative assertions. For example,
-.sp
- (?<!foo)bar
-.sp
-does find an occurrence of "bar" that is not preceded by "foo". The contents of
-a lookbehind assertion are restricted such that all the strings it matches must
-have a fixed length. However, if there are several top-level alternatives, they
-do not all have to have the same fixed length. Thus
-.sp
- (?<=bullock|donkey)
-.sp
-is permitted, but
-.sp
- (?<!dogs?|cats?)
-.sp
-causes an error at compile time. Branches that match different length strings
-are permitted only at the top level of a lookbehind assertion. This is an
-extension compared with Perl, which requires all branches to match the same
-length of string. An assertion such as
-.sp
- (?<=ab(c|de))
-.sp
-is not permitted, because its single top-level branch can match two different
-lengths, but it is acceptable to PCRE if rewritten to use two top-level
-branches:
-.sp
- (?<=abc|abde)
-.sp
-In some cases, the escape sequence \eK
-.\" HTML <a href="#resetmatchstart">
-.\" </a>
-(see above)
-.\"
-can be used instead of a lookbehind assertion to get round the fixed-length
-restriction.
-.P
-The implementation of lookbehind assertions is, for each alternative, to
-temporarily move the current position back by the fixed length and then try to
-match. If there are insufficient characters before the current position, the
-assertion fails.
-.P
-In a UTF mode, PCRE does not allow the \eC escape (which matches a single data
-unit even in a UTF mode) to appear in lookbehind assertions, because it makes
-it impossible to calculate the length of the lookbehind. The \eX and \eR
-escapes, which can match different numbers of data units, are also not
-permitted.
-.P
-.\" HTML <a href="#subpatternsassubroutines">
-.\" </a>
-"Subroutine"
-.\"
-calls (see below) such as (?2) or (?&X) are permitted in lookbehinds, as long
-as the subpattern matches a fixed-length string.
-.\" HTML <a href="#recursion">
-.\" </a>
-Recursion,
-.\"
-however, is not supported.
-.P
-Possessive quantifiers can be used in conjunction with lookbehind assertions to
-specify efficient matching of fixed-length strings at the end of subject
-strings. Consider a simple pattern such as
-.sp
- abcd$
-.sp
-when applied to a long string that does not match. Because matching proceeds
-from left to right, PCRE will look for each "a" in the subject and then see if
-what follows matches the rest of the pattern. If the pattern is specified as
-.sp
- ^.*abcd$
-.sp
-the initial .* matches the entire string at first, but when this fails (because
-there is no following "a"), it backtracks to match all but the last character,
-then all but the last two characters, and so on. Once again the search for "a"
-covers the entire string, from right to left, so we are no better off. However,
-if the pattern is written as
-.sp
- ^.*+(?<=abcd)
-.sp
-there can be no backtracking for the .*+ item; it can match only the entire
-string. The subsequent lookbehind assertion does a single test on the last four
-characters. If it fails, the match fails immediately. For long strings, this
-approach makes a significant difference to the processing time.
-.
-.
-.SS "Using multiple assertions"
-.rs
-.sp
-Several assertions (of any sort) may occur in succession. For example,
-.sp
- (?<=\ed{3})(?<!999)foo
-.sp
-matches "foo" preceded by three digits that are not "999". Notice that each of
-the assertions is applied independently at the same point in the subject
-string. First there is a check that the previous three characters are all
-digits, and then there is a check that the same three characters are not "999".
-This pattern does \fInot\fP match "foo" preceded by six characters, the first
-of which are digits and the last three of which are not "999". For example, it
-doesn't match "123abcfoo". A pattern to do that is
-.sp
- (?<=\ed{3}...)(?<!999)foo
-.sp
-This time the first assertion looks at the preceding six characters, checking
-that the first three are digits, and then the second assertion checks that the
-preceding three characters are not "999".
-.P
-Assertions can be nested in any combination. For example,
-.sp
- (?<=(?<!foo)bar)baz
-.sp
-matches an occurrence of "baz" that is preceded by "bar" which in turn is not
-preceded by "foo", while
-.sp
- (?<=\ed{3}(?!999)...)foo
-.sp
-is another pattern that matches "foo" preceded by three digits and any three
-characters that are not "999".
-.
-.
-.\" HTML <a name="conditions"></a>
-.SH "CONDITIONAL SUBPATTERNS"
-.rs
-.sp
-It is possible to cause the matching process to obey a subpattern
-conditionally or to choose between two alternative subpatterns, depending on
-the result of an assertion, or whether a specific capturing subpattern has
-already been matched. The two possible forms of conditional subpattern are:
-.sp
- (?(condition)yes-pattern)
- (?(condition)yes-pattern|no-pattern)
-.sp
-If the condition is satisfied, the yes-pattern is used; otherwise the
-no-pattern (if present) is used. If there are more than two alternatives in the
-subpattern, a compile-time error occurs. Each of the two alternatives may
-itself contain nested subpatterns of any form, including conditional
-subpatterns; the restriction to two alternatives applies only at the level of
-the condition. This pattern fragment is an example where the alternatives are
-complex:
-.sp
- (?(1) (A|B|C) | (D | (?(2)E|F) | E) )
-.sp
-.P
-There are four kinds of condition: references to subpatterns, references to
-recursion, a pseudo-condition called DEFINE, and assertions.
-.
-.SS "Checking for a used subpattern by number"
-.rs
-.sp
-If the text between the parentheses consists of a sequence of digits, the
-condition is true if a capturing subpattern of that number has previously
-matched. If there is more than one capturing subpattern with the same number
-(see the earlier
-.\"
-.\" HTML <a href="#recursion">
-.\" </a>
-section about duplicate subpattern numbers),
-.\"
-the condition is true if any of them have matched. An alternative notation is
-to precede the digits with a plus or minus sign. In this case, the subpattern
-number is relative rather than absolute. The most recently opened parentheses
-can be referenced by (?(-1), the next most recent by (?(-2), and so on. Inside
-loops it can also make sense to refer to subsequent groups. The next
-parentheses to be opened can be referenced as (?(+1), and so on. (The value
-zero in any of these forms is not used; it provokes a compile-time error.)
-.P
-Consider the following pattern, which contains non-significant white space to
-make it more readable (assume the PCRE_EXTENDED option) and to divide it into
-three parts for ease of discussion:
-.sp
- ( \e( )? [^()]+ (?(1) \e) )
-.sp
-The first part matches an optional opening parenthesis, and if that
-character is present, sets it as the first captured substring. The second part
-matches one or more characters that are not parentheses. The third part is a
-conditional subpattern that tests whether or not the first set of parentheses
-matched. If they did, that is, if subject started with an opening parenthesis,
-the condition is true, and so the yes-pattern is executed and a closing
-parenthesis is required. Otherwise, since no-pattern is not present, the
-subpattern matches nothing. In other words, this pattern matches a sequence of
-non-parentheses, optionally enclosed in parentheses.
-.P
-If you were embedding this pattern in a larger one, you could use a relative
-reference:
-.sp
- ...other stuff... ( \e( )? [^()]+ (?(-1) \e) ) ...
-.sp
-This makes the fragment independent of the parentheses in the larger pattern.
-.
-.SS "Checking for a used subpattern by name"
-.rs
-.sp
-Perl uses the syntax (?(<name>)...) or (?('name')...) to test for a used
-subpattern by name. For compatibility with earlier versions of PCRE, which had
-this facility before Perl, the syntax (?(name)...) is also recognized.
-.P
-Rewriting the above example to use a named subpattern gives this:
-.sp
- (?<OPEN> \e( )? [^()]+ (?(<OPEN>) \e) )
-.sp
-If the name used in a condition of this kind is a duplicate, the test is
-applied to all subpatterns of the same name, and is true if any one of them has
-matched.
-.
-.SS "Checking for pattern recursion"
-.rs
-.sp
-If the condition is the string (R), and there is no subpattern with the name R,
-the condition is true if a recursive call to the whole pattern or any
-subpattern has been made. If digits or a name preceded by ampersand follow the
-letter R, for example:
-.sp
- (?(R3)...) or (?(R&name)...)
-.sp
-the condition is true if the most recent recursion is into a subpattern whose
-number or name is given. This condition does not check the entire recursion
-stack. If the name used in a condition of this kind is a duplicate, the test is
-applied to all subpatterns of the same name, and is true if any one of them is
-the most recent recursion.
-.P
-At "top level", all these recursion test conditions are false.
-.\" HTML <a href="#recursion">
-.\" </a>
-The syntax for recursive patterns
-.\"
-is described below.
-.
-.\" HTML <a name="subdefine"></a>
-.SS "Defining subpatterns for use by reference only"
-.rs
-.sp
-If the condition is the string (DEFINE), and there is no subpattern with the
-name DEFINE, the condition is always false. In this case, there may be only one
-alternative in the subpattern. It is always skipped if control reaches this
-point in the pattern; the idea of DEFINE is that it can be used to define
-subroutines that can be referenced from elsewhere. (The use of
-.\" HTML <a href="#subpatternsassubroutines">
-.\" </a>
-subroutines
-.\"
-is described below.) For example, a pattern to match an IPv4 address such as
-"192.168.23.245" could be written like this (ignore white space and line
-breaks):
-.sp
- (?(DEFINE) (?<byte> 2[0-4]\ed | 25[0-5] | 1\ed\ed | [1-9]?\ed) )
- \eb (?&byte) (\e.(?&byte)){3} \eb
-.sp
-The first part of the pattern is a DEFINE group inside which a another group
-named "byte" is defined. This matches an individual component of an IPv4
-address (a number less than 256). When matching takes place, this part of the
-pattern is skipped because DEFINE acts like a false condition. The rest of the
-pattern uses references to the named group to match the four dot-separated
-components of an IPv4 address, insisting on a word boundary at each end.
-.
-.SS "Assertion conditions"
-.rs
-.sp
-If the condition is not in any of the above formats, it must be an assertion.
-This may be a positive or negative lookahead or lookbehind assertion. Consider
-this pattern, again containing non-significant white space, and with the two
-alternatives on the second line:
-.sp
- (?(?=[^a-z]*[a-z])
- \ed{2}-[a-z]{3}-\ed{2} | \ed{2}-\ed{2}-\ed{2} )
-.sp
-The condition is a positive lookahead assertion that matches an optional
-sequence of non-letters followed by a letter. In other words, it tests for the
-presence of at least one letter in the subject. If a letter is found, the
-subject is matched against the first alternative; otherwise it is matched
-against the second. This pattern matches strings in one of the two forms
-dd-aaa-dd or dd-dd-dd, where aaa are letters and dd are digits.
-.
-.
-.\" HTML <a name="comments"></a>
-.SH COMMENTS
-.rs
-.sp
-There are two ways of including comments in patterns that are processed by
-PCRE. In both cases, the start of the comment must not be in a character class,
-nor in the middle of any other sequence of related characters such as (?: or a
-subpattern name or number. The characters that make up a comment play no part
-in the pattern matching.
-.P
-The sequence (?# marks the start of a comment that continues up to the next
-closing parenthesis. Nested parentheses are not permitted. If the PCRE_EXTENDED
-option is set, an unescaped # character also introduces a comment, which in
-this case continues to immediately after the next newline character or
-character sequence in the pattern. Which characters are interpreted as newlines
-is controlled by the options passed to a compiling function or by a special
-sequence at the start of the pattern, as described in the section entitled
-.\" HTML <a href="#newlines">
-.\" </a>
-"Newline conventions"
-.\"
-above. Note that the end of this type of comment is a literal newline sequence
-in the pattern; escape sequences that happen to represent a newline do not
-count. For example, consider this pattern when PCRE_EXTENDED is set, and the
-default newline convention is in force:
-.sp
- abc #comment \en still comment
-.sp
-On encountering the # character, \fBpcre_compile()\fP skips along, looking for
-a newline in the pattern. The sequence \en is still literal at this stage, so
-it does not terminate the comment. Only an actual character with the code value
-0x0a (the default newline) does so.
-.
-.
-.\" HTML <a name="recursion"></a>
-.SH "RECURSIVE PATTERNS"
-.rs
-.sp
-Consider the problem of matching a string in parentheses, allowing for
-unlimited nested parentheses. Without the use of recursion, the best that can
-be done is to use a pattern that matches up to some fixed depth of nesting. It
-is not possible to handle an arbitrary nesting depth.
-.P
-For some time, Perl has provided a facility that allows regular expressions to
-recurse (amongst other things). It does this by interpolating Perl code in the
-expression at run time, and the code can refer to the expression itself. A Perl
-pattern using code interpolation to solve the parentheses problem can be
-created like this:
-.sp
- $re = qr{\e( (?: (?>[^()]+) | (?p{$re}) )* \e)}x;
-.sp
-The (?p{...}) item interpolates Perl code at run time, and in this case refers
-recursively to the pattern in which it appears.
-.P
-Obviously, PCRE cannot support the interpolation of Perl code. Instead, it
-supports special syntax for recursion of the entire pattern, and also for
-individual subpattern recursion. After its introduction in PCRE and Python,
-this kind of recursion was subsequently introduced into Perl at release 5.10.
-.P
-A special item that consists of (? followed by a number greater than zero and a
-closing parenthesis is a recursive subroutine call of the subpattern of the
-given number, provided that it occurs inside that subpattern. (If not, it is a
-.\" HTML <a href="#subpatternsassubroutines">
-.\" </a>
-non-recursive subroutine
-.\"
-call, which is described in the next section.) The special item (?R) or (?0) is
-a recursive call of the entire regular expression.
-.P
-This PCRE pattern solves the nested parentheses problem (assume the
-PCRE_EXTENDED option is set so that white space is ignored):
-.sp
- \e( ( [^()]++ | (?R) )* \e)
-.sp
-First it matches an opening parenthesis. Then it matches any number of
-substrings which can either be a sequence of non-parentheses, or a recursive
-match of the pattern itself (that is, a correctly parenthesized substring).
-Finally there is a closing parenthesis. Note the use of a possessive quantifier
-to avoid backtracking into sequences of non-parentheses.
-.P
-If this were part of a larger pattern, you would not want to recurse the entire
-pattern, so instead you could use this:
-.sp
- ( \e( ( [^()]++ | (?1) )* \e) )
-.sp
-We have put the pattern into parentheses, and caused the recursion to refer to
-them instead of the whole pattern.
-.P
-In a larger pattern, keeping track of parenthesis numbers can be tricky. This
-is made easier by the use of relative references. Instead of (?1) in the
-pattern above you can write (?-2) to refer to the second most recently opened
-parentheses preceding the recursion. In other words, a negative number counts
-capturing parentheses leftwards from the point at which it is encountered.
-.P
-It is also possible to refer to subsequently opened parentheses, by writing
-references such as (?+2). However, these cannot be recursive because the
-reference is not inside the parentheses that are referenced. They are always
-.\" HTML <a href="#subpatternsassubroutines">
-.\" </a>
-non-recursive subroutine
-.\"
-calls, as described in the next section.
-.P
-An alternative approach is to use named parentheses instead. The Perl syntax
-for this is (?&name); PCRE's earlier syntax (?P>name) is also supported. We
-could rewrite the above example as follows:
-.sp
- (?<pn> \e( ( [^()]++ | (?&pn) )* \e) )
-.sp
-If there is more than one subpattern with the same name, the earliest one is
-used.
-.P
-This particular example pattern that we have been looking at contains nested
-unlimited repeats, and so the use of a possessive quantifier for matching
-strings of non-parentheses is important when applying the pattern to strings
-that do not match. For example, when this pattern is applied to
-.sp
- (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()
-.sp
-it yields "no match" quickly. However, if a possessive quantifier is not used,
-the match runs for a very long time indeed because there are so many different
-ways the + and * repeats can carve up the subject, and all have to be tested
-before failure can be reported.
-.P
-At the end of a match, the values of capturing parentheses are those from
-the outermost level. If you want to obtain intermediate values, a callout
-function can be used (see below and the
-.\" HREF
-\fBpcrecallout\fP
-.\"
-documentation). If the pattern above is matched against
-.sp
- (ab(cd)ef)
-.sp
-the value for the inner capturing parentheses (numbered 2) is "ef", which is
-the last value taken on at the top level. If a capturing subpattern is not
-matched at the top level, its final captured value is unset, even if it was
-(temporarily) set at a deeper level during the matching process.
-.P
-If there are more than 15 capturing parentheses in a pattern, PCRE has to
-obtain extra memory to store data during a recursion, which it does by using
-\fBpcre_malloc\fP, freeing it via \fBpcre_free\fP afterwards. If no memory can
-be obtained, the match fails with the PCRE_ERROR_NOMEMORY error.
-.P
-Do not confuse the (?R) item with the condition (R), which tests for recursion.
-Consider this pattern, which matches text in angle brackets, allowing for
-arbitrary nesting. Only digits are allowed in nested brackets (that is, when
-recursing), whereas any characters are permitted at the outer level.
-.sp
- < (?: (?(R) \ed++ | [^<>]*+) | (?R)) * >
-.sp
-In this pattern, (?(R) is the start of a conditional subpattern, with two
-different alternatives for the recursive and non-recursive cases. The (?R) item
-is the actual recursive call.
-.
-.
-.\" HTML <a name="recursiondifference"></a>
-.SS "Differences in recursion processing between PCRE and Perl"
-.rs
-.sp
-Recursion processing in PCRE differs from Perl in two important ways. In PCRE
-(like Python, but unlike Perl), a recursive subpattern call is always treated
-as an atomic group. That is, once it has matched some of the subject string, it
-is never re-entered, even if it contains untried alternatives and there is a
-subsequent matching failure. This can be illustrated by the following pattern,
-which purports to match a palindromic string that contains an odd number of
-characters (for example, "a", "aba", "abcba", "abcdcba"):
-.sp
- ^(.|(.)(?1)\e2)$
-.sp
-The idea is that it either matches a single character, or two identical
-characters surrounding a sub-palindrome. In Perl, this pattern works; in PCRE
-it does not if the pattern is longer than three characters. Consider the
-subject string "abcba":
-.P
-At the top level, the first character is matched, but as it is not at the end
-of the string, the first alternative fails; the second alternative is taken
-and the recursion kicks in. The recursive call to subpattern 1 successfully
-matches the next character ("b"). (Note that the beginning and end of line
-tests are not part of the recursion).
-.P
-Back at the top level, the next character ("c") is compared with what
-subpattern 2 matched, which was "a". This fails. Because the recursion is
-treated as an atomic group, there are now no backtracking points, and so the
-entire match fails. (Perl is able, at this point, to re-enter the recursion and
-try the second alternative.) However, if the pattern is written with the
-alternatives in the other order, things are different:
-.sp
- ^((.)(?1)\e2|.)$
-.sp
-This time, the recursing alternative is tried first, and continues to recurse
-until it runs out of characters, at which point the recursion fails. But this
-time we do have another alternative to try at the higher level. That is the big
-difference: in the previous case the remaining alternative is at a deeper
-recursion level, which PCRE cannot use.
-.P
-To change the pattern so that it matches all palindromic strings, not just
-those with an odd number of characters, it is tempting to change the pattern to
-this:
-.sp
- ^((.)(?1)\e2|.?)$
-.sp
-Again, this works in Perl, but not in PCRE, and for the same reason. When a
-deeper recursion has matched a single character, it cannot be entered again in
-order to match an empty string. The solution is to separate the two cases, and
-write out the odd and even cases as alternatives at the higher level:
-.sp
- ^(?:((.)(?1)\e2|)|((.)(?3)\e4|.))
-.sp
-If you want to match typical palindromic phrases, the pattern has to ignore all
-non-word characters, which can be done like this:
-.sp
- ^\eW*+(?:((.)\eW*+(?1)\eW*+\e2|)|((.)\eW*+(?3)\eW*+\e4|\eW*+.\eW*+))\eW*+$
-.sp
-If run with the PCRE_CASELESS option, this pattern matches phrases such as "A
-man, a plan, a canal: Panama!" and it works well in both PCRE and Perl. Note
-the use of the possessive quantifier *+ to avoid backtracking into sequences of
-non-word characters. Without this, PCRE takes a great deal longer (ten times or
-more) to match typical phrases, and Perl takes so long that you think it has
-gone into a loop.
-.P
-\fBWARNING\fP: The palindrome-matching patterns above work only if the subject
-string does not start with a palindrome that is shorter than the entire string.
-For example, although "abcba" is correctly matched, if the subject is "ababa",
-PCRE finds the palindrome "aba" at the start, then fails at top level because
-the end of the string does not follow. Once again, it cannot jump back into the
-recursion to try other alternatives, so the entire match fails.
-.P
-The second way in which PCRE and Perl differ in their recursion processing is
-in the handling of captured values. In Perl, when a subpattern is called
-recursively or as a subpattern (see the next section), it has no access to any
-values that were captured outside the recursion, whereas in PCRE these values
-can be referenced. Consider this pattern:
-.sp
- ^(.)(\e1|a(?2))
-.sp
-In PCRE, this pattern matches "bab". The first capturing parentheses match "b",
-then in the second group, when the back reference \e1 fails to match "b", the
-second alternative matches "a" and then recurses. In the recursion, \e1 does
-now match "b" and so the whole match succeeds. In Perl, the pattern fails to
-match because inside the recursive call \e1 cannot access the externally set
-value.
-.
-.
-.\" HTML <a name="subpatternsassubroutines"></a>
-.SH "SUBPATTERNS AS SUBROUTINES"
-.rs
-.sp
-If the syntax for a recursive subpattern call (either by number or by
-name) is used outside the parentheses to which it refers, it operates like a
-subroutine in a programming language. The called subpattern may be defined
-before or after the reference. A numbered reference can be absolute or
-relative, as in these examples:
-.sp
- (...(absolute)...)...(?2)...
- (...(relative)...)...(?-1)...
- (...(?+1)...(relative)...
-.sp
-An earlier example pointed out that the pattern
-.sp
- (sens|respons)e and \e1ibility
-.sp
-matches "sense and sensibility" and "response and responsibility", but not
-"sense and responsibility". If instead the pattern
-.sp
- (sens|respons)e and (?1)ibility
-.sp
-is used, it does match "sense and responsibility" as well as the other two
-strings. Another example is given in the discussion of DEFINE above.
-.P
-All subroutine calls, whether recursive or not, are always treated as atomic
-groups. That is, once a subroutine has matched some of the subject string, it
-is never re-entered, even if it contains untried alternatives and there is a
-subsequent matching failure. Any capturing parentheses that are set during the
-subroutine call revert to their previous values afterwards.
-.P
-Processing options such as case-independence are fixed when a subpattern is
-defined, so if it is used as a subroutine, such options cannot be changed for
-different calls. For example, consider this pattern:
-.sp
- (abc)(?i:(?-1))
-.sp
-It matches "abcabc". It does not match "abcABC" because the change of
-processing option does not affect the called subpattern.
-.
-.
-.\" HTML <a name="onigurumasubroutines"></a>
-.SH "ONIGURUMA SUBROUTINE SYNTAX"
-.rs
-.sp
-For compatibility with Oniguruma, the non-Perl syntax \eg followed by a name or
-a number enclosed either in angle brackets or single quotes, is an alternative
-syntax for referencing a subpattern as a subroutine, possibly recursively. Here
-are two of the examples used above, rewritten using this syntax:
-.sp
- (?<pn> \e( ( (?>[^()]+) | \eg<pn> )* \e) )
- (sens|respons)e and \eg'1'ibility
-.sp
-PCRE supports an extension to Oniguruma: if a number is preceded by a
-plus or a minus sign it is taken as a relative reference. For example:
-.sp
- (abc)(?i:\eg<-1>)
-.sp
-Note that \eg{...} (Perl syntax) and \eg<...> (Oniguruma syntax) are \fInot\fP
-synonymous. The former is a back reference; the latter is a subroutine call.
-.
-.
-.SH CALLOUTS
-.rs
-.sp
-Perl has a feature whereby using the sequence (?{...}) causes arbitrary Perl
-code to be obeyed in the middle of matching a regular expression. This makes it
-possible, amongst other things, to extract different substrings that match the
-same pair of parentheses when there is a repetition.
-.P
-PCRE provides a similar feature, but of course it cannot obey arbitrary Perl
-code. The feature is called "callout". The caller of PCRE provides an external
-function by putting its entry point in the global variable \fIpcre_callout\fP
-(8-bit library) or \fIpcre[16|32]_callout\fP (16-bit or 32-bit library).
-By default, this variable contains NULL, which disables all calling out.
-.P
-Within a regular expression, (?C) indicates the points at which the external
-function is to be called. If you want to identify different callout points, you
-can put a number less than 256 after the letter C. The default value is zero.
-For example, this pattern has two callout points:
-.sp
- (?C1)abc(?C2)def
-.sp
-If the PCRE_AUTO_CALLOUT flag is passed to a compiling function, callouts are
-automatically installed before each item in the pattern. They are all numbered
-255. If there is a conditional group in the pattern whose condition is an
-assertion, an additional callout is inserted just before the condition. An
-explicit callout may also be set at this position, as in this example:
-.sp
- (?(?C9)(?=a)abc|def)
-.sp
-Note that this applies only to assertion conditions, not to other types of
-condition.
-.P
-During matching, when PCRE reaches a callout point, the external function is
-called. It is provided with the number of the callout, the position in the
-pattern, and, optionally, one item of data originally supplied by the caller of
-the matching function. The callout function may cause matching to proceed, to
-backtrack, or to fail altogether.
-.P
-By default, PCRE implements a number of optimizations at compile time and
-matching time, and one side-effect is that sometimes callouts are skipped. If
-you need all possible callouts to happen, you need to set options that disable
-the relevant optimizations. More details, and a complete description of the
-interface to the callout function, are given in the
-.\" HREF
-\fBpcrecallout\fP
-.\"
-documentation.
-.
-.
-.\" HTML <a name="backtrackcontrol"></a>
-.SH "BACKTRACKING CONTROL"
-.rs
-.sp
-Perl 5.10 introduced a number of "Special Backtracking Control Verbs", which
-are still described in the Perl documentation as "experimental and subject to
-change or removal in a future version of Perl". It goes on to say: "Their usage
-in production code should be noted to avoid problems during upgrades." The same
-remarks apply to the PCRE features described in this section.
-.P
-The new verbs make use of what was previously invalid syntax: an opening
-parenthesis followed by an asterisk. They are generally of the form
-(*VERB) or (*VERB:NAME). Some may take either form, possibly behaving
-differently depending on whether or not a name is present. A name is any
-sequence of characters that does not include a closing parenthesis. The maximum
-length of name is 255 in the 8-bit library and 65535 in the 16-bit and 32-bit
-libraries. If the name is empty, that is, if the closing parenthesis
-immediately follows the colon, the effect is as if the colon were not there.
-Any number of these verbs may occur in a pattern.
-.P
-Since these verbs are specifically related to backtracking, most of them can be
-used only when the pattern is to be matched using one of the traditional
-matching functions, because these use a backtracking algorithm. With the
-exception of (*FAIL), which behaves like a failing negative assertion, the
-backtracking control verbs cause an error if encountered by a DFA matching
-function.
-.P
-The behaviour of these verbs in
-.\" HTML <a href="#btrepeat">
-.\" </a>
-repeated groups,
-.\"
-.\" HTML <a href="#btassert">
-.\" </a>
-assertions,
-.\"
-and in
-.\" HTML <a href="#btsub">
-.\" </a>
-subpatterns called as subroutines
-.\"
-(whether or not recursively) is documented below.
-.
-.
-.\" HTML <a name="nooptimize"></a>
-.SS "Optimizations that affect backtracking verbs"
-.rs
-.sp
-PCRE contains some optimizations that are used to speed up matching by running
-some checks at the start of each match attempt. For example, it may know the
-minimum length of matching subject, or that a particular character must be
-present. When one of these optimizations bypasses the running of a match, any
-included backtracking verbs will not, of course, be processed. You can suppress
-the start-of-match optimizations by setting the PCRE_NO_START_OPTIMIZE option
-when calling \fBpcre_compile()\fP or \fBpcre_exec()\fP, or by starting the
-pattern with (*NO_START_OPT). There is more discussion of this option in the
-section entitled
-.\" HTML <a href="pcreapi.html#execoptions">
-.\" </a>
-"Option bits for \fBpcre_exec()\fP"
-.\"
-in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-documentation.
-.P
-Experiments with Perl suggest that it too has similar optimizations, sometimes
-leading to anomalous results.
-.
-.
-.SS "Verbs that act immediately"
-.rs
-.sp
-The following verbs act as soon as they are encountered. They may not be
-followed by a name.
-.sp
- (*ACCEPT)
-.sp
-This verb causes the match to end successfully, skipping the remainder of the
-pattern. However, when it is inside a subpattern that is called as a
-subroutine, only that subpattern is ended successfully. Matching then continues
-at the outer level. If (*ACCEPT) in triggered in a positive assertion, the
-assertion succeeds; in a negative assertion, the assertion fails.
-.P
-If (*ACCEPT) is inside capturing parentheses, the data so far is captured. For
-example:
-.sp
- A((?:A|B(*ACCEPT)|C)D)
-.sp
-This matches "AB", "AAD", or "ACD"; when it matches "AB", "B" is captured by
-the outer parentheses.
-.sp
- (*FAIL) or (*F)
-.sp
-This verb causes a matching failure, forcing backtracking to occur. It is
-equivalent to (?!) but easier to read. The Perl documentation notes that it is
-probably useful only when combined with (?{}) or (??{}). Those are, of course,
-Perl features that are not present in PCRE. The nearest equivalent is the
-callout feature, as for example in this pattern:
-.sp
- a+(?C)(*FAIL)
-.sp
-A match with the string "aaaa" always fails, but the callout is taken before
-each backtrack happens (in this example, 10 times).
-.
-.
-.SS "Recording which path was taken"
-.rs
-.sp
-There is one verb whose main purpose is to track how a match was arrived at,
-though it also has a secondary use in conjunction with advancing the match
-starting point (see (*SKIP) below).
-.sp
- (*MARK:NAME) or (*:NAME)
-.sp
-A name is always required with this verb. There may be as many instances of
-(*MARK) as you like in a pattern, and their names do not have to be unique.
-.P
-When a match succeeds, the name of the last-encountered (*MARK:NAME),
-(*PRUNE:NAME), or (*THEN:NAME) on the matching path is passed back to the
-caller as described in the section entitled
-.\" HTML <a href="pcreapi.html#extradata">
-.\" </a>
-"Extra data for \fBpcre_exec()\fP"
-.\"
-in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-documentation. Here is an example of \fBpcretest\fP output, where the /K
-modifier requests the retrieval and outputting of (*MARK) data:
-.sp
- re> /X(*MARK:A)Y|X(*MARK:B)Z/K
- data> XY
- 0: XY
- MK: A
- XZ
- 0: XZ
- MK: B
-.sp
-The (*MARK) name is tagged with "MK:" in this output, and in this example it
-indicates which of the two alternatives matched. This is a more efficient way
-of obtaining this information than putting each alternative in its own
-capturing parentheses.
-.P
-If a verb with a name is encountered in a positive assertion that is true, the
-name is recorded and passed back if it is the last-encountered. This does not
-happen for negative assertions or failing positive assertions.
-.P
-After a partial match or a failed match, the last encountered name in the
-entire match process is returned. For example:
-.sp
- re> /X(*MARK:A)Y|X(*MARK:B)Z/K
- data> XP
- No match, mark = B
-.sp
-Note that in this unanchored example the mark is retained from the match
-attempt that started at the letter "X" in the subject. Subsequent match
-attempts starting at "P" and then with an empty string do not get as far as the
-(*MARK) item, but nevertheless do not reset it.
-.P
-If you are interested in (*MARK) values after failed matches, you should
-probably set the PCRE_NO_START_OPTIMIZE option
-.\" HTML <a href="#nooptimize">
-.\" </a>
-(see above)
-.\"
-to ensure that the match is always attempted.
-.
-.
-.SS "Verbs that act after backtracking"
-.rs
-.sp
-The following verbs do nothing when they are encountered. Matching continues
-with what follows, but if there is no subsequent match, causing a backtrack to
-the verb, a failure is forced. That is, backtracking cannot pass to the left of
-the verb. However, when one of these verbs appears inside an atomic group or an
-assertion that is true, its effect is confined to that group, because once the
-group has been matched, there is never any backtracking into it. In this
-situation, backtracking can "jump back" to the left of the entire atomic group
-or assertion. (Remember also, as stated above, that this localization also
-applies in subroutine calls.)
-.P
-These verbs differ in exactly what kind of failure occurs when backtracking
-reaches them. The behaviour described below is what happens when the verb is
-not in a subroutine or an assertion. Subsequent sections cover these special
-cases.
-.sp
- (*COMMIT)
-.sp
-This verb, which may not be followed by a name, causes the whole match to fail
-outright if there is a later matching failure that causes backtracking to reach
-it. Even if the pattern is unanchored, no further attempts to find a match by
-advancing the starting point take place. If (*COMMIT) is the only backtracking
-verb that is encountered, once it has been passed \fBpcre_exec()\fP is
-committed to finding a match at the current starting point, or not at all. For
-example:
-.sp
- a+(*COMMIT)b
-.sp
-This matches "xxaab" but not "aacaab". It can be thought of as a kind of
-dynamic anchor, or "I've started, so I must finish." The name of the most
-recently passed (*MARK) in the path is passed back when (*COMMIT) forces a
-match failure.
-.P
-If there is more than one backtracking verb in a pattern, a different one that
-follows (*COMMIT) may be triggered first, so merely passing (*COMMIT) during a
-match does not always guarantee that a match must be at this starting point.
-.P
-Note that (*COMMIT) at the start of a pattern is not the same as an anchor,
-unless PCRE's start-of-match optimizations are turned off, as shown in this
-output from \fBpcretest\fP:
-.sp
- re> /(*COMMIT)abc/
- data> xyzabc
- 0: abc
- data> xyzabc\eY
- No match
-.sp
-For this pattern, PCRE knows that any match must start with "a", so the
-optimization skips along the subject to "a" before applying the pattern to the
-first set of data. The match attempt then succeeds. In the second set of data,
-the escape sequence \eY is interpreted by the \fBpcretest\fP program. It causes
-the PCRE_NO_START_OPTIMIZE option to be set when \fBpcre_exec()\fP is called.
-This disables the optimization that skips along to the first character. The
-pattern is now applied starting at "x", and so the (*COMMIT) causes the match
-to fail without trying any other starting points.
-.sp
- (*PRUNE) or (*PRUNE:NAME)
-.sp
-This verb causes the match to fail at the current starting position in the
-subject if there is a later matching failure that causes backtracking to reach
-it. If the pattern is unanchored, the normal "bumpalong" advance to the next
-starting character then happens. Backtracking can occur as usual to the left of
-(*PRUNE), before it is reached, or when matching to the right of (*PRUNE), but
-if there is no match to the right, backtracking cannot cross (*PRUNE). In
-simple cases, the use of (*PRUNE) is just an alternative to an atomic group or
-possessive quantifier, but there are some uses of (*PRUNE) that cannot be
-expressed in any other way. In an anchored pattern (*PRUNE) has the same effect
-as (*COMMIT).
-.P
-The behaviour of (*PRUNE:NAME) is the not the same as (*MARK:NAME)(*PRUNE).
-It is like (*MARK:NAME) in that the name is remembered for passing back to the
-caller. However, (*SKIP:NAME) searches only for names set with (*MARK).
-.sp
- (*SKIP)
-.sp
-This verb, when given without a name, is like (*PRUNE), except that if the
-pattern is unanchored, the "bumpalong" advance is not to the next character,
-but to the position in the subject where (*SKIP) was encountered. (*SKIP)
-signifies that whatever text was matched leading up to it cannot be part of a
-successful match. Consider:
-.sp
- a+(*SKIP)b
-.sp
-If the subject is "aaaac...", after the first match attempt fails (starting at
-the first character in the string), the starting point skips on to start the
-next attempt at "c". Note that a possessive quantifer does not have the same
-effect as this example; although it would suppress backtracking during the
-first match attempt, the second attempt would start at the second character
-instead of skipping on to "c".
-.sp
- (*SKIP:NAME)
-.sp
-When (*SKIP) has an associated name, its behaviour is modified. When it is
-triggered, the previous path through the pattern is searched for the most
-recent (*MARK) that has the same name. If one is found, the "bumpalong" advance
-is to the subject position that corresponds to that (*MARK) instead of to where
-(*SKIP) was encountered. If no (*MARK) with a matching name is found, the
-(*SKIP) is ignored.
-.P
-Note that (*SKIP:NAME) searches only for names set by (*MARK:NAME). It ignores
-names that are set by (*PRUNE:NAME) or (*THEN:NAME).
-.sp
- (*THEN) or (*THEN:NAME)
-.sp
-This verb causes a skip to the next innermost alternative when backtracking
-reaches it. That is, it cancels any further backtracking within the current
-alternative. Its name comes from the observation that it can be used for a
-pattern-based if-then-else block:
-.sp
- ( COND1 (*THEN) FOO | COND2 (*THEN) BAR | COND3 (*THEN) BAZ ) ...
-.sp
-If the COND1 pattern matches, FOO is tried (and possibly further items after
-the end of the group if FOO succeeds); on failure, the matcher skips to the
-second alternative and tries COND2, without backtracking into COND1. If that
-succeeds and BAR fails, COND3 is tried. If subsequently BAZ fails, there are no
-more alternatives, so there is a backtrack to whatever came before the entire
-group. If (*THEN) is not inside an alternation, it acts like (*PRUNE).
-.P
-The behaviour of (*THEN:NAME) is the not the same as (*MARK:NAME)(*THEN).
-It is like (*MARK:NAME) in that the name is remembered for passing back to the
-caller. However, (*SKIP:NAME) searches only for names set with (*MARK).
-.P
-A subpattern that does not contain a | character is just a part of the
-enclosing alternative; it is not a nested alternation with only one
-alternative. The effect of (*THEN) extends beyond such a subpattern to the
-enclosing alternative. Consider this pattern, where A, B, etc. are complex
-pattern fragments that do not contain any | characters at this level:
-.sp
- A (B(*THEN)C) | D
-.sp
-If A and B are matched, but there is a failure in C, matching does not
-backtrack into A; instead it moves to the next alternative, that is, D.
-However, if the subpattern containing (*THEN) is given an alternative, it
-behaves differently:
-.sp
- A (B(*THEN)C | (*FAIL)) | D
-.sp
-The effect of (*THEN) is now confined to the inner subpattern. After a failure
-in C, matching moves to (*FAIL), which causes the whole subpattern to fail
-because there are no more alternatives to try. In this case, matching does now
-backtrack into A.
-.P
-Note that a conditional subpattern is not considered as having two
-alternatives, because only one is ever used. In other words, the | character in
-a conditional subpattern has a different meaning. Ignoring white space,
-consider:
-.sp
- ^.*? (?(?=a) a | b(*THEN)c )
-.sp
-If the subject is "ba", this pattern does not match. Because .*? is ungreedy,
-it initially matches zero characters. The condition (?=a) then fails, the
-character "b" is matched, but "c" is not. At this point, matching does not
-backtrack to .*? as might perhaps be expected from the presence of the |
-character. The conditional subpattern is part of the single alternative that
-comprises the whole pattern, and so the match fails. (If there was a backtrack
-into .*?, allowing it to match "b", the match would succeed.)
-.P
-The verbs just described provide four different "strengths" of control when
-subsequent matching fails. (*THEN) is the weakest, carrying on the match at the
-next alternative. (*PRUNE) comes next, failing the match at the current
-starting position, but allowing an advance to the next character (for an
-unanchored pattern). (*SKIP) is similar, except that the advance may be more
-than one character. (*COMMIT) is the strongest, causing the entire match to
-fail.
-.
-.
-.SS "More than one backtracking verb"
-.rs
-.sp
-If more than one backtracking verb is present in a pattern, the one that is
-backtracked onto first acts. For example, consider this pattern, where A, B,
-etc. are complex pattern fragments:
-.sp
- (A(*COMMIT)B(*THEN)C|ABD)
-.sp
-If A matches but B fails, the backtrack to (*COMMIT) causes the entire match to
-fail. However, if A and B match, but C fails, the backtrack to (*THEN) causes
-the next alternative (ABD) to be tried. This behaviour is consistent, but is
-not always the same as Perl's. It means that if two or more backtracking verbs
-appear in succession, all the the last of them has no effect. Consider this
-example:
-.sp
- ...(*COMMIT)(*PRUNE)...
-.sp
-If there is a matching failure to the right, backtracking onto (*PRUNE) causes
-it to be triggered, and its action is taken. There can never be a backtrack
-onto (*COMMIT).
-.
-.
-.\" HTML <a name="btrepeat"></a>
-.SS "Backtracking verbs in repeated groups"
-.rs
-.sp
-PCRE differs from Perl in its handling of backtracking verbs in repeated
-groups. For example, consider:
-.sp
- /(a(*COMMIT)b)+ac/
-.sp
-If the subject is "abac", Perl matches, but PCRE fails because the (*COMMIT) in
-the second repeat of the group acts.
-.
-.
-.\" HTML <a name="btassert"></a>
-.SS "Backtracking verbs in assertions"
-.rs
-.sp
-(*FAIL) in an assertion has its normal effect: it forces an immediate backtrack.
-.P
-(*ACCEPT) in a positive assertion causes the assertion to succeed without any
-further processing. In a negative assertion, (*ACCEPT) causes the assertion to
-fail without any further processing.
-.P
-The other backtracking verbs are not treated specially if they appear in a
-positive assertion. In particular, (*THEN) skips to the next alternative in the
-innermost enclosing group that has alternations, whether or not this is within
-the assertion.
-.P
-Negative assertions are, however, different, in order to ensure that changing a
-positive assertion into a negative assertion changes its result. Backtracking
-into (*COMMIT), (*SKIP), or (*PRUNE) causes a negative assertion to be true,
-without considering any further alternative branches in the assertion.
-Backtracking into (*THEN) causes it to skip to the next enclosing alternative
-within the assertion (the normal behaviour), but if the assertion does not have
-such an alternative, (*THEN) behaves like (*PRUNE).
-.
-.
-.\" HTML <a name="btsub"></a>
-.SS "Backtracking verbs in subroutines"
-.rs
-.sp
-These behaviours occur whether or not the subpattern is called recursively.
-Perl's treatment of subroutines is different in some cases.
-.P
-(*FAIL) in a subpattern called as a subroutine has its normal effect: it forces
-an immediate backtrack.
-.P
-(*ACCEPT) in a subpattern called as a subroutine causes the subroutine match to
-succeed without any further processing. Matching then continues after the
-subroutine call.
-.P
-(*COMMIT), (*SKIP), and (*PRUNE) in a subpattern called as a subroutine cause
-the subroutine match to fail.
-.P
-(*THEN) skips to the next alternative in the innermost enclosing group within
-the subpattern that has alternatives. If there is no such group within the
-subpattern, (*THEN) causes the subroutine match to fail.
-.
-.
-.SH "SEE ALSO"
-.rs
-.sp
-\fBpcreapi\fP(3), \fBpcrecallout\fP(3), \fBpcrematching\fP(3),
-\fBpcresyntax\fP(3), \fBpcre\fP(3), \fBpcre16(3)\fP, \fBpcre32(3)\fP.
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 23 October 2016
-Copyright (c) 1997-2016 University of Cambridge.
-.fi
diff --git a/libs/Pcre16/docs/doc/pcreperform.3 b/libs/Pcre16/docs/doc/pcreperform.3
deleted file mode 100644
index fb2aa95926..0000000000
--- a/libs/Pcre16/docs/doc/pcreperform.3
+++ /dev/null
@@ -1,177 +0,0 @@
-.TH PCREPERFORM 3 "09 January 2012" "PCRE 8.30"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH "PCRE PERFORMANCE"
-.rs
-.sp
-Two aspects of performance are discussed below: memory usage and processing
-time. The way you express your pattern as a regular expression can affect both
-of them.
-.
-.SH "COMPILED PATTERN MEMORY USAGE"
-.rs
-.sp
-Patterns are compiled by PCRE into a reasonably efficient interpretive code, so
-that most simple patterns do not use much memory. However, there is one case
-where the memory usage of a compiled pattern can be unexpectedly large. If a
-parenthesized subpattern has a quantifier with a minimum greater than 1 and/or
-a limited maximum, the whole subpattern is repeated in the compiled code. For
-example, the pattern
-.sp
- (abc|def){2,4}
-.sp
-is compiled as if it were
-.sp
- (abc|def)(abc|def)((abc|def)(abc|def)?)?
-.sp
-(Technical aside: It is done this way so that backtrack points within each of
-the repetitions can be independently maintained.)
-.P
-For regular expressions whose quantifiers use only small numbers, this is not
-usually a problem. However, if the numbers are large, and particularly if such
-repetitions are nested, the memory usage can become an embarrassment. For
-example, the very simple pattern
-.sp
- ((ab){1,1000}c){1,3}
-.sp
-uses 51K bytes when compiled using the 8-bit library. When PCRE is compiled
-with its default internal pointer size of two bytes, the size limit on a
-compiled pattern is 64K data units, and this is reached with the above pattern
-if the outer repetition is increased from 3 to 4. PCRE can be compiled to use
-larger internal pointers and thus handle larger compiled patterns, but it is
-better to try to rewrite your pattern to use less memory if you can.
-.P
-One way of reducing the memory usage for such patterns is to make use of PCRE's
-.\" HTML <a href="pcrepattern.html#subpatternsassubroutines">
-.\" </a>
-"subroutine"
-.\"
-facility. Re-writing the above pattern as
-.sp
- ((ab)(?2){0,999}c)(?1){0,2}
-.sp
-reduces the memory requirements to 18K, and indeed it remains under 20K even
-with the outer repetition increased to 100. However, this pattern is not
-exactly equivalent, because the "subroutine" calls are treated as
-.\" HTML <a href="pcrepattern.html#atomicgroup">
-.\" </a>
-atomic groups
-.\"
-into which there can be no backtracking if there is a subsequent matching
-failure. Therefore, PCRE cannot do this kind of rewriting automatically.
-Furthermore, there is a noticeable loss of speed when executing the modified
-pattern. Nevertheless, if the atomic grouping is not a problem and the loss of
-speed is acceptable, this kind of rewriting will allow you to process patterns
-that PCRE cannot otherwise handle.
-.
-.
-.SH "STACK USAGE AT RUN TIME"
-.rs
-.sp
-When \fBpcre_exec()\fP or \fBpcre[16|32]_exec()\fP is used for matching, certain
-kinds of pattern can cause it to use large amounts of the process stack. In
-some environments the default process stack is quite small, and if it runs out
-the result is often SIGSEGV. This issue is probably the most frequently raised
-problem with PCRE. Rewriting your pattern can often help. The
-.\" HREF
-\fBpcrestack\fP
-.\"
-documentation discusses this issue in detail.
-.
-.
-.SH "PROCESSING TIME"
-.rs
-.sp
-Certain items in regular expression patterns are processed more efficiently
-than others. It is more efficient to use a character class like [aeiou] than a
-set of single-character alternatives such as (a|e|i|o|u). In general, the
-simplest construction that provides the required behaviour is usually the most
-efficient. Jeffrey Friedl's book contains a lot of useful general discussion
-about optimizing regular expressions for efficient performance. This document
-contains a few observations about PCRE.
-.P
-Using Unicode character properties (the \ep, \eP, and \eX escapes) is slow,
-because PCRE has to use a multi-stage table lookup whenever it needs a
-character's property. If you can find an alternative pattern that does not use
-character properties, it will probably be faster.
-.P
-By default, the escape sequences \eb, \ed, \es, and \ew, and the POSIX
-character classes such as [:alpha:] do not use Unicode properties, partly for
-backwards compatibility, and partly for performance reasons. However, you can
-set PCRE_UCP if you want Unicode character properties to be used. This can
-double the matching time for items such as \ed, when matched with
-a traditional matching function; the performance loss is less with
-a DFA matching function, and in both cases there is not much difference for
-\eb.
-.P
-When a pattern begins with .* not in parentheses, or in parentheses that are
-not the subject of a backreference, and the PCRE_DOTALL option is set, the
-pattern is implicitly anchored by PCRE, since it can match only at the start of
-a subject string. However, if PCRE_DOTALL is not set, PCRE cannot make this
-optimization, because the . metacharacter does not then match a newline, and if
-the subject string contains newlines, the pattern may match from the character
-immediately following one of them instead of from the very start. For example,
-the pattern
-.sp
- .*second
-.sp
-matches the subject "first\enand second" (where \en stands for a newline
-character), with the match starting at the seventh character. In order to do
-this, PCRE has to retry the match starting after every newline in the subject.
-.P
-If you are using such a pattern with subject strings that do not contain
-newlines, the best performance is obtained by setting PCRE_DOTALL, or starting
-the pattern with ^.* or ^.*? to indicate explicit anchoring. That saves PCRE
-from having to scan along the subject looking for a newline to restart at.
-.P
-Beware of patterns that contain nested indefinite repeats. These can take a
-long time to run when applied to a string that does not match. Consider the
-pattern fragment
-.sp
- ^(a+)*
-.sp
-This can match "aaaa" in 16 different ways, and this number increases very
-rapidly as the string gets longer. (The * repeat can match 0, 1, 2, 3, or 4
-times, and for each of those cases other than 0 or 4, the + repeats can match
-different numbers of times.) When the remainder of the pattern is such that the
-entire match is going to fail, PCRE has in principle to try every possible
-variation, and this can take an extremely long time, even for relatively short
-strings.
-.P
-An optimization catches some of the more simple cases such as
-.sp
- (a+)*b
-.sp
-where a literal character follows. Before embarking on the standard matching
-procedure, PCRE checks that there is a "b" later in the subject string, and if
-there is not, it fails the match immediately. However, when there is no
-following literal this optimization cannot be used. You can see the difference
-by comparing the behaviour of
-.sp
- (a+)*\ed
-.sp
-with the pattern above. The former gives a failure almost instantly when
-applied to a whole line of "a" characters, whereas the latter takes an
-appreciable time with strings longer than about 20 characters.
-.P
-In many cases, the solution to this kind of performance issue is to use an
-atomic group or a possessive quantifier.
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 25 August 2012
-Copyright (c) 1997-2012 University of Cambridge.
-.fi
diff --git a/libs/Pcre16/docs/doc/pcreposix.3 b/libs/Pcre16/docs/doc/pcreposix.3
deleted file mode 100644
index 77890f36b4..0000000000
--- a/libs/Pcre16/docs/doc/pcreposix.3
+++ /dev/null
@@ -1,267 +0,0 @@
-.TH PCREPOSIX 3 "09 January 2012" "PCRE 8.30"
-.SH NAME
-PCRE - Perl-compatible regular expressions.
-.SH "SYNOPSIS"
-.rs
-.sp
-.B #include <pcreposix.h>
-.PP
-.nf
-.B int regcomp(regex_t *\fIpreg\fP, const char *\fIpattern\fP,
-.B " int \fIcflags\fP);"
-.sp
-.B int regexec(regex_t *\fIpreg\fP, const char *\fIstring\fP,
-.B " size_t \fInmatch\fP, regmatch_t \fIpmatch\fP[], int \fIeflags\fP);"
-.B " size_t regerror(int \fIerrcode\fP, const regex_t *\fIpreg\fP,"
-.B " char *\fIerrbuf\fP, size_t \fIerrbuf_size\fP);"
-.sp
-.B void regfree(regex_t *\fIpreg\fP);
-.fi
-.
-.SH DESCRIPTION
-.rs
-.sp
-This set of functions provides a POSIX-style API for the PCRE regular
-expression 8-bit library. See the
-.\" HREF
-\fBpcreapi\fP
-.\"
-documentation for a description of PCRE's native API, which contains much
-additional functionality. There is no POSIX-style wrapper for PCRE's 16-bit
-and 32-bit library.
-.P
-The functions described here are just wrapper functions that ultimately call
-the PCRE native API. Their prototypes are defined in the \fBpcreposix.h\fP
-header file, and on Unix systems the library itself is called
-\fBpcreposix.a\fP, so can be accessed by adding \fB-lpcreposix\fP to the
-command for linking an application that uses them. Because the POSIX functions
-call the native ones, it is also necessary to add \fB-lpcre\fP.
-.P
-I have implemented only those POSIX option bits that can be reasonably mapped
-to PCRE native options. In addition, the option REG_EXTENDED is defined with
-the value zero. This has no effect, but since programs that are written to the
-POSIX interface often use it, this makes it easier to slot in PCRE as a
-replacement library. Other POSIX options are not even defined.
-.P
-There are also some other options that are not defined by POSIX. These have
-been added at the request of users who want to make use of certain
-PCRE-specific features via the POSIX calling interface.
-.P
-When PCRE is called via these functions, it is only the API that is POSIX-like
-in style. The syntax and semantics of the regular expressions themselves are
-still those of Perl, subject to the setting of various PCRE options, as
-described below. "POSIX-like in style" means that the API approximates to the
-POSIX definition; it is not fully POSIX-compatible, and in multi-byte encoding
-domains it is probably even less compatible.
-.P
-The header for these functions is supplied as \fBpcreposix.h\fP to avoid any
-potential clash with other POSIX libraries. It can, of course, be renamed or
-aliased as \fBregex.h\fP, which is the "correct" name. It provides two
-structure types, \fIregex_t\fP for compiled internal forms, and
-\fIregmatch_t\fP for returning captured substrings. It also defines some
-constants whose names start with "REG_"; these are used for setting options and
-identifying error codes.
-.
-.
-.SH "COMPILING A PATTERN"
-.rs
-.sp
-The function \fBregcomp()\fP is called to compile a pattern into an
-internal form. The pattern is a C string terminated by a binary zero, and
-is passed in the argument \fIpattern\fP. The \fIpreg\fP argument is a pointer
-to a \fBregex_t\fP structure that is used as a base for storing information
-about the compiled regular expression.
-.P
-The argument \fIcflags\fP is either zero, or contains one or more of the bits
-defined by the following macros:
-.sp
- REG_DOTALL
-.sp
-The PCRE_DOTALL option is set when the regular expression is passed for
-compilation to the native function. Note that REG_DOTALL is not part of the
-POSIX standard.
-.sp
- REG_ICASE
-.sp
-The PCRE_CASELESS option is set when the regular expression is passed for
-compilation to the native function.
-.sp
- REG_NEWLINE
-.sp
-The PCRE_MULTILINE option is set when the regular expression is passed for
-compilation to the native function. Note that this does \fInot\fP mimic the
-defined POSIX behaviour for REG_NEWLINE (see the following section).
-.sp
- REG_NOSUB
-.sp
-The PCRE_NO_AUTO_CAPTURE option is set when the regular expression is passed
-for compilation to the native function. In addition, when a pattern that is
-compiled with this flag is passed to \fBregexec()\fP for matching, the
-\fInmatch\fP and \fIpmatch\fP arguments are ignored, and no captured strings
-are returned.
-.sp
- REG_UCP
-.sp
-The PCRE_UCP option is set when the regular expression is passed for
-compilation to the native function. This causes PCRE to use Unicode properties
-when matchine \ed, \ew, etc., instead of just recognizing ASCII values. Note
-that REG_UTF8 is not part of the POSIX standard.
-.sp
- REG_UNGREEDY
-.sp
-The PCRE_UNGREEDY option is set when the regular expression is passed for
-compilation to the native function. Note that REG_UNGREEDY is not part of the
-POSIX standard.
-.sp
- REG_UTF8
-.sp
-The PCRE_UTF8 option is set when the regular expression is passed for
-compilation to the native function. This causes the pattern itself and all data
-strings used for matching it to be treated as UTF-8 strings. Note that REG_UTF8
-is not part of the POSIX standard.
-.P
-In the absence of these flags, no options are passed to the native function.
-This means the the regex is compiled with PCRE default semantics. In
-particular, the way it handles newline characters in the subject string is the
-Perl way, not the POSIX way. Note that setting PCRE_MULTILINE has only
-\fIsome\fP of the effects specified for REG_NEWLINE. It does not affect the way
-newlines are matched by . (they are not) or by a negative class such as [^a]
-(they are).
-.P
-The yield of \fBregcomp()\fP is zero on success, and non-zero otherwise. The
-\fIpreg\fP structure is filled in on success, and one member of the structure
-is public: \fIre_nsub\fP contains the number of capturing subpatterns in
-the regular expression. Various error codes are defined in the header file.
-.P
-NOTE: If the yield of \fBregcomp()\fP is non-zero, you must not attempt to
-use the contents of the \fIpreg\fP structure. If, for example, you pass it to
-\fBregexec()\fP, the result is undefined and your program is likely to crash.
-.
-.
-.SH "MATCHING NEWLINE CHARACTERS"
-.rs
-.sp
-This area is not simple, because POSIX and Perl take different views of things.
-It is not possible to get PCRE to obey POSIX semantics, but then PCRE was never
-intended to be a POSIX engine. The following table lists the different
-possibilities for matching newline characters in PCRE:
-.sp
- Default Change with
-.sp
- . matches newline no PCRE_DOTALL
- newline matches [^a] yes not changeable
- $ matches \en at end yes PCRE_DOLLARENDONLY
- $ matches \en in middle no PCRE_MULTILINE
- ^ matches \en in middle no PCRE_MULTILINE
-.sp
-This is the equivalent table for POSIX:
-.sp
- Default Change with
-.sp
- . matches newline yes REG_NEWLINE
- newline matches [^a] yes REG_NEWLINE
- $ matches \en at end no REG_NEWLINE
- $ matches \en in middle no REG_NEWLINE
- ^ matches \en in middle no REG_NEWLINE
-.sp
-PCRE's behaviour is the same as Perl's, except that there is no equivalent for
-PCRE_DOLLAR_ENDONLY in Perl. In both PCRE and Perl, there is no way to stop
-newline from matching [^a].
-.P
-The default POSIX newline handling can be obtained by setting PCRE_DOTALL and
-PCRE_DOLLAR_ENDONLY, but there is no way to make PCRE behave exactly as for the
-REG_NEWLINE action.
-.
-.
-.SH "MATCHING A PATTERN"
-.rs
-.sp
-The function \fBregexec()\fP is called to match a compiled pattern \fIpreg\fP
-against a given \fIstring\fP, which is by default terminated by a zero byte
-(but see REG_STARTEND below), subject to the options in \fIeflags\fP. These can
-be:
-.sp
- REG_NOTBOL
-.sp
-The PCRE_NOTBOL option is set when calling the underlying PCRE matching
-function.
-.sp
- REG_NOTEMPTY
-.sp
-The PCRE_NOTEMPTY option is set when calling the underlying PCRE matching
-function. Note that REG_NOTEMPTY is not part of the POSIX standard. However,
-setting this option can give more POSIX-like behaviour in some situations.
-.sp
- REG_NOTEOL
-.sp
-The PCRE_NOTEOL option is set when calling the underlying PCRE matching
-function.
-.sp
- REG_STARTEND
-.sp
-The string is considered to start at \fIstring\fP + \fIpmatch[0].rm_so\fP and
-to have a terminating NUL located at \fIstring\fP + \fIpmatch[0].rm_eo\fP
-(there need not actually be a NUL at that location), regardless of the value of
-\fInmatch\fP. This is a BSD extension, compatible with but not specified by
-IEEE Standard 1003.2 (POSIX.2), and should be used with caution in software
-intended to be portable to other systems. Note that a non-zero \fIrm_so\fP does
-not imply REG_NOTBOL; REG_STARTEND affects only the location of the string, not
-how it is matched.
-.P
-If the pattern was compiled with the REG_NOSUB flag, no data about any matched
-strings is returned. The \fInmatch\fP and \fIpmatch\fP arguments of
-\fBregexec()\fP are ignored.
-.P
-If the value of \fInmatch\fP is zero, or if the value \fIpmatch\fP is NULL,
-no data about any matched strings is returned.
-.P
-Otherwise,the portion of the string that was matched, and also any captured
-substrings, are returned via the \fIpmatch\fP argument, which points to an
-array of \fInmatch\fP structures of type \fIregmatch_t\fP, containing the
-members \fIrm_so\fP and \fIrm_eo\fP. These contain the offset to the first
-character of each substring and the offset to the first character after the end
-of each substring, respectively. The 0th element of the vector relates to the
-entire portion of \fIstring\fP that was matched; subsequent elements relate to
-the capturing subpatterns of the regular expression. Unused entries in the
-array have both structure members set to -1.
-.P
-A successful match yields a zero return; various error codes are defined in the
-header file, of which REG_NOMATCH is the "expected" failure code.
-.
-.
-.SH "ERROR MESSAGES"
-.rs
-.sp
-The \fBregerror()\fP function maps a non-zero errorcode from either
-\fBregcomp()\fP or \fBregexec()\fP to a printable message. If \fIpreg\fP is not
-NULL, the error should have arisen from the use of that structure. A message
-terminated by a binary zero is placed in \fIerrbuf\fP. The length of the
-message, including the zero, is limited to \fIerrbuf_size\fP. The yield of the
-function is the size of buffer needed to hold the whole message.
-.
-.
-.SH MEMORY USAGE
-.rs
-.sp
-Compiling a regular expression causes memory to be allocated and associated
-with the \fIpreg\fP structure. The function \fBregfree()\fP frees all such
-memory, after which \fIpreg\fP may no longer be used as a compiled expression.
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 09 January 2012
-Copyright (c) 1997-2012 University of Cambridge.
-.fi
diff --git a/libs/Pcre16/docs/doc/pcreprecompile.3 b/libs/Pcre16/docs/doc/pcreprecompile.3
deleted file mode 100644
index 40f257a98c..0000000000
--- a/libs/Pcre16/docs/doc/pcreprecompile.3
+++ /dev/null
@@ -1,155 +0,0 @@
-.TH PCREPRECOMPILE 3 "12 November 2013" "PCRE 8.34"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH "SAVING AND RE-USING PRECOMPILED PCRE PATTERNS"
-.rs
-.sp
-If you are running an application that uses a large number of regular
-expression patterns, it may be useful to store them in a precompiled form
-instead of having to compile them every time the application is run.
-If you are not using any private character tables (see the
-.\" HREF
-\fBpcre_maketables()\fP
-.\"
-documentation), this is relatively straightforward. If you are using private
-tables, it is a little bit more complicated. However, if you are using the
-just-in-time optimization feature, it is not possible to save and reload the
-JIT data.
-.P
-If you save compiled patterns to a file, you can copy them to a different host
-and run them there. If the two hosts have different endianness (byte order),
-you should run the \fBpcre[16|32]_pattern_to_host_byte_order()\fP function on the
-new host before trying to match the pattern. The matching functions return
-PCRE_ERROR_BADENDIANNESS if they detect a pattern with the wrong endianness.
-.P
-Compiling regular expressions with one version of PCRE for use with a different
-version is not guaranteed to work and may cause crashes, and saving and
-restoring a compiled pattern loses any JIT optimization data.
-.
-.
-.SH "SAVING A COMPILED PATTERN"
-.rs
-.sp
-The value returned by \fBpcre[16|32]_compile()\fP points to a single block of
-memory that holds the compiled pattern and associated data. You can find the
-length of this block in bytes by calling \fBpcre[16|32]_fullinfo()\fP with an
-argument of PCRE_INFO_SIZE. You can then save the data in any appropriate
-manner. Here is sample code for the 8-bit library that compiles a pattern and
-writes it to a file. It assumes that the variable \fIfd\fP refers to a file
-that is open for output:
-.sp
- int erroroffset, rc, size;
- char *error;
- pcre *re;
-.sp
- re = pcre_compile("my pattern", 0, &error, &erroroffset, NULL);
- if (re == NULL) { ... handle errors ... }
- rc = pcre_fullinfo(re, NULL, PCRE_INFO_SIZE, &size);
- if (rc < 0) { ... handle errors ... }
- rc = fwrite(re, 1, size, fd);
- if (rc != size) { ... handle errors ... }
-.sp
-In this example, the bytes that comprise the compiled pattern are copied
-exactly. Note that this is binary data that may contain any of the 256 possible
-byte values. On systems that make a distinction between binary and non-binary
-data, be sure that the file is opened for binary output.
-.P
-If you want to write more than one pattern to a file, you will have to devise a
-way of separating them. For binary data, preceding each pattern with its length
-is probably the most straightforward approach. Another possibility is to write
-out the data in hexadecimal instead of binary, one pattern to a line.
-.P
-Saving compiled patterns in a file is only one possible way of storing them for
-later use. They could equally well be saved in a database, or in the memory of
-some daemon process that passes them via sockets to the processes that want
-them.
-.P
-If the pattern has been studied, it is also possible to save the normal study
-data in a similar way to the compiled pattern itself. However, if the
-PCRE_STUDY_JIT_COMPILE was used, the just-in-time data that is created cannot
-be saved because it is too dependent on the current environment. When studying
-generates additional information, \fBpcre[16|32]_study()\fP returns a pointer to a
-\fBpcre[16|32]_extra\fP data block. Its format is defined in the
-.\" HTML <a href="pcreapi.html#extradata">
-.\" </a>
-section on matching a pattern
-.\"
-in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-documentation. The \fIstudy_data\fP field points to the binary study data, and
-this is what you must save (not the \fBpcre[16|32]_extra\fP block itself). The
-length of the study data can be obtained by calling \fBpcre[16|32]_fullinfo()\fP
-with an argument of PCRE_INFO_STUDYSIZE. Remember to check that
-\fBpcre[16|32]_study()\fP did return a non-NULL value before trying to save the
-study data.
-.
-.
-.SH "RE-USING A PRECOMPILED PATTERN"
-.rs
-.sp
-Re-using a precompiled pattern is straightforward. Having reloaded it into main
-memory, called \fBpcre[16|32]_pattern_to_host_byte_order()\fP if necessary, you
-pass its pointer to \fBpcre[16|32]_exec()\fP or \fBpcre[16|32]_dfa_exec()\fP in
-the usual way.
-.P
-However, if you passed a pointer to custom character tables when the pattern
-was compiled (the \fItableptr\fP argument of \fBpcre[16|32]_compile()\fP), you
-must now pass a similar pointer to \fBpcre[16|32]_exec()\fP or
-\fBpcre[16|32]_dfa_exec()\fP, because the value saved with the compiled pattern
-will obviously be nonsense. A field in a \fBpcre[16|32]_extra()\fP block is used
-to pass this data, as described in the
-.\" HTML <a href="pcreapi.html#extradata">
-.\" </a>
-section on matching a pattern
-.\"
-in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-documentation.
-.P
-\fBWarning:\fP The tables that \fBpcre_exec()\fP and \fBpcre_dfa_exec()\fP use
-must be the same as those that were used when the pattern was compiled. If this
-is not the case, the behaviour is undefined.
-.P
-If you did not provide custom character tables when the pattern was compiled,
-the pointer in the compiled pattern is NULL, which causes the matching
-functions to use PCRE's internal tables. Thus, you do not need to take any
-special action at run time in this case.
-.P
-If you saved study data with the compiled pattern, you need to create your own
-\fBpcre[16|32]_extra\fP data block and set the \fIstudy_data\fP field to point
-to the reloaded study data. You must also set the PCRE_EXTRA_STUDY_DATA bit in
-the \fIflags\fP field to indicate that study data is present. Then pass the
-\fBpcre[16|32]_extra\fP block to the matching function in the usual way. If the
-pattern was studied for just-in-time optimization, that data cannot be saved,
-and so is lost by a save/restore cycle.
-.
-.
-.SH "COMPATIBILITY WITH DIFFERENT PCRE RELEASES"
-.rs
-.sp
-In general, it is safest to recompile all saved patterns when you update to a
-new PCRE release, though not all updates actually require this.
-.
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 12 November 2013
-Copyright (c) 1997-2013 University of Cambridge.
-.fi
diff --git a/libs/Pcre16/docs/doc/pcresample.3 b/libs/Pcre16/docs/doc/pcresample.3
deleted file mode 100644
index d7fe7ec546..0000000000
--- a/libs/Pcre16/docs/doc/pcresample.3
+++ /dev/null
@@ -1,99 +0,0 @@
-.TH PCRESAMPLE 3 "10 January 2012" "PCRE 8.30"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH "PCRE SAMPLE PROGRAM"
-.rs
-.sp
-A simple, complete demonstration program, to get you started with using PCRE,
-is supplied in the file \fIpcredemo.c\fP in the PCRE distribution. A listing of
-this program is given in the
-.\" HREF
-\fBpcredemo\fP
-.\"
-documentation. If you do not have a copy of the PCRE distribution, you can save
-this listing to re-create \fIpcredemo.c\fP.
-.P
-The demonstration program, which uses the original PCRE 8-bit library, compiles
-the regular expression that is its first argument, and matches it against the
-subject string in its second argument. No PCRE options are set, and default
-character tables are used. If matching succeeds, the program outputs the
-portion of the subject that matched, together with the contents of any captured
-substrings.
-.P
-If the -g option is given on the command line, the program then goes on to
-check for further matches of the same regular expression in the same subject
-string. The logic is a little bit tricky because of the possibility of matching
-an empty string. Comments in the code explain what is going on.
-.P
-If PCRE is installed in the standard include and library directories for your
-operating system, you should be able to compile the demonstration program using
-this command:
-.sp
- gcc -o pcredemo pcredemo.c -lpcre
-.sp
-If PCRE is installed elsewhere, you may need to add additional options to the
-command line. For example, on a Unix-like system that has PCRE installed in
-\fI/usr/local\fP, you can compile the demonstration program using a command
-like this:
-.sp
-.\" JOINSH
- gcc -o pcredemo -I/usr/local/include pcredemo.c \e
- -L/usr/local/lib -lpcre
-.sp
-In a Windows environment, if you want to statically link the program against a
-non-dll \fBpcre.a\fP file, you must uncomment the line that defines PCRE_STATIC
-before including \fBpcre.h\fP, because otherwise the \fBpcre_malloc()\fP and
-\fBpcre_free()\fP exported functions will be declared
-\fB__declspec(dllimport)\fP, with unwanted results.
-.P
-Once you have compiled and linked the demonstration program, you can run simple
-tests like this:
-.sp
- ./pcredemo 'cat|dog' 'the cat sat on the mat'
- ./pcredemo -g 'cat|dog' 'the dog sat on the cat'
-.sp
-Note that there is a much more comprehensive test program, called
-.\" HREF
-\fBpcretest\fP,
-.\"
-which supports many more facilities for testing regular expressions and both
-PCRE libraries. The
-.\" HREF
-\fBpcredemo\fP
-.\"
-program is provided as a simple coding example.
-.P
-If you try to run
-.\" HREF
-\fBpcredemo\fP
-.\"
-when PCRE is not installed in the standard library directory, you may get an
-error like this on some operating systems (e.g. Solaris):
-.sp
- ld.so.1: a.out: fatal: libpcre.so.0: open failed: No such file or directory
-.sp
-This is caused by the way shared library support works on those systems. You
-need to add
-.sp
- -R/usr/local/lib
-.sp
-(for example) to the compile command to get round this problem.
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 10 January 2012
-Copyright (c) 1997-2012 University of Cambridge.
-.fi
diff --git a/libs/Pcre16/docs/doc/pcrestack.3 b/libs/Pcre16/docs/doc/pcrestack.3
deleted file mode 100644
index 798f0bca63..0000000000
--- a/libs/Pcre16/docs/doc/pcrestack.3
+++ /dev/null
@@ -1,215 +0,0 @@
-.TH PCRESTACK 3 "24 June 2012" "PCRE 8.30"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH "PCRE DISCUSSION OF STACK USAGE"
-.rs
-.sp
-When you call \fBpcre[16|32]_exec()\fP, it makes use of an internal function
-called \fBmatch()\fP. This calls itself recursively at branch points in the
-pattern, in order to remember the state of the match so that it can back up and
-try a different alternative if the first one fails. As matching proceeds deeper
-and deeper into the tree of possibilities, the recursion depth increases. The
-\fBmatch()\fP function is also called in other circumstances, for example,
-whenever a parenthesized sub-pattern is entered, and in certain cases of
-repetition.
-.P
-Not all calls of \fBmatch()\fP increase the recursion depth; for an item such
-as a* it may be called several times at the same level, after matching
-different numbers of a's. Furthermore, in a number of cases where the result of
-the recursive call would immediately be passed back as the result of the
-current call (a "tail recursion"), the function is just restarted instead.
-.P
-The above comments apply when \fBpcre[16|32]_exec()\fP is run in its normal
-interpretive manner. If the pattern was studied with the
-PCRE_STUDY_JIT_COMPILE option, and just-in-time compiling was successful, and
-the options passed to \fBpcre[16|32]_exec()\fP were not incompatible, the matching
-process uses the JIT-compiled code instead of the \fBmatch()\fP function. In
-this case, the memory requirements are handled entirely differently. See the
-.\" HREF
-\fBpcrejit\fP
-.\"
-documentation for details.
-.P
-The \fBpcre[16|32]_dfa_exec()\fP function operates in an entirely different way,
-and uses recursion only when there is a regular expression recursion or
-subroutine call in the pattern. This includes the processing of assertion and
-"once-only" subpatterns, which are handled like subroutine calls. Normally,
-these are never very deep, and the limit on the complexity of
-\fBpcre[16|32]_dfa_exec()\fP is controlled by the amount of workspace it is given.
-However, it is possible to write patterns with runaway infinite recursions;
-such patterns will cause \fBpcre[16|32]_dfa_exec()\fP to run out of stack. At
-present, there is no protection against this.
-.P
-The comments that follow do NOT apply to \fBpcre[16|32]_dfa_exec()\fP; they are
-relevant only for \fBpcre[16|32]_exec()\fP without the JIT optimization.
-.
-.
-.SS "Reducing \fBpcre[16|32]_exec()\fP's stack usage"
-.rs
-.sp
-Each time that \fBmatch()\fP is actually called recursively, it uses memory
-from the process stack. For certain kinds of pattern and data, very large
-amounts of stack may be needed, despite the recognition of "tail recursion".
-You can often reduce the amount of recursion, and therefore the amount of stack
-used, by modifying the pattern that is being matched. Consider, for example,
-this pattern:
-.sp
- ([^<]|<(?!inet))+
-.sp
-It matches from wherever it starts until it encounters "<inet" or the end of
-the data, and is the kind of pattern that might be used when processing an XML
-file. Each iteration of the outer parentheses matches either one character that
-is not "<" or a "<" that is not followed by "inet". However, each time a
-parenthesis is processed, a recursion occurs, so this formulation uses a stack
-frame for each matched character. For a long string, a lot of stack is
-required. Consider now this rewritten pattern, which matches exactly the same
-strings:
-.sp
- ([^<]++|<(?!inet))+
-.sp
-This uses very much less stack, because runs of characters that do not contain
-"<" are "swallowed" in one item inside the parentheses. Recursion happens only
-when a "<" character that is not followed by "inet" is encountered (and we
-assume this is relatively rare). A possessive quantifier is used to stop any
-backtracking into the runs of non-"<" characters, but that is not related to
-stack usage.
-.P
-This example shows that one way of avoiding stack problems when matching long
-subject strings is to write repeated parenthesized subpatterns to match more
-than one character whenever possible.
-.
-.
-.SS "Compiling PCRE to use heap instead of stack for \fBpcre[16|32]_exec()\fP"
-.rs
-.sp
-In environments where stack memory is constrained, you might want to compile
-PCRE to use heap memory instead of stack for remembering back-up points when
-\fBpcre[16|32]_exec()\fP is running. This makes it run a lot more slowly, however.
-Details of how to do this are given in the
-.\" HREF
-\fBpcrebuild\fP
-.\"
-documentation. When built in this way, instead of using the stack, PCRE obtains
-and frees memory by calling the functions that are pointed to by the
-\fBpcre[16|32]_stack_malloc\fP and \fBpcre[16|32]_stack_free\fP variables. By
-default, these point to \fBmalloc()\fP and \fBfree()\fP, but you can replace
-the pointers to cause PCRE to use your own functions. Since the block sizes are
-always the same, and are always freed in reverse order, it may be possible to
-implement customized memory handlers that are more efficient than the standard
-functions.
-.
-.
-.SS "Limiting \fBpcre[16|32]_exec()\fP's stack usage"
-.rs
-.sp
-You can set limits on the number of times that \fBmatch()\fP is called, both in
-total and recursively. If a limit is exceeded, \fBpcre[16|32]_exec()\fP returns an
-error code. Setting suitable limits should prevent it from running out of
-stack. The default values of the limits are very large, and unlikely ever to
-operate. They can be changed when PCRE is built, and they can also be set when
-\fBpcre[16|32]_exec()\fP is called. For details of these interfaces, see the
-.\" HREF
-\fBpcrebuild\fP
-.\"
-documentation and the
-.\" HTML <a href="pcreapi.html#extradata">
-.\" </a>
-section on extra data for \fBpcre[16|32]_exec()\fP
-.\"
-in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-documentation.
-.P
-As a very rough rule of thumb, you should reckon on about 500 bytes per
-recursion. Thus, if you want to limit your stack usage to 8Mb, you should set
-the limit at 16000 recursions. A 64Mb stack, on the other hand, can support
-around 128000 recursions.
-.P
-In Unix-like environments, the \fBpcretest\fP test program has a command line
-option (\fB-S\fP) that can be used to increase the size of its stack. As long
-as the stack is large enough, another option (\fB-M\fP) can be used to find the
-smallest limits that allow a particular pattern to match a given subject
-string. This is done by calling \fBpcre[16|32]_exec()\fP repeatedly with different
-limits.
-.
-.
-.SS "Obtaining an estimate of stack usage"
-.rs
-.sp
-The actual amount of stack used per recursion can vary quite a lot, depending
-on the compiler that was used to build PCRE and the optimization or debugging
-options that were set for it. The rule of thumb value of 500 bytes mentioned
-above may be larger or smaller than what is actually needed. A better
-approximation can be obtained by running this command:
-.sp
- pcretest -m -C
-.sp
-The \fB-C\fP option causes \fBpcretest\fP to output information about the
-options with which PCRE was compiled. When \fB-m\fP is also given (before
-\fB-C\fP), information about stack use is given in a line like this:
-.sp
- Match recursion uses stack: approximate frame size = 640 bytes
-.sp
-The value is approximate because some recursions need a bit more (up to perhaps
-16 more bytes).
-.P
-If the above command is given when PCRE is compiled to use the heap instead of
-the stack for recursion, the value that is output is the size of each block
-that is obtained from the heap.
-.
-.
-.SS "Changing stack size in Unix-like systems"
-.rs
-.sp
-In Unix-like environments, there is not often a problem with the stack unless
-very long strings are involved, though the default limit on stack size varies
-from system to system. Values from 8Mb to 64Mb are common. You can find your
-default limit by running the command:
-.sp
- ulimit -s
-.sp
-Unfortunately, the effect of running out of stack is often SIGSEGV, though
-sometimes a more explicit error message is given. You can normally increase the
-limit on stack size by code such as this:
-.sp
- struct rlimit rlim;
- getrlimit(RLIMIT_STACK, &rlim);
- rlim.rlim_cur = 100*1024*1024;
- setrlimit(RLIMIT_STACK, &rlim);
-.sp
-This reads the current limits (soft and hard) using \fBgetrlimit()\fP, then
-attempts to increase the soft limit to 100Mb using \fBsetrlimit()\fP. You must
-do this before calling \fBpcre[16|32]_exec()\fP.
-.
-.
-.SS "Changing stack size in Mac OS X"
-.rs
-.sp
-Using \fBsetrlimit()\fP, as described above, should also work on Mac OS X. It
-is also possible to set a stack size when linking a program. There is a
-discussion about stack sizes in Mac OS X at this web site:
-.\" HTML <a href="http://developer.apple.com/qa/qa2005/qa1419.html">
-.\" </a>
-http://developer.apple.com/qa/qa2005/qa1419.html.
-.\"
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 24 June 2012
-Copyright (c) 1997-2012 University of Cambridge.
-.fi
diff --git a/libs/Pcre16/docs/doc/pcresyntax.3 b/libs/Pcre16/docs/doc/pcresyntax.3
deleted file mode 100644
index 0850369f7a..0000000000
--- a/libs/Pcre16/docs/doc/pcresyntax.3
+++ /dev/null
@@ -1,540 +0,0 @@
-.TH PCRESYNTAX 3 "08 January 2014" "PCRE 8.35"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH "PCRE REGULAR EXPRESSION SYNTAX SUMMARY"
-.rs
-.sp
-The full syntax and semantics of the regular expressions that are supported by
-PCRE are described in the
-.\" HREF
-\fBpcrepattern\fP
-.\"
-documentation. This document contains a quick-reference summary of the syntax.
-.
-.
-.SH "QUOTING"
-.rs
-.sp
- \ex where x is non-alphanumeric is a literal x
- \eQ...\eE treat enclosed characters as literal
-.
-.
-.SH "CHARACTERS"
-.rs
-.sp
- \ea alarm, that is, the BEL character (hex 07)
- \ecx "control-x", where x is any ASCII character
- \ee escape (hex 1B)
- \ef form feed (hex 0C)
- \en newline (hex 0A)
- \er carriage return (hex 0D)
- \et tab (hex 09)
- \e0dd character with octal code 0dd
- \eddd character with octal code ddd, or backreference
- \eo{ddd..} character with octal code ddd..
- \exhh character with hex code hh
- \ex{hhh..} character with hex code hhh..
-.sp
-Note that \e0dd is always an octal code, and that \e8 and \e9 are the literal
-characters "8" and "9".
-.
-.
-.SH "CHARACTER TYPES"
-.rs
-.sp
- . any character except newline;
- in dotall mode, any character whatsoever
- \eC one data unit, even in UTF mode (best avoided)
- \ed a decimal digit
- \eD a character that is not a decimal digit
- \eh a horizontal white space character
- \eH a character that is not a horizontal white space character
- \eN a character that is not a newline
- \ep{\fIxx\fP} a character with the \fIxx\fP property
- \eP{\fIxx\fP} a character without the \fIxx\fP property
- \eR a newline sequence
- \es a white space character
- \eS a character that is not a white space character
- \ev a vertical white space character
- \eV a character that is not a vertical white space character
- \ew a "word" character
- \eW a "non-word" character
- \eX a Unicode extended grapheme cluster
-.sp
-By default, \ed, \es, and \ew match only ASCII characters, even in UTF-8 mode
-or in the 16- bit and 32-bit libraries. However, if locale-specific matching is
-happening, \es and \ew may also match characters with code points in the range
-128-255. If the PCRE_UCP option is set, the behaviour of these escape sequences
-is changed to use Unicode properties and they match many more characters.
-.
-.
-.SH "GENERAL CATEGORY PROPERTIES FOR \ep and \eP"
-.rs
-.sp
- C Other
- Cc Control
- Cf Format
- Cn Unassigned
- Co Private use
- Cs Surrogate
-.sp
- L Letter
- Ll Lower case letter
- Lm Modifier letter
- Lo Other letter
- Lt Title case letter
- Lu Upper case letter
- L& Ll, Lu, or Lt
-.sp
- M Mark
- Mc Spacing mark
- Me Enclosing mark
- Mn Non-spacing mark
-.sp
- N Number
- Nd Decimal number
- Nl Letter number
- No Other number
-.sp
- P Punctuation
- Pc Connector punctuation
- Pd Dash punctuation
- Pe Close punctuation
- Pf Final punctuation
- Pi Initial punctuation
- Po Other punctuation
- Ps Open punctuation
-.sp
- S Symbol
- Sc Currency symbol
- Sk Modifier symbol
- Sm Mathematical symbol
- So Other symbol
-.sp
- Z Separator
- Zl Line separator
- Zp Paragraph separator
- Zs Space separator
-.
-.
-.SH "PCRE SPECIAL CATEGORY PROPERTIES FOR \ep and \eP"
-.rs
-.sp
- Xan Alphanumeric: union of properties L and N
- Xps POSIX space: property Z or tab, NL, VT, FF, CR
- Xsp Perl space: property Z or tab, NL, VT, FF, CR
- Xuc Univerally-named character: one that can be
- represented by a Universal Character Name
- Xwd Perl word: property Xan or underscore
-.sp
-Perl and POSIX space are now the same. Perl added VT to its space character set
-at release 5.18 and PCRE changed at release 8.34.
-.
-.
-.SH "SCRIPT NAMES FOR \ep AND \eP"
-.rs
-.sp
-Arabic,
-Armenian,
-Avestan,
-Balinese,
-Bamum,
-Bassa_Vah,
-Batak,
-Bengali,
-Bopomofo,
-Brahmi,
-Braille,
-Buginese,
-Buhid,
-Canadian_Aboriginal,
-Carian,
-Caucasian_Albanian,
-Chakma,
-Cham,
-Cherokee,
-Common,
-Coptic,
-Cuneiform,
-Cypriot,
-Cyrillic,
-Deseret,
-Devanagari,
-Duployan,
-Egyptian_Hieroglyphs,
-Elbasan,
-Ethiopic,
-Georgian,
-Glagolitic,
-Gothic,
-Grantha,
-Greek,
-Gujarati,
-Gurmukhi,
-Han,
-Hangul,
-Hanunoo,
-Hebrew,
-Hiragana,
-Imperial_Aramaic,
-Inherited,
-Inscriptional_Pahlavi,
-Inscriptional_Parthian,
-Javanese,
-Kaithi,
-Kannada,
-Katakana,
-Kayah_Li,
-Kharoshthi,
-Khmer,
-Khojki,
-Khudawadi,
-Lao,
-Latin,
-Lepcha,
-Limbu,
-Linear_A,
-Linear_B,
-Lisu,
-Lycian,
-Lydian,
-Mahajani,
-Malayalam,
-Mandaic,
-Manichaean,
-Meetei_Mayek,
-Mende_Kikakui,
-Meroitic_Cursive,
-Meroitic_Hieroglyphs,
-Miao,
-Modi,
-Mongolian,
-Mro,
-Myanmar,
-Nabataean,
-New_Tai_Lue,
-Nko,
-Ogham,
-Ol_Chiki,
-Old_Italic,
-Old_North_Arabian,
-Old_Permic,
-Old_Persian,
-Old_South_Arabian,
-Old_Turkic,
-Oriya,
-Osmanya,
-Pahawh_Hmong,
-Palmyrene,
-Pau_Cin_Hau,
-Phags_Pa,
-Phoenician,
-Psalter_Pahlavi,
-Rejang,
-Runic,
-Samaritan,
-Saurashtra,
-Sharada,
-Shavian,
-Siddham,
-Sinhala,
-Sora_Sompeng,
-Sundanese,
-Syloti_Nagri,
-Syriac,
-Tagalog,
-Tagbanwa,
-Tai_Le,
-Tai_Tham,
-Tai_Viet,
-Takri,
-Tamil,
-Telugu,
-Thaana,
-Thai,
-Tibetan,
-Tifinagh,
-Tirhuta,
-Ugaritic,
-Vai,
-Warang_Citi,
-Yi.
-.
-.
-.SH "CHARACTER CLASSES"
-.rs
-.sp
- [...] positive character class
- [^...] negative character class
- [x-y] range (can be used for hex characters)
- [[:xxx:]] positive POSIX named set
- [[:^xxx:]] negative POSIX named set
-.sp
- alnum alphanumeric
- alpha alphabetic
- ascii 0-127
- blank space or tab
- cntrl control character
- digit decimal digit
- graph printing, excluding space
- lower lower case letter
- print printing, including space
- punct printing, excluding alphanumeric
- space white space
- upper upper case letter
- word same as \ew
- xdigit hexadecimal digit
-.sp
-In PCRE, POSIX character set names recognize only ASCII characters by default,
-but some of them use Unicode properties if PCRE_UCP is set. You can use
-\eQ...\eE inside a character class.
-.
-.
-.SH "QUANTIFIERS"
-.rs
-.sp
- ? 0 or 1, greedy
- ?+ 0 or 1, possessive
- ?? 0 or 1, lazy
- * 0 or more, greedy
- *+ 0 or more, possessive
- *? 0 or more, lazy
- + 1 or more, greedy
- ++ 1 or more, possessive
- +? 1 or more, lazy
- {n} exactly n
- {n,m} at least n, no more than m, greedy
- {n,m}+ at least n, no more than m, possessive
- {n,m}? at least n, no more than m, lazy
- {n,} n or more, greedy
- {n,}+ n or more, possessive
- {n,}? n or more, lazy
-.
-.
-.SH "ANCHORS AND SIMPLE ASSERTIONS"
-.rs
-.sp
- \eb word boundary
- \eB not a word boundary
- ^ start of subject
- also after internal newline in multiline mode
- \eA start of subject
- $ end of subject
- also before newline at end of subject
- also before internal newline in multiline mode
- \eZ end of subject
- also before newline at end of subject
- \ez end of subject
- \eG first matching position in subject
-.
-.
-.SH "MATCH POINT RESET"
-.rs
-.sp
- \eK reset start of match
-.sp
-\eK is honoured in positive assertions, but ignored in negative ones.
-.
-.
-.SH "ALTERNATION"
-.rs
-.sp
- expr|expr|expr...
-.
-.
-.SH "CAPTURING"
-.rs
-.sp
- (...) capturing group
- (?<name>...) named capturing group (Perl)
- (?'name'...) named capturing group (Perl)
- (?P<name>...) named capturing group (Python)
- (?:...) non-capturing group
- (?|...) non-capturing group; reset group numbers for
- capturing groups in each alternative
-.
-.
-.SH "ATOMIC GROUPS"
-.rs
-.sp
- (?>...) atomic, non-capturing group
-.
-.
-.
-.
-.SH "COMMENT"
-.rs
-.sp
- (?#....) comment (not nestable)
-.
-.
-.SH "OPTION SETTING"
-.rs
-.sp
- (?i) caseless
- (?J) allow duplicate names
- (?m) multiline
- (?s) single line (dotall)
- (?U) default ungreedy (lazy)
- (?x) extended (ignore white space)
- (?-...) unset option(s)
-.sp
-The following are recognized only at the very start of a pattern or after one
-of the newline or \eR options with similar syntax. More than one of them may
-appear.
-.sp
- (*LIMIT_MATCH=d) set the match limit to d (decimal number)
- (*LIMIT_RECURSION=d) set the recursion limit to d (decimal number)
- (*NO_AUTO_POSSESS) no auto-possessification (PCRE_NO_AUTO_POSSESS)
- (*NO_START_OPT) no start-match optimization (PCRE_NO_START_OPTIMIZE)
- (*UTF8) set UTF-8 mode: 8-bit library (PCRE_UTF8)
- (*UTF16) set UTF-16 mode: 16-bit library (PCRE_UTF16)
- (*UTF32) set UTF-32 mode: 32-bit library (PCRE_UTF32)
- (*UTF) set appropriate UTF mode for the library in use
- (*UCP) set PCRE_UCP (use Unicode properties for \ed etc)
-.sp
-Note that LIMIT_MATCH and LIMIT_RECURSION can only reduce the value of the
-limits set by the caller of pcre_exec(), not increase them.
-.
-.
-.SH "NEWLINE CONVENTION"
-.rs
-.sp
-These are recognized only at the very start of the pattern or after option
-settings with a similar syntax.
-.sp
- (*CR) carriage return only
- (*LF) linefeed only
- (*CRLF) carriage return followed by linefeed
- (*ANYCRLF) all three of the above
- (*ANY) any Unicode newline sequence
-.
-.
-.SH "WHAT \eR MATCHES"
-.rs
-.sp
-These are recognized only at the very start of the pattern or after option
-setting with a similar syntax.
-.sp
- (*BSR_ANYCRLF) CR, LF, or CRLF
- (*BSR_UNICODE) any Unicode newline sequence
-.
-.
-.SH "LOOKAHEAD AND LOOKBEHIND ASSERTIONS"
-.rs
-.sp
- (?=...) positive look ahead
- (?!...) negative look ahead
- (?<=...) positive look behind
- (?<!...) negative look behind
-.sp
-Each top-level branch of a look behind must be of a fixed length.
-.
-.
-.SH "BACKREFERENCES"
-.rs
-.sp
- \en reference by number (can be ambiguous)
- \egn reference by number
- \eg{n} reference by number
- \eg{-n} relative reference by number
- \ek<name> reference by name (Perl)
- \ek'name' reference by name (Perl)
- \eg{name} reference by name (Perl)
- \ek{name} reference by name (.NET)
- (?P=name) reference by name (Python)
-.
-.
-.SH "SUBROUTINE REFERENCES (POSSIBLY RECURSIVE)"
-.rs
-.sp
- (?R) recurse whole pattern
- (?n) call subpattern by absolute number
- (?+n) call subpattern by relative number
- (?-n) call subpattern by relative number
- (?&name) call subpattern by name (Perl)
- (?P>name) call subpattern by name (Python)
- \eg<name> call subpattern by name (Oniguruma)
- \eg'name' call subpattern by name (Oniguruma)
- \eg<n> call subpattern by absolute number (Oniguruma)
- \eg'n' call subpattern by absolute number (Oniguruma)
- \eg<+n> call subpattern by relative number (PCRE extension)
- \eg'+n' call subpattern by relative number (PCRE extension)
- \eg<-n> call subpattern by relative number (PCRE extension)
- \eg'-n' call subpattern by relative number (PCRE extension)
-.
-.
-.SH "CONDITIONAL PATTERNS"
-.rs
-.sp
- (?(condition)yes-pattern)
- (?(condition)yes-pattern|no-pattern)
-.sp
- (?(n)... absolute reference condition
- (?(+n)... relative reference condition
- (?(-n)... relative reference condition
- (?(<name>)... named reference condition (Perl)
- (?('name')... named reference condition (Perl)
- (?(name)... named reference condition (PCRE)
- (?(R)... overall recursion condition
- (?(Rn)... specific group recursion condition
- (?(R&name)... specific recursion condition
- (?(DEFINE)... define subpattern for reference
- (?(assert)... assertion condition
-.
-.
-.SH "BACKTRACKING CONTROL"
-.rs
-.sp
-The following act immediately they are reached:
-.sp
- (*ACCEPT) force successful match
- (*FAIL) force backtrack; synonym (*F)
- (*MARK:NAME) set name to be passed back; synonym (*:NAME)
-.sp
-The following act only when a subsequent match failure causes a backtrack to
-reach them. They all force a match failure, but they differ in what happens
-afterwards. Those that advance the start-of-match point do so only if the
-pattern is not anchored.
-.sp
- (*COMMIT) overall failure, no advance of starting point
- (*PRUNE) advance to next starting character
- (*PRUNE:NAME) equivalent to (*MARK:NAME)(*PRUNE)
- (*SKIP) advance to current matching position
- (*SKIP:NAME) advance to position corresponding to an earlier
- (*MARK:NAME); if not found, the (*SKIP) is ignored
- (*THEN) local failure, backtrack to next alternation
- (*THEN:NAME) equivalent to (*MARK:NAME)(*THEN)
-.
-.
-.SH "CALLOUTS"
-.rs
-.sp
- (?C) callout
- (?Cn) callout with data n
-.
-.
-.SH "SEE ALSO"
-.rs
-.sp
-\fBpcrepattern\fP(3), \fBpcreapi\fP(3), \fBpcrecallout\fP(3),
-\fBpcrematching\fP(3), \fBpcre\fP(3).
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 08 January 2014
-Copyright (c) 1997-2014 University of Cambridge.
-.fi
diff --git a/libs/Pcre16/docs/doc/pcretest.1 b/libs/Pcre16/docs/doc/pcretest.1
deleted file mode 100644
index ea7457c03d..0000000000
--- a/libs/Pcre16/docs/doc/pcretest.1
+++ /dev/null
@@ -1,1160 +0,0 @@
-.TH PCRETEST 1 "23 February 2017" "PCRE 8.41"
-.SH NAME
-pcretest - a program for testing Perl-compatible regular expressions.
-.SH SYNOPSIS
-.rs
-.sp
-.B pcretest "[options] [input file [output file]]"
-.sp
-\fBpcretest\fP was written as a test program for the PCRE regular expression
-library itself, but it can also be used for experimenting with regular
-expressions. This document describes the features of the test program; for
-details of the regular expressions themselves, see the
-.\" HREF
-\fBpcrepattern\fP
-.\"
-documentation. For details of the PCRE library function calls and their
-options, see the
-.\" HREF
-\fBpcreapi\fP
-.\"
-,
-.\" HREF
-\fBpcre16\fP
-and
-.\" HREF
-\fBpcre32\fP
-.\"
-documentation.
-.P
-The input for \fBpcretest\fP is a sequence of regular expression patterns and
-strings to be matched, as described below. The output shows the result of each
-match. Options on the command line and the patterns control PCRE options and
-exactly what is output.
-.P
-As PCRE has evolved, it has acquired many different features, and as a result,
-\fBpcretest\fP now has rather a lot of obscure options for testing every
-possible feature. Some of these options are specifically designed for use in
-conjunction with the test script and data files that are distributed as part of
-PCRE, and are unlikely to be of use otherwise. They are all documented here,
-but without much justification.
-.
-.
-.SH "INPUT DATA FORMAT"
-.rs
-.sp
-Input to \fBpcretest\fP is processed line by line, either by calling the C
-library's \fBfgets()\fP function, or via the \fBlibreadline\fP library (see
-below). In Unix-like environments, \fBfgets()\fP treats any bytes other than
-newline as data characters. However, in some Windows environments character 26
-(hex 1A) causes an immediate end of file, and no further data is read. For
-maximum portability, therefore, it is safest to use only ASCII characters in
-\fBpcretest\fP input files.
-.P
-The input is processed using using C's string functions, so must not
-contain binary zeroes, even though in Unix-like environments, \fBfgets()\fP
-treats any bytes other than newline as data characters.
-.
-.
-.SH "PCRE's 8-BIT, 16-BIT AND 32-BIT LIBRARIES"
-.rs
-.sp
-From release 8.30, two separate PCRE libraries can be built. The original one
-supports 8-bit character strings, whereas the newer 16-bit library supports
-character strings encoded in 16-bit units. From release 8.32, a third library
-can be built, supporting character strings encoded in 32-bit units. The
-\fBpcretest\fP program can be used to test all three libraries. However, it is
-itself still an 8-bit program, reading 8-bit input and writing 8-bit output.
-When testing the 16-bit or 32-bit library, the patterns and data strings are
-converted to 16- or 32-bit format before being passed to the PCRE library
-functions. Results are converted to 8-bit for output.
-.P
-References to functions and structures of the form \fBpcre[16|32]_xx\fP below
-mean "\fBpcre_xx\fP when using the 8-bit library, \fBpcre16_xx\fP when using
-the 16-bit library, or \fBpcre32_xx\fP when using the 32-bit library".
-.
-.
-.SH "COMMAND LINE OPTIONS"
-.rs
-.TP 10
-\fB-8\fP
-If both the 8-bit library has been built, this option causes the 8-bit library
-to be used (which is the default); if the 8-bit library has not been built,
-this option causes an error.
-.TP 10
-\fB-16\fP
-If both the 8-bit or the 32-bit, and the 16-bit libraries have been built, this
-option causes the 16-bit library to be used. If only the 16-bit library has been
-built, this is the default (so has no effect). If only the 8-bit or the 32-bit
-library has been built, this option causes an error.
-.TP 10
-\fB-32\fP
-If both the 8-bit or the 16-bit, and the 32-bit libraries have been built, this
-option causes the 32-bit library to be used. If only the 32-bit library has been
-built, this is the default (so has no effect). If only the 8-bit or the 16-bit
-library has been built, this option causes an error.
-.TP 10
-\fB-b\fP
-Behave as if each pattern has the \fB/B\fP (show byte code) modifier; the
-internal form is output after compilation.
-.TP 10
-\fB-C\fP
-Output the version number of the PCRE library, and all available information
-about the optional features that are included, and then exit with zero exit
-code. All other options are ignored.
-.TP 10
-\fB-C\fP \fIoption\fP
-Output information about a specific build-time option, then exit. This
-functionality is intended for use in scripts such as \fBRunTest\fP. The
-following options output the value and set the exit code as indicated:
-.sp
- ebcdic-nl the code for LF (= NL) in an EBCDIC environment:
- 0x15 or 0x25
- 0 if used in an ASCII environment
- exit code is always 0
- linksize the configured internal link size (2, 3, or 4)
- exit code is set to the link size
- newline the default newline setting:
- CR, LF, CRLF, ANYCRLF, or ANY
- exit code is always 0
- bsr the default setting for what \eR matches:
- ANYCRLF or ANY
- exit code is always 0
-.sp
-The following options output 1 for true or 0 for false, and set the exit code
-to the same value:
-.sp
- ebcdic compiled for an EBCDIC environment
- jit just-in-time support is available
- pcre16 the 16-bit library was built
- pcre32 the 32-bit library was built
- pcre8 the 8-bit library was built
- ucp Unicode property support is available
- utf UTF-8 and/or UTF-16 and/or UTF-32 support
- is available
-.sp
-If an unknown option is given, an error message is output; the exit code is 0.
-.TP 10
-\fB-d\fP
-Behave as if each pattern has the \fB/D\fP (debug) modifier; the internal
-form and information about the compiled pattern is output after compilation;
-\fB-d\fP is equivalent to \fB-b -i\fP.
-.TP 10
-\fB-dfa\fP
-Behave as if each data line contains the \eD escape sequence; this causes the
-alternative matching function, \fBpcre[16|32]_dfa_exec()\fP, to be used instead
-of the standard \fBpcre[16|32]_exec()\fP function (more detail is given below).
-.TP 10
-\fB-help\fP
-Output a brief summary these options and then exit.
-.TP 10
-\fB-i\fP
-Behave as if each pattern has the \fB/I\fP modifier; information about the
-compiled pattern is given after compilation.
-.TP 10
-\fB-M\fP
-Behave as if each data line contains the \eM escape sequence; this causes
-PCRE to discover the minimum MATCH_LIMIT and MATCH_LIMIT_RECURSION settings by
-calling \fBpcre[16|32]_exec()\fP repeatedly with different limits.
-.TP 10
-\fB-m\fP
-Output the size of each compiled pattern after it has been compiled. This is
-equivalent to adding \fB/M\fP to each regular expression. The size is given in
-bytes for both libraries.
-.TP 10
-\fB-O\fP
-Behave as if each pattern has the \fB/O\fP modifier, that is disable
-auto-possessification for all patterns.
-.TP 10
-\fB-o\fP \fIosize\fP
-Set the number of elements in the output vector that is used when calling
-\fBpcre[16|32]_exec()\fP or \fBpcre[16|32]_dfa_exec()\fP to be \fIosize\fP. The
-default value is 45, which is enough for 14 capturing subexpressions for
-\fBpcre[16|32]_exec()\fP or 22 different matches for
-\fBpcre[16|32]_dfa_exec()\fP.
-The vector size can be changed for individual matching calls by including \eO
-in the data line (see below).
-.TP 10
-\fB-p\fP
-Behave as if each pattern has the \fB/P\fP modifier; the POSIX wrapper API is
-used to call PCRE. None of the other options has any effect when \fB-p\fP is
-set. This option can be used only with the 8-bit library.
-.TP 10
-\fB-q\fP
-Do not output the version number of \fBpcretest\fP at the start of execution.
-.TP 10
-\fB-S\fP \fIsize\fP
-On Unix-like systems, set the size of the run-time stack to \fIsize\fP
-megabytes.
-.TP 10
-\fB-s\fP or \fB-s+\fP
-Behave as if each pattern has the \fB/S\fP modifier; in other words, force each
-pattern to be studied. If \fB-s+\fP is used, all the JIT compile options are
-passed to \fBpcre[16|32]_study()\fP, causing just-in-time optimization to be set
-up if it is available, for both full and partial matching. Specific JIT compile
-options can be selected by following \fB-s+\fP with a digit in the range 1 to
-7, which selects the JIT compile modes as follows:
-.sp
- 1 normal match only
- 2 soft partial match only
- 3 normal match and soft partial match
- 4 hard partial match only
- 6 soft and hard partial match
- 7 all three modes (default)
-.sp
-If \fB-s++\fP is used instead of \fB-s+\fP (with or without a following digit),
-the text "(JIT)" is added to the first output line after a match or no match
-when JIT-compiled code was actually used.
-.sp
-Note that there are pattern options that can override \fB-s\fP, either
-specifying no studying at all, or suppressing JIT compilation.
-.sp
-If the \fB/I\fP or \fB/D\fP option is present on a pattern (requesting output
-about the compiled pattern), information about the result of studying is not
-included when studying is caused only by \fB-s\fP and neither \fB-i\fP nor
-\fB-d\fP is present on the command line. This behaviour means that the output
-from tests that are run with and without \fB-s\fP should be identical, except
-when options that output information about the actual running of a match are
-set.
-.sp
-The \fB-M\fP, \fB-t\fP, and \fB-tm\fP options, which give information about
-resources used, are likely to produce different output with and without
-\fB-s\fP. Output may also differ if the \fB/C\fP option is present on an
-individual pattern. This uses callouts to trace the the matching process, and
-this may be different between studied and non-studied patterns. If the pattern
-contains (*MARK) items there may also be differences, for the same reason. The
-\fB-s\fP command line option can be overridden for specific patterns that
-should never be studied (see the \fB/S\fP pattern modifier below).
-.TP 10
-\fB-t\fP
-Run each compile, study, and match many times with a timer, and output the
-resulting times per compile, study, or match (in milliseconds). Do not set
-\fB-m\fP with \fB-t\fP, because you will then get the size output a zillion
-times, and the timing will be distorted. You can control the number of
-iterations that are used for timing by following \fB-t\fP with a number (as a
-separate item on the command line). For example, "-t 1000" iterates 1000 times.
-The default is to iterate 500000 times.
-.TP 10
-\fB-tm\fP
-This is like \fB-t\fP except that it times only the matching phase, not the
-compile or study phases.
-.TP 10
-\fB-T\fP \fB-TM\fP
-These behave like \fB-t\fP and \fB-tm\fP, but in addition, at the end of a run,
-the total times for all compiles, studies, and matches are output.
-.
-.
-.SH DESCRIPTION
-.rs
-.sp
-If \fBpcretest\fP is given two filename arguments, it reads from the first and
-writes to the second. If it is given only one filename argument, it reads from
-that file and writes to stdout. Otherwise, it reads from stdin and writes to
-stdout, and prompts for each line of input, using "re>" to prompt for regular
-expressions, and "data>" to prompt for data lines.
-.P
-When \fBpcretest\fP is built, a configuration option can specify that it should
-be linked with the \fBlibreadline\fP library. When this is done, if the input
-is from a terminal, it is read using the \fBreadline()\fP function. This
-provides line-editing and history facilities. The output from the \fB-help\fP
-option states whether or not \fBreadline()\fP will be used.
-.P
-The program handles any number of sets of input on a single input file. Each
-set starts with a regular expression, and continues with any number of data
-lines to be matched against that pattern.
-.P
-Each data line is matched separately and independently. If you want to do
-multi-line matches, you have to use the \en escape sequence (or \er or \er\en,
-etc., depending on the newline setting) in a single line of input to encode the
-newline sequences. There is no limit on the length of data lines; the input
-buffer is automatically extended if it is too small.
-.P
-An empty line signals the end of the data lines, at which point a new regular
-expression is read. The regular expressions are given enclosed in any
-non-alphanumeric delimiters other than backslash, for example:
-.sp
- /(a|bc)x+yz/
-.sp
-White space before the initial delimiter is ignored. A regular expression may
-be continued over several input lines, in which case the newline characters are
-included within it. It is possible to include the delimiter within the pattern
-by escaping it, for example
-.sp
- /abc\e/def/
-.sp
-If you do so, the escape and the delimiter form part of the pattern, but since
-delimiters are always non-alphanumeric, this does not affect its interpretation.
-If the terminating delimiter is immediately followed by a backslash, for
-example,
-.sp
- /abc/\e
-.sp
-then a backslash is added to the end of the pattern. This is done to provide a
-way of testing the error condition that arises if a pattern finishes with a
-backslash, because
-.sp
- /abc\e/
-.sp
-is interpreted as the first line of a pattern that starts with "abc/", causing
-pcretest to read the next line as a continuation of the regular expression.
-.
-.
-.SH "PATTERN MODIFIERS"
-.rs
-.sp
-A pattern may be followed by any number of modifiers, which are mostly single
-characters, though some of these can be qualified by further characters.
-Following Perl usage, these are referred to below as, for example, "the
-\fB/i\fP modifier", even though the delimiter of the pattern need not always be
-a slash, and no slash is used when writing modifiers. White space may appear
-between the final pattern delimiter and the first modifier, and between the
-modifiers themselves. For reference, here is a complete list of modifiers. They
-fall into several groups that are described in detail in the following
-sections.
-.sp
- \fB/8\fP set UTF mode
- \fB/9\fP set PCRE_NEVER_UTF (locks out UTF mode)
- \fB/?\fP disable UTF validity check
- \fB/+\fP show remainder of subject after match
- \fB/=\fP show all captures (not just those that are set)
-.sp
- \fB/A\fP set PCRE_ANCHORED
- \fB/B\fP show compiled code
- \fB/C\fP set PCRE_AUTO_CALLOUT
- \fB/D\fP same as \fB/B\fP plus \fB/I\fP
- \fB/E\fP set PCRE_DOLLAR_ENDONLY
- \fB/F\fP flip byte order in compiled pattern
- \fB/f\fP set PCRE_FIRSTLINE
- \fB/G\fP find all matches (shorten string)
- \fB/g\fP find all matches (use startoffset)
- \fB/I\fP show information about pattern
- \fB/i\fP set PCRE_CASELESS
- \fB/J\fP set PCRE_DUPNAMES
- \fB/K\fP show backtracking control names
- \fB/L\fP set locale
- \fB/M\fP show compiled memory size
- \fB/m\fP set PCRE_MULTILINE
- \fB/N\fP set PCRE_NO_AUTO_CAPTURE
- \fB/O\fP set PCRE_NO_AUTO_POSSESS
- \fB/P\fP use the POSIX wrapper
- \fB/Q\fP test external stack check function
- \fB/S\fP study the pattern after compilation
- \fB/s\fP set PCRE_DOTALL
- \fB/T\fP select character tables
- \fB/U\fP set PCRE_UNGREEDY
- \fB/W\fP set PCRE_UCP
- \fB/X\fP set PCRE_EXTRA
- \fB/x\fP set PCRE_EXTENDED
- \fB/Y\fP set PCRE_NO_START_OPTIMIZE
- \fB/Z\fP don't show lengths in \fB/B\fP output
-.sp
- \fB/<any>\fP set PCRE_NEWLINE_ANY
- \fB/<anycrlf>\fP set PCRE_NEWLINE_ANYCRLF
- \fB/<cr>\fP set PCRE_NEWLINE_CR
- \fB/<crlf>\fP set PCRE_NEWLINE_CRLF
- \fB/<lf>\fP set PCRE_NEWLINE_LF
- \fB/<bsr_anycrlf>\fP set PCRE_BSR_ANYCRLF
- \fB/<bsr_unicode>\fP set PCRE_BSR_UNICODE
- \fB/<JS>\fP set PCRE_JAVASCRIPT_COMPAT
-.sp
-.
-.
-.SS "Perl-compatible modifiers"
-.rs
-.sp
-The \fB/i\fP, \fB/m\fP, \fB/s\fP, and \fB/x\fP modifiers set the PCRE_CASELESS,
-PCRE_MULTILINE, PCRE_DOTALL, or PCRE_EXTENDED options, respectively, when
-\fBpcre[16|32]_compile()\fP is called. These four modifier letters have the same
-effect as they do in Perl. For example:
-.sp
- /caseless/i
-.sp
-.
-.
-.SS "Modifiers for other PCRE options"
-.rs
-.sp
-The following table shows additional modifiers for setting PCRE compile-time
-options that do not correspond to anything in Perl:
-.sp
- \fB/8\fP PCRE_UTF8 ) when using the 8-bit
- \fB/?\fP PCRE_NO_UTF8_CHECK ) library
-.sp
- \fB/8\fP PCRE_UTF16 ) when using the 16-bit
- \fB/?\fP PCRE_NO_UTF16_CHECK ) library
-.sp
- \fB/8\fP PCRE_UTF32 ) when using the 32-bit
- \fB/?\fP PCRE_NO_UTF32_CHECK ) library
-.sp
- \fB/9\fP PCRE_NEVER_UTF
- \fB/A\fP PCRE_ANCHORED
- \fB/C\fP PCRE_AUTO_CALLOUT
- \fB/E\fP PCRE_DOLLAR_ENDONLY
- \fB/f\fP PCRE_FIRSTLINE
- \fB/J\fP PCRE_DUPNAMES
- \fB/N\fP PCRE_NO_AUTO_CAPTURE
- \fB/O\fP PCRE_NO_AUTO_POSSESS
- \fB/U\fP PCRE_UNGREEDY
- \fB/W\fP PCRE_UCP
- \fB/X\fP PCRE_EXTRA
- \fB/Y\fP PCRE_NO_START_OPTIMIZE
- \fB/<any>\fP PCRE_NEWLINE_ANY
- \fB/<anycrlf>\fP PCRE_NEWLINE_ANYCRLF
- \fB/<cr>\fP PCRE_NEWLINE_CR
- \fB/<crlf>\fP PCRE_NEWLINE_CRLF
- \fB/<lf>\fP PCRE_NEWLINE_LF
- \fB/<bsr_anycrlf>\fP PCRE_BSR_ANYCRLF
- \fB/<bsr_unicode>\fP PCRE_BSR_UNICODE
- \fB/<JS>\fP PCRE_JAVASCRIPT_COMPAT
-.sp
-The modifiers that are enclosed in angle brackets are literal strings as shown,
-including the angle brackets, but the letters within can be in either case.
-This example sets multiline matching with CRLF as the line ending sequence:
-.sp
- /^abc/m<CRLF>
-.sp
-As well as turning on the PCRE_UTF8/16/32 option, the \fB/8\fP modifier causes
-all non-printing characters in output strings to be printed using the
-\ex{hh...} notation. Otherwise, those less than 0x100 are output in hex without
-the curly brackets.
-.P
-Full details of the PCRE options are given in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-documentation.
-.
-.
-.SS "Finding all matches in a string"
-.rs
-.sp
-Searching for all possible matches within each subject string can be requested
-by the \fB/g\fP or \fB/G\fP modifier. After finding a match, PCRE is called
-again to search the remainder of the subject string. The difference between
-\fB/g\fP and \fB/G\fP is that the former uses the \fIstartoffset\fP argument to
-\fBpcre[16|32]_exec()\fP to start searching at a new point within the entire
-string (which is in effect what Perl does), whereas the latter passes over a
-shortened substring. This makes a difference to the matching process if the
-pattern begins with a lookbehind assertion (including \eb or \eB).
-.P
-If any call to \fBpcre[16|32]_exec()\fP in a \fB/g\fP or \fB/G\fP sequence matches
-an empty string, the next call is done with the PCRE_NOTEMPTY_ATSTART and
-PCRE_ANCHORED flags set in order to search for another, non-empty, match at the
-same point. If this second match fails, the start offset is advanced, and the
-normal match is retried. This imitates the way Perl handles such cases when
-using the \fB/g\fP modifier or the \fBsplit()\fP function. Normally, the start
-offset is advanced by one character, but if the newline convention recognizes
-CRLF as a newline, and the current character is CR followed by LF, an advance
-of two is used.
-.
-.
-.SS "Other modifiers"
-.rs
-.sp
-There are yet more modifiers for controlling the way \fBpcretest\fP
-operates.
-.P
-The \fB/+\fP modifier requests that as well as outputting the substring that
-matched the entire pattern, \fBpcretest\fP should in addition output the
-remainder of the subject string. This is useful for tests where the subject
-contains multiple copies of the same substring. If the \fB+\fP modifier appears
-twice, the same action is taken for captured substrings. In each case the
-remainder is output on the following line with a plus character following the
-capture number. Note that this modifier must not immediately follow the /S
-modifier because /S+ and /S++ have other meanings.
-.P
-The \fB/=\fP modifier requests that the values of all potential captured
-parentheses be output after a match. By default, only those up to the highest
-one actually used in the match are output (corresponding to the return code
-from \fBpcre[16|32]_exec()\fP). Values in the offsets vector corresponding to
-higher numbers should be set to -1, and these are output as "<unset>". This
-modifier gives a way of checking that this is happening.
-.P
-The \fB/B\fP modifier is a debugging feature. It requests that \fBpcretest\fP
-output a representation of the compiled code after compilation. Normally this
-information contains length and offset values; however, if \fB/Z\fP is also
-present, this data is replaced by spaces. This is a special feature for use in
-the automatic test scripts; it ensures that the same output is generated for
-different internal link sizes.
-.P
-The \fB/D\fP modifier is a PCRE debugging feature, and is equivalent to
-\fB/BI\fP, that is, both the \fB/B\fP and the \fB/I\fP modifiers.
-.P
-The \fB/F\fP modifier causes \fBpcretest\fP to flip the byte order of the
-2-byte and 4-byte fields in the compiled pattern. This facility is for testing
-the feature in PCRE that allows it to execute patterns that were compiled on a
-host with a different endianness. This feature is not available when the POSIX
-interface to PCRE is being used, that is, when the \fB/P\fP pattern modifier is
-specified. See also the section about saving and reloading compiled patterns
-below.
-.P
-The \fB/I\fP modifier requests that \fBpcretest\fP output information about the
-compiled pattern (whether it is anchored, has a fixed first character, and
-so on). It does this by calling \fBpcre[16|32]_fullinfo()\fP after compiling a
-pattern. If the pattern is studied, the results of that are also output. In
-this output, the word "char" means a non-UTF character, that is, the value of a
-single data item (8-bit, 16-bit, or 32-bit, depending on the library that is
-being tested).
-.P
-The \fB/K\fP modifier requests \fBpcretest\fP to show names from backtracking
-control verbs that are returned from calls to \fBpcre[16|32]_exec()\fP. It causes
-\fBpcretest\fP to create a \fBpcre[16|32]_extra\fP block if one has not already
-been created by a call to \fBpcre[16|32]_study()\fP, and to set the
-PCRE_EXTRA_MARK flag and the \fBmark\fP field within it, every time that
-\fBpcre[16|32]_exec()\fP is called. If the variable that the \fBmark\fP field
-points to is non-NULL for a match, non-match, or partial match, \fBpcretest\fP
-prints the string to which it points. For a match, this is shown on a line by
-itself, tagged with "MK:". For a non-match it is added to the message.
-.P
-The \fB/L\fP modifier must be followed directly by the name of a locale, for
-example,
-.sp
- /pattern/Lfr_FR
-.sp
-For this reason, it must be the last modifier. The given locale is set,
-\fBpcre[16|32]_maketables()\fP is called to build a set of character tables for
-the locale, and this is then passed to \fBpcre[16|32]_compile()\fP when compiling
-the regular expression. Without an \fB/L\fP (or \fB/T\fP) modifier, NULL is
-passed as the tables pointer; that is, \fB/L\fP applies only to the expression
-on which it appears.
-.P
-The \fB/M\fP modifier causes the size in bytes of the memory block used to hold
-the compiled pattern to be output. This does not include the size of the
-\fBpcre[16|32]\fP block; it is just the actual compiled data. If the pattern is
-successfully studied with the PCRE_STUDY_JIT_COMPILE option, the size of the
-JIT compiled code is also output.
-.P
-The \fB/Q\fP modifier is used to test the use of \fBpcre_stack_guard\fP. It
-must be followed by '0' or '1', specifying the return code to be given from an
-external function that is passed to PCRE and used for stack checking during
-compilation (see the
-.\" HREF
-\fBpcreapi\fP
-.\"
-documentation for details).
-.P
-The \fB/S\fP modifier causes \fBpcre[16|32]_study()\fP to be called after the
-expression has been compiled, and the results used when the expression is
-matched. There are a number of qualifying characters that may follow \fB/S\fP.
-They may appear in any order.
-.P
-If \fB/S\fP is followed by an exclamation mark, \fBpcre[16|32]_study()\fP is
-called with the PCRE_STUDY_EXTRA_NEEDED option, causing it always to return a
-\fBpcre_extra\fP block, even when studying discovers no useful information.
-.P
-If \fB/S\fP is followed by a second S character, it suppresses studying, even
-if it was requested externally by the \fB-s\fP command line option. This makes
-it possible to specify that certain patterns are always studied, and others are
-never studied, independently of \fB-s\fP. This feature is used in the test
-files in a few cases where the output is different when the pattern is studied.
-.P
-If the \fB/S\fP modifier is followed by a + character, the call to
-\fBpcre[16|32]_study()\fP is made with all the JIT study options, requesting
-just-in-time optimization support if it is available, for both normal and
-partial matching. If you want to restrict the JIT compiling modes, you can
-follow \fB/S+\fP with a digit in the range 1 to 7:
-.sp
- 1 normal match only
- 2 soft partial match only
- 3 normal match and soft partial match
- 4 hard partial match only
- 6 soft and hard partial match
- 7 all three modes (default)
-.sp
-If \fB/S++\fP is used instead of \fB/S+\fP (with or without a following digit),
-the text "(JIT)" is added to the first output line after a match or no match
-when JIT-compiled code was actually used.
-.P
-Note that there is also an independent \fB/+\fP modifier; it must not be given
-immediately after \fB/S\fP or \fB/S+\fP because this will be misinterpreted.
-.P
-If JIT studying is successful, the compiled JIT code will automatically be used
-when \fBpcre[16|32]_exec()\fP is run, except when incompatible run-time options
-are specified. For more details, see the
-.\" HREF
-\fBpcrejit\fP
-.\"
-documentation. See also the \fB\eJ\fP escape sequence below for a way of
-setting the size of the JIT stack.
-.P
-Finally, if \fB/S\fP is followed by a minus character, JIT compilation is
-suppressed, even if it was requested externally by the \fB-s\fP command line
-option. This makes it possible to specify that JIT is never to be used for
-certain patterns.
-.P
-The \fB/T\fP modifier must be followed by a single digit. It causes a specific
-set of built-in character tables to be passed to \fBpcre[16|32]_compile()\fP. It
-is used in the standard PCRE tests to check behaviour with different character
-tables. The digit specifies the tables as follows:
-.sp
- 0 the default ASCII tables, as distributed in
- pcre_chartables.c.dist
- 1 a set of tables defining ISO 8859 characters
-.sp
-In table 1, some characters whose codes are greater than 128 are identified as
-letters, digits, spaces, etc.
-.
-.
-.SS "Using the POSIX wrapper API"
-.rs
-.sp
-The \fB/P\fP modifier causes \fBpcretest\fP to call PCRE via the POSIX wrapper
-API rather than its native API. This supports only the 8-bit library. When
-\fB/P\fP is set, the following modifiers set options for the \fBregcomp()\fP
-function:
-.sp
- /i REG_ICASE
- /m REG_NEWLINE
- /N REG_NOSUB
- /s REG_DOTALL )
- /U REG_UNGREEDY ) These options are not part of
- /W REG_UCP ) the POSIX standard
- /8 REG_UTF8 )
-.sp
-The \fB/+\fP modifier works as described above. All other modifiers are
-ignored.
-.
-.
-.SS "Locking out certain modifiers"
-.rs
-.sp
-PCRE can be compiled with or without support for certain features such as
-UTF-8/16/32 or Unicode properties. Accordingly, the standard tests are split up
-into a number of different files that are selected for running depending on
-which features are available. When updating the tests, it is all too easy to
-put a new test into the wrong file by mistake; for example, to put a test that
-requires UTF support into a file that is used when it is not available. To help
-detect such mistakes as early as possible, there is a facility for locking out
-specific modifiers. If an input line for \fBpcretest\fP starts with the string
-"< forbid " the following sequence of characters is taken as a list of
-forbidden modifiers. For example, in the test files that must not use UTF or
-Unicode property support, this line appears:
-.sp
- < forbid 8W
-.sp
-This locks out the /8 and /W modifiers. An immediate error is given if they are
-subsequently encountered. If the character string contains < but not >, all the
-multi-character modifiers that begin with < are locked out. Otherwise, such
-modifiers must be explicitly listed, for example:
-.sp
- < forbid <JS><cr>
-.sp
-There must be a single space between < and "forbid" for this feature to be
-recognised. If there is not, the line is interpreted either as a request to
-re-load a pre-compiled pattern (see "SAVING AND RELOADING COMPILED PATTERNS"
-below) or, if there is a another < character, as a pattern that uses < as its
-delimiter.
-.
-.
-.SH "DATA LINES"
-.rs
-.sp
-Before each data line is passed to \fBpcre[16|32]_exec()\fP, leading and trailing
-white space is removed, and it is then scanned for \e escapes. Some of these
-are pretty esoteric features, intended for checking out some of the more
-complicated features of PCRE. If you are just testing "ordinary" regular
-expressions, you probably don't need any of these. The following escapes are
-recognized:
-.sp
- \ea alarm (BEL, \ex07)
- \eb backspace (\ex08)
- \ee escape (\ex27)
- \ef form feed (\ex0c)
- \en newline (\ex0a)
-.\" JOIN
- \eqdd set the PCRE_MATCH_LIMIT limit to dd
- (any number of digits)
- \er carriage return (\ex0d)
- \et tab (\ex09)
- \ev vertical tab (\ex0b)
- \ennn octal character (up to 3 octal digits); always
- a byte unless > 255 in UTF-8 or 16-bit or 32-bit mode
- \eo{dd...} octal character (any number of octal digits}
- \exhh hexadecimal byte (up to 2 hex digits)
- \ex{hh...} hexadecimal character (any number of hex digits)
-.\" JOIN
- \eA pass the PCRE_ANCHORED option to \fBpcre[16|32]_exec()\fP
- or \fBpcre[16|32]_dfa_exec()\fP
-.\" JOIN
- \eB pass the PCRE_NOTBOL option to \fBpcre[16|32]_exec()\fP
- or \fBpcre[16|32]_dfa_exec()\fP
-.\" JOIN
- \eCdd call pcre[16|32]_copy_substring() for substring dd
- after a successful match (number less than 32)
-.\" JOIN
- \eCname call pcre[16|32]_copy_named_substring() for substring
- "name" after a successful match (name termin-
- ated by next non alphanumeric character)
-.\" JOIN
- \eC+ show the current captured substrings at callout
- time
- \eC- do not supply a callout function
-.\" JOIN
- \eC!n return 1 instead of 0 when callout number n is
- reached
-.\" JOIN
- \eC!n!m return 1 instead of 0 when callout number n is
- reached for the nth time
-.\" JOIN
- \eC*n pass the number n (may be negative) as callout
- data; this is used as the callout return value
- \eD use the \fBpcre[16|32]_dfa_exec()\fP match function
- \eF only shortest match for \fBpcre[16|32]_dfa_exec()\fP
-.\" JOIN
- \eGdd call pcre[16|32]_get_substring() for substring dd
- after a successful match (number less than 32)
-.\" JOIN
- \eGname call pcre[16|32]_get_named_substring() for substring
- "name" after a successful match (name termin-
- ated by next non-alphanumeric character)
-.\" JOIN
- \eJdd set up a JIT stack of dd kilobytes maximum (any
- number of digits)
-.\" JOIN
- \eL call pcre[16|32]_get_substringlist() after a
- successful match
-.\" JOIN
- \eM discover the minimum MATCH_LIMIT and
- MATCH_LIMIT_RECURSION settings
-.\" JOIN
- \eN pass the PCRE_NOTEMPTY option to \fBpcre[16|32]_exec()\fP
- or \fBpcre[16|32]_dfa_exec()\fP; if used twice, pass the
- PCRE_NOTEMPTY_ATSTART option
-.\" JOIN
- \eOdd set the size of the output vector passed to
- \fBpcre[16|32]_exec()\fP to dd (any number of digits)
-.\" JOIN
- \eP pass the PCRE_PARTIAL_SOFT option to \fBpcre[16|32]_exec()\fP
- or \fBpcre[16|32]_dfa_exec()\fP; if used twice, pass the
- PCRE_PARTIAL_HARD option
-.\" JOIN
- \eQdd set the PCRE_MATCH_LIMIT_RECURSION limit to dd
- (any number of digits)
- \eR pass the PCRE_DFA_RESTART option to \fBpcre[16|32]_dfa_exec()\fP
- \eS output details of memory get/free calls during matching
-.\" JOIN
- \eY pass the PCRE_NO_START_OPTIMIZE option to \fBpcre[16|32]_exec()\fP
- or \fBpcre[16|32]_dfa_exec()\fP
-.\" JOIN
- \eZ pass the PCRE_NOTEOL option to \fBpcre[16|32]_exec()\fP
- or \fBpcre[16|32]_dfa_exec()\fP
-.\" JOIN
- \e? pass the PCRE_NO_UTF[8|16|32]_CHECK option to
- \fBpcre[16|32]_exec()\fP or \fBpcre[16|32]_dfa_exec()\fP
-.\" JOIN
- \e>dd start the match at offset dd (optional "-"; then
- any number of digits); this sets the \fIstartoffset\fP
- argument for \fBpcre[16|32]_exec()\fP or \fBpcre[16|32]_dfa_exec()\fP
-.\" JOIN
- \e<cr> pass the PCRE_NEWLINE_CR option to \fBpcre[16|32]_exec()\fP
- or \fBpcre[16|32]_dfa_exec()\fP
-.\" JOIN
- \e<lf> pass the PCRE_NEWLINE_LF option to \fBpcre[16|32]_exec()\fP
- or \fBpcre[16|32]_dfa_exec()\fP
-.\" JOIN
- \e<crlf> pass the PCRE_NEWLINE_CRLF option to \fBpcre[16|32]_exec()\fP
- or \fBpcre[16|32]_dfa_exec()\fP
-.\" JOIN
- \e<anycrlf> pass the PCRE_NEWLINE_ANYCRLF option to \fBpcre[16|32]_exec()\fP
- or \fBpcre[16|32]_dfa_exec()\fP
-.\" JOIN
- \e<any> pass the PCRE_NEWLINE_ANY option to \fBpcre[16|32]_exec()\fP
- or \fBpcre[16|32]_dfa_exec()\fP
-.sp
-The use of \ex{hh...} is not dependent on the use of the \fB/8\fP modifier on
-the pattern. It is recognized always. There may be any number of hexadecimal
-digits inside the braces; invalid values provoke error messages.
-.P
-Note that \exhh specifies one byte rather than one character in UTF-8 mode;
-this makes it possible to construct invalid UTF-8 sequences for testing
-purposes. On the other hand, \ex{hh} is interpreted as a UTF-8 character in
-UTF-8 mode, generating more than one byte if the value is greater than 127.
-When testing the 8-bit library not in UTF-8 mode, \ex{hh} generates one byte
-for values less than 256, and causes an error for greater values.
-.P
-In UTF-16 mode, all 4-digit \ex{hhhh} values are accepted. This makes it
-possible to construct invalid UTF-16 sequences for testing purposes.
-.P
-In UTF-32 mode, all 4- to 8-digit \ex{...} values are accepted. This makes it
-possible to construct invalid UTF-32 sequences for testing purposes.
-.P
-The escapes that specify line ending sequences are literal strings, exactly as
-shown. No more than one newline setting should be present in any data line.
-.P
-A backslash followed by anything else just escapes the anything else. If
-the very last character is a backslash, it is ignored. This gives a way of
-passing an empty line as data, since a real empty line terminates the data
-input.
-.P
-The \fB\eJ\fP escape provides a way of setting the maximum stack size that is
-used by the just-in-time optimization code. It is ignored if JIT optimization
-is not being used. Providing a stack that is larger than the default 32K is
-necessary only for very complicated patterns.
-.P
-If \eM is present, \fBpcretest\fP calls \fBpcre[16|32]_exec()\fP several times,
-with different values in the \fImatch_limit\fP and \fImatch_limit_recursion\fP
-fields of the \fBpcre[16|32]_extra\fP data structure, until it finds the minimum
-numbers for each parameter that allow \fBpcre[16|32]_exec()\fP to complete without
-error. Because this is testing a specific feature of the normal interpretive
-\fBpcre[16|32]_exec()\fP execution, the use of any JIT optimization that might
-have been set up by the \fB/S+\fP qualifier of \fB-s+\fP option is disabled.
-.P
-The \fImatch_limit\fP number is a measure of the amount of backtracking
-that takes place, and checking it out can be instructive. For most simple
-matches, the number is quite small, but for patterns with very large numbers of
-matching possibilities, it can become large very quickly with increasing length
-of subject string. The \fImatch_limit_recursion\fP number is a measure of how
-much stack (or, if PCRE is compiled with NO_RECURSE, how much heap) memory is
-needed to complete the match attempt.
-.P
-When \eO is used, the value specified may be higher or lower than the size set
-by the \fB-O\fP command line option (or defaulted to 45); \eO applies only to
-the call of \fBpcre[16|32]_exec()\fP for the line in which it appears.
-.P
-If the \fB/P\fP modifier was present on the pattern, causing the POSIX wrapper
-API to be used, the only option-setting sequences that have any effect are \eB,
-\eN, and \eZ, causing REG_NOTBOL, REG_NOTEMPTY, and REG_NOTEOL, respectively,
-to be passed to \fBregexec()\fP.
-.
-.
-.SH "THE ALTERNATIVE MATCHING FUNCTION"
-.rs
-.sp
-By default, \fBpcretest\fP uses the standard PCRE matching function,
-\fBpcre[16|32]_exec()\fP to match each data line. PCRE also supports an
-alternative matching function, \fBpcre[16|32]_dfa_test()\fP, which operates in a
-different way, and has some restrictions. The differences between the two
-functions are described in the
-.\" HREF
-\fBpcrematching\fP
-.\"
-documentation.
-.P
-If a data line contains the \eD escape sequence, or if the command line
-contains the \fB-dfa\fP option, the alternative matching function is used.
-This function finds all possible matches at a given point. If, however, the \eF
-escape sequence is present in the data line, it stops after the first match is
-found. This is always the shortest possible match.
-.
-.
-.SH "DEFAULT OUTPUT FROM PCRETEST"
-.rs
-.sp
-This section describes the output when the normal matching function,
-\fBpcre[16|32]_exec()\fP, is being used.
-.P
-When a match succeeds, \fBpcretest\fP outputs the list of captured substrings
-that \fBpcre[16|32]_exec()\fP returns, starting with number 0 for the string that
-matched the whole pattern. Otherwise, it outputs "No match" when the return is
-PCRE_ERROR_NOMATCH, and "Partial match:" followed by the partially matching
-substring when \fBpcre[16|32]_exec()\fP returns PCRE_ERROR_PARTIAL. (Note that
-this is the entire substring that was inspected during the partial match; it
-may include characters before the actual match start if a lookbehind assertion,
-\eK, \eb, or \eB was involved.) For any other return, \fBpcretest\fP outputs
-the PCRE negative error number and a short descriptive phrase. If the error is
-a failed UTF string check, the offset of the start of the failing character and
-the reason code are also output, provided that the size of the output vector is
-at least two. Here is an example of an interactive \fBpcretest\fP run.
-.sp
- $ pcretest
- PCRE version 8.13 2011-04-30
-.sp
- re> /^abc(\ed+)/
- data> abc123
- 0: abc123
- 1: 123
- data> xyz
- No match
-.sp
-Unset capturing substrings that are not followed by one that is set are not
-returned by \fBpcre[16|32]_exec()\fP, and are not shown by \fBpcretest\fP. In the
-following example, there are two capturing substrings, but when the first data
-line is matched, the second, unset substring is not shown. An "internal" unset
-substring is shown as "<unset>", as for the second data line.
-.sp
- re> /(a)|(b)/
- data> a
- 0: a
- 1: a
- data> b
- 0: b
- 1: <unset>
- 2: b
-.sp
-If the strings contain any non-printing characters, they are output as \exhh
-escapes if the value is less than 256 and UTF mode is not set. Otherwise they
-are output as \ex{hh...} escapes. See below for the definition of non-printing
-characters. If the pattern has the \fB/+\fP modifier, the output for substring
-0 is followed by the the rest of the subject string, identified by "0+" like
-this:
-.sp
- re> /cat/+
- data> cataract
- 0: cat
- 0+ aract
-.sp
-If the pattern has the \fB/g\fP or \fB/G\fP modifier, the results of successive
-matching attempts are output in sequence, like this:
-.sp
- re> /\eBi(\ew\ew)/g
- data> Mississippi
- 0: iss
- 1: ss
- 0: iss
- 1: ss
- 0: ipp
- 1: pp
-.sp
-"No match" is output only if the first match attempt fails. Here is an example
-of a failure message (the offset 4 that is specified by \e>4 is past the end of
-the subject string):
-.sp
- re> /xyz/
- data> xyz\e>4
- Error -24 (bad offset value)
-.P
-If any of the sequences \fB\eC\fP, \fB\eG\fP, or \fB\eL\fP are present in a
-data line that is successfully matched, the substrings extracted by the
-convenience functions are output with C, G, or L after the string number
-instead of a colon. This is in addition to the normal full list. The string
-length (that is, the return from the extraction function) is given in
-parentheses after each string for \fB\eC\fP and \fB\eG\fP.
-.P
-Note that whereas patterns can be continued over several lines (a plain ">"
-prompt is used for continuations), data lines may not. However newlines can be
-included in data by means of the \en escape (or \er, \er\en, etc., depending on
-the newline sequence setting).
-.
-.
-.
-.SH "OUTPUT FROM THE ALTERNATIVE MATCHING FUNCTION"
-.rs
-.sp
-When the alternative matching function, \fBpcre[16|32]_dfa_exec()\fP, is used (by
-means of the \eD escape sequence or the \fB-dfa\fP command line option), the
-output consists of a list of all the matches that start at the first point in
-the subject where there is at least one match. For example:
-.sp
- re> /(tang|tangerine|tan)/
- data> yellow tangerine\eD
- 0: tangerine
- 1: tang
- 2: tan
-.sp
-(Using the normal matching function on this data finds only "tang".) The
-longest matching string is always given first (and numbered zero). After a
-PCRE_ERROR_PARTIAL return, the output is "Partial match:", followed by the
-partially matching substring. (Note that this is the entire substring that was
-inspected during the partial match; it may include characters before the actual
-match start if a lookbehind assertion, \eK, \eb, or \eB was involved.)
-.P
-If \fB/g\fP is present on the pattern, the search for further matches resumes
-at the end of the longest match. For example:
-.sp
- re> /(tang|tangerine|tan)/g
- data> yellow tangerine and tangy sultana\eD
- 0: tangerine
- 1: tang
- 2: tan
- 0: tang
- 1: tan
- 0: tan
-.sp
-Since the matching function does not support substring capture, the escape
-sequences that are concerned with captured substrings are not relevant.
-.
-.
-.SH "RESTARTING AFTER A PARTIAL MATCH"
-.rs
-.sp
-When the alternative matching function has given the PCRE_ERROR_PARTIAL return,
-indicating that the subject partially matched the pattern, you can restart the
-match with additional subject data by means of the \eR escape sequence. For
-example:
-.sp
- re> /^\ed?\ed(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\ed\ed$/
- data> 23ja\eP\eD
- Partial match: 23ja
- data> n05\eR\eD
- 0: n05
-.sp
-For further information about partial matching, see the
-.\" HREF
-\fBpcrepartial\fP
-.\"
-documentation.
-.
-.
-.SH CALLOUTS
-.rs
-.sp
-If the pattern contains any callout requests, \fBpcretest\fP's callout function
-is called during matching. This works with both matching functions. By default,
-the called function displays the callout number, the start and current
-positions in the text at the callout time, and the next pattern item to be
-tested. For example:
-.sp
- --->pqrabcdef
- 0 ^ ^ \ed
-.sp
-This output indicates that callout number 0 occurred for a match attempt
-starting at the fourth character of the subject string, when the pointer was at
-the seventh character of the data, and when the next pattern item was \ed. Just
-one circumflex is output if the start and current positions are the same.
-.P
-Callouts numbered 255 are assumed to be automatic callouts, inserted as a
-result of the \fB/C\fP pattern modifier. In this case, instead of showing the
-callout number, the offset in the pattern, preceded by a plus, is output. For
-example:
-.sp
- re> /\ed?[A-E]\e*/C
- data> E*
- --->E*
- +0 ^ \ed?
- +3 ^ [A-E]
- +8 ^^ \e*
- +10 ^ ^
- 0: E*
-.sp
-If a pattern contains (*MARK) items, an additional line is output whenever
-a change of latest mark is passed to the callout function. For example:
-.sp
- re> /a(*MARK:X)bc/C
- data> abc
- --->abc
- +0 ^ a
- +1 ^^ (*MARK:X)
- +10 ^^ b
- Latest Mark: X
- +11 ^ ^ c
- +12 ^ ^
- 0: abc
-.sp
-The mark changes between matching "a" and "b", but stays the same for the rest
-of the match, so nothing more is output. If, as a result of backtracking, the
-mark reverts to being unset, the text "<unset>" is output.
-.P
-The callout function in \fBpcretest\fP returns zero (carry on matching) by
-default, but you can use a \eC item in a data line (as described above) to
-change this and other parameters of the callout.
-.P
-Inserting callouts can be helpful when using \fBpcretest\fP to check
-complicated regular expressions. For further information about callouts, see
-the
-.\" HREF
-\fBpcrecallout\fP
-.\"
-documentation.
-.
-.
-.
-.SH "NON-PRINTING CHARACTERS"
-.rs
-.sp
-When \fBpcretest\fP is outputting text in the compiled version of a pattern,
-bytes other than 32-126 are always treated as non-printing characters are are
-therefore shown as hex escapes.
-.P
-When \fBpcretest\fP is outputting text that is a matched part of a subject
-string, it behaves in the same way, unless a different locale has been set for
-the pattern (using the \fB/L\fP modifier). In this case, the \fBisprint()\fP
-function to distinguish printing and non-printing characters.
-.
-.
-.
-.SH "SAVING AND RELOADING COMPILED PATTERNS"
-.rs
-.sp
-The facilities described in this section are not available when the POSIX
-interface to PCRE is being used, that is, when the \fB/P\fP pattern modifier is
-specified.
-.P
-When the POSIX interface is not in use, you can cause \fBpcretest\fP to write a
-compiled pattern to a file, by following the modifiers with > and a file name.
-For example:
-.sp
- /pattern/im >/some/file
-.sp
-See the
-.\" HREF
-\fBpcreprecompile\fP
-.\"
-documentation for a discussion about saving and re-using compiled patterns.
-Note that if the pattern was successfully studied with JIT optimization, the
-JIT data cannot be saved.
-.P
-The data that is written is binary. The first eight bytes are the length of the
-compiled pattern data followed by the length of the optional study data, each
-written as four bytes in big-endian order (most significant byte first). If
-there is no study data (either the pattern was not studied, or studying did not
-return any data), the second length is zero. The lengths are followed by an
-exact copy of the compiled pattern. If there is additional study data, this
-(excluding any JIT data) follows immediately after the compiled pattern. After
-writing the file, \fBpcretest\fP expects to read a new pattern.
-.P
-A saved pattern can be reloaded into \fBpcretest\fP by specifying < and a file
-name instead of a pattern. There must be no space between < and the file name,
-which must not contain a < character, as otherwise \fBpcretest\fP will
-interpret the line as a pattern delimited by < characters. For example:
-.sp
- re> </some/file
- Compiled pattern loaded from /some/file
- No study data
-.sp
-If the pattern was previously studied with the JIT optimization, the JIT
-information cannot be saved and restored, and so is lost. When the pattern has
-been loaded, \fBpcretest\fP proceeds to read data lines in the usual way.
-.P
-You can copy a file written by \fBpcretest\fP to a different host and reload it
-there, even if the new host has opposite endianness to the one on which the
-pattern was compiled. For example, you can compile on an i86 machine and run on
-a SPARC machine. When a pattern is reloaded on a host with different
-endianness, the confirmation message is changed to:
-.sp
- Compiled pattern (byte-inverted) loaded from /some/file
-.sp
-The test suite contains some saved pre-compiled patterns with different
-endianness. These are reloaded using "<!" instead of just "<". This suppresses
-the "(byte-inverted)" text so that the output is the same on all hosts. It also
-forces debugging output once the pattern has been reloaded.
-.P
-File names for saving and reloading can be absolute or relative, but note that
-the shell facility of expanding a file name that starts with a tilde (~) is not
-available.
-.P
-The ability to save and reload files in \fBpcretest\fP is intended for testing
-and experimentation. It is not intended for production use because only a
-single pattern can be written to a file. Furthermore, there is no facility for
-supplying custom character tables for use with a reloaded pattern. If the
-original pattern was compiled with custom tables, an attempt to match a subject
-string using a reloaded pattern is likely to cause \fBpcretest\fP to crash.
-Finally, if you attempt to load a file that is not in the correct format, the
-result is undefined.
-.
-.
-.SH "SEE ALSO"
-.rs
-.sp
-\fBpcre\fP(3), \fBpcre16\fP(3), \fBpcre32\fP(3), \fBpcreapi\fP(3),
-\fBpcrecallout\fP(3),
-\fBpcrejit\fP, \fBpcrematching\fP(3), \fBpcrepartial\fP(d),
-\fBpcrepattern\fP(3), \fBpcreprecompile\fP(3).
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 23 February 2017
-Copyright (c) 1997-2017 University of Cambridge.
-.fi
diff --git a/libs/Pcre16/docs/doc/pcretest.txt b/libs/Pcre16/docs/doc/pcretest.txt
deleted file mode 100644
index 6d7305cfe8..0000000000
--- a/libs/Pcre16/docs/doc/pcretest.txt
+++ /dev/null
@@ -1,1091 +0,0 @@
-PCRETEST(1) General Commands Manual PCRETEST(1)
-
-
-
-NAME
- pcretest - a program for testing Perl-compatible regular expressions.
-
-SYNOPSIS
-
- pcretest [options] [input file [output file]]
-
- pcretest was written as a test program for the PCRE regular expression
- library itself, but it can also be used for experimenting with regular
- expressions. This document describes the features of the test program;
- for details of the regular expressions themselves, see the pcrepattern
- documentation. For details of the PCRE library function calls and their
- options, see the pcreapi , pcre16 and pcre32 documentation.
-
- The input for pcretest is a sequence of regular expression patterns and
- strings to be matched, as described below. The output shows the result
- of each match. Options on the command line and the patterns control
- PCRE options and exactly what is output.
-
- As PCRE has evolved, it has acquired many different features, and as a
- result, pcretest now has rather a lot of obscure options for testing
- every possible feature. Some of these options are specifically designed
- for use in conjunction with the test script and data files that are
- distributed as part of PCRE, and are unlikely to be of use otherwise.
- They are all documented here, but without much justification.
-
-
-INPUT DATA FORMAT
-
- Input to pcretest is processed line by line, either by calling the C
- library's fgets() function, or via the libreadline library (see below).
- In Unix-like environments, fgets() treats any bytes other than newline
- as data characters. However, in some Windows environments character 26
- (hex 1A) causes an immediate end of file, and no further data is read.
- For maximum portability, therefore, it is safest to use only ASCII
- characters in pcretest input files.
-
- The input is processed using using C's string functions, so must not
- contain binary zeroes, even though in Unix-like environments, fgets()
- treats any bytes other than newline as data characters.
-
-
-PCRE's 8-BIT, 16-BIT AND 32-BIT LIBRARIES
-
- From release 8.30, two separate PCRE libraries can be built. The origi-
- nal one supports 8-bit character strings, whereas the newer 16-bit
- library supports character strings encoded in 16-bit units. From
- release 8.32, a third library can be built, supporting character
- strings encoded in 32-bit units. The pcretest program can be used to
- test all three libraries. However, it is itself still an 8-bit program,
- reading 8-bit input and writing 8-bit output. When testing the 16-bit
- or 32-bit library, the patterns and data strings are converted to 16-
- or 32-bit format before being passed to the PCRE library functions.
- Results are converted to 8-bit for output.
-
- References to functions and structures of the form pcre[16|32]_xx below
- mean "pcre_xx when using the 8-bit library, pcre16_xx when using the
- 16-bit library, or pcre32_xx when using the 32-bit library".
-
-
-COMMAND LINE OPTIONS
-
- -8 If both the 8-bit library has been built, this option causes
- the 8-bit library to be used (which is the default); if the
- 8-bit library has not been built, this option causes an
- error.
-
- -16 If both the 8-bit or the 32-bit, and the 16-bit libraries
- have been built, this option causes the 16-bit library to be
- used. If only the 16-bit library has been built, this is the
- default (so has no effect). If only the 8-bit or the 32-bit
- library has been built, this option causes an error.
-
- -32 If both the 8-bit or the 16-bit, and the 32-bit libraries
- have been built, this option causes the 32-bit library to be
- used. If only the 32-bit library has been built, this is the
- default (so has no effect). If only the 8-bit or the 16-bit
- library has been built, this option causes an error.
-
- -b Behave as if each pattern has the /B (show byte code) modi-
- fier; the internal form is output after compilation.
-
- -C Output the version number of the PCRE library, and all avail-
- able information about the optional features that are
- included, and then exit with zero exit code. All other
- options are ignored.
-
- -C option Output information about a specific build-time option, then
- exit. This functionality is intended for use in scripts such
- as RunTest. The following options output the value and set
- the exit code as indicated:
-
- ebcdic-nl the code for LF (= NL) in an EBCDIC environment:
- 0x15 or 0x25
- 0 if used in an ASCII environment
- exit code is always 0
- linksize the configured internal link size (2, 3, or 4)
- exit code is set to the link size
- newline the default newline setting:
- CR, LF, CRLF, ANYCRLF, or ANY
- exit code is always 0
- bsr the default setting for what \R matches:
- ANYCRLF or ANY
- exit code is always 0
-
- The following options output 1 for true or 0 for false, and
- set the exit code to the same value:
-
- ebcdic compiled for an EBCDIC environment
- jit just-in-time support is available
- pcre16 the 16-bit library was built
- pcre32 the 32-bit library was built
- pcre8 the 8-bit library was built
- ucp Unicode property support is available
- utf UTF-8 and/or UTF-16 and/or UTF-32 support
- is available
-
- If an unknown option is given, an error message is output;
- the exit code is 0.
-
- -d Behave as if each pattern has the /D (debug) modifier; the
- internal form and information about the compiled pattern is
- output after compilation; -d is equivalent to -b -i.
-
- -dfa Behave as if each data line contains the \D escape sequence;
- this causes the alternative matching function,
- pcre[16|32]_dfa_exec(), to be used instead of the standard
- pcre[16|32]_exec() function (more detail is given below).
-
- -help Output a brief summary these options and then exit.
-
- -i Behave as if each pattern has the /I modifier; information
- about the compiled pattern is given after compilation.
-
- -M Behave as if each data line contains the \M escape sequence;
- this causes PCRE to discover the minimum MATCH_LIMIT and
- MATCH_LIMIT_RECURSION settings by calling pcre[16|32]_exec()
- repeatedly with different limits.
-
- -m Output the size of each compiled pattern after it has been
- compiled. This is equivalent to adding /M to each regular
- expression. The size is given in bytes for both libraries.
-
- -O Behave as if each pattern has the /O modifier, that is dis-
- able auto-possessification for all patterns.
-
- -o osize Set the number of elements in the output vector that is used
- when calling pcre[16|32]_exec() or pcre[16|32]_dfa_exec() to
- be osize. The default value is 45, which is enough for 14
- capturing subexpressions for pcre[16|32]_exec() or 22 differ-
- ent matches for pcre[16|32]_dfa_exec(). The vector size can
- be changed for individual matching calls by including \O in
- the data line (see below).
-
- -p Behave as if each pattern has the /P modifier; the POSIX
- wrapper API is used to call PCRE. None of the other options
- has any effect when -p is set. This option can be used only
- with the 8-bit library.
-
- -q Do not output the version number of pcretest at the start of
- execution.
-
- -S size On Unix-like systems, set the size of the run-time stack to
- size megabytes.
-
- -s or -s+ Behave as if each pattern has the /S modifier; in other
- words, force each pattern to be studied. If -s+ is used, all
- the JIT compile options are passed to pcre[16|32]_study(),
- causing just-in-time optimization to be set up if it is
- available, for both full and partial matching. Specific JIT
- compile options can be selected by following -s+ with a digit
- in the range 1 to 7, which selects the JIT compile modes as
- follows:
-
- 1 normal match only
- 2 soft partial match only
- 3 normal match and soft partial match
- 4 hard partial match only
- 6 soft and hard partial match
- 7 all three modes (default)
-
- If -s++ is used instead of -s+ (with or without a following
- digit), the text "(JIT)" is added to the first output line
- after a match or no match when JIT-compiled code was actually
- used.
-
- Note that there are pattern options that can override -s,
- either specifying no studying at all, or suppressing JIT com-
- pilation.
-
- If the /I or /D option is present on a pattern (requesting
- output about the compiled pattern), information about the
- result of studying is not included when studying is caused
- only by -s and neither -i nor -d is present on the command
- line. This behaviour means that the output from tests that
- are run with and without -s should be identical, except when
- options that output information about the actual running of a
- match are set.
-
- The -M, -t, and -tm options, which give information about
- resources used, are likely to produce different output with
- and without -s. Output may also differ if the /C option is
- present on an individual pattern. This uses callouts to trace
- the the matching process, and this may be different between
- studied and non-studied patterns. If the pattern contains
- (*MARK) items there may also be differences, for the same
- reason. The -s command line option can be overridden for spe-
- cific patterns that should never be studied (see the /S pat-
- tern modifier below).
-
- -t Run each compile, study, and match many times with a timer,
- and output the resulting times per compile, study, or match
- (in milliseconds). Do not set -m with -t, because you will
- then get the size output a zillion times, and the timing will
- be distorted. You can control the number of iterations that
- are used for timing by following -t with a number (as a sepa-
- rate item on the command line). For example, "-t 1000" iter-
- ates 1000 times. The default is to iterate 500000 times.
-
- -tm This is like -t except that it times only the matching phase,
- not the compile or study phases.
-
- -T -TM These behave like -t and -tm, but in addition, at the end of
- a run, the total times for all compiles, studies, and matches
- are output.
-
-
-DESCRIPTION
-
- If pcretest is given two filename arguments, it reads from the first
- and writes to the second. If it is given only one filename argument, it
- reads from that file and writes to stdout. Otherwise, it reads from
- stdin and writes to stdout, and prompts for each line of input, using
- "re>" to prompt for regular expressions, and "data>" to prompt for data
- lines.
-
- When pcretest is built, a configuration option can specify that it
- should be linked with the libreadline library. When this is done, if
- the input is from a terminal, it is read using the readline() function.
- This provides line-editing and history facilities. The output from the
- -help option states whether or not readline() will be used.
-
- The program handles any number of sets of input on a single input file.
- Each set starts with a regular expression, and continues with any num-
- ber of data lines to be matched against that pattern.
-
- Each data line is matched separately and independently. If you want to
- do multi-line matches, you have to use the \n escape sequence (or \r or
- \r\n, etc., depending on the newline setting) in a single line of input
- to encode the newline sequences. There is no limit on the length of
- data lines; the input buffer is automatically extended if it is too
- small.
-
- An empty line signals the end of the data lines, at which point a new
- regular expression is read. The regular expressions are given enclosed
- in any non-alphanumeric delimiters other than backslash, for example:
-
- /(a|bc)x+yz/
-
- White space before the initial delimiter is ignored. A regular expres-
- sion may be continued over several input lines, in which case the new-
- line characters are included within it. It is possible to include the
- delimiter within the pattern by escaping it, for example
-
- /abc\/def/
-
- If you do so, the escape and the delimiter form part of the pattern,
- but since delimiters are always non-alphanumeric, this does not affect
- its interpretation. If the terminating delimiter is immediately fol-
- lowed by a backslash, for example,
-
- /abc/\
-
- then a backslash is added to the end of the pattern. This is done to
- provide a way of testing the error condition that arises if a pattern
- finishes with a backslash, because
-
- /abc\/
-
- is interpreted as the first line of a pattern that starts with "abc/",
- causing pcretest to read the next line as a continuation of the regular
- expression.
-
-
-PATTERN MODIFIERS
-
- A pattern may be followed by any number of modifiers, which are mostly
- single characters, though some of these can be qualified by further
- characters. Following Perl usage, these are referred to below as, for
- example, "the /i modifier", even though the delimiter of the pattern
- need not always be a slash, and no slash is used when writing modi-
- fiers. White space may appear between the final pattern delimiter and
- the first modifier, and between the modifiers themselves. For refer-
- ence, here is a complete list of modifiers. They fall into several
- groups that are described in detail in the following sections.
-
- /8 set UTF mode
- /9 set PCRE_NEVER_UTF (locks out UTF mode)
- /? disable UTF validity check
- /+ show remainder of subject after match
- /= show all captures (not just those that are set)
-
- /A set PCRE_ANCHORED
- /B show compiled code
- /C set PCRE_AUTO_CALLOUT
- /D same as /B plus /I
- /E set PCRE_DOLLAR_ENDONLY
- /F flip byte order in compiled pattern
- /f set PCRE_FIRSTLINE
- /G find all matches (shorten string)
- /g find all matches (use startoffset)
- /I show information about pattern
- /i set PCRE_CASELESS
- /J set PCRE_DUPNAMES
- /K show backtracking control names
- /L set locale
- /M show compiled memory size
- /m set PCRE_MULTILINE
- /N set PCRE_NO_AUTO_CAPTURE
- /O set PCRE_NO_AUTO_POSSESS
- /P use the POSIX wrapper
- /Q test external stack check function
- /S study the pattern after compilation
- /s set PCRE_DOTALL
- /T select character tables
- /U set PCRE_UNGREEDY
- /W set PCRE_UCP
- /X set PCRE_EXTRA
- /x set PCRE_EXTENDED
- /Y set PCRE_NO_START_OPTIMIZE
- /Z don't show lengths in /B output
-
- /<any> set PCRE_NEWLINE_ANY
- /<anycrlf> set PCRE_NEWLINE_ANYCRLF
- /<cr> set PCRE_NEWLINE_CR
- /<crlf> set PCRE_NEWLINE_CRLF
- /<lf> set PCRE_NEWLINE_LF
- /<bsr_anycrlf> set PCRE_BSR_ANYCRLF
- /<bsr_unicode> set PCRE_BSR_UNICODE
- /<JS> set PCRE_JAVASCRIPT_COMPAT
-
-
- Perl-compatible modifiers
-
- The /i, /m, /s, and /x modifiers set the PCRE_CASELESS, PCRE_MULTILINE,
- PCRE_DOTALL, or PCRE_EXTENDED options, respectively, when
- pcre[16|32]_compile() is called. These four modifier letters have the
- same effect as they do in Perl. For example:
-
- /caseless/i
-
-
- Modifiers for other PCRE options
-
- The following table shows additional modifiers for setting PCRE com-
- pile-time options that do not correspond to anything in Perl:
-
- /8 PCRE_UTF8 ) when using the 8-bit
- /? PCRE_NO_UTF8_CHECK ) library
-
- /8 PCRE_UTF16 ) when using the 16-bit
- /? PCRE_NO_UTF16_CHECK ) library
-
- /8 PCRE_UTF32 ) when using the 32-bit
- /? PCRE_NO_UTF32_CHECK ) library
-
- /9 PCRE_NEVER_UTF
- /A PCRE_ANCHORED
- /C PCRE_AUTO_CALLOUT
- /E PCRE_DOLLAR_ENDONLY
- /f PCRE_FIRSTLINE
- /J PCRE_DUPNAMES
- /N PCRE_NO_AUTO_CAPTURE
- /O PCRE_NO_AUTO_POSSESS
- /U PCRE_UNGREEDY
- /W PCRE_UCP
- /X PCRE_EXTRA
- /Y PCRE_NO_START_OPTIMIZE
- /<any> PCRE_NEWLINE_ANY
- /<anycrlf> PCRE_NEWLINE_ANYCRLF
- /<cr> PCRE_NEWLINE_CR
- /<crlf> PCRE_NEWLINE_CRLF
- /<lf> PCRE_NEWLINE_LF
- /<bsr_anycrlf> PCRE_BSR_ANYCRLF
- /<bsr_unicode> PCRE_BSR_UNICODE
- /<JS> PCRE_JAVASCRIPT_COMPAT
-
- The modifiers that are enclosed in angle brackets are literal strings
- as shown, including the angle brackets, but the letters within can be
- in either case. This example sets multiline matching with CRLF as the
- line ending sequence:
-
- /^abc/m<CRLF>
-
- As well as turning on the PCRE_UTF8/16/32 option, the /8 modifier
- causes all non-printing characters in output strings to be printed
- using the \x{hh...} notation. Otherwise, those less than 0x100 are out-
- put in hex without the curly brackets.
-
- Full details of the PCRE options are given in the pcreapi documenta-
- tion.
-
- Finding all matches in a string
-
- Searching for all possible matches within each subject string can be
- requested by the /g or /G modifier. After finding a match, PCRE is
- called again to search the remainder of the subject string. The differ-
- ence between /g and /G is that the former uses the startoffset argument
- to pcre[16|32]_exec() to start searching at a new point within the
- entire string (which is in effect what Perl does), whereas the latter
- passes over a shortened substring. This makes a difference to the
- matching process if the pattern begins with a lookbehind assertion
- (including \b or \B).
-
- If any call to pcre[16|32]_exec() in a /g or /G sequence matches an
- empty string, the next call is done with the PCRE_NOTEMPTY_ATSTART and
- PCRE_ANCHORED flags set in order to search for another, non-empty,
- match at the same point. If this second match fails, the start offset
- is advanced, and the normal match is retried. This imitates the way
- Perl handles such cases when using the /g modifier or the split() func-
- tion. Normally, the start offset is advanced by one character, but if
- the newline convention recognizes CRLF as a newline, and the current
- character is CR followed by LF, an advance of two is used.
-
- Other modifiers
-
- There are yet more modifiers for controlling the way pcretest operates.
-
- The /+ modifier requests that as well as outputting the substring that
- matched the entire pattern, pcretest should in addition output the
- remainder of the subject string. This is useful for tests where the
- subject contains multiple copies of the same substring. If the + modi-
- fier appears twice, the same action is taken for captured substrings.
- In each case the remainder is output on the following line with a plus
- character following the capture number. Note that this modifier must
- not immediately follow the /S modifier because /S+ and /S++ have other
- meanings.
-
- The /= modifier requests that the values of all potential captured
- parentheses be output after a match. By default, only those up to the
- highest one actually used in the match are output (corresponding to the
- return code from pcre[16|32]_exec()). Values in the offsets vector cor-
- responding to higher numbers should be set to -1, and these are output
- as "<unset>". This modifier gives a way of checking that this is hap-
- pening.
-
- The /B modifier is a debugging feature. It requests that pcretest out-
- put a representation of the compiled code after compilation. Normally
- this information contains length and offset values; however, if /Z is
- also present, this data is replaced by spaces. This is a special fea-
- ture for use in the automatic test scripts; it ensures that the same
- output is generated for different internal link sizes.
-
- The /D modifier is a PCRE debugging feature, and is equivalent to /BI,
- that is, both the /B and the /I modifiers.
-
- The /F modifier causes pcretest to flip the byte order of the 2-byte
- and 4-byte fields in the compiled pattern. This facility is for testing
- the feature in PCRE that allows it to execute patterns that were com-
- piled on a host with a different endianness. This feature is not avail-
- able when the POSIX interface to PCRE is being used, that is, when the
- /P pattern modifier is specified. See also the section about saving and
- reloading compiled patterns below.
-
- The /I modifier requests that pcretest output information about the
- compiled pattern (whether it is anchored, has a fixed first character,
- and so on). It does this by calling pcre[16|32]_fullinfo() after com-
- piling a pattern. If the pattern is studied, the results of that are
- also output. In this output, the word "char" means a non-UTF character,
- that is, the value of a single data item (8-bit, 16-bit, or 32-bit,
- depending on the library that is being tested).
-
- The /K modifier requests pcretest to show names from backtracking con-
- trol verbs that are returned from calls to pcre[16|32]_exec(). It
- causes pcretest to create a pcre[16|32]_extra block if one has not
- already been created by a call to pcre[16|32]_study(), and to set the
- PCRE_EXTRA_MARK flag and the mark field within it, every time that
- pcre[16|32]_exec() is called. If the variable that the mark field
- points to is non-NULL for a match, non-match, or partial match,
- pcretest prints the string to which it points. For a match, this is
- shown on a line by itself, tagged with "MK:". For a non-match it is
- added to the message.
-
- The /L modifier must be followed directly by the name of a locale, for
- example,
-
- /pattern/Lfr_FR
-
- For this reason, it must be the last modifier. The given locale is set,
- pcre[16|32]_maketables() is called to build a set of character tables
- for the locale, and this is then passed to pcre[16|32]_compile() when
- compiling the regular expression. Without an /L (or /T) modifier, NULL
- is passed as the tables pointer; that is, /L applies only to the
- expression on which it appears.
-
- The /M modifier causes the size in bytes of the memory block used to
- hold the compiled pattern to be output. This does not include the size
- of the pcre[16|32] block; it is just the actual compiled data. If the
- pattern is successfully studied with the PCRE_STUDY_JIT_COMPILE option,
- the size of the JIT compiled code is also output.
-
- The /Q modifier is used to test the use of pcre_stack_guard. It must be
- followed by '0' or '1', specifying the return code to be given from an
- external function that is passed to PCRE and used for stack checking
- during compilation (see the pcreapi documentation for details).
-
- The /S modifier causes pcre[16|32]_study() to be called after the
- expression has been compiled, and the results used when the expression
- is matched. There are a number of qualifying characters that may follow
- /S. They may appear in any order.
-
- If /S is followed by an exclamation mark, pcre[16|32]_study() is called
- with the PCRE_STUDY_EXTRA_NEEDED option, causing it always to return a
- pcre_extra block, even when studying discovers no useful information.
-
- If /S is followed by a second S character, it suppresses studying, even
- if it was requested externally by the -s command line option. This
- makes it possible to specify that certain patterns are always studied,
- and others are never studied, independently of -s. This feature is used
- in the test files in a few cases where the output is different when the
- pattern is studied.
-
- If the /S modifier is followed by a + character, the call to
- pcre[16|32]_study() is made with all the JIT study options, requesting
- just-in-time optimization support if it is available, for both normal
- and partial matching. If you want to restrict the JIT compiling modes,
- you can follow /S+ with a digit in the range 1 to 7:
-
- 1 normal match only
- 2 soft partial match only
- 3 normal match and soft partial match
- 4 hard partial match only
- 6 soft and hard partial match
- 7 all three modes (default)
-
- If /S++ is used instead of /S+ (with or without a following digit), the
- text "(JIT)" is added to the first output line after a match or no
- match when JIT-compiled code was actually used.
-
- Note that there is also an independent /+ modifier; it must not be
- given immediately after /S or /S+ because this will be misinterpreted.
-
- If JIT studying is successful, the compiled JIT code will automatically
- be used when pcre[16|32]_exec() is run, except when incompatible run-
- time options are specified. For more details, see the pcrejit documen-
- tation. See also the \J escape sequence below for a way of setting the
- size of the JIT stack.
-
- Finally, if /S is followed by a minus character, JIT compilation is
- suppressed, even if it was requested externally by the -s command line
- option. This makes it possible to specify that JIT is never to be used
- for certain patterns.
-
- The /T modifier must be followed by a single digit. It causes a spe-
- cific set of built-in character tables to be passed to pcre[16|32]_com-
- pile(). It is used in the standard PCRE tests to check behaviour with
- different character tables. The digit specifies the tables as follows:
-
- 0 the default ASCII tables, as distributed in
- pcre_chartables.c.dist
- 1 a set of tables defining ISO 8859 characters
-
- In table 1, some characters whose codes are greater than 128 are iden-
- tified as letters, digits, spaces, etc.
-
- Using the POSIX wrapper API
-
- The /P modifier causes pcretest to call PCRE via the POSIX wrapper API
- rather than its native API. This supports only the 8-bit library. When
- /P is set, the following modifiers set options for the regcomp() func-
- tion:
-
- /i REG_ICASE
- /m REG_NEWLINE
- /N REG_NOSUB
- /s REG_DOTALL )
- /U REG_UNGREEDY ) These options are not part of
- /W REG_UCP ) the POSIX standard
- /8 REG_UTF8 )
-
- The /+ modifier works as described above. All other modifiers are
- ignored.
-
- Locking out certain modifiers
-
- PCRE can be compiled with or without support for certain features such
- as UTF-8/16/32 or Unicode properties. Accordingly, the standard tests
- are split up into a number of different files that are selected for
- running depending on which features are available. When updating the
- tests, it is all too easy to put a new test into the wrong file by mis-
- take; for example, to put a test that requires UTF support into a file
- that is used when it is not available. To help detect such mistakes as
- early as possible, there is a facility for locking out specific modi-
- fiers. If an input line for pcretest starts with the string "< forbid "
- the following sequence of characters is taken as a list of forbidden
- modifiers. For example, in the test files that must not use UTF or Uni-
- code property support, this line appears:
-
- < forbid 8W
-
- This locks out the /8 and /W modifiers. An immediate error is given if
- they are subsequently encountered. If the character string contains <
- but not >, all the multi-character modifiers that begin with < are
- locked out. Otherwise, such modifiers must be explicitly listed, for
- example:
-
- < forbid <JS><cr>
-
- There must be a single space between < and "forbid" for this feature to
- be recognised. If there is not, the line is interpreted either as a
- request to re-load a pre-compiled pattern (see "SAVING AND RELOADING
- COMPILED PATTERNS" below) or, if there is a another < character, as a
- pattern that uses < as its delimiter.
-
-
-DATA LINES
-
- Before each data line is passed to pcre[16|32]_exec(), leading and
- trailing white space is removed, and it is then scanned for \ escapes.
- Some of these are pretty esoteric features, intended for checking out
- some of the more complicated features of PCRE. If you are just testing
- "ordinary" regular expressions, you probably don't need any of these.
- The following escapes are recognized:
-
- \a alarm (BEL, \x07)
- \b backspace (\x08)
- \e escape (\x27)
- \f form feed (\x0c)
- \n newline (\x0a)
- \qdd set the PCRE_MATCH_LIMIT limit to dd
- (any number of digits)
- \r carriage return (\x0d)
- \t tab (\x09)
- \v vertical tab (\x0b)
- \nnn octal character (up to 3 octal digits); always
- a byte unless > 255 in UTF-8 or 16-bit or 32-bit mode
- \o{dd...} octal character (any number of octal digits}
- \xhh hexadecimal byte (up to 2 hex digits)
- \x{hh...} hexadecimal character (any number of hex digits)
- \A pass the PCRE_ANCHORED option to pcre[16|32]_exec()
- or pcre[16|32]_dfa_exec()
- \B pass the PCRE_NOTBOL option to pcre[16|32]_exec()
- or pcre[16|32]_dfa_exec()
- \Cdd call pcre[16|32]_copy_substring() for substring dd
- after a successful match (number less than 32)
- \Cname call pcre[16|32]_copy_named_substring() for substring
- "name" after a successful match (name termin-
- ated by next non alphanumeric character)
- \C+ show the current captured substrings at callout
- time
- \C- do not supply a callout function
- \C!n return 1 instead of 0 when callout number n is
- reached
- \C!n!m return 1 instead of 0 when callout number n is
- reached for the nth time
- \C*n pass the number n (may be negative) as callout
- data; this is used as the callout return value
- \D use the pcre[16|32]_dfa_exec() match function
- \F only shortest match for pcre[16|32]_dfa_exec()
- \Gdd call pcre[16|32]_get_substring() for substring dd
- after a successful match (number less than 32)
- \Gname call pcre[16|32]_get_named_substring() for substring
- "name" after a successful match (name termin-
- ated by next non-alphanumeric character)
- \Jdd set up a JIT stack of dd kilobytes maximum (any
- number of digits)
- \L call pcre[16|32]_get_substringlist() after a
- successful match
- \M discover the minimum MATCH_LIMIT and
- MATCH_LIMIT_RECURSION settings
- \N pass the PCRE_NOTEMPTY option to pcre[16|32]_exec()
- or pcre[16|32]_dfa_exec(); if used twice, pass the
- PCRE_NOTEMPTY_ATSTART option
- \Odd set the size of the output vector passed to
- pcre[16|32]_exec() to dd (any number of digits)
- \P pass the PCRE_PARTIAL_SOFT option to pcre[16|32]_exec()
- or pcre[16|32]_dfa_exec(); if used twice, pass the
- PCRE_PARTIAL_HARD option
- \Qdd set the PCRE_MATCH_LIMIT_RECURSION limit to dd
- (any number of digits)
- \R pass the PCRE_DFA_RESTART option to pcre[16|32]_dfa_exec()
- \S output details of memory get/free calls during matching
- \Y pass the PCRE_NO_START_OPTIMIZE option to
- pcre[16|32]_exec()
- or pcre[16|32]_dfa_exec()
- \Z pass the PCRE_NOTEOL option to pcre[16|32]_exec()
- or pcre[16|32]_dfa_exec()
- \? pass the PCRE_NO_UTF[8|16|32]_CHECK option to
- pcre[16|32]_exec() or pcre[16|32]_dfa_exec()
- \>dd start the match at offset dd (optional "-"; then
- any number of digits); this sets the startoffset
- argument for pcre[16|32]_exec() or
- pcre[16|32]_dfa_exec()
- \<cr> pass the PCRE_NEWLINE_CR option to pcre[16|32]_exec()
- or pcre[16|32]_dfa_exec()
- \<lf> pass the PCRE_NEWLINE_LF option to pcre[16|32]_exec()
- or pcre[16|32]_dfa_exec()
- \<crlf> pass the PCRE_NEWLINE_CRLF option to pcre[16|32]_exec()
- or pcre[16|32]_dfa_exec()
- \<anycrlf> pass the PCRE_NEWLINE_ANYCRLF option to pcre[16|32]_exec()
- or pcre[16|32]_dfa_exec()
- \<any> pass the PCRE_NEWLINE_ANY option to pcre[16|32]_exec()
- or pcre[16|32]_dfa_exec()
-
- The use of \x{hh...} is not dependent on the use of the /8 modifier on
- the pattern. It is recognized always. There may be any number of hexa-
- decimal digits inside the braces; invalid values provoke error mes-
- sages.
-
- Note that \xhh specifies one byte rather than one character in UTF-8
- mode; this makes it possible to construct invalid UTF-8 sequences for
- testing purposes. On the other hand, \x{hh} is interpreted as a UTF-8
- character in UTF-8 mode, generating more than one byte if the value is
- greater than 127. When testing the 8-bit library not in UTF-8 mode,
- \x{hh} generates one byte for values less than 256, and causes an error
- for greater values.
-
- In UTF-16 mode, all 4-digit \x{hhhh} values are accepted. This makes it
- possible to construct invalid UTF-16 sequences for testing purposes.
-
- In UTF-32 mode, all 4- to 8-digit \x{...} values are accepted. This
- makes it possible to construct invalid UTF-32 sequences for testing
- purposes.
-
- The escapes that specify line ending sequences are literal strings,
- exactly as shown. No more than one newline setting should be present in
- any data line.
-
- A backslash followed by anything else just escapes the anything else.
- If the very last character is a backslash, it is ignored. This gives a
- way of passing an empty line as data, since a real empty line termi-
- nates the data input.
-
- The \J escape provides a way of setting the maximum stack size that is
- used by the just-in-time optimization code. It is ignored if JIT opti-
- mization is not being used. Providing a stack that is larger than the
- default 32K is necessary only for very complicated patterns.
-
- If \M is present, pcretest calls pcre[16|32]_exec() several times, with
- different values in the match_limit and match_limit_recursion fields of
- the pcre[16|32]_extra data structure, until it finds the minimum num-
- bers for each parameter that allow pcre[16|32]_exec() to complete with-
- out error. Because this is testing a specific feature of the normal
- interpretive pcre[16|32]_exec() execution, the use of any JIT optimiza-
- tion that might have been set up by the /S+ qualifier of -s+ option is
- disabled.
-
- The match_limit number is a measure of the amount of backtracking that
- takes place, and checking it out can be instructive. For most simple
- matches, the number is quite small, but for patterns with very large
- numbers of matching possibilities, it can become large very quickly
- with increasing length of subject string. The match_limit_recursion
- number is a measure of how much stack (or, if PCRE is compiled with
- NO_RECURSE, how much heap) memory is needed to complete the match
- attempt.
-
- When \O is used, the value specified may be higher or lower than the
- size set by the -O command line option (or defaulted to 45); \O applies
- only to the call of pcre[16|32]_exec() for the line in which it
- appears.
-
- If the /P modifier was present on the pattern, causing the POSIX wrap-
- per API to be used, the only option-setting sequences that have any
- effect are \B, \N, and \Z, causing REG_NOTBOL, REG_NOTEMPTY, and
- REG_NOTEOL, respectively, to be passed to regexec().
-
-
-THE ALTERNATIVE MATCHING FUNCTION
-
- By default, pcretest uses the standard PCRE matching function,
- pcre[16|32]_exec() to match each data line. PCRE also supports an
- alternative matching function, pcre[16|32]_dfa_test(), which operates
- in a different way, and has some restrictions. The differences between
- the two functions are described in the pcrematching documentation.
-
- If a data line contains the \D escape sequence, or if the command line
- contains the -dfa option, the alternative matching function is used.
- This function finds all possible matches at a given point. If, however,
- the \F escape sequence is present in the data line, it stops after the
- first match is found. This is always the shortest possible match.
-
-
-DEFAULT OUTPUT FROM PCRETEST
-
- This section describes the output when the normal matching function,
- pcre[16|32]_exec(), is being used.
-
- When a match succeeds, pcretest outputs the list of captured substrings
- that pcre[16|32]_exec() returns, starting with number 0 for the string
- that matched the whole pattern. Otherwise, it outputs "No match" when
- the return is PCRE_ERROR_NOMATCH, and "Partial match:" followed by the
- partially matching substring when pcre[16|32]_exec() returns
- PCRE_ERROR_PARTIAL. (Note that this is the entire substring that was
- inspected during the partial match; it may include characters before
- the actual match start if a lookbehind assertion, \K, \b, or \B was
- involved.) For any other return, pcretest outputs the PCRE negative
- error number and a short descriptive phrase. If the error is a failed
- UTF string check, the offset of the start of the failing character and
- the reason code are also output, provided that the size of the output
- vector is at least two. Here is an example of an interactive pcretest
- run.
-
- $ pcretest
- PCRE version 8.13 2011-04-30
-
- re> /^abc(\d+)/
- data> abc123
- 0: abc123
- 1: 123
- data> xyz
- No match
-
- Unset capturing substrings that are not followed by one that is set are
- not returned by pcre[16|32]_exec(), and are not shown by pcretest. In
- the following example, there are two capturing substrings, but when the
- first data line is matched, the second, unset substring is not shown.
- An "internal" unset substring is shown as "<unset>", as for the second
- data line.
-
- re> /(a)|(b)/
- data> a
- 0: a
- 1: a
- data> b
- 0: b
- 1: <unset>
- 2: b
-
- If the strings contain any non-printing characters, they are output as
- \xhh escapes if the value is less than 256 and UTF mode is not set.
- Otherwise they are output as \x{hh...} escapes. See below for the defi-
- nition of non-printing characters. If the pattern has the /+ modifier,
- the output for substring 0 is followed by the the rest of the subject
- string, identified by "0+" like this:
-
- re> /cat/+
- data> cataract
- 0: cat
- 0+ aract
-
- If the pattern has the /g or /G modifier, the results of successive
- matching attempts are output in sequence, like this:
-
- re> /\Bi(\w\w)/g
- data> Mississippi
- 0: iss
- 1: ss
- 0: iss
- 1: ss
- 0: ipp
- 1: pp
-
- "No match" is output only if the first match attempt fails. Here is an
- example of a failure message (the offset 4 that is specified by \>4 is
- past the end of the subject string):
-
- re> /xyz/
- data> xyz\>4
- Error -24 (bad offset value)
-
- If any of the sequences \C, \G, or \L are present in a data line that
- is successfully matched, the substrings extracted by the convenience
- functions are output with C, G, or L after the string number instead of
- a colon. This is in addition to the normal full list. The string length
- (that is, the return from the extraction function) is given in paren-
- theses after each string for \C and \G.
-
- Note that whereas patterns can be continued over several lines (a plain
- ">" prompt is used for continuations), data lines may not. However new-
- lines can be included in data by means of the \n escape (or \r, \r\n,
- etc., depending on the newline sequence setting).
-
-
-OUTPUT FROM THE ALTERNATIVE MATCHING FUNCTION
-
- When the alternative matching function, pcre[16|32]_dfa_exec(), is used
- (by means of the \D escape sequence or the -dfa command line option),
- the output consists of a list of all the matches that start at the
- first point in the subject where there is at least one match. For exam-
- ple:
-
- re> /(tang|tangerine|tan)/
- data> yellow tangerine\D
- 0: tangerine
- 1: tang
- 2: tan
-
- (Using the normal matching function on this data finds only "tang".)
- The longest matching string is always given first (and numbered zero).
- After a PCRE_ERROR_PARTIAL return, the output is "Partial match:", fol-
- lowed by the partially matching substring. (Note that this is the
- entire substring that was inspected during the partial match; it may
- include characters before the actual match start if a lookbehind asser-
- tion, \K, \b, or \B was involved.)
-
- If /g is present on the pattern, the search for further matches resumes
- at the end of the longest match. For example:
-
- re> /(tang|tangerine|tan)/g
- data> yellow tangerine and tangy sultana\D
- 0: tangerine
- 1: tang
- 2: tan
- 0: tang
- 1: tan
- 0: tan
-
- Since the matching function does not support substring capture, the
- escape sequences that are concerned with captured substrings are not
- relevant.
-
-
-RESTARTING AFTER A PARTIAL MATCH
-
- When the alternative matching function has given the PCRE_ERROR_PARTIAL
- return, indicating that the subject partially matched the pattern, you
- can restart the match with additional subject data by means of the \R
- escape sequence. For example:
-
- re> /^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$/
- data> 23ja\P\D
- Partial match: 23ja
- data> n05\R\D
- 0: n05
-
- For further information about partial matching, see the pcrepartial
- documentation.
-
-
-CALLOUTS
-
- If the pattern contains any callout requests, pcretest's callout func-
- tion is called during matching. This works with both matching func-
- tions. By default, the called function displays the callout number, the
- start and current positions in the text at the callout time, and the
- next pattern item to be tested. For example:
-
- --->pqrabcdef
- 0 ^ ^ \d
-
- This output indicates that callout number 0 occurred for a match
- attempt starting at the fourth character of the subject string, when
- the pointer was at the seventh character of the data, and when the next
- pattern item was \d. Just one circumflex is output if the start and
- current positions are the same.
-
- Callouts numbered 255 are assumed to be automatic callouts, inserted as
- a result of the /C pattern modifier. In this case, instead of showing
- the callout number, the offset in the pattern, preceded by a plus, is
- output. For example:
-
- re> /\d?[A-E]\*/C
- data> E*
- --->E*
- +0 ^ \d?
- +3 ^ [A-E]
- +8 ^^ \*
- +10 ^ ^
- 0: E*
-
- If a pattern contains (*MARK) items, an additional line is output when-
- ever a change of latest mark is passed to the callout function. For
- example:
-
- re> /a(*MARK:X)bc/C
- data> abc
- --->abc
- +0 ^ a
- +1 ^^ (*MARK:X)
- +10 ^^ b
- Latest Mark: X
- +11 ^ ^ c
- +12 ^ ^
- 0: abc
-
- The mark changes between matching "a" and "b", but stays the same for
- the rest of the match, so nothing more is output. If, as a result of
- backtracking, the mark reverts to being unset, the text "<unset>" is
- output.
-
- The callout function in pcretest returns zero (carry on matching) by
- default, but you can use a \C item in a data line (as described above)
- to change this and other parameters of the callout.
-
- Inserting callouts can be helpful when using pcretest to check compli-
- cated regular expressions. For further information about callouts, see
- the pcrecallout documentation.
-
-
-NON-PRINTING CHARACTERS
-
- When pcretest is outputting text in the compiled version of a pattern,
- bytes other than 32-126 are always treated as non-printing characters
- are are therefore shown as hex escapes.
-
- When pcretest is outputting text that is a matched part of a subject
- string, it behaves in the same way, unless a different locale has been
- set for the pattern (using the /L modifier). In this case, the
- isprint() function to distinguish printing and non-printing characters.
-
-
-SAVING AND RELOADING COMPILED PATTERNS
-
- The facilities described in this section are not available when the
- POSIX interface to PCRE is being used, that is, when the /P pattern
- modifier is specified.
-
- When the POSIX interface is not in use, you can cause pcretest to write
- a compiled pattern to a file, by following the modifiers with > and a
- file name. For example:
-
- /pattern/im >/some/file
-
- See the pcreprecompile documentation for a discussion about saving and
- re-using compiled patterns. Note that if the pattern was successfully
- studied with JIT optimization, the JIT data cannot be saved.
-
- The data that is written is binary. The first eight bytes are the
- length of the compiled pattern data followed by the length of the
- optional study data, each written as four bytes in big-endian order
- (most significant byte first). If there is no study data (either the
- pattern was not studied, or studying did not return any data), the sec-
- ond length is zero. The lengths are followed by an exact copy of the
- compiled pattern. If there is additional study data, this (excluding
- any JIT data) follows immediately after the compiled pattern. After
- writing the file, pcretest expects to read a new pattern.
-
- A saved pattern can be reloaded into pcretest by specifying < and a
- file name instead of a pattern. There must be no space between < and
- the file name, which must not contain a < character, as otherwise
- pcretest will interpret the line as a pattern delimited by < charac-
- ters. For example:
-
- re> </some/file
- Compiled pattern loaded from /some/file
- No study data
-
- If the pattern was previously studied with the JIT optimization, the
- JIT information cannot be saved and restored, and so is lost. When the
- pattern has been loaded, pcretest proceeds to read data lines in the
- usual way.
-
- You can copy a file written by pcretest to a different host and reload
- it there, even if the new host has opposite endianness to the one on
- which the pattern was compiled. For example, you can compile on an i86
- machine and run on a SPARC machine. When a pattern is reloaded on a
- host with different endianness, the confirmation message is changed to:
-
- Compiled pattern (byte-inverted) loaded from /some/file
-
- The test suite contains some saved pre-compiled patterns with different
- endianness. These are reloaded using "<!" instead of just "<". This
- suppresses the "(byte-inverted)" text so that the output is the same on
- all hosts. It also forces debugging output once the pattern has been
- reloaded.
-
- File names for saving and reloading can be absolute or relative, but
- note that the shell facility of expanding a file name that starts with
- a tilde (~) is not available.
-
- The ability to save and reload files in pcretest is intended for test-
- ing and experimentation. It is not intended for production use because
- only a single pattern can be written to a file. Furthermore, there is
- no facility for supplying custom character tables for use with a
- reloaded pattern. If the original pattern was compiled with custom
- tables, an attempt to match a subject string using a reloaded pattern
- is likely to cause pcretest to crash. Finally, if you attempt to load
- a file that is not in the correct format, the result is undefined.
-
-
-SEE ALSO
-
- pcre(3), pcre16(3), pcre32(3), pcreapi(3), pcrecallout(3), pcrejit,
- pcrematching(3), pcrepartial(d), pcrepattern(3), pcreprecompile(3).
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 23 February 2017
- Copyright (c) 1997-2017 University of Cambridge.
diff --git a/libs/Pcre16/docs/doc/pcreunicode.3 b/libs/Pcre16/docs/doc/pcreunicode.3
deleted file mode 100644
index cb5e5269a4..0000000000
--- a/libs/Pcre16/docs/doc/pcreunicode.3
+++ /dev/null
@@ -1,249 +0,0 @@
-.TH PCREUNICODE 3 "27 February 2013" "PCRE 8.33"
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH "UTF-8, UTF-16, UTF-32, AND UNICODE PROPERTY SUPPORT"
-.rs
-.sp
-As well as UTF-8 support, PCRE also supports UTF-16 (from release 8.30) and
-UTF-32 (from release 8.32), by means of two additional libraries. They can be
-built as well as, or instead of, the 8-bit library.
-.
-.
-.SH "UTF-8 SUPPORT"
-.rs
-.sp
-In order process UTF-8 strings, you must build PCRE's 8-bit library with UTF
-support, and, in addition, you must call
-.\" HREF
-\fBpcre_compile()\fP
-.\"
-with the PCRE_UTF8 option flag, or the pattern must start with the sequence
-(*UTF8) or (*UTF). When either of these is the case, both the pattern and any
-subject strings that are matched against it are treated as UTF-8 strings
-instead of strings of individual 1-byte characters.
-.
-.
-.SH "UTF-16 AND UTF-32 SUPPORT"
-.rs
-.sp
-In order process UTF-16 or UTF-32 strings, you must build PCRE's 16-bit or
-32-bit library with UTF support, and, in addition, you must call
-.\" HREF
-\fBpcre16_compile()\fP
-.\"
-or
-.\" HREF
-\fBpcre32_compile()\fP
-.\"
-with the PCRE_UTF16 or PCRE_UTF32 option flag, as appropriate. Alternatively,
-the pattern must start with the sequence (*UTF16), (*UTF32), as appropriate, or
-(*UTF), which can be used with either library. When UTF mode is set, both the
-pattern and any subject strings that are matched against it are treated as
-UTF-16 or UTF-32 strings instead of strings of individual 16-bit or 32-bit
-characters.
-.
-.
-.SH "UTF SUPPORT OVERHEAD"
-.rs
-.sp
-If you compile PCRE with UTF 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_UTF[8|16|32] flag occasionally, so should not be very big.
-.
-.
-.SH "UNICODE PROPERTY SUPPORT"
-.rs
-.sp
-If PCRE is built with Unicode character property support (which implies UTF
-support), the escape sequences \ep{..}, \eP{..}, and \eX can be used.
-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, the Unicode script names such as Arabic or Han, and the derived
-properties Any and L&. Full lists is given in the
-.\" HREF
-\fBpcrepattern\fP
-.\"
-and
-.\" HREF
-\fBpcresyntax\fP
-.\"
-documentation. Only the short names for properties are supported. For example,
-\ep{L} matches a letter. Its Perl synonym, \ep{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.
-.
-.
-.\" HTML <a name="utf8strings"></a>
-.SS "Validity of UTF-8 strings"
-.rs
-.sp
-When you set the PCRE_UTF8 flag, the byte strings passed as patterns and
-subjects are (by default) checked for validity on entry to the relevant
-functions. The entire string is checked before any other processing takes
-place. 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 the surrogate area. (From release 8.33 the so-called
-"non-character" code points are no longer excluded because Unicode corrigendum
-#9 makes it clear that they should not be.)
-.P
-Characters in the "Surrogate Area" of Unicode are reserved for use by UTF-16,
-where they are used in pairs to encode codepoints with values greater than
-0xFFFF. The code points that are encoded by UTF-16 pairs are available
-independently in the UTF-8 and UTF-32 encodings. (In other words, the whole
-surrogate thing is a fudge for UTF-16 which unfortunately messes up UTF-8 and
-UTF-32.)
-.P
-If an invalid UTF-8 string is passed to PCRE, an error return is given. At
-compile time, the only additional information is the offset to the first byte
-of the failing character. The run-time functions \fBpcre_exec()\fP and
-\fBpcre_dfa_exec()\fP also pass back this information, as well as a more
-detailed reason code if the caller has provided memory in which to do this.
-.P
-In some situations, you may already know that your strings are valid, and
-therefore want to skip these checks in order to improve performance, for
-example in the case of a long subject string that is being scanned repeatedly.
-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.
-.P
-Note that passing PCRE_NO_UTF8_CHECK to \fBpcre_compile()\fP just disables the
-check for the pattern; it does not also apply to subject strings. If you want
-to disable the check for a subject string you must pass this option to
-\fBpcre_exec()\fP or \fBpcre_dfa_exec()\fP.
-.P
-If you pass an invalid UTF-8 string when PCRE_NO_UTF8_CHECK is set, the result
-is undefined and your program may crash.
-.
-.
-.\" HTML <a name="utf16strings"></a>
-.SS "Validity of UTF-16 strings"
-.rs
-.sp
-When you set the PCRE_UTF16 flag, the strings of 16-bit data units that are
-passed as patterns and subjects are (by default) checked for validity on entry
-to the relevant functions. Values other than those in the surrogate range
-U+D800 to U+DFFF are independent code points. Values in the surrogate range
-must be used in pairs in the correct manner.
-.P
-If an invalid UTF-16 string is passed to PCRE, an error return is given. At
-compile time, the only additional information is the offset to the first data
-unit of the failing character. The run-time functions \fBpcre16_exec()\fP and
-\fBpcre16_dfa_exec()\fP also pass back this information, as well as a more
-detailed reason code if the caller has provided memory in which to do this.
-.P
-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_UTF16_CHECK flag at compile time or at run time, PCRE assumes that
-the pattern or subject it is given (respectively) contains only valid UTF-16
-sequences. In this case, it does not diagnose an invalid UTF-16 string.
-However, if an invalid string is passed, the result is undefined.
-.
-.
-.\" HTML <a name="utf32strings"></a>
-.SS "Validity of UTF-32 strings"
-.rs
-.sp
-When you set the PCRE_UTF32 flag, the strings of 32-bit data units that are
-passed as patterns and subjects are (by default) checked for validity on entry
-to the relevant functions. This check allows only values in the range U+0
-to U+10FFFF, excluding the surrogate area U+D800 to U+DFFF.
-.P
-If an invalid UTF-32 string is passed to PCRE, an error return is given. At
-compile time, the only additional information is the offset to the first data
-unit of the failing character. The run-time functions \fBpcre32_exec()\fP and
-\fBpcre32_dfa_exec()\fP also pass back this information, as well as a more
-detailed reason code if the caller has provided memory in which to do this.
-.P
-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_UTF32_CHECK flag at compile time or at run time, PCRE assumes that
-the pattern or subject it is given (respectively) contains only valid UTF-32
-sequences. In this case, it does not diagnose an invalid UTF-32 string.
-However, if an invalid string is passed, the result is undefined.
-.
-.
-.SS "General comments about UTF modes"
-.rs
-.sp
-1. Codepoints less than 256 can be specified in patterns by either braced or
-unbraced hexadecimal escape sequences (for example, \ex{b3} or \exb3). Larger
-values have to use braced sequences.
-.P
-2. Octal numbers up to \e777 are recognized, and in UTF-8 mode they match
-two-byte characters for values greater than \e177.
-.P
-3. Repeat quantifiers apply to complete UTF characters, not to individual
-data units, for example: \ex{100}{3}.
-.P
-4. The dot metacharacter matches one UTF character instead of a single data
-unit.
-.P
-5. The escape sequence \eC can be used to match a single byte in UTF-8 mode, or
-a single 16-bit data unit in UTF-16 mode, or a single 32-bit data unit in
-UTF-32 mode, but its use can lead to some strange effects because it breaks up
-multi-unit characters (see the description of \eC in the
-.\" HREF
-\fBpcrepattern\fP
-.\"
-documentation). The use of \eC is not supported in the alternative matching
-function \fBpcre[16|32]_dfa_exec()\fP, nor is it supported in UTF mode by the
-JIT optimization of \fBpcre[16|32]_exec()\fP. If JIT optimization is requested
-for a UTF pattern that contains \eC, it will not succeed, and so the matching
-will be carried out by the normal interpretive function.
-.P
-6. The character escapes \eb, \eB, \ed, \eD, \es, \eS, \ew, and \eW correctly
-test characters of any code value, but, by default, the characters that PCRE
-recognizes as digits, spaces, or word characters remain the same set as in
-non-UTF mode, all with values less than 256. This remains true even when PCRE
-is built to include Unicode property support, because to do otherwise would
-slow down PCRE in many common cases. Note in particular that this applies to
-\eb and \eB, because they are defined in terms of \ew and \eW. If you really
-want to test for a wider sense of, say, "digit", you can use explicit Unicode
-property tests such as \ep{Nd}. Alternatively, if you set the PCRE_UCP option,
-the way that the character escapes work is changed so that Unicode properties
-are used to determine which characters match. There are more details in the
-section on
-.\" HTML <a href="pcrepattern.html#genericchartypes">
-.\" </a>
-generic character types
-.\"
-in the
-.\" HREF
-\fBpcrepattern\fP
-.\"
-documentation.
-.P
-7. Similarly, characters that match the POSIX named character classes are all
-low-valued characters, unless the PCRE_UCP option is set.
-.P
-8. However, the horizontal and vertical white space matching escapes (\eh, \eH,
-\ev, and \eV) do match all the appropriate Unicode characters, whether or not
-PCRE_UCP is set.
-.P
-9. Case-insensitive matching applies only to characters whose values are less
-than 128, unless PCRE is built with Unicode property support. A few Unicode
-characters such as Greek sigma have more than two codepoints that are
-case-equivalent. Up to and including PCRE release 8.31, only one-to-one case
-mappings were supported, but later releases (with Unicode property support) do
-treat as case-equivalent all versions of characters such as Greek sigma.
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 27 February 2013
-Copyright (c) 1997-2013 University of Cambridge.
-.fi
diff --git a/libs/Pcre16/docs/doc/perltest.txt b/libs/Pcre16/docs/doc/perltest.txt
deleted file mode 100644
index bb1a52a48e..0000000000
--- a/libs/Pcre16/docs/doc/perltest.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-The perltest program
---------------------
-
-The perltest.pl script tests Perl's regular expressions; it has the same
-specification as pcretest, and so can be given identical input, except that
-input patterns can be followed only by Perl's lower case modifiers and certain
-other pcretest modifiers that are either handled or ignored:
-
- /+ recognized and handled by perltest
- /++ the second + is ignored
- /8 recognized and handled by perltest
- /J ignored
- /K ignored
- /W ignored
- /S ignored
- /SS ignored
- /Y ignored
-
-The pcretest \Y escape in data lines is removed before matching. The data lines
-are processed as Perl double-quoted strings, so if they contain " $ or @
-characters, these have to be escaped. For this reason, all such characters in
-the Perl-compatible testinput1 file are escaped so that they can be used for
-perltest as well as for pcretest. The special upper case pattern modifiers such
-as /A that pcretest recognizes, and its special data line escapes, are not used
-in the Perl-compatible test file. The output should be identical, apart from
-the initial identifying banner.
-
-The perltest.pl script can also test UTF-8 features. It recognizes the special
-modifier /8 that pcretest uses to invoke UTF-8 functionality. The testinput4
-and testinput6 files can be fed to perltest to run compatible UTF-8 tests.
-However, it is necessary to add "use utf8; require Encode" to the script to
-make this work correctly. I have not managed to find a way to handle this
-automatically.
-
-The other testinput files are not suitable for feeding to perltest.pl, since
-they make use of the special upper case modifiers and escapes that pcretest
-uses to test certain features of PCRE. Some of these files also contain
-malformed regular expressions, in order to check that PCRE diagnoses them
-correctly.
-
-Philip Hazel
-January 2012
diff --git a/libs/hunspell/docs/ABOUT-NLS b/libs/hunspell/docs/ABOUT-NLS
deleted file mode 100644
index 15514263f9..0000000000
--- a/libs/hunspell/docs/ABOUT-NLS
+++ /dev/null
@@ -1,1379 +0,0 @@
-1 Notes on the Free Translation Project
-***************************************
-
-Free software is going international! The Free Translation Project is a
-way to get maintainers of free software, translators, and users all
-together, so that free software will gradually become able to speak many
-languages. A few packages already provide translations for their
-messages.
-
- If you found this 'ABOUT-NLS' file inside a distribution, you may
-assume that the distributed package does use GNU 'gettext' internally,
-itself available at your nearest GNU archive site. But you do _not_
-need to install GNU 'gettext' prior to configuring, installing or using
-this package with messages translated.
-
- Installers will find here some useful hints. These notes also
-explain how users should proceed for getting the programs to use the
-available translations. They tell how people wanting to contribute and
-work on translations can contact the appropriate team.
-
-1.1 INSTALL Matters
-===================
-
-Some packages are "localizable" when properly installed; the programs
-they contain can be made to speak your own native language. Most such
-packages use GNU 'gettext'. Other packages have their own ways to
-internationalization, predating GNU 'gettext'.
-
- By default, this package will be installed to allow translation of
-messages. It will automatically detect whether the system already
-provides the GNU 'gettext' functions. Installers may use special
-options at configuration time for changing the default behaviour. The
-command:
-
- ./configure --disable-nls
-
-will _totally_ disable translation of messages.
-
- When you already have GNU 'gettext' installed on your system and run
-configure without an option for your new package, 'configure' will
-probably detect the previously built and installed 'libintl' library and
-will decide to use it. If not, you may have to to use the
-'--with-libintl-prefix' option to tell 'configure' where to look for it.
-
- Internationalized packages usually have many 'po/LL.po' files, where
-LL gives an ISO 639 two-letter code identifying the language. Unless
-translations have been forbidden at 'configure' time by using the
-'--disable-nls' switch, all available translations are installed
-together with the package. However, the environment variable 'LINGUAS'
-may be set, prior to configuration, to limit the installed set.
-'LINGUAS' should then contain a space separated list of two-letter
-codes, stating which languages are allowed.
-
-1.2 Using This Package
-======================
-
-As a user, if your language has been installed for this package, you
-only have to set the 'LANG' environment variable to the appropriate
-'LL_CC' combination. If you happen to have the 'LC_ALL' or some other
-'LC_xxx' environment variables set, you should unset them before setting
-'LANG', otherwise the setting of 'LANG' will not have the desired
-effect. Here 'LL' is an ISO 639 two-letter language code, and 'CC' is
-an ISO 3166 two-letter country code. For example, let's suppose that
-you speak German and live in Germany. At the shell prompt, merely
-execute 'setenv LANG de_DE' (in 'csh'), 'export LANG; LANG=de_DE' (in
-'sh') or 'export LANG=de_DE' (in 'bash'). This can be done from your
-'.login' or '.profile' file, once and for all.
-
- You might think that the country code specification is redundant.
-But in fact, some languages have dialects in different countries. For
-example, 'de_AT' is used for Austria, and 'pt_BR' for Brazil. The
-country code serves to distinguish the dialects.
-
- The locale naming convention of 'LL_CC', with 'LL' denoting the
-language and 'CC' denoting the country, is the one use on systems based
-on GNU libc. On other systems, some variations of this scheme are used,
-such as 'LL' or 'LL_CC.ENCODING'. You can get the list of locales
-supported by your system for your language by running the command
-'locale -a | grep '^LL''.
-
- Not all programs have translations for all languages. By default, an
-English message is shown in place of a nonexistent translation. If you
-understand other languages, you can set up a priority list of languages.
-This is done through a different environment variable, called
-'LANGUAGE'. GNU 'gettext' gives preference to 'LANGUAGE' over 'LANG'
-for the purpose of message handling, but you still need to have 'LANG'
-set to the primary language; this is required by other parts of the
-system libraries. For example, some Swedish users who would rather read
-translations in German than English for when Swedish is not available,
-set 'LANGUAGE' to 'sv:de' while leaving 'LANG' to 'sv_SE'.
-
- Special advice for Norwegian users: The language code for Norwegian
-bokma*l changed from 'no' to 'nb' recently (in 2003). During the
-transition period, while some message catalogs for this language are
-installed under 'nb' and some older ones under 'no', it's recommended
-for Norwegian users to set 'LANGUAGE' to 'nb:no' so that both newer and
-older translations are used.
-
- In the 'LANGUAGE' environment variable, but not in the 'LANG'
-environment variable, 'LL_CC' combinations can be abbreviated as 'LL' to
-denote the language's main dialect. For example, 'de' is equivalent to
-'de_DE' (German as spoken in Germany), and 'pt' to 'pt_PT' (Portuguese
-as spoken in Portugal) in this context.
-
-1.3 Translating Teams
-=====================
-
-For the Free Translation Project to be a success, we need interested
-people who like their own language and write it well, and who are also
-able to synergize with other translators speaking the same language.
-Each translation team has its own mailing list. The up-to-date list of
-teams can be found at the Free Translation Project's homepage,
-'http://translationproject.org/', in the "Teams" area.
-
- If you'd like to volunteer to _work_ at translating messages, you
-should become a member of the translating team for your own language.
-The subscribing address is _not_ the same as the list itself, it has
-'-request' appended. For example, speakers of Swedish can send a
-message to 'sv-request@li.org', having this message body:
-
- subscribe
-
- Keep in mind that team members are expected to participate _actively_
-in translations, or at solving translational difficulties, rather than
-merely lurking around. If your team does not exist yet and you want to
-start one, or if you are unsure about what to do or how to get started,
-please write to 'coordinator@translationproject.org' to reach the
-coordinator for all translator teams.
-
- The English team is special. It works at improving and uniformizing
-the terminology in use. Proven linguistic skills are praised more than
-programming skills, here.
-
-1.4 Available Packages
-======================
-
-Languages are not equally supported in all packages. The following
-matrix shows the current state of internationalization, as of Jun 2014.
-The matrix shows, in regard of each package, for which languages PO
-files have been submitted to translation coordination, with a
-translation percentage of at least 50%.
-
- Ready PO files af am an ar as ast az be bg bn bn_IN bs ca crh cs
- +---------------------------------------------------+
- a2ps | [] [] [] |
- aegis | |
- anubis | |
- aspell | [] [] [] |
- bash | [] [] [] |
- bfd | |
- binutils | [] |
- bison | |
- bison-runtime | [] |
- buzztrax | [] |
- ccd2cue | |
- ccide | |
- cflow | |
- clisp | |
- coreutils | [] [] |
- cpio | |
- cppi | |
- cpplib | [] |
- cryptsetup | [] |
- datamash | |
- denemo | [] [] |
- dfarc | [] |
- dialog | [] [] [] |
- dico | |
- diffutils | [] |
- dink | [] |
- direvent | |
- doodle | [] |
- dos2unix | |
- dos2unix-man | |
- e2fsprogs | [] [] |
- enscript | [] |
- exif | [] |
- fetchmail | [] [] |
- findutils | [] |
- flex | [] |
- freedink | [] [] |
- fusionforge | |
- gas | |
- gawk | [] |
- gcal | [] |
- gcc | |
- gdbm | |
- gettext-examples | [] [] [] [] [] |
- gettext-runtime | [] [] [] |
- gettext-tools | [] [] |
- gjay | |
- glunarclock | [] [] [] |
- gnubiff | [] |
- gnubik | [] |
- gnucash | () () [] |
- gnuchess | |
- gnulib | [] |
- gnunet | |
- gnunet-gtk | |
- gold | |
- gphoto2 | [] |
- gprof | [] |
- gramadoir | |
- grep | [] [] [] |
- grub | [] |
- gsasl | |
- gss | |
- gst-plugins-bad | [] |
- gst-plugins-base | [] [] [] |
- gst-plugins-good | [] [] [] |
- gst-plugins-ugly | [] [] [] |
- gstreamer | [] [] [] [] |
- gtick | [] |
- gtkam | [] [] |
- gtkspell | [] [] [] [] [] |
- guix | |
- guix-packages | |
- gutenprint | [] |
- hello | [] |
- help2man | |
- help2man-texi | |
- hylafax | |
- idutils | |
- iso_15924 | [] |
- iso_3166 | [] [] [] [] [] [] [] [] [] [] |
- iso_3166_2 | |
- iso_4217 | [] |
- iso_639 | [] [] [] [] [] [] [] [] [] |
- iso_639_3 | [] [] |
- iso_639_5 | |
- jwhois | |
- kbd | [] |
- klavaro | [] [] [] [] [] |
- latrine | |
- ld | [] |
- leafpad | [] [] [] [] |
- libc | [] [] [] |
- libexif | () |
- libextractor | |
- libgnutls | [] |
- libgphoto2 | [] |
- libgphoto2_port | [] |
- libgsasl | |
- libiconv | [] [] |
- libidn | [] |
- liferea | [] [] [] [] |
- lilypond | [] [] |
- lordsawar | [] |
- lprng | |
- lynx | [] [] |
- m4 | [] |
- mailfromd | |
- mailutils | |
- make | [] |
- man-db | [] [] |
- man-db-manpages | |
- midi-instruments | [] [] [] |
- minicom | [] |
- mkisofs | [] |
- myserver | [] |
- nano | [] [] [] |
- opcodes | |
- parted | [] |
- pies | |
- popt | [] |
- procps-ng | |
- procps-ng-man | |
- psmisc | [] |
- pspp | [] |
- pushover | [] |
- pwdutils | |
- pyspread | |
- radius | [] |
- recode | [] [] [] |
- recutils | |
- rpm | |
- rush | |
- sarg | |
- sed | [] [] [] |
- sharutils | [] |
- shishi | |
- skribilo | |
- solfege | [] |
- solfege-manual | |
- spotmachine | |
- sudo | [] [] |
- sudoers | [] [] |
- sysstat | [] |
- tar | [] [] [] |
- texinfo | [] [] |
- texinfo_document | [] |
- tigervnc | [] |
- tin | |
- tin-man | |
- tracgoogleappsa... | |
- trader | |
- util-linux | [] |
- ve | |
- vice | |
- vmm | |
- vorbis-tools | [] |
- wastesedge | |
- wcd | |
- wcd-man | |
- wdiff | [] [] |
- wget | [] |
- wyslij-po | |
- xboard | |
- xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] |
- xkeyboard-config | [] [] [] |
- +---------------------------------------------------+
- af am an ar as ast az be bg bn bn_IN bs ca crh cs
- 4 0 2 5 3 11 0 8 23 3 3 1 54 4 73
-
- da de el en en_GB en_ZA eo es et eu fa fi fr
- +--------------------------------------------------+
- a2ps | [] [] [] [] [] [] [] [] [] |
- aegis | [] [] [] [] |
- anubis | [] [] [] [] [] |
- aspell | [] [] [] [] [] [] [] |
- bash | [] [] [] |
- bfd | [] [] [] [] |
- binutils | [] [] [] |
- bison | [] [] [] [] [] [] [] [] |
- bison-runtime | [] [] [] [] [] [] [] [] |
- buzztrax | [] [] [] [] |
- ccd2cue | [] [] [] |
- ccide | [] [] [] [] [] [] |
- cflow | [] [] [] [] [] |
- clisp | [] [] [] [] [] |
- coreutils | [] [] [] [] [] |
- cpio | [] [] [] [] [] |
- cppi | [] [] [] [] [] |
- cpplib | [] [] [] [] [] [] |
- cryptsetup | [] [] [] [] [] |
- datamash | [] [] [] [] |
- denemo | [] |
- dfarc | [] [] [] [] [] [] |
- dialog | [] [] [] [] [] [] [] [] [] |
- dico | [] [] [] [] |
- diffutils | [] [] [] [] [] [] |
- dink | [] [] [] [] [] [] |
- direvent | [] [] [] [] |
- doodle | [] [] [] [] |
- dos2unix | [] [] [] [] [] |
- dos2unix-man | [] [] [] |
- e2fsprogs | [] [] [] [] [] |
- enscript | [] [] [] [] [] [] |
- exif | [] [] [] [] [] [] |
- fetchmail | [] () [] [] [] [] [] |
- findutils | [] [] [] [] [] [] [] [] |
- flex | [] [] [] [] [] [] |
- freedink | [] [] [] [] [] [] [] [] |
- fusionforge | [] [] [] |
- gas | [] [] [] |
- gawk | [] [] [] [] [] |
- gcal | [] [] [] [] |
- gcc | [] [] |
- gdbm | [] [] [] [] [] |
- gettext-examples | [] [] [] [] [] [] [] |
- gettext-runtime | [] [] [] [] [] [] |
- gettext-tools | [] [] [] [] [] |
- gjay | [] [] [] [] |
- glunarclock | [] [] [] [] [] |
- gnubiff | () [] [] () |
- gnubik | [] [] [] [] [] |
- gnucash | [] () () () () () () |
- gnuchess | [] [] [] [] |
- gnulib | [] [] [] [] [] [] [] |
- gnunet | [] |
- gnunet-gtk | [] |
- gold | [] [] [] |
- gphoto2 | [] () [] [] |
- gprof | [] [] [] [] [] [] |
- gramadoir | [] [] [] [] [] |
- grep | [] [] [] [] [] [] [] |
- grub | [] [] [] [] [] |
- gsasl | [] [] [] [] [] |
- gss | [] [] [] [] [] |
- gst-plugins-bad | [] [] |
- gst-plugins-base | [] [] [] [] [] [] |
- gst-plugins-good | [] [] [] [] [] [] [] |
- gst-plugins-ugly | [] [] [] [] [] [] [] [] |
- gstreamer | [] [] [] [] [] [] [] |
- gtick | [] () [] [] [] |
- gtkam | [] () [] [] [] [] |
- gtkspell | [] [] [] [] [] [] [] [] |
- guix | [] [] |
- guix-packages | |
- gutenprint | [] [] [] [] |
- hello | [] [] [] [] [] [] [] [] |
- help2man | [] [] [] [] [] [] [] |
- help2man-texi | [] [] [] |
- hylafax | [] [] |
- idutils | [] [] [] [] [] |
- iso_15924 | [] () [] [] () [] () |
- iso_3166 | [] () [] [] [] [] () [] () |
- iso_3166_2 | [] () () () |
- iso_4217 | [] () [] [] [] () [] () |
- iso_639 | [] () [] [] () [] () |
- iso_639_3 | () () () |
- iso_639_5 | () () () |
- jwhois | [] [] [] [] [] |
- kbd | [] [] [] [] [] [] |
- klavaro | [] [] [] [] [] [] [] |
- latrine | [] () [] [] |
- ld | [] [] [] [] |
- leafpad | [] [] [] [] [] [] [] [] |
- libc | [] [] [] [] [] |
- libexif | [] [] () [] [] |
- libextractor | [] |
- libgnutls | [] [] [] [] |
- libgphoto2 | [] () [] |
- libgphoto2_port | [] () [] [] [] [] |
- libgsasl | [] [] [] [] [] |
- libiconv | [] [] [] [] [] [] [] |
- libidn | [] [] [] [] [] |
- liferea | [] () [] [] [] [] [] |
- lilypond | [] [] [] [] [] [] |
- lordsawar | [] [] |
- lprng | |
- lynx | [] [] [] [] [] [] |
- m4 | [] [] [] [] [] [] |
- mailfromd | [] |
- mailutils | [] [] [] [] |
- make | [] [] [] [] [] |
- man-db | [] [] [] [] |
- man-db-manpages | [] [] |
- midi-instruments | [] [] [] [] [] [] [] [] [] |
- minicom | [] [] [] [] [] |
- mkisofs | [] [] [] |
- myserver | [] [] [] [] |
- nano | [] [] [] [] [] [] [] |
- opcodes | [] [] [] [] [] |
- parted | [] [] [] |
- pies | [] |
- popt | [] [] [] [] [] [] |
- procps-ng | [] [] |
- procps-ng-man | [] [] |
- psmisc | [] [] [] [] [] [] [] |
- pspp | [] [] [] |
- pushover | () [] [] [] |
- pwdutils | [] [] [] |
- pyspread | [] [] [] |
- radius | [] [] |
- recode | [] [] [] [] [] [] [] |
- recutils | [] [] [] [] |
- rpm | [] [] [] [] [] |
- rush | [] [] [] |
- sarg | [] [] |
- sed | [] [] [] [] [] [] [] [] |
- sharutils | [] [] [] [] |
- shishi | [] [] [] |
- skribilo | [] [] |
- solfege | [] [] [] [] [] [] [] [] |
- solfege-manual | [] [] [] [] [] |
- spotmachine | [] [] [] [] |
- sudo | [] [] [] [] [] [] |
- sudoers | [] [] [] [] [] [] |
- sysstat | [] [] [] [] [] [] |
- tar | [] [] [] [] [] [] [] |
- texinfo | [] [] [] [] [] |
- texinfo_document | [] [] [] [] |
- tigervnc | [] [] [] [] [] [] |
- tin | [] [] [] [] |
- tin-man | [] |
- tracgoogleappsa... | [] [] [] [] [] |
- trader | [] [] [] [] [] [] |
- util-linux | [] [] [] [] |
- ve | [] [] [] [] [] |
- vice | () () () |
- vmm | [] [] |
- vorbis-tools | [] [] [] [] |
- wastesedge | [] () |
- wcd | [] [] [] [] |
- wcd-man | [] |
- wdiff | [] [] [] [] [] [] [] |
- wget | [] [] [] [] [] [] |
- wyslij-po | [] [] [] [] |
- xboard | [] [] [] [] |
- xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] |
- xkeyboard-config | [] [] [] [] [] [] [] |
- +--------------------------------------------------+
- da de el en en_GB en_ZA eo es et eu fa fi fr
- 120 130 32 1 6 0 94 95 22 13 4 103 136
-
- ga gd gl gu he hi hr hu hy ia id is it ja ka kk
- +-------------------------------------------------+
- a2ps | [] [] [] [] |
- aegis | [] |
- anubis | [] [] [] [] |
- aspell | [] [] [] [] [] |
- bash | [] [] [] |
- bfd | [] [] |
- binutils | [] [] [] |
- bison | [] |
- bison-runtime | [] [] [] [] [] [] [] [] |
- buzztrax | |
- ccd2cue | [] |
- ccide | [] [] |
- cflow | [] [] [] |
- clisp | |
- coreutils | [] [] [] |
- cpio | [] [] [] [] [] [] |
- cppi | [] [] [] [] [] |
- cpplib | [] [] |
- cryptsetup | [] |
- datamash | |
- denemo | [] |
- dfarc | [] [] [] |
- dialog | [] [] [] [] [] [] [] [] [] [] |
- dico | |
- diffutils | [] [] [] [] |
- dink | [] |
- direvent | [] |
- doodle | [] [] |
- dos2unix | [] [] |
- dos2unix-man | |
- e2fsprogs | [] |
- enscript | [] [] [] |
- exif | [] [] [] [] [] [] |
- fetchmail | [] [] [] |
- findutils | [] [] [] [] [] [] [] |
- flex | [] |
- freedink | [] [] [] [] |
- fusionforge | |
- gas | [] |
- gawk | [] () [] |
- gcal | |
- gcc | |
- gdbm | |
- gettext-examples | [] [] [] [] [] [] [] |
- gettext-runtime | [] [] [] [] [] [] [] |
- gettext-tools | [] [] [] |
- gjay | [] |
- glunarclock | [] [] [] [] [] [] |
- gnubiff | [] [] () |
- gnubik | [] [] [] |
- gnucash | () () () () () [] |
- gnuchess | |
- gnulib | [] [] [] [] [] |
- gnunet | |
- gnunet-gtk | |
- gold | [] [] |
- gphoto2 | [] [] [] [] |
- gprof | [] [] [] [] |
- gramadoir | [] [] [] |
- grep | [] [] [] [] [] [] [] |
- grub | [] [] [] |
- gsasl | [] [] [] [] [] |
- gss | [] [] [] [] [] |
- gst-plugins-bad | [] |
- gst-plugins-base | [] [] [] [] |
- gst-plugins-good | [] [] [] [] [] [] |
- gst-plugins-ugly | [] [] [] [] [] [] |
- gstreamer | [] [] [] [] [] |
- gtick | [] [] [] [] [] |
- gtkam | [] [] [] [] [] |
- gtkspell | [] [] [] [] [] [] [] [] [] [] |
- guix | |
- guix-packages | |
- gutenprint | [] [] [] |
- hello | [] [] [] [] [] |
- help2man | [] [] [] |
- help2man-texi | |
- hylafax | [] |
- idutils | [] [] |
- iso_15924 | [] [] [] [] [] [] |
- iso_3166 | [] [] [] [] [] [] [] [] [] [] [] [] [] |
- iso_3166_2 | [] [] |
- iso_4217 | [] [] [] [] [] [] |
- iso_639 | [] [] [] [] [] [] [] [] [] |
- iso_639_3 | [] [] |
- iso_639_5 | |
- jwhois | [] [] [] [] |
- kbd | [] [] [] |
- klavaro | [] [] [] [] [] |
- latrine | [] |
- ld | [] [] [] [] |
- leafpad | [] [] [] [] [] [] [] () |
- libc | [] [] [] [] [] |
- libexif | [] |
- libextractor | |
- libgnutls | [] |
- libgphoto2 | [] [] |
- libgphoto2_port | [] [] |
- libgsasl | [] [] [] [] |
- libiconv | [] [] [] [] [] [] [] |
- libidn | [] [] [] [] |
- liferea | [] [] [] [] [] |
- lilypond | [] |
- lordsawar | |
- lprng | [] |
- lynx | [] [] [] [] |
- m4 | [] [] [] [] [] |
- mailfromd | |
- mailutils | |
- make | [] [] [] [] |
- man-db | [] [] |
- man-db-manpages | [] [] |
- midi-instruments | [] [] [] [] [] [] [] [] [] |
- minicom | [] [] [] |
- mkisofs | [] [] |
- myserver | [] |
- nano | [] [] [] [] [] |
- opcodes | [] [] [] |
- parted | [] [] [] [] |
- pies | |
- popt | [] [] [] [] [] [] [] [] [] [] |
- procps-ng | |
- procps-ng-man | |
- psmisc | [] [] [] [] |
- pspp | [] [] |
- pushover | [] |
- pwdutils | [] |
- pyspread | |
- radius | [] |
- recode | [] [] [] [] [] [] [] |
- recutils | |
- rpm | [] |
- rush | [] |
- sarg | |
- sed | [] [] [] [] [] [] [] |
- sharutils | |
- shishi | |
- skribilo | [] |
- solfege | [] [] |
- solfege-manual | |
- spotmachine | |
- sudo | [] [] [] [] |
- sudoers | [] [] [] |
- sysstat | [] [] [] |
- tar | [] [] [] [] [] [] |
- texinfo | [] [] [] |
- texinfo_document | [] [] |
- tigervnc | |
- tin | |
- tin-man | |
- tracgoogleappsa... | [] [] [] [] |
- trader | [] [] |
- util-linux | [] |
- ve | [] |
- vice | () () |
- vmm | |
- vorbis-tools | [] [] |
- wastesedge | () |
- wcd | |
- wcd-man | |
- wdiff | [] [] [] |
- wget | [] [] [] |
- wyslij-po | [] [] [] |
- xboard | |
- xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] [] |
- xkeyboard-config | [] [] [] [] [] |
- +-------------------------------------------------+
- ga gd gl gu he hi hr hu hy ia id is it ja ka kk
- 35 2 47 4 8 2 53 69 2 6 80 11 86 58 0 3
-
- kn ko ku ky lg lt lv mk ml mn mr ms mt nb ne nl
- +--------------------------------------------------+
- a2ps | [] [] |
- aegis | [] |
- anubis | [] [] [] |
- aspell | [] [] |
- bash | [] [] |
- bfd | |
- binutils | |
- bison | [] |
- bison-runtime | [] [] [] [] [] [] |
- buzztrax | |
- ccd2cue | |
- ccide | [] [] |
- cflow | [] |
- clisp | [] |
- coreutils | [] [] |
- cpio | [] |
- cppi | |
- cpplib | [] |
- cryptsetup | [] |
- datamash | [] [] |
- denemo | |
- dfarc | [] [] |
- dialog | [] [] [] [] [] [] |
- dico | |
- diffutils | [] [] [] |
- dink | [] |
- direvent | [] |
- doodle | [] |
- dos2unix | [] [] |
- dos2unix-man | [] |
- e2fsprogs | [] |
- enscript | [] |
- exif | [] [] |
- fetchmail | [] |
- findutils | [] [] |
- flex | [] |
- freedink | [] [] |
- fusionforge | |
- gas | |
- gawk | [] |
- gcal | |
- gcc | |
- gdbm | |
- gettext-examples | [] [] [] [] [] [] |
- gettext-runtime | [] [] |
- gettext-tools | [] |
- gjay | |
- glunarclock | [] [] |
- gnubiff | [] |
- gnubik | [] [] |
- gnucash | () () () () () () () [] |
- gnuchess | [] [] |
- gnulib | [] |
- gnunet | |
- gnunet-gtk | |
- gold | |
- gphoto2 | [] |
- gprof | [] [] |
- gramadoir | [] |
- grep | [] [] |
- grub | [] [] [] |
- gsasl | [] |
- gss | |
- gst-plugins-bad | [] [] |
- gst-plugins-base | [] [] [] |
- gst-plugins-good | [] [] [] [] |
- gst-plugins-ugly | [] [] [] [] [] |
- gstreamer | [] [] |
- gtick | [] |
- gtkam | [] [] |
- gtkspell | [] [] [] [] [] [] [] |
- guix | |
- guix-packages | |
- gutenprint | [] |
- hello | [] [] [] |
- help2man | [] |
- help2man-texi | |
- hylafax | [] |
- idutils | [] |
- iso_15924 | () [] [] |
- iso_3166 | [] [] [] () [] [] [] [] [] [] |
- iso_3166_2 | () [] |
- iso_4217 | () [] [] [] |
- iso_639 | [] [] () [] [] [] [] |
- iso_639_3 | [] () [] |
- iso_639_5 | () |
- jwhois | [] [] |
- kbd | [] |
- klavaro | [] [] |
- latrine | |
- ld | |
- leafpad | [] [] [] [] [] |
- libc | [] [] |
- libexif | [] |
- libextractor | [] |
- libgnutls | [] [] |
- libgphoto2 | [] |
- libgphoto2_port | [] |
- libgsasl | [] |
- libiconv | [] [] |
- libidn | [] |
- liferea | [] [] [] |
- lilypond | [] |
- lordsawar | |
- lprng | |
- lynx | [] |
- m4 | [] |
- mailfromd | |
- mailutils | |
- make | [] [] |
- man-db | [] |
- man-db-manpages | [] |
- midi-instruments | [] [] [] [] [] [] [] |
- minicom | [] |
- mkisofs | [] |
- myserver | |
- nano | [] [] [] |
- opcodes | [] |
- parted | [] |
- pies | |
- popt | [] [] [] [] [] |
- procps-ng | |
- procps-ng-man | |
- psmisc | [] |
- pspp | [] [] |
- pushover | |
- pwdutils | [] |
- pyspread | |
- radius | [] |
- recode | [] [] |
- recutils | [] |
- rpm | [] |
- rush | [] |
- sarg | |
- sed | [] [] |
- sharutils | [] |
- shishi | |
- skribilo | |
- solfege | [] [] |
- solfege-manual | [] |
- spotmachine | [] |
- sudo | [] [] |
- sudoers | [] [] |
- sysstat | [] [] |
- tar | [] [] [] |
- texinfo | [] |
- texinfo_document | [] |
- tigervnc | [] |
- tin | |
- tin-man | |
- tracgoogleappsa... | [] [] [] |
- trader | [] |
- util-linux | [] |
- ve | [] |
- vice | [] |
- vmm | [] |
- vorbis-tools | [] |
- wastesedge | [] |
- wcd | [] |
- wcd-man | [] |
- wdiff | [] |
- wget | [] [] |
- wyslij-po | [] |
- xboard | [] |
- xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] |
- xkeyboard-config | [] [] [] |
- +--------------------------------------------------+
- kn ko ku ky lg lt lv mk ml mn mr ms mt nb ne nl
- 5 11 4 6 0 13 22 3 3 3 4 11 2 40 1 124
-
- nn or os pa pl ps pt pt_BR ro ru rw sk sl sq sr
- +--------------------------------------------------+
- a2ps | [] [] [] [] [] [] [] |
- aegis | [] [] |
- anubis | [] [] [] |
- aspell | [] [] [] [] [] [] [] |
- bash | [] [] [] [] [] |
- bfd | [] |
- binutils | [] [] |
- bison | [] [] [] |
- bison-runtime | [] [] [] [] [] [] [] [] |
- buzztrax | |
- ccd2cue | [] |
- ccide | [] [] [] |
- cflow | [] [] |
- clisp | [] |
- coreutils | [] [] [] [] |
- cpio | [] [] [] |
- cppi | [] [] [] |
- cpplib | [] [] [] |
- cryptsetup | [] [] |
- datamash | [] [] |
- denemo | |
- dfarc | [] [] [] |
- dialog | [] [] [] [] [] [] [] |
- dico | [] |
- diffutils | [] [] |
- dink | |
- direvent | [] [] |
- doodle | [] [] |
- dos2unix | [] [] [] [] |
- dos2unix-man | [] [] |
- e2fsprogs | [] |
- enscript | [] [] [] [] [] [] |
- exif | [] [] [] [] [] [] |
- fetchmail | [] [] [] |
- findutils | [] [] [] [] [] |
- flex | [] [] [] [] [] |
- freedink | [] [] [] [] [] |
- fusionforge | |
- gas | |
- gawk | [] |
- gcal | |
- gcc | |
- gdbm | [] [] [] |
- gettext-examples | [] [] [] [] [] [] [] [] |
- gettext-runtime | [] [] [] [] [] [] [] [] [] |
- gettext-tools | [] [] [] [] [] [] [] |
- gjay | [] |
- glunarclock | [] [] [] [] [] [] |
- gnubiff | [] |
- gnubik | [] [] [] [] |
- gnucash | () () () () [] |
- gnuchess | [] [] |
- gnulib | [] [] [] [] [] |
- gnunet | |
- gnunet-gtk | |
- gold | |
- gphoto2 | [] [] [] [] [] |
- gprof | [] [] [] [] |
- gramadoir | [] [] |
- grep | [] [] [] [] [] [] |
- grub | [] [] [] [] [] |
- gsasl | [] [] [] |
- gss | [] [] [] [] |
- gst-plugins-bad | [] [] [] [] |
- gst-plugins-base | [] [] [] [] [] [] |
- gst-plugins-good | [] [] [] [] [] [] [] |
- gst-plugins-ugly | [] [] [] [] [] [] [] |
- gstreamer | [] [] [] [] [] [] [] |
- gtick | [] [] [] [] [] |
- gtkam | [] [] [] [] [] [] |
- gtkspell | [] [] [] [] [] [] [] [] [] |
- guix | |
- guix-packages | |
- gutenprint | [] [] |
- hello | [] [] [] [] [] [] |
- help2man | [] [] [] [] |
- help2man-texi | [] |
- hylafax | |
- idutils | [] [] [] |
- iso_15924 | [] () [] [] [] [] |
- iso_3166 | [] [] [] [] () [] [] [] [] [] [] [] [] |
- iso_3166_2 | [] () [] |
- iso_4217 | [] [] () [] [] [] [] [] |
- iso_639 | [] [] [] () [] [] [] [] [] [] |
- iso_639_3 | [] () |
- iso_639_5 | () [] |
- jwhois | [] [] [] [] |
- kbd | [] [] |
- klavaro | [] [] [] [] [] |
- latrine | [] |
- ld | |
- leafpad | [] [] [] [] [] [] [] [] [] |
- libc | [] [] [] |
- libexif | [] () [] |
- libextractor | [] |
- libgnutls | [] |
- libgphoto2 | [] |
- libgphoto2_port | [] [] [] [] [] |
- libgsasl | [] [] [] [] |
- libiconv | [] [] [] [] [] |
- libidn | [] [] [] |
- liferea | [] [] [] [] () [] [] |
- lilypond | |
- lordsawar | |
- lprng | [] |
- lynx | [] [] |
- m4 | [] [] [] [] [] |
- mailfromd | [] |
- mailutils | [] |
- make | [] [] [] |
- man-db | [] [] [] |
- man-db-manpages | [] [] [] |
- midi-instruments | [] [] [] [] [] [] [] [] |
- minicom | [] [] [] [] |
- mkisofs | [] [] [] |
- myserver | [] [] |
- nano | [] [] [] [] [] [] |
- opcodes | |
- parted | [] [] [] [] [] [] |
- pies | [] |
- popt | [] [] [] [] [] [] |
- procps-ng | [] |
- procps-ng-man | [] |
- psmisc | [] [] [] [] |
- pspp | [] [] |
- pushover | |
- pwdutils | [] |
- pyspread | [] [] |
- radius | [] [] |
- recode | [] [] [] [] [] [] [] [] |
- recutils | [] |
- rpm | [] |
- rush | [] [] [] |
- sarg | [] [] |
- sed | [] [] [] [] [] [] [] [] |
- sharutils | [] [] [] |
- shishi | [] [] |
- skribilo | |
- solfege | [] [] [] |
- solfege-manual | [] [] |
- spotmachine | [] [] |
- sudo | [] [] [] [] [] [] |
- sudoers | [] [] [] [] |
- sysstat | [] [] [] [] [] |
- tar | [] [] [] [] [] |
- texinfo | [] [] [] |
- texinfo_document | [] [] |
- tigervnc | [] |
- tin | [] |
- tin-man | |
- tracgoogleappsa... | [] [] [] [] |
- trader | [] |
- util-linux | [] [] |
- ve | [] [] [] |
- vice | |
- vmm | |
- vorbis-tools | [] [] [] |
- wastesedge | |
- wcd | |
- wcd-man | |
- wdiff | [] [] [] [] [] |
- wget | [] [] [] [] |
- wyslij-po | [] [] [] [] |
- xboard | [] [] [] |
- xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] |
- xkeyboard-config | [] [] [] [] |
- +--------------------------------------------------+
- nn or os pa pl ps pt pt_BR ro ru rw sk sl sq sr
- 7 3 1 6 114 1 12 83 32 80 3 38 45 7 94
-
- sv sw ta te tg th tr uk ur vi wa wo zh_CN zh_HK
- +---------------------------------------------------+
- a2ps | [] [] [] [] [] |
- aegis | [] |
- anubis | [] [] [] [] |
- aspell | [] [] [] [] |
- bash | [] [] [] [] |
- bfd | [] [] |
- binutils | [] [] [] |
- bison | [] [] [] [] |
- bison-runtime | [] [] [] [] [] [] |
- buzztrax | [] [] [] |
- ccd2cue | [] [] [] |
- ccide | [] [] [] [] |
- cflow | [] [] [] [] |
- clisp | |
- coreutils | [] [] [] [] |
- cpio | [] [] [] [] [] |
- cppi | [] [] [] [] |
- cpplib | [] [] [] [] [] |
- cryptsetup | [] [] [] |
- datamash | [] [] [] |
- denemo | |
- dfarc | [] |
- dialog | [] [] [] [] [] [] |
- dico | [] |
- diffutils | [] [] [] [] [] |
- dink | |
- direvent | [] [] |
- doodle | [] [] |
- dos2unix | [] [] [] [] |
- dos2unix-man | [] [] [] |
- e2fsprogs | [] [] [] [] |
- enscript | [] [] [] [] |
- exif | [] [] [] [] [] |
- fetchmail | [] [] [] [] |
- findutils | [] [] [] [] [] |
- flex | [] [] [] [] |
- freedink | [] [] |
- fusionforge | |
- gas | [] |
- gawk | [] [] |
- gcal | [] [] |
- gcc | [] [] |
- gdbm | [] [] |
- gettext-examples | [] [] [] [] [] [] |
- gettext-runtime | [] [] [] [] [] [] |
- gettext-tools | [] [] [] [] [] |
- gjay | [] [] |
- glunarclock | [] [] [] [] |
- gnubiff | [] [] |
- gnubik | [] [] [] [] |
- gnucash | () () () () [] |
- gnuchess | [] [] |
- gnulib | [] [] [] [] |
- gnunet | |
- gnunet-gtk | |
- gold | [] [] |
- gphoto2 | [] [] [] [] |
- gprof | [] [] [] [] |
- gramadoir | [] [] [] |
- grep | [] [] [] [] [] |
- grub | [] [] [] [] |
- gsasl | [] [] [] [] |
- gss | [] [] [] |
- gst-plugins-bad | [] [] [] [] |
- gst-plugins-base | [] [] [] [] [] |
- gst-plugins-good | [] [] [] [] [] |
- gst-plugins-ugly | [] [] [] [] [] |
- gstreamer | [] [] [] [] [] |
- gtick | [] [] [] |
- gtkam | [] [] [] [] |
- gtkspell | [] [] [] [] [] [] [] [] |
- guix | [] |
- guix-packages | |
- gutenprint | [] [] [] [] |
- hello | [] [] [] [] [] [] |
- help2man | [] [] [] |
- help2man-texi | [] |
- hylafax | [] |
- idutils | [] [] [] |
- iso_15924 | [] () [] [] () [] |
- iso_3166 | [] [] () [] [] () [] [] [] |
- iso_3166_2 | () [] [] () [] |
- iso_4217 | [] () [] [] () [] [] |
- iso_639 | [] [] [] () [] [] () [] [] [] |
- iso_639_3 | [] () [] [] () |
- iso_639_5 | () [] () |
- jwhois | [] [] [] [] |
- kbd | [] [] [] |
- klavaro | [] [] [] [] [] [] |
- latrine | [] [] |
- ld | [] [] [] [] [] |
- leafpad | [] [] [] [] [] [] |
- libc | [] [] [] [] [] |
- libexif | [] () |
- libextractor | [] [] |
- libgnutls | [] [] [] [] |
- libgphoto2 | [] [] |
- libgphoto2_port | [] [] [] [] |
- libgsasl | [] [] [] [] |
- libiconv | [] [] [] [] [] |
- libidn | () [] [] [] |
- liferea | [] [] [] [] [] |
- lilypond | [] |
- lordsawar | |
- lprng | [] |
- lynx | [] [] [] [] |
- m4 | [] [] [] |
- mailfromd | [] [] |
- mailutils | [] |
- make | [] [] [] [] |
- man-db | [] [] |
- man-db-manpages | [] |
- midi-instruments | [] [] [] [] [] [] |
- minicom | [] [] |
- mkisofs | [] [] [] |
- myserver | [] |
- nano | [] [] [] [] |
- opcodes | [] [] [] |
- parted | [] [] [] [] [] |
- pies | [] [] |
- popt | [] [] [] [] [] [] [] |
- procps-ng | [] [] |
- procps-ng-man | [] |
- psmisc | [] [] [] [] |
- pspp | [] [] [] |
- pushover | [] |
- pwdutils | [] [] |
- pyspread | [] |
- radius | [] [] |
- recode | [] [] [] [] |
- recutils | [] [] [] |
- rpm | [] [] [] [] |
- rush | [] [] |
- sarg | |
- sed | [] [] [] [] [] |
- sharutils | [] [] [] |
- shishi | [] [] |
- skribilo | [] |
- solfege | [] [] [] |
- solfege-manual | [] |
- spotmachine | [] [] [] |
- sudo | [] [] [] [] |
- sudoers | [] [] [] |
- sysstat | [] [] [] [] [] |
- tar | [] [] [] [] [] |
- texinfo | [] [] [] |
- texinfo_document | [] |
- tigervnc | [] [] |
- tin | [] |
- tin-man | |
- tracgoogleappsa... | [] [] [] [] [] |
- trader | [] |
- util-linux | [] [] [] |
- ve | [] [] [] [] |
- vice | () () |
- vmm | |
- vorbis-tools | [] [] |
- wastesedge | |
- wcd | [] [] [] |
- wcd-man | [] |
- wdiff | [] [] [] [] |
- wget | [] [] [] |
- wyslij-po | [] [] |
- xboard | [] |
- xdg-user-dirs | [] [] [] [] [] [] [] [] [] |
- xkeyboard-config | [] [] [] [] |
- +---------------------------------------------------+
- sv sw ta te tg th tr uk ur vi wa wo zh_CN zh_HK
- 91 1 4 3 0 13 50 113 1 126 7 1 95 7
-
- zh_TW
- +-------+
- a2ps | | 30
- aegis | | 9
- anubis | | 19
- aspell | | 28
- bash | [] | 21
- bfd | | 9
- binutils | | 12
- bison | [] | 18
- bison-runtime | [] | 38
- buzztrax | | 8
- ccd2cue | | 8
- ccide | | 17
- cflow | | 15
- clisp | | 10
- coreutils | | 20
- cpio | | 20
- cppi | | 17
- cpplib | [] | 19
- cryptsetup | | 13
- datamash | | 11
- denemo | | 4
- dfarc | | 16
- dialog | [] | 42
- dico | | 6
- diffutils | | 21
- dink | | 9
- direvent | | 10
- doodle | | 12
- dos2unix | [] | 18
- dos2unix-man | | 9
- e2fsprogs | | 14
- enscript | | 21
- exif | | 26
- fetchmail | | 19
- findutils | | 28
- flex | [] | 19
- freedink | | 23
- fusionforge | | 3
- gas | | 5
- gawk | | 12
- gcal | | 7
- gcc | | 4
- gdbm | | 10
- gettext-examples | [] | 40
- gettext-runtime | [] | 34
- gettext-tools | [] | 24
- gjay | | 8
- glunarclock | [] | 27
- gnubiff | | 9
- gnubik | | 19
- gnucash | () | 7
- gnuchess | | 10
- gnulib | | 23
- gnunet | | 1
- gnunet-gtk | | 1
- gold | | 7
- gphoto2 | [] | 19
- gprof | | 21
- gramadoir | | 14
- grep | [] | 31
- grub | | 21
- gsasl | [] | 19
- gss | | 17
- gst-plugins-bad | | 14
- gst-plugins-base | | 27
- gst-plugins-good | | 32
- gst-plugins-ugly | | 34
- gstreamer | [] | 31
- gtick | | 19
- gtkam | | 24
- gtkspell | [] | 48
- guix | | 3
- guix-packages | | 0
- gutenprint | | 15
- hello | [] | 30
- help2man | | 18
- help2man-texi | | 5
- hylafax | | 5
- idutils | | 14
- iso_15924 | [] | 23
- iso_3166 | [] | 58
- iso_3166_2 | | 9
- iso_4217 | [] | 28
- iso_639 | [] | 46
- iso_639_3 | | 10
- iso_639_5 | | 2
- jwhois | [] | 20
- kbd | | 16
- klavaro | | 30
- latrine | | 7
- ld | [] | 15
- leafpad | [] | 40
- libc | [] | 24
- libexif | | 9
- libextractor | | 5
- libgnutls | | 13
- libgphoto2 | | 9
- libgphoto2_port | [] | 19
- libgsasl | | 18
- libiconv | [] | 29
- libidn | | 17
- liferea | | 29
- lilypond | | 11
- lordsawar | | 3
- lprng | | 3
- lynx | | 19
- m4 | [] | 22
- mailfromd | | 4
- mailutils | | 6
- make | | 19
- man-db | | 14
- man-db-manpages | | 9
- midi-instruments | [] | 43
- minicom | [] | 17
- mkisofs | | 13
- myserver | | 9
- nano | [] | 29
- opcodes | | 12
- parted | [] | 21
- pies | | 4
- popt | [] | 36
- procps-ng | | 5
- procps-ng-man | | 4
- psmisc | [] | 22
- pspp | | 13
- pushover | | 6
- pwdutils | | 8
- pyspread | | 6
- radius | | 9
- recode | | 31
- recutils | | 9
- rpm | [] | 13
- rush | | 10
- sarg | | 4
- sed | [] | 34
- sharutils | | 12
- shishi | | 7
- skribilo | | 4
- solfege | | 19
- solfege-manual | | 9
- spotmachine | | 10
- sudo | | 24
- sudoers | | 20
- sysstat | | 22
- tar | [] | 30
- texinfo | | 17
- texinfo_document | | 11
- tigervnc | | 11
- tin | [] | 7
- tin-man | | 1
- tracgoogleappsa... | [] | 22
- trader | | 11
- util-linux | | 12
- ve | | 14
- vice | | 1
- vmm | | 3
- vorbis-tools | | 13
- wastesedge | | 2
- wcd | | 8
- wcd-man | | 3
- wdiff | [] | 23
- wget | | 19
- wyslij-po | | 14
- xboard | | 9
- xdg-user-dirs | [] | 68
- xkeyboard-config | [] | 27
- +-------+
- 90 teams zh_TW
- 166 domains 42 2748
-
- Some counters in the preceding matrix are higher than the number of
-visible blocks let us expect. This is because a few extra PO files are
-used for implementing regional variants of languages, or language
-dialects.
-
- For a PO file in the matrix above to be effective, the package to
-which it applies should also have been internationalized and distributed
-as such by its maintainer. There might be an observable lag between the
-mere existence a PO file and its wide availability in a distribution.
-
- If Jun 2014 seems to be old, you may fetch a more recent copy of this
-'ABOUT-NLS' file on most GNU archive sites. The most up-to-date matrix
-with full percentage details can be found at
-'http://translationproject.org/extra/matrix.html'.
-
-1.5 Using 'gettext' in new packages
-===================================
-
-If you are writing a freely available program and want to
-internationalize it you are welcome to use GNU 'gettext' in your
-package. Of course you have to respect the GNU Lesser General Public
-License which covers the use of the GNU 'gettext' library. This means
-in particular that even non-free programs can use 'libintl' as a shared
-library, whereas only free software can use 'libintl' as a static
-library or use modified versions of 'libintl'.
-
- Once the sources are changed appropriately and the setup can handle
-the use of 'gettext' the only thing missing are the translations. The
-Free Translation Project is also available for packages which are not
-developed inside the GNU project. Therefore the information given above
-applies also for every other Free Software Project. Contact
-'coordinator@translationproject.org' to make the '.pot' files available
-to the translation teams.
diff --git a/libs/hunspell/docs/BUGS b/libs/hunspell/docs/BUGS
deleted file mode 100644
index 6a5468e0f3..0000000000
--- a/libs/hunspell/docs/BUGS
+++ /dev/null
@@ -1,5 +0,0 @@
-* Interactive interface has some visualization problem with long lines
-
-* Experimental -U, -u options don't support Unicode.
-
-* Compound handling is not thread safe in Hungarian specific code.
diff --git a/libs/hunspell/docs/ChangeLog b/libs/hunspell/docs/ChangeLog
deleted file mode 100644
index 1f6e774a63..0000000000
--- a/libs/hunspell/docs/ChangeLog
+++ /dev/null
@@ -1,1993 +0,0 @@
-2016-04-29 Caolán McNamara <caolanm at LibO>:
- * deprecate old api and add new one
- old one remains implemented in terms of new one
- and will eventually be removed
- * shrink exposed api down to just hunspell.hxx
- * next major release is likely to require C++11
-
-2016-04-15 Caolán McNamara <caolanm at LibO>:
- * generally using std::string and std::vector internally
-
-2016-04-13 Caolán McNamara <caolanm at LibO>:
- * gh#371 drop experimental code
-
-2015-09-11 Caolán McNamara <caolanm at LibO>:
- * rhbz#1261421 crash on mashing hangul korean keyboard
-
-2014-12-03 Németh László <nemeth at numbertext dot org>:
- * tools/hunspell.cxx: security fixes of the Hunspell executable
- - secure file name handling, the problem (checking
- OpenDocument files with malicious file names)
- reported by Eric Sesterhenn
- - using tmpnam() only with system("mkdir tempname && ...")
-
-2014-10-17 Caolán McNamara <caolanm at LibO>:
- * sf#245 Feature from Anish Patil -S mode
- to show suggestions for completion of
- correctly spelled words
- * sf#248 Fix manpage about how to include
-
-2014-10-16 Caolán McNamara <caolanm at LibO>:
- * rhbz#915448, sf#57, sf#185 report character offset
- and not byte offset in ispell mode
- * sf#56 segv in experimental mode
- * sf#228 don't translate init string
-
-2014-09-22 Németh László <nemeth at numbertext dot org>:
- * fix crash in morphological analysis of the Hungarian
- compound word 'művészegyéniség', reported by Gáspár Sinai
-
-2014-08-26 Németh László <nemeth at numbertext dot org>:
- * unmunch separates flags of prefixes from the word,
- bug reported by Daniel Naber
-
-2014-08-05 Németh László <nemeth at numbertext dot org>:
- * moz#318040 Mozzilla accepts abbreviations without dots
- * myfopen(): add _wfullpath to expand relative parts of absolute paths
-
-2014-07-16 Caolán McNamara <caolanm at LibO>:
- * moz#675553 Switch from PRBool to bool
- * moz#690892 replace PR_TRUE/PR_FALSE with true/false
- * Silence the warning about empty while body loop in clang
- * moz#777292 Make nsresult an enum
- * moz#579517 Use stdint types in gecko
- * moz#784776 consistently use FLAG_NULL
- * moz#927728 Convert PRUnichar to char16_t
- * moz#943268 Remove nsCharsetAlias and nsCharsetConverterManager
- * Don't include config.h in license.hunspell if MOZILLA_CLIENT is set
-
-2014-06-26 Caolán McNamara <caolanm at LibO>:
- * clang scan-build: Allocator sizeof operand mismatch
- * clang scan-build: other low hanging warnings
- * clang scan-build: significant warnings
-
-2014-06-02 Németh László <nemeth at numbertext dot org>:
- * escape spaces in paths of ODF files
-
-2014-05-28 Németh László <nemeth at numbertext dot org>:
- * add long path/Unicode path support in WIN32 environment:
- - hunspell#233 (reported by mahak gark) and LibreOffice fdo#48017
- * flat ODF support, eg.:
- hunspell doc.fodt
- cat doc.fodt | hunspell -l -O
- * new options:
- - -X (XML) input format
- - -O (ODF or flat ODF) input format
- - --check-apostrophe: check and force Unicode apostrophe usage
- (ASCII or Unicode apostrophe has to be in the
- WORDCHARS section of the affix file)
- * fix ODF support:
- - break 1-line XML of ODT documents at </style:style>, too,
- not only at </text:p> (limiting tokenization problems, when
- fgets stops within an XML tag)
- - show ODF file path on the UI instead of the temporary file
- * fix XML support:
- - ', ", &, < and > in replacements converted to XML entities
- - recognize &apos at tokenization, depending from WORDCHARS
- - &apos; in tokens converted to ' before spell checking and
- in the output of the pipe interface
- * better apostrophe usage:
- - WORDCHARS only with one of the Unicode or ASCII apostrophe
- results extended word tokenization: both of them will be part of
- the words (if they are inside: eg. word's, but not words').
- - convert Unicode apostrophes to ASCII ones for 8-bit dictionaries
- (eg. English dictionaries), or for UTF-8 dictionaries only
- with ASCII apostrophe supports (eg. French dictionaries).
- * updated manual:
- - hunspell.4 renamed to hunspell.5, see
- hunspell#241 reported by Cristopher Yeleighton
- - updated translations
- - note about long/Unicode paths in WIN32 (hunspell.3)
-
-2014-04-25 Németh László <nemeth at numbertext dot org>:
- * OpenDocument support, eg.
- hunspell *.odt
- hunspell -l *.odt
- * always load default personal dictionary (fix
- filtering bad words - reduce this word list - using
- it as a personal dictionary workflow)
- * fix parsing/URL recognition problem (bad tokens
- with aposthrophes)
-
-2013-07-25 pchang9@cs.wisc.edu
- * moz#897255 Wasted work in line_uniq
- * moz#897780 Wasted work in SuggestMgr::twowords
-
-2013-07-25 Caolán McNamara <caolanm at LibO>:
- * hunspell#167 layout problems with long lines
- - based on the original fix by xorho
- adapted to HEAD
- * rhbz#925562 upgrade config.guess for aarch64
-
-2013-07-24 pchang9@cs.wisc.edu
- * moz#896301 Wasted work in SfxEntry::checkword
- * moz#896844 Wasted work in AffixMgr::defcpd_check
-
-2013-06-13 Konstantin Khlebniko
- * #49 HashMgr::add_word computes wrong size for struct hentry
-
-2013-06-13 Ville Skyttä
- * #53 Man page syntax fixes
-
-2013-04-19 John Thomson <john thomson at SIL>
- * win_api: add remove() of Hunspell API (hun#3606435)
-
-2013-04-19 Rouslan Solomokhin <at sf.net>
- * fix crash in suggestions for 99-character long words
- by extending arrays of SuggestMgr::forgotchar_*
- (hun#3595024, also http://crbug.com/130128),
- thanks to also Paweł Hajdan to report the patch
-
-2013-04-01 Caolán McNamara <caolanm at LibO>:
- * hunspell: -Werror=undef
-
-2013-03-13 Caolán McNamara <caolanm at LibO>:
- * rhbz#918938 crash in interaction with danish thesaurus
-
-2012-09-18 Németh László <nemeth at numbertext dot org>:
- * src/hunspell/affixmgr.*: - fix morphological analysis of
- compound words (hun#3544994, reported by Dávid Nemeskey, fdo#55045)
-
-2012-06-29 Caolán McNamara <caolanm at LibO>:
- * fix various coverity warnings
-
-2012-01-10 Ehsan Akhgari <ehsan at mozilla dot com>
- * moz#710940 Firefox Crash [@ AffixMgr::parse_file(char const*, char
- const*) ]
-
-2011-12-16 Jared Wein <jwein at mozilla dot com>
- * moz#710967 Incorrect argument passed to strncmp in
- AffixMgr::parse_convtable
-
-2011-12-06 Caolán McNamara <caolanm at LibO>:
- * rhbz#759647 fixed tempname of hunSPELL.bak collides with other users
- when multiple edits in one dir
-
-2011-10-13 Caolán McNamara <caolanm at LibO>:
- * moz#694002 crash in hunspell affixmgr on exit with bad .aff
- * leak in hunspell affixmgr with bad .aff
-
-2011-09-19 Caolán McNamara <caolanm at LibO>:
- * make libparsers.a not installed thanks to Tomáš Chvátal
-
-2011-06-23 Caolán McNamara <caolanm at LibO>:
- * fix some windows compiler warnings
-
-2011-05-24 Németh László <nemeth at numbertext dot org>:
- * src/hunspell/affixmgr.*: allow twofold suffixes in compounds
- by extended version of Arno Teigseth's patch, see hun#3288562.
- - new option for this feature: COMPOUNDMORESUFFIXES
-
-2011-02-16 Németh László <nemeth at numbertext dot org>:
- * src/*/Makefile.am: fix library versioning, the probem reported by
- Rene Engerhald and Simon Brouwer.
-
- * man/hunspell.4: new version based on the revised version of Ruud Baars
-
-2011-02-02 Németh László <nemeth at OOo>:
- * suggestngr.cxx: fix ngram PHONE suggestion for input words with
- diacritics using UTF-8 encoded dictionaries (add byte length to the
- 8-bit phonet() argument instead of character length)
-
- * suggestmgr.cxx: fix missing csconv problem with UTF-8 encoding
- dictionares, when the input contains non-BMP characters
- - tests/utf8_nonbmp.sug: test file
-
- * suggestmgr.cxx: mixed and keyboard based character suggestions
- don't forbid ngram suggestion search (optimized tests/suggestiontest)
-
- * affixmgr.cxx: fix hun#2999225: interfering compounding mechanisms,
- tested on Dutch word list and reported by Ruud Baars
-
- * affixmgr.cxx: allomorph fix for hun#2970240 (Hungarian
- compound "vadász+gép" was analyzed as vad+ász+gép, and rejected
- by the ss->s rep rule (verb "vadássz"), but the analysis
- didn't continue for the longer word parts (vadász+gép).
-
- * csutil.cxx: add lang code "az_AZ", "hu_HU", "tr_TR" for back
- compatibility (fixing Azeri and Turkish casing conversion, also
- Hungarian compound handling)
-
- * affixmgr.cxx: fix morphological analysis
-
-2011-01-26 Németh László <nemeth at OOo>:
- * affixmgr.cxx: fix for moz#626195 (memcheck problem with FULLSTRIP).
-
- * affixmgr.*, suggestmgr.cxx: FORBIDWARN parameter (see manual)
-
-2011-01-24 Németh László <nemeth at OOo>:
- * suffixmgr.cxx: fix bad suggestion of forbidden compound words, eg.
- "termijndoel" with the Dutch dictionary. Reported by Ruud Baars.
-
- * latexparser.cxx: fix double apostrophe TeX quoation mark tokenization
- (hun#3119776), reported by Wybodekker at SF.net.
-
- * tests/suggestiontest/*: multilanguage and single Hunspell version, see README
- * tests/suggestiontest/prepare2: for make -f Makefile.orig single
-
-2011-01-22 Németh László <nemeth at OOo>:
- * affixmgr.*, suggestmgr.*: new features
- ONLYMAXDIFF: remove all bad ngram suggestions (default mode keeps one)
- NONGRAMSUGGEST: similar to NOSUGGEST, but it forbids to use the word
- in ngram based (more, than 1-character distance) suggestions.
-
-2011-01-21 Németh László <nemeth at OOo>:
- * suggestmgr.*: limit wild suggestions (hun#2970237 by Ruud Baars)
- - limited compound word suggestions
- - improved and limited ngram based suggestions
- * tests/*.sug: modified test files
- - feature MAXCPDSUGS:
- MAXCPDSUGS 0 : no compound suggestion, suggested by
- Finn Gruwier Larsen in hunfeat#2836033
- MAXCPDSUGS n : max. ~n compound suggestions
- - feature MAXDIFF: differency limit for ngram suggestions: 0-10
- eg. MAXDIFF 5: normal (default) limit
- MAXDIFF 0: only one ngram suggestion
- MAXDIFF 10: ~maxngramsugs ngram suggestions
-
- * affixmgr.*, hunspell.*: add flag FORCEUCASE (hun#2999228), force
- capitalization of compound words, see Hunspell 4 manual),
- suggested by Ruud Baars
- test/forceucase.*: test files
-
- * affixmgr.*, hunspell.*: add flag WARN (hun#1808861), optional warning feature
- for rare words, suggested by Ruud Baars
- tests/warn: test files
- * tools/hunspell.cxx: add option -r for optional filtering of rare words
-
- * affixmgr.cxx: fix hun#3161359 (gcc warnings) reported by Ryan VanderMeulen.
-
-2011-01-17 Németh László <nemeth at OOo>:
- * suggestmgr.cxx: fix hun#3158994 and hun#3159027 (missing csconv table
- using awkward 8bit capitalization of UTF-8 encoded dictionary words with PHONE
- suggestion, reported by benjarobin and dicollecte at SF.net).
-
-2011-01-13 Németh László <nemeth at OOo>:
- * affixmgr.cxx: ONLYINCOMPOUND fix for hun#2999224 (fogemorphene
- was allowed in end position of compoundings). Reported by Ruud Baars.
- * tests/onlyincompound2.*: test files
-
-2011-01-10 Ingo H. de Boer <idb_winshell at SF.net>:
- * win_api/{hunspell,libhunspell, testparser}.vcproj: updated project
- files for the library and the executables. Compiling problem
- also reported by Don Walker.
-
-2011-01-06 Németh László <nemeth at OOo>:
- * affixmgr.cxx: fix freedesktop#32850 (program halt during Hungarian
- spell checking of the word "6csillagocska6", reported by András Tímár)
-
- * tools/hunspell.cxx: add Mac OS X Hunspell dictionary paths, asked by
- Vidar Gundersen in hunfeat#3142010
-
-2011-01-05 Caolán McNamara <cmc at OOo>:
- * moz#620626 NS_UNICHARUTIL_CID doesn't support
- case conversion
-
-2011-01-03 Németh László <nemeth at OOo>:
- * NEWS and THANKS: update for release 1.2.13
-
-2010-12-20 Németh László <nemeth at OOo>:
- * affixmgr.cxx: hun#3140784
-
-2010-12-16 Németh László <nemeth at OOo>:
- * affixmgr.cxx:
- - improved fix of hun#2970242 (supporting
- zero affixes, reported by Ruud Baars
- - tests/opentaal_cpdpat{,2}: test files
-
- - switching off default BREAK parameters by BREAK 0,
- reported by Ruud Baars
-
- - hun#2999225: interfering compounding mechanisms, reported by Ruud Baars
-
-2010-12-11 Németh László <nemeth at OOo>:
- * affixmgr.cxx: fix hun#2970242 (CHECKCOMPOUNDPATTERN only with flags),
- the bug reported by Ruud Baars
- * tests/2970242.*: test files
-
- * tests/2970240.*: test files for CHECKCOMPOUNDPATTERN fix (check all
- boundaries in compound words, fixed by the previous CHECKCOMPOUNDREP
- fix), the bug reported by Ruud Baars
-
- * win_api/Makefile.cygwin: update
-
-2010-12-09 Caolán McNamara <cmc at OOo>:
- * moz#617953 fix leak
-
-2010-11-08 Caolán McNamara <cmc at OOo>:
- * rhbz#650503 crash in arabic dictionary
-
-2010-11-05 Caolán McNamara <cmc at OOo>:
- * rhbz#648740 don't warn on empty flagvector
-
-2010-11-03 Caolán McNamara <cmc at OOo>:
- * logically we shouldn't need a csconv table in utf-8 mode
-
-2010-10-27 Németh László <nemeth at OOo>:
- * hun#3000055 (requested by Ruud Baars) add REP boundary specifiation:
- REP ^word$ xxxx
- REP ^wordstarting xxxx
- REP wordending$ xxxx
-
- * hun#3008434 (requested by Adrián Chaves Fernández) and
- hun#3018929 (requested by Ruud Baars): REP with more than 2 words:
- REP morethantwo more_than_two
-
- * suggestmgr.cxx: fix incomplete suggestion list for capitalized words,
- eg. missing Machtstrijd->Machtsstrijd in the Dutch dictionary
- (reported by Ruud Bars)
-
- * tests, man: related updates
-
-2010-10-12 Caolán McNamara <cmc at OOo>:
- * moz#603311 HashMgr::load_tables leaks dict when decode_flags fails
- * fix mem leak found with new tests
- * hun#3084340 allow underscores in html entity names
-
-2010-10-07 Németh László <nemeth at OOo>:
- * affixmgr.cxx:
- - hun#2970239 fix bad suggestion of forbidden compound words
- - hun#2999224 fix keepcase feature on compound words (only partial
- fix for COMPOUNDRULE based compounding)
- - fix checkcompoundrep feature in compound words (check all boundaries,
- not only the last one)
- Problems reported by Ruud Baars.
-
- * tests/opentaal_forbiddenword[12]*, tests/opentaal_keepcase*:
- new test files for the previous fixes
- * tests/checkcompoundrep: extended test file.
-
-2010-09-05 Caolán McNamara <cmc at OOo>:
- * moz#583582 fix double buffer gcc fortify issue
-
-2010-08-13 Caolán McNamara <cmc at OOo>:
- * moz#586671 AffixMgr::parse_convtable leaks pattern/pattern2 if it
- can't create both
- * moz#586686 tidy up get_xml_list and friends
-
-2010-08-10 Caolán McNamara <cmc at OOo>:
- * hun#3022860 fix remove duplicate code
-
-2010-07-17 Caolán McNamara <cmc at OOo>:
- * remove ununsed get_default_enc and avoid potential misrecognition of
- three letter language ids
- * normalize encoding names before lookup
-
-2010-07-05 Caolán McNamara <cmc at OOo>:
- * hun#2286060 add Hangul syllables to unicode tables
-
-2010-06-26 Caolán McNamara <cmc at OOo>:
- * moz#571728 keep new[]/delete[] wrappers in sync for embedded in moz
- case
-
-2010-06-13 Caolán McNamara <cmc at OOo>:
- * moz#571728 keep new[]/delete[] wrappers in sync for embedded in moz
- case
-
-2010-06-02 Caolán McNamara <cmc at OOo>:
- * moz#569611 compile cleanly under win64
-
-2010-05-22 Caolán McNamara <cmc at OOo>:
- * moz#525581 apply mozilla's current preferred get_current_cs impl
-
-2010-05-17 Németh László <nemeth at OOo>:
- * affixmgr.cxx: fix bad limitation of parenthesized flags at
- COMPOUNDRULEs. Windows crash reported by Ruud Baars and Simon Brouwer.
-
-2010-05-05 Caolán McNamara <cmc at OOo>:
- * rhbz#589326 malloc of int that should have been of char**
- * hun#2997388 fix ironic misspellings
-
-2010-04-28 Caolán McNamara <cmc at OOo>:
- * moz#550942 get_xml_list doesn't handle failure from get_xml_par
-
-2010-04-27 Caolán McNamara <cmc at OOo>:
- * moz#465612 mozilla-specific code leaks
- * moz#430900 phone is dereferenced before oom check
- * moz#418348 ckey_utf alloc is used unchecked in SuggestMgr::badcharkey_utf
- * CID#1487 pointer "rl" dereferenced before NULL check
- * CID#1464 Returned without freeing storage "ptr"
- * CID#1459 Avoid duplicate strchr
- * CID#1443 Avoid any chance of dereferencing *slst
- * CID#1442 Unsafe to have a null morph
- * CID#1440 Avoid null filenames
- * CID#1302 Dereferencing NULL value "apostrophe"
- * CID#1441 Avoid deferencing null ppfx
-
-2010-04-16 Caolán McNamara <cmc at OOo>:
- * hun#2344123 fix U)ncap in utf-8 locale
- * fix up hunspell text UI and lines wider than terminal
-
-2010-04-15 Caolán McNamara <cmc at OOo>:
- * hun#2613701 fix small leak in FileMgr::FileMgr
- * fix small leak in tools/hunspell
- * hun#2871300 avoid crash if def and words are NULL
- * hun#2904479 fix length of hzip file
- * hun#2986756 mingw build fix
- * hun#2986756 fix double-free
- * hun#2059896 fix crash in interactive mode without nls
- * hun#2917914 add some extra words to the latexparser
- * make some structs static
- * C-api has duped symbol names
- * regenerate gettext/intl with recent version
- * hun#2796772 build a .dll under MinGW
- * rhbz#502387 allow cross-compiling for MinGW target
- * hun#2467643 update .vcproj files to include replist.?xx
- * unify visiblity/dll_export support across platforms
- * hun#2831289 sizeof(short) typo
- * hun#2986756 add -u3 gcc style output
-
-2010-04-14 Caolán McNamara <cmc at OOo>:
- * hun#2813804 fix segfault on hu_HU stemming
-
-2010-04-13 Caolán McNamara <cmc at OOo>:
- * hun#2806689 fix ironic misspellings
- * hun#2836240 add Italian translations
-
-2010-04-09 Caolán McNamara <cmc at OOo>:
- * fix titchy possible leak in command-line spellchecker
-
-2010-04-07 Caolán McNamara <cmc at OOo>:
- * hun#2973827 apply win64 patch
- * hun#2005643 fix broken mystrdup
-
-2010-03-04 Caolán McNamara <cmc at OOo>:
- * ooo#107768 fix crash in long strings in spellml mode
- * hun#1999737 add some malloc checks
- * hun#1999769 drop old buffer on realloc failure
- * hun#2005643 tidy string functions
- * hun#2005643 micro-opt
- * hun#2006077 free strings on failed dict parse
- * hun#2110783 ispell-alike verbose mode implementation
-
-2010-03-03 Németh László <nemeth at OOo>:
- * hunspell/(affixmgr, suggestmgr).cxx: add character sequence
- support for MAP suggestion, using parenthesized character groups
- in the syntax, eg. MAP ß(ss).
- * man/hunspell.4, tests/map*: documentation and test files
-
-2010-02-25 Németh László <nemeth at OOo>:
- * hunspell/hunspell.cxx: add recursion limit for BREAK (fix OOo Issue 106267)
-
- * hunspell/hunspell.cxx: fix crash in morphological analysis of
- capitalized words with ending dashes
-
- * affixmgr.cxx: fix morphological analysis of long numbers combined with dash,
- eg. 45-00000045 (reported by a@freeblog.hu).
-
-2010-02-23 Caolán McNamara <cmc at OOo>:
- * hun#2314461 improve ispell-alike mode
- * hun#2784983 improve default language detection
- * hun#2812045 fix some compiler warnings
- * hun#2910695 survive missing HOME dir
- * hun#2934195 fix suggestmgr crash
- * hun#2921129 remove unused variables
- * hun#2826164 make sure make check uses the in-tree libhunspell
- * bump toolchain to support --disable-rpath
- * hun#2843984 fix coverity warning
- * hun#2843986 fix coverity warning
- * hun#2077630 add iconv lib
- * make gcc strict-aliasing warning free
- * make cppcheck warning free
-
-2008-11-01 Németh László <nemeth at OOo>:
- * replist.*, hunspell.cxx, affixmgr.cxx: new input and output
- conversion support, see ICONV and OCONV keywords in the Hunspell(4)
- manual page and the test examples. The input/output conversion
- problem of syllabic languages reported by Daniel Yacob and
- Shewangizaw Gulilat.
- - tests/{iconv,oconv}.*: test examples
-
- * tools/wordforms: word generation script for dictionary developers
- (Hunspell version of the unmunch program)
-
- * hunspell/hunspell.cxx: extended BREAK feature: ^ and $ mean in break
- patterns the beginning and end of the word.
- - tests/BREAK.*: modified examples.
-
- * hunspell/hunspell.cxx: set default break at hyphen characters.
- The associated problem reported by S Page in Hunspell Bug 2174061.
- See Mozilla Bug ID 355178 and OOo Issue 64400, too.
- - tests/breakdefault.*: test data
- The following definition is equivalent of the default word break:
-
- BREAK 3
- BREAK -
- BREAK ^-
- BREAK -$
-
- * affixmgr.cxx: SIMPLIFIEDTRIPLE is a new affix file keyword to allow
- simplified forms of the compound words with triple repeating letters.
- It is useful for Swedish and Norwegian languages.
-
- * affixmgr.cxx: extend CHECKCOMPOUNDPATTERN to support
- alternations of compound words for example by sandhi
- feature of Indian and other languages. The problem reported
- by Kiran Chittella associated with Telugu writing system
- (see Telugu example in tests/checkcompoundpattern4.test).
- The new optional field of CHECKCOMPOUNDPATTERN definition is the
- replacement of the compound boundary defined by the previous fields:
- CHECKCOMPOUNDPATTERN ff f ff
- means ff|f compound boundary has been replaced by "ff", like in
- the (prereform) German Schiffahrt (Schiff+fahrt).
- - CHECKCOMPOUNDPATTERN supports also optional flag conditions now:
- CHECKCOMPOUNDPATTERN ff/A f/B ff
- means that the first word of the compound needs flag "A" and
- the second word of the compound needs flag "B" to the operation.
-
- * tools/hunspell.cxx: add empty lines as separators to the output of
- the stemming and morphological analysis.
-
- * affixmgr.cxx: fix condition checking algorithm. Bad suggestion
- generation reported by Mehmet Akin in SF.net Bug 2124186 with help of
- Eleonora Goldman.
-
- * affixmgr,cxx: fix COMPOUNDWORDMAX feature. The problem and its
- code details reported by Göran Andersson under SF.net Bug ID 2138001.
-
- * csutil.cxx: fix bad conditional code for Mozilla compilation.
- Patch by Serge Gautherie. The problem reported by Ryan VanderMeulen.
-
- * hunspell/hunspell.cxx: add missing ngram suggestion for HUHINITCAP
- (capitalized mixed case) words.
-
- * w_char.hxx: use GCC conditions for GCC related code. Patch by
- Ryan VanderMeulen.
-
- * affixmgr.cxx: check morphological description in morphgen()
- (fix potential program fault by incomplete morphological
- description of affix rules)
-
- * src/win_api: config.h: switch on warning messages on Windows
-
- * tools/affixcompress: extended help for -h (use LC_ALL=C sort
- for input word list)
-
- * man/hunspell.4: updated manual:
- - new and modified features (SIMPLIFIEDTRIPLE, ICONV, OCONV,
- BREAK, CHECKCOMPOUNDPATTERN).
- - note about costs of zero affixes, suggested by Olivier Ronez.
-
- * hunspell/hunspell.cxx: remove deprecated word breaking codes.
-
-2008-08-15 Németh László <nemeth at OOo>:
- * affentry.cxx: add FULLSTRIP option. With FULLSTRIP, affix rules can
- strip full words, not only one less characters. Suggested by
- Davide Prina and other developers in OOo Issue 80145.
- * tests/fullstrip.*: Test data based on Davide Prina's example.
- * tools/unmunch.cxx: modified for FULLSTRIP.
-
- * affixmgr.cxx: COMPOUNDRULE now works with long and numerical flag
- types by parenthesized flags. Syntax: (flag)*, (flag)(flag)?(flag)*.
- * tests/compoundrule[78].*: tests with parenthesized COMPOUNDRULE
- definitions.
-
- * suggestmgr.cxx: modified badchar*(), forgotchar*() and extrachar*()
- 1-character distance suggestion algorithms: search a TRY character
- in all position instead of all TRY characters in a character position
- (it can give more readable suggestion order, also better suggestions
- in the first positions, when TRY characters are sorted by frequency.)
- For example, suggestions for "moze":
- ooze, doze, Roze, maze, more etc. (Hunspell 1.2.6),
- maze, more, mote, ooze, mole etc. (Hunspell 1.2.7).
-
- * suggestmgr.cxx: extended compound word checking for better COMPOUNDRULE
- related suggestions, for example English ordinal numbers: 121323th ->
- 121323rd (it needs also a th->rd REP definition).
-
- * phonet.cxx: cast unsigned char parameter of isdigit() and fix
- isalpha by myisalpha() (potential problems in Windows environment).
- Reported by Thomas Lange in OOo Issue 92736.
-
- * hunspell/csutil.*,hunspell/{affentry,affixmgr,hunspell,suggestmgr}.cxx:
- fix potential buffer overloading under morphological analysis by the
- new mystrcat() function. Reported by Molnár Andor (dolhpy at true
- dot hu) in SF.net Bug 2026203.
-
- * affixmgr.cxx: add recursion limit to defcpd(). Fix OOo Issue 76067:
- crash-like deceleration by checking hexadecimal numbers with long FFF
- sequence (combinatory explosion by the en_US words "f" and "ff").
- Missing fix reported by Mathias Bauer.
-
- * affixmgr.cxx: fix the difference in the Unicode and non-Unicode
- parts of cpdcase_check(). Bug report by Brett Wilson.
-
- * filemgr.*, affixmgr.cxx, csutil.*, hashmgr.*: warning messages now
- contain line numbers (use --with-warnings configure option for
- warning messages).
-
- * hunspell.cxx: analyze(): fix case conversion of stemming and
- morphological analysis of UTF-8 encoded input. Reported by Ferenc Godó.
-
- * tools/hunspell.cxx: fix LaTeX Unicode support in filter mode.
- Reported by Jan Seeger in SF.net Bug 2039990.
-
- * affixmgr.hxx: 0.5 or in 64 bit environment, 1 MB (virtual) memory
- saving using only the requested size for sFlag and pFlag arrays.
- Bug report by Brett Wilson.
-
- * affixmgr.cxx,tools/hunspell.cxx: get_version() returns with full
- VERSION affix parameter instead of its first word. Fixes for
- Hunspell's header. Some problems with Hunspell header reported in
- SF.net Bug 2043080.
-
-2008-07-15 Németh László <nemeth at OOo>:
- * affentry.cxx: fixes of the affix rule matching algorithm (affected
- only the sk_SK dictionary from all OpenOffice.org dictionaries):
- - fix dot pattern + accented letters matching (in non Unicode encoding)
- - word-length conditions work again
- * tests/condition.*: extended test for the fix.
-
- * hashmgr.cxx: load multiword expressions: spaces may be parts
- of the dictionary words again (but spaces also work as morphological
- field separators: word word2 -> "word word2", word po:noun -> "word").
- * man/hunspell.4: updated manual
-
- * tools/hunspell.cxx: add iconv character conversion support to
- stemming and morphological analysis
-
- * tools/hunspell.cxx: add /usr/share/myspell/dicts search path for
- Ubuntu support
-
-2008-07-09 Németh László <nemeth at OOo>:
- * affentry.cxx: fixes of the affix rule matching algorithm:
- - right ASCII character handling in bracket expression;
- - fault-tolerant nextchar() for bad rules.
- Problem with the en_GB dictionary and nextchar() with a detailed
- code analysis reported by John Winters in SF.net Bug ID 2012753.
- * tests/condition.*: extended test for the fix.
-
- * hunspell/hunspell.*, parsers/*, tools/hunspell.cxx: fix compiler
- warnings (deprecated const-free char consts)
-
- * win_api/hunspelldll.*: add hunspell_free_list(), the problem
- reported by Laurier Mercer.
-
-2008-06-30 Török László <torok_laszlo at users dot SF dot net>:
- * tests/affixmgr.cxx: fix morphological analysis: strcat() on
- an uninitialized char array in suffix_check_morph().
-
-2008-06-18 Németh László <nemeth at OOo>:
- * src/hunspell/affixmgr.cxx: fix GCC compiler warnings
- (comparisons with string literal results in unspecified behaviour).
- The problem reported by Ladislav MichnoviÄ.
-
-2008-06-17 Németh László <nemeth at OOo>:
- * src/hunspell/{hunspell.cxx,hunspell.h}: add free_list() to the C and
- C++ interface to deallocate suggestion lists. The problem
- reported by Laurie Mercer and Christophe Paris.
- * csutil.cxx: fix freelist() to deallocate non-NULL list, when n = 0.
- * tools/{analyze,example,chmorph,hunspell}.cxx: use free_list().
-
- * tools/hunspell.cxx: fix only --with-readline compiling problem.
- Reported by Volkov Peter in SF.net Bug 1995842.
-
- * man/hunspell.3,hunspell.hxx: fix analyze and generate examples in
- the manual and comments (using char*** parameter instead of char**).
-
- * tools/example.cxx: fix suggestion example.
-
-2008-06-17 Németh László <nemeth at OOo>:
- * affentry.cxx: fix the new affix rule matching algorithm of
- Hunspell 1.2. Arabic dictionary problem reported by Khaled Hosny
- in SF.net Bug ID 1975530. Mohamed Kebdani also sent a
- prepared test data.
- * tests/{1975530,condition*}: tests for the fix
-
-2008-06-13 Ingo H. de Boer <idb_winshell at SF.net>:
- * src/hunspell/{affixmgr.cxx,hunspell.cxx}: add missing type
- cast to strstr() calls for VC8 compatibility.
-
-2008-06-13 Németh László <nemeth at OOo>:
- * suggestmgr.cxx: add also part1-part2 suggestion with dash
- for bad part1part2 word forms, suggested by Ruud Baars.
- For example, now suggestion of "parttime": "part time"
- and "part-time".
- NOTE: this feature will work only when the TRY definition
- contains "-" or the letter "a".
-
- * hunspell.cxx: new XML API in spell() and suggest() (see hunspell(3)).
-
- * src/hunspell/*: fixes for OpenOffice.org build environment.
-
- * man/{hunspell.3,hzip.1,hunzip.1}: add new manual pages for
- Hunspell programming API and dictionary compression and
- encryption utilities.
-
- * src/hunspell/*: handle failed mystrdup() calls and other potential
- insufficient memory problems. The problem reported by Elio Voci
- in OpenOffice.org Issue 90604 and others.
-
- * src/tools/affixmgr.cxx: restore original behaviour of get_wordchars
- without conditional code. Problem reported by Ingo H. de Boer
- in SF.net Bug 1763105.
-
- * win_api/hunspelldll.h: put_word() renamed to add() in the (old)
- Windows DLL API bug reported in SF.net Bug 1943236. Also reported
- by Bartkó Zoltán.
-
- * tools/hunspell.cxx: fix chench() for environments without
- native language support (ENABLE_NLS 0 in config.h),
- PHP system_exec() bug reported by Michel Weimerskirch in
- SF.net Bug 1951087.
-
- * hunspell.cxx, affixmgr.cxx: remove "result" from the
- (result && *result) conditions, when "result" is a static variable.
- The problem and a possible solution reported by Ladislav MichnoviÄ.
-
- * affixmgr.cxx: parse_affix(): print line instead of NULL in
- the warning message, when affix class header is bad.
- The problem reported by Ladislav MichnoviÄ.
-
-2008-06-01 Christian Lohmaier <cloph at OOo>
- * configure.ac: patch to fix --with-readline, --with-ui logic.
- Reported in the SF.net Bug 981395.
-
-2008-05-04: Volkov Peter <volkov_peter at users sourceforge net>
- * configure.ac: fix LibTool 2.22 incompatibility by removing
- unused LT_* macros. Report and patch in SF.net Bug 1957383.
- The problem reported and fixed by Ladislav MichnoviÄ, too.
-
-2008-04-23: Ladislav MichnoviÄ <lmichnovic at suse cz>
- * hunspell.pc.in: fix wrongly set directories.
-
-2008-04-12 Németh László <nemeth at OOo>:
- * src/tools/hunspell.cxx:
- - Multilingual spell checking and special dictionary support with -d.
- Multilingual spell checking suggested by Khaled Hosny (SF.net
- Bug 1834280). Example for the new syntax:
-
- -d en_US,en_geo,en_med,de_DE,de_med
-
- en_US and de_DE are base dictionaries, and en_geo, en_med, de_med
- are special dictionaries (dictionaries without affix file).
- Special dictionaries are optional extension of the base dictionaries.
- There is no explicit naming convention for special dictionaries,
- only the ".dic" extension: dictionaries without affix file will
- be an extension of the preceding base dictionary. First dictionary
- in -d parameter must have an affix file (it must be a base
- dictionary).
-
- - new options for debugging, morphological analysis and stemming:
- -m: morphological analysis or flag debug mode (without affix
- rule data it signs the flag of the affix rules)
- -s: stemming mode
- -D: show also available dictionaries and search path
- (suggested by Aaron Digulla in SF.net Bug 1902133)
-
- - add missing refresh() to print bad words before the slower suggestion
- search in UI (better user experience)
-
- - fix tabulator problems (reported by ugli-kid-joe AT sf DOT net)
-
- - fix different encoding of dic and input, and suggestions
-
- - add per mille sign to LANG hu_HU section.
-
- - rewrite program messages. Concatenating multiple printfs for
- easier translation suggested by András Tímár and Gábor Kelemen.
-
- * src/hunspell/csutil.cxx: set static encds variable. Patch by
- Rene Engerhald. SF.net Bug 1896207 and 1939988.
-
- * src/hunspell/w_char.hxx,csutil.hxx: reorganizing
- w_char typedef and HENTRY_DATA, HENTRY_FIND consts
-
- * src/hunspell/hunzip.cxx: fopen(): using rb options instead of r (fix
- for Windows)
-
- * src/tools/affixmgr.cxx: restore original behaviour of get_wordchars
- in an #ifdef WINSHELL section. Problem reported by Ingo H. de Boer
- in SF.net Bug 1763105.
-
- * src/tools/chmorph.cxx: remove the experimental modifications
-
- * src/tools/hzip.c: fopen(): using wb options instead of w (fix
- for Windows)
-
- * src/tools/hunzip.cxx: add missing MOZILLA_CLIENT. Reported
- by Ryan VanderMeulen.
-
- * man/*, man/hu/*: updated manual
-
- * man/hunspell.4: fix formatting problem (missing header)
-
- * tools/makealias: now works with the extra data fields.
-
- * phonet.cxx: use HASHSIZE const
-
- * tests/rep.aff: fix REP count
-
- * src/win_api/Makefile.cygwin, README: native Windows compilation
- in Cygwin environment without cygwin1.dll dependency (see README
- for compiling instructions).
-
-2008-04-08 Roland Smith <rsmith AT xs4all DOT nl>:
- * src/parsers/latexparser.cxx: fix PATTERN_LEN for AMD64 and
- other platforms with different struct padding (SF.net Bug 1937995).
-
-2008-04-03 Kelemen Gábor <kelemeng AT gnome DOT hu>:
- * po/POTFILES.in: fix path of the source file
-
- * po/Makevars: add --from-code=UTF-8 gettext option
-
- * hunspell.cxx: add comments for shortkey translation
-
-2008-02-04 Flemming Frandsen <flfr AT stibo DOT com>
- * src/hunspell.h: fix Windows DLL support
- - this patch also reported by Zoltán Bartkó.
-
-2008-01-30 Mark McClain <marc_mcclain AT users DOT sf DOT net>
- * src/hunspell.cxx: stem(): fix function call side effect
- for PPC platform (SF.net Bug 1882105).
-
-2008-01-30 Németh László <nemeth at OOo>:
- * hunspell.cxx, csutil.cxx, hunspelldll.c: fix
- SF.et Bug 1851246, patch also by Ingo H. de Boer.
-
- * hunspell.h: fix SF.net Bug 1856572 (C prototype problem),
- patch by Mark de Does.
-
- * hunspell.pc.in: fix SF.net Bug 1857450 wrong prefix, reported
- by Mark de Does.
-
- * hunspell.pc.in: reset numbering scheme: libhunspell-1.2.
- Fix SF.net Bug 1857512 reported by Mark de Does,
- also by Rene Engelhard.
-
- * csutil.cxx: patches for ARM platform, signed_chars.dpatch
- by Rene Engelhard and arm_structure_alignment.dpatch by
- Steinar H. Gunderson <sesse@debian.org>
-
- * hunzip.*, hzip.c: new hzip compression format
-
- * tools/affixcompressor: affix compressor utility (similar to
- munch, but it generates affix table automatically), works
- with million-words dictionaries of agglutinative languages.
-
- * README: fix problems reported by Pham Ngoc Khanh.
-
- * csutil.cxx, suggestmgr: Warning-free in OOo builds.
-
- * hashmgr.*, csutil.*: fix protected memory problems with
- stored pointers on several not x86 platforms by
- store_pointer(), get_stored_pointer().
-
- * src/tools/hunspell.cxx: fix iconv support on Solaris platform.
-
- * tests/IJ.good: add missing test file
-
- * csutil.cxx: fix const char* related errors. Compiling bug
- with Visual C++ reported by Ryan VanderMeulen and Ingo H. de Boer.
-
-2008-01-03 Caolan McNamara <cmc at OO.o>:
- * csutil.cxx: SF.net Bug 1863239, notrailingcomma patch and
- optimization of get_currect_cs().
-
-2007-11-01 Németh László <nemeth at OOo>:
- * hunspell/*: new feature: morphological generation,
- also fix experimental morphological analysis and stemming.
- - new API functions and improved API:
- - analyze(word): (instead of morph()) morphological analysis
- - stem(word): stemming
- - stem(list): stemming based on the result of an analysis
- - generate(word, word2): morphological generation
- - generate(word, list): morphological generation
- - add(word): add word to the run-time dictionary (renamed put_word())
- - add_with_affix(word, word2): (renamed put_word_pattern()):
- add word to the run-time dictionary with affix flags of the
- second parameter: all affixed forms of the user words will be
- recognised by the spell checker. Especially useful for
- agglutinative languages.
- - remove(word): remove word from the run-time dictionary (not
- implemented)
- - see manual and hunspell/hunspell.hxx header and tests/morph.*
- * tests/morph.*: test data, example for morphological analysis,
- stemming and generation
-
- * tools/analyze, tools/chmorph: extended and new demo applications:
- - analyze (originally hunmorph): analyses and stems input words,
- generates word forms from input word pairs.
- - chmorph: morphological transformation filter
-
- * configure.ac, hunspell/makefile.am: set library version number.
- Bug reported by Rene Engelhard.
-
- * affentry.cxx, affixmgr.cxx: new pattern matching algorithm in
- condition checking of affix rules instead of the Dömölki-algorithm:
- - Unlimited condition length (instead of max. 8 characters).
- - Less memory consumption, especially useful for affix rich languages:
- 5,4 MB memory savings with hu_HU dictionary.
- - Speed change depends from dictionaries and CPU caches: English spell
- checking is 4% faster on Linux words with en_US dictionary, Hungarian
- spell checking is 25% slower on most frequent words of Hungarian
- Webcorpus.
-
- * tests/sug.*, sugutf.*: updated test data (use "a" and "lot"
- dictionary items instead of "a lot".)
-
- * src/hunspell/hunspell.cxx: free(csconv) instead of delete csconv.
- Report and patch by Sylvain Paschein in Mozilla Issue 398268.
-
- * suggestmgr.cxx, tools/hunspell.cxx: bad spelling of "misspelled".
- Ubuntu Bug #134792, patch by Malcolm Parsons.
-
- * tests/base_utf.*: use Unicode apostrophe instead of 8-bit one.
-
- * hunspell.cxx, hashmgr.cxx: add(): use HashMgr::add()
-
-2007-10-25 Pavel Janík <pjanik at OOo>:
- * hunspell/csutil.cxx: Fix type cast warnings on 64bit Linux in
- printing of character positions in u8_u16(). OOo issue 82984.
-
-2007-09-05 Németh László <nemeth at OOo>:
- * win_api/Hunspell.vproj, parsers/testparser.cxx,textparser.hxx:
- warning fixes and removing unnecessary Windows project file.
- Reported by Ingo H. de Boer.
-
- * hashmgr.*, {affixmgr,suggestmgr}.cxx: optimized data structure
- for variable-count fields (only "ph" transliteration field in
- this version, see next item). Also less memory consumption:
- -13% (0.75 MB) with en_US dictionary, -6% (1 MB) with hu_HU.
-
- * suggestmgr.cxx: dictionary based phonetic suggestion for special
- or foreign pronounciation (see also rule-based PHONE in manual).
- Usage: tab separated field in dictionary lines, started with "ph:".
- The field contains a phonetic transliteration of the word:
-
-Marseille ph:maarsayl
- * tests/phone.*: test data for dictionary and rule based phonetic
- suggestion.
-
- * hunspell.cxx: fix potential bad memory access in allcap word
- capitalization in suggest() (bug of previous version).
-
- * hunspell.cxx, atypes.hxx: set correct limit for UTF-8 encoded
- input words (256 byte).
-
- * suggestmgr.cxx: improved REP suggestions with spaces: it works
- without dictionary modification.
- OOo issue 80147, reported by Davide Prina.
- * tests/rep.*: new test data: higher priority for "alot" -> "a lot",
- and Italian suggestion "un'alunno" -> "un alunno".
-
- * affixmgr.cxx: fix Unicode ngram suggestions in expand_rootword().
- (Suggestions with bad affixes.)
- Bug reported by Vitaly Piryatinksy <piv dot v dot vitaly at gmail>.
- * tests/ngram_utf_fix.*: test based on Vitaly Piryatinksy's data.
-
- * suggestmgr.cxx: fix twowords() for last UTF-8 multibyte character.
- (conditional jump or move depended on uninitialised value).
-
-2007-08-29 Ingo H. de Boer <idb_winshell at SF.net>:
- * win_api/{hunspell,libhunspell, testparser}.vcproj: new project
- files for the library and the executables.
-
- * Hunspell.rc, Hunspell.sln, config.h: updated versions.
- Version number problem also reported by András Tímár.
-
-2007-08-27 Németh László <nemeth at OOo>:
- * suggestmgr.hxx: put fixed version. Bug report by Ingo H. de Boer.
-
- * suggestmgr.cxx: remove variable-length local character array
- reported by Ingo H. de Boer.
-
-2007-08-27 Németh László <nemeth at OOo>:
- * suggestmgr.hxx: change bad time_t to clock_t in header, too.
- Bug reports or patches by Ingo H. de Boer under SF.net
- Bug ID 1781951, János Mohácsi and Gábor Zahemszky, András Tímár,
- OMax3 at SF.net under SF.net Bug ID 1781592.
-
- * phonet.*: change variable-length local character array to
- portable fixed size character array. Problem reported by
- Ingo H. de Boer under SF.net Bug ID 1781951 and
- Ryan VanderMeulen.
-
- * suggestmgr.cxx: remove debug message (also by
- Ingo H. de Boer).
-
-2007-08-26 Ingo H. de Boer <idb_winshell at SF.net>:
- * win_api/Hunspell.vcproj: updated version (with phonet.*)
-
-2007-08-23 Németh László <nemeth at OOo>:
- * phonet.{c,h}xx, suggestmgr.cxx: PHONE parameter:
- pronounciation based suggestion using Björn Jacke's original Aspell
- phonetic transcription algorithm (http://aspell.net), relicensed
- under GPL/LGPL/MPL tri-license with the permission of the author.
- Usage: see manual.
-
- * affixmgr,suggestmgr.cxx: add KEY parameter for keyboard and
- input method error related suggestions.
- Example: KEY qwertyuiop|asdfghjkl|zxcvbnm
-
- * man/hunspell.4: description about PHONE and KEY suggestion parameters.
-
- * suggestmgr.cxx: enhancements for better suggestions:
- - Set ngram suggestions for badchar-type errors
- and only two word and compound word suggestions, too.
- - Separate not compound and compound word
- suggestions for MAP suggestion, too.
- - Double swap suggestions for short words.
- For example: ahev -> have, hwihc -> which.
- - Better time limits using clock() instead of time()
- (tenths of a second resolution instead of second ones).
- - leftcommonsubstring() weigth function.
-
- * htype.hxx, hashmgr.cxx: blen (byte length) and clen (character
- length) fields instead of wlen
-
- * affixmgr.cxx: fix get_syllable() for bad Unicode inputs.
-
- * tests/suggestiontest/*: test environment for suggestions
-
-2007-08-07 Martijn Wargers:
- * csutil.cxx: fix Mingw build error associated with ToUpper() call.
- Report and patch in Mozilla Issue 391447.
-
-2007-08-07 Robert Longson:
- * atypes.cxx: use empty inline function HUNSPELL_WARNING instead of
- variadic macros to switch of Hunspell warnings.
- Reported by Gavin Sharp in Mozilla Issue 391147.
-
-2007-08-05 Ginn Chen:
- * hashmgr.cxx: Hunspell failed to compile on OpenSolaris (use stdio
- instead of csdio). Report and patch in Mozilla Issue 391040.
-
-2007-07-25 Németh László <nemeth at OOo>:
- * parsers/*.cxx: Hunspell executable recognises and accepts URLs,
- e-mail addresses, directory paths, reported by Jeppe Bundsgaard.
- * src/tools/hunspell.cxx: --check-url: new option of Hunspell program.
- Use --check-url, if you want check URLs, e-mail addresses and paths.
-
- * parsers/textparser.cxx: strip colon at end of words for Finnish
- and Swedish (colon may be in words in Finnish and Swedish).
- Problem reported by Lars Aronsson.
- * tests/colons_in_words.*: test data
-
- * tests/digits_in_words.*: example for using digits in words
- (eg. 1-jährig, 112-jährig etc. in German), reported by Lars Aronsson.
-
- * hashmgr.cxx: Hunspell accepts allcaps forms of mixed case
- words of personal dictionaries (+allcaps custom dictionary words with
- allcaps affixes).
- Sf.net Bug ID 1755272, reported by Ellis Miller.
-
- * hashmgr.cxx: fix small memory leaks with alias compressed
- dictionaries (free flag vectors of affixed personal dictionary words
- and flag vectors of hidden capitalized forms of mixed case and
- allcaps words).
-
- * affixmgr.cxx: fix COMPOUNDRULE checking with affixed compounds.
- Sf.net Bug ID 1706659, reported by Björn Jacke. Also fixing for
- OOo Issue 76067 (crash-like deceleration for hexadecimal numbers
- with long FFFFFF sequence using en_US dictionary).
-
- * tools/hunspell.cxx: add missing return to save_privdic().
-
- * man/hunspell.4: add information about affixation of personal words:
- "Personal dictionaries are simple word lists, but with optional
- word patterns for affixation, separated by a slash:
-
- foo
- Foo/Simpson
-
- In this example, "foo" and "Foo" are personal words, plus Foo
- will be recognised with affixes of Simpson (Foo's etc.)."
-
-2007-07-18 Németh László <nemeth at OOo>:
- * src/win_api/: add missing resource files, reported by Ingo H. de Boer.
-
-2007-07-16 Németh László <nemeth at OOo>:
- * hunspell.cxx: fix dot removing from UTF-8 encoded words in cleanword2()
- (Capitalised words with dots, as "Something." were not recognised
- using Unicode encoded dictionaries.)
- * tests/{base.*,base_utf.*}: extended and new test files for
- dot removing and Unicode support.
-
- * tools/hunspell.cxx: fix Cygwin, OS X compatibility using platform
- specifics iconv() header by ICONV_CONST macro of Autoconf.
- Sf.net Bug ID 1746030, reported by Mike Tian-Jian Jiang.
- Sf.net Bug ID 1753939, reported by Jean-Christophe Helary.
-
- * tools/hunspell.cxx: fix missing global path setting with -d option.
-
- * tests/test.sh: fix broken Valgrind checking (missing warnings
- with VALGRIND=memcheck make check).
-
- * csutil.cxx: fix condition in u8_u16() to avoid invalid read
- of not null-terminated character arrays (detected by Valgrind
- in Hunspell executable: associated with 8-bit character table
- conversion in tools/hunspell.cxx).
-
- * csutil.cxx: free_utf_tbl(): use utf_tbl_count-- instead of utf_tbl--.
- Memory leak in Hunspell executable detected by Valgrind.
-
- * hashmgr.cxx: add missing free_utf_tbl(), memory leak in Hunspell
- executable detected by Valgrind.
-
- * hashmgr.cxx: load_tables(): fix memory error in spec. capitalization.
- Use sizeof(unsigned short) instead of bad sizeof(unsigned short*).
- Invalid memory read detected by Valgrind.
-
- * hashmgr.cxx: add_word(): fix memory error in spec. capitalization.
- Update also affix array length of capitalized homonyms. Invalid
- memory read detected by Valgrind.
-
- * hunspell.cxx: suggest(): fix invalid memory write and leak.
- Bad realloc() and missing free() detected by Valgrind associated
- with suggestions for "something.The" type spelling errors.
-
- * {dictmgr,csutil,hashmgr,suggestmgr}.cxx: check memory allocation.
- Sf.net Bug ID 1747507, based on the patch by Jose da Silva.
-
-2007-07-13 Ingo H. de Boer <idb_winshell at SF.net>:
- * atypes.cxx: fix Visual C compatibility: Using
- "HUNSPELL_WARNING(a,b,...} {}" macro instead of empty "X(a,b...)".
-
- * hunspell.cxx: changes for Windows API.
- * win_api/Hunspell.*: new resource files
- * win_api/hunspelldll.*: set optional Hunspell and Borland spec. codes
- Sf.net Bug ID 1753802, patch by Ingo H. de Boer.
- See also Sf.net Bug ID 1751406, patch by Mike Tian-Jian Jiang.
-
-2007-07-09 Caolan McNamara <cmc at OO.o>:
- * {hunspell,hashmgr,affentry}.cxx: fix warnings of Coverity program
- analyzer. Sf.net Bug ID, 1750219.
-
-2007-07-06 Németh László <nemeth at OOo>:
- * atypes.cxx: warning-free swallowing of conditional warning messages
- and their parameters using empty HUNSPELL_WARNING(a,b...) macro.
- * {affixmgr,atypes,csutil}.cxx: fix unused variable warnings
- using WARNVAR macro for conditionally named variables.
- * hashmgr.cxx: fix unused variable warning in add_word() by cond. name
- * hunspell.cxx: fix shadowed declaration of captype var. in suggest()
-
-2006-06-29 Caolan McNamara <cmc at OO.o>:
- * hunspell.cxx: patch to fix possible memory leak in analyze() of
- experimental morphological analyzer code. Sf.net Bug ID 1745263.
-
-2007-06-29 Németh László <nemeth at OOo>:
-improvements:
- * src/hunspell/hunspell.cxx: check bad capitalisation of Dutch letter IJ.
- - Sf.net Feature Request ID 1640985, reported by Frank Fesevur.
- - Solution: FORBIDDENWORD for capitalised word forms (need
- an improved Dutch dictionary with forbidden words: Ijs/*, etc.).
- * tests/IJ.*: test data and example.
-
- * hashmgr.cxx, hunspell.cxx: check capitalization of special word forms
- - words with mixed capitalisation: OpenOffice.org - OPENOFFICE.ORG
- Sf.net Bug ID 1398550, reported by Dmitri Gabinski.
- - allcap words and suffixes: UNICEF's - UNICEF'S
- - prefixes with apostrophe and proper names: Sant'Elia - SANT'ELIA
- For Catalan, French and Italian languages.
- Reported by Davide Prina in OOo Issue 68568.
- * tests/allcaps*: tests for OPENOFFICE.ORG, UNICEF'S capitalization.
- * tests/i68568*: tests for SANT'ELIA capitalization.
-
- * hunspell/hunspell.cxx: suggestion for missing sentence spacing:
- something.The -> something. The
-
- * tools/hunspell.cxx: multiple character encoding support
- - -i option: custom input encoding
- Sf.net Bug ID 1610866, reported by Thobias Schlemmer.
- Sf.net Bug ID 1633413, reported by Dan Kenigsberg.
- See also hunspell-1.1.5-encoding.patch of Fedora from Caolan Mc'Namara.
- * tests/*.test: add input encodings
-
- * tools/hunspell.cxx: use locale data for default dictionary names.
- Sf.net Bug ID 1731630, report and patch from Bernhard Rosenkraenzer,
- See also hunspell-1.1.4-defaultdictfromlang.patch of Fedora Linux
- from Caolan McNamara.
-
- * tools/hunspell.cxx: fix 8-bit tokenization (letters without
- casing, like ß or Hebrew characters now are handled well)
-
- * tools/hunspell.cxx: dictionary search path
- - DICPATH environmental variable
- - -D option: show directory path of loaded dictionary
- - automatic detection of OpenOffice.org directories
-
-fixes:
- * affixmgr.cxx: fault-tolerant patch for REP and other affix
- table data problems. Problem with Hunspell and en_GB dictionary
- reported by Thomas Lange in OOo Issue 76098 and
- Stephan Bergmann in OOo Issue 76100.
- Sf.net Bug ID 1698240, reported by Ingo H. de Boer.
-
- * csutil.cxx: fix mkallcap_utf() for allcaps suggestion in UTF-8.
-
- * suggestmgr.cxx: fix bad movechar_utf() (missing strlen()).
-
- * hunspell.cxx: fix bad degree sign detection in Unicode
- hu_HU environment.
-
- * hunspell/hunspell.cxx: free allocated memory of csconv in
- ported Mozilla code.
- - Mozilla Bugzilla Bug 383564, report and Mozilla MySpell patch
- by Andrew Geul. Reported by Ryan VanderMeulen for Hunspell.
-
- * suggestmgr.cxx: fix minor difference in Unicode suggestion
- (ngram suggestion of allcaps words in Unicode).
-
- * hashmgr.cxx: close file handle after errors.
- Sf.net Bug ID 1736286, reported by John Nisly.
-
- * configure.ac: syntax error (shell variable with spaces).
- Sf.net Bug ID 1731625, reported by Bernhard Rosenkraenzer.
-
- * hunspell.cxx: check_word(): fix bad usage of info pointer.
-
- * hashmgr.cxx: fix de_DE related bug (accept words with leading dash).
- Sf.net Bug ID 1696134, reported by Björn Jacke.
-
- * suggestmgr.cxx, tests/1695964.*: fix NEEDAFFIX homonym suggestion.
- Sf.net Bug ID 1695964, reported by Björn Jacke.
-
- * tests/1463589*: capitalized ngram suggestion test data for
- Sf.net Bug ID 1463589, reported by Frederik Fouvry.
-
- * csutil.cxx, affixmgr.cxx: fix possible heap error with
- multiple instances of utf_tbl.
- Sf.net Bug ID 1693875, reported by Ingo H. de Boer.
-
- * affixmgr.cxx, suggestmgr.cxx, license.hunspell: convert to ASCII.
- Locale dependent compiling problems. Sf.net Bug ID 1694379, reported
- by Mike Tian-Jian Jiang. OOo Issue 78018 reported by Thomas Lange.
-
- * tests/test.sh: compatibility issues
- - fix Valgrind support (check shared library instead of shell wrapper)
- - remove deprecated "tail +2" syntax
- - set 8-bit locale for testing (LC_ALL=C)
-
- * hunspell.hxx: remove license.* and config.h dependencies.
- - hunspell-1.1.5-badheader.patch from Caolan McNamara <cmc at OO.o>
-
-2007-03-21 Németh László <nemeth at OOo>:
- * tools/Makefile.am, munch.h, unmunch.h: add missing munch.h and unmunch.h
- Reported by Björn Jacke and Khaled Hosny (sf.net Bug ID 1684144)
- * hunspell/hunspell.cxx, hunspell.hxx: fix --with-ui compliling error (add get_csconv())
- Reported by Khaled Hosny (sf.net Bug ID 1685010)
-
-2007-03-19 Németh László <nemeth at OOo>:
- * csutil.cxx, hunspell/hunspell.cxx: Unicode non BMP area (>65K character range) support
- (except conditional patterns and strip characters of affix rules)
- * tests/utf8_nonbmp*: test data
-
- * src/hunspell/*: add Mozilla patches from David Einstein
- - run-time generated 8-bit character tables
- - other Mozilla related changes (see Mozilla Bugzilla Bug 319778)
-
- * csutil.cxx, affixmgr.cxx, hashmgr.cxx: optimized version of IGNORE feature
- - IGNORE works with affixes (except strip characters and affix conditions)
- * tests/ignore*: test data with latin characters
- * tests/ignoreutf*: Unicode test data with Arabic diacritics (Harakat)
-
- * src/hunspell/suggestmgr.cxx: new edit distance suggestion methods
- - capitalization: nasa -> NASA
- - long swap: permenant -> permanent
- - long mov.: Ghandi -> Gandhi
- - double two characters: vacacation -> vacation
- * tests/sug.*: test data
-
- * src/hunspell/affixmgr.cxx: space in REP strings (alot -> a lot)
- Note: Underline character signs the space in REP strings: REP alot a_lot, and
- put the expression with space ("a lot") into the dic file (see tests/sug).
-
- * hashmgr.cxx, affixmgr.cxx: ignore Unicode byte order mark (BOM sequence)
- * tests/utf8_bom*: test data
-
- * hunspell/*.cxx: OOo Issue 68903 - Make lingucomponent warning-free on wntmsci10
- - fix Hunspell related warning messages on Windows platform (except some assignment
- within conditional expressions). Reported and started by Stephan Bergmann.
-
- * hunspell/affixmgr.cxx: fix OOo Issue 66683 - hunspell dmake debug=x fails
- - Reported by Stephan Bergmann.
-
- * src/hunspell/hunspell.[ch]xx: thread safe API for Hunspell executable
- (removing prev*() functions, new spell(word, info, root) function)
-
- * configure.ac, src/hunspell/*: HUNSPELL_EXPERIMENTAL code
- --with-experimental configure option (conditional compiling of morphological analyser
- and stemmer tools)
-
- * configure.ac, src/hunspell/*: conditional Hunspell warning messages
- --with-warnings configure option
-
- * affixmgr.cxx: new, optimized parsing functions
-
- * affixmgr.cxx: fix homonym handling for German dictionary project,
- reported by Björn Jacke (sf.net Bug ID 1592880).
- * tests/1592880.*: test data by Björn Jacke
-
- * src/hunspell/affixmgr.cxx: fix CIRCUMFIX suggestion
- Bug reported by Erdal Ronahi.
-
- * hunspell.cxx: reverse root word output (complex prefixes)
- Bug reported by Munzir Taha.
-
- * tools/hunspell.cxx: fix Emacs compatibility, patch by marot at sf.net
- - no % command in PIPE mode (SourceForge BugTracker 1595607)
- - fix HUNSPELL_VERSION string
-
- * suggestmgr.[hc]xx: rename check() functions to checkword() (OOo Issue 68296)
- adopt MySpell patch by Bryan Petty (tierra at ooo) for Hunspell source
-
- * csutil.cxx, munch.c, unmunch.c: adopt relevant parts of the MinGW patch
- (OOo Issue 42504) by tonal at ooo
-
- * affigmgr.cxx: remove double candidate_check() call, reported by Bram Moolenaar
-
- * tests/test.sh: add LC_ALL="C" environment. Locale dependency of make check
- reported by Gentoo project.
-
- * src/tools/hunspell.cxx: UTF-8 highlighting fix for console UI
- (not solved: breaking long UTF-8 lines)
-
- * src/tools/unmunch.c: fix bad generation if strip is shorter than condition,
- reported by Davide Prina
- * src/tools/unmunch.h: increase 5000 -> 500000
-
- * src/tools/hunspell.cxx: fix memory error in suggestion (uninitialized parameter),
- Bug also reported by Björn Jacke in SourceForge Bug 1469957
-
- * csutil.cxx, affixmgr.cxx: fix Caolan McNamara's patch for non OOo environment
-
-2006-11-11 Caolan McNamara <cmc at OO.o>:
- * csutil.cxx, affixmgr.cxx: UTF-8 table patch (OOo Issue 71449)
- Description: memory optimization (OOo doesn't use the large UTF-8 table).
-
- * Makefile.am: shared library patch (Sourceforge ID 1610756)
-
- * hunspell.h, hunspell.cxx: C API patch (Sourceforge ID 1616353)
-
- * hunspell.pc: pkgconfig patch (Sourceforge ID 1639128)
-
-2006-10-17 Ryan Jones <at Mozilla Bugzilla>:
- * affixmgr.cxx: missing fclose(affixlst) calls
- Reported by <gavins at ooo> in OOo Issue 70408
-
-2007-07-11 Taha Zerrouki <taha at gawab>:
- * affixmgr.cxx, hunspell.cxx, hashmgr.cxx, csutil.cxx: IGNORE feature to remove
- optional Arabic and other characters from input and dictionary words.
- * src/hunspell/langnum.hxx: add Arabic language number, lang_ar=96
- * tests/ignore.*: test data
-
-2006-05-28 Miha Vrhovnik <mvrhov at users.sourceforge>:
- * src/win_api/*: C API for Windows DLLs
- - also Delphi text editor example (see on Hunspell Sourceforge page)
-
-2006-05-18 Kevin F. Quinn <kevquinn at gentoo>:
- * utf_info.cxx: struct -> static struct
- Shared library patch also developed by Gentoo developers (Hanno Meyer-Thurow,
- Diego Pettenò, Kevin F. Quinn)
-
-2006-02-02 Németh László <nemethl@gyorsposta.hu>:
- * src/hunspell/hunspell.cxx: suggest(): replace "fooBar" -> "foo bar" suggestions
- with "fooBar" ->"foo Bar" (missing spaces are typical OCR bugs).
- Bug reported by stowrob at OOo in Issue 58202.
- * src/hunspell/suggestmgr.cxx: twowords(): permit 1-character words.
- (restore MySpell's original behavior). Here: "aNew" -> "a New".
- * tests/i58202.*: test data
-
- * src/parsers/textparser.cxx: fix Unicode tokenization in is_wordchar()
- (extra word characters (WORDCHARS) didn't work on big-endian platforms).
-
- * src/hunspell/{csutil,affixmgr}.cxx: inline isSubset(), isRevSubset():
- little speed optimalization for languages with rich morphology.
-
- * src/tools/hunspell.cxx: fix bad --with-ui and --with-readline compiling
- when (N)curses is missing. Reported by Daniel Naber.
-
-2006-01-19 Tor Lillqvist <tml@novell.com>
- * src/hunspell/csutil.cxx: mystrsep(): fix locale-dependent isspace() tokenization
-
-2006-01-06 András Tímár <timar@fsf.hu>
- * src/hunspell/{hashmgr.hxx,hunspell.cxx}: fix Visual C++ compiling errors
-
-2006-01-05 Németh László <nemethl@gyorsposta.hu>:
- * COPYING: set GPL/LGPL/MPL tri-license for Mozilla integration.
- Rationale: Mozilla source code contains an old MySpell version
- with GPL/LGPL/MPL tri-license. (MPL license is a copyleft license, similar
- to the LGPL, but it acts on file level.)
- * COPYING.LGPL: GNU Lesser General Public License 2.1 (LGPL)
- * COPYING.MPL: Mozilla Public License 1.1 (MPL)
- * license.hunspell, src/hunspell/license.hunspell: GPL/LGPL/MPL tri-license
-
- * src/hunspell/{affixmgr,hashmgr}.*: AF, AM alias definitions in affix file:
- compression of flag sets and morphological descriptions (see manual,
- and tests/alias* test files).
- Rationale: Alias compression is also good for loading time and memory
- efficiency, not only smaller resources.
- * src/tools/makealias: alias compression utility
- (usage: ./makealias file.dic file.aff)
- * tests/alias{,2,3}: AF, AM tests
- * man/hunspell.4: add AF, AM documentation
- * src/hunspell/affentry.cxx, atypes.hxx: add new opts bits (aeALIASM, aeALIASF)
-
- * tools/hunspell, src/parser/*, src/hunspell/*: Hunspell program
- tokenizes Unicode texts (only with UTF-8 encoded dictionaries).
- Missing Unicode tokenization reported by Björn Jacke, Egmont Koblinger,
- Jess Body and others.
- Note: Curses interactive interface hasn't worked perfectly yet.
- * tests/*.tests: remove -1 parameters of Hunspell
- * tests/*.{good,wrong}: remove tabulators
-
- * src/hunspell/{hunspell,affixmgr}.cxx: BREAK option: break words at
- specified break points and checking word parts separately (see manual).
- Note: COMPOUNDRULE is better (or will be better) for handling dashes and
- other compound joining characters or character strings. Use BREAK, if you
- want check words with dashes or other joining characters and there is no time
- or possibility to describe precise compound rules with COMPOUNDRULE.
- * tests/break.*: BREAK example.
-
- * src/hunspell/{affixmgr,hunspell}.cxx: add CHECKSHARPS declaration instead
- of LANG de_DE definitions to handle German sharp s in both spelling and
- suggestion.
- * src/hunspell/hunspell.cxx: With CHECKSHARPS, uppercase words are valid
- with both lower sharp s (it's is optional for names in German legal texts)
- and SS (MÜßIG, MÜSSIG). Missing lower sharp s form reported by Björn Jacke.
- * src/hunspell/hunspell.cxx: KEEPCASE flag on a sharp s word has a special
- meaning with CHECKSHARPS declaration: KEEPCASE permits capitalisation and SS upper
- casing of a sharp s word (Müßig and MÜSSIG), but forbids the upper cased form
- with lower sharp s character(s): *MÜßIG.
- * tests/germancompounding*: add CHECKSHARPS, remove LANG
- * tests/checksharps*: add CHECKSHARPS and KEEPCASE, remove LANG
-
- * src/hunspell/hunspell.cxx: improved suggestions:
- - suggestions for pressed Caps Lock problems: macARONI -> macaroni
- - suggestions for long shift problems: MAcaroni -> Macaroni, macaroni
- - suggestions for KEEPCASE words: KG -> kg
- * src/hunspell/csutil.cxx: fix mystrrep() function:
- - suggestions for lower sharp s in uppercased words: MÜßIG -> MÜSSIG
- * tests/checksharps{,utf}.sug: add tests for mystrrep() fix
-
- * src/hunspell/hashmgr.cxx: Now dictionary words can contain slashes
- with the "\/" syntax. Problem reported by Frederik Fouvry.
-
- * src/hunspell/hunspell.cxx: fix bad duplicate filter in suggest().
- (Suggesting some capitalised compound words caused program crash
- with Hungarian dictionary, OOo Issue 59055).
-
- * src/hunspell/affixmgr.cxx: fix bad defcpd_check() call in compound_check().
- (Overlapping new COMPOUNDRULE and old compounding methods caused program
- crash at suggestion.)
-
- * src/hunspell/affixmgr.{cxx,hxx}: check affix flag duplication at affix classes.
- Suggested by Daniel Naber.
-
- * src/hunspell/affentry.cxx: remove unused variable declarations (OOo i58338).
- Compiler warnings reported by András Tímár and Martin Hollmichel.
-
- * src/hunspell/hunspell.cxx: morph(): not analyse bad mixed uppercased forms
- (fix Arabic morphological analysis with Buckwalter's Arabic transliteration)
-
- * src/hunspell/affentry.{cxx,hxx}, atypes.hxx: little memory optimization
- in affentry:
- - using unsigned char fields instead of short (stripl, appndl, numconds)
- - rename xpflg field to opts
- - removing utf8 field, use aeUTF8 bit of opts field
-
- * configure.ac: set tests/maputf.test to XFAILED on ARM platform.
- Fail reported by Rene Engelhard.
-
- * configure.ac: link Ncursesw library, if exists.
-
- * BUGS: add BUGS file
-
- * tests/complexprefixes2.*: test for morphological analysis with COMPLEXPREFIXES
-
- * src/hunspell/affixmgr.cxx: use "COMPOUNDRULE" instead of
- "COMPOUND". The new name suggested by Bram Moolenaar.
- * tests/compoundrule*: modified and renamed compound.* test files
-
- * man/hunspell.4: AF, AM, BREAK, CHECKSHARPS, COMPOUNDRULE, KEEPCASE.
- - also new addition to the documentation:
- Header of the dictionary file define approximate dictionary size:
- ``A dictionary file (*.dic) contains a list of words, one per line.
- The first line of the dictionaries (except personal dictionaries)
- contains the _approximate_ word count (for optimal hash memory size).''
- Asked by Frederik Foudry.
-
- One-character replacements in REP definitions: ``It's very useful to
- define replacements for the most typical one-character mistakes, too:
- with REP you can add higher priority to a subset of the TRY suggestions
- (suggestion list begins with the REP suggestions).''
-
-2005-11-11 Németh László <nemethl@gyorsposta.hu>:
- * src/hunspell/affixmgr.*: fix Unicode MAP errors (sorted only n-1
- characters instead of n ones in UTF-16 MAP character lists).
- Bug reported by Rene Engelhard.
-
- * src/hunspell/affixmgr.*: fix infinite COMPOUND matching (default char
- type is unsigned on PowerPC, s390 and ARM platforms and it will never
- be negative). Bug reported by Rene Engelhard.
-
- * src/hunspell/{affixmgr,suggestmgr}.cxx: fix bad ONLYINCOMPOUND
- word suggestions.
- * tests/onlyincompound.sug: empty test file to check this fix.
- Bug reported by Björn Jacke.
-
- * src/hunspell/affixmgr.cxx: fix backtracking in COMPOUND pattern matching.
- * tests/compound6.*: test files to check this fix.
-
- * csutil.cxx: set bigger range types in flag_qsort() and flag_bsearch().
-
- * affixmgr.hxx: set better type for cont_classes[] Boolean data (short -> char)
-
- * configure.ac, tests/automake.am: set platform specific XFAIL test
- (flagutf8.test on ARM platform)
-
-2005-11-09 Németh László <nemethl@gyorsposta.hu>:
-improvements:
- * src/hunspell/affixmgr.*: new and improved affix file parameters:
-
- - COMPOUND definitions: compound patterns with regexp-like matching.
- See manual and test files: tests/compound*.*
- Suggested by Bram Moolenaar.
- Also useful for simple word-level lexical scanning, for example
- analysing numbers or words with numbers (OOo Issue #53643):
- http://qa.openoffice.org/issues/show_bug.cgi?id=53643
- Examples: tests/compound{4,5}.*.
-
- - NOSUGGEST flag: words signed with NOSUGGEST flag are not suggested.
- Proposed flag for vulgar and obscene words (OOo Issue #55498).
- Example: tests/nosuggest.*.
- Problem reported by bobharvey at OOo:
- http://qa.openoffice.org/issues/show_bug.cgi?id=55498
-
- - KEEPCASE flag: Forbid capitalized and uppercased forms of words
- signed with KEEPCASE flags. Useful for special ortographies
- (measurements and currency often keep their case in uppercased
- texts) and other writing systems (eg. keeping lower case of IPA
- characters).
-
- - CHECKCOMPOUNDCASE: Forbid upper case characters at word bound in compounds.
- Examples: tests/checkcompoundcase* and tests/germancompounding.*
-
- - FLAG UTF-8: New flag type: Unicode character encoded with UTF-8.
- Example: tests/flagutf8.*.
- Rationale: Unicode character type can be more readable
- (in a Unicode text editor) than `long' or `num' flag type.
-
-bug fixes:
- * src/hunspell/hunspell.cxx: accept numbers and numbers with separators (i53643)
- Bug reported by skelet at OOo:
- http://qa.openoffice.org/issues/show_bug.cgi?id=53643
-
- * src/hunspell/csutil.cxx: fix casing data in ISO 8859-13 character table.
-
- * src/hunspell/csutil.cxx: add ISO-8859-15 character encoding (i54980)
- Rationale: ISO-8859-15 is the default encoding of the French OpenOffice.org
- dictionary. ISO-8859-15 is a modified version of ISO-8859-1
- (latin-1) character encoding with French Å“ ligatures and euro
- symbol. Problem reported by cbrunet at OOo in OOo Issue 54980:
- http://qa.openoffice.org/issues/show_bug.cgi?id=54980
-
- * src/hunspell/affixmgr.cxx: fix zero-byte malloc after a bad affix header.
- Patch by Harri Pitkänen.
-
- * src/hunspell/suggestmgr.cxx: fix bad NEEDAFFIX word suggestion
- in ngram suggestions. Reported by Daniel Naber and Friedel Wolff.
-
- * src/hunspell/hashmgr.cxx: fix bad white space checking in affix files.
- src/hunspell/{csutil,affixmgr}.cxx: add other white space separators.
- Problems with tabulators reported by Frederik Fouvry.
-
- * src/hunspell/*: replace system-dependent <license.*> #include
- parameters with quoted ones. Problem reported by Dafydd Jones.
-
- * src/hunspell/hunspell.cxx: fix missing morphological analysis of dot(s)
- Reported by Trón Viktor.
-
-changes:
- * src/hunspell/affixmgr.cxx: rename PSEUDOROOT to NEEDAFFIX.
- Suggested by Bram Moolenaar.
-
- * src/hunspell/suggestmgr.hxx: Increase default maximum of
- ngram suggestions (3->5). Suggested by Kevin Hendricks.
-
- * src/hunspell/htypes.hxx: Increase MAXDELEN for long affix flags.
-
- * src/hunspell/suggestmgr.cxx: modify (perhaps fix) Unicode map suggestion.
- tests/maputf test fail on ARM platform reported by Rene Engelhard.
-
- * src/hunspell/{affentry.cxx,atypes.hxx}: remove [PREFIX] and
- MISSING_DESCRIPTION messages from morphological analysis.
- Problems reported by Trón Viktor.
-
- * tests/germancompounding.{aff,good}: Add "Computer-Arbeit" test word.
- Suggested by Daniel Naber.
-
- * doc/man/hunspell.4: Proof-reading patch by Goldman Eleonóra.
-
- * doc/man/hunspell.4: Fix bad affix example (replace `move' with `work').
- Bug reported by Frederik Fouvry.
-
- * tests/*: new test files:
- affixes.*: simple affix compression example from Hunspell 4 manual page
- checkcompoundcase.*, checkcompoundcase2.*, checkcompoundcaseutf.*
- compound.*, compound2.*, compound3.*, compound4.*, compound5.*
- compoundflag.* (former compound.*)
- flagutf8.*: test for FLAG UTF-8
- germancompounding.*: simplification with CHECKCOMPOUNDCASE.
- germancompoundingold.* (former germancompounding.*)
- i53643.*: check numbers with separators
- i54980.*: ISO8859-15 test
- keepcase.*: test for KEEPCASE
- needaffix*.* (former pseudoroot*.* tests)
- nosuggest.*: test for NOSUGGEST
-
-2005-09-19 Németh László <nemethl@gyorsposta.hu>:
- * src/hunspell/suggestmgr.cxx: improved ngram suggestion:
- - detect not neighboring swap characters (pernament -> permanent)
- Rationale: ngram method has a significant error with not neighboring
- swap characters, especially when swap is in the middle of the word.
- - suggest uppercase forms (unesco -> UNESCO, siggraph's -> SIGGRAPH's)
- - suggest only ngram swap character and uppercase form, if they exist.
- Rationale: swap character and casing equivalence give mutch better
- suggestions as any other (weighted) ngram suggestions.
- - add uppercase suggestion (PERMENANT -> PERMANENT)
-
- * src/hunspell/*: complete comparison with MySpell 3.2 (in OOo beta 2):
- - affixmgr.cxx: add missing numrep initialization
- - hashmgr.cxx: add_word(): don't allocate temporary records
- - hunspell.cxx: in suggest():
- - check capitalized words first (better sug. order for proper names),
- - check pSMgr->suggest() return value
- - set pSMgr->suggest() call to not optional in HUHCAP
- - csutil.cxx: fix bad KOI8-U -> koi8r_tbl reference in enc_entry encds
- - csutil.cxx: fix casing data in ISO 8859-2, Windows 1251 and KOI8-U
- encoding tables. Bug reported by Dmitri Gabinski.
-
- * src/hunspell/affixmgr.*: improved compound word and other features
- - generalize hu_HU specific compound word features with new affix file
- parameters, suggested by Bram Moolenaar:
- - CHECKCOMPOUNDDUP: forbid word duplication in compounds (eg. foo|foo)
- - CHECKCOMPOUNDTRIPLE: forbid triple letters in compounds (eg. foo|obar)
- - CHECKCOMPOUNDPATTERN: forbid patterns at word bounds in compounds
- - CHECKCOMPOUNDREP: using REP replacement table, forbid presumably bad
- compounds (useful for languages with unlimited number of compounds)
- - ONLYINCOMPOUND flag works also with words (see tests/onlyincompound.*)
- Suggested by Daniel Naber, Björn Jacke, Trón Viktor & Bram Moolenaar.
- - PSEUDOROOT works also with prefixes and prefix + suffix combinations
- (see tests/pseudoroot5.*). Suggested by Trón Viktor.
- - man/hunspell.4: updated man page
-
- * src/hunspell/affixmgr.*: fix incomplete prefix handling with twofold
- suffixes (delete unnecessary contclasses[] conditions in
- prefix_check_twosfx() and prefix_check_twosfx_morph()).
- Bug reported by Trón Viktor.
-
- * src/hunspell/affixmgr.*: complete also *_morph() functions with
- conditions of new Hunspell features (circumfix, pseudoroot etc.).
-
- * src/hunspell/suggestmgr.cxx:
- - fix missing suggestions for words with crossed prefix and suffix
- - fix redundant non compound word checking
- - fix losing suggestions problem. Bug reported by Dmitri Gabinski.
-
- * src/hunspell/dictmgr.*:
- - add new dictionary manager for Hunspell UNO modul
- Problems with eo_ANY Esperanto locale reported by Dmitri Gabinski.
-
- * src/hunspell/*: use precise constant sizes for 8-bit and 16-bit character
- arrays with MAXWORDUTF8LEN and MAXSWUTF8L macros.
-
- * src/hunspell/affixmgr.cxx: fix bad MAXNGRAMSUGS parameter handling
-
- * src/hunspell/affixmgr.cxx, src/tools/{un}munch.*: fix GCC 4.0 warnings
- on fgets(), reported by Dvornik László
-
- * po/hu.po: improved translation by Dvornik László
-
- * tests/test.sh: improved test environment
- - add suggestion testing (see tests/*.sug)
- - add memory debugging environment, based on the excellent Valgrind debugger.
- Usage on Linux and experimental platforms of Valgrind:
- VALGRIND=memcheck make check
- - rename test_hunmorph to test.sh
-
- * tests/*: new tests:
- - base.*: base example based on MySpell's checkme.lst.
- - map{,utf}.*, rep{,utf}: MAP and REP suggestion examples
- - tests on new CHECKCOMPOUND, ONLYINCOMPOUND and PSEUDOROOT features
- - i54633.*: capitalized suggestion test for Issue 54633 from OOo's Issuezilla
- - i35725.*: improved ngram suggestion test for Issue 35725
-
-2005-08-26 Németh László <nemethl@gyorsposta.hu>:
-improvements:
-
- * src/hunspell/suggestmgr.cxx:
- Unicode support in related character map suggestion
-
- * src/hunspell/suggestmgr.cxx: Unicode support in ngram suggestion
-
- * src/hunspell/{suggestmgr,affixmgr,hunspell}.cxx: improve ngram suggestion.
- Fix http://qa.openoffice.org/issues/show_bug.cgi?id=35725. See release
- notes for examples. This problem reported by beccablain at OOo.
- - ngram suggestions now are case insensitive (see `Permenant' bug in Issuezilla)
- - weight ngram suggestions (with the longest common subsequent algorithm,
- also considering lengths of bad word and suggestion, identical first
- letters and almost completely identical character positions)
- - set strict affix congruency in expand_rootword(). Now ngram suggestions
- are good for languages with rich morphology and also better for English.
- Rationale: affixed forms of the first ngram suggestion
- very often suppress the second and subsequent root word suggestions. But
- faults in affixes are more uncommon, and can be fix without suggestions.
- We must prefer the more informative second and subsequent root word
- suggestions instead of the suggestions for bad affixes.
- - a better suggestion may not be substring of a less good suggestion
- Rationale: Suggesting affixed forms of a root word is
- unnecessary, when root word has got better weighted ngram value.
- (Checking substrings is a good approximation for this refinement.)
- - lesser ngram suggestions (default 3 maximum instead of 10)
- Rationale: For users need a big extra effort to check a lot of bad ngram
- suggestions, nine times out of ten unnecessarily. It is very
- distracting, because ngram suggestions could be very different.
- Usually Myspell and Hunspell suggest one or two suggestions with
- the old suggestion algorithms (maximum is 15), with ngram algorithm
- often gives maximum number suggestions. With strict affix congruency
- and other refinements, the good suggestion there is usually among the
- first three elements.
- - new affix parameter: MAXNGRAMSUG
-
- * src/hunspell/*: support agglutinative languages with rich prefix
- morphology or with right-to-left writing system (for example, Turkic
- and Austronesian languages with (modified) Arabic scripts).
- - new affix parameter: COMPLEXPREFIXES
- Set twofold prefix stripping (but single suffix stripping)
- * src/hunspell/affixmgr.cxx:
- - speed up prefix loading with tree sorting algorithm.
- * tests/complexprefixes.*, tests/complexprefixesutf.*:
- Coptic example posted by Moheb Mekhaiel
-
- * src/hunspell/hashmgr.cxx: check size attribute in dic file
- suggested by Daniel Naber
- Rationale: With missing size attribute Hunspell allocates too small and
- more slower hash memory, and Hunspell can lose first dictionary word.
-
- * src/hunspell/affixmgr.cxx: check stripping characters and condition
- compatibility in affix rules (bugs detected in cs_CZ, es_ES, es_NEW,
- es_MX, lt_LT, nn_NO, pt_PT, ro_RO and sk_SK dictionaries). See release
- notes of Hunspell 1.0.9 in NEWS.
-
- * src/hunspell/affixmgr.cxx: check unnecessary fields in affix rules
- (bugs detected in ro_RO and sv_SE dictionaries). See release notes.
-
- * src/hunspell/affixmgr.cxx: remove redundant condition checking
- in affix rules with stripping characters (redundancy in OpenOffice.org
- dictionaries reported by Eleonóra Goldman)
- Rationale: this is a little optimization, but it was excellent for
- detect the bad ngram affixation with bad or weak affix conditions.
-
- * tests/germancompounding.aff: improve compound definition
- - use dash prefix instead of language specific tokenizer
- Rationale: Using uniform approach is the right way to check and analyze
- compound words. Language specific word breaking is deprecated, need
- a sophisticated grammar checking for word-like word pairs
- (for example in Hungarian there is a substandard, but accepted
- syntax with dash for word pairs: cats, dogs -> kutyák-macskák (like
- cats/dogs in English).
-
- * test Hunspell with 54 OpenOffice.org dictionaries: see release notes
-
-bug fixes:
-
- * src/hunspell/suggestmgr.*: add time limit to exponential
- algorithm of the related character map suggestion
- Rationale: a long word in agglutinative languages or a special pattern
- (for example a horizontal rule) made of map characters can `crash' the
- spell checker.
-
- * src/hunspell/affentry.cxx: add() functions: fix bad word generation
- checking stripping characters (see similar bug in unmunch)
-
- * src/hunspell/affixmgr.cxx: parse_file(): fix unconditional getNext()
- call for ~AffixMgr() when affix file is corrupt.
-
- * src/hunspell/affixmgr.*: AffixMgr(), parse_cpdsyllable(): fix missing
- string duplications for ~AffixMgr() when affix file is corrupt.
-
- * src/hunspell/affixmgr.*: parse_affix(): fix fprintf() call when affix
- file is corrupt. Bug reported by Daniel Naber.
-
- * suggestmgr.cxx: replace single usage of 'strdup' with 'mystrdup'
- patch by Chris Halls (debian.org)
-
- * src/hunspell/makefile.mk: add makefile.mk for compiling in OpenOffice.org
- See README in Hunspell UNO modul.
- Problems with separated compiling reported by Rene Engelhard
-
- * src/hunspell/hunspell.cxx: fix pseudoroot support
- - search a not pseudoroot homonym in check()
- * tests/pseudoroot4.*: test this fix
-
- * src/tools/unmunch.c: fix bad word generation when conditions
- are shorter or incompatible with stripping characters in affix rules
-
- * src/tools/unmunch.c: fix mychomp() for de_AT.dic and other dic files
- without last new line character.
-
-other changes:
- * src/hunspell/suggestmgr.*: erase ACCENT suggestion
- Rationale: ACCENT suggestion was the same as Kevin Hendrick's map
- suggestion algorithm, but with a less good interface in affix file.
-
- * src/hunspell/suggestmgr.*: combine cycle number limit
- in badchar(), and forgotchar() with a time limit.
-
- * src/hunspell/affixmgr.*: remove NOMAPSUGS affix parameter
-
- * src/hunspell/{suggestmgr,hunspell}.*: strip periods from
- suggestions (restore MySpell's original behaviour)
- Rationale: OpenOffice.org has an automatic period handling mechanism
- and suggestions look better without periods.
- - new affix file parameter: SUGSWITHDOTS
- Add period(s) to suggestions, if input word terminates in period(s).
- (No need for OpenOffice.org dictionaries.)
-
- * tests/germancompounding.aff: improve bad german affix in affix example
- (computeren->computern). Suggested by Daniel Naber.
-
- * src/tools/example.cxx: add Myspell's example
-
- * src/tools/munch.cxx: add Myspell's munch
-
- * man{,/hu}/hunspell.4: refresh manual pages
-
-2005-08-01 Németh László <nemethl@gyorsposta.hu>:
- * add missing MySpell files and features:
- - add MySpell license.readme, README and CONTRIBUTORS ({license,README,AUTHORS}.myspell)
- - add MySpell unmunch program (src/tools/unmunch.c)
- - add licenses to source (src/hunspell/license.{myspell,hunspell})
- - port MAP suggestion (with imperfect UTF-8 support)
- - add NOSPLITSUGS affix parameter
- - add NOMAPSUGS affix parameter
-
- * src/man/man.4: MAP, COMPOUNDPERMITFLAG, NOSPLITSUGS, NOMAPSUGS
-
- * src/hunspell/aff{entry,ixmgr}.cxx:
- - improve compound word support
- - new affix parameter: COMPOUNDPERMITFLAG (see manual)
- * src/tests/compoundaffix{,2}.*: examples for COMPOUNDPERMITFLAG
- * src/tests/germancompounding.*: new solution for German compounding
- Problems with German compounding reported by Daniel Naber
-
- * src/hunspell/hunspell.cxx: fix German uppercase word spelling
- with the spellsharps() recursive algorithm.
- Default recursive depth is 5 (MAXSHARPS).
- * src/tests/germansharps*: extended German sharp s tests
-
- * src/tools/hunspell.cxx: fix fatal memory bug in non-interactive
- subshells without HOME environmental variable
- Bug detected with PHP by András Izsók.
-
-2005-07-22 Németh László <nemethl@gyorsposta.hu>:
- * src/hunspell/csutil.hxx: utf16_u8()
- - fix 3-byte UTF-8 character conversion
-
-2005-07-21 Németh László <nemethl@gyorsposta.hu>:
- * src/hunspell/csutil.hxx: hunspell_version() for OOo UNO modul
-
-2005-07-19 Németh László <nemethl@gyorsposta.hu>:
- * renaming:
- - src/morphbase -> src/hunspell
- - src/hunspell, src/hunmorph -> src/tools
- - src/huntokens -> src/parsers
-
- * src/tools/hunstem.cxx: add stemmer example
-
-2005-07-18 Németh László <nemethl@gyorsposta.hu>:
- * configure.ac: --with-ui, --with-readline configure options
- * src/hunspell/hunspell.cxx: fix conditional compiling
-
- * src/hunspell/hunspell.cxx: set HunSPELL.bak temporaly file
- in the same dictionary with the checked file.
-
- * src/morphbase/morphbase.cxx:
-
- - handling German sharp s (ß)
-
- - fix (temporaly) analyize()
-
- * tests: a lot of new tests
-
- * po/, intl/, m4/: add gettext from GNU hello
-
- * po/hu.po: add Hungarian translation
-
- * doc/, man/: rename doc to man
-
-2005-07-04 Németh László <nemethl@gyorsposta.hu>:
- * src/morphbase/hashmgr.cxx: set FLAG attributum instead of FLAG_NUM and FLAG_LONG
-
- * doc/hunspell.4: manual in English
-
-2005-06-30 Németh László <nemethl@gyorsposta.hu>:
- * src/morphbase/csutil.cxx: add character tables from csutil.cxx of OOo 1.1.4
-
- * src/morphbase/affentry.cxx: fix Unicode condition checking
-
- * tests/{,utf}compound.*: tests compounding
-
-2005-06-27 Németh László <nemethl@gyorsposta.hu>:
- * src/morphbase/*: fix Unicode compound handling
-
-2005-06-23 Halácsy Péter:
- * src/hunmorph/hunmorph.cxx: delete spelling error message and suggest_auto() call
-
-2005-06-21 Németh László <nemethl@gyorsposta.hu>:
- * src/morphbase: Unicode support
- * tests/utf8.*: SET UTF-8 test
-
- * src/morphbase: checking and fixing with Valgrind
- Memory handling error reported by Ferenc Szidarovszky
-
-2005-05-26 Németh László <nemethl@gyorsposta.hu>:
- * suggestmgr.cxx: fix stemming
- * AUTHORS, COPYING, ChangeLog: set CC-LGPL free software license
-
-2004-05-25 Varga Dániel <daniel@all.hu>
- * src/stemtool: new subproject
-
-2005-05-25 Halácsy Péter <peter@halacsy.com>
- * AUTHORS, COPYING: set CC Attribution license
-
-2004-05-23 Varga Dániel <daniel@all.hu>
- * src: - modifications for compiling with Visual C++
-
- * src/hunmorph/csutil.cxx: correcting header of flag_qsort(),
- * src/hunmorph/*: correct csutil include
-
-2005-05-19 Németh László <nemethl@gyorsposta.hu>
- * csutil.cxx: fix loop condition in lineuniq()
- bug reported by Viktor Nagy (nagyv nyelvtud hu).
-
- * morphbase.cxx: handle PSEUDOROOT with zero affixes
- bug reported by Viktor Nagy (nagyv nyelvtud hu).
- * tests/zeroaffix.*: add zeroaffix tests
-
-2005-04-09 Németh László <nemethl@gyorsposta.hu>
- * config.h.in: reset with autoheader
-
- * src/hunspell/hunspell.cxx: set version
-
-2005-04-06 Németh László <nemethl@gyorsposta.hu>
- * tests: tests
-
- * src/morphbase:
- New optional parameters in affix file:
- - PSEUDOROOT: for forbidding root with not forbidden suffixed forms.
- - COMPOUNDWORDMAX: max. words in compounds (default is no limit)
- - COMPOUNDROOT: signs compounds in dictionary for handling special compound rules
- - remove COMPOUNDWORD, ONLYROOT
-
-2005-03-21 Németh László <nemethl@gyorsposta.hu>
- * src/morphbase/*:
- - 2-byte flags, FLAG_NUM, FLAG_LONG
- - CIRCUMFIX: signed suffixes and prefixes can only occur together
- - ONLYINCOMPOUND for fogemorpheme (Swedish, Danish) or Flute-elements (German)
- - COMPOUNDBEGIN: allow signed roots, and roots with signed suffix in begin of compounds
- - COMPOUNDMIDDLE: like before, but middle of compounds
- - COMPOUNDEND: like before, but end of compounds
- - remove COMPOUNDFIRST, COMPOUNDLAST
diff --git a/libs/hunspell/docs/ChangeLog.O b/libs/hunspell/docs/ChangeLog.O
deleted file mode 100644
index a2c712d73b..0000000000
--- a/libs/hunspell/docs/ChangeLog.O
+++ /dev/null
@@ -1,524 +0,0 @@
-Myspell has a lot of parallel development, that is not documented here.
-
-2005-01-11: Németh László <nemethl@gyorsposta.hu>
- * hunspell.cxx:
- - interaktív javításnál hiányzó új sor karakterek pótlása.
- A hibát Gefferth András és Khiraly jelezte.
- * csutil.cxx:
- - pontosvesszõk törlése a GCC 3.4-es fordító igényeinek megfelelõen
- A hibát Dvornik László jelezte.
- - i változó ismételt deklarásának törlése, ami helyenként hibás
- fordítást eredményez.
- A hibát Lódoktor és Bencsáth Boldizsár jelezte.
- * OLVASS.EL:
- - Windows alatti fordításnál Langid.cxx módosítandó. A hibát
- Lódoktor jelezte.
-
-2004-12-15 Németh László <nemethl@gyorsposta.hu>
- * src/morphbase/*:
- - handling K&R morphological encoding (remove plus signs from output)
- - LEMMA_PRESENT: put only morphological description to output
- - LANG parameter, langnum variable in source for writing language-dependent codes
- - remove HU_KOTOHANGZO
- - etc.
- * doc/hunspell.4:
- - adding some
-
-2004-09-29 Halácsy Péter <peter@halacsy.com>
-
- * doc/ : bemásoltam a hunspell.1 hunspell.4 man oldalakat
- * doc/hunspell.1: Kivettem a -s -m kapcsolókról szóló részt
-
-2004-09-28 Halácsy Péter <peter@halacsy.com>
-
- * src/hunspell/hunspell.cxx (indexing_interface): Ezt kiszedtem a
- HunSpell-bol, mert nem ide valo. Ez egy kulon program lehet.
- (main): a hunstem üzemmódot is kidobtam, ez se ide való
- (main): meg a hunmorph üzemmódot is
-
- * src/morphbase/morphbase.cxx (MorphBase): Átneveztem a MySpell
- osztályt MorphBase-re
- (stems): Átnevezten a suggest_stems metódust stem -re (mint to stem)
-
-2004-08-25 Németh László <nemethl@gyorsposta.hu>
- * src/hunbase/suggestmgr.cxx: tövezés visszaállítása, nem
- mûködik még az igekötõk hozzátoldása a tõhöz, továbbá a
- kivételek kezelése (ehhez a 0.99.4-es szótár szükséges még).
- * src/hunbase/myspell.cxx: -s vissza a tövezéshez
- * src/hunbase/atypes.hxx: HUNSTEM makró definiálása itt az
- affixmgr.cxx feltételes kódjához
-
-2004-08-12 Halacsy Peter
- * src/misc/lexfilter.cxx : uj program, ami a szotar szureshez hasznalhato
- lecserelheti a mostani hunmorph, hunspell -G -1 funkciokat
-
- * src/hunbase/myspell.cxx (analyzer) : Uj metodust vettem fel, ami mar
- karaktertombben adja vissza az elemzes eredmenyet
-
-2004-08-03 Halácsy Péter <peter@halacsy.com>
-
- * src/hunspell/hunspell.cxx (HUNSPELL_VERSION): Áttettem ide ennek definiálását
-
-2004-07-31 Halácsy Péter <peter@halacsy.com>
-
- * src/hunbase/suggestmgr.cxx (fixstems): A fixstems miért itt van
- és miért így hívják. Ez mehetne egy külön osztályba.
-
-2004-07-31 Halácsy Péter <peter@halacsy.com>
-
- * src/huntoken/htmlparser.cxx: Egyebkent az include-ok kezelese
- eleg zavaros. Peldaul itt minek a textparser.hxx includolasa?
-
- * src/huntoken/textparser.hxx (MAXLNLEN): Áthoztam ide a MAXLNLEN makrót
- az atypes.hxx-bol, hogy a fuggoseget megszuntessem
-
- * src/hunbase/myspell.cxx (suggest): Kivettem azt a részt, ami visszaadja a HUNSPELL_VERSION stringet
- ha a VERSION_KEYWORD a bemeneti string. Csúnya gányolásnak tartottam
-
-2004-07-27 Halácsy Péter <peter@halacsy.com>
-
- * src/hunbase/myspell.cxx (morph_with_correction):
-
- * src/hunbase/baseaffix.hxx (class AffEntry): Allandora felvettem a morphcode mezot (last htypes.hxx)
-
- * src/hunbase/affentry.hxx: Kivettem a hunmorph felteteleket (last htypes.hxx)
-
- * src/hunbase/htypes.hxx (struct hentry): Kivettem a HUNMORPH feltetelt a char* description korul. Ertem,
- hogy hatekonyabb egy folosleges mutato nelkul, ha nincs morf info, de szerintem felesleges
-
- * src/hunbase/myspell.hxx: HUNSPELL_VERSION es VERSION_KEYWORD makrokat kivettem. Valamiert a
- hunspellnek kell majd
-
- * src/hunbase/config.hxx (FLAG): config.hxx torolve, helyet atveszi a kozponti config.h; FLAG
- definicioja az atypes.hxx-be ment
-
- * src/hunbase/atypes.hxx (FLAG): config.hxx megszuntetese erdekeben attettem ide a FLAG makro
- definialasat, ami az EXT_CLASS-tol fugg
-
- config.hxx include kicserelve a configure altal kezelt config.h-ra
-
-2004-06-29: Németh László <nemethl@gyorsposta.hu>
- * affixmgr.cxx:
- - csak utolsó tagként megengedett szavak (compound3) toldalék
- nélküli elõfordulásának engedélyezése (pl. macskapár)
- - többszörösen összetett szavak toldalékolt alakjainak morfológiai
- elemzése
- * myspell.cxx:
- - rövidítések, számok, kötõjeles összetett szavak és a
- -e határozószót tartalmazó szavak morfológiai elemzése
- * suggestmgr.cxx: suggest_morph_for_spelling_error() optimalizálása
- (csak a felhasznált egy javaslatot keresi meg, többet nem).
- * csutil.cxx: kimenetben szereplõ üres sorok törlése
-
-2004-06-10: Németh László <nemethl@gyorsposta.hu>
- * suggestmgr.cxx: összetett szavak elemzésének korlátozása
- - a tövezés még nincs megvalósítva a 0.9.9-es változatban
- (helyette a Hunspell 0.9.7 használandó a Magyar Ispell 0.99.4-es
- változatával)
-
-2004-05-19: Németh László <nemethl@gyorsposta.hu>
- * 0.9.9f-alpha
-
- - morf. leírás sztringkezelése jav.
- - EXT_CLASS: config.cxx-ben
- - nagybetûs alakok is elemezve (a hibát Tron Viktor jelezte)
- - szebb kimenet
- - rule119 törölve
- - firstparser.cxx javítva
-
-2004-02-13: Németh László <nemethl@gyorsposta.hu>
- * 0.9.8a:
- - MAXUSERWORD helyett USERWORD, nincs korlát
- - description \t-vel dic fájlba
- - homonimák kezelése
- - aff formátumbõvítés
- - konfixumok
- - _morpho függvények
- - kettõs szuffixum
- - hunmorph
- - lásd tests/hunmorph
-
-2004-01-29: Németh László <nemethl@gyorsposta.hu>
- * 0.9.7-sztaki:
- - memóriakezelési hibák javítása
-
-2003-12-17: Németh László <nemethl@gyorsposta.hu>
- * 0.9.7-es változat:
- * affixmgr.cxx:
- - suffix_check() javítás (tmpword kiváltása isRevSubSet()
- függvénnyel
- - betöltés optimalizálása, build_pfxlist() helyett:
- - build_pfxtree()
- - process_sfx_tree_to_list(), process_sfx_inorder()
-
- * csutil.cxx:
- - isSubSet() gyorsabb változata
- - isRevSubSet()
-
- * langid.cxx, hunp.cxx:
- - nyelvfelismerõ osztály és program (l. man hunp)
- * man/hunp.1:
- - nyelvfelismerõ program leírása
-
- * firstparser.cxx:
- - csak a tabulátorjelet tartalmazó sorokból a tabulátorjel
- elõtti részt adja vissza (l. man Hunspell, -1 kapcsoló)
-
- * hunspell.cxx:
- - -u, -U, -u2 kapcsolók: tipikus hibák kijelzése;
- automatikus, illetve lektorált javítása. L. man hunspell.
-
- - -w kapcsoló teljes sor vizsgálatához
-
- * hunspell.cxx:
- - spell(): javítás (Valgrind hibajelzés alapján)
-
- * hunspell.cxx: sprintf()-ek elé strlen() feltételvizsgálat
-
- * suggestmgr.cxx:
- - 0.99.4-es Hunspell szótárral bekerült tövezési hiba
- javítása (nem produktív ragozású, összetett szóbam szereplõ
- fõneveknél lépett fel ez a probléma).
-
- * OLVASS.EL:
- - bõvítés
-
-2003-11-03: Németh László <nemethl@gyorsposta.hu>
- * SuggestMgr::permute_accent():
- - illegális memóriaolvasási hiba javítása.
- * example.cxx::
- - dupla free() a "" karakterlánc tövezése után
-
- A hibákat Sarlós Tamás <stamas@csillag.ilab.sztaki.hu>
- fedezte fel a figyelemre méltó Valgrind nyomkövetõ
- programmal (http://developer.kde.org/~sewardj/)
-
-2003-10-22: Bencsáth Boldizsár <boldi@datacontact.hu>
- * affixmgr.[ch]xx, csutil.[ch]xx: Az eredeti
- MySpell foltjainak alkalmazása az OpenOffice.org 1.1
- kompatibilitás érdekében. Itt karakterkezelõ
- segédfüggvények lettek áthelyezve elérhetõbb helyre.
-
- * dictmgr.[ch]xx: Itt etype paraméter hozzáadása.
-
- * makefile.mk: Itt angol szótárak megjegyzésbe tétele.
-
-2003-10-04: Németh László <nemethl@gyorsposta.hu>
- * 0.9.6.3-as változat:
- * myspell.cxx: suggest() függvényben hibás
- memóriafoglalás javítása. A hiba a pontra végzõdõ
- helytelen szavakra adott javaslattevés során
- jelentkezett. A hibás mûködést Khiraly
- <khiraly@gmx.net> jelezte.
-
-2003-09-15: Németh László <nemethl@gyorsposta.hu>
- * 0.9.6.2-es változat:
- * latexparser.cxx: TeX elemzõ javítása:
- - elemzési hiba ({{}}})
- - verb+ +, \verb stb. kezelése
-
-2003-09-01: Németh László <nemethl@gyorsposta.hu>
- * 0.9.6-os változat:
-
- * affentry.cxx: check2 törlése, lehetséges
- tövek tárolása
- * suggestmgr.cxx, myspell.cxx: suggest_pos_stems()
- az ismeretlen szavak névszóragjainak és
- jeleinek leválasztására.
-
- * affixmgr.cxx, suggestmgr.cxx: suggest_stems()
- szálkezeléshez módosított és javított függvény
-
- * myspell.cxx: számok tövezése (teszt: 5-nek)
-
- * myspell.cxx: egy karakter + szó javaslatok
- törlése (például cápak->cápa k)
-
- * affixmgr.cxx, myspell.cxx, hunspell.cxx: szótár
- verziószámának kiírása
-
- * hunspell.cxx: \r karaktert tartalmazó sorok
- helyes megjelenítése
-
- * myspell.cxx, hunspell.cxx: rövidítés végi pontok
- hozzáadása függvénykönyvtár szinten
-
- * hunspell.cxx: pipe_interface(): standard bemenet
- tövezésénél hiányzó memóriafelszabadítás pótlása
-
- * Makefile: install javítása, több feltételvizsgálat
- deinstall szakasz
-
-2003-07-22: Németh László <nemethl@gyorsposta.hu>
- * 0.9.5-ös változat
- * suggestmgr.cxx: marhalevél->lelevél tövezés javítása
- * myspell.cxx: nagy kezdõbetûs rövidítések vizsgálata (Bp., Btk.)
- - pontot tartalmazó számok helyesnek való elfogadása, ha:
- - az elsõ pontot legalább egy,
- - de legfeljebb három számjegy elõzi meg,
- - a pontok nem egymás mellett helyezkednek el,
- - az utolsó pont után legfeljebb két számjegy van.
- Ezzel elfogadjuk az idõpontokat (12.00-kor), a pontozásokat
- (1.1.2-ben), de kizárjuk a szóköz nélküli hibás dátummegadásokat
- (2003.7.22.), valamint a tizedesvesszõ helyett ponttal írt
- tizedestörteket (3.456, 4563.34).
- - Javítás a tiltott szavakra adott kötõjeles javaslatoknál:
- Straussal->Strauss-szal, és nem ,,Strauss szal''.
- * hunspell.cxx: csak a -a kapcsoló megadásával élnek a
- csõfelületi parancsok. Ezért most már nincsenek figyelmen
- kívül hagyva például a kötõjellel kezdõdõ sorok, ha a -l
- kapcsolóval hibás szavakat keresünk egy állományban.
- * man/hunspell.1: a -a kapcsoló leírásának kiegészítése.
-
-2003-06-13: Németh László <nemethl@gyorsposta.hu>
- * 0.9.4-es változat
- * bin/*: makedb, lookdb segédprogramok az indexeléshez
- * man/*: hunstem, makedb, lookdb
- * hunspell.cxx: pipe_interface: nyomkövetõ kiírás törlése
- - LOG #ifdef-be
-
-2003-06-11: Németh László <nemethl@gyorsposta.hu>
- * 0.9.3-es változat
- * suggestmgr.cxx: nagybetûs javaslat tulajdonneveknél
- * hunspell.cxx: pipe_interface: hiba javítása
-
-2003-06-05: Németh László <nemethl@gyorsposta.hu>
- * 0.9.2-es változat
- * hunspell.cxx: -s kapcsoló
- * suggestmgr.cxx: suggest_stems()
- Szótövek elõállítása
- * example.cxx: példa a szótövek elõállítására
-
-2003-05-13: Németh László <nemethl@gyorsposta.hu>
- * 0.9.1-es változat
- * hunspell.cxx:
- - rl_escape(), stb.: a readline sorban ki lett kapcsolva
- a fájlnév-kiegészítés, és helyette a két Escape lenyomás
- megszakítja a szövegbevitelt. A Csere mûveletnél is a
- readline() hívás található most már.
- - egy hibás sprintf() sor javítva lett
- * Makefile.unix:
- - beállítások elkülönítve az állomány elején
- - Makefile most már szimbólikus kötés
- * ooomagyarispellteszt.txt: tesztállomány
-
-2003-04-28: Németh László <nemethl@gyorsposta.hu>
- * affixmgr.cxx:
- - y végû szavak kezelése: bõvebb leírás a
- Magyar Ispell Changelog állományában.
-
- * *parser.cxx:
- ISO-8859-1 HTML karakterentitások közül a betûértékûek
- (csak az ISO-8859-2-ben nem szereplõk) felismerése
- és kezelése.
-
-2003-04-21: Goldman Elenonóra <eleonora46@gmx.net>
- * *.dll függvénykönyvtár elõállítása Windows alatt:
- - StdAfx.h
- - libmyspell.def
- - dlltest.cpp
-
-2003-04-16: Németh László <nemethl@gyorsposta.hu>
- * Hunspell.cxx, stb: a Mispell átnevezése Hunspell-lé.
- A nevet Kornai András <andras@kornai.com> javasolta.
- Könyvtárak: /usr/share/mispell -> /usr/share/myspell
- (korábban is ez volt).
- A /usr/share/hunmorph szótár a helye a speciális
- morfológiai információkat tartalmazó Hunmorph (bõvített
- Myspell szótárformátumú) szótárállományoknak.
- * Licenc: LGPL
- * config.hxx: SZOSZABLYA_POSSIBLE_ROOTS
- Ha a makrót bekapcsoljuk, akkor kiírásra kerülnek
- a lehetséges tövek is, az alkalmazott ragozási szabály
- osztályának betûjelével, illetve az alapszóval együtt.
-
-2003-04-10: Németh László <nemethl@gyorsposta.hu>:
- * affixmgr.cxx:
- - kötõhangzók helyes kezelése (hu_kotohangzo kapcsolóval),
- l. még Magyar Ispell Changelog
-
-2003-03-24: Németh László <nemethl@gyorsposta.hu>
- * mispell.cxx: pipe_interface(): az adatfájl szûrésnél fellépõ
- memóriaszivárgás megszüntetése a kimaradt free(token) pótlásával
- * affixmgr.cxx: prefix_check(): leg-, legesleg- confixum ellenõrzés
- - onlyroot kapcsoló a csak tõszót érintõ tiltáshoz. L. Magyar Ispell
- Az affixum állományban új kapcsolót adhatunk meg az
- ONLYROOT paranccsal bevezetve. A kapcsoló módosítja a tiltókapcsoló
- mûködését. L. man 4 mispell
- * myspell.cxx:
- - spell(): nagybetûs tulajdonnevek ellenõrzése (pl. BALATON)
- - onlyroot vizsgálat forbiddenword mellett -> mangrove kezelése
-
-2003-03-17: Goldman Elenonóra <eleonora46@gmx.net>
- * Windows port
- * makefile.Windows:
-
-2003-03-04: Németh László <nemethl@gyorsposta.hu>
- * firstparser.[ch]xx: adatfájlok szûréséhez (l. -1 kapcsoló)
- * mispell.cxx: -L, -1, -G kapcsolók
- * man/mispell.1: -L, -1, -G kapcsolók
-
-2003-03-03: Németh László <nemethl@gyorsposta.hu>
- * mispell.cxx: -l, -p, WORDLIST
- * man/mispell.1: -l, -p, WORDLIST
-
-2003-02-26: Németh László <nemethl@gyorsposta.hu>
- * mispell.cxx: dialog_screen():
- TILTOTT! (FORBIDDEN!) megjelenítése a tiltott szóösszetételek
- esetén.
- * suggestmgr.cxx:
- - check(): -ó, -õ képzõs igeneveket érintõ kód törlése
- - check_forbidden(): a 6 szótagnál hosszabb, tiltott szótövekre
- vonatkozó javaslatok nem kötõjellel, hanem szóközzel elválasztva
- tartalmazzák a szavakat, ehhez szükséges a check_forbidden().
- * man/*: új kézikönyv oldal az állományok formátumáról (mispell(4)),
- a mispell(1) bõvítése.
- * Makefile, mispell.mo: Bíró Árpád <biro_arpad@yahoo.com> javításai
-
-2003-02-18: Németh László <nemethl@gyorsposta.hu>
- * mispell.cxx: interactive_interface()
- - nem nyeli el a MAXLNLEN-t meghaladó méretû sorokban a MAXLNLEN
- méretû részek határán lévõ karaktereket, és a nem újsor karakterre
- végzõdõ állományok utolsó karakterét. (Hibát viszont még mindig
- jelez, ha a MAXLNLEN határ feldarabol egy amúgy helyes szót.)
- A MAXLNLEN 8192 karakter jelenleg.
- - readline függvénykönyvtár használata a bevitelnél
- - tõfelvételnél egy lehetséges tõ elõállítása, és a beviteli
- sorban való feltüntetése. Az így megjelenõ szó javítható.
- - --help kapcsoló
- * Makefile: Javítások az install szakaszban.
- A hibákat Bíró Árpád <biro_arpad@yahoo.com> jelezte.
-
-2003-02-07: Németh László <nemethl@gyorsposta.hu>
- * mispell.cxx: put_dots_to_suggestions()
- - realloc() cseréje malloc()-ra ismeretlen eredetû lefagyás miatt.
- - lehetséges az Ispellhez hasonlóan a kapcsolókat kézzel megadni a
- saját szótárban a szavak után egy perjelet követõen: például a
- valamicsúnyaszó/w
- sor megadása után a valamicsúnyaszó és toldalékolt változatai hibásak
- lesznek az ellenõrzés alatt. (További kapcsolók leírásáért lásd a
- Magyar Ispell forrásában az aff/aff.fej állományt.)
- * affixmgr.cxx: compound_check()
- - repl_chars() hívása a megfelelõ helyre lett téve, ezzel a
- javaslattevés sebessége kétszeresére nõtt.
- - A dinamikus memóriakezelés lecserelése veremmemóriára nem járt
- lényeges sebességnövekedéssel, de a közeljövõben ezzel elkerülhetõ
- az a memóriaszivárgás, ami például itt a tiltott szavak kezelésénél
- volt az elõzõ változatban (javítva).
- * affentry.cxx, affixmgr.cxx: szótõ-elõállító kód megalapozása:
- get_possible_root() metódus az utolsó toldalék-leválasztás
- eredményével tér vissza.
-
-2003-02-05: Németh László <nemethl@gyorsposta.hu>
- * mispell.cxx: put_dots_to_suggestions(): amennyiben
- a felismert szó pontra, vagy pontokra végzõdik, a
- javaslatokat is bõvíti ezzel.
- - @, valamint 1-nél több pontot magába foglaló (de nem arra végzõdõ)
- szavak ellenõrzésének tiltása (e-mail, fájlnevek, még nem opcionális).
- - Hosszú sorok helyes megjelenítése.
- - Tabulátorjelet tartalmazó sorok helyes megjelenítése.
- - Mozaikszavak tõfelvételénél kötõjeles alak automatikus rögzítése
- Pl.: BKV//URH mellett BKV-//URH- is bekerül a saját szótárba
- (a ragozott mozaikszavak felismerése tehát automatikus lesz, kivéve a
- nem triviális -val/-vel toldalékos alakoké, amit külön kell felvenni.)
- - PuT törlése (helyette MySpell::put_word(), put_word_suffix(),
- put_word_pattern() eljárások a saját szótár bõvítésére)
- - dupla szavak ellenõrzésének törlése a MySpell kódból (áthelyezés majd a
- Mispell felületbe), hogy a MySpell meghívható maradjon párhuzamosan
- futó szálakból.
-
-2002-12-30: Németh László <nemethl@gyorsposta.hu>
- * *parser.cxx, *parser.hxx: elemzõ osztályok a régi és csúnya kód helyett
-
-2002-12-10: Németh László <nemethl@gyorsposta.hu>
- * myspell.cxx: 35°-os, 20%-kal kezelése
- * man/mispell.1: kézikönyv
-
-2002-12-04: Noll János <johnzero@johnzero.hu>
- * spdaemon/: kiszolgáló felület, ld. README.spdaemon
-
-2002-12-04: Németh László <nemethl@gyorsposta.hu>
- * mispell.cxx: Emacs kompatibilitáshoz hibák javítása (pl. többszörös -d)
- * mispell.cxx: CURSES makróval kikapcsolható az interaktív felület + locale
- (Windows, Macintosh)
-
-2002-11-30: Németh László <nemethl@gyorsposta.hu>
- * affixmgr.cxx: get_checkdoublewords()
-
-2002-11-25: Németh László <nemethl@gyorsposta.hu>
- * affixmgr.cxx: mozgószabály (hu_mov_rule)
- * myspell.cxx: mozgószabály
- * affixmgr.cxx: kiötlõjénekmacskát (affix is összetettben, ha prefix)
-
-2002-11-08 Németh László <nemethl@gyorsposta.hu>
- * myspell.cxx: balatonnak->Balatonnak, balatoninak
-
-2002-11-07 Németh László <nemethl@gyorsposta.hu>
- * myspell: 0.6-os változat
-
-2002-10-31 Németh László <nemethl@gyorsposta.hu>
- * Egyszerûbb név: Magyar MySpell 0.5 után -> MIspell 0.6
- * mispell.cxx: többnyelvû interaktív felület (ncurses, locale)
- * Makefile: make install
-
-2002-09-22 Németh László <nemethl@gyorsposta.hu>
- * affixmgr.cxx: compound_check() macskaugom->macskaugrom, stb. javítása
- * affixmgr.cxx: compound_check() szóismétlés (pl. macskamacska) tiltása
- * myspell.cxx: szóismétlõdés tiltása (pl. kutya kutya) második rossz
- * suggestmgr.cxx: macskaírat->macska írat mellett ->macskairat
-
-2002-07-29 Németh László <nemethl@gyorsposta.hu>
- * mispell Windowsra, teszt Emacs-szel (vagy Emacs-csal)
- * tiltott szavakat nem javasol, és összetett szóban sem fogad el
- * fonev_morfo, fonev_morfo2 álszótövek elutasítása (házakmacska)
- * kötõjeles szavak kezelése
- * számok kezelése, kötõjeles alakjaikkal együtt, CHECKNUM kapcsoló
-
-2002-07-17 Németh László <nemethl@gyorsposta.hu>
- * mispell.cxx: MySpell Ispell csõ interfész
-
-2002-07-04 Németh László <nemethl@gyorsposta.hu>
- * mispell.cxx: MySpell Ispell csõ interfész
- * affxmgr.cxx: szszerû kiszûrése,
- * új funkciók:
- COMPOUNDFIRST: szó szerepelhet elsõ tagként a szóöszetételekben
- COMPOUNDLAST: szó szerepelhet utolsó tagként a szóöszetételekben
- FORBIDDENWORD: tiltott szavak kapcsolója (utú, uta, stb.)
-
-2002-06-25 Németh László <nemethl@gyorsposta.hu>
- * myspell.cxx, suggestmgr.cxx: get_compound() char* helyett char
- * affxmgr.cxx: check_repl() a helyesnek tûnõ, de hibás összetett
- szavak kiszûrésére (pl. tejles, szervíz)
- A szóösszetétel elfogadása elõtt még megnézzük, hogy a szó
- nem-e a cseretáblázatban felvett hibát tartalmaz,
- ha igen, akkor a szó hibásnak minõsül, hiába helyes szóösszetétel.
- * affxmgr.cxx, suggestmgr.xx: accent: ékezetesítõ.
- Leírás: README.accent
- További optimalizáció: az ékezet nélküli betû ékezetes
- változatai számának függvényében
-
-2002-06-05 Noll János <johnzero@johnzero.hu>
- * myspell.cxx, suggestmgr.cxx: mem. szivárgás javítása
- (a get_compound() felszabadítás nélkül lett meghíva).
- A hiba a GNU mtrace segítségével lett detektálva.
-
-2002-06-03 Németh László <nemethl@gyorsposta.hu>
- * Licenc: GPL
- * Lásd MYSPELL.HU
- * compound_check: 6-3 szabály, stb.
-
-MySpell:
-
-2002-xx-xx Kevin Hendricks <kevin.hendricks@sympatico.ca>
- * REP: ismétlések kiszûrése a javaslatokból
- * COMPOUNDMIN
-
-2002-xx-xx Németh László <nemethl@gyorsposta.hu>
- * REP cseretáblázat
- * COMPOUND, szóösszetételképzés
-
-2002-xx-xx David Einstein <Deinst@world.std.com>
- * optimalizált MySpell algoritmus
-
-2001-xx-xx Kevin Hendricks <kevin.hendricks@sympatico.ca>
- * Mûködõ ellenõrzõ, Ispell toldaléktömörítési algoritmussal
diff --git a/libs/hunspell/docs/HACKING b/libs/hunspell/docs/HACKING
deleted file mode 100644
index e65da70e10..0000000000
--- a/libs/hunspell/docs/HACKING
+++ /dev/null
@@ -1,10 +0,0 @@
-To bump a release
-
-1. edit...
- a) ./configure.ac
- b) ./msvc/Hunspell.rc
- c) ./msvc/config.h
-and convert release string X.Y.Z/X,Y,Z to the next version
-
-2. autoconf && ./configure && make
-and the various strings will get updated by the build tooling
diff --git a/libs/hunspell/docs/INSTALL b/libs/hunspell/docs/INSTALL
deleted file mode 100644
index 2099840756..0000000000
--- a/libs/hunspell/docs/INSTALL
+++ /dev/null
@@ -1,370 +0,0 @@
-Installation Instructions
-*************************
-
-Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
-Inc.
-
- Copying and distribution of this file, with or without modification,
-are permitted in any medium without royalty provided the copyright
-notice and this notice are preserved. This file is offered as-is,
-without warranty of any kind.
-
-Basic Installation
-==================
-
- Briefly, the shell command `./configure && make && make install'
-should configure, build, and install this package. The following
-more-detailed instructions are generic; see the `README' file for
-instructions specific to this package. Some packages provide this
-`INSTALL' file but do not implement all of the features documented
-below. The lack of an optional feature in a given package is not
-necessarily a bug. More recommendations for GNU packages can be found
-in *note Makefile Conventions: (standards)Makefile Conventions.
-
- The `configure' shell script attempts to guess correct values for
-various system-dependent variables used during compilation. It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions. Finally, it creates a shell script `config.status' that
-you can run in the future to recreate the current configuration, and a
-file `config.log' containing compiler output (useful mainly for
-debugging `configure').
-
- It can also use an optional file (typically called `config.cache'
-and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring. Caching is
-disabled by default to prevent problems with accidental use of stale
-cache files.
-
- If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README' so they can
-be considered for the next release. If you are using the cache, and at
-some point `config.cache' contains results you don't want to keep, you
-may remove or edit it.
-
- The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'. You need `configure.ac' if
-you want to change it or regenerate `configure' using a newer version
-of `autoconf'.
-
- The simplest way to compile this package is:
-
- 1. `cd' to the directory containing the package's source code and type
- `./configure' to configure the package for your system.
-
- Running `configure' might take a while. While running, it prints
- some messages telling which features it is checking for.
-
- 2. Type `make' to compile the package.
-
- 3. Optionally, type `make check' to run any self-tests that come with
- the package, generally using the just-built uninstalled binaries.
-
- 4. Type `make install' to install the programs and any data files and
- documentation. When installing into a prefix owned by root, it is
- recommended that the package be configured and built as a regular
- user, and only the `make install' phase executed with root
- privileges.
-
- 5. Optionally, type `make installcheck' to repeat any self-tests, but
- this time using the binaries in their final installed location.
- This target does not install anything. Running this target as a
- regular user, particularly if the prior `make install' required
- root privileges, verifies that the installation completed
- correctly.
-
- 6. You can remove the program binaries and object files from the
- source code directory by typing `make clean'. To also remove the
- files that `configure' created (so you can compile the package for
- a different kind of computer), type `make distclean'. There is
- also a `make maintainer-clean' target, but that is intended mainly
- for the package's developers. If you use it, you may have to get
- all sorts of other programs in order to regenerate files that came
- with the distribution.
-
- 7. Often, you can also type `make uninstall' to remove the installed
- files again. In practice, not all packages have tested that
- uninstallation works correctly, even though it is required by the
- GNU Coding Standards.
-
- 8. Some packages, particularly those that use Automake, provide `make
- distcheck', which can by used by developers to test that all other
- targets like `make install' and `make uninstall' work correctly.
- This target is generally not run by end users.
-
-Compilers and Options
-=====================
-
- Some systems require unusual options for compilation or linking that
-the `configure' script does not know about. Run `./configure --help'
-for details on some of the pertinent environment variables.
-
- You can give `configure' initial values for configuration parameters
-by setting variables in the command line or in the environment. Here
-is an example:
-
- ./configure CC=c99 CFLAGS=-g LIBS=-lposix
-
- *Note Defining Variables::, for more details.
-
-Compiling For Multiple Architectures
-====================================
-
- You can compile the package for more than one kind of computer at the
-same time, by placing the object files for each architecture in their
-own directory. To do this, you can use GNU `make'. `cd' to the
-directory where you want the object files and executables to go and run
-the `configure' script. `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'. This
-is known as a "VPATH" build.
-
- With a non-GNU `make', it is safer to compile the package for one
-architecture at a time in the source code directory. After you have
-installed the package for one architecture, use `make distclean' before
-reconfiguring for another architecture.
-
- On MacOS X 10.5 and later systems, you can create libraries and
-executables that work on multiple system types--known as "fat" or
-"universal" binaries--by specifying multiple `-arch' options to the
-compiler but only a single `-arch' option to the preprocessor. Like
-this:
-
- ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
- CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
- CPP="gcc -E" CXXCPP="g++ -E"
-
- This is not guaranteed to produce working output in all cases, you
-may have to build one architecture at a time and combine the results
-using the `lipo' tool if you have problems.
-
-Installation Names
-==================
-
- By default, `make install' installs the package's commands under
-`/usr/local/bin', include files under `/usr/local/include', etc. You
-can specify an installation prefix other than `/usr/local' by giving
-`configure' the option `--prefix=PREFIX', where PREFIX must be an
-absolute file name.
-
- You can specify separate installation prefixes for
-architecture-specific files and architecture-independent files. If you
-pass the option `--exec-prefix=PREFIX' to `configure', the package uses
-PREFIX as the prefix for installing programs and libraries.
-Documentation and other data files still use the regular prefix.
-
- In addition, if you use an unusual directory layout you can give
-options like `--bindir=DIR' to specify different values for particular
-kinds of files. Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them. In general, the
-default for these options is expressed in terms of `${prefix}', so that
-specifying just `--prefix' will affect all of the other directory
-specifications that were not explicitly provided.
-
- The most portable way to affect installation locations is to pass the
-correct locations to `configure'; however, many packages provide one or
-both of the following shortcuts of passing variable assignments to the
-`make install' command line to change installation locations without
-having to reconfigure or recompile.
-
- The first method involves providing an override variable for each
-affected directory. For example, `make install
-prefix=/alternate/directory' will choose an alternate location for all
-directory configuration variables that were expressed in terms of
-`${prefix}'. Any directories that were specified during `configure',
-but not in terms of `${prefix}', must each be overridden at install
-time for the entire installation to be relocated. The approach of
-makefile variable overrides for each directory variable is required by
-the GNU Coding Standards, and ideally causes no recompilation.
-However, some platforms have known limitations with the semantics of
-shared libraries that end up requiring recompilation when using this
-method, particularly noticeable in packages that use GNU Libtool.
-
- The second method involves providing the `DESTDIR' variable. For
-example, `make install DESTDIR=/alternate/directory' will prepend
-`/alternate/directory' before all installation names. The approach of
-`DESTDIR' overrides is not required by the GNU Coding Standards, and
-does not work on platforms that have drive letters. On the other hand,
-it does better at avoiding recompilation issues, and works well even
-when some directory options were not specified in terms of `${prefix}'
-at `configure' time.
-
-Optional Features
-=================
-
- If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving `configure' the
-option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
-
- Some packages pay attention to `--enable-FEATURE' options to
-`configure', where FEATURE indicates an optional part of the package.
-They may also pay attention to `--with-PACKAGE' options, where PACKAGE
-is something like `gnu-as' or `x' (for the X Window System). The
-`README' should mention any `--enable-' and `--with-' options that the
-package recognizes.
-
- For packages that use the X Window System, `configure' can usually
-find the X include and library files automatically, but if it doesn't,
-you can use the `configure' options `--x-includes=DIR' and
-`--x-libraries=DIR' to specify their locations.
-
- Some packages offer the ability to configure how verbose the
-execution of `make' will be. For these packages, running `./configure
---enable-silent-rules' sets the default to minimal output, which can be
-overridden with `make V=1'; while running `./configure
---disable-silent-rules' sets the default to verbose, which can be
-overridden with `make V=0'.
-
-Particular systems
-==================
-
- On HP-UX, the default C compiler is not ANSI C compatible. If GNU
-CC is not installed, it is recommended to use the following options in
-order to use an ANSI C compiler:
-
- ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
-
-and if that doesn't work, install pre-built binaries of GCC for HP-UX.
-
- HP-UX `make' updates targets which have the same time stamps as
-their prerequisites, which makes it generally unusable when shipped
-generated files such as `configure' are involved. Use GNU `make'
-instead.
-
- On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
-parse its `<wchar.h>' header file. The option `-nodtk' can be used as
-a workaround. If GNU CC is not installed, it is therefore recommended
-to try
-
- ./configure CC="cc"
-
-and if that doesn't work, try
-
- ./configure CC="cc -nodtk"
-
- On Solaris, don't put `/usr/ucb' early in your `PATH'. This
-directory contains several dysfunctional programs; working variants of
-these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
-in your `PATH', put it _after_ `/usr/bin'.
-
- On Haiku, software installed for all users goes in `/boot/common',
-not `/usr/local'. It is recommended to use the following options:
-
- ./configure --prefix=/boot/common
-
-Specifying the System Type
-==========================
-
- There may be some features `configure' cannot figure out
-automatically, but needs to determine by the type of machine the package
-will run on. Usually, assuming the package is built to be run on the
-_same_ architectures, `configure' can figure that out, but if it prints
-a message saying it cannot guess the machine type, give it the
-`--build=TYPE' option. TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name which has the form:
-
- CPU-COMPANY-SYSTEM
-
-where SYSTEM can have one of these forms:
-
- OS
- KERNEL-OS
-
- See the file `config.sub' for the possible values of each field. If
-`config.sub' isn't included in this package, then this package doesn't
-need to know the machine type.
-
- If you are _building_ compiler tools for cross-compiling, you should
-use the option `--target=TYPE' to select the type of system they will
-produce code for.
-
- If you want to _use_ a cross compiler, that generates code for a
-platform different from the build platform, you should specify the
-"host" platform (i.e., that on which the generated programs will
-eventually be run) with `--host=TYPE'.
-
-Sharing Defaults
-================
-
- If you want to set default values for `configure' scripts to share,
-you can create a site shell script called `config.site' that gives
-default values for variables like `CC', `cache_file', and `prefix'.
-`configure' looks for `PREFIX/share/config.site' if it exists, then
-`PREFIX/etc/config.site' if it exists. Or, you can set the
-`CONFIG_SITE' environment variable to the location of the site script.
-A warning: not all `configure' scripts look for a site script.
-
-Defining Variables
-==================
-
- Variables not defined in a site shell script can be set in the
-environment passed to `configure'. However, some packages may run
-configure again during the build, and the customized values of these
-variables may be lost. In order to avoid this problem, you should set
-them in the `configure' command line, using `VAR=value'. For example:
-
- ./configure CC=/usr/local2/bin/gcc
-
-causes the specified `gcc' to be used as the C compiler (unless it is
-overridden in the site shell script).
-
-Unfortunately, this technique does not work for `CONFIG_SHELL' due to
-an Autoconf limitation. Until the limitation is lifted, you can use
-this workaround:
-
- CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
-
-`configure' Invocation
-======================
-
- `configure' recognizes the following options to control how it
-operates.
-
-`--help'
-`-h'
- Print a summary of all of the options to `configure', and exit.
-
-`--help=short'
-`--help=recursive'
- Print a summary of the options unique to this package's
- `configure', and exit. The `short' variant lists options used
- only in the top level, while the `recursive' variant lists options
- also present in any nested packages.
-
-`--version'
-`-V'
- Print the version of Autoconf used to generate the `configure'
- script, and exit.
-
-`--cache-file=FILE'
- Enable the cache: use and save the results of the tests in FILE,
- traditionally `config.cache'. FILE defaults to `/dev/null' to
- disable caching.
-
-`--config-cache'
-`-C'
- Alias for `--cache-file=config.cache'.
-
-`--quiet'
-`--silent'
-`-q'
- Do not print messages saying which checks are being made. To
- suppress all normal output, redirect it to `/dev/null' (any error
- messages will still be shown).
-
-`--srcdir=DIR'
- Look for the package's source code in directory DIR. Usually
- `configure' can determine that directory automatically.
-
-`--prefix=DIR'
- Use DIR as the installation prefix. *note Installation Names::
- for more details, including other options available for fine-tuning
- the installation locations.
-
-`--no-create'
-`-n'
- Run the configure checks, but stop before creating any output
- files.
-
-`configure' also accepts some other, not widely useful, options. Run
-`configure --help' for more details.
diff --git a/libs/hunspell/docs/README b/libs/hunspell/docs/README
deleted file mode 100644
index 42061c01a1..0000000000
--- a/libs/hunspell/docs/README
+++ /dev/null
@@ -1 +0,0 @@
-README.md \ No newline at end of file
diff --git a/libs/hunspell/docs/README.md b/libs/hunspell/docs/README.md
deleted file mode 100644
index 13bac95c78..0000000000
--- a/libs/hunspell/docs/README.md
+++ /dev/null
@@ -1,182 +0,0 @@
-About Hunspell
-==============
-
-NOTICE: Version 2 is in the works. For contributing see
-[version 2 specification][v2spec] and the folder `src/hunspell2`.
-
-[v2spec]: https://github.com/hunspell/hunspell/wiki/Version-2-Specification
-
-Hunspell is a spell checker and morphological analyzer library and program
-designed for languages with rich morphology and complex word compounding or
-character encoding. Hunspell interfaces: Ispell-like terminal interface
-using Curses library, Ispell pipe interface, C++ class and C functions.
-
-Hunspell's code base comes from the OpenOffice.org MySpell
-(http://lingucomponent.openoffice.org/MySpell-3.zip). See README.MYSPELL,
-AUTHORS.MYSPELL and license.myspell files.
-Hunspell is designed to eventually replace Myspell in OpenOffice.org.
-
-Main features of Hunspell spell checker and morphological analyzer:
-
-- Unicode support (affix rules work only with the first 65535 Unicode
- characters)
-- Morphological analysis (in custom item and arrangement style) and stemming
-- Max. 65535 affix classes and twofold affix stripping (for agglutinative
- languages, like Azeri, Basque, Estonian, Finnish, Hungarian, Turkish, etc.)
-- Support complex compoundings (for example, Hungarian and German)
-- Support language specific features (for example, special casing of
- Azeri and Turkish dotted i, or German sharp s)
-- Handle conditional affixes, circumfixes, fogemorphemes,
- forbidden words, pseudoroots and homonyms.
-- Free software. Versions 1.x are licenced under LGPL, GPL, MPL tri-license.
- Version 2 is licenced only under GNU LGPL.
-
-Compiling on GNU/Linux and Unixes
-=================================
-
- autoreconf -vfi
- ./configure
- make
- sudo make install
- sudo ldconfig
-
-For dictionary development, use the `--with-warnings` option of configure.
-
-For interactive user interface of Hunspell executable, use the `--with-ui option`.
-
-The developer packages you need to compile Hunspell's interface:
-
- autoconf automake autopoint libtool g++
-
-Optional developer packages:
-
-- ncurses (need for --with-ui), eg. libncursesw5 for UTF-8
-- readline (for fancy input line editing,
- configure parameter: --with-readline)
-- locale and gettext (but you can also use the
- --with-included-gettext configure parameter)
-
-Compiling on Windows
-====================
-
-## 1. Compiling with Mingw64 and MSYS2
-
-Download Msys2, update everything and install the following packages:
-
- pacman -S base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-libtool
-
-Open Mingw-w64 Win64 prompt and compile the same way as on Linux, see above.
-
-## 2. Compiling in Cygwin environment
-
-Download and install Cygwin environment for Windows with the following
-extra packages:
-
-- make
-- automake
-- autoconf
-- libtool
-- gcc-g++ development package
-- ncurses, readline (for user interface)
-- iconv (character conversion)
-
-Then compile the same way as on Linux. Cygwin builds depend on Cygwin1.dll.
-
-Debugging
-=========
-
-For debugging we need to create a debug build and then we need to start `gdb`.
-
- make clean
- make CXXFLAGS='-g -O0'
- libtool --mode=execute gdb src/tools/hunspell
-
-Testing
-=======
-
-Testing Hunspell (see tests in tests/ subdirectory):
-
- make check
-
-or with Valgrind debugger:
-
- make check
- VALGRIND=[Valgrind_tool] make check
-
-For example:
-
- make check
- VALGRIND=memcheck make check
-
-Documentation
-=============
-
-features and dictionary format:
-
- man 5 hunspell
- man hunspell
- hunspell -h
-
-http://hunspell.github.io/
-
-Usage
-=====
-
-The src/tools directory contains ten executables after compiling:
-
-- affixcompress: dictionary generation from large (millions of words)
- vocabularies
-- analyze: example of spell checking, stemming and morphological analysis
-- chmorph: example of automatic morphological generation and conversion
-- example: example of spell checking and suggestion
-- hunspell: main program for spell checking and others (see manual)
-- hunzip: decompressor of hzip format
-- hzip: compressor of hzip format
-- makealias: alias compression (Hunspell only, not back compatible with MySpell)
-- munch: dictionary generation from vocabularies (it needs an affix file, too).
-- unmunch: list all recognized words of a MySpell dictionary
-- wordforms: word generation (Hunspell version of unmunch)
-
-After compiling and installing (see INSTALL) you can
-run the Hunspell spell checker (compiled with user interface)
-with a Hunspell or Myspell dictionary:
-
- hunspell -d en_US text.txt
-
-or without interface:
-
- hunspell
- hunspell -d en_UK -l <text.txt
-
-Dictionaries consist of an affix and dictionary file, see tests/
-or http://wiki.services.openoffice.org/wiki/Dictionaries.
-
-Using Hunspell library with GCC
-===============================
-
-Including in your program:
-
- #include <hunspell.hxx>
-
-Linking with Hunspell static library:
-
- g++ -lhunspell example.cxx
-
-Dictionaries
-------------
-
-Myspell & Hunspell dictionaries:
-
-- http://extensions.libreoffice.org
-- http://cgit.freedesktop.org/libreoffice/dictionaries
-- http://extensions.openoffice.org
-- http://wiki.services.openoffice.org/wiki/Dictionaries
-
-Aspell dictionaries (need some conversion):
-
-- ftp://ftp.gnu.org/gnu/aspell/dict
-
-Conversion steps: see relevant feature request at http://hunspell.github.io/ .
-
-László Németh
-nemeth at numbertext org
diff --git a/libs/hunspell/docs/README.myspell b/libs/hunspell/docs/README.myspell
deleted file mode 100644
index 25934eec01..0000000000
--- a/libs/hunspell/docs/README.myspell
+++ /dev/null
@@ -1,69 +0,0 @@
-MySpell is a simple spell checker that uses affix
-compression and is modelled after the spell checker
-ispell.
-
-MySpell was written to explore how affix compression
-can be implemented.
-
-The Main features of MySpell are:
-
-1. written in C++ to make it easier to interface with
- Pspell, OpenOffice, AbiWord, etc
-
-2. it is stateless, uses no static variables and
- should be completely reentrant with almost no
- ifdefs
-
-3. it tries to be as compatible with ispell to
- the extent it can. It can read slightly modified
- versions of munched ispell dictionaries (and it
- comes with a munched english wordlist borrowed from
- Kevin Atkinson's excellent Aspell.
-
-4. it uses a heavily modified aff file format that
- can be derived from ispell aff files but uses
- the iso-8859-X character sets only
-
-5. it is simple with *lots* of comments that
- describes how the affixes are stored
- and tested for (based on the approach used by
- ispell).
-
-6. it supports improved suggestions with replacement
- tables and ngram-scoring based mechanisms in addition
- to the main suggestion mechanisms
-
-7. like ispell it has a BSD license (and no
- advertising clause)
-
-But ... it has *no* support for adding words
-to a personal dictionary, *no* support for converting
-between various text encodings, and *no* command line
-interface (it is purely meant to be a library).
-
-It can not (in any way) replace all of the functionality
-of ispell or aspell/pspell. It is meant as a learning
-tool for understanding affix compression and for
-being used by front ends like OpenOffice, Abiword, etc.
-
-MySpell has been tested under Linux and Solaris
-and has the world's simplest Makefile and no
-configure support.
-
-It does come with a simple example program that
-spell checks some words and returns suggestions.
-
-To build a static library and an example
-program under Linux simply type:
-
-tar -zxvf myspell.tar.gz
-cd myspell2
-make
-
-To run the example program:
-./example ./en_US.aff ./en_US.dic checkme.lst
-
-Please play around with it and let me know
-what you think.
-
-Please see the file CONTRIBUTORS for more info.
diff --git a/libs/hunspell/docs/TODO b/libs/hunspell/docs/TODO
deleted file mode 100644
index fb32e7ec89..0000000000
--- a/libs/hunspell/docs/TODO
+++ /dev/null
@@ -1,4 +0,0 @@
-* shared dictionaries for multi-user environment
-* improve compound handling
-* Unicode unmunch (munch)
-* forbiddenword and pseudoword support in unmunch
diff --git a/libs/libaxolotl/README.md b/libs/libaxolotl/README.md
deleted file mode 100644
index f3089cd8f2..0000000000
--- a/libs/libaxolotl/README.md
+++ /dev/null
@@ -1,211 +0,0 @@
-# Overview
-
-This is a ratcheting forward secrecy protocol that works in synchronous and asynchronous messaging
-environments. See the [Java library](https://github.com/whispersystems/libsignal-protocol-java) for more details.
-
-# Building libsignal-protocol-c
-
-## Development host setup
-
-### Build dependencies
-
-* [CMake](https://cmake.org/) 2.8.4 or higher
-* [Check *1](https://libcheck.github.io/check/)
-* [OpenSSL *1](https://www.openssl.org/) 1.0 or higher
- * On MacOS X, [Common Crypto](https://developer.apple.com/library/content/documentation/Security/Conceptual/cryptoservices/GeneralPurposeCrypto/GeneralPurposeCrypto.html) is used instead of OpenSSL
-* [LCOV *2](http://ltp.sourceforge.net/coverage/lcov.php)
-
-Most of these dependencies are required just for the unit test suite and
-development of the library itself. When integrating into actual applications,
-you should not need anything beyond CMake. Alternatively, you may integrate
-the code using a build system of your choice.
-Items marked with *1 are required for tests, with *2 are additionally required for code coverage.
-
-### Setting up a fresh source tree
-
- $ cd /path/to/libsignal-protocol-c
- $ mkdir build
- $ cd build
- $ cmake -DCMAKE_BUILD_TYPE=Debug ..
- $ make
-
-### Running the unit tests
-
- $ cd /path/to/libsignal-protocol-c/build
- $ cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=1 ..
- $ cd tests
- $ make
- $ cd ..
- $ ctest
-
-### Creating the code coverage report
-
- $ cd /path/to/libsignal-protocol-c/build
- $ cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=1 -DCOVERAGE=1 ..
- $ make coverage
-
-The generated code coverage report can be found in:
-`/path/to/libsignal-protocol-c/build/coverage`
-
-### Eclipse project setup
-
-CMake provides a tutorial on Eclipse project setup here:
-https://cmake.org/Wiki/CMake:Eclipse_UNIX_Tutorial
-
-It is recommended to follow the more manual "Option 2," since the Eclipse
-project generator built into CMake tends to be outdated and leads you toward
-a very awkward and occasionally broken project configuration.
-
-### Protocol Buffers compiler
-
-This project uses serialization code based on [Protocol Buffers](https://github.com/google/protobuf).
-Since the official library does not support C, the [protobuf-c](https://github.com/protobuf-c/protobuf-c)
-generator is used instead. For the sake of convenience, the generated code and its dependencies are
-included in the source tree. The generated code can be regenerated at any time by installing the two
-mentioned packages and running "make" in the "protobuf/" subdirectory.
-
-## Target platforms
-
-CMake toolchain files have been included from the following sources:
-
-* [iOS](https://code.google.com/archive/p/ios-cmake)
-* [BlackBerry 10](https://github.com/blackberry/OGRE/blob/master/src/CMake/toolchain/blackberry.toolchain.cmake)
-
-# Using libsignal-protocol-c
-
-## Library initialization
-
-Before using the library, a libsignal-protocol-c client needs to initialize a global
-context. This global context is used to provide callbacks for implementations
-of functions used across the library that need client-specific implementations.
-Refer to "signal_protocol.h" for detailed documentation on these functions, and the unit
-tests for example implementations.
-
- signal_context *global_context;
- signal_context_create(&global_context, user_data);
- signal_context_set_crypto_provider(global_context, &provider);
- signal_context_set_locking_functions(global_context, lock_function, unlock_function);
-
-## Client install time
-
-At install time, a libsignal-protocol-c client needs to generate its identity keys,
-registration id, and prekeys.
-
- ratchet_identity_key_pair *identity_key_pair;
- uint32_t registration_id;
- signal_protocol_key_helper_pre_key_list_node *pre_keys_head;
- session_pre_key *last_resort_key;
- session_signed_pre_key *signed_pre_key;
-
- signal_protocol_key_helper_generate_identity_key_pair(&identity_key_pair, global_context);
- signal_protocol_key_helper_generate_registration_id(&registration_id, 0, global_context);
- signal_protocol_key_helper_generate_pre_keys(&pre_keys_head, start_id, 100, global_context);
- signal_protocol_key_helper_generate_last_resort_pre_key(&last_resort_key, global_context);
- signal_protocol_key_helper_generate_signed_pre_key(&signed_pre_key, identity_key_pair, 5, timestamp, global_context);
-
- /* Store identity_key_pair somewhere durable and safe. */
- /* Store registration_id somewhere durable and safe. */
-
- /* Store pre keys in the pre key store. */
- /* Store signed pre key in the signed pre key store. */
-
-The above example is simplified for the sake of clarity. All of these functions return errors
-on failure, and those errors should be checked for in real usage.
-
-There are also iteration and serialization methods for the above types that should
-be used as appropriate.
-
-## Building a session
-
-A libsignal-protocol-c client needs to implement four data store callback interfaces:
-`signal_protocol_identity_key_store`, `signal_protocol_pre_key_store`,
-`signal_protocol_signed_pre_key_store`, and `signal_protocol_session_store`.
-These will manage loading and storing of identity, prekeys, signed prekeys,
-and session state.
-
-These callback interfaces are designed such that implementations should treat
-all data flowing through them as opaque binary blobs. Anything necessary for
-referencing that data will be provided as separate function arguments to those
-callbacks. If it is ever necessary for clients to directly access stored data
-in terms of library data structures, they should use the accessor functions
-declared in "signal_protocol.h" for these data stores.
-
-Once the callbacks for these data stores are implemented, building a session
-is fairly straightforward:
-
- /* Create the data store context, and add all the callbacks to it */
- signal_protocol_store_context *store_context;
- signal_protocol_store_context_create(&store_context, context);
- signal_protocol_store_context_set_session_store(store_context, &session_store);
- signal_protocol_store_context_set_pre_key_store(store_context, &pre_key_store);
- signal_protocol_store_context_set_signed_pre_key_store(store_context, &signed_pre_key_store);
- signal_protocol_store_context_set_identity_key_store(store_context, &identity_key_store);
-
- /* Instantiate a session_builder for a recipient address. */
- signal_protocol_address address = {
- "+14159998888", 12, 1
- };
- session_builder *builder;
- session_builder_create(&builder, store_context, &address, global_context);
-
- /* Build a session with a pre key retrieved from the server. */
- session_builder_process_pre_key_bundle(builder, retrieved_pre_key);
-
- /* Create the session cipher and encrypt the message */
- session_cipher *cipher;
- session_cipher_create(&cipher, store_context, &address, global_context);
-
- ciphertext_message *encrypted_message;
- session_cipher_encrypt(cipher, message, message_len, &encrypted_message);
-
- /* Get the serialized content and deliver it */
- signal_buffer *serialized = ciphertext_message_get_serialized(encrypted_message);
-
- deliver(signal_buffer_data(serialized), signal_buffer_len(serialized));
-
- /* Cleanup */
- SIGNAL_UNREF(encrypted_message);
- session_cipher_free(cipher);
- session_builder_free(builder);
- signal_protocol_store_context_destroy(store_context);
-
-The above example is simplified for the sake of clarity. All of these functions return errors
-on failure, and those errors should be checked for in real usage.
-
-## Memory management notes
-
-For every custom data type that the libsignal-protocol-c library can allocate and
-return, a corresponding way of deallocating an instance of that data type
-is provided.
-
-The more basic and higher level data types provide a type-specific free or
-destroy function. These types include `signal_context`,
-`signal_protocol_store_context`, `signal_buffer`, `signal_buffer_list`,
-`signal_int_list`, `signal_protocol_key_helper_pre_key_list_node`, `session_builder`,
-`session_cipher`, `group_session_builder`, `group_cipher`, and
-`fingerprint_generator`.
-
-Most of the other data types, including everything internal, use a reference
-counting mechanism. If you are going to hold onto a reference to one of these
-types, use the `SIGNAL_REF(x)` macro to increment its count. If you are done
-with a reference, use `SIGNAL_UNREF(x)` to decrement its count. When the count
-reaches 0, the type's destructor function is called.
-
-# Legal things
-## Cryptography Notice
-
-This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software.
-BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted.
-See <http://www.wassenaar.org/> for more information.
-
-The U.S. Government Department of Commerce, Bureau of Industry and Security (BIS), has classified this software as Export Commodity Control Number (ECCN) 5D002.C.1, which includes information security software using or performing cryptographic functions with asymmetric algorithms.
-The form and manner of this distribution makes it eligible for export under the License Exception ENC Technology Software Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Section 740.13) for both object code and source code.
-
-## License
-
-Copyright 2015-2016 Open Whisper Systems
-
-Licensed under the GPLv3: http://www.gnu.org/licenses/gpl-3.0.html
-
-Additional Permissions For Submission to Apple App Store: Provided that you are otherwise in compliance with the GPLv3 for each covered work you convey (including without limitation making the Corresponding Source available in compliance with Section 6 of the GPLv3), Open Whisper Systems also grants you the additional permission to convey through the Apple App Store non-source executable versions of the Program as incorporated into each applicable covered work as Executable Versions only under the Mozilla Public License version 2.0 (https://www.mozilla.org/en-US/MPL/2.0/).
-
diff --git a/libs/libaxolotl/LICENSE b/libs/libaxolotl/docs/LICENSE
index 94a0453222..94a0453222 100644
--- a/libs/libaxolotl/LICENSE
+++ b/libs/libaxolotl/docs/LICENSE
diff --git a/libs/libcurl/docs/BINDINGS b/libs/libcurl/docs/BINDINGS
deleted file mode 100644
index 466c36bd0f..0000000000
--- a/libs/libcurl/docs/BINDINGS
+++ /dev/null
@@ -1,242 +0,0 @@
- _ _ ____ _
- ___| | | | _ \| |
- / __| | | | |_) | |
- | (__| |_| | _ <| |___
- \___|\___/|_| \_\_____|
-
- libcurl bindings
-
- Creative people have written bindings or interfaces for various environments
- and programming languages. Using one of these allows you to take advantage of
- curl powers from within your favourite language or system.
-
- This is a list of all known interfaces as of this writing.
-
- The bindings listed below are not part of the curl/libcurl distribution
- archives, but must be downloaded and installed separately.
-
-Ada95
-
- Writtten by Andreas Almroth
- http://www.almroth.com/adacurl/index.html
-
-Basic
-
- ScriptBasic bindings to libcurl. Writtten by Peter Verhas
- http://scriptbasic.com/
-
-C
- libcurl is a C library in itself!
- http://curl.haxx.se/libcurl/
-
-C++
-
- Written by Jean-Philippe Barrette-LaPierre
- http://curlpp.org/
-
-Ch
-
- Written by Stephen Nestinger and Jonathan Rogado
- http://chcurl.sourceforge.net/
-
-Cocoa
-
- BBHTTP: written by Bruno de Carvalho
- https://github.com/brunodecarvalho/BBHTTP
-
- curlhandle: Written by Dan Wood
- http://curlhandle.sourceforge.net/
-
-D
-
- Written by Kenneth Bogert
- http://curl.haxx.se/libcurl/d/
-
-Dylan
-
- Written by Chris Double
- http://dylanlibs.sourceforge.net/
-
-Eiffel
-
- Written by Eiffel Software
- http://curl.haxx.se/libcurl/eiffel/
-
-Euphoria
-
- Written by Ray Smith
- http://rays-web.com/eulibcurl.htm
-
-Falcon
-
- http://www.falconpl.org/index.ftd?page_id=prjs&prj_id=curl
-
-Ferite
-
- Written by Paul Querna
- http://www.ferite.org/
-
-Gambas
-
- http://gambas.sourceforge.net
-
-glib/GTK+
-
- Written by Richard Atterer
- http://atterer.net/glibcurl/
-
-Guile:
-
- Written by Michael L. Gran
- http://www.lonelycactus.com/guile-curl.html
-
-Haskell
-
- Written by Galois, Inc
- http://hackage.haskell.org/cgi-bin/hackage-scripts/package/curl
-
-Java
-
- Maintained by [blank]
- http://curl.haxx.se/libcurl/java/
-
-Julia
-
- Written by Paul Howe
- https://github.com/forio/Curl.jl
-
-Lisp
-
- Written by Liam Healy
- http://common-lisp.net/project/cl-curl/
-
-Lua
-
- luacurl by Alexander Marinov
- http://luacurl.luaforge.net/
-
- Lua-cURL by Jürgen Hötzel
- http://luaforge.net/projects/lua-curl/
-
-Mono
-
- Written by Jeffrey Phillips
- http://forge.novell.com/modules/xfmod/project/?libcurl-mono
-
-.NET
-
- libcurl-net by Jeffrey Phillips
- http://sourceforge.net/projects/libcurl-net/
-
-Object-Pascal
-
- Free Pascal, Delphi and Kylix binding written by Christophe Espern.
- http://www.tekool.com/opcurl
-
-O'Caml
-
- Written by Lars Nilsson
- http://sourceforge.net/projects/ocurl/
-
-Pascal
-
- Free Pascal, Delphi and Kylix binding written by Jeffrey Pohlmeyer.
- http://houston.quik.com/jkp/curlpas/
-
-Perl
-
- Maintained by Cris Bailiff
- http://curl.haxx.se/libcurl/perl/
-
-PHP
-
- Written by Sterling Hughes
- http://curl.haxx.se/libcurl/php/
-
-PostgreSQL
-
- Written by Gian Paolo Ciceri
- http://gborg.postgresql.org/project/pgcurl/projdisplay.php
-
-Python
-
- PycURL by Kjetil Jacobsen
- http://pycurl.sourceforge.net/
-
-R
-
- RCurl by Duncan Temple Lang
- http://www.omegahat.org/RCurl/
-
-Rexx
-
- Written Mark Hessling
- http://rexxcurl.sourceforge.net/
-
-RPG
-
- Support for ILE/RPG on OS/400 is included in source distribution
- http://curl.haxx.se/libcurl/
- See packages/OS400/README.OS400 and packages/OS400/curl.inc.in
-
-Ruby
-
- curb - written by Ross Bamford
- http://curb.rubyforge.org/
-
- ruby-curl-multi - written by Kristjan Petursson and Keith Rarick
- http://curl-multi.rubyforge.org/
-
-Scheme
-
- Bigloo binding by Kirill Lisovsky
- http://curl.haxx.se/libcurl/scheme/
-
-S-Lang
-
- S-Lang binding by John E Davis
- http://www.jedsoft.org/slang/modules/curl.html
-
-Smalltalk
-
- Smalltalk binding by Danil Osipchuk
- http://www.squeaksource.com/CurlPlugin/
-
-SP-Forth
-
- SP-Forth binding by ygrek
- http://www.forth.org.ru/~ac/lib/lin/curl/
-
-SPL
-
- SPL binding by Clifford Wolf
- http://www.clifford.at/spl/
-
-Tcl
-
- Tclcurl by Andrés García
- http://personal1.iddeo.es/andresgarci/tclcurl/english/docs.html
-
-Visual Basic
-
- libcurl-vb by Jeffrey Phillips
- http://sourceforge.net/projects/libcurl-vb/
-
-Visual Foxpro
-
- by Carlos Alloatti
- http://www.ctl32.com.ar/libcurl.asp
-
-Q
- The libcurl module is part of the default install
- http://q-lang.sourceforge.net/
-
-wxWidgets
-
- Written by Casey O'Donnell
- http://wxcode.sourceforge.net/components/wxcurl/
-
-XBLite
-
- Written by David Szafranski
- http://perso.wanadoo.fr/xblite/libraries.html
diff --git a/libs/libcurl/docs/BUGS b/libs/libcurl/docs/BUGS
deleted file mode 100644
index c0c6fa82a9..0000000000
--- a/libs/libcurl/docs/BUGS
+++ /dev/null
@@ -1,148 +0,0 @@
- _ _ ____ _
- ___| | | | _ \| |
- / __| | | | |_) | |
- | (__| |_| | _ <| |___
- \___|\___/|_| \_\_____|
-
-BUGS
-
- 1. Bugs
- 1.1 There are still bugs
- 1.2 Where to report
- 1.3 What to report
- 1.4 libcurl problems
- 1.5 Who will fix the problems
- 1.6 How to get a stack trace
- 1.7 Bugs in libcurl bindings
-
-==============================================================================
-
-1.1 There are still bugs
-
- Curl and libcurl have grown substantially since the beginning. At the time
- of writing (January 2013), there are about 83,000 lines of source code, and
- by the time you read this it has probably grown even more.
-
- Of course there are lots of bugs left. And lots of misfeatures.
-
- To help us make curl the stable and solid product we want it to be, we need
- bug reports and bug fixes.
-
-1.2 Where to report
-
- If you can't fix a bug yourself and submit a fix for it, try to report an as
- detailed report as possible to a curl mailing list to allow one of us to
- have a go at a solution. You can optionally also post your bug/problem at
- curl's bug tracking system over at
-
- https://sourceforge.net/p/curl/bugs/
-
- Please read the rest of this document below first before doing that! Also,
- you need to login to your sourceforge account before being able to submit a
- bug report (necessary evil done to avoid spam).
-
- If you feel you need to ask around first, find a suitable mailing list and
- post there. The lists are available on http://curl.haxx.se/mail/
-
-1.3 What to report
-
- When reporting a bug, you should include all information that will help us
- understand what's wrong, what you expected to happen and how to repeat the
- bad behavior. You therefore need to tell us:
-
- - your operating system's name and version number
-
- - what version of curl you're using (curl -V is fine)
-
- - versions of the used libraries that libcurl is built to use
-
- - what URL you were working with (if possible), at least which protocol
-
- and anything and everything else you think matters. Tell us what you
- expected to happen, tell use what did happen, tell us how you could make it
- work another way. Dig around, try out, test. Then include all the tiny bits
- and pieces in your report. You will benefit from this yourself, as it will
- enable us to help you quicker and more accurately.
-
- Since curl deals with networks, it often helps us if you include a protocol
- debug dump with your bug report. The output you get by using the -v or
- --trace options.
-
- If curl crashed, causing a core dump (in unix), there is hardly any use to
- send that huge file to anyone of us. Unless we have an exact same system
- setup as you, we can't do much with it. Instead we ask you to get a stack
- trace and send that (much smaller) output to us instead!
-
- The address and how to subscribe to the mailing lists are detailed in the
- MANUAL file.
-
-1.4 libcurl problems
-
- First, post all libcurl problems on the curl-library mailing list.
-
- When you've written your own application with libcurl to perform transfers,
- it is even more important to be specific and detailed when reporting bugs.
-
- Tell us the libcurl version and your operating system. Tell us the name and
- version of all relevant sub-components like for example the SSL library
- you're using and what name resolving your libcurl uses. If you use SFTP or
- SCP, the libssh2 version is relevant etc.
-
- Showing us a real source code example repeating your problem is the best way
- to get our attention and it will greatly increase our chances to understand
- your problem and to work on a fix (if we agree it truly is a problem).
-
- Lots of problems that appear to be libcurl problems are actually just abuses
- of the libcurl API or other malfunctions in your applications. It is advised
- that you run your problematic program using a memory debug tool like
- valgrind or similar before you post memory-related or "crashing" problems to
- us.
-
-1.5 Who will fix the problems
-
- If the problems or bugs you describe are considered to be bugs, we want to
- have the problems fixed.
-
- There are no developers in the curl project that are paid to work on bugs.
- All developers that take on reported bugs do this on a voluntary basis. We
- do it out of an ambition to keep curl and libcurl excellent products and out
- of pride.
-
- But please do not assume that you can just lump over something to us and it
- will then magically be fixed after some given time. Most often we need
- feedback and help to understand what you've experienced and how to repeat a
- problem. Then we may only be able to assist YOU to debug the problem and to
- track down the proper fix.
-
- We get reports from many people every month and each report can take a
- considerable amount of time to really go to the bottom with.
-
-1.6 How to get a stack trace
-
- First, you must make sure that you compile all sources with -g and that you
- don't 'strip' the final executable. Try to avoid optimizing the code as
- well, remove -O, -O2 etc from the compiler options.
-
- Run the program until it cores.
-
- Run your debugger on the core file, like '<debugger> curl core'. <debugger>
- should be replaced with the name of your debugger, in most cases that will
- be 'gdb', but 'dbx' and others also occur.
-
- When the debugger has finished loading the core file and presents you a
- prompt, enter 'where' (without the quotes) and press return.
-
- The list that is presented is the stack trace. If everything worked, it is
- supposed to contain the chain of functions that were called when curl
- crashed. Include the stack trace with your detailed bug report. It'll help a
- lot.
-
-1.7 Bugs in libcurl bindings
-
- There will of course pop up bugs in libcurl bindings. You should then
- primarily approach the team that works on that particular binding and see
- what you can do to help them fix the problem.
-
- If you suspect that the problem exists in the underlying libcurl, then
- please convert your program over to plain C and follow the steps outlined
- above.
diff --git a/libs/libcurl/docs/CONTRIBUTE b/libs/libcurl/docs/CONTRIBUTE
deleted file mode 100644
index 75e7ebbb93..0000000000
--- a/libs/libcurl/docs/CONTRIBUTE
+++ /dev/null
@@ -1,310 +0,0 @@
- _ _ ____ _
- ___| | | | _ \| |
- / __| | | | |_) | |
- | (__| |_| | _ <| |___
- \___|\___/|_| \_\_____|
-
- When Contributing Source Code
-
- This document is intended to offer guidelines that can be useful to keep in
- mind when you decide to contribute to the project. This concerns new features
- as well as corrections to existing flaws or bugs.
-
- 1. Learning cURL
- 1.1 Join the Community
- 1.2 License
- 1.3 What To Read
-
- 2. cURL Coding Standards
- 2.1 Naming
- 2.2 Indenting
- 2.3 Commenting
- 2.4 Line Lengths
- 2.5 General Style
- 2.6 Non-clobbering All Over
- 2.7 Platform Dependent Code
- 2.8 Write Separate Patches
- 2.9 Patch Against Recent Sources
- 2.10 Document
- 2.11 Test Cases
-
- 3. Pushing Out Your Changes
- 3.1 Write Access to git Repository
- 3.2 How To Make a Patch with git
- 3.3 How To Make a Patch without git
- 3.4 How to get your changes into the main sources
- 3.5 Write good commit messages
- 3.6 Please don't send pull requests
-
-==============================================================================
-
-1. Learning cURL
-
-1.1 Join the Community
-
- Skip over to http://curl.haxx.se/mail/ and join the appropriate mailing
- list(s). Read up on details before you post questions. Read this file before
- you start sending patches! We prefer patches and discussions being held on
- the mailing list(s), not sent to individuals.
-
- Before posting to one of the curl mailing lists, please read up on the mailing
- list etiquette: http://curl.haxx.se/mail/etiquette.html
-
- We also hang out on IRC in #curl on irc.freenode.net
-
-1.2. License
-
- When contributing with code, you agree to put your changes and new code under
- the same license curl and libcurl is already using unless stated and agreed
- otherwise.
-
- If you add a larger piece of code, you can opt to make that file or set of
- files to use a different license as long as they don't enforce any changes to
- the rest of the package and they make sense. Such "separate parts" can not be
- GPL licensed (as we don't want copyleft to affect users of libcurl) but they
- must use "GPL compatible" licenses (as we want to allow users to use libcurl
- properly in GPL licensed environments).
-
- When changing existing source code, you do not alter the copyright of the
- original file(s). The copyright will still be owned by the original
- creator(s) or those who have been assigned copyright by the original
- author(s).
-
- By submitting a patch to the curl project, you are assumed to have the right
- to the code and to be allowed by your employer or whatever to hand over that
- patch/code to us. We will credit you for your changes as far as possible, to
- give credit but also to keep a trace back to who made what changes. Please
- always provide us with your full real name when contributing!
-
-1.3 What To Read
-
- Source code, the man pages, the INTERNALS document, TODO, KNOWN_BUGS, the
- most recent CHANGES. Just lurking on the curl-library mailing list is gonna
- give you a lot of insights on what's going on right now. Asking there is a
- good idea too.
-
-2. cURL Coding Standards
-
-2.1 Naming
-
- Try using a non-confusing naming scheme for your new functions and variable
- names. It doesn't necessarily have to mean that you should use the same as in
- other places of the code, just that the names should be logical,
- understandable and be named according to what they're used for. File-local
- functions should be made static. We like lower case names.
-
- See the INTERNALS document on how we name non-exported library-global
- symbols.
-
-2.2 Indenting
-
- Use the same indenting levels and bracing method as all the other code
- already does. It makes the source code easier to follow if all of it is
- written using the same style. We don't ask you to like it, we just ask you to
- follow the tradition! ;-) This mainly means: 2-level indents, using spaces
- only (no tabs) and having the opening brace ({) on the same line as the if()
- or while().
-
- Also note that we use if() and while() with no space before the parenthesis.
-
-2.3 Commenting
-
- Comment your source code extensively using C comments (/* comment */), DO NOT
- use C++ comments (// this style). Commented code is quality code and enables
- future modifications much more. Uncommented code risk having to be completely
- replaced when someone wants to extend things, since other persons' source
- code can get quite hard to read.
-
-2.4 Line Lengths
-
- We write source lines shorter than 80 columns.
-
-2.5 General Style
-
- Keep your functions small. If they're small you avoid a lot of mistakes and
- you don't accidentally mix up variables etc.
-
-2.6 Non-clobbering All Over
-
- When you write new functionality or fix bugs, it is important that you don't
- fiddle all over the source files and functions. Remember that it is likely
- that other people have done changes in the same source files as you have and
- possibly even in the same functions. If you bring completely new
- functionality, try writing it in a new source file. If you fix bugs, try to
- fix one bug at a time and send them as separate patches.
-
-2.7 Platform Dependent Code
-
- Use #ifdef HAVE_FEATURE to do conditional code. We avoid checking for
- particular operating systems or hardware in the #ifdef lines. The
- HAVE_FEATURE shall be generated by the configure script for unix-like systems
- and they are hard-coded in the config-[system].h files for the others.
-
-2.8 Write Separate Patches
-
- It is annoying when you get a huge patch from someone that is said to fix 511
- odd problems, but discussions and opinions don't agree with 510 of them - or
- 509 of them were already fixed in a different way. Then the patcher needs to
- extract the single interesting patch from somewhere within the huge pile of
- source, and that gives a lot of extra work. Preferably, all fixes that
- correct different problems should be in their own patch with an attached
- description exactly what they correct so that all patches can be selectively
- applied by the maintainer or other interested parties.
-
- Also, separate patches enable bisecting much better when we track problems in
- the future.
-
-2.9 Patch Against Recent Sources
-
- Please try to get the latest available sources to make your patches
- against. It makes the life of the developers so much easier. The very best is
- if you get the most up-to-date sources from the git repository, but the
- latest release archive is quite OK as well!
-
-2.10 Document
-
- Writing docs is dead boring and one of the big problems with many open source
- projects. Someone's gotta do it. It makes it a lot easier if you submit a
- small description of your fix or your new features with every contribution so
- that it can be swiftly added to the package documentation.
-
- The documentation is always made in man pages (nroff formatted) or plain
- ASCII files. All HTML files on the web site and in the release archives are
- generated from the nroff/ASCII versions.
-
-2.11 Test Cases
-
- Since the introduction of the test suite, we can quickly verify that the main
- features are working as they're supposed to. To maintain this situation and
- improve it, all new features and functions that are added need to be tested
- in the test suite. Every feature that is added should get at least one valid
- test case that verifies that it works as documented. If every submitter also
- posts a few test cases, it won't end up as a heavy burden on a single person!
-
- If you don't have test cases or perhaps you have done something that is very
- hard to write tests for, do explain exactly how you have otherwise tested and
- verified your changes.
-
-3. Pushing Out Your Changes
-
-3.1 Write Access to git Repository
-
- If you are a frequent contributor, or have another good reason, you can of
- course get write access to the git repository and then you'll be able to push
- your changes straight into the git repo instead of sending changes by mail as
- patches. Just ask if this is what you'd want. You will be required to have
- posted a few quality patches first, before you can be granted push access.
-
-3.2 How To Make a Patch with git
-
- You need to first checkout the repository:
-
- git clone git://github.com/bagder/curl.git
-
- You then proceed and edit all the files you like and you commit them to your
- local repository:
-
- git commit [file]
-
- As usual, group your commits so that you commit all changes that at once that
- constitutes a logical change. See also section "3.5 Write good commit
- messages".
-
- Once you have done all your commits and you're happy with what you see, you
- can make patches out of your changes that are suitable for mailing:
-
- git format-patch remotes/origin/master
-
- This creates files in your local directory named NNNN-[name].patch for each
- commit.
-
- Now send those patches off to the curl-library list. You can of course opt to
- do that with the 'git send-email' command.
-
-3.3 How To Make a Patch without git
-
- Keep a copy of the unmodified curl sources. Make your changes in a separate
- source tree. When you think you have something that you want to offer the
- curl community, use GNU diff to generate patches.
-
- If you have modified a single file, try something like:
-
- diff -u unmodified-file.c my-changed-one.c > my-fixes.diff
-
- If you have modified several files, possibly in different directories, you
- can use diff recursively:
-
- diff -ur curl-original-dir curl-modified-sources-dir > my-fixes.diff
-
- The GNU diff and GNU patch tools exist for virtually all platforms, including
- all kinds of Unixes and Windows:
-
- For unix-like operating systems:
-
- http://www.gnu.org/software/patch/patch.html
- http://www.gnu.org/directory/diffutils.html
-
- For Windows:
-
- http://gnuwin32.sourceforge.net/packages/patch.htm
- http://gnuwin32.sourceforge.net/packages/diffutils.htm
-
-3.4 How to get your changes into the main sources
-
- Submit your patch to the curl-library mailing list.
-
- Make the patch against as recent sources as possible.
-
- Make sure your patch adheres to the source indent and coding style of already
- existing source code. Failing to do so just adds more work for me.
-
- Respond to replies on the list about the patch and answer questions and/or
- fix nits/flaws. This is very important. I will take lack of replies as a sign
- that you're not very anxious to get your patch accepted and I tend to simply
- drop such patches from my TODO list.
-
- If you've followed the above paragraphs and your patch still hasn't been
- incorporated after some weeks, consider resubmitting it to the list.
-
-3.5 Write good commit messages
-
- A short guide to how to do fine commit messages in the curl project.
-
- ---- start ----
- [area]: [short line describing the main effect]
-
- [separate the above single line from the rest with an empty line]
-
- [full description, no wider than 72 columns that describe as much as
- possible as to why this change is made, and possibly what things
- it fixes and everything else that is related]
- ---- stop ----
-
- Don't forget to use commit --author="" if you commit someone else's work,
- and make sure that you have your own user and email setup correctly in git
- before you commit
-
-3.6 Please don't send pull requests
-
- With git (and especially github) it is easy and tempting to send a pull
- request to one or more people in the curl project to have changes merged this
- way instead of mailing patches to the curl-library mailing list.
-
- We don't like that. We want them mailed for these reasons:
-
- - Peer review. Anyone and everyone on the list can review, comment and
- improve on the patch. Pull requests limit this ability.
-
- - Anyone can merge the patch into their own trees for testing and those who
- have push rights can push it to the main repo. It doesn't have to be anyone
- the patch author knows beforehand.
-
- - Commit messages can be tweaked and changed if merged locally instead of
- using github. Merges directly on github requires the changes to be perfect
- already, which they seldom are.
-
- - Merges on github prevents rebases and even enforces --no-ff which is a git
- style we don't otherwise use in the project
-
- However: once patches have been reviewed and deemed fine on list they are
- perfectly OK to be pulled from a published git tree.
diff --git a/libs/libcurl/docs/DISTRO-DILEMMA b/libs/libcurl/docs/DISTRO-DILEMMA
deleted file mode 100644
index 108e6bad12..0000000000
--- a/libs/libcurl/docs/DISTRO-DILEMMA
+++ /dev/null
@@ -1,176 +0,0 @@
- Date: February 11, 2007
- Author: Daniel Stenberg <daniel@haxx.se>
- URL: http://curl.haxx.se/legal/distro-dilemma.html
-
-Condition
-
- This document is written to describe the situation as it is right now.
- libcurl 7.16.1 is currently the latest version available. Things may of
- course change in the future.
-
- This document reflects my view and understanding of these things. Please tell
- me where and how you think I'm wrong, and I'll try to correct my mistakes.
-
-Background
-
- The Free Software Foundation has deemed the Original BSD license[1] to be
- "incompatible"[2] with GPL[3]. I'd rather say it is the other way around, but
- the point is the same: if you distribute a binary version of a GPL program,
- it MUST NOT be linked with any Original BSD-licensed parts or libraries.
- Doing so will violate the GPL license. For a long time, very many GPL
- licensed programs have avoided this license mess by adding an exception[8] to
- their license. And many others have just closed their eyes for this problem.
-
- libcurl is MIT-style[4] licensed - how on earth did this dilemma fall onto
- our plates?
-
- libcurl is only a little library. libcurl can be built to use OpenSSL for its
- SSL/TLS capabilities. OpenSSL is basically Original BSD licensed[5].
-
- If libcurl built to use OpenSSL is used by a GPL-licensed application and you
- decide to distribute a binary version of it (Linux distros - for example -
- tend to), you have a clash. GPL vs Original BSD.
-
- This dilemma is not libcurl-specific nor is it specific to any particular
- Linux distro. (This article mentions and refers to Debian several times, but
- only because Debian seems to be the only Linux distro to have faced this
- issue yet since no other distro is shipping libcurl built with two SSL
- libraries.)
-
-Part of the Operating System
-
- This would not be a problem if the used lib would be considered part of the
- underlying operating system, as then the GPL license has an exception
- clause[6] that allows applications to use such libs without having to be
- allowed to distribute it or its sources. Possibly some distros will claim
- that OpenSSL is part of their operating system.
-
- Debian does however not take this stance and has officially(?) claimed that
- OpenSSL is not a required part of the Debian operating system
-
- Some people claim that this paragraph cannot be exploited this way by a Linux
- distro, but I am not a lawyer and that is a discussion left outside of this
- document.
-
-GnuTLS
-
- Since May 2005 libcurl can get built to use GnuTLS instead of OpenSSL. GnuTLS
- is an LGPL[7] licensed library that offers a matching set of features as
- OpenSSL does. Now, you can build and distribute an TLS/SSL capable libcurl
- without including any Original BSD licensed code.
-
- I believe Debian is the first (only?) distro that provides libcurl/GnutTLS
- packages.
-
-yassl
-
- libcurl can get also get built to use yassl for the TLS/SSL layer. yassl is a
- GPL[3] licensed library.
-
-
-GnuTLS vs OpenSSL vs yassl
-
- While these three libraries offer similar features, they are not equal.
- libcurl does not (yet) offer a standardized stable ABI if you decide to
- switch from using libcurl-openssl to libcurl-gnutls or vice versa. The GnuTLS
- and yassl support is very recent in libcurl and it has not been tested nor
- used very extensively, while the OpenSSL equivalent code has been used and
- thus matured since 1999.
-
- GnuTLS
- - LGPL licensened
- - supports SRP
- - lacks SSLv2 support
- - lacks MD2 support (used by at least some CA certs)
- - lacks the crypto functions libcurl uses for NTLM
-
- OpenSSL
- - Original BSD licensened
- - lacks SRP
- - supports SSLv2
- - older and more widely used
- - provides crypto functions libcurl uses for NTLM
- - libcurl can do non-blocking connects with it in 7.15.4 and later
-
- yassl
- - GPL licensed
- - much untested and unproven in the real work by (lib)curl users so we don't
- know a lot about restrictions or benefits from using this
-
-The Better License, Original BSD, GPL or LGPL?
-
- It isn't obvious or without debate to any objective interested party that
- either of these licenses are the "better" or even the "preferred" one in a
- generic situation.
-
- Instead, I think we should accept the fact that the SSL/TLS libraries and
- their different licenses will fit different applications and their authors
- differently depending on the applications' licenses and their general usage
- pattern (considering how GPL and LGPL libraries for example can be burdensome
- for embedded systems usage).
-
- In Debian land, there seems to be a common opinion that LGPL is "maximally
- compatible" with apps while Original BSD is not. Like this:
-
- http://lists.debian.org/debian-devel/2005/09/msg01417.html
-
-More SSL Libraries
-
- In libcurl, there's no stopping us here. There are more Open Source/Free
- SSL/TLS libraries out there and we would very much like to support them as
- well, to offer application authors an even wider scope of choice.
-
-Application Angle of this Problem
-
- libcurl is built to use one SSL/TLS library. It uses a single fixed name (by
- default) on the built/created lib file, and applications are built/linked to
- use that single lib. Replacing one libcurl instance with another one that
- uses the other SSL/TLS library might break one or more applications (due to
- ABI differences and/or different feature set). You want your application to
- use the libcurl it was built for.
-
-Project cURL Angle of this Problem
-
- We distribute libcurl and everyone may build libcurl with either library at
- their choice. This problem is not directly a problem of ours. It merely
- affects users - GPL application authors only - of our lib as it comes
- included and delivered on some distros.
-
- libcurl has different ABI when built with different SSL/TLS libraries due to
- these reasons:
-
- 1. No one has worked on fixing this. The mutex/lock callbacks should be set
- with a generic libcurl function that should use the proper underlying
- functions.
-
- 2. The CURLOPT_SSL_CTX_FUNCTION option is not possible to "emulate" on GnuTLS
- but simply requires OpenSSL.
-
- 3. There might be some other subtle differences just because nobody has yet
- tried to make a fixed ABI like this.
-
-Distro Angle of this Problem
-
- To my knowledge there is only one distro that ships libcurl built with either
- OpenSSL or GnuTLS.
-
- Debian Linux is now (since mid September 2005) providing two different
- libcurl packages, one for libcurl built with OpenSSL and one built with
- GnuTLS. They use different .so names and can this both be installed in a
- single system simultaneously. This has been said to be a transitional system
- not desired to keep in the long run.
-
-Footnotes
-
- [1] = http://www.xfree86.org/3.3.6/COPYRIGHT2.html#6
- [2] = http://www.fsf.org/licensing/essays/bsd.html
- [3] = http://www.fsf.org/licensing/licenses/gpl.html
- [4] = http://curl.haxx.se/docs/copyright.html
- [5] = http://www.openssl.org/source/license.html
- [6] = http://www.fsf.org/licensing/licenses/gpl.html end of section 3
- [7] = http://www.fsf.org/licensing/licenses/lgpl.html
- [8] = http://en.wikipedia.org/wiki/OpenSSL_exception
-
-Feedback/Updates provided by
-
- Eric Cooper
diff --git a/libs/libcurl/docs/FAQ b/libs/libcurl/docs/FAQ
deleted file mode 100644
index b6f8958afc..0000000000
--- a/libs/libcurl/docs/FAQ
+++ /dev/null
@@ -1,1476 +0,0 @@
- _ _ ____ _
- ___| | | | _ \| |
- / __| | | | |_) | |
- | (__| |_| | _ <| |___
- \___|\___/|_| \_\_____|
-
-FAQ
-
- 1. Philosophy
- 1.1 What is cURL?
- 1.2 What is libcurl?
- 1.3 What is curl not?
- 1.4 When will you make curl do XXXX ?
- 1.5 Who makes curl?
- 1.6 What do you get for making curl?
- 1.7 What about CURL from curl.com?
- 1.8 I have a problem who do I mail?
- 1.9 Where do I buy commercial support for curl?
- 1.10 How many are using curl?
- 1.11 Why don't you update ca-bundle.crt
- 1.12 I have a problem who can I chat with?
- 1.13 curl's ECCN number?
- 1.14 How do I submit my patch?
-
- 2. Install Related Problems
- 2.1 configure doesn't find OpenSSL even when it is installed
- 2.1.1 native linker doesn't find OpenSSL
- 2.1.2 only the libssl lib is missing
- 2.2 Does curl work/build with other SSL libraries?
- 2.3 Where can I find a copy of LIBEAY32.DLL?
- 2.4 Does curl support SOCKS (RFC 1928) ?
-
- 3. Usage Problems
- 3.1 curl: (1) SSL is disabled, https: not supported
- 3.2 How do I tell curl to resume a transfer?
- 3.3 Why doesn't my posting using -F work?
- 3.4 How do I tell curl to run custom FTP commands?
- 3.5 How can I disable the Accept: */* header?
- 3.6 Does curl support ASP, XML, XHTML or HTML version Y?
- 3.7 Can I use curl to delete/rename a file through FTP?
- 3.8 How do I tell curl to follow HTTP redirects?
- 3.9 How do I use curl in my favorite programming language?
- 3.10 What about SOAP, WebDAV, XML-RPC or similar protocols over HTTP?
- 3.11 How do I POST with a different Content-Type?
- 3.12 Why do FTP specific features over HTTP proxy fail?
- 3.13 Why does my single/double quotes fail?
- 3.14 Does curl support Javascript or PAC (automated proxy config)?
- 3.15 Can I do recursive fetches with curl?
- 3.16 What certificates do I need when I use SSL?
- 3.17 How do I list the root dir of an FTP server?
- 3.18 Can I use curl to send a POST/PUT and not wait for a response?
- 3.19 How do I get HTTP from a host using a specific IP address?
- 3.20 How to SFTP from my user's home directory?
- 3.21 Protocol xxx not supported or disabled in libcurl
- 3.22 curl -X gives me HTTP problems
-
- 4. Running Problems
- 4.1 Problems connecting to SSL servers.
- 4.2 Why do I get problems when I use & or % in the URL?
- 4.3 How can I use {, }, [ or ] to specify multiple URLs?
- 4.4 Why do I get downloaded data even though the web page doesn't exist?
- 4.5 Why do I get return code XXX from a HTTP server?
- 4.5.1 "400 Bad Request"
- 4.5.2 "401 Unauthorized"
- 4.5.3 "403 Forbidden"
- 4.5.4 "404 Not Found"
- 4.5.5 "405 Method Not Allowed"
- 4.5.6 "301 Moved Permanently"
- 4.6 Can you tell me what error code 142 means?
- 4.7 How do I keep user names and passwords secret in Curl command lines?
- 4.8 I found a bug!
- 4.9 Curl can't authenticate to the server that requires NTLM?
- 4.10 My HTTP request using HEAD, PUT or DELETE doesn't work!
- 4.11 Why does my HTTP range requests return the full document?
- 4.12 Why do I get "certificate verify failed" ?
- 4.13 Why is curl -R on Windows one hour off?
- 4.14 Redirects work in browser but not with curl!
- 4.15 FTPS doesn't work
- 4.16 My HTTP POST or PUT requests are slow!
- 4.17 Non-functional connect timeouts on Windows
- 4.18 file:// URLs containing drive letters (Windows, NetWare)
- 4.19 Why doesn't cURL return an error when the network cable is unplugged?
-
- 5. libcurl Issues
- 5.1 Is libcurl thread-safe?
- 5.2 How can I receive all data into a large memory chunk?
- 5.3 How do I fetch multiple files with libcurl?
- 5.4 Does libcurl do Winsock initing on win32 systems?
- 5.5 Does CURLOPT_WRITEDATA and CURLOPT_READDATA work on win32 ?
- 5.6 What about Keep-Alive or persistent connections?
- 5.7 Link errors when building libcurl on Windows!
- 5.8 libcurl.so.X: open failed: No such file or directory
- 5.9 How does libcurl resolve host names?
- 5.10 How do I prevent libcurl from writing the response to stdout?
- 5.11 How do I make libcurl not receive the whole HTTP response?
- 5.12 Can I make libcurl fake or hide my real IP address?
- 5.13 How do I stop an ongoing transfer?
- 5.14 Using C++ non-static functions for callbacks?
- 5.15 How do I get an FTP directory listing?
- 5.16 I want a different time-out!
- 5.17 Can I write a server with libcurl?
-
- 6. License Issues
- 6.1 I have a GPL program, can I use the libcurl library?
- 6.2 I have a closed-source program, can I use the libcurl library?
- 6.3 I have a BSD licensed program, can I use the libcurl library?
- 6.4 I have a program that uses LGPL libraries, can I use libcurl?
- 6.5 Can I modify curl/libcurl for my program and keep the changes secret?
- 6.6 Can you please change the curl/libcurl license to XXXX?
- 6.7 What are my obligations when using libcurl in my commercial apps?
-
- 7. PHP/CURL Issues
- 7.1 What is PHP/CURL?
- 7.2 Who wrote PHP/CURL?
- 7.3 Can I perform multiple requests using the same handle?
-
-==============================================================================
-
-1. Philosophy
-
- 1.1 What is cURL?
-
- cURL is the name of the project. The name is a play on 'Client for URLs',
- originally with URL spelled in uppercase to make it obvious it deals with
- URLs. The fact it can also be pronounced 'see URL' also helped, it works as
- an abbreviation for "Client URL Request Library" or why not the recursive
- version: "Curl URL Request Library".
-
- The cURL project produces two products:
-
- libcurl
-
- A free and easy-to-use client-side URL transfer library, supporting DICT,
- FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3,
- POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP.
-
- libcurl supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading,
- kerberos, HTTP form based upload, proxies, cookies, user+password
- authentication, file transfer resume, http proxy tunneling and more!
-
- libcurl is highly portable, it builds and works identically on numerous
- platforms, including Solaris, NetBSD, FreeBSD, OpenBSD, Darwin, HPUX,
- IRIX, AIX, Tru64, Linux, UnixWare, HURD, Windows, Amiga, OS/2, BeOS, Mac
- OS X, Ultrix, QNX, OpenVMS, RISC OS, Novell NetWare, DOS, Symbian, OSF,
- Android, Minix, IBM TPF and more...
-
- libcurl is free, thread-safe, IPv6 compatible, feature rich, well
- supported and fast.
-
- curl
-
- A command line tool for getting or sending files using URL syntax.
-
- Since curl uses libcurl, curl supports the same wide range of common
- Internet protocols that libcurl does.
-
- We pronounce curl and cURL with an initial k sound: [kurl].
-
- There are numerous sub-projects and related projects that also use the word
- curl in the project names in various combinations, but you should take
- notice that this FAQ is directed at the command-line tool named curl (and
- libcurl the library), and may therefore not be valid for other curl-related
- projects. (There is however a small section for the PHP/CURL in this FAQ.)
-
- 1.2 What is libcurl?
-
- libcurl is a reliable and portable library which provides you with an easy
- interface to a range of common Internet protocols.
-
- You can use libcurl for free in your application, be it open source,
- commercial or closed-source.
-
- libcurl is most probably the most portable, most powerful and most often
- used C-based multi-platform file transfer library on this planet - be it
- open source or commercial.
-
- 1.3 What is curl not?
-
- Curl is not a wget clone. That is a common misconception. Never, during
- curl's development, have we intended curl to replace wget or compete on its
- market. Curl is targeted at single-shot file transfers.
-
- Curl is not a web site mirroring program. If you want to use curl to mirror
- something: fine, go ahead and write a script that wraps around curl to make
- it reality (like curlmirror.pl does).
-
- Curl is not an FTP site mirroring program. Sure, get and send FTP with curl
- but if you want systematic and sequential behavior you should write a
- script (or write a new program that interfaces libcurl) and do it.
-
- Curl is not a PHP tool, even though it works perfectly well when used from
- or with PHP (when using the PHP/CURL module).
-
- Curl is not a program for a single operating system. Curl exists, compiles,
- builds and runs under a wide range of operating systems, including all
- modern Unixes (and a bunch of older ones too), Windows, Amiga, BeOS, OS/2,
- OS X, QNX etc.
-
- 1.4 When will you make curl do XXXX ?
-
- We love suggestions of what to change in order to make curl and libcurl
- better. We do however believe in a few rules when it comes to the future of
- curl:
-
- Curl -- the command line tool -- is to remain a non-graphical command line
- tool. If you want GUIs or fancy scripting capabilities, you should look for
- another tool that uses libcurl.
-
- We do not add things to curl that other small and available tools already do
- very fine at the side. Curl's output is fine to pipe into another program or
- redirect to another file for the next program to interpret.
-
- We focus on protocol related issues and improvements. If you wanna do more
- magic with the supported protocols than curl currently does, chances are big
- we will agree. If you wanna add more protocols, we may very well agree.
-
- If you want someone else to make all the work while you wait for us to
- implement it for you, that is not a very friendly attitude. We spend a
- considerable time already on maintaining and developing curl. In order to
- get more out of us, you should consider trading in some of your time and
- efforts in return.
-
- If you write the code, chances are bigger that it will get into curl faster.
-
- 1.5 Who makes curl?
-
- curl and libcurl are not made by any single individual. Daniel Stenberg is
- project leader and main developer, but other persons' submissions are
- important and crucial. Anyone can contribute and post their changes and
- improvements and have them inserted in the main sources (of course on the
- condition that developers agree on that the fixes are good).
-
- The full list of all contributors is found in the docs/THANKS file.
-
- curl is developed by a community, with Daniel at the wheel.
-
- 1.6 What do you get for making curl?
-
- Project cURL is entirely free and open. No person gets paid for developing
- (lib)curl on full or even part time. We do this voluntarily on our spare
- time. Occasionally companies pay individual developers to work on curl, but
- that's up to each company and developer. It is not controlled by nor
- supervised in any way by the project.
-
- We still get help from companies. Haxx provides web site, bandwidth, mailing
- lists etc, sourceforge.net hosts project services we take advantage from,
- like the bug tracker and github hosts the primary git repository. Also
- again, some companies have sponsored certain parts of the development in the
- past and I hope some will continue to do so in the future.
-
- If you want to support our project, consider a donation or a banner-program
- or even better: by helping us coding, documenting, testing etc.
-
- 1.7 What about CURL from curl.com?
-
- During the summer 2001, curl.com was busy advertising their client-side
- programming language for the web, named CURL.
-
- We are in no way associated with curl.com or their CURL programming
- language.
-
- Our project name curl has been in effective use since 1998. We were not the
- first computer related project to use the name "curl" and do not claim any
- rights to the name.
-
- We recognize that we will be living in parallel with curl.com and wish them
- every success.
-
- 1.8 I have a problem who do I mail?
-
- Please do not mail any single individual unless you really need to. Keep
- curl-related questions on a suitable mailing list. All available mailing
- lists are listed in the MANUAL document and online at
- http://curl.haxx.se/mail/
-
- Keeping curl-related questions and discussions on mailing lists allows
- others to join in and help, to share their ideas, contribute their
- suggestions and spread their wisdom. Keeping discussions on public mailing
- lists also allows for others to learn from this (both current and future
- users thanks to the web based archives of the mailing lists), thus saving us
- from having to repeat ourselves even more. Thanks for respecting this.
-
- If you have found or simply suspect a security problem in curl or libcurl,
- mail curl-security at haxx.se (closed list of receivers, mails are not
- disclosed) and tell. Then we can produce a fix in a timely manner before the
- flaw is announced to the world, thus lessen the impact the problem will have
- on existing users.
-
- 1.9 Where do I buy commercial support for curl?
-
- curl is fully open source. It means you can hire any skilled engineer to fix
- your curl-related problems.
-
- We list available alternatives on the curl web site:
- http://curl.haxx.se/support.html
-
- 1.10 How many are using curl?
-
- It is impossible to tell.
-
- We don't know how many users that knowingly have installed and use curl.
-
- We don't know how many users that use curl without knowing that they are in
- fact using it.
-
- We don't know how many users that downloaded or installed curl and then
- never use it.
-
- In May 2012 Daniel did a counting game and came up with a number that may
- be completely wrong or somewhat accurate. Over 500 million!
-
- See http://daniel.haxx.se/blog/2012/05/16/300m-users/
-
- 1.11 Why don't you update ca-bundle.crt
-
- The ca cert bundle that used to shipped with curl was very outdated and must
- be replaced with an up-to-date version by anyone who wants to verify
- peers. It is no longer provided by curl. The last curl release ever that
- shipped a ca cert bundle was curl 7.18.0.
-
- In the cURL project we've decided not to attempt to keep this file updated
- (or even present anymore) since deciding what to add to a ca cert bundle is
- an undertaking we've not been ready to accept, and the one we can get from
- Mozilla is perfectly fine so there's no need to duplicate that work.
-
- Today, with many services performed over HTTPS, every operating system
- should come with a default ca cert bundle that can be deemed somewhat
- trustworthy and that collection (if reasonably updated) should be deemed to
- be a lot better than a private curl version.
-
- If you want the most recent collection of ca certs that Mozilla Firefox
- uses, we recommend that you extract the collection yourself from Mozilla
- Firefox (by running 'make ca-bundle), or by using our online service setup
- for this purpose: http://curl.haxx.se/docs/caextract.html
-
- 1.12 I have a problem who can I chat with?
-
- There's a bunch of friendly people hanging out in the #curl channel on the
- IRC network irc.freenode.net. If you're polite and nice, chances are big
- that you can get -- or provide -- help instantly.
-
- 1.13 curl's ECCN number?
-
- The US government restricts exports of software that contains or uses
- cryptography. When doing so, the Export Control Classification Number (ECCN)
- is used to identify the level of export control etc.
-
- ASF gives a good explanation at http://www.apache.org/dev/crypto.html
-
- We believe curl's number might be ECCN 5D002, another possibility is
- 5D992. It seems necessary to write them, asking to confirm.
-
- Comprehensible explanations of the meaning of such numbers and how to
- obtain them (resp.) are here
-
- http://www.bis.doc.gov/licensing/exportingbasics.htm
- http://www.bis.doc.gov/licensing/do_i_needaneccn.html
-
- An incomprehensible description of the two numbers above is here
- http://www.access.gpo.gov/bis/ear/pdf/ccl5-pt2.pdf
-
- 1.14 How do I submit my patch?
-
- When you have made a patch or a change of whatever sort, and want to submit
- that to the project, there are a few different ways we prefer:
-
- o send a patch to the curl-library mailing list. We're many subscribers
- there and there are lots of people who can review patches, comment on them
- and "receive" them properly.
-
- o if your patch changes or fixes a bug, you can also opt to submit a bug
- report in the bug tracker and attach your patch there. There are less
- people involved there.
-
- Lots of more details are found in the CONTRIBUTE and INTERNALS docs.
-
-
-2. Install Related Problems
-
- 2.1 configure doesn't find OpenSSL even when it is installed
-
- This may be because of several reasons.
-
- 2.1.1 native linker doesn't find openssl
-
- Affected platforms:
- Solaris (native cc compiler)
- HPUX (native cc compiler)
- SGI IRIX (native cc compiler)
- SCO UNIX (native cc compiler)
-
- When configuring curl, I specify --with-ssl. OpenSSL is installed in
- /usr/local/ssl Configure reports SSL in /usr/local/ssl, but fails to find
- CRYPTO_lock in -lcrypto
-
- Cause: The cc for this test places the -L/usr/local/ssl/lib AFTER
- -lcrypto, so ld can't find the library. This is due to a bug in the GNU
- autoconf tool.
-
- Workaround: Specifying "LDFLAGS=-L/usr/local/ssl/lib" in front of
- ./configure places the -L/usr/local/ssl/lib early enough in the command
- line to make things work
-
- 2.1.2 only the libssl lib is missing
-
- If all include files and the libcrypto lib is present, with only the
- libssl being missing according to configure, this is mostly likely because
- a few functions are left out from the libssl.
-
- If the function names missing include RSA or RSAREF you can be certain
- that this is because libssl requires the RSA and RSAREF libs to build.
-
- See the INSTALL file section that explains how to add those libs to
- configure. Make sure that you remove the config.cache file before you
- rerun configure with the new flags.
-
- 2.2 Does curl work/build with other SSL libraries?
-
- Curl has been written to use a generic SSL function layer internally, and
- that SSL functionality can then be provided by one out of many different SSL
- backends.
-
- curl can be built to use one of the following SSL alternatives: OpenSSL,
- GnuTLS, yassl, NSS, PolarSSL, axTLS, Secure Transport (native iOS/OS X),
- schannel (native Windows) or qssl (native IBM i). They all have their pros
- and cons, and we try to maintain a comparison of them here:
- http://curl.haxx.se/docs/ssl-compared.html
-
- 2.3 Where can I find a copy of LIBEAY32.DLL?
-
- That is an OpenSSL binary built for Windows.
-
- Curl can be built with OpenSSL to do the SSL stuff. The LIBEAY32.DLL is then
- what curl needs on a windows machine to do https:// etc. Check out the curl
- web site to find accurate and up-to-date pointers to recent OpenSSL DLLs and
- other binary packages.
-
- 2.4 Does curl support SOCKS (RFC 1928) ?
-
- Yes, SOCKS 4 and 5 are supported.
-
-
-3. Usage problems
-
- 3.1 curl: (1) SSL is disabled, https: not supported
-
- If you get this output when trying to get anything from a https:// server,
- it means that the instance of curl/libcurl that you're using was built
- without support for this protocol.
-
- This could've happened if the configure script that was run at build time
- couldn't find all libs and include files curl requires for SSL to work. If
- the configure script fails to find them, curl is simply built without SSL
- support.
-
- To get the https:// support into a curl that was previously built but that
- reports that https:// is not supported, you should dig through the document
- and logs and check out why the configure script doesn't find the SSL libs
- and/or include files.
-
- Also, check out the other paragraph in this FAQ labelled "configure doesn't
- find OpenSSL even when it is installed".
-
- 3.2 How do I tell curl to resume a transfer?
-
- Curl supports resumed transfers both ways on both FTP and HTTP.
- Try the -C option.
-
- 3.3 Why doesn't my posting using -F work?
-
- You can't simply use -F or -d at your choice. The web server that will
- receive your post expects one of the formats. If the form you're trying to
- submit uses the type 'multipart/form-data', then and only then you must use
- the -F type. In all the most common cases, you should use -d which then
- causes a posting with the type 'application/x-www-form-urlencoded'.
-
- This is described in some detail in the MANUAL and TheArtOfHttpScripting
- documents, and if you don't understand it the first time, read it again
- before you post questions about this to the mailing list. Also, try reading
- through the mailing list archives for old postings and questions regarding
- this.
-
- 3.4 How do I tell curl to run custom FTP commands?
-
- You can tell curl to perform optional commands both before and/or after a
- file transfer. Study the -Q/--quote option.
-
- Since curl is used for file transfers, you don't normally use curl to
- perform FTP commands without transferring anything. Therefore you must
- always specify a URL to transfer to/from even when doing custom FTP
- commands, or use -I which implies the "no body" option sent to libcurl.
-
- 3.5 How can I disable the Accept: */* header?
-
- You can change all internally generated headers by adding a replacement with
- the -H/--header option. By adding a header with empty contents you safely
- disable that one. Use -H "Accept:" to disable that specific header.
-
- 3.6 Does curl support ASP, XML, XHTML or HTML version Y?
-
- To curl, all contents are alike. It doesn't matter how the page was
- generated. It may be ASP, PHP, Perl, shell-script, SSI or plain HTML
- files. There's no difference to curl and it doesn't even know what kind of
- language that generated the page.
-
- See also item 3.14 regarding javascript.
-
- 3.7 Can I use curl to delete/rename a file through FTP?
-
- Yes. You specify custom FTP commands with -Q/--quote.
-
- One example would be to delete a file after you have downloaded it:
-
- curl -O ftp://download.com/coolfile -Q '-DELE coolfile'
-
- or rename a file after upload:
-
- curl -T infile ftp://upload.com/dir/ -Q "-RNFR infile" -Q "-RNTO newname"
-
- 3.8 How do I tell curl to follow HTTP redirects?
-
- Curl does not follow so-called redirects by default. The Location: header
- that informs the client about this is only interpreted if you're using the
- -L/--location option. As in:
-
- curl -L http://redirector.com
-
- Not all redirects are HTTP ones, see 4.14
-
- 3.9 How do I use curl in my favorite programming language?
-
- There exist many language interfaces/bindings for curl that integrates it
- better with various languages. If you are fluid in a script language, you
- may very well opt to use such an interface instead of using the command line
- tool.
-
- Find out more about which languages that support curl directly, and how to
- install and use them, in the libcurl section of the curl web site:
- http://curl.haxx.se/libcurl/
-
- All the various bindings to libcurl are made by other projects and people,
- outside of the cURL project. The cURL project itself only produces libcurl
- with its plain C API. If you don't find anywhere else to ask you can ask
- about bindings on the curl-library list too, but be prepared that people on
- that list may not know anything about bindings.
-
- In October 2009, there were interfaces available for the following
- languages: Ada95, Basic, C, C++, Ch, Cocoa, D, Dylan, Eiffel, Euphoria,
- Ferite, Gambas, glib/GTK+, Haskell, ILE/RPG, Java, Lisp, Lua, Mono, .NET,
- Object-Pascal, O'Caml, Pascal, Perl, PHP, PostgreSQL, Python, R, Rexx, Ruby,
- Scheme, S-Lang, Smalltalk, SP-Forth, SPL, Tcl, Visual Basic, Visual FoxPro,
- Q, wxwidgets and XBLite. By the time you read this, additional ones may have
- appeared!
-
- 3.10 What about SOAP, WebDAV, XML-RPC or similar protocols over HTTP?
-
- Curl adheres to the HTTP spec, which basically means you can play with *any*
- protocol that is built on top of HTTP. Protocols such as SOAP, WEBDAV and
- XML-RPC are all such ones. You can use -X to set custom requests and -H to
- set custom headers (or replace internally generated ones).
-
- Using libcurl is of course just as fine and you'd just use the proper
- library options to do the same.
-
- 3.11 How do I POST with a different Content-Type?
-
- You can always replace the internally generated headers with -H/--header.
- To make a simple HTTP POST with text/xml as content-type, do something like:
-
- curl -d "datatopost" -H "Content-Type: text/xml" [URL]
-
- 3.12 Why do FTP specific features over HTTP proxy fail?
-
- Because when you use a HTTP proxy, the protocol spoken on the network will
- be HTTP, even if you specify a FTP URL. This effectively means that you
- normally can't use FTP specific features such as FTP upload and FTP quote
- etc.
-
- There is one exception to this rule, and that is if you can "tunnel through"
- the given HTTP proxy. Proxy tunneling is enabled with a special option (-p)
- and is generally not available as proxy admins usually disable tunneling to
- other ports than 443 (which is used for HTTPS access through proxies).
-
- 3.13 Why does my single/double quotes fail?
-
- To specify a command line option that includes spaces, you might need to
- put the entire option within quotes. Like in:
-
- curl -d " with spaces " url.com
-
- or perhaps
-
- curl -d ' with spaces ' url.com
-
- Exactly what kind of quotes and how to do this is entirely up to the shell
- or command line interpreter that you are using. For most unix shells, you
- can more or less pick either single (') or double (") quotes. For
- Windows/DOS prompts I believe you're forced to use double (") quotes.
-
- Please study the documentation for your particular environment. Examples in
- the curl docs will use a mix of both these ones as shown above. You must
- adjust them to work in your environment.
-
- Remember that curl works and runs on more operating systems than most single
- individuals have ever tried.
-
- 3.14 Does curl support Javascript or PAC (automated proxy config)?
-
- Many web pages do magic stuff using embedded Javascript. Curl and libcurl
- have no built-in support for that, so it will be treated just like any other
- contents.
-
- .pac files are a netscape invention and are sometimes used by organizations
- to allow them to differentiate which proxies to use. The .pac contents is
- just a Javascript program that gets invoked by the browser and that returns
- the name of the proxy to connect to. Since curl doesn't support Javascript,
- it can't support .pac proxy configuration either.
-
- Some workarounds usually suggested to overcome this Javascript dependency:
-
- Depending on the Javascript complexity, write up a script that translates it
- to another language and execute that.
-
- Read the Javascript code and rewrite the same logic in another language.
-
- Implement a Javascript interpreter, people have successfully used the
- Mozilla Javascript engine in the past.
-
- Ask your admins to stop this, for a static proxy setup or similar.
-
- 3.15 Can I do recursive fetches with curl?
-
- No. curl itself has no code that performs recursive operations, such as
- those performed by wget and similar tools.
-
- There exist wrapper scripts with that functionality (for example the
- curlmirror perl script), and you can write programs based on libcurl to do
- it, but the command line tool curl itself cannot.
-
- 3.16 What certificates do I need when I use SSL?
-
- There are three different kinds of "certificates" to keep track of when we
- talk about using SSL-based protocols (HTTPS or FTPS) using curl or libcurl.
-
- CLIENT CERTIFICATE
-
- The server you communicate may require that you can provide this in order to
- prove that you actually are who you claim to be. If the server doesn't
- require this, you don't need a client certificate.
-
- A client certificate is always used together with a private key, and the
- private key has a pass phrase that protects it.
-
- SERVER CERTIFICATE
-
- The server you communicate with has a server certificate. You can and should
- verify this certificate to make sure that you are truly talking to the real
- server and not a server impersonating it.
-
- CERTIFICATE AUTHORITY CERTIFICATE ("CA cert")
-
- You often have several CA certs in a CA cert bundle that can be used to
- verify a server certificate that was signed by one of the authorities in the
- bundle. curl does not come with a CA cert bundle but most curl installs
- provide one. You can also override the default.
-
- The server certificate verification process is made by using a Certificate
- Authority certificate ("CA cert") that was used to sign the server
- certificate. Server certificate verification is enabled by default in curl
- and libcurl and is often the reason for problems as explained in FAQ entry
- 4.12 and the SSLCERTS document
- (http://curl.haxx.se/docs/sslcerts.html). Server certificates that are
- "self-signed" or otherwise signed by a CA that you do not have a CA cert
- for, cannot be verified. If the verification during a connect fails, you are
- refused access. You then need to explicitly disable the verification to
- connect to the server.
-
- 3.17 How do I list the root dir of an FTP server?
-
- There are two ways. The way defined in the RFC is to use an encoded slash
- in the first path part. List the "/tmp" dir like this:
-
- curl ftp://ftp.sunet.se/%2ftmp/
-
- or the not-quite-kosher-but-more-readable way, by simply starting the path
- section of the URL with a slash:
-
- curl ftp://ftp.sunet.se//tmp/
-
- 3.18 Can I use curl to send a POST/PUT and not wait for a response?
-
- No.
-
- But you could easily write your own program using libcurl to do such stunts.
-
- 3.19 How do I get HTTP from a host using a specific IP address?
-
- For example, you may be trying out a web site installation that isn't yet in
- the DNS. Or you have a site using multiple IP addresses for a given host
- name and you want to address a specific one out of the set.
-
- Set a custom Host: header that identifies the server name you want to reach
- but use the target IP address in the URL:
-
- curl --header "Host: www.example.com" http://127.0.0.1/
-
- You can also opt to add faked host name entries to curl with the --resolve
- option. That has the added benefit that things like redirects will also work
- properly. The above operation would instead be done as:
-
- curl --resolve www.example.com:80:127.0.0.1 http://www.example.com/
-
- 3.20 How to SFTP from my user's home directory?
-
- Contrary to how FTP works, SFTP and SCP URLs specify the exact directory to
- work with. It means that if you don't specify that you want the user's home
- directory, you get the actual root directory.
-
- To specify a file in your user's home directory, you need to use the correct
- URL syntax which for sftp might look similar to:
-
- curl -O -u user:password sftp://example.com/~/file.txt
-
- and for SCP it is just a different protocol prefix:
-
- curl -O -u user:password scp://example.com/~/file.txt
-
- 3.21 Protocol xxx not supported or disabled in libcurl
-
- When passing on a URL to curl to use, it may respond that the particular
- protocol is not supported or disabled. The particular way this error message
- is phrased is because curl doesn't make a distinction internally of whether
- a particular protocol is not supported (i.e. never got any code added that
- knows how to speak that protocol) or if it was explicitly disabled. curl can
- be built to only support a given set of protocols, and the rest would then
- be disabled or not supported.
-
- Note that this error will also occur if you pass a wrongly spelled protocol
- part as in "htpt://example.com" or as in the less evident case if you prefix
- the protocol part with a space as in " http://example.com/".
-
- 3.22 curl -X gives me HTTP problems
-
- In normal circumstances, -X should hardly ever be used.
-
- By default you use curl without explicitly saying which request method to
- use when the URL identifies a HTTP transfer. If you just pass in a URL like
- "curl http://example.com" it will use GET. If you use -d or -F curl will use
- POST, -I will cause a HEAD and -T will make it a PUT.
-
- If for whatever reason you're not happy with these default choices that curl
- does for you, you can override those request methods by specifying -X
- [WHATEVER]. This way you can for example send a DELETE by doing "curl -X
- DELETE [URL]".
-
- It is thus pointless to do "curl -XGET [URL]" as GET would be used
- anyway. In the same vein it is pointless to do "curl -X POST -d data
- [URL]"... But you can make a fun and somewhat rare request that sends a
- request-body in a GET request with something like "curl -X GET -d data
- [URL]"
-
- Note that -X doesn't change curl's behavior. It only modifies the actual
- string sent in the request.
-
- Accordingly, by using -XPOST on a command line that for example would follow
- a 303 redirect, you will effectively prevent curl from behaving
- correctly. Be aware.
-
-
-4. Running Problems
-
- 4.1 Problems connecting to SSL servers.
-
- It took a very long time before we could sort out why curl had problems to
- connect to certain SSL servers when using SSLeay or OpenSSL v0.9+. The
- error sometimes showed up similar to:
-
- 16570:error:1407D071:SSL routines:SSL2_READ:bad mac decode:s2_pkt.c:233:
-
- It turned out to be because many older SSL servers don't deal with SSLv3
- requests properly. To correct this problem, tell curl to select SSLv2 from
- the command line (-2/--sslv2).
-
- There have also been examples where the remote server didn't like the SSLv2
- request and instead you had to force curl to use SSLv3 with -3/--sslv3.
-
- 4.2 Why do I get problems when I use & or % in the URL?
-
- In general unix shells, the & symbol is treated specially and when used, it
- runs the specified command in the background. To safely send the & as a part
- of a URL, you should quote the entire URL by using single (') or double (")
- quotes around it. Similar problems can also occur on some shells with other
- characters, including ?*!$~(){}<>\|;`. When in doubt, quote the URL.
-
- An example that would invoke a remote CGI that uses &-symbols could be:
-
- curl 'http://www.altavista.com/cgi-bin/query?text=yes&q=curl'
-
- In Windows, the standard DOS shell treats the percent sign specially and you
- need to use TWO percent signs for each single one you want to use in the
- URL.
-
- If you want a literal percent sign to be part of the data you pass in a POST
- using -d/--data you must encode it as '%25' (which then also needs the
- percent sign doubled on Windows machines).
-
- 4.3 How can I use {, }, [ or ] to specify multiple URLs?
-
- Because those letters have a special meaning to the shell, and to be used in
- a URL specified to curl you must quote them.
-
- An example that downloads two URLs (sequentially) would do:
-
- curl '{curl,www}.haxx.se'
-
- To be able to use those letters as actual parts of the URL (without using
- them for the curl URL "globbing" system), use the -g/--globoff option:
-
- curl -g 'www.site.com/weirdname[].html'
-
- 4.4 Why do I get downloaded data even though the web page doesn't exist?
-
- Curl asks remote servers for the page you specify. If the page doesn't exist
- at the server, the HTTP protocol defines how the server should respond and
- that means that headers and a "page" will be returned. That's simply how
- HTTP works.
-
- By using the --fail option you can tell curl explicitly to not get any data
- if the HTTP return code doesn't say success.
-
- 4.5 Why do I get return code XXX from a HTTP server?
-
- RFC2616 clearly explains the return codes. This is a short transcript. Go
- read the RFC for exact details:
-
- 4.5.1 "400 Bad Request"
-
- The request could not be understood by the server due to malformed
- syntax. The client SHOULD NOT repeat the request without modifications.
-
- 4.5.2 "401 Unauthorized"
-
- The request requires user authentication.
-
- 4.5.3 "403 Forbidden"
-
- The server understood the request, but is refusing to fulfil it.
- Authorization will not help and the request SHOULD NOT be repeated.
-
- 4.5.4 "404 Not Found"
-
- The server has not found anything matching the Request-URI. No indication
- is given of whether the condition is temporary or permanent.
-
- 4.5.5 "405 Method Not Allowed"
-
- The method specified in the Request-Line is not allowed for the resource
- identified by the Request-URI. The response MUST include an Allow header
- containing a list of valid methods for the requested resource.
-
- 4.5.6 "301 Moved Permanently"
-
- If you get this return code and an HTML output similar to this:
-
- <H1>Moved Permanently</H1> The document has moved <A
- HREF="http://same_url_now_with_a_trailing_slash/">here</A>.
-
- it might be because you request a directory URL but without the trailing
- slash. Try the same operation again _with_ the trailing URL, or use the
- -L/--location option to follow the redirection.
-
- 4.6 Can you tell me what error code 142 means?
-
- All curl error codes are described at the end of the man page, in the
- section called "EXIT CODES".
-
- Error codes that are larger than the highest documented error code means
- that curl has exited due to a crash. This is a serious error, and we
- appreciate a detailed bug report from you that describes how we could go
- ahead and repeat this!
-
- 4.7 How do I keep user names and passwords secret in Curl command lines?
-
- This problem has two sides:
-
- The first part is to avoid having clear-text passwords in the command line
- so that they don't appear in 'ps' outputs and similar. That is easily
- avoided by using the "-K" option to tell curl to read parameters from a file
- or stdin to which you can pass the secret info. curl itself will also
- attempt to "hide" the given password by blanking out the option - this
- doesn't work on all platforms.
-
- To keep the passwords in your account secret from the rest of the world is
- not a task that curl addresses. You could of course encrypt them somehow to
- at least hide them from being read by human eyes, but that is not what
- anyone would call security.
-
- Also note that regular HTTP (using Basic authentication) and FTP passwords
- are sent in clear across the network. All it takes for anyone to fetch them
- is to listen on the network. Eavesdropping is very easy. Use more secure
- authentication methods (like Digest, Negotiate or even NTLM) or consider the
- SSL-based alternatives HTTPS and FTPS.
-
- 4.8 I found a bug!
-
- It is not a bug if the behavior is documented. Read the docs first.
- Especially check out the KNOWN_BUGS file, it may be a documented bug!
-
- If it is a problem with a binary you've downloaded or a package for your
- particular platform, try contacting the person who built the package/archive
- you have.
-
- If there is a bug, read the BUGS document first. Then report it as described
- in there.
-
- 4.9 Curl can't authenticate to the server that requires NTLM?
-
- NTLM support requires OpenSSL, GnuTLS, NSS, Secure Transport, or Microsoft
- Windows libraries at build-time to provide this functionality.
-
- NTLM is a Microsoft proprietary protocol. Proprietary formats are evil. You
- should not use such ones.
-
- 4.10 My HTTP request using HEAD, PUT or DELETE doesn't work!
-
- Many web servers allow or demand that the administrator configures the
- server properly for these requests to work on the web server.
-
- Some servers seem to support HEAD only on certain kinds of URLs.
-
- To fully grasp this, try the documentation for the particular server
- software you're trying to interact with. This is not anything curl can do
- anything about.
-
- 4.11 Why does my HTTP range requests return the full document?
-
- Because the range may not be supported by the server, or the server may
- choose to ignore it and return the full document anyway.
-
- 4.12 Why do I get "certificate verify failed" ?
-
- You invoke curl 7.10 or later to communicate on a https:// URL and get an
- error back looking something similar to this:
-
- curl: (35) SSL: error:14090086:SSL routines:
- SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
-
- Then it means that curl couldn't verify that the server's certificate was
- good. Curl verifies the certificate using the CA cert bundle that comes with
- the curl installation.
-
- To disable the verification (which makes it act like curl did before 7.10),
- use -k. This does however enable man-in-the-middle attacks.
-
- If you get this failure but are having a CA cert bundle installed and used,
- the server's certificate is not signed by one of the CA's in the bundle. It
- might for example be self-signed. You then correct this problem by obtaining
- a valid CA cert for the server. Or again, decrease the security by disabling
- this check.
-
- Details are also in the SSLCERTS file in the release archives, found online
- here: http://curl.haxx.se/docs/sslcerts.html
-
- 4.13 Why is curl -R on Windows one hour off?
-
- During daylight savings time, when -R is used, curl will set a time that
- appears one hour off. This happens due to a flaw in how Windows stores and
- uses file modification times and it is not easily worked around. For details
- on this problem, read this: http://www.codeproject.com/datetime/dstbugs.asp
-
- 4.14 Redirects work in browser but not with curl!
-
- curl supports HTTP redirects fine (see item 3.8). Browsers generally support
- at least two other ways to perform redirects that curl does not:
-
- Meta tags. You can write a HTML tag that will cause the browser to redirect
- to another given URL after a certain time.
-
- Javascript. You can write a Javascript program embedded in a HTML page that
- redirects the browser to another given URL.
-
- There is no way to make curl follow these redirects. You must either
- manually figure out what the page is set to do, or you write a script that
- parses the results and fetches the new URL.
-
- 4.15 FTPS doesn't work
-
- curl supports FTPS (sometimes known as FTP-SSL) both implicit and explicit
- mode.
-
- When a URL is used that starts with FTPS://, curl assumes implicit SSL on
- the control connection and will therefore immediately connect and try to
- speak SSL. FTPS:// connections default to port 990.
-
- To use explicit FTPS, you use a FTP:// URL and the --ftp-ssl option (or one
- of its related flavours). This is the most common method, and the one
- mandated by RFC4217. This kind of connection then of course uses the
- standard FTP port 21 by default.
-
- 4.16 My HTTP POST or PUT requests are slow!
-
- libcurl makes all POST and PUT requests (except for POST requests with a
- very tiny request body) use the "Expect: 100-continue" header. This header
- allows the server to deny the operation early so that libcurl can bail out
- already before having to send any data. This is useful in authentication
- cases and others.
-
- However, many servers don't implement the Expect: stuff properly and if the
- server doesn't respond (positively) within 1 second libcurl will continue
- and send off the data anyway.
-
- You can disable libcurl's use of the Expect: header the same way you disable
- any header, using -H / CURLOPT_HTTPHEADER, or by forcing it to use HTTP 1.0.
-
- 4.17 Non-functional connect timeouts
-
- In most Windows setups having a timeout longer than 21 seconds make no
- difference, as it will only send 3 TCP SYN packets and no more. The second
- packet sent three seconds after the first and the third six seconds after
- the second. No more than three packets are sent, no matter how long the
- timeout is set.
-
- See option TcpMaxConnectRetransmissions on this page:
- http://support.microsoft.com/?scid=kb%3Ben-us%3B175523&x=6&y=7
-
- Also, even on non-Windows systems there may run a firewall or anti-virus
- software or similar that accepts the connection but does not actually do
- anything else. This will make (lib)curl to consider the connection connected
- and thus the connect timeout won't trigger.
-
- 4.18 file:// URLs containing drive letters (Windows, NetWare)
-
- When using cURL to try to download a local file, one might use a URL
- in this format:
-
- file://D:/blah.txt
-
- You'll find that even if D:\blah.txt does exist, cURL returns a 'file
- not found' error.
-
- According to RFC 1738 (http://www.faqs.org/rfcs/rfc1738.html),
- file:// URLs must contain a host component, but it is ignored by
- most implementations. In the above example, 'D:' is treated as the
- host component, and is taken away. Thus, cURL tries to open '/blah.txt'.
- If your system is installed to drive C:, that will resolve to 'C:\blah.txt',
- and if that doesn't exist you will get the not found error.
-
- To fix this problem, use file:// URLs with *three* leading slashes:
-
- file:///D:/blah.txt
-
- Alternatively, if it makes more sense, specify 'localhost' as the host
- component:
-
- file://localhost/D:/blah.txt
-
- In either case, cURL should now be looking for the correct file.
-
- 4.19 Why doesn't cURL return an error when the network cable is unplugged?
-
- Unplugging a cable is not an error situation. The TCP/IP protocol stack
- was designed to be fault tolerant, so even though there may be a physical
- break somewhere the connection shouldn't be affected, just possibly
- delayed. Eventually, the physical break will be fixed or the data will be
- re-routed around the physical problem through another path.
-
- In such cases, the TCP/IP stack is responsible for detecting when the
- network connection is irrevocably lost. Since with some protocols it is
- perfectly legal for the client wait indefinitely for data, the stack may
- never report a problem, and even when it does, it can take up to 20 minutes
- for it to detect an issue. The curl option --keepalive-time enables
- keep-alive support in the TCP/IP stack which makes it periodically probe the
- connection to make sure it is still available to send data. That should
- reliably detect any TCP/IP network failure.
-
- But even that won't detect the network going down before the TCP/IP
- connection is established (e.g. during a DNS lookup) or using protocols that
- don't use TCP. To handle those situations, curl offers a number of timeouts
- on its own. --speed-limit/--speed-time will abort if the data transfer rate
- falls too low, and --connect-timeout and --max-time can be used to put an
- overall timeout on the connection phase or the entire transfer.
-
- A libcurl-using application running in a known physical environment (e.g.
- an embedded device with only a single network connection) may want to act
- immediately if its lone network connection goes down. That can be achieved
- by having the application monitor the network connection on its own using an
- OS-specific mechanism, then signalling libcurl to abort (see also item 5.13).
-
-
-5. libcurl Issues
-
- 5.1 Is libcurl thread-safe?
-
- Yes.
-
- We have written the libcurl code specifically adjusted for multi-threaded
- programs. libcurl will use thread-safe functions instead of non-safe ones if
- your system has such. Note that you must never share the same handle in
- multiple threads.
-
-
- If you use a OpenSSL-powered libcurl in a multi-threaded environment, you
- need to provide one or two locking functions:
-
- http://www.openssl.org/docs/crypto/threads.html
-
- If you use a GnuTLS-powered libcurl in a multi-threaded environment, you
- need to provide locking function(s) for libgcrypt (which is used by GnuTLS
- for the crypto functions).
-
- http://www.gnu.org/software/gnutls/manual/html_node/Multi_002dthreaded-applications.html
-
- No special locking is needed with a NSS-powered libcurl. NSS is thread-safe.
-
- 5.2 How can I receive all data into a large memory chunk?
-
- [ See also the examples/getinmemory.c source ]
-
- You are in full control of the callback function that gets called every time
- there is data received from the remote server. You can make that callback do
- whatever you want. You do not have to write the received data to a file.
-
- One solution to this problem could be to have a pointer to a struct that you
- pass to the callback function. You set the pointer using the
- CURLOPT_WRITEDATA option. Then that pointer will be passed to the callback
- instead of a FILE * to a file:
-
- /* imaginary struct */
- struct MemoryStruct {
- char *memory;
- size_t size;
- };
-
- /* imaginary callback function */
- size_t
- WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data)
- {
- size_t realsize = size * nmemb;
- struct MemoryStruct *mem = (struct MemoryStruct *)data;
-
- mem->memory = (char *)realloc(mem->memory, mem->size + realsize + 1);
- if (mem->memory) {
- memcpy(&(mem->memory[mem->size]), ptr, realsize);
- mem->size += realsize;
- mem->memory[mem->size] = 0;
- }
- return realsize;
- }
-
- 5.3 How do I fetch multiple files with libcurl?
-
- libcurl has excellent support for transferring multiple files. You should
- just repeatedly set new URLs with curl_easy_setopt() and then transfer it
- with curl_easy_perform(). The handle you get from curl_easy_init() is not
- only reusable, but you're even encouraged to reuse it if you can, as that
- will enable libcurl to use persistent connections.
-
- 5.4 Does libcurl do Winsock initialization on win32 systems?
-
- Yes, if told to in the curl_global_init() call.
-
- 5.5 Does CURLOPT_WRITEDATA and CURLOPT_READDATA work on win32 ?
-
- Yes, but you cannot open a FILE * and pass the pointer to a DLL and have
- that DLL use the FILE * (as the DLL and the client application cannot access
- each others' variable memory areas). If you set CURLOPT_WRITEDATA you must
- also use CURLOPT_WRITEFUNCTION as well to set a function that writes the
- file, even if that simply writes the data to the specified FILE *.
- Similarly, if you use CURLOPT_READDATA you must also specify
- CURLOPT_READFUNCTION.
-
- 5.6 What about Keep-Alive or persistent connections?
-
- curl and libcurl have excellent support for persistent connections when
- transferring several files from the same server. Curl will attempt to reuse
- connections for all URLs specified on the same command line/config file, and
- libcurl will reuse connections for all transfers that are made using the
- same libcurl handle.
-
- When you use the easy interface, the connection cache is kept within the
- easy handle. If you instead use the multi interface, the connection cache
- will be kept within the multi handle and will be shared among all the easy
- handles that are used within the same multi handle.
-
- 5.7 Link errors when building libcurl on Windows!
-
- You need to make sure that your project, and all the libraries (both static
- and dynamic) that it links against, are compiled/linked against the same run
- time library.
-
- This is determined by the /MD, /ML, /MT (and their corresponding /M?d)
- options to the command line compiler. /MD (linking against MSVCRT dll) seems
- to be the most commonly used option.
-
- When building an application that uses the static libcurl library, you must
- add -DCURL_STATICLIB to your CFLAGS. Otherwise the linker will look for
- dynamic import symbols. If you're using Visual Studio, you need to instead
- add CURL_STATICLIB in the "Preprocessor Definitions" section.
-
- If you get linker error like "unknown symbol __imp__curl_easy_init ..." you
- have linked against the wrong (static) library. If you want to use the
- libcurl.dll and import lib, you don't need any extra CFLAGS, but use one of
- the import libraries below. These are the libraries produced by the various
- lib/Makefile.* files:
-
- Target: static lib. import lib for libcurl*.dll.
- -----------------------------------------------------------
- MingW: libcurl.a libcurldll.a
- MSVC (release): libcurl.lib libcurl_imp.lib
- MSVC (debug): libcurld.lib libcurld_imp.lib
- Borland: libcurl.lib libcurl_imp.lib
-
- 5.8 libcurl.so.X: open failed: No such file or directory
-
- This is an error message you might get when you try to run a program linked
- with a shared version of libcurl and your run-time linker (ld.so) couldn't
- find the shared library named libcurl.so.X. (Where X is the number of the
- current libcurl ABI, typically 3 or 4).
-
- You need to make sure that ld.so finds libcurl.so.X. You can do that
- multiple ways, and it differs somewhat between different operating systems,
- but they are usually:
-
- * Add an option to the linker command line that specify the hard-coded path
- the run-time linker should check for the lib (usually -R)
-
- * Set an environment variable (LD_LIBRARY_PATH for example) where ld.so
- should check for libs
-
- * Adjust the system's config to check for libs in the directory where you've
- put the dir (like Linux's /etc/ld.so.conf)
-
- 'man ld.so' and 'man ld' will tell you more details
-
- 5.9 How does libcurl resolve host names?
-
- libcurl supports a large a number of different name resolve functions. One
- of them is picked at build-time and will be used unconditionally. Thus, if
- you want to change name resolver function you must rebuild libcurl and tell
- it to use a different function.
-
- - The non-ipv6 resolver that can use one out of four host name resolve calls
- (depending on what your system supports):
-
- A - gethostbyname()
- B - gethostbyname_r() with 3 arguments
- C - gethostbyname_r() with 5 arguments
- D - gethostbyname_r() with 6 arguments
-
- - The ipv6-resolver that uses getaddrinfo()
-
- - The c-ares based name resolver that uses the c-ares library for resolves.
- Using this offers asynchronous name resolves.
-
- - The threaded resolver (default option on Windows). It uses:
-
- A - gethostbyname() on plain ipv4 hosts
- B - getaddrinfo() on ipv6-enabled hosts
-
- Also note that libcurl never resolves or reverse-lookups addresses given as
- pure numbers, such as 127.0.0.1 or ::1.
-
- 5.10 How do I prevent libcurl from writing the response to stdout?
-
- libcurl provides a default built-in write function that writes received data
- to stdout. Set the CURLOPT_WRITEFUNCTION to receive the data, or possibly
- set CURLOPT_WRITEDATA to a different FILE * handle.
-
- 5.11 How do I make libcurl not receive the whole HTTP response?
-
- You make the write callback (or progress callback) return an error and
- libcurl will then abort the transfer.
-
- 5.12 Can I make libcurl fake or hide my real IP address?
-
- No. libcurl operates on a higher level. Besides, faking IP address would
- imply sending IP packet with a made-up source address, and then you normally
- get a problem with receiving the packet sent back as they would then not be
- routed to you!
-
- If you use a proxy to access remote sites, the sites will not see your local
- IP address but instead the address of the proxy.
-
- Also note that on many networks NATs or other IP-munging techniques are used
- that makes you see and use a different IP address locally than what the
- remote server will see you coming from. You may also consider using
- http://www.torproject.org .
-
- 5.13 How do I stop an ongoing transfer?
-
- With the easy interface you make sure to return the correct error code from
- one of the callbacks, but none of them are instant. There is no function you
- can call from another thread or similar that will stop it immediately.
- Instead, you need to make sure that one of the callbacks you use returns an
- appropriate value that will stop the transfer. Suitable callbacks that you
- can do this with include the progress callback, the read callback and the
- write callback.
-
- If you're using the multi interface, you can also stop a transfer by
- removing the particular easy handle from the multi stack at any moment you
- think the transfer is done or when you wish to abort the transfer.
-
- 5.14 Using C++ non-static functions for callbacks?
-
- libcurl is a C library, it doesn't know anything about C++ member functions.
-
- You can overcome this "limitation" with a relative ease using a static
- member function that is passed a pointer to the class:
-
- // f is the pointer to your object.
- static YourClass::func(void *buffer, size_t sz, size_t n, void *f)
- {
- // Call non-static member function.
- static_cast<YourClass*>(f)->nonStaticFunction();
- }
-
- // This is how you pass pointer to the static function:
- curl_easy_setopt(hcurl, CURLOPT_WRITEFUNCTION, YourClass:func);
- curl_easy_setopt(hcurl, CURLOPT_WRITEDATA, this);
-
- 5.15 How do I get an FTP directory listing?
-
- If you end the FTP URL you request with a slash, libcurl will provide you
- with a directory listing of that given directory. You can also set
- CURLOPT_CUSTOMREQUEST to alter what exact listing command libcurl would use
- to list the files.
-
- The follow-up question that tend to follow the previous one, is how a
- program is supposed to parse the directory listing. How does it know what's
- a file and what's a dir and what's a symlink etc. The harsh reality is that
- FTP provides no such fine and easy-to-parse output. The output format FTP
- servers respond to LIST commands are entirely at the server's own liking and
- the NLST output doesn't reveal any types and in many cases don't even
- include all the directory entries. Also, both LIST and NLST tend to hide
- unix-style hidden files (those that start with a dot) by default so you need
- to do "LIST -a" or similar to see them.
-
- The application thus needs to parse the LIST output. One such existing
- list parser is available at http://cr.yp.to/ftpparse.html Versions of
- libcurl since 7.21.0 also provide the ability to specify a wildcard to
- download multiple files from one FTP directory.
-
- 5.16 I want a different time-out!
-
- Time and time again users realize that CURLOPT_TIMEOUT and
- CURLOPT_CONNECTIMEOUT are not sufficiently advanced or flexible to cover all
- the various use cases and scenarios applications end up with.
-
- libcurl offers many more ways to time-out operations. A common alternative
- is to use the CURLOPT_LOW_SPEED_LIMIT and CURLOPT_LOW_SPEED_TIME options to
- specify the lowest possible speed to accept before to consider the transfer
- timed out.
-
- The most flexible way is by writing your own time-out logic and using
- CURLOPT_PROGRESSFUNCTION (perhaps in combination with other callbacks) and
- use that to figure out exactly when the right condition is met when the
- transfer should get stopped.
-
- 5.17 Can I write a server with libcurl?
-
- No. libcurl offers no functions or building blocks to build any kind of
- internet protocol server. libcurl is only a client-side library. For server
- libraries, you need to continue your search elsewhere but there exist many
- good open source ones out there for most protocols you could possibly want a
- server for. And there are really good stand-alone ones that have been tested
- and proven for many years. There's no need for you to reinvent them!
-
-
-6. License Issues
-
- Curl and libcurl are released under a MIT/X derivate license. The license is
- very liberal and should not impose a problem for your project. This section
- is just a brief summary for the cases we get the most questions. (Parts of
- this section was much enhanced by Bjorn Reese.)
-
- We are not lawyers and this is not legal advice. You should probably consult
- one if you want true and accurate legal insights without our prejudice. Note
- especially that this section concerns the libcurl license only; compiling in
- features of libcurl that depend on other libraries (e.g. OpenSSL) may affect
- the licensing obligations of your application.
-
- 6.1 I have a GPL program, can I use the libcurl library?
-
- Yes!
-
- Since libcurl may be distributed under the MIT/X derivate license, it can be
- used together with GPL in any software.
-
- 6.2 I have a closed-source program, can I use the libcurl library?
-
- Yes!
-
- libcurl does not put any restrictions on the program that uses the library.
-
- 6.3 I have a BSD licensed program, can I use the libcurl library?
-
- Yes!
-
- libcurl does not put any restrictions on the program that uses the library.
-
- 6.4 I have a program that uses LGPL libraries, can I use libcurl?
-
- Yes!
-
- The LGPL license doesn't clash with other licenses.
-
- 6.5 Can I modify curl/libcurl for my program and keep the changes secret?
-
- Yes!
-
- The MIT/X derivate license practically allows you to do almost anything with
- the sources, on the condition that the copyright texts in the sources are
- left intact.
-
- 6.6 Can you please change the curl/libcurl license to XXXX?
-
- No.
-
- We have carefully picked this license after years of development and
- discussions and a large amount of people have contributed with source code
- knowing that this is the license we use. This license puts the restrictions
- we want on curl/libcurl and it does not spread to other programs or
- libraries that use it. It should be possible for everyone to use libcurl or
- curl in their projects, no matter what license they already have in use.
-
- 6.7 What are my obligations when using libcurl in my commercial apps?
-
- Next to none. All you need to adhere to is the MIT-style license (stated in
- the COPYING file) which basically says you have to include the copyright
- notice in "all copies" and that you may not use the copyright holder's name
- when promoting your software.
-
- You do not have to release any of your source code.
-
- You do not have to reveal or make public any changes to the libcurl source
- code.
-
- You do not have to broadcast to the world that you are using libcurl within
- your app.
-
- All we ask is that you disclose "the copyright notice and this permission
- notice" somewhere. Most probably like in the documentation or in the section
- where other third party dependencies already are mentioned and acknowledged.
-
- As can be seen here: http://curl.haxx.se/docs/companies.html and elsewhere,
- more and more companies are discovering the power of libcurl and take
- advantage of it even in commercial environments.
-
-
-7. PHP/CURL Issues
-
- 7.1 What is PHP/CURL?
-
- The module for PHP that makes it possible for PHP programs to access curl-
- functions from within PHP.
-
- In the cURL project we call this module PHP/CURL to differentiate it from
- curl the command line tool and libcurl the library. The PHP team however
- does not refer to it like this (for unknown reasons). They call it plain
- CURL (often using all caps) or sometimes ext/curl, but both cause much
- confusion to users which in turn gives us a higher question load.
-
- 7.2 Who wrote PHP/CURL?
-
- PHP/CURL is a module that comes with the regular PHP package. It depends and
- uses libcurl, so you need to have libcurl installed properly first before
- PHP/CURL can be used. PHP/CURL was initially written by Sterling Hughes.
-
- 7.3 Can I perform multiple requests using the same handle?
-
- Yes - at least in PHP version 4.3.8 and later (this has been known to not
- work in earlier versions, but the exact version when it started to work is
- unknown to me).
-
- After a transfer, you just set new options in the handle and make another
- transfer. This will make libcurl to re-use the same connection if it can.
diff --git a/libs/libcurl/docs/FEATURES b/libs/libcurl/docs/FEATURES
deleted file mode 100644
index 14d7e78ddb..0000000000
--- a/libs/libcurl/docs/FEATURES
+++ /dev/null
@@ -1,196 +0,0 @@
- _ _ ____ _
- ___| | | | _ \| |
- / __| | | | |_) | |
- | (__| |_| | _ <| |___
- \___|\___/|_| \_\_____|
-
-FEATURES
-
-curl tool
- - config file support
- - multiple URLs in a single command line
- - range "globbing" support: [0-13], {one,two,three}
- - multiple file upload on a single command line
- - custom maximum transfer rate
- - redirectable stderr
- - metalink support (*13)
-
-libcurl
- - full URL syntax with no length limit
- - custom maximum download time
- - custom least download speed acceptable
- - custom output result after completion
- - guesses protocol from host name unless specified
- - uses .netrc
- - progress bar with time statistics while downloading
- - "standard" proxy environment variables support
- - compiles on win32 (reported builds on 40+ operating systems)
- - selectable network interface for outgoing traffic
- - IPv6 support on unix and Windows
- - persistent connections
- - socks5 support
- - supports user name and password in proxy environment variables
- - operations through proxy "tunnel" (using CONNECT)
- - support for large files (>2GB and >4GB) during upload and download
- - replaceable memory functions (malloc, free, realloc, etc)
- - asynchronous name resolving (*6)
- - both a push and a pull style interface
- - international domain names (*11)
-
-HTTP
- - HTTP/1.1 compliant (optionally uses 1.0)
- - GET
- - PUT
- - HEAD
- - POST
- - Pipelining
- - multipart formpost (RFC1867-style)
- - authentication: Basic, Digest, NTLM (*9), GSS-Negotiate/Negotiate (*3) and
- SPNEGO (*4) to server and proxy
- - resume (both GET and PUT)
- - follow redirects
- - maximum amount of redirects to follow
- - custom HTTP request
- - cookie get/send fully parsed
- - reads/writes the netscape cookie file format
- - custom headers (replace/remove internally generated headers)
- - custom user-agent string
- - custom referer string
- - range
- - proxy authentication
- - time conditions
- - via http-proxy
- - retrieve file modification date
- - Content-Encoding support for deflate and gzip
- - "Transfer-Encoding: chunked" support in uploads
- - data compression (*12)
-
-HTTPS (*1)
- - (all the HTTP features)
- - using client certificates
- - verify server certificate
- - via http-proxy
- - select desired encryption
- - force usage of a specific SSL version (SSLv2 (*7), SSLv3 (*10) or TLSv1)
-
-FTP
- - download
- - authentication
- - kerberos4 (*5)
- - kerberos5 (*3)
- - active/passive using PORT, EPRT, PASV or EPSV
- - single file size information (compare to HTTP HEAD)
- - 'type=' URL support
- - dir listing
- - dir listing names-only
- - upload
- - upload append
- - upload via http-proxy as HTTP PUT
- - download resume
- - upload resume
- - custom ftp commands (before and/or after the transfer)
- - simple "range" support
- - via http-proxy
- - all operations can be tunneled through a http-proxy
- - customizable to retrieve file modification date
- - no dir depth limit
-
-FTPS (*1)
- - implicit ftps:// support that use SSL on both connections
- - explicit "AUTH TLS" and "AUTH SSL" usage to "upgrade" plain ftp://
- connection to use SSL for both or one of the connections
-
-SCP (*8)
- - both password and public key auth
-
-SFTP (*8)
- - both password and public key auth
- - with custom commands sent before/after the transfer
-
-TFTP
- - download
- - upload
-
-TELNET
- - connection negotiation
- - custom telnet options
- - stdin/stdout I/O
-
-LDAP (*2)
- - full LDAP URL support
-
-DICT
- - extended DICT URL support
-
-FILE
- - URL support
- - upload
- - resume
-
-SMTP
- - authentication: Plain, Login, CRAM-MD5, Digest-MD5 and NTLM (*9)
- - send e-mails
- - mail from support
- - mail size support
- - mail auth support for trusted server-to-server relaying
- - multiple recipients
- - via http-proxy
-
-SMTPS (*1)
- - implicit smtps:// support
- - explicit "STARTTLS" usage to "upgrade" plain smtp:// connections to use SSL
- - via http-proxy
-
-POP3
- - authentication: Clear Text, APOP and SASL
- - SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5 and
- NTLM (*9)
- - list e-mails
- - retrieve e-mails
- - enhanced command support for: CAPA, DELE, TOP, STAT, UIDL and NOOP via
- custom requests
- - via http-proxy
-
-POP3S (*1)
- - implicit pop3s:// support
- - explicit "STLS" usage to "upgrade" plain pop3:// connections to use SSL
- - via http-proxy
-
-IMAP
- - authentication: Clear Text and SASL
- - SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5 and
- NTLM (*9)
- - list the folders of a mailbox
- - select a mailbox with support for verifing the UIDVALIDITY
- - fetch e-mails with support for specifing the UID and SECTION
- - upload e-mails via the append command
- - enhanced command support for: EXAMINE, CREATE, DELETE, RENAME, STATUS,
- STORE, COPY and UID via custom requests
- - via http-proxy
-
-IMAPS (*1)
- - implicit imaps:// support
- - explicit "STARTTLS" usage to "upgrade" plain imap:// connections to use SSL
- - via http-proxy
-
-FOOTNOTES
-=========
-
- *1 = requires OpenSSL, GnuTLS, NSS, yassl, axTLS, PolarSSL, schannel (native
- Windows), Secure Transport (native iOS/OS X) or qssl (native IBM i)
- *2 = requires OpenLDAP
- *3 = requires a GSSAPI-compliant library, such as Heimdal or similar
- *4 = requires FBopenssl
- *5 = requires a krb4 library, such as the MIT one or similar
- *6 = requires c-ares
- *7 = requires OpenSSL, NSS, qssl, schannel or Secure Transport; GnuTLS, for
- example, only supports SSLv3 and TLSv1
- *8 = requires libssh2
- *9 = requires OpenSSL, GnuTLS, NSS, yassl, Secure Transport or SSPI (native
- Windows)
- *10 = requires any of the SSL libraries in (*1) above other than axTLS, which
- does not support SSLv3
- *11 = requires libidn or Windows
- *12 = requires libz
- *13 = requires libmetalink, and either an Apple or Microsoft operating
- system, or OpenSSL, or GnuTLS, or NSS
diff --git a/libs/libcurl/docs/HISTORY b/libs/libcurl/docs/HISTORY
deleted file mode 100644
index 3c140999ec..0000000000
--- a/libs/libcurl/docs/HISTORY
+++ /dev/null
@@ -1,244 +0,0 @@
- _ _ ____ _
- ___| | | | _ \| |
- / __| | | | |_) | |
- | (__| |_| | _ <| |___
- \___|\___/|_| \_\_____|
-
- How cURL Became Like This
-
-
-Towards the end of 1996, Daniel Stenberg came up with the idea to make
-currency-exchange calculations available to Internet Relay Chat (IRC)
-users. All the necessary data are published on the Web; he just needed to
-automate their retrieval.
-
-Daniel simply adopted an existing command-line open-source tool, httpget, that
-Brazilian Rafael Sagula had written and recently release version 0.1 of. After
-a few minor adjustments, it did just what he needed. HttpGet 1.0 was released
-on April 8th 1997 with brand new HTTP proxy support.
-
-We soon found and fixed support for getting currencies over GOPHER. Once FTP
-download support was added, the name of the project was changed and urlget 2.0
-was released in August 1997. The http-only days were already passed.
-
-The project slowly grew bigger. When upload capabilities were added and the
-name once again was misleading, a second name change was made and on March 20,
-1998 curl 4 was released. (The version numbering from the previous names was
-kept.)
-
-(Unrelated to this project a company called Curl Corporation registered a US
-trademark on the name "CURL" on May 18 1998. That company had then already
-registered the curl.com domain back in November of the previous year. All this
-was revealed to us much later.)
-
-SSL support was added, powered by the SSLeay library.
-
-August 1998, first announcement of curl on freshmeat.net.
-
-October 1998, with the curl 4.9 release and the introduction of cookie
-support, curl was no longer released under the GPL license. Now we're at 4000
-lines of code, we switched over to the MPL license to restrict the effects of
-"copyleft".
-
-November 1998, configure script and reported successful compiles on several
-major operating systems. The never-quite-understood -F option was added and
-curl could now simulate quite a lot of a browser. TELNET support was added.
-
-Curl 5 was released in December 1998 and introduced the first ever curl man
-page. People started making Linux RPM packages out of it.
-
-January 1999, DICT support added.
-
-OpenSSL took over where SSLeay was abandoned.
-
-May 1999, first Debian package.
-
-August 1999, LDAP:// and FILE:// support added. The curl web site gets 1300
-visits weekly.
-
-Released curl 6.0 in September. 15000 lines of code.
-
-December 28 1999, added the project on Sourceforge and started using its
-services for managing the project.
-
-Spring 2000, major internal overhaul to provide a suitable library interface.
-The first non-beta release was named 7.1 and arrived in August. This offered
-the easy interface and turned out to be the beginning of actually getting
-other software and programs to get based on and powered by libcurl. Almost
-20000 lines of code.
-
-August 2000, the curl web site gets 4000 visits weekly.
-
-The PHP guys adopted libcurl already the same month, when the first ever third
-party libcurl binding showed up. CURL has been a supported module in PHP since
-the release of PHP 4.0.2. This would soon get followers. More than 16
-different bindings exist at the time of this writing.
-
-September 2000, kerberos4 support was added.
-
-In November 2000 started the work on a test suite for curl. It was later
-re-written from scratch again. The libcurl major SONAME number was set to 1.
-
-January 2001, Daniel released curl 7.5.2 under a new license again: MIT (or
-MPL). The MIT license is extremely liberal and can be used combined with GPL
-in other projects. This would finally put an end to the "complaints" from
-people involved in GPLed projects that previously were prohibited from using
-libcurl while it was released under MPL only. (Due to the fact that MPL is
-deemed "GPL incompatible".)
-
-curl supports HTTP 1.1 starting with the release of 7.7, March 22 2001. This
-also introduced libcurl's ability to do persistent connections. 24000 lines of
-code. The libcurl major SONAME number was bumped to 2 due to this overhaul.
-
-The first experimental ftps:// support was added in March 2001.
-
-August 2001. curl is bundled in Mac OS X, 10.1. It was already becoming more
-and more of a standard utility of Linux distributions and a regular in the BSD
-ports collections. The curl web site gets 8000 visits weekly. Curl Corporation
-contacted Daniel to discuss "the name issue". After Daniel's reply, they have
-never since got in touch again.
-
-September 2001, libcurl 7.9 introduces cookie jar and curl_formadd(). During
-the forthcoming 7.9.x releases, we introduced the multi interface slowly and
-without much whistles.
-
-June 2002, the curl web site gets 13000 visits weekly. curl and libcurl is
-35000 lines of code. Reported successful compiles on more than 40 combinations
-of CPUs and operating systems.
-
-To estimate number of users of the curl tool or libcurl library is next to
-impossible. Around 5000 downloaded packages each week from the main site gives
-a hint, but the packages are mirrored extensively, bundled with numerous OS
-distributions and otherwise retrieved as part of other software.
-
-September 2002, with the release of curl 7.10 it is released under the MIT
-license only.
-
-January 2003. Started working on the distributed curl tests. The autobuilds.
-
-February 2003, the curl site averages at 20000 visits weekly. At any given
-moment, there's an average of 3 people browsing the curl.haxx.se site.
-
-Multiple new authentication schemes are supported: Digest (May), NTLM (June)
-and Negotiate (June).
-
-November 2003: curl 7.10.8 is released. 45000 lines of code. ~55000 unique
-visitors to the curl.haxx.se site. Five official web mirrors.
-
-December 2003, full-fledged SSL for FTP is supported.
-
-January 2004: curl 7.11.0 introduced large file support.
-
-June 2004:
-
- curl 7.12.0 introduced IDN support. 10 official web mirrors.
-
- This release bumped the major SONAME to 3 due to the removal of the
- curl_formparse() function
-
-August 2004:
- Curl and libcurl 7.12.1
-
- Public curl release number: 82
- Releases counted from the very beginning: 109
- Available command line options: 96
- Available curl_easy_setopt() options: 120
- Number of public functions in libcurl: 36
- Amount of public web site mirrors: 12
- Number of known libcurl bindings: 26
-
-April 2005:
-
- GnuTLS can now optionally be used for the secure layer when curl is built.
-
-September 2005:
-
- TFTP support was added.
-
- More than 100,000 unique visitors of the curl web site. 25 mirrors.
-
-December 2005:
-
- security vulnerability: libcurl URL Buffer Overflow
-
-January 2006:
-
- We dropped support for Gopher. We found bugs in the implementation that
- turned out having been introduced years ago, so with the conclusion that
- nobody had found out in all this time we removed it instead of fixing it.
-
-March 2006:
-
- security vulnerability: libcurl TFTP Packet Buffer Overflow
-
-April 2006:
-
- Added the multi_socket() API
-
-September 2006:
-
- The major SONAME number for libcurl was bumped to 4 due to the removal of
- ftp third party transfer support.
-
-November 2006:
-
- Added SCP and SFTP support
-
-February 2007:
-
- Added support for the Mozilla NSS library to do the SSL/TLS stuff
-
-July 2007:
-
- security vulnerability: libcurl GnuTLS insufficient cert verification
-
-November 2008:
-
- Command line options: 128
- curl_easy_setopt() options: 158
- Public functions in libcurl: 58
- Known libcurl bindings: 37
- Contributors: 683
-
- 145,000 unique visitors. >100 GB downloaded.
-
-March 2009:
-
- security vulnerability: libcurl Arbitrary File Access
-
-August 2009:
-
- security vulnerability: libcurl embedded zero in cert name
-
-December 2009:
-
- Added support for IMAP, POP3 and SMTP
-
-January 2010:
-
- Added support for RTSP
-
-February 2010:
-
- security vulnerability: libcurl data callback excessive length
-
-March 2010:
-
- The project switched over to use git instead of CVS for source code control
-
-May 2010:
-
- Added support for RTMP
-
- Added support for PolarSSL to do the SSL/TLS stuff
-
-August 2010:
-
- Public curl releases: 117
- Command line options: 138
- curl_easy_setopt() options: 180
- Public functions in libcurl: 58
- Known libcurl bindings: 39
- Contributors: 808
-
- Gopher support added (re-added actually)
diff --git a/libs/libcurl/docs/HTTP-COOKIES b/libs/libcurl/docs/HTTP-COOKIES
deleted file mode 100644
index 818e161eef..0000000000
--- a/libs/libcurl/docs/HTTP-COOKIES
+++ /dev/null
@@ -1,123 +0,0 @@
-Updated: July 3, 2012 (http://curl.haxx.se/docs/http-cookies.html)
- _ _ ____ _
- ___| | | | _ \| |
- / __| | | | |_) | |
- | (__| |_| | _ <| |___
- \___|\___/|_| \_\_____|
-
-
-HTTP Cookies
-
- 1. HTTP Cookies
- 1.1 Cookie overview
- 1.2 Cookies saved to disk
- 1.3 Cookies with curl the command line tool
- 1.4 Cookies with libcurl
- 1.5 Cookies with javascript
-
-==============================================================================
-
-1. HTTP Cookies
-
- 1.1 Cookie overview
-
- HTTP cookies are pieces of 'name=contents' snippets that a server tells the
- client to hold and then the client sends back those the server on subsequent
- requests to the same domains/paths for which the cookies were set.
-
- Cookies are either "session cookies" which typically are forgotten when the
- session is over which is often translated to equal when browser quits, or
- the cookies aren't session cookies they have expiration dates after which
- the client will throw them away.
-
- Cookies are set to the client with the Set-Cookie: header and are sent to
- servers with the Cookie: header.
-
- For a very long time, the only spec explaining how to use cookies was the
- original Netscape spec from 1994: http://curl.haxx.se/rfc/cookie_spec.html
-
- In 2011, RFC6265 (http://www.ietf.org/rfc/rfc6265.txt) was finally published
- and details how cookies work within HTTP.
-
- 1.2 Cookies saved to disk
-
- Netscape once created a file format for storing cookies on disk so that they
- would survive browser restarts. curl adopted that file format to allow
- sharing the cookies with browsers, only to see browsers move away from that
- format. Modern browsers no longer use it, while curl still does.
-
- The netscape cookie file format stores one cookie per physical line in the
- file with a bunch of associated meta data, each field separated with
- TAB. That file is called the cookiejar in curl terminology.
-
- When libcurl saves a cookiejar, it creates a file header of its own in which
- there is a URL mention that will link to the web version of this document.
-
- 1.3 Cookies with curl the command line tool
-
- curl has a full cookie "engine" built in. If you just activate it, you can
- have curl receive and send cookies exactly as mandated in the specs.
-
- Command line options:
-
- -b, --cookie
-
- tell curl a file to read cookies from and start the cookie engine, or if
- it isn't a file it will pass on the given string. -b name=var works and so
- does -b cookiefile.
-
- -j, --junk-session-cookies
-
- when used in combination with -b, it will skip all "session cookies" on
- load so as to appear to start a new cookie session.
-
- -c, --cookie-jar
-
- tell curl to start the cookie engine and write cookies to the given file
- after the request(s)
-
- 1.4 Cookies with libcurl
-
- libcurl offers several ways to enable and interface the cookie engine. These
- options are the ones provided by the native API. libcurl bindings may offer
- access to them using other means.
-
- CURLOPT_COOKIE
-
- Is used when you want to specify the exact contents of a cookie header to
- send to the server.
-
- CURLOPT_COOKIEFILE
-
- Tell libcurl to activate the cookie engine, and to read the initial set of
- cookies from the given file. Read-only.
-
- CURLOPT_COOKIEJAR
-
- Tell libcurl to activate the cookie engine, and when the easy handle is
- closed save all known cookies to the given cookiejar file. Write-only.
-
- CURLOPT_COOKIELIST
-
- Provide detailed information about a single cookie to add to the internal
- storage of cookies. Pass in the cookie as a HTTP header with all the
- details set, or pass in a line from a netscape cookie file. This option
- can also be used to flush the cookies etc.
-
- CURLINFO_COOKIELIST
-
- Extract cookie information from the internal cookie storage as a linked
- list.
-
- 1.5 Cookies with javascript
-
- These days a lot of the web is built up by javascript. The webbrowser loads
- complete programs that render the page you see. These javascript programs
- can also set and access cookies.
-
- Since curl and libcurl are plain HTTP clients without any knowledge of or
- capability to handle javascript, such cookies will not be detected or used.
-
- Often, if you want to mimic what a browser does on such web sites, you can
- record web browser HTTP traffic when using such a site and then repeat the
- cookie operations using curl or libcurl.
diff --git a/libs/libcurl/docs/INSTALL b/libs/libcurl/docs/INSTALL
deleted file mode 100644
index 4140359dad..0000000000
--- a/libs/libcurl/docs/INSTALL
+++ /dev/null
@@ -1,1131 +0,0 @@
- _ _ ____ _
- ___| | | | _ \| |
- / __| | | | |_) | |
- | (__| |_| | _ <| |___
- \___|\___/|_| \_\_____|
-
- How To Compile
-
-Installing Binary Packages
-==========================
-
- Lots of people download binary distributions of curl and libcurl. This
- document does not describe how to install curl or libcurl using such a
- binary package. This document describes how to compile, build and install
- curl and libcurl from source code.
-
-Building from git
-=================
-
- If you get your code off a git repository, see the GIT-INFO file in the
- root directory for specific instructions on how to proceed.
-
-UNIX
-====
- A normal unix installation is made in three or four steps (after you've
- unpacked the source archive):
-
- ./configure
- make
- make test (optional)
- make install
-
- You probably need to be root when doing the last command.
-
- If you have checked out the sources from the git repository, read the
- GIT-INFO on how to proceed.
-
- Get a full listing of all available configure options by invoking it like:
-
- ./configure --help
-
- If you want to install curl in a different file hierarchy than /usr/local,
- you need to specify that already when running configure:
-
- ./configure --prefix=/path/to/curl/tree
-
- If you happen to have write permission in that directory, you can do 'make
- install' without being root. An example of this would be to make a local
- install in your own home directory:
-
- ./configure --prefix=$HOME
- make
- make install
-
- The configure script always tries to find a working SSL library unless
- explicitly told not to. If you have OpenSSL installed in the default search
- path for your compiler/linker, you don't need to do anything special. If
- you have OpenSSL installed in /usr/local/ssl, you can run configure like:
-
- ./configure --with-ssl
-
- If you have OpenSSL installed somewhere else (for example, /opt/OpenSSL)
- and you have pkg-config installed, set the pkg-config path first, like this:
-
- env PKG_CONFIG_PATH=/opt/OpenSSL/lib/pkgconfig ./configure --with-ssl
-
- Without pkg-config installed, use this:
-
- ./configure --with-ssl=/opt/OpenSSL
-
- If you insist on forcing a build without SSL support, even though you may
- have OpenSSL installed in your system, you can run configure like this:
-
- ./configure --without-ssl
-
- If you have OpenSSL installed, but with the libraries in one place and the
- header files somewhere else, you have to set the LDFLAGS and CPPFLAGS
- environment variables prior to running configure. Something like this
- should work:
-
- (with the Bourne shell and its clones):
-
- CPPFLAGS="-I/path/to/ssl/include" LDFLAGS="-L/path/to/ssl/lib" \
- ./configure
-
- (with csh, tcsh and their clones):
-
- env CPPFLAGS="-I/path/to/ssl/include" LDFLAGS="-L/path/to/ssl/lib" \
- ./configure
-
- If you have shared SSL libs installed in a directory where your run-time
- linker doesn't find them (which usually causes configure failures), you can
- provide the -R option to ld on some operating systems to set a hard-coded
- path to the run-time linker:
-
- env LDFLAGS=-R/usr/local/ssl/lib ./configure --with-ssl
-
- MORE OPTIONS
- ------------
-
- To force configure to use the standard cc compiler if both cc and gcc are
- present, run configure like
-
- CC=cc ./configure
- or
- env CC=cc ./configure
-
- To force a static library compile, disable the shared library creation
- by running configure like:
-
- ./configure --disable-shared
-
- To tell the configure script to skip searching for thread-safe functions,
- add an option like:
-
- ./configure --disable-thread
-
- To build curl with kerberos4 support enabled, curl requires the krb4 libs
- and headers installed. You can then use a set of options to tell
- configure where those are:
-
- --with-krb4-includes[=DIR] Specify location of kerberos4 headers
- --with-krb4-libs[=DIR] Specify location of kerberos4 libs
- --with-krb4[=DIR] where to look for Kerberos4
-
- In most cases, /usr/athena is the install prefix and then it works with
-
- ./configure --with-krb4=/usr/athena
-
- If you're a curl developer and use gcc, you might want to enable more
- debug options with the --enable-debug option.
-
- curl can be built to use a whole range of libraries to provide various
- useful services, and configure will try to auto-detect a decent
- default. But if you want to alter it, you can select how to deal with
- each individual library.
-
- To build with GnuTLS for SSL/TLS, use both --without-ssl and
- --with-gnutls.
-
- To build with Cyassl for SSL/TLS, use both --without-ssl and
- --with-cyassl.
-
- To build with NSS for SSL/TLS, use both --without-ssl and --with-nss.
-
- To build with PolarSSL for SSL/TLS, use both --without-ssl and
- --with-polarssl.
-
- To build with axTLS for SSL/TLS, use both --without-ssl and --with-axtls.
-
- To get GSSAPI support, build with --with-gssapi and have the MIT or
- Heimdal Kerberos 5 packages installed.
-
- To get support for SCP and SFTP, build with --with-libssh2 and have
- libssh2 0.16 or later installed.
-
- To get Metalink support, build with --with-libmetalink and have the
- libmetalink packages installed.
-
- SPECIAL CASES
- -------------
- Some versions of uClibc require configuring with CPPFLAGS=-D_GNU_SOURCE=1
- to get correct large file support.
-
- The Open Watcom C compiler on Linux requires configuring with the variables:
-
- ./configure CC=owcc AR="$WATCOM/binl/wlib" AR_FLAGS=-q \
- RANLIB=/bin/true STRIP="$WATCOM/binl/wstrip" CFLAGS=-Wextra
-
-
-Win32
-=====
-
- Building Windows DLLs and C run-time (CRT) linkage issues
- ---------------------------------------------------------
-
- As a general rule, building a DLL with static CRT linkage is highly
- discouraged, and intermixing CRTs in the same app is something to
- avoid at any cost.
-
- Reading and comprehension of Microsoft Knowledge Base articles
- KB94248 and KB140584 is a must for any Windows developer. Especially
- important is full understanding if you are not going to follow the
- advice given above.
-
- KB94248 - How To Use the C Run-Time
- http://support.microsoft.com/kb/94248/en-us
-
- KB140584 - How to link with the correct C Run-Time (CRT) library
- http://support.microsoft.com/kb/140584/en-us
-
- KB190799 - Potential Errors Passing CRT Objects Across DLL Boundaries
- http://msdn.microsoft.com/en-us/library/ms235460
-
- If your app is misbehaving in some strange way, or it is suffering
- from memory corruption, before asking for further help, please try
- first to rebuild every single library your app uses as well as your
- app using the debug multithreaded dynamic C runtime.
-
- If you get linkage errors read section 5.7 of the FAQ document.
-
-
- MingW32
- -------
-
- Make sure that MinGW32's bin dir is in the search path, for example:
-
- set PATH=c:\mingw32\bin;%PATH%
-
- then run 'mingw32-make mingw32' in the root dir. There are other
- make targets available to build libcurl with more features, use:
- 'mingw32-make mingw32-zlib' to build with Zlib support;
- 'mingw32-make mingw32-ssl-zlib' to build with SSL and Zlib enabled;
- 'mingw32-make mingw32-ssh2-ssl-zlib' to build with SSH2, SSL, Zlib;
- 'mingw32-make mingw32-ssh2-ssl-sspi-zlib' to build with SSH2, SSL, Zlib
- and SSPI support.
-
- If you have any problems linking libraries or finding header files, be sure
- to verify that the provided "Makefile.m32" files use the proper paths, and
- adjust as necessary. It is also possible to override these paths with
- environment variables, for example:
-
- set ZLIB_PATH=c:\zlib-1.2.8
- set OPENSSL_PATH=c:\openssl-0.9.8y
- set LIBSSH2_PATH=c:\libssh2-1.4.3
-
- ATTENTION: if you want to build with libssh2 support you have to use latest
- version 0.17 - previous versions will NOT work with 7.17.0 and later!
- Use 'mingw32-make mingw32-ssh2-ssl-zlib' to build with SSH2 and SSL enabled.
-
- It is now also possible to build with other LDAP SDKs than MS LDAP;
- currently it is possible to build with native Win32 OpenLDAP, or with the
- Novell CLDAP SDK. If you want to use these you need to set these vars:
-
- set LDAP_SDK=c:\openldap
- set USE_LDAP_OPENLDAP=1
-
- or for using the Novell SDK:
-
- set USE_LDAP_NOVELL=1
-
- If you want to enable LDAPS support then set LDAPS=1.
-
- - optional MingW32-built OpenLDAP SDK available from:
- http://www.gknw.net/mirror/openldap/
- - optional recent Novell CLDAP SDK available from:
- http://developer.novell.com/ndk/cldap.htm
-
-
- Cygwin
- ------
-
- Almost identical to the unix installation. Run the configure script in the
- curl root with 'sh configure'. Make sure you have the sh executable in
- /bin/ or you'll see the configure fail toward the end.
-
- Run 'make'
-
- Dev-Cpp
- -------
-
- See the separate INSTALL.devcpp file for details.
-
- MSVC 6 caveats
- --------------
-
- If you use MSVC 6 it is required that you use the February 2003 edition PSDK:
- http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm
-
- Building any software with MSVC 6 without having PSDK installed is just
- asking for trouble down the road once you have released it, you might notice
- the problems in the first corner or ten miles ahead, depending mostly on your
- choice of static vs dynamic runtime and third party libraries. Anyone using
- software built in such way will at some point regret having done so.
-
- When someone uses MSVC 6 without PSDK he is using a compiler back from 1998.
-
- If the compiler has been updated with the installation of a service pack as
- those mentioned in http://support.microsoft.com/kb/194022 the compiler can be
- safely used to read source code, translate and make it object code.
-
- But, even with the service packs mentioned above installed, the resulting
- software generated in such an environment will be using outdated system
- header files and libraries with bugs and security issues which have already
- been addressed and fixed long time ago.
-
- In order to make use of the updated system headers and fixed libraries
- for MSVC 6, it is required that 'Platform SDK', PSDK from now onwards,
- is installed. The specific PSDK that must be installed for MSVC 6 is the
- February 2003 edition, which is the latest one supporting the MSVC 6 compiler,
- this PSDK is also known as 'Windows Server 2003 PSDK' and can be downloaded
- from http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm
-
- So, building curl and libcurl with MSVC 6 without PSDK is absolutely
- discouraged for the benefit of anyone using software built in such
- environment. And it will not be supported in any way, as we could just
- be hunting bugs which have already been fixed way back in 2003.
-
- When building with MSVC 6 we attempt to detect if PSDK is not being used,
- and if this is the case the build process will fail hard with an error
- message stating that the February 2003 PSDK is required. This is done to
- protect the unsuspecting and avoid PEBKAC issues.
-
- Additionally it might happen that a die hard MSVC hacker still wants to
- build curl and libcurl with MSVC 6 without PSDK installed, even knowing
- that this is a highly discouraged and unsupported build environment. In
- this case the brave of heart will be able to build in such an environment
- with the requisite of defining preprocessor symbol ALLOW_MSVC6_WITHOUT_PSDK
- in lib/config-win32.h and knowing that LDAP and IPv6 support will be missing.
-
- MSVC from command line
- ----------------------
-
- Run the 'vcvars32.bat' file to get a proper environment. The
- vcvars32.bat file is part of the Microsoft development environment and
- you may find it in 'C:\Program Files\Microsoft Visual Studio\vc98\bin'
- provided that you installed Visual C/C++ 6 in the default directory.
-
- Then run 'nmake vc' in curl's root directory.
-
- If you want to compile with zlib support, you will need to build
- zlib (http://www.gzip.org/zlib/) as well. Please read the zlib
- documentation on how to compile zlib. Define the ZLIB_PATH environment
- variable to the location of zlib.h and zlib.lib, for example:
-
- set ZLIB_PATH=c:\zlib-1.2.8
-
- Then run 'nmake vc-zlib' in curl's root directory.
-
- If you want to compile with SSL support you need the OpenSSL package.
- Please read the OpenSSL documentation on how to compile and install
- the OpenSSL libraries. The build process of OpenSSL generates the
- libeay32.dll and ssleay32.dll files in the out32dll subdirectory in
- the OpenSSL home directory. OpenSSL static libraries (libeay32.lib,
- ssleay32.lib, RSAglue.lib) are created in the out32 subdirectory.
-
- Before running nmake define the OPENSSL_PATH environment variable with
- the root/base directory of OpenSSL, for example:
-
- set OPENSSL_PATH=c:\openssl-0.9.8y
-
- Then run 'nmake vc-ssl' or 'nmake vc-ssl-dll' in curl's root
- directory. 'nmake vc-ssl' will create a libcurl static and dynamic
- libraries in the lib subdirectory, as well as a statically linked
- version of curl.exe in the src subdirectory. This statically linked
- version is a standalone executable not requiring any DLL at
- runtime. This make method requires that you have the static OpenSSL
- libraries available in OpenSSL's out32 subdirectory.
- 'nmake vc-ssl-dll' creates the libcurl dynamic library and
- links curl.exe against libcurl and OpenSSL dynamically.
- This executable requires libcurl.dll and the OpenSSL DLLs
- at runtime.
- Run 'nmake vc-ssl-zlib' to build with both ssl and zlib support.
-
- MSVC 6 IDE
- ----------
-
- A minimal VC++ 6.0 reference workspace (vc6curl.dsw) is available with the
- source distribution archive to allow proper building of the two included
- projects, the libcurl library and the curl tool.
-
- 1) Open the vs/vc6/vc6curl.dsw workspace with MSVC6's IDE.
- 2) Select 'Build' from top menu.
- 3) Select 'Batch Build' from dropdown menu.
- 4) Make sure that the eight project configurations are 'checked'.
- 5) Click on the 'Build' button.
- 6) Once the eight project configurations are built you are done.
-
- Dynamic and static libcurl libraries are built in debug and release flavours,
- and can be located each one in its own subdirectory, dll-debug, dll-release,
- lib-debug and lib-release, all of them below the 'vs/vc6/lib' subdirectory.
-
- In the same way four curl executables are created, each using its respective
- library. The resulting curl executables are located in its own subdirectory,
- dll-debug, dll-release, lib-debug and lib-release, below 'vs/vc6/src' subdir.
-
- These reference VC++ 6.0 configurations are generated using the dynamic CRT.
-
- Intentionally, these reference VC++ 6.0 projects and configurations don't use
- third party libraries, such as OpenSSL or Zlib, to allow proper compilation
- and configuration for all new users without further requirements.
-
- If you need something more 'involved' you might adjust them for your own use,
- or explore the world of makefiles described above 'MSVC from command line'.
-
- Borland C++ compiler
- ---------------------
-
- Ensure that your build environment is properly set up to use the compiler
- and associated tools. PATH environment variable must include the path to
- bin subdirectory of your compiler installation, eg: c:\Borland\BCC55\bin
-
- It is advisable to set environment variable BCCDIR to the base path of
- the compiler installation.
-
- set BCCDIR=c:\Borland\BCC55
-
- In order to build a plain vanilla version of curl and libcurl run the
- following command from curl's root directory:
-
- make borland
-
- To build curl and libcurl with zlib and OpenSSL support set environment
- variables ZLIB_PATH and OPENSSL_PATH to the base subdirectories of the
- already built zlib and OpenSSL libraries and from curl's root directory
- run command:
-
- make borland-ssl-zlib
-
- libcurl library will be built in 'lib' subdirectory while curl tool
- is built in 'src' subdirectory. In order to use libcurl library it is
- advisable to modify compiler's configuration file bcc32.cfg located
- in c:\Borland\BCC55\bin to reflect the location of libraries include
- paths for example the '-I' line could result in something like:
-
- -I"c:\Borland\BCC55\include;c:\curl\include;c:\openssl\inc32"
-
- bcc3.cfg '-L' line could also be modified to reflect the location of
- of libcurl library resulting for example:
-
- -L"c:\Borland\BCC55\lib;c:\curl\lib;c:\openssl\out32"
-
- In order to build sample program 'simple.c' from the docs\examples
- subdirectory run following command from mentioned subdirectory:
-
- bcc32 simple.c libcurl.lib cw32mt.lib
-
- In order to build sample program simplessl.c an SSL enabled libcurl
- is required, as well as the OpenSSL libeay32.lib and ssleay32.lib
- libraries.
-
-
- OTHER MSVC IDEs
- ---------------
-
- If you use VC++, Borland or similar compilers. Include all lib source
- files in a static lib "project" (all .c and .h files that is).
- (you should name it libcurl or similar)
-
- Make the sources in the src/ drawer be a "win32 console application"
- project. Name it curl.
-
-
- Disabling Specific Protocols in Win32 builds
- --------------------------------------------
-
- The configure utility, unfortunately, is not available for the Windows
- environment, therefore, you cannot use the various disable-protocol
- options of the configure utility on this platform.
-
- However, you can use the following defines to disable specific
- protocols:
-
- HTTP_ONLY disables all protocols except HTTP
- CURL_DISABLE_FTP disables FTP
- CURL_DISABLE_LDAP disables LDAP
- CURL_DISABLE_TELNET disables TELNET
- CURL_DISABLE_DICT disables DICT
- CURL_DISABLE_FILE disables FILE
- CURL_DISABLE_TFTP disables TFTP
- CURL_DISABLE_HTTP disables HTTP
-
- If you want to set any of these defines you have the following
- possibilities:
-
- - Modify lib/config-win32.h
- - Modify lib/curl_setup.h
- - Modify lib/Makefile.vc6
- - Add defines to Project/Settings/C/C++/General/Preprocessor Definitions
- in the vc6libcurl.dsw/vc6libcurl.dsp Visual C++ 6 IDE project.
-
-
- Using BSD-style lwIP instead of Winsock TCP/IP stack in Win32 builds
- --------------------------------------------------------------------
-
- In order to compile libcurl and curl using BSD-style lwIP TCP/IP stack
- it is necessary to make definition of preprocessor symbol USE_LWIPSOCK
- visible to libcurl and curl compilation processes. To set this definition
- you have the following alternatives:
-
- - Modify lib/config-win32.h and src/config-win32.h
- - Modify lib/Makefile.vc6
- - Add definition to Project/Settings/C/C++/General/Preprocessor Definitions
- in the vc6libcurl.dsw/vc6libcurl.dsp Visual C++ 6 IDE project.
-
- Once that libcurl has been built with BSD-style lwIP TCP/IP stack support,
- in order to use it with your program it is mandatory that your program
- includes lwIP header file <lwip/opt.h> (or another lwIP header that includes
- this) before including any libcurl header. Your program does not need the
- USE_LWIPSOCK preprocessor definition which is for libcurl internals only.
-
- Compilation has been verified with lwIP 1.4.0 and contrib-1.4.0 from:
-
- http://download.savannah.gnu.org/releases/lwip/lwip-1.4.0.zip
- http://download.savannah.gnu.org/releases/lwip/contrib-1.4.0.zip
-
- This BSD-style lwIP TCP/IP stack support must be considered experimental
- given that it has been verified that lwIP 1.4.0 still needs some polish,
- and libcurl might yet need some additional adjustment, caveat emptor.
-
- Important static libcurl usage note
- -----------------------------------
-
- When building an application that uses the static libcurl library, you must
- add '-DCURL_STATICLIB' to your CFLAGS. Otherwise the linker will look for
- dynamic import symbols.
-
-
-Apple iOS and Mac OS X
-======================
- On recent Apple operating systems, curl can be built to use Apple's
- SSL/TLS implementation, Secure Transport, instead of OpenSSL. To build with
- Secure Transport for SSL/TLS, use the configure option --with-darwinssl. (It
- is not necessary to use the option --without-ssl.) This feature requires iOS
- 5.0 or later, or OS X 10.5 ("Leopard") or later.
-
- When Secure Transport is in use, the curl options --cacert and --capath and
- their libcurl equivalents, will be ignored, because Secure Transport uses
- the certificates stored in the Keychain to evaluate whether or not to trust
- the server. This, of course, includes the root certificates that ship with
- the OS. The --cert and --engine options, and their libcurl equivalents, are
- currently unimplemented in curl with Secure Transport.
-
- For OS X users: In OS X 10.8 ("Mountain Lion"), Apple made a major
- overhaul to the Secure Transport API that, among other things, added
- support for the newer TLS 1.1 and 1.2 protocols. To get curl to support
- TLS 1.1 and 1.2, you must build curl on Mountain Lion or later, or by
- using the equivalent SDK. If you set the MACOSX_DEPLOYMENT_TARGET
- environmental variable to an earlier version of OS X prior to building curl,
- then curl will use the new Secure Transport API on Mountain Lion and later,
- and fall back on the older API when the same curl binary is executed on
- older cats. For example, running these commands in curl's directory in the
- shell will build the code such that it will run on cats as old as OS X 10.6
- ("Snow Leopard") (using bash):
-
- export MACOSX_DEPLOYMENT_TARGET="10.6"
- ./configure --with-darwinssl
- make
-
-
-IBM OS/2
-========
- Building under OS/2 is not much different from building under unix.
- You need:
-
- - emx 0.9d
- - GNU make
- - GNU patch
- - ksh
- - GNU bison
- - GNU file utilities
- - GNU sed
- - autoconf 2.13
-
- If you want to build with OpenSSL or OpenLDAP support, you'll need to
- download those libraries, too. Dirk Ohme has done some work to port SSL
- libraries under OS/2, but it looks like he doesn't care about emx. You'll
- find his patches on: http://come.to/Dirk_Ohme
-
- If during the linking you get an error about _errno being an undefined
- symbol referenced from the text segment, you need to add -D__ST_MT_ERRNO__
- in your definitions.
-
- If everything seems to work fine but there's no curl.exe, you need to add
- -Zexe to your linker flags.
-
- If you're getting huge binaries, probably your makefiles have the -g in
- CFLAGS.
-
-
-VMS
-===
- (The VMS section is in whole contributed by the friendly Nico Baggus)
-
- Curl seems to work with FTP & HTTP other protocols are not tested. (the
- perl http/ftp testing server supplied as testing too cannot work on VMS
- because vms has no concept of fork(). [ I tried to give it a whack, but
- that's of no use.
-
- SSL stuff has not been ported.
-
- Telnet has about the same issues as for Win32. When the changes for Win32
- are clear maybe they'll work for VMS too. The basic problem is that select
- ONLY works for sockets.
-
- Marked instances of fopen/[f]stat that might become a problem, especially
- for non stream files. In this regard, the files opened for writing will be
- created stream/lf and will thus be safe. Just keep in mind that non-binary
- read/wring from/to files will have a records size limit of 32767 bytes
- imposed.
-
- Stat to get the size of the files is again only safe for stream files &
- fixed record files without implied CC.
-
- -- My guess is that only allowing access to stream files is the quickest
- way to get around the most issues. Therefore all files need to to be
- checked to be sure they will be stream/lf before processing them. This is
- the easiest way out, I know. The reason for this is that code that needs to
- report the filesize will become a pain in the ass otherwise.
-
- Exit status.... Well we needed something done here,
-
- VMS has a structured exist status:
- | 3 | 2 | 1 | 0|
- |1098|765432109876|5432109876543|210|
- +----+------------+-------------+---+
- |Ctrl| Facility | Error code |sev|
- +----+------------+-------------+---+
-
- With the Ctrl-bits an application can tell if part or the whole message has
- already been printed from the program, DCL doesn't need to print it again.
-
- Facility - basically the program ID. A code assigned to the program
- the name can be fetched from external or internal message libraries
- Error code - the err codes assigned by the application
- Sev. - severity: Even = error, off = non error
- 0 = Warning
- 1 = Success
- 2 = Error
- 3 = Information
- 4 = Fatal
- <5-7> reserved.
-
- This all presents itself with:
- %<FACILITY>-<Sev>-<Errorname>, <Error message>
-
- See also the src/curlmsg.msg file, it has the source for the messages In
- src/main.c a section is devoted to message status values, the globalvalues
- create symbols with certain values, referenced from a compiled message
- file. Have all exit function use a exit status derived from a translation
- table with the compiled message codes.
-
- This was all compiled with:
-
- Compaq C V6.2-003 on OpenVMS Alpha V7.1-1H2
-
- So far for porting notes as of:
- 13-jul-2001
- N. Baggus
-
-
-QNX
-===
- (This section was graciously brought to us by David Bentham)
-
- As QNX is targeted for resource constrained environments, the QNX headers
- set conservative limits. This includes the FD_SETSIZE macro, set by default
- to 32. Socket descriptors returned within the CURL library may exceed this,
- resulting in memory faults/SIGSEGV crashes when passed into select(..)
- calls using fd_set macros.
-
- A good all-round solution to this is to override the default when building
- libcurl, by overriding CFLAGS during configure, example
- # configure CFLAGS='-DFD_SETSIZE=64 -g -O2'
-
-
-RISC OS
-=======
- The library can be cross-compiled using gccsdk as follows:
-
- CC=riscos-gcc AR=riscos-ar RANLIB='riscos-ar -s' ./configure \
- --host=arm-riscos-aof --without-random --disable-shared
- make
-
- where riscos-gcc and riscos-ar are links to the gccsdk tools.
- You can then link your program with curl/lib/.libs/libcurl.a
-
-
-AmigaOS
-=======
- (This section was graciously brought to us by Diego Casorran)
-
- To build cURL/libcurl on AmigaOS just type 'make amiga' ...
-
- What you need is: (not tested with others versions)
-
- GeekGadgets / gcc 2.95.3 (http://www.geekgadgets.org/)
-
- AmiTCP SDK v4.3 (http://www.aminet.net/comm/tcp/AmiTCP-SDK-4.3.lha)
-
- Native Developer Kit (http://www.amiga.com/3.9/download/NDK3.9.lha)
-
- As no ixemul.library is required you will be able to build it for
- WarpOS/PowerPC (not tested by me), as well a MorphOS version should be
- possible with no problems.
-
- To enable SSL support, you need a OpenSSL native version (without ixemul),
- you can find a precompiled package at http://amiga.sourceforge.net/OpenSSL/
-
-
-NetWare
-=======
- To compile curl.nlm / libcurl.nlm you need:
- - either any gcc / nlmconv, or CodeWarrior 7 PDK 4 or later.
- - gnu make and awk running on the platform you compile on;
- native Win32 versions can be downloaded from:
- http://www.gknw.net/development/prgtools/
- - recent Novell LibC SDK available from:
- http://developer.novell.com/ndk/libc.htm
- - or recent Novell CLib SDK available from:
- http://developer.novell.com/ndk/clib.htm
- - optional recent Novell CLDAP SDK available from:
- http://developer.novell.com/ndk/cldap.htm
- - optional zlib sources (static or dynamic linking with zlib.imp);
- sources with NetWare Makefile can be obtained from:
- http://www.gknw.net/mirror/zlib/
- - optional OpenSSL sources (version 0.9.8 or later build with BSD sockets);
- you can find precompiled packages at:
- http://www.gknw.net/development/ossl/netware/
- for CLIB-based builds OpenSSL 0.9.8h or later is required - earlier versions
- don't support building with CLIB BSD sockets.
- - optional SSH2 sources (version 0.17 or later);
-
- Set a search path to your compiler, linker and tools; on Linux make
- sure that the var OSTYPE contains the string 'linux'; set the var
- NDKBASE to point to the base of your Novell NDK; and then type
- 'make netware' from the top source directory; other targets available
- are 'netware-ssl', 'netware-ssl-zlib', 'netware-zlib' and 'netware-ares';
- if you need other combinations you can control the build with the
- environment variables WITH_SSL, WITH_ZLIB, WITH_ARES, WITH_SSH2, and
- ENABLE_IPV6; you can set LINK_STATIC=1 to link curl.nlm statically.
- By default LDAP support is enabled, however currently you will need a patch
- in order to use the CLDAP NDK with BSD sockets (Novell Bug 300237):
- http://www.gknw.net/test/curl/cldap_ndk/ldap_ndk.diff
- I found on some Linux systems (RH9) that OS detection didn't work although
- a 'set | grep OSTYPE' shows the var present and set; I simply overwrote it
- with 'OSTYPE=linux-rh9-gnu' and the detection in the Makefile worked...
- Any help in testing appreciated!
- Builds automatically created 8 times a day from current git are here:
- http://www.gknw.net/mirror/curl/autobuilds/
- the status of these builds can be viewed at the autobuild table:
- http://curl.haxx.se/dev/builds.html
-
-
-eCos
-====
- curl does not use the eCos build system, so you must first build eCos
- separately, then link curl to the resulting eCos library. Here's a sample
- configure line to do so on an x86 Linux box targeting x86:
-
- GCCLIB=`gcc -print-libgcc-file-name` && \
- CFLAGS="-D__ECOS=1 -nostdinc -I$ECOS_INSTALL/include \
- -I`dirname $GCCLIB`/include" \
- LDFLAGS="-nostdlib -Wl,--gc-sections -Wl,-static \
- -L$ECOS_INSTALL/lib -Ttarget.ld -ltarget" \
- ./configure --host=i386 --disable-shared \
- --without-ssl --without-zlib --disable-manual --disable-ldap
-
- In most cases, eCos users will be using libcurl from within a custom
- embedded application. Using the standard 'curl' executable from
- within eCos means facing the limitation of the standard eCos C
- startup code which does not allow passing arguments in main(). To
- run 'curl' from eCos and have it do something useful, you will need
- to either modify the eCos startup code to pass in some arguments, or
- modify the curl application itself to retrieve its arguments from
- some location set by the bootloader or hard-code them.
-
- Something like the following patch could be used to hard-code some
- arguments. The MTAB_ENTRY line mounts a RAM disk as the root filesystem
- (without mounting some kind of filesystem, eCos errors out all file
- operations which curl does not take to well). The next section synthesizes
- some command-line arguments for curl to use, in this case to direct curl
- to read further arguments from a file. It then creates that file on the
- RAM disk and places within it a URL to download: a file: URL that
- just happens to point to the configuration file itself. The results
- of running curl in this way is the contents of the configuration file
- printed to the console.
-
---- src/main.c 19 Jul 2006 19:09:56 -0000 1.363
-+++ src/main.c 24 Jul 2006 21:37:23 -0000
-@@ -4286,11 +4286,31 @@
- }
-
-
-+#ifdef __ECOS
-+#include <cyg/fileio/fileio.h>
-+MTAB_ENTRY( testfs_mte1,
-+ "/",
-+ "ramfs",
-+ "",
-+ 0);
-+#endif
-
- int main(int argc, char *argv[])
- {
- int res;
- struct Configurable config;
-+#ifdef __ECOS
-+ char *args[] = {"ecos-curl", "-K", "curlconf.txt"};
-+ FILE *f;
-+ argc = sizeof(args)/sizeof(args[0]);
-+ argv = args;
-+
-+ f = fopen("curlconf.txt", "w");
-+ if (f) {
-+ fprintf(f, "--url file:curlconf.txt");
-+ fclose(f);
-+ }
-+#endif
- memset(&config, 0, sizeof(struct Configurable));
-
- config.errors = stderr; /* default errors to stderr */
-
-
-Minix
-=====
- curl can be compiled on Minix 3 using gcc or ACK (starting with
- ver. 3.1.3). Ensure that GNU gawk and bash are both installed and
- available in the PATH.
-
- ACK
- ---
- Increase the heap sizes of the compiler with the command:
-
- binsizes xxl
-
- then configure and compile curl with:
-
- ./configure CC=cc LD=cc AR=/usr/bin/aal GREP=grep \
- CPPFLAGS='-D_POSIX_SOURCE=1 -I/usr/local/include'
- make
- chmem =256000 src/curl
-
- GCC
- ---
- Make sure gcc is in your PATH with the command:
-
- export PATH=/usr/gnu/bin:$PATH
-
- then configure and compile curl with:
-
- ./configure CC=gcc AR=/usr/gnu/bin/gar GREP=grep
- make
- chmem =256000 src/curl
-
-
-Symbian OS
-==========
- The Symbian OS port uses the Symbian build system to compile. From the
- packages/Symbian/group/ directory, run:
-
- bldmake bldfiles
- abld build
-
- to compile and install curl and libcurl using SBSv1. If your Symbian
- SDK doesn't include support for P.I.P.S., you will need to contact
- your SDK vendor to obtain that first.
-
-
-VxWorks
-========
- Build for VxWorks is performed using cross compilation.
- That means you build on Windows machine using VxWorks tools and
- run the built image on the VxWorks device.
-
- To build libcurl for VxWorks you need:
-
- - CYGWIN (free, http://cygwin.com/)
- - Wind River Workbench (commercial)
-
- If you have CYGWIN and Workbench installed on you machine
- follow after next steps:
-
- 1. Open the Command Prompt window and change directory ('cd')
- to the libcurl 'lib' folder.
- 2. Add CYGWIN 'bin' folder to the PATH environment variable.
- For example, type 'set PATH=C:/embedded/cygwin/bin;%PATH%'.
- 3. Adjust environment variables defined in 'Environment' section
- of the Makefile.vxworks file to point to your software folders.
- 4. Build the libcurl by typing 'make -f ./Makefile.vxworks'
-
- As a result the libcurl.a library should be created in the 'lib' folder.
- To clean the build results type 'make -f ./Makefile.vxworks clean'.
-
-
-Android
-=======
- Method using the static makefile:
- - see the build notes in the packages/Android/Android.mk file.
-
- Method using a configure cross-compile (tested with Android NDK r7c, r8):
- - prepare the toolchain of the Android NDK for standalone use; this can
- be done by invoking the script:
- ./build/tools/make-standalone-toolchain.sh
- which creates a usual cross-compile toolchain. Lets assume that you put
- this toolchain below /opt then invoke configure with something like:
- export PATH=/opt/arm-linux-androideabi-4.4.3/bin:$PATH
- ./configure --host=arm-linux-androideabi [more configure options]
- make
- - if you want to compile directly from our GIT repo you might run into
- this issue with older automake stuff:
- checking host system type...
- Invalid configuration `arm-linux-androideabi':
- system `androideabi' not recognized
- configure: error: /bin/sh ./config.sub arm-linux-androideabi failed
- this issue can be fixed with using more recent versions of config.sub
- and config.guess which can be obtained here:
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=tree
- you need to replace your system-own versions which usually can be
- found in your automake folder:
- find /usr -name config.sub
-
- Wrapper for pkg-config
- - In order to make proper use of pkg-config so that configure is able to
- find all dependencies you should create a wrapper script for pkg-config;
- file /opt/arm-linux-androideabi-4.4.3/bin/arm-linux-androideabi-pkg-config:
-
- #!/bin/sh
- SYSROOT=$(dirname ${0%/*})/sysroot
- export PKG_CONFIG_DIR=
- export PKG_CONFIG_LIBDIR=${SYSROOT}/usr/local/lib/pkgconfig:${SYSROOT}/usr/share/pkgconfig
- export PKG_CONFIG_SYSROOT_DIR=${SYSROOT}
- exec pkg-config "$@"
-
- also create a copy or symlink with name arm-unknown-linux-androideabi-pkg-config.
-
-
-CROSS COMPILE
-=============
- (This section was graciously brought to us by Jim Duey, with additions by
- Dan Fandrich)
-
- Download and unpack the cURL package.
-
- 'cd' to the new directory. (e.g. cd curl-7.12.3)
-
- Set environment variables to point to the cross-compile toolchain and call
- configure with any options you need. Be sure and specify the '--host' and
- '--build' parameters at configuration time. The following script is an
- example of cross-compiling for the IBM 405GP PowerPC processor using the
- toolchain from MonteVista for Hardhat Linux.
-
- (begin script)
-
- #! /bin/sh
-
- export PATH=$PATH:/opt/hardhat/devkit/ppc/405/bin
- export CPPFLAGS="-I/opt/hardhat/devkit/ppc/405/target/usr/include"
- export AR=ppc_405-ar
- export AS=ppc_405-as
- export LD=ppc_405-ld
- export RANLIB=ppc_405-ranlib
- export CC=ppc_405-gcc
- export NM=ppc_405-nm
-
- ./configure --target=powerpc-hardhat-linux \
- --host=powerpc-hardhat-linux \
- --build=i586-pc-linux-gnu \
- --prefix=/opt/hardhat/devkit/ppc/405/target/usr/local \
- --exec-prefix=/usr/local
-
- (end script)
-
- You may also need to provide a parameter like '--with-random=/dev/urandom'
- to configure as it cannot detect the presence of a random number
- generating device for a target system. The '--prefix' parameter
- specifies where cURL will be installed. If 'configure' completes
- successfully, do 'make' and 'make install' as usual.
-
- In some cases, you may be able to simplify the above commands to as
- little as:
-
- ./configure --host=ARCH-OS
-
-
-REDUCING SIZE
-=============
- There are a number of configure options that can be used to reduce the
- size of libcurl for embedded applications where binary size is an
- important factor. First, be sure to set the CFLAGS variable when
- configuring with any relevant compiler optimization flags to reduce the
- size of the binary. For gcc, this would mean at minimum the -Os option,
- and potentially the -march=X and -mdynamic-no-pic options as well, e.g.
-
- ./configure CFLAGS='-Os' ...
-
- Note that newer compilers often produce smaller code than older versions
- due to improved optimization.
-
- Be sure to specify as many --disable- and --without- flags on the configure
- command-line as you can to disable all the libcurl features that you
- know your application is not going to need. Besides specifying the
- --disable-PROTOCOL flags for all the types of URLs your application
- will not use, here are some other flags that can reduce the size of the
- library:
-
- --disable-ares (disables support for the C-ARES DNS library)
- --disable-cookies (disables support for HTTP cookies)
- --disable-crypto-auth (disables HTTP cryptographic authentication)
- --disable-ipv6 (disables support for IPv6)
- --disable-manual (disables support for the built-in documentation)
- --disable-proxy (disables support for HTTP and SOCKS proxies)
- --disable-verbose (eliminates debugging strings and error code strings)
- --enable-hidden-symbols (eliminates unneeded symbols in the shared library)
- --without-libidn (disables support for the libidn DNS library)
- --without-ssl (disables support for SSL/TLS)
- --without-zlib (disables support for on-the-fly decompression)
-
- The GNU compiler and linker have a number of options that can reduce the
- size of the libcurl dynamic libraries on some platforms even further.
- Specify them by providing appropriate CFLAGS and LDFLAGS variables on the
- configure command-line, e.g.
- CFLAGS="-Os -ffunction-sections -fdata-sections \
- -fno-unwind-tables -fno-asynchronous-unwind-tables" \
- LDFLAGS="-Wl,-s -Wl,-Bsymbolic -Wl,--gc-sections"
-
- Be sure also to strip debugging symbols from your binaries after
- compiling using 'strip' (or the appropriate variant if cross-compiling).
- If space is really tight, you may be able to remove some unneeded
- sections of the shared library using the -R option to objcopy (e.g. the
- .comment section).
-
- Using these techniques it is possible to create a basic HTTP-only shared
- libcurl library for i386 Linux platforms that is only 106 KiB in size, and
- an FTP-only library that is 108 KiB in size (as of libcurl version 7.27.0,
- using gcc 4.6.3).
-
- You may find that statically linking libcurl to your application will
- result in a lower total size than dynamically linking.
-
- Note that the curl test harness can detect the use of some, but not all, of
- the --disable statements suggested above. Use will cause tests relying on
- those features to fail. The test harness can be manually forced to skip
- the relevant tests by specifying certain key words on the runtests.pl
- command line. Following is a list of appropriate key words:
-
- --disable-cookies !cookies
- --disable-crypto-auth !HTTP\ Digest\ auth !HTTP\ proxy\ Digest\ auth
- --disable-manual !--manual
- --disable-proxy !HTTP\ proxy !proxytunnel !SOCKS4 !SOCKS5
-
-
-PORTS
-=====
- This is a probably incomplete list of known hardware and operating systems
- that curl has been compiled for. If you know a system curl compiles and
- runs on, that isn't listed, please let us know!
-
- - Alpha DEC OSF 4
- - Alpha Digital UNIX v3.2
- - Alpha FreeBSD 4.1, 4.5
- - Alpha Linux 2.2, 2.4
- - Alpha NetBSD 1.5.2
- - Alpha OpenBSD 3.0
- - Alpha OpenVMS V7.1-1H2
- - Alpha Tru64 v5.0 5.1
- - AVR32 Linux
- - ARM Android 1.5, 2.1, 2.3, 3.2, 4.x
- - ARM INTEGRITY
- - ARM iOS
- - Cell Linux
- - Cell Cell OS
- - HP-PA HP-UX 9.X 10.X 11.X
- - HP-PA Linux
- - HP3000 MPE/iX
- - MicroBlaze uClinux
- - MIPS IRIX 6.2, 6.5
- - MIPS Linux
- - OS/400
- - Pocket PC/Win CE 3.0
- - Power AIX 3.2.5, 4.2, 4.3.1, 4.3.2, 5.1, 5.2
- - PowerPC Darwin 1.0
- - PowerPC INTEGRITY
- - PowerPC Linux
- - PowerPC Mac OS 9
- - PowerPC Mac OS X
- - SH4 Linux 2.6.X
- - SH4 OS21
- - SINIX-Z v5
- - Sparc Linux
- - Sparc Solaris 2.4, 2.5, 2.5.1, 2.6, 7, 8, 9, 10
- - Sparc SunOS 4.1.X
- - StrongARM (and other ARM) RISC OS 3.1, 4.02
- - StrongARM/ARM7/ARM9 Linux 2.4, 2.6
- - StrongARM NetBSD 1.4.1
- - Symbian OS (P.I.P.S.) 9.x
- - TPF
- - Ultrix 4.3a
- - UNICOS 9.0
- - i386 BeOS
- - i386 DOS
- - i386 eCos 1.3.1
- - i386 Esix 4.1
- - i386 FreeBSD
- - i386 HURD
- - i386 Haiku OS
- - i386 Linux 1.3, 2.0, 2.2, 2.3, 2.4, 2.6
- - i386 Mac OS X
- - i386 MINIX 3.1
- - i386 NetBSD
- - i386 Novell NetWare
- - i386 OS/2
- - i386 OpenBSD
- - i386 QNX 6
- - i386 SCO unix
- - i386 Solaris 2.7
- - i386 Windows 95, 98, ME, NT, 2000, XP, 2003
- - i486 ncr-sysv4.3.03 (NCR MP-RAS)
- - ia64 Linux 2.3.99
- - m68k AmigaOS 3
- - m68k Linux
- - m68k uClinux
- - m68k OpenBSD
- - m88k dg-dgux5.4R3.00
- - s390 Linux
- - x86_64 Linux
- - XScale/PXA250 Linux 2.4
- - Nios II uClinux
-
-Useful URLs
-===========
-
-axTLS http://axtls.sourceforge.net/
-c-ares http://c-ares.haxx.se/
-GNU GSS http://www.gnu.org/software/gss/
-GnuTLS http://www.gnu.org/software/gnutls/
-Heimdal http://www.pdc.kth.se/heimdal/
-libidn http://www.gnu.org/software/libidn/
-libmetalink https://launchpad.net/libmetalink/
-libssh2 http://www.libssh2.org/
-MIT Kerberos http://web.mit.edu/kerberos/www/dist/
-NSS http://www.mozilla.org/projects/security/pki/nss/
-OpenLDAP http://www.openldap.org/
-OpenSSL http://www.openssl.org/
-PolarSSL http://polarssl.org/
-yassl http://www.yassl.com/
-Zlib http://www.zlib.net/
-
-MingW http://www.mingw.org/
-MinGW-w64 http://mingw-w64.sourceforge.net/
-OpenWatcom http://www.openwatcom.org/
diff --git a/libs/libcurl/docs/INSTALL.devcpp b/libs/libcurl/docs/INSTALL.devcpp
deleted file mode 100644
index 46d1836af9..0000000000
--- a/libs/libcurl/docs/INSTALL.devcpp
+++ /dev/null
@@ -1,302 +0,0 @@
-DevCpp-Mingw Install & Compilation Sept 2005
-==================================
-
-Reference Emails available at curl@haxx.se:
-
- Libcurl Install and Use Issues
- Awaiting an Answer for Win 32 Install
- res = curl_easy_perform(curl); Error
- Makefile Issues
-
-
-Having previously done a thorough review of what was available that met my
-requirements under GPL, I settled for Libcurl as the software of choice for
-many reasons not the least of which was the support.
-
-Background
-----------
-
-This quest started when I innocently tried to incorporate the libcurl library
-into my simple source code. I figured that a few easy steps would accomplish
-this without major headaches. I had no idea that I would be facing an almost
-insurmountable challenge.
-
-The main problem lies in two areas. First the bulk of support for libcurl
-exists for a Unix/linux command line environments. This is of little help when
-it comes to Windows O/S.
-
-Secondly the help that does exist for the Windows O/S focused around mingw
-through a command line argument environment.
-
-You may ask "Why is this a problem?"
-
-I'm using a Windows O/S with DevCpp. For those of you who are unfamiliar with
-DevCpp, it is a window shell GUI that replaces the command line environment
-for gcc. A definite improvement that I am unwilling to give up. However using
-DevCpp presented its own set of issues. Inadvertently I also made some
-careless errors such as compiling the 7.14 version of Makefile with an older
-version of source code. Thanks to Dan Fandrich for picking this up.
-
-I did eventually with the help of Daniel, Phillipe and others manage to
-implement successfully (the only mingw available version)
-curl-7.13.0-win32-ssl-devel-mingw32 into the DevCpp environment. Only the
-dynamic libcurl.dll libcurldll.a libraries worked. The static library which I
-was interested in did not. Furthermore when I tried to implement one of the
-examples included with the curl package (get info.c) it caused the executable
-to crash. Tracing the bug I found it in the code and function res =
-curl_easy_perform(curl);.
-
-At this point I had to make a choice as to whether invest my limited
-time-energy resource to fixing the bug or to compile the new version
-available. After searching the archives I found a very similar or the same bug
-reported from version 7.12x on. Daniel did inform me that he thought that this
-bug had been fixed with the latest version. So I proceeded to compile the
-latest SSL version where I faced other challenges.
-
-In order to make this process unremarkable for others using the same
-environment I decided to document the process so that others will find it
-routine. It would be a shame if newbies could not implement this excellent
-package for their use.
-
-I would like to thank the many others in this forum and in the DevCpp forum
-for their help. Without your help I may either have given up or it would have
-taken me many times longer to achieve success.
-
-The Cookbook Approach
----------------------
-
-This discussion will be confined to a SSL static library compilation and
-installation. Limited mention and comments will be inserted where appropriate
-to help with non-SSL, dynamic libraries and executables.
-
-
- Using Makefile from DevCpp to compile Libcurl libraries
-
-Preamble
---------
-
-Using the latest version release - curl-7.14.0.tar.gz. Curl source code is
-platform independent. This simply means that the source code can be compiled
-for any Operating System (Linux/Unix Windows etc. and variations of thereof).
-
-The first thing to note is that inside curl-7.14.0 you will find two folders
-lib and src. Both contain Makefile.m32 (required for win mingw library or exe
-compilation) files which are different. The main difference between these two
-folders and the makefiles is that the src folder contents are used to compile
-an executable file(curl.exe) while the lib folder contents are used to compile
-a static (libcurl.a) and dynamic (libcurl.dll & libcurldll.a) file that can be
-used to compile libcurl with your own source code so that one can use and
-access all libcurl functions.
-
-Before we start please make sure that DevCpp is installed properly. In
-particular make sure you have no spaces in the name of any of the directories
-and subdirectories where DevCpp is installed. Failure to comply with the
-install instructions may produce erratic behaviour in DevCpp. For further info
-check the following sites
-
-http://aditsu.freeunixhost.com/dev-cpp-faq.html
-http://sourceforge.net/forum/message.php?msg_id=3252213
-
-As I have mentioned before I will confine this to the SSL Library compilations
-but the process is very similar for compilation of the executable - curl.exe;
-just substitute the src folder makefile in its stead.
-
-First use a text processor Notepad, or your own favourite text processor. To
-engage your favourite text processor, select Makefile.m32 click once with your
-mouse on file icon; icon turns blue, press the shift key and right-click on
-mouse, menu appears select "Open with", select your favourite text processor.
-
-Next read the contents of Makefile.m32. It includes instructions on its use.
-
-Method I - DOS Command Line
----------------------------
-
-Note - The only reason I have included this method is that Method II which is
-the preferred method for compiling does not allow for the setting of option
-switches (e.g. SSL = 1 or SSL =0). At least that's what they tell me at the
-Dev-Cpp forum.
-
-1 - Make a copy of (D:\Dev-Cpp\bin) bin folder and name it "bin Original"
-place it in the Dev-Cpp installed directory (D:\Dev-Cpp\ for this example)
-
-2 - Copy the entire contents of the LIB folder of curl-7.14.0.tar.gz or zip
-version into the bin folder above (D:\Dev-Cpp\bin). The reason being is that
-the make.exe file resides in this folder. Make.exe will use - Makefile.m32,
-Makefile.inc, and the source code included in the lib folder to compile the
-source code. There is a PATH issue with make.exe that remains unresolved at
-least for me. Unless the entire source code to be compiled is placed entirely
-within the directory of make.exe an error message will be generated - "file
-xxxx.yyy not available".
-
-3- Go to Dev-Cpp\bin and double click on make .exe. You will see a DOS window
-quickly pop up and close very quickly. Not to worry! Please do not skip this
-step.
-
-4- Click on the start button\Programs\MS-DOS Prompt.Once the DOS Window is up
-Type the disk drive letter (e.g. E: ) engage the enter button. The path should
-automatically take you to the directory of the make.exe file.
-
-5- To compile the source code simply type at the DOS prompt make -f
-Makefile.m32 as per instructions contained in the Makefile.m32 file (use any
-text processor to read instructions). I don't believe that this makefile
-allows for the option of non SSL. Ignore any warnings.
-
-6- Collect and make copies of libcurl.a, libcurl.dll, libcurldll.a and any *.o
-compilations you might need in another directory outside of the bin directory
-as you will need this files shortly to set up libcurl for use with
-Dev-cpp. For most apps *.o is not required. Later on we will show what to do
-with these files.
-
-7- You are finished but before closing we need to do cleanup - erase the bin
-folder and rename the "bin Original" folder created in step 1 to bin.
-
-Note to compile a curl executable the process is probably similar but instead
-of using the LIB folder contents use the SRC folder contents and Makefiles in
-curl-7.14.0.tar.gz. File directories relative placements must be respected for
-compiling to take place successfully. This may not be possible with the PATH
-problem that make.exe experiences. If anyone has solved this PATH issue and
-please make sure it actually works on Win 9x/2000/XP before letting me
-know. Then please let me or Daniel in on the solution so that it can be
-included with these instructions. Thanks.
-
-or
-
-Method II - Dev-Cpp GUI
------------------------
-
-1- Copy the entire contents of the LIB folder of curl-7.14.0.tar.gz or zip
-version into any folder outside of (Dev-Cpp\bin).
-
-2- Drop the File/New/click on Project.
-
-3- New Project Dialogue box appears. Double click on the Static Library.
-
-4- Create Project Dialogue box appears. Select the LIB folder location to
-place and locate your Project File Name. Placing the Project File Name
-elsewhere may cause problems (PATH issue problem again).
-
-5- Drop down the Project/Project Options. Project Options Dialogue box
-appears.
-
-6- Select the Makefile tab in the Project Options Dialogue Box. Check Box -
-Use Custom Makefile. Click on the Folder icon at the extreme right of the
-Check Box. Select Makefile.m32 in the folder wherever you have placed the
-contents of the LIB Folder. Press OK and close the Dialogue Box.
-
-7- Drop the Menu Project/Click on Add to Project. Open File Dialogue Box
-appears. The Dialogue Box should open in the folder wherever you have placed
-the contents of the LIB Folder. If not go there.
-
-8- Select Crtl-A to select all files in the LIB folder. Click on open to add
-files and close box. Wait till all files are added. This may take 30 seconds
-or longer.
-
-9- Drop the Menu Execute/Click on Compile.
-
-10- That's it.
-
-
- The following steps must be completed if Curl is to work properly
- =================================================================
-
-LIB folder inclusions (*.a placement)
--------------------------------------
-
-1- Refer to Method I - DOS Command Line point # 6 Take libcurl.a, libcurldll.a
-and install it in the directory C( or whichever drive Dev is installed)
-:\Dev-Cpp\lib.
-
-
-Include Folder
---------------
-
-1- Create a new folder by the name of curl (do not change the name curl to
-some other name as it will cause major issues) in the directory
-C:\Dev-Cpp\include.
-
-2- Copy the entire contents of the curl folder of curl-7.14.0.tar.gz or zip
- version into the newly created curl directory - C:\Dev-Cpp\include\curl.
-
-Links To Include And Lib Folder
--------------------------------
-
-1- Drop the Menu - Tools\Compiler Options\Directories\Libraries. Make sure
-that C( or whichever drive Dev is installed):\DEV-CPP\lib is included.
-
-2- Next select the Menu - Tools\Compiler Options\Directories\C Includes. Make
-sure that C:\DEV-CPP\include and C:\Dev-Cpp\include\curl are included.
-
-3- Next select the Menu - Tools\Compiler Options\Directories\C++
-Includes. Make sure that C:\DEV-CPP\include and C:\Dev-Cpp\include\curl are
-included.
-
-Linker Links
-------------
-
-1- Drop the Menu - Tools\Compiler Options\Directories\Compiler.
-
-2- Make sure that the box "Add these commands to the linker command line" is
-checked.
-
-3- Include in the white space immediately below the box referred in 2 -lcurl
--lws2_32.
-
-SSL Files
----------
-
-1- Get the latest openSSL (as of time of this writing)
-openssl-0.9.7e-win32-bin.zip for the minimalist package of the openssl-0.9.7e
-binaries ported to MS Windows 95/98/NT/XP using the MingW32/GCC-3.1
-development environment. The file may be downloaded at
-http://curl.haxx.se/download/.
-
-2- Open the above zip file. You will find two files - SDL.dll,
-SDL_mixer.dll. Install them in the directory C:\WINDOWS\SYSTEM32 for Win 9x
-users and c:\winnt\system32 for NT-family users.
-
-Multithreading Files
---------------------
-
-To be completed
-
-#define
--------
-
-1- Make sure that your program includes the following - #define CURL_STATICLIB
-must be declared FIRST before any other define functions may be
-added. Otherwise you may experience link errors.
-
-2- Don't forget to include #include "curl/curl.h".
-
-e.g.
- #define CURL_STATICLIB
-#include <windows.h>
- #include "curl/curl.h"
-#include <fstream>
-#include <iostream>
-#include <vector>
-etc...
-
-
-Static or Dynamic Library
--------------------------
-
-The above steps apply for the use by a static library. Should you choose to
-use a dynamic library you will be required to perform these additional steps.
-
-1- Refer to Method I - DOS Command Line point # 6. Install libcurl.dll in the
-directory C:\WINDOWS\SYSTEM32 for Win 9x users and c:\winnt\system32 for
-NT-family users.
-
-2- Refer to Linker Links point 3 - Replace -lcurl with -lcurldll.
-
-Voila you're done.
-
-The non-SSL static Library build may not be possible to use at least as of the
-time of this writing - v7.14. Check reference emails - Phillipe and I found it
-impossible to fully compile as certain files were missing for linking. No big
-loss as SSL is a major plus.
-
-Hope this Helps
-
-Tom
diff --git a/libs/libcurl/docs/INTERNALS b/libs/libcurl/docs/INTERNALS
deleted file mode 100644
index 66e11a46b7..0000000000
--- a/libs/libcurl/docs/INTERNALS
+++ /dev/null
@@ -1,471 +0,0 @@
- _ _ ____ _
- ___| | | | _ \| |
- / __| | | | |_) | |
- | (__| |_| | _ <| |___
- \___|\___/|_| \_\_____|
-
-INTERNALS
-
- The project is split in two. The library and the client. The client part uses
- the library, but the library is designed to allow other applications to use
- it.
-
- The largest amount of code and complexity is in the library part.
-
-GIT
-===
- All changes to the sources are committed to the git repository as soon as
- they're somewhat verified to work. Changes shall be committed as independently
- as possible so that individual changes can be easier spotted and tracked
- afterwards.
-
- Tagging shall be used extensively, and by the time we release new archives we
- should tag the sources with a name similar to the released version number.
-
-Portability
-===========
-
- We write curl and libcurl to compile with C89 compilers. On 32bit and up
- machines. Most of libcurl assumes more or less POSIX compliance but that's
- not a requirement.
-
- We write libcurl to build and work with lots of third party tools, and we
- want it to remain functional and buildable with these and later versions
- (older versions may still work but is not what we work hard to maintain):
-
- OpenSSL 0.9.6
- GnuTLS 1.2
- zlib 1.1.4
- libssh2 0.16
- c-ares 1.6.0
- libidn 0.4.1
- cyassl 2.0.0
- openldap 2.0
- MIT krb5 lib 1.2.4
- qsossl V5R3M0
- NSS 3.12.x
- axTLS 1.2.7
- Heimdal ?
-
- On systems where configure runs, we aim at working on them all - if they have
- a suitable C compiler. On systems that don't run configure, we strive to keep
- curl running fine on:
-
- Windows 98
- AS/400 V5R3M0
- Symbian 9.1
- Windows CE ?
- TPF ?
-
- When writing code (mostly for generating stuff included in release tarballs)
- we use a few "build tools" and we make sure that we remain functional with
- these versions:
-
- GNU Libtool 1.4.2
- GNU Autoconf 2.57
- GNU Automake 1.7 (we currently avoid 1.10 due to Solaris-related bugs)
- GNU M4 1.4
- perl 5.004
- roffit 0.5
- groff ? (any version that supports "groff -Tps -man [in] [out]")
- ps2pdf (gs) ?
-
-Windows vs Unix
-===============
-
- There are a few differences in how to program curl the unix way compared to
- the Windows way. The four perhaps most notable details are:
-
- 1. Different function names for socket operations.
-
- In curl, this is solved with defines and macros, so that the source looks
- the same at all places except for the header file that defines them. The
- macros in use are sclose(), sread() and swrite().
-
- 2. Windows requires a couple of init calls for the socket stuff.
-
- That's taken care of by the curl_global_init() call, but if other libs also
- do it etc there might be reasons for applications to alter that behaviour.
-
- 3. The file descriptors for network communication and file operations are
- not easily interchangeable as in unix.
-
- We avoid this by not trying any funny tricks on file descriptors.
-
- 4. When writing data to stdout, Windows makes end-of-lines the DOS way, thus
- destroying binary data, although you do want that conversion if it is
- text coming through... (sigh)
-
- We set stdout to binary under windows
-
- Inside the source code, We make an effort to avoid '#ifdef [Your OS]'. All
- conditionals that deal with features *should* instead be in the format
- '#ifdef HAVE_THAT_WEIRD_FUNCTION'. Since Windows can't run configure scripts,
- we maintain a curl_config-win32.h file in lib directory that is supposed to
- look exactly as a curl_config.h file would have looked like on a Windows
- machine!
-
- Generally speaking: always remember that this will be compiled on dozens of
- operating systems. Don't walk on the edge.
-
-Library
-=======
-
- (See LIBCURL-STRUCTS for a separate document describing all major internal
- structs and their purposes.)
-
- There are plenty of entry points to the library, namely each publicly defined
- function that libcurl offers to applications. All of those functions are
- rather small and easy-to-follow. All the ones prefixed with 'curl_easy' are
- put in the lib/easy.c file.
-
- curl_global_init_() and curl_global_cleanup() should be called by the
- application to initialize and clean up global stuff in the library. As of
- today, it can handle the global SSL initing if SSL is enabled and it can init
- the socket layer on windows machines. libcurl itself has no "global" scope.
-
- All printf()-style functions use the supplied clones in lib/mprintf.c. This
- makes sure we stay absolutely platform independent.
-
- curl_easy_init() allocates an internal struct and makes some initializations.
- The returned handle does not reveal internals. This is the 'SessionHandle'
- struct which works as an "anchor" struct for all curl_easy functions. All
- connections performed will get connect-specific data allocated that should be
- used for things related to particular connections/requests.
-
- curl_easy_setopt() takes three arguments, where the option stuff must be
- passed in pairs: the parameter-ID and the parameter-value. The list of
- options is documented in the man page. This function mainly sets things in
- the 'SessionHandle' struct.
-
- curl_easy_perform() is just a wrapper function that makes use of the multi
- API. It basically curl_multi_init(), curl_multi_add_handle(),
- curl_multi_wait(), and curl_multi_perform() until the transfer is done and
- then returns.
-
- Some of the most important key functions in url.c are called from multi.c
- when certain key steps are to be made in the transfer operation.
-
- o Curl_connect()
-
- Analyzes the URL, it separates the different components and connects to the
- remote host. This may involve using a proxy and/or using SSL. The
- Curl_resolv() function in lib/hostip.c is used for looking up host names
- (it does then use the proper underlying method, which may vary between
- platforms and builds).
-
- When Curl_connect is done, we are connected to the remote site. Then it is
- time to tell the server to get a document/file. Curl_do() arranges this.
-
- This function makes sure there's an allocated and initiated 'connectdata'
- struct that is used for this particular connection only (although there may
- be several requests performed on the same connect). A bunch of things are
- inited/inherited from the SessionHandle struct.
-
- o Curl_do()
-
- Curl_do() makes sure the proper protocol-specific function is called. The
- functions are named after the protocols they handle.
-
- The protocol-specific functions of course deal with protocol-specific
- negotiations and setup. They have access to the Curl_sendf() (from
- lib/sendf.c) function to send printf-style formatted data to the remote
- host and when they're ready to make the actual file transfer they call the
- Curl_Transfer() function (in lib/transfer.c) to setup the transfer and
- returns.
-
- If this DO function fails and the connection is being re-used, libcurl will
- then close this connection, setup a new connection and re-issue the DO
- request on that. This is because there is no way to be perfectly sure that
- we have discovered a dead connection before the DO function and thus we
- might wrongly be re-using a connection that was closed by the remote peer.
-
- Some time during the DO function, the Curl_setup_transfer() function must
- be called with some basic info about the upcoming transfer: what socket(s)
- to read/write and the expected file transfer sizes (if known).
-
- o Curl_readwrite()
-
- Called during the transfer of the actual protocol payload.
-
- During transfer, the progress functions in lib/progress.c are called at a
- frequent interval (or at the user's choice, a specified callback might get
- called). The speedcheck functions in lib/speedcheck.c are also used to
- verify that the transfer is as fast as required.
-
- o Curl_done()
-
- Called after a transfer is done. This function takes care of everything
- that has to be done after a transfer. This function attempts to leave
- matters in a state so that Curl_do() should be possible to call again on
- the same connection (in a persistent connection case). It might also soon
- be closed with Curl_disconnect().
-
- o Curl_disconnect()
-
- When doing normal connections and transfers, no one ever tries to close any
- connections so this is not normally called when curl_easy_perform() is
- used. This function is only used when we are certain that no more transfers
- is going to be made on the connection. It can be also closed by force, or
- it can be called to make sure that libcurl doesn't keep too many
- connections alive at the same time.
-
- This function cleans up all resources that are associated with a single
- connection.
-
-
- HTTP(S)
-
- HTTP offers a lot and is the protocol in curl that uses the most lines of
- code. There is a special file (lib/formdata.c) that offers all the multipart
- post functions.
-
- base64-functions for user+password stuff (and more) is in (lib/base64.c) and
- all functions for parsing and sending cookies are found in (lib/cookie.c).
-
- HTTPS uses in almost every means the same procedure as HTTP, with only two
- exceptions: the connect procedure is different and the function used to read
- or write from the socket is different, although the latter fact is hidden in
- the source by the use of Curl_read() for reading and Curl_write() for writing
- data to the remote server.
-
- http_chunks.c contains functions that understands HTTP 1.1 chunked transfer
- encoding.
-
- An interesting detail with the HTTP(S) request, is the Curl_add_buffer()
- series of functions we use. They append data to one single buffer, and when
- the building is done the entire request is sent off in one single write. This
- is done this way to overcome problems with flawed firewalls and lame servers.
-
- FTP
-
- The Curl_if2ip() function can be used for getting the IP number of a
- specified network interface, and it resides in lib/if2ip.c.
-
- Curl_ftpsendf() is used for sending FTP commands to the remote server. It was
- made a separate function to prevent us programmers from forgetting that they
- must be CRLF terminated. They must also be sent in one single write() to make
- firewalls and similar happy.
-
- Kerberos
-
- The kerberos support is mainly in lib/krb4.c and lib/security.c.
-
- TELNET
-
- Telnet is implemented in lib/telnet.c.
-
- FILE
-
- The file:// protocol is dealt with in lib/file.c.
-
- LDAP
-
- Everything LDAP is in lib/ldap.c and lib/openldap.c
-
- GENERAL
-
- URL encoding and decoding, called escaping and unescaping in the source code,
- is found in lib/escape.c.
-
- While transferring data in Transfer() a few functions might get used.
- curl_getdate() in lib/parsedate.c is for HTTP date comparisons (and more).
-
- lib/getenv.c offers curl_getenv() which is for reading environment variables
- in a neat platform independent way. That's used in the client, but also in
- lib/url.c when checking the proxy environment variables. Note that contrary
- to the normal unix getenv(), this returns an allocated buffer that must be
- free()ed after use.
-
- lib/netrc.c holds the .netrc parser
-
- lib/timeval.c features replacement functions for systems that don't have
- gettimeofday() and a few support functions for timeval conversions.
-
- A function named curl_version() that returns the full curl version string is
- found in lib/version.c.
-
-Persistent Connections
-======================
-
- The persistent connection support in libcurl requires some considerations on
- how to do things inside of the library.
-
- o The 'SessionHandle' struct returned in the curl_easy_init() call must never
- hold connection-oriented data. It is meant to hold the root data as well as
- all the options etc that the library-user may choose.
- o The 'SessionHandle' struct holds the "connection cache" (an array of
- pointers to 'connectdata' structs).
- o This enables the 'curl handle' to be reused on subsequent transfers.
- o When libcurl is told to perform a transfer, it first checks for an already
- existing connection in the cache that we can use. Otherwise it creates a
- new one and adds that the cache. If the cache is full already when a new
- conncetion is added added, it will first close the oldest unused one.
- o When the transfer operation is complete, the connection is left
- open. Particular options may tell libcurl not to, and protocols may signal
- closure on connections and then they won't be kept open of course.
- o When curl_easy_cleanup() is called, we close all still opened connections,
- unless of course the multi interface "owns" the connections.
-
- The curl handle must be re-used in order for the persistent connections to
- work.
-
-multi interface/non-blocking
-============================
-
- The multi interface is a non-blocking interface to the library. To make that
- interface work as good as possible, no low-level functions within libcurl
- must be written to work in a blocking manner. (There are still a few spots
- violating this rule.)
-
- One of the primary reasons we introduced c-ares support was to allow the name
- resolve phase to be perfectly non-blocking as well.
-
- The FTP and the SFTP/SCP protocols are examples of how we adapt and adjust
- the code to allow non-blocking operations even on multi-stage command-
- response protocols. They are built around state machines that return when
- they would otherwise block waiting for data. The DICT, LDAP and TELNET
- protocols are crappy examples and they are subject for rewrite in the future
- to better fit the libcurl protocol family.
-
-SSL libraries
-=============
-
- Originally libcurl supported SSLeay for SSL/TLS transports, but that was then
- extended to its successor OpenSSL but has since also been extended to several
- other SSL/TLS libraries and we expect and hope to further extend the support
- in future libcurl versions.
-
- To deal with this internally in the best way possible, we have a generic SSL
- function API as provided by the sslgen.[ch] system, and they are the only SSL
- functions we must use from within libcurl. sslgen is then crafted to use the
- appropriate lower-level function calls to whatever SSL library that is in
- use.
-
-Library Symbols
-===============
-
- All symbols used internally in libcurl must use a 'Curl_' prefix if they're
- used in more than a single file. Single-file symbols must be made static.
- Public ("exported") symbols must use a 'curl_' prefix. (There are exceptions,
- but they are to be changed to follow this pattern in future versions.) Public
- API functions are marked with CURL_EXTERN in the public header files so that
- all others can be hidden on platforms where this is possible.
-
-Return Codes and Informationals
-===============================
-
- I've made things simple. Almost every function in libcurl returns a CURLcode,
- that must be CURLE_OK if everything is OK or otherwise a suitable error code
- as the curl/curl.h include file defines. The very spot that detects an error
- must use the Curl_failf() function to set the human-readable error
- description.
-
- In aiding the user to understand what's happening and to debug curl usage, we
- must supply a fair amount of informational messages by using the Curl_infof()
- function. Those messages are only displayed when the user explicitly asks for
- them. They are best used when revealing information that isn't otherwise
- obvious.
-
-API/ABI
-=======
-
- We make an effort to not export or show internals or how internals work, as
- that makes it easier to keep a solid API/ABI over time. See docs/libcurl/ABI
- for our promise to users.
-
-Client
-======
-
- main() resides in src/tool_main.c.
-
- src/tool_hugehelp.c is automatically generated by the mkhelp.pl perl script
- to display the complete "manual" and the src/tool_urlglob.c file holds the
- functions used for the URL-"globbing" support. Globbing in the sense that the
- {} and [] expansion stuff is there.
-
- The client mostly messes around to setup its 'config' struct properly, then
- it calls the curl_easy_*() functions of the library and when it gets back
- control after the curl_easy_perform() it cleans up the library, checks status
- and exits.
-
- When the operation is done, the ourWriteOut() function in src/writeout.c may
- be called to report about the operation. That function is using the
- curl_easy_getinfo() function to extract useful information from the curl
- session.
-
- It may loop and do all this several times if many URLs were specified on the
- command line or config file.
-
-Memory Debugging
-================
-
- The file lib/memdebug.c contains debug-versions of a few functions. Functions
- such as malloc, free, fopen, fclose, etc that somehow deal with resources
- that might give us problems if we "leak" them. The functions in the memdebug
- system do nothing fancy, they do their normal function and then log
- information about what they just did. The logged data can then be analyzed
- after a complete session,
-
- memanalyze.pl is the perl script present in tests/ that analyzes a log file
- generated by the memory tracking system. It detects if resources are
- allocated but never freed and other kinds of errors related to resource
- management.
-
- Internally, definition of preprocessor symbol DEBUGBUILD restricts code which
- is only compiled for debug enabled builds. And symbol CURLDEBUG is used to
- differentiate code which is _only_ used for memory tracking/debugging.
-
- Use -DCURLDEBUG when compiling to enable memory debugging, this is also
- switched on by running configure with --enable-curldebug. Use -DDEBUGBUILD
- when compiling to enable a debug build or run configure with --enable-debug.
-
- curl --version will list 'Debug' feature for debug enabled builds, and
- will list 'TrackMemory' feature for curl debug memory tracking capable
- builds. These features are independent and can be controlled when running
- the configure script. When --enable-debug is given both features will be
- enabled, unless some restriction prevents memory tracking from being used.
-
-Test Suite
-==========
-
- The test suite is placed in its own subdirectory directly off the root in the
- curl archive tree, and it contains a bunch of scripts and a lot of test case
- data.
-
- The main test script is runtests.pl that will invoke test servers like
- httpserver.pl and ftpserver.pl before all the test cases are performed. The
- test suite currently only runs on unix-like platforms.
-
- You'll find a description of the test suite in the tests/README file, and the
- test case data files in the tests/FILEFORMAT file.
-
- The test suite automatically detects if curl was built with the memory
- debugging enabled, and if it was it will detect memory leaks, too.
-
-Building Releases
-=================
-
- There's no magic to this. When you consider everything stable enough to be
- released, do this:
-
- 1. Tag the source code accordingly.
-
- 2. run the 'maketgz' script (using 'make distcheck' will give you a pretty
- good view on the status of the current sources). maketgz requires a
- version number and creates the release archive. maketgz uses 'make dist'
- for the actual archive building, why you need to fill in the Makefile.am
- files properly for which files that should be included in the release
- archives.
-
- 3. When that's complete, sign the output files.
-
- 4. Upload
-
- 5. Update web site and changelog on site
-
- 6. Send announcement to the mailing lists
-
- NOTE: you must have curl checked out from git to be able to do a proper
- release build. The release tarballs do not have everything setup in order to
- do releases properly.
diff --git a/libs/libcurl/docs/KNOWN_BUGS b/libs/libcurl/docs/KNOWN_BUGS
deleted file mode 100644
index d53d970d96..0000000000
--- a/libs/libcurl/docs/KNOWN_BUGS
+++ /dev/null
@@ -1,250 +0,0 @@
-These are problems known to exist at the time of this release. Feel free to
-join in and help us correct one or more of these! Also be sure to check the
-changelog of the current development status, as one or more of these problems
-may have been fixed since this was written!
-
-84. CURLINFO_SSL_VERIFYRESULT is only implemented for the OpenSSL and NSS
- backends, so relying on this information in a generic app is flaky.
-
-83. curl is unable to load non-default openssl engines, because openssl isn't
- initialized properly. This seems to require OpenSSL_config() or
- CONF_modules_load_file() to be used by libcurl but the first seems to not
- work and we've gotten not reports from tests with the latter. Possibly we
- need to discuss with OpenSSL developers how this is supposed to be done. We
- need users with actual external openssl engines for testing to work on this.
- http://curl.haxx.se/bug/view.cgi?id=1208
-
-82. When building with the Windows Borland compiler, it fails because the
- "tlib" tool doesn't support hyphens (minus signs) in file names and we have
- such in the build.
- http://curl.haxx.se/bug/view.cgi?id=1222
-
-81. When using -J (with -O), automaticly resumed downloading together with "-C
- -" fails. Without -J the same command line works! This happens because the
- resume logic is worked out before the target file name (and thus its
- pre-transfer size) has been figured out!
- http://curl.haxx.se/bug/view.cgi?id=1169
-
-80. Curl doesn't recognize certificates in DER format in keychain, but it
- works with PEM.
- http://curl.haxx.se/bug/view.cgi?id=1065
-
-79. SMTP. When sending data to multiple recipients, curl will abort and return
- failure if one of the recipients indicate failure (on the "RCPT TO"
- command). Ordinary mail programs would proceed and still send to the ones
- that can receive data. This is subject for change in the future.
- http://curl.haxx.se/bug/view.cgi?id=1116
-
-78. curl and libcurl don't always signal the client properly when "sending"
- zero bytes files - it makes for example the command line client not creating
- any file at all. Like when using FTP.
- http://curl.haxx.se/bug/view.cgi?id=1063
-
-77. CURLOPT_FORBID_REUSE on a handle prevents NTLM from working since it
- "abuses" the underlying connection re-use system and if connections are
- forced to close they break the NTLM support.
-
-76. The SOCKET type in Win64 is 64 bits large (and thus so is curl_socket_t on
- that platform), and long is only 32 bits. It makes it impossible for
- curl_easy_getinfo() to return a socket properly with the CURLINFO_LASTSOCKET
- option as for all other operating systems.
-
-75. NTLM authentication involving unicode user name or password only works
- properly if built with UNICODE defined together with the schannel/winssl
- backend. The original problem was mentioned in:
- http://curl.haxx.se/mail/lib-2009-10/0024.html
- http://curl.haxx.se/bug/view.cgi?id=896
-
- The schannel version verified to work as mentioned in
- http://curl.haxx.se/mail/lib-2012-07/0073.html
-
-73. if a connection is made to a FTP server but the server then just never
- sends the 220 response or otherwise is dead slow, libcurl will not
- acknowledge the connection timeout during that phase but only the "real"
- timeout - which may surprise users as it is probably considered to be the
- connect phase to most people. Brought up (and is being misunderstood) in:
- http://curl.haxx.se/bug/view.cgi?id=856
-
-72. "Pausing pipeline problems."
- http://curl.haxx.se/mail/lib-2009-07/0214.html
-
-70. Problem re-using easy handle after call to curl_multi_remove_handle
- http://curl.haxx.se/mail/lib-2009-07/0249.html
-
-68. "More questions about ares behavior".
- http://curl.haxx.se/mail/lib-2009-08/0012.html
-
-67. When creating multipart formposts. The file name part can be encoded with
- something beyond ascii but currently libcurl will only pass in the verbatim
- string the app provides. There are several browsers that already do this
- encoding. The key seems to be the updated draft to RFC2231:
- http://tools.ietf.org/html/draft-reschke-rfc2231-in-http-02
-
-66. When using telnet, the time limitation options don't work.
- http://curl.haxx.se/bug/view.cgi?id=846
-
-65. When doing FTP over a socks proxy or CONNECT through HTTP proxy and the
- multi interface is used, libcurl will fail if the (passive) TCP connection
- for the data transfer isn't more or less instant as the code does not
- properly wait for the connect to be confirmed. See test case 564 for a first
- shot at a test case.
-
-63. When CURLOPT_CONNECT_ONLY is used, the handle cannot reliably be re-used
- for any further requests or transfers. The work-around is then to close that
- handle with curl_easy_cleanup() and create a new. Some more details:
- http://curl.haxx.se/mail/lib-2009-04/0300.html
-
-61. If an upload using Expect: 100-continue receives an HTTP 417 response,
- it ought to be automatically resent without the Expect:. A workaround is
- for the client application to redo the transfer after disabling Expect:.
- http://curl.haxx.se/mail/archive-2008-02/0043.html
-
-60. libcurl closes the connection if an HTTP 401 reply is received while it
- is waiting for the the 100-continue response.
- http://curl.haxx.se/mail/lib-2008-08/0462.html
-
-58. It seems sensible to be able to use CURLOPT_NOBODY and
- CURLOPT_FAILONERROR with FTP to detect if a file exists or not, but it is
- not working: http://curl.haxx.se/mail/lib-2008-07/0295.html
-
-56. When libcurl sends CURLOPT_POSTQUOTE commands when connected to a SFTP
- server using the multi interface, the commands are not being sent correctly
- and instead the connection is "cancelled" (the operation is considered done)
- prematurely. There is a half-baked (busy-looping) patch provided in the bug
- report but it cannot be accepted as-is. See
- http://curl.haxx.se/bug/view.cgi?id=748
-
-55. libcurl fails to build with MIT Kerberos for Windows (KfW) due to KfW's
- library header files exporting symbols/macros that should be kept private
- to the KfW library. See ticket #5601 at http://krbdev.mit.edu/rt/
-
-52. Gautam Kachroo's issue that identifies a problem with the multi interface
- where a connection can be re-used without actually being properly
- SSL-negotiated:
- http://curl.haxx.se/mail/lib-2008-01/0277.html
-
-49. If using --retry and the transfer timeouts (possibly due to using -m or
- -y/-Y) the next attempt doesn't resume the transfer properly from what was
- downloaded in the previous attempt but will truncate and restart at the
- original position where it was at before the previous failed attempt. See
- http://curl.haxx.se/mail/lib-2008-01/0080.html and Mandriva bug report
- https://qa.mandriva.com/show_bug.cgi?id=22565
-
-48. If a CONNECT response-headers are larger than BUFSIZE (16KB) when the
- connection is meant to be kept alive (like for NTLM proxy auth), the
- function will return prematurely and will confuse the rest of the HTTP
- protocol code. This should be very rare.
-
-43. There seems to be a problem when connecting to the Microsoft telnet server.
- http://curl.haxx.se/bug/view.cgi?id=649
-
-41. When doing an operation over FTP that requires the ACCT command (but not
- when logging in), the operation will fail since libcurl doesn't detect this
- and thus fails to issue the correct command:
- http://curl.haxx.se/bug/view.cgi?id=635
-
-39. Steffen Rumler's Race Condition in Curl_proxyCONNECT:
- http://curl.haxx.se/mail/lib-2007-01/0045.html
-
-38. Kumar Swamy Bhatt's problem in ftp/ssl "LIST" operation:
- http://curl.haxx.se/mail/lib-2007-01/0103.html
-
-35. Both SOCKS5 and SOCKS4 proxy connections are done blocking, which is very
- bad when used with the multi interface.
-
-34. The SOCKS4 connection codes don't properly acknowledge (connect) timeouts.
- Also see #12. According to bug #1556528, even the SOCKS5 connect code does
- not do it right: http://curl.haxx.se/bug/view.cgi?id=604
-
-31. "curl-config --libs" will include details set in LDFLAGS when configure is
- run that might be needed only for building libcurl. Further, curl-config
- --cflags suffers from the same effects with CFLAGS/CPPFLAGS.
-
-30. You need to use -g to the command line tool in order to use RFC2732-style
- IPv6 numerical addresses in URLs.
-
-29. IPv6 URLs with zone ID is not nicely supported.
- http://www.ietf.org/internet-drafts/draft-fenner-literal-zone-02.txt (expired)
- specifies the use of a plus sign instead of a percent when specifying zone
- IDs in URLs to get around the problem of percent signs being
- special. According to the reporter, Firefox deals with the URL _with_ a
- percent letter (which seems like a blatant URL spec violation).
- libcurl supports zone IDs where the percent sign is URL-escaped (i.e. %25):
- http://curl.haxx.se/bug/view.cgi?id=555
-
-26. NTLM authentication using SSPI (on Windows) when (lib)curl is running in
- "system context" will make it use wrong(?) user name - at least when compared
- to what winhttp does. See http://curl.haxx.se/bug/view.cgi?id=535
-
-23. SOCKS-related problems:
- B) libcurl doesn't support FTPS over a SOCKS proxy.
- E) libcurl doesn't support active FTP over a SOCKS proxy
-
- We probably have even more bugs and lack of features when a SOCKS proxy is
- used.
-
-21. FTP ASCII transfers do not follow RFC959. They don't convert the data
- accordingly (not for sending nor for receiving). RFC 959 section 3.1.1.1
- clearly describes how this should be done:
-
- The sender converts the data from an internal character representation to
- the standard 8-bit NVT-ASCII representation (see the Telnet
- specification). The receiver will convert the data from the standard
- form to his own internal form.
-
- Since 7.15.4 at least line endings are converted.
-
-16. FTP URLs passed to curl may contain NUL (0x00) in the RFC 1738 <user>,
- <password>, and <fpath> components, encoded as "%00". The problem is that
- curl_unescape does not detect this, but instead returns a shortened C
- string. From a strict FTP protocol standpoint, NUL is a valid character
- within RFC 959 <string>, so the way to handle this correctly in curl would
- be to use a data structure other than a plain C string, one that can handle
- embedded NUL characters. From a practical standpoint, most FTP servers
- would not meaningfully support NUL characters within RFC 959 <string>,
- anyway (e.g., UNIX pathnames may not contain NUL).
-
-14. Test case 165 might fail on a system which has libidn present, but with an
- old iconv version (2.1.3 is a known bad version), since it doesn't recognize
- the charset when named ISO8859-1. Changing the name to ISO-8859-1 makes the
- test pass, but instead makes it fail on Solaris hosts that use its native
- iconv.
-
-13. curl version 7.12.2 fails on AIX if compiled with --enable-ares.
- The workaround is to combine --enable-ares with --disable-shared
-
-12. When connecting to a SOCKS proxy, the (connect) timeout is not properly
- acknowledged after the actual TCP connect (during the SOCKS "negotiate"
- phase).
-
-10. To get HTTP Negotiate authentication to work fine, you need to provide a
- (fake) user name (this concerns both curl and the lib) because the code
- wrongly only considers authentication if there's a user name provided.
- http://curl.haxx.se/bug/view.cgi?id=440 How?
- http://curl.haxx.se/mail/lib-2004-08/0182.html
-
-8. Doing resumed upload over HTTP does not work with '-C -', because curl
- doesn't do a HEAD first to get the initial size. This needs to be done
- manually for HTTP PUT resume to work, and then '-C [index]'.
-
-6. libcurl ignores empty path parts in FTP URLs, whereas RFC1738 states that
- such parts should be sent to the server as 'CWD ' (without an argument).
- The only exception to this rule, is that we knowingly break this if the
- empty part is first in the path, as then we use the double slashes to
- indicate that the user wants to reach the root dir (this exception SHALL
- remain even when this bug is fixed).
-
-5. libcurl doesn't treat the content-length of compressed data properly, as
- it seems HTTP servers send the *uncompressed* length in that header and
- libcurl thinks of it as the *compressed* length. Some explanations are here:
- http://curl.haxx.se/mail/lib-2003-06/0146.html
-
-2. If a HTTP server responds to a HEAD request and includes a body (thus
- violating the RFC2616), curl won't wait to read the response but just stop
- reading and return back. If a second request (let's assume a GET) is then
- immediately made to the same server again, the connection will be re-used
- fine of course, and the second request will be sent off but when the
- response is to get read, the previous response-body is what curl will read
- and havoc is what happens.
- More details on this is found in this libcurl mailing list thread:
- http://curl.haxx.se/mail/lib-2002-08/0000.html
diff --git a/libs/libcurl/docs/MAIL-ETIQUETTE b/libs/libcurl/docs/MAIL-ETIQUETTE
deleted file mode 100644
index ae1821a89b..0000000000
--- a/libs/libcurl/docs/MAIL-ETIQUETTE
+++ /dev/null
@@ -1,228 +0,0 @@
- _ _ ____ _
- ___| | | | _ \| |
- / __| | | | |_) | |
- | (__| |_| | _ <| |___
- \___|\___/|_| \_\_____|
-
-MAIL ETIQUETTE
-
- 1. About the lists
- 1.1 Mailing Lists
- 1.2 Netiquette
- 1.3 Do Not Mail a Single Individual
- 1.4 Subscription Required
- 1.5 Moderation of new posters
- 1.6 Handling trolls and spam
- 1.7 How to unsubscribe
-
- 2. Sending mail
- 2.1 Reply or New Mail
- 2.2 Reply to the List
- 2.3 Use a Sensible Subject
- 2.4 Do Not Top-Post
- 2.5 HTML is not for mails
- 2.6 Quoting
- 2.7 Digest
- 2.8 Please Tell Us How You Solved The Problem!
-
-==============================================================================
-
-1. About the lists
-
- 1.1 Mailing Lists
-
- The mailing lists we have are all listed and described at
- http://curl.haxx.se/mail/
-
- Each mailing list is targeted to a specific set of users and subjects,
- please use the one or the ones that suit you the most.
-
- Each mailing list have hundreds up to thousands of readers, meaning that
- each mail sent will be received and read by a very large amount of people.
- People from various cultures, regions, religions and continents.
-
- 1.2 Netiquette
-
- Netiquette is a common name for how to behave on the internet. Of course, in
- each particular group and subculture there will be differences in what is
- acceptable and what is considered good manners.
-
- This document outlines what we in the cURL project considers to be good
- etiquette, and primarily this focus on how to behave on and how to use our
- mailing lists.
-
- 1.3 Do Not Mail a Single Individual
-
- Many people send one question to one person. One person gets many mails, and
- there is only one person who can give you a reply. The question may be
- something that other people are also wanting to ask. These other people have
- no way to read the reply, but to ask the one person the question. The one
- person consequently gets overloaded with mail.
-
- If you really want to contact an individual and perhaps pay for his or her
- services, by all means go ahead, but if it's just another curl question,
- take it to a suitable list instead.
-
- 1.4 Subscription Required
-
- All curl mailing lists require that you are subscribed to allow a mail to go
- through to all the subscribers.
-
- If you post without being subscribed (or from a different mail address than
- the one you are subscribed with), your mail will simply be silently
- discarded. You have to subscribe first, then post.
-
- The reason for this unfortunate and strict subscription policy is of course
- to stop spam from pestering the lists.
-
- 1.5 Moderation of new posters
-
- Several of the curl mailing lists automatically make all posts from new
- subscribers require moderation. This means that after you've subscribed and
- send your first mail to a list, that mail will not be let through to the
- list until a mailing list administrator has verified that it is OK and
- permits it to get posted.
-
- Once a first post has been made that proves the sender is actually talking
- about curl-related subjects, the moderation "flag" will be switched off and
- future posts will go through without being moderated.
-
- The reason for this moderation policy is that we do suffer from spammers who
- actually subscribe and send spam to our lists.
-
- 1.6 Handling trolls and spam
-
- Despite our good intentions and hard work to keep spam off the lists and to
- maintain a friendly and positive atmosphere, there will be times when spam
- and or trolls get through.
-
- Troll - "someone who posts inflammatory, extraneous, or off-topic messages
- in an online community"
-
- Spam - "use of electronic messaging systems to send unsolicited bulk
- messages"
-
- No matter what, we NEVER EVER respond to trolls or spammers on the list. If
- you believe the list admin should do something particular, contact him/her
- off-list. The subject will be taken care of as good as possible to prevent
- repeated offences, but responding on the list to such messages never lead to
- anything good and only puts the light even more on the offender: which was
- the entire purpose of it getting to the list in the first place.
-
- Don't feed the trolls!
-
- 1.7 How to unsubscribe
-
- You unsubscribe the same way you subscribed in the first place. You go to
- the page for the particular mailing list you're subscribed to and you enter
- your email address and password and press the unsubscribe button.
-
- Also, this information is included in the headers of every mail that is sent
- out to all curl related mailing lists and there's footer in each mail that
- links to the "admin" page on which you can unsubscribe and change other
- options.
-
- You NEVER EVER email the mailing list requesting someone else to get you off
- the list.
-
-
-2. Sending mail
-
- 2.1 Reply or New Mail
-
- Please do not reply to an existing message as a short-cut to post a message
- to the lists.
-
- Many mail programs and web archivers use information within mails to keep
- them together as "threads", as collections of posts that discuss a certain
- subject. If you don't intend to reply on the same or similar subject, don't
- just hit reply on an existing mail and change subject, create a new mail.
-
- 2.2 Reply to the List
-
- When replying to a message from the list, make sure that you do "group
- reply" or "reply to all", and not just reply to the author of the single
- mail you reply to.
-
- We're actively discouraging replying back to the single person by setting
- the Reply-To: field in outgoing mails back to the mailing list address,
- making it harder for people to mail the author only by mistake.
-
- 2.3 Use a Sensible Subject
-
- Please use a subject of the mail that makes sense and that is related to the
- contents of your mail. It makes it a lot easier to find your mail afterwards
- and it makes it easier to track mail threads and topics.
-
- 2.4 Do Not Top-Post
-
- If you reply to a message, don't use top-posting. Top-posting is when you
- write the new text at the top of a mail and you insert the previous quoted
- mail conversation below. It forces users to read the mail in a backwards
- order to properly understand it.
-
- This is why top posting is so bad:
-
- A: Because it messes up the order in which people normally read
- text.
- Q: Why is top-posting such a bad thing?
- A: Top-posting.
- Q: What is the most annoying thing in e-mail?
-
- Apart from the screwed up read order (especially when mixed together in a
- thread when someone responds using the mandated bottom-posting style), it
- also makes it impossible to quote only parts of the original mail.
-
- When you reply to a mail. You let the mail client insert the previous mail
- quoted. Then you put the cursor on the first line of the mail and you move
- down through the mail, deleting all parts of the quotes that don't add
- context for your comments. When you want to add a comment you do so, inline,
- right after the quotes that relate to your comment. Then you continue
- downwards again.
-
- When most of the quotes have been removed and you've added your own words,
- you're done!
-
- 2.5 HTML is not for mails
-
- Please switch off those HTML encoded messages. You can mail all those funny
- mails to your friends. We speak plain text mails.
-
- 2.6 Quoting
-
- Quote as little as possible. Just enough to provide the context you cannot
- leave out. A lengthy description can be found here:
-
- http://www.netmeister.org/news/learn2quote.html
-
- 2.7 Digest
-
- We allow subscribers to subscribe to the "digest" version of the mailing
- lists. A digest is a collection of mails lumped together in one single mail.
-
- Should you decide to reply to a mail sent out as a digest, there are two
- things you MUST consider if you really really cannot subscribe normally
- instead:
-
- Cut off all mails and chatter that is not related to the mail you want to
- reply to.
-
- Change the subject name to something sensible and related to the subject,
- preferably even the actual subject of the single mail you wanted to reply to
-
- 2.8 Please Tell Us How You Solved The Problem!
-
- Many people mail questions to the list, people spend some of their time and
- make an effort in providing good answers to these questions.
-
- If you are the one who asks, please consider responding once more in case
- one of the hints was what solved your problems. The guys who write answers
- feel good to know that they provided a good answer and that you fixed the
- problem. Far too often, the person who asked the question is never heard of
- again, and we never get to know if he/she is gone because the problem was
- solved or perhaps because the problem was unsolvable!
-
- Getting the solution posted also helps other users that experience the same
- problem(s). They get to see (possibly in the web archives) that the
- suggested fixes actually has helped at least one person.
-
diff --git a/libs/libcurl/docs/MANUAL b/libs/libcurl/docs/MANUAL
deleted file mode 100644
index 4ad2e135e3..0000000000
--- a/libs/libcurl/docs/MANUAL
+++ /dev/null
@@ -1,1023 +0,0 @@
-LATEST VERSION
-
- You always find news about what's going on as well as the latest versions
- from the curl web pages, located at:
-
- http://curl.haxx.se
-
-SIMPLE USAGE
-
- Get the main page from Netscape's web-server:
-
- curl http://www.netscape.com/
-
- Get the README file the user's home directory at funet's ftp-server:
-
- curl ftp://ftp.funet.fi/README
-
- Get a web page from a server using port 8000:
-
- curl http://www.weirdserver.com:8000/
-
- Get a directory listing of an FTP site:
-
- curl ftp://cool.haxx.se/
-
- Get the definition of curl from a dictionary:
-
- curl dict://dict.org/m:curl
-
- Fetch two documents at once:
-
- curl ftp://cool.haxx.se/ http://www.weirdserver.com:8000/
-
- Get a file off an FTPS server:
-
- curl ftps://files.are.secure.com/secrets.txt
-
- or use the more appropriate FTPS way to get the same file:
-
- curl --ftp-ssl ftp://files.are.secure.com/secrets.txt
-
- Get a file from an SSH server using SFTP:
-
- curl -u username sftp://shell.example.com/etc/issue
-
- Get a file from an SSH server using SCP using a private key to authenticate:
-
- curl -u username: --key ~/.ssh/id_dsa --pubkey ~/.ssh/id_dsa.pub \
- scp://shell.example.com/~/personal.txt
-
- Get the main page from an IPv6 web server:
-
- curl -g "http://[2001:1890:1112:1::20]/"
-
-DOWNLOAD TO A FILE
-
- Get a web page and store in a local file with a specific name:
-
- curl -o thatpage.html http://www.netscape.com/
-
- Get a web page and store in a local file, make the local file get the name
- of the remote document (if no file name part is specified in the URL, this
- will fail):
-
- curl -O http://www.netscape.com/index.html
-
- Fetch two files and store them with their remote names:
-
- curl -O www.haxx.se/index.html -O curl.haxx.se/download.html
-
-USING PASSWORDS
-
- FTP
-
- To ftp files using name+passwd, include them in the URL like:
-
- curl ftp://name:passwd@machine.domain:port/full/path/to/file
-
- or specify them with the -u flag like
-
- curl -u name:passwd ftp://machine.domain:port/full/path/to/file
-
- FTPS
-
- It is just like for FTP, but you may also want to specify and use
- SSL-specific options for certificates etc.
-
- Note that using FTPS:// as prefix is the "implicit" way as described in the
- standards while the recommended "explicit" way is done by using FTP:// and
- the --ftp-ssl option.
-
- SFTP / SCP
-
- This is similar to FTP, but you can specify a private key to use instead of
- a password. Note that the private key may itself be protected by a password
- that is unrelated to the login password of the remote system. If you
- provide a private key file you must also provide a public key file.
-
- HTTP
-
- Curl also supports user and password in HTTP URLs, thus you can pick a file
- like:
-
- curl http://name:passwd@machine.domain/full/path/to/file
-
- or specify user and password separately like in
-
- curl -u name:passwd http://machine.domain/full/path/to/file
-
- HTTP offers many different methods of authentication and curl supports
- several: Basic, Digest, NTLM and Negotiate. Without telling which method to
- use, curl defaults to Basic. You can also ask curl to pick the most secure
- ones out of the ones that the server accepts for the given URL, by using
- --anyauth.
-
- NOTE! According to the URL specification, HTTP URLs can not contain a user
- and password, so that style will not work when using curl via a proxy, even
- though curl allows it at other times. When using a proxy, you _must_ use
- the -u style for user and password.
-
- HTTPS
-
- Probably most commonly used with private certificates, as explained below.
-
-PROXY
-
- curl supports both HTTP and SOCKS proxy servers, with optional authentication.
- It does not have special support for FTP proxy servers since there are no
- standards for those, but it can still be made to work with many of them. You
- can also use both HTTP and SOCKS proxies to transfer files to and from FTP
- servers.
-
- Get an ftp file using an HTTP proxy named my-proxy that uses port 888:
-
- curl -x my-proxy:888 ftp://ftp.leachsite.com/README
-
- Get a file from an HTTP server that requires user and password, using the
- same proxy as above:
-
- curl -u user:passwd -x my-proxy:888 http://www.get.this/
-
- Some proxies require special authentication. Specify by using -U as above:
-
- curl -U user:passwd -x my-proxy:888 http://www.get.this/
-
- A comma-separated list of hosts and domains which do not use the proxy can
- be specified as:
-
- curl --noproxy localhost,get.this -x my-proxy:888 http://www.get.this/
-
- If the proxy is specified with --proxy1.0 instead of --proxy or -x, then
- curl will use HTTP/1.0 instead of HTTP/1.1 for any CONNECT attempts.
-
- curl also supports SOCKS4 and SOCKS5 proxies with --socks4 and --socks5.
-
- See also the environment variables Curl supports that offer further proxy
- control.
-
- Most FTP proxy servers are set up to appear as a normal FTP server from the
- client's perspective, with special commands to select the remote FTP server.
- curl supports the -u, -Q and --ftp-account options that can be used to
- set up transfers through many FTP proxies. For example, a file can be
- uploaded to a remote FTP server using a Blue Coat FTP proxy with the
- options:
-
- curl -u "Remote-FTP-Username@remote.ftp.server Proxy-Username:Remote-Pass" \
- --ftp-account Proxy-Password --upload-file local-file \
- ftp://my-ftp.proxy.server:21/remote/upload/path/
-
- See the manual for your FTP proxy to determine the form it expects to set up
- transfers, and curl's -v option to see exactly what curl is sending.
-
-RANGES
-
- HTTP 1.1 introduced byte-ranges. Using this, a client can request
- to get only one or more subparts of a specified document. Curl supports
- this with the -r flag.
-
- Get the first 100 bytes of a document:
-
- curl -r 0-99 http://www.get.this/
-
- Get the last 500 bytes of a document:
-
- curl -r -500 http://www.get.this/
-
- Curl also supports simple ranges for FTP files as well. Then you can only
- specify start and stop position.
-
- Get the first 100 bytes of a document using FTP:
-
- curl -r 0-99 ftp://www.get.this/README
-
-UPLOADING
-
- FTP / FTPS / SFTP / SCP
-
- Upload all data on stdin to a specified server:
-
- curl -T - ftp://ftp.upload.com/myfile
-
- Upload data from a specified file, login with user and password:
-
- curl -T uploadfile -u user:passwd ftp://ftp.upload.com/myfile
-
- Upload a local file to the remote site, and use the local file name at the remote
- site too:
-
- curl -T uploadfile -u user:passwd ftp://ftp.upload.com/
-
- Upload a local file to get appended to the remote file:
-
- curl -T localfile -a ftp://ftp.upload.com/remotefile
-
- Curl also supports ftp upload through a proxy, but only if the proxy is
- configured to allow that kind of tunneling. If it does, you can run curl in
- a fashion similar to:
-
- curl --proxytunnel -x proxy:port -T localfile ftp.upload.com
-
- HTTP
-
- Upload all data on stdin to a specified HTTP site:
-
- curl -T - http://www.upload.com/myfile
-
- Note that the HTTP server must have been configured to accept PUT before
- this can be done successfully.
-
- For other ways to do HTTP data upload, see the POST section below.
-
-VERBOSE / DEBUG
-
- If curl fails where it isn't supposed to, if the servers don't let you in,
- if you can't understand the responses: use the -v flag to get verbose
- fetching. Curl will output lots of info and what it sends and receives in
- order to let the user see all client-server interaction (but it won't show
- you the actual data).
-
- curl -v ftp://ftp.upload.com/
-
- To get even more details and information on what curl does, try using the
- --trace or --trace-ascii options with a given file name to log to, like
- this:
-
- curl --trace trace.txt www.haxx.se
-
-
-DETAILED INFORMATION
-
- Different protocols provide different ways of getting detailed information
- about specific files/documents. To get curl to show detailed information
- about a single file, you should use -I/--head option. It displays all
- available info on a single file for HTTP and FTP. The HTTP information is a
- lot more extensive.
-
- For HTTP, you can get the header information (the same as -I would show)
- shown before the data by using -i/--include. Curl understands the
- -D/--dump-header option when getting files from both FTP and HTTP, and it
- will then store the headers in the specified file.
-
- Store the HTTP headers in a separate file (headers.txt in the example):
-
- curl --dump-header headers.txt curl.haxx.se
-
- Note that headers stored in a separate file can be very useful at a later
- time if you want curl to use cookies sent by the server. More about that in
- the cookies section.
-
-POST (HTTP)
-
- It's easy to post data using curl. This is done using the -d <data>
- option. The post data must be urlencoded.
-
- Post a simple "name" and "phone" guestbook.
-
- curl -d "name=Rafael%20Sagula&phone=3320780" \
- http://www.where.com/guest.cgi
-
- How to post a form with curl, lesson #1:
-
- Dig out all the <input> tags in the form that you want to fill in. (There's
- a perl program called formfind.pl on the curl site that helps with this).
-
- If there's a "normal" post, you use -d to post. -d takes a full "post
- string", which is in the format
-
- <variable1>=<data1>&<variable2>=<data2>&...
-
- The 'variable' names are the names set with "name=" in the <input> tags, and
- the data is the contents you want to fill in for the inputs. The data *must*
- be properly URL encoded. That means you replace space with + and that you
- replace weird letters with %XX where XX is the hexadecimal representation of
- the letter's ASCII code.
-
- Example:
-
- (page located at http://www.formpost.com/getthis/
-
- <form action="post.cgi" method="post">
- <input name=user size=10>
- <input name=pass type=password size=10>
- <input name=id type=hidden value="blablabla">
- <input name=ding value="submit">
- </form>
-
- We want to enter user 'foobar' with password '12345'.
-
- To post to this, you enter a curl command line like:
-
- curl -d "user=foobar&pass=12345&id=blablabla&ding=submit" (continues)
- http://www.formpost.com/getthis/post.cgi
-
-
- While -d uses the application/x-www-form-urlencoded mime-type, generally
- understood by CGI's and similar, curl also supports the more capable
- multipart/form-data type. This latter type supports things like file upload.
-
- -F accepts parameters like -F "name=contents". If you want the contents to
- be read from a file, use <@filename> as contents. When specifying a file,
- you can also specify the file content type by appending ';type=<mime type>'
- to the file name. You can also post the contents of several files in one
- field. For example, the field name 'coolfiles' is used to send three files,
- with different content types using the following syntax:
-
- curl -F "coolfiles=@fil1.gif;type=image/gif,fil2.txt,fil3.html" \
- http://www.post.com/postit.cgi
-
- If the content-type is not specified, curl will try to guess from the file
- extension (it only knows a few), or use the previously specified type (from
- an earlier file if several files are specified in a list) or else it will
- use the default type 'application/octet-stream'.
-
- Emulate a fill-in form with -F. Let's say you fill in three fields in a
- form. One field is a file name which to post, one field is your name and one
- field is a file description. We want to post the file we have written named
- "cooltext.txt". To let curl do the posting of this data instead of your
- favourite browser, you have to read the HTML source of the form page and
- find the names of the input fields. In our example, the input field names
- are 'file', 'yourname' and 'filedescription'.
-
- curl -F "file=@cooltext.txt" -F "yourname=Daniel" \
- -F "filedescription=Cool text file with cool text inside" \
- http://www.post.com/postit.cgi
-
- To send two files in one post you can do it in two ways:
-
- 1. Send multiple files in a single "field" with a single field name:
-
- curl -F "pictures=@dog.gif,cat.gif"
-
- 2. Send two fields with two field names:
-
- curl -F "docpicture=@dog.gif" -F "catpicture=@cat.gif"
-
- To send a field value literally without interpreting a leading '@'
- or '<', or an embedded ';type=', use --form-string instead of
- -F. This is recommended when the value is obtained from a user or
- some other unpredictable source. Under these circumstances, using
- -F instead of --form-string would allow a user to trick curl into
- uploading a file.
-
-REFERRER
-
- An HTTP request has the option to include information about which address
- referred it to the actual page. Curl allows you to specify the
- referrer to be used on the command line. It is especially useful to
- fool or trick stupid servers or CGI scripts that rely on that information
- being available or contain certain data.
-
- curl -e www.coolsite.com http://www.showme.com/
-
- NOTE: The Referer: [sic] field is defined in the HTTP spec to be a full URL.
-
-USER AGENT
-
- An HTTP request has the option to include information about the browser
- that generated the request. Curl allows it to be specified on the command
- line. It is especially useful to fool or trick stupid servers or CGI
- scripts that only accept certain browsers.
-
- Example:
-
- curl -A 'Mozilla/3.0 (Win95; I)' http://www.nationsbank.com/
-
- Other common strings:
- 'Mozilla/3.0 (Win95; I)' Netscape Version 3 for Windows 95
- 'Mozilla/3.04 (Win95; U)' Netscape Version 3 for Windows 95
- 'Mozilla/2.02 (OS/2; U)' Netscape Version 2 for OS/2
- 'Mozilla/4.04 [en] (X11; U; AIX 4.2; Nav)' NS for AIX
- 'Mozilla/4.05 [en] (X11; U; Linux 2.0.32 i586)' NS for Linux
-
- Note that Internet Explorer tries hard to be compatible in every way:
- 'Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)' MSIE for W95
-
- Mozilla is not the only possible User-Agent name:
- 'Konqueror/1.0' KDE File Manager desktop client
- 'Lynx/2.7.1 libwww-FM/2.14' Lynx command line browser
-
-COOKIES
-
- Cookies are generally used by web servers to keep state information at the
- client's side. The server sets cookies by sending a response line in the
- headers that looks like 'Set-Cookie: <data>' where the data part then
- typically contains a set of NAME=VALUE pairs (separated by semicolons ';'
- like "NAME1=VALUE1; NAME2=VALUE2;"). The server can also specify for what
- path the "cookie" should be used for (by specifying "path=value"), when the
- cookie should expire ("expire=DATE"), for what domain to use it
- ("domain=NAME") and if it should be used on secure connections only
- ("secure").
-
- If you've received a page from a server that contains a header like:
- Set-Cookie: sessionid=boo123; path="/foo";
-
- it means the server wants that first pair passed on when we get anything in
- a path beginning with "/foo".
-
- Example, get a page that wants my name passed in a cookie:
-
- curl -b "name=Daniel" www.sillypage.com
-
- Curl also has the ability to use previously received cookies in following
- sessions. If you get cookies from a server and store them in a file in a
- manner similar to:
-
- curl --dump-header headers www.example.com
-
- ... you can then in a second connect to that (or another) site, use the
- cookies from the 'headers' file like:
-
- curl -b headers www.example.com
-
- While saving headers to a file is a working way to store cookies, it is
- however error-prone and not the preferred way to do this. Instead, make curl
- save the incoming cookies using the well-known netscape cookie format like
- this:
-
- curl -c cookies.txt www.example.com
-
- Note that by specifying -b you enable the "cookie awareness" and with -L
- you can make curl follow a location: (which often is used in combination
- with cookies). So that if a site sends cookies and a location, you can
- use a non-existing file to trigger the cookie awareness like:
-
- curl -L -b empty.txt www.example.com
-
- The file to read cookies from must be formatted using plain HTTP headers OR
- as netscape's cookie file. Curl will determine what kind it is based on the
- file contents. In the above command, curl will parse the header and store
- the cookies received from www.example.com. curl will send to the server the
- stored cookies which match the request as it follows the location. The
- file "empty.txt" may be a nonexistent file.
-
- Alas, to both read and write cookies from a netscape cookie file, you can
- set both -b and -c to use the same file:
-
- curl -b cookies.txt -c cookies.txt www.example.com
-
-PROGRESS METER
-
- The progress meter exists to show a user that something actually is
- happening. The different fields in the output have the following meaning:
-
- % Total % Received % Xferd Average Speed Time Curr.
- Dload Upload Total Current Left Speed
- 0 151M 0 38608 0 0 9406 0 4:41:43 0:00:04 4:41:39 9287
-
- From left-to-right:
- % - percentage completed of the whole transfer
- Total - total size of the whole expected transfer
- % - percentage completed of the download
- Received - currently downloaded amount of bytes
- % - percentage completed of the upload
- Xferd - currently uploaded amount of bytes
- Average Speed
- Dload - the average transfer speed of the download
- Average Speed
- Upload - the average transfer speed of the upload
- Time Total - expected time to complete the operation
- Time Current - time passed since the invoke
- Time Left - expected time left to completion
- Curr.Speed - the average transfer speed the last 5 seconds (the first
- 5 seconds of a transfer is based on less time of course.)
-
- The -# option will display a totally different progress bar that doesn't
- need much explanation!
-
-SPEED LIMIT
-
- Curl allows the user to set the transfer speed conditions that must be met
- to let the transfer keep going. By using the switch -y and -Y you
- can make curl abort transfers if the transfer speed is below the specified
- lowest limit for a specified time.
-
- To have curl abort the download if the speed is slower than 3000 bytes per
- second for 1 minute, run:
-
- curl -Y 3000 -y 60 www.far-away-site.com
-
- This can very well be used in combination with the overall time limit, so
- that the above operation must be completed in whole within 30 minutes:
-
- curl -m 1800 -Y 3000 -y 60 www.far-away-site.com
-
- Forcing curl not to transfer data faster than a given rate is also possible,
- which might be useful if you're using a limited bandwidth connection and you
- don't want your transfer to use all of it (sometimes referred to as
- "bandwidth throttle").
-
- Make curl transfer data no faster than 10 kilobytes per second:
-
- curl --limit-rate 10K www.far-away-site.com
-
- or
-
- curl --limit-rate 10240 www.far-away-site.com
-
- Or prevent curl from uploading data faster than 1 megabyte per second:
-
- curl -T upload --limit-rate 1M ftp://uploadshereplease.com
-
- When using the --limit-rate option, the transfer rate is regulated on a
- per-second basis, which will cause the total transfer speed to become lower
- than the given number. Sometimes of course substantially lower, if your
- transfer stalls during periods.
-
-CONFIG FILE
-
- Curl automatically tries to read the .curlrc file (or _curlrc file on win32
- systems) from the user's home dir on startup.
-
- The config file could be made up with normal command line switches, but you
- can also specify the long options without the dashes to make it more
- readable. You can separate the options and the parameter with spaces, or
- with = or :. Comments can be used within the file. If the first letter on a
- line is a '#'-symbol the rest of the line is treated as a comment.
-
- If you want the parameter to contain spaces, you must enclose the entire
- parameter within double quotes ("). Within those quotes, you specify a
- quote as \".
-
- NOTE: You must specify options and their arguments on the same line.
-
- Example, set default time out and proxy in a config file:
-
- # We want a 30 minute timeout:
- -m 1800
- # ... and we use a proxy for all accesses:
- proxy = proxy.our.domain.com:8080
-
- White spaces ARE significant at the end of lines, but all white spaces
- leading up to the first characters of each line are ignored.
-
- Prevent curl from reading the default file by using -q as the first command
- line parameter, like:
-
- curl -q www.thatsite.com
-
- Force curl to get and display a local help page in case it is invoked
- without URL by making a config file similar to:
-
- # default url to get
- url = "http://help.with.curl.com/curlhelp.html"
-
- You can specify another config file to be read by using the -K/--config
- flag. If you set config file name to "-" it'll read the config from stdin,
- which can be handy if you want to hide options from being visible in process
- tables etc:
-
- echo "user = user:passwd" | curl -K - http://that.secret.site.com
-
-EXTRA HEADERS
-
- When using curl in your own very special programs, you may end up needing
- to pass on your own custom headers when getting a web page. You can do
- this by using the -H flag.
-
- Example, send the header "X-you-and-me: yes" to the server when getting a
- page:
-
- curl -H "X-you-and-me: yes" www.love.com
-
- This can also be useful in case you want curl to send a different text in a
- header than it normally does. The -H header you specify then replaces the
- header curl would normally send. If you replace an internal header with an
- empty one, you prevent that header from being sent. To prevent the Host:
- header from being used:
-
- curl -H "Host:" www.server.com
-
-FTP and PATH NAMES
-
- Do note that when getting files with the ftp:// URL, the given path is
- relative the directory you enter. To get the file 'README' from your home
- directory at your ftp site, do:
-
- curl ftp://user:passwd@my.site.com/README
-
- But if you want the README file from the root directory of that very same
- site, you need to specify the absolute file name:
-
- curl ftp://user:passwd@my.site.com//README
-
- (I.e with an extra slash in front of the file name.)
-
-SFTP and SCP and PATH NAMES
-
- With sftp: and scp: URLs, the path name given is the absolute name on the
- server. To access a file relative to the remote user's home directory,
- prefix the file with /~/ , such as:
-
- curl -u $USER sftp://home.example.com/~/.bashrc
-
-FTP and firewalls
-
- The FTP protocol requires one of the involved parties to open a second
- connection as soon as data is about to get transferred. There are two ways to
- do this.
-
- The default way for curl is to issue the PASV command which causes the
- server to open another port and await another connection performed by the
- client. This is good if the client is behind a firewall that doesn't allow
- incoming connections.
-
- curl ftp.download.com
-
- If the server, for example, is behind a firewall that doesn't allow connections
- on ports other than 21 (or if it just doesn't support the PASV command), the
- other way to do it is to use the PORT command and instruct the server to
- connect to the client on the given IP number and port (as parameters to the
- PORT command).
-
- The -P flag to curl supports a few different options. Your machine may have
- several IP-addresses and/or network interfaces and curl allows you to select
- which of them to use. Default address can also be used:
-
- curl -P - ftp.download.com
-
- Download with PORT but use the IP address of our 'le0' interface (this does
- not work on windows):
-
- curl -P le0 ftp.download.com
-
- Download with PORT but use 192.168.0.10 as our IP address to use:
-
- curl -P 192.168.0.10 ftp.download.com
-
-NETWORK INTERFACE
-
- Get a web page from a server using a specified port for the interface:
-
- curl --interface eth0:1 http://www.netscape.com/
-
- or
-
- curl --interface 192.168.1.10 http://www.netscape.com/
-
-HTTPS
-
- Secure HTTP requires SSL libraries to be installed and used when curl is
- built. If that is done, curl is capable of retrieving and posting documents
- using the HTTPS protocol.
-
- Example:
-
- curl https://www.secure-site.com
-
- Curl is also capable of using your personal certificates to get/post files
- from sites that require valid certificates. The only drawback is that the
- certificate needs to be in PEM-format. PEM is a standard and open format to
- store certificates with, but it is not used by the most commonly used
- browsers (Netscape and MSIE both use the so called PKCS#12 format). If you
- want curl to use the certificates you use with your (favourite) browser, you
- may need to download/compile a converter that can convert your browser's
- formatted certificates to PEM formatted ones. This kind of converter is
- included in recent versions of OpenSSL, and for older versions Dr Stephen
- N. Henson has written a patch for SSLeay that adds this functionality. You
- can get his patch (that requires an SSLeay installation) from his site at:
- http://www.drh-consultancy.demon.co.uk/
-
- Example on how to automatically retrieve a document using a certificate with
- a personal password:
-
- curl -E /path/to/cert.pem:password https://secure.site.com/
-
- If you neglect to specify the password on the command line, you will be
- prompted for the correct password before any data can be received.
-
- Many older SSL-servers have problems with SSLv3 or TLS, which newer versions
- of OpenSSL etc use, therefore it is sometimes useful to specify what
- SSL-version curl should use. Use -3, -2 or -1 to specify that exact SSL
- version to use (for SSLv3, SSLv2 or TLSv1 respectively):
-
- curl -2 https://secure.site.com/
-
- Otherwise, curl will first attempt to use v3 and then v2.
-
- To use OpenSSL to convert your favourite browser's certificate into a PEM
- formatted one that curl can use, do something like this:
-
- In Netscape, you start with hitting the 'Security' menu button.
-
- Select 'certificates->yours' and then pick a certificate in the list
-
- Press the 'Export' button
-
- enter your PIN code for the certs
-
- select a proper place to save it
-
- Run the 'openssl' application to convert the certificate. If you cd to the
- openssl installation, you can do it like:
-
- # ./apps/openssl pkcs12 -in [file you saved] -clcerts -out [PEMfile]
-
- In Firefox, select Options, then Advanced, then the Encryption tab,
- View Certificates. This opens the Certificate Manager, where you can
- Export. Be sure to select PEM for the Save as type.
-
- In Internet Explorer, select Internet Options, then the Content tab, then
- Certificates. Then you can Export, and depending on the format you may
- need to convert to PEM.
-
- In Chrome, select Settings, then Show Advanced Settings. Under HTTPS/SSL
- select Manage Certificates.
-
-RESUMING FILE TRANSFERS
-
- To continue a file transfer where it was previously aborted, curl supports
- resume on HTTP(S) downloads as well as FTP uploads and downloads.
-
- Continue downloading a document:
-
- curl -C - -o file ftp://ftp.server.com/path/file
-
- Continue uploading a document(*1):
-
- curl -C - -T file ftp://ftp.server.com/path/file
-
- Continue downloading a document from a web server(*2):
-
- curl -C - -o file http://www.server.com/
-
- (*1) = This requires that the FTP server supports the non-standard command
- SIZE. If it doesn't, curl will say so.
-
- (*2) = This requires that the web server supports at least HTTP/1.1. If it
- doesn't, curl will say so.
-
-TIME CONDITIONS
-
- HTTP allows a client to specify a time condition for the document it
- requests. It is If-Modified-Since or If-Unmodified-Since. Curl allows you to
- specify them with the -z/--time-cond flag.
-
- For example, you can easily make a download that only gets performed if the
- remote file is newer than a local copy. It would be made like:
-
- curl -z local.html http://remote.server.com/remote.html
-
- Or you can download a file only if the local file is newer than the remote
- one. Do this by prepending the date string with a '-', as in:
-
- curl -z -local.html http://remote.server.com/remote.html
-
- You can specify a "free text" date as condition. Tell curl to only download
- the file if it was updated since January 12, 2012:
-
- curl -z "Jan 12 2012" http://remote.server.com/remote.html
-
- Curl will then accept a wide range of date formats. You always make the date
- check the other way around by prepending it with a dash '-'.
-
-DICT
-
- For fun try
-
- curl dict://dict.org/m:curl
- curl dict://dict.org/d:heisenbug:jargon
- curl dict://dict.org/d:daniel:web1913
-
- Aliases for 'm' are 'match' and 'find', and aliases for 'd' are 'define'
- and 'lookup'. For example,
-
- curl dict://dict.org/find:curl
-
- Commands that break the URL description of the RFC (but not the DICT
- protocol) are
-
- curl dict://dict.org/show:db
- curl dict://dict.org/show:strat
-
- Authentication is still missing (but this is not required by the RFC)
-
-LDAP
-
- If you have installed the OpenLDAP library, curl can take advantage of it
- and offer ldap:// support.
-
- LDAP is a complex thing and writing an LDAP query is not an easy task. I do
- advise you to dig up the syntax description for that elsewhere. Two places
- that might suit you are:
-
- Netscape's "Netscape Directory SDK 3.0 for C Programmer's Guide Chapter 10:
- Working with LDAP URLs":
- http://developer.netscape.com/docs/manuals/dirsdk/csdk30/url.htm
-
- RFC 2255, "The LDAP URL Format" http://curl.haxx.se/rfc/rfc2255.txt
-
- To show you an example, this is how I can get all people from my local LDAP
- server that has a certain sub-domain in their email address:
-
- curl -B "ldap://ldap.frontec.se/o=frontec??sub?mail=*sth.frontec.se"
-
- If I want the same info in HTML format, I can get it by not using the -B
- (enforce ASCII) flag.
-
-ENVIRONMENT VARIABLES
-
- Curl reads and understands the following environment variables:
-
- http_proxy, HTTPS_PROXY, FTP_PROXY
-
- They should be set for protocol-specific proxies. General proxy should be
- set with
-
- ALL_PROXY
-
- A comma-separated list of host names that shouldn't go through any proxy is
- set in (only an asterisk, '*' matches all hosts)
-
- NO_PROXY
-
- If the host name matches one of these strings, or the host is within the
- domain of one of these strings, transactions with that node will not be
- proxied.
-
-
- The usage of the -x/--proxy flag overrides the environment variables.
-
-NETRC
-
- Unix introduced the .netrc concept a long time ago. It is a way for a user
- to specify name and password for commonly visited FTP sites in a file so
- that you don't have to type them in each time you visit those sites. You
- realize this is a big security risk if someone else gets hold of your
- passwords, so therefore most unix programs won't read this file unless it is
- only readable by yourself (curl doesn't care though).
-
- Curl supports .netrc files if told to (using the -n/--netrc and
- --netrc-optional options). This is not restricted to just FTP,
- so curl can use it for all protocols where authentication is used.
-
- A very simple .netrc file could look something like:
-
- machine curl.haxx.se login iamdaniel password mysecret
-
-CUSTOM OUTPUT
-
- To better allow script programmers to get to know about the progress of
- curl, the -w/--write-out option was introduced. Using this, you can specify
- what information from the previous transfer you want to extract.
-
- To display the amount of bytes downloaded together with some text and an
- ending newline:
-
- curl -w 'We downloaded %{size_download} bytes\n' www.download.com
-
-KERBEROS FTP TRANSFER
-
- Curl supports kerberos4 and kerberos5/GSSAPI for FTP transfers. You need
- the kerberos package installed and used at curl build time for it to be
- available.
-
- First, get the krb-ticket the normal way, like with the kinit/kauth tool.
- Then use curl in way similar to:
-
- curl --krb private ftp://krb4site.com -u username:fakepwd
-
- There's no use for a password on the -u switch, but a blank one will make
- curl ask for one and you already entered the real password to kinit/kauth.
-
-TELNET
-
- The curl telnet support is basic and very easy to use. Curl passes all data
- passed to it on stdin to the remote server. Connect to a remote telnet
- server using a command line similar to:
-
- curl telnet://remote.server.com
-
- And enter the data to pass to the server on stdin. The result will be sent
- to stdout or to the file you specify with -o.
-
- You might want the -N/--no-buffer option to switch off the buffered output
- for slow connections or similar.
-
- Pass options to the telnet protocol negotiation, by using the -t option. To
- tell the server we use a vt100 terminal, try something like:
-
- curl -tTTYPE=vt100 telnet://remote.server.com
-
- Other interesting options for it -t include:
-
- - XDISPLOC=<X display> Sets the X display location.
-
- - NEW_ENV=<var,val> Sets an environment variable.
-
- NOTE: The telnet protocol does not specify any way to login with a specified
- user and password so curl can't do that automatically. To do that, you need
- to track when the login prompt is received and send the username and
- password accordingly.
-
-PERSISTENT CONNECTIONS
-
- Specifying multiple files on a single command line will make curl transfer
- all of them, one after the other in the specified order.
-
- libcurl will attempt to use persistent connections for the transfers so that
- the second transfer to the same host can use the same connection that was
- already initiated and was left open in the previous transfer. This greatly
- decreases connection time for all but the first transfer and it makes a far
- better use of the network.
-
- Note that curl cannot use persistent connections for transfers that are used
- in subsequence curl invokes. Try to stuff as many URLs as possible on the
- same command line if they are using the same host, as that'll make the
- transfers faster. If you use an HTTP proxy for file transfers, practically
- all transfers will be persistent.
-
-MULTIPLE TRANSFERS WITH A SINGLE COMMAND LINE
-
- As is mentioned above, you can download multiple files with one command line
- by simply adding more URLs. If you want those to get saved to a local file
- instead of just printed to stdout, you need to add one save option for each
- URL you specify. Note that this also goes for the -O option (but not
- --remote-name-all).
-
- For example: get two files and use -O for the first and a custom file
- name for the second:
-
- curl -O http://url.com/file.txt ftp://ftp.com/moo.exe -o moo.jpg
-
- You can also upload multiple files in a similar fashion:
-
- curl -T local1 ftp://ftp.com/moo.exe -T local2 ftp://ftp.com/moo2.txt
-
-IPv6
-
- curl will connect to a server with IPv6 when a host lookup returns an IPv6
- address and fall back to IPv4 if the connection fails. The --ipv4 and --ipv6
- options can specify which address to use when both are available. IPv6
- addresses can also be specified directly in URLs using the syntax:
-
- http://[2001:1890:1112:1::20]/overview.html
-
- When this style is used, the -g option must be given to stop curl from
- interpreting the square brackets as special globbing characters. Link local
- and site local addresses including a scope identifier, such as fe80::1234%1,
- may also be used, but the scope portion must be numeric and the percent
- character must be URL escaped. The previous example in an SFTP URL might
- look like:
-
- sftp://[fe80::1234%251]/
-
- IPv6 addresses provided other than in URLs (e.g. to the --proxy, --interface
- or --ftp-port options) should not be URL encoded.
-
-METALINK
-
- Curl supports Metalink (both version 3 and 4 (RFC 5854) are supported), a way
- to list multiple URIs and hashes for a file. Curl will make use of the mirrors
- listed within for failover if there are errors (such as the file or server not
- being available). It will also verify the hash of the file after the download
- completes. The Metalink file itself is downloaded and processed in memory and
- not stored in the local file system.
-
- Example to use a remote Metalink file:
-
- curl --metalink http://www.example.com/example.metalink
-
- To use a Metalink file in the local file system, use FILE protocol (file://):
-
- curl --metalink file://example.metalink
-
- Please note that if FILE protocol is disabled, there is no way to use a local
- Metalink file at the time of this writing. Also note that if --metalink and
- --include are used together, --include will be ignored. This is because including
- headers in the response will break Metalink parser and if the headers are included
- in the file described in Metalink file, hash check will fail.
-
-MAILING LISTS
-
- For your convenience, we have several open mailing lists to discuss curl,
- its development and things relevant to this. Get all info at
- http://curl.haxx.se/mail/. Some of the lists available are:
-
- curl-users
-
- Users of the command line tool. How to use it, what doesn't work, new
- features, related tools, questions, news, installations, compilations,
- running, porting etc.
-
- curl-library
-
- Developers using or developing libcurl. Bugs, extensions, improvements.
-
- curl-announce
-
- Low-traffic. Only receives announcements of new public versions. At worst,
- that makes something like one or two mails per month, but usually only one
- mail every second month.
-
- curl-and-php
-
- Using the curl functions in PHP. Everything curl with a PHP angle. Or PHP
- with a curl angle.
-
- curl-and-python
-
- Python hackers using curl with or without the python binding pycurl.
-
- Please direct curl questions, feature requests and trouble reports to one of
- these mailing lists instead of mailing any individual.
diff --git a/libs/libcurl/docs/Makefile.am b/libs/libcurl/docs/Makefile.am
deleted file mode 100644
index 8466a6c296..0000000000
--- a/libs/libcurl/docs/Makefile.am
+++ /dev/null
@@ -1,61 +0,0 @@
-#***************************************************************************
-# _ _ ____ _
-# Project ___| | | | _ \| |
-# / __| | | | |_) | |
-# | (__| |_| | _ <| |___
-# \___|\___/|_| \_\_____|
-#
-# Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
-#
-# This software is licensed as described in the file COPYING, which
-# you should have received as part of this distribution. The terms
-# are also available at http://curl.haxx.se/docs/copyright.html.
-#
-# You may opt to use, copy, modify, merge, publish, distribute and/or sell
-# copies of the Software, and permit persons to whom the Software is
-# furnished to do so, under the terms of the COPYING file.
-#
-# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
-# KIND, either express or implied.
-#
-###########################################################################
-
-AUTOMAKE_OPTIONS = foreign no-dependencies
-
-man_MANS = curl.1 curl-config.1
-noinst_man_MANS = mk-ca-bundle.1
-GENHTMLPAGES = curl.html curl-config.html mk-ca-bundle.html
-PDFPAGES = curl.pdf curl-config.pdf mk-ca-bundle.pdf
-
-HTMLPAGES = $(GENHTMLPAGES) index.html
-
-SUBDIRS = examples libcurl
-
-CLEANFILES = $(GENHTMLPAGES) $(PDFPAGES)
-
-EXTRA_DIST = MANUAL BUGS CONTRIBUTE FAQ FEATURES INTERNALS SSLCERTS \
- README.win32 RESOURCES TODO TheArtOfHttpScripting THANKS VERSIONS \
- KNOWN_BUGS BINDINGS $(man_MANS) $(HTMLPAGES) HISTORY INSTALL \
- $(PDFPAGES) LICENSE-MIXING README.netware DISTRO-DILEMMA INSTALL.devcpp \
- MAIL-ETIQUETTE HTTP-COOKIES LIBCURL-STRUCTS
-
-MAN2HTML= roffit < $< >$@
-
-SUFFIXES = .1 .html .pdf
-
-html: $(HTMLPAGES)
- cd libcurl; make html
-
-pdf: $(PDFPAGES)
- cd libcurl; make pdf
-
-.1.html:
- $(MAN2HTML)
-
-.1.pdf:
- @(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \
- groff -Tps -man $< >$$foo.ps; \
- ps2pdf $$foo.ps $@; \
- rm $$foo.ps; \
- echo "converted $< to $@")
-
diff --git a/libs/libcurl/docs/Makefile.in b/libs/libcurl/docs/Makefile.in
deleted file mode 100644
index 971c63f1db..0000000000
--- a/libs/libcurl/docs/Makefile.in
+++ /dev/null
@@ -1,819 +0,0 @@
-# Makefile.in generated by automake 1.14 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
-
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-#***************************************************************************
-# _ _ ____ _
-# Project ___| | | | _ \| |
-# / __| | | | |_) | |
-# | (__| |_| | _ <| |___
-# \___|\___/|_| \_\_____|
-#
-# Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
-#
-# This software is licensed as described in the file COPYING, which
-# you should have received as part of this distribution. The terms
-# are also available at http://curl.haxx.se/docs/copyright.html.
-#
-# You may opt to use, copy, modify, merge, publish, distribute and/or sell
-# copies of the Software, and permit persons to whom the Software is
-# furnished to do so, under the terms of the COPYING file.
-#
-# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
-# KIND, either express or implied.
-#
-###########################################################################
-VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
-am__make_running_with_option = \
- case $${target_option-} in \
- ?) ;; \
- *) echo "am__make_running_with_option: internal error: invalid" \
- "target option '$${target_option-}' specified" >&2; \
- exit 1;; \
- esac; \
- has_opt=no; \
- sane_makeflags=$$MAKEFLAGS; \
- if $(am__is_gnu_make); then \
- sane_makeflags=$$MFLAGS; \
- else \
- case $$MAKEFLAGS in \
- *\\[\ \ ]*) \
- bs=\\; \
- sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
- | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
- esac; \
- fi; \
- skip_next=no; \
- strip_trailopt () \
- { \
- flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
- }; \
- for flg in $$sane_makeflags; do \
- test $$skip_next = yes && { skip_next=no; continue; }; \
- case $$flg in \
- *=*|--*) continue;; \
- -*I) strip_trailopt 'I'; skip_next=yes;; \
- -*I?*) strip_trailopt 'I';; \
- -*O) strip_trailopt 'O'; skip_next=yes;; \
- -*O?*) strip_trailopt 'O';; \
- -*l) strip_trailopt 'l'; skip_next=yes;; \
- -*l?*) strip_trailopt 'l';; \
- -[dEDm]) skip_next=yes;; \
- -[JT]) skip_next=yes;; \
- esac; \
- case $$flg in \
- *$$target_option*) has_opt=yes; break;; \
- esac; \
- done; \
- test $$has_opt = yes
-am__make_dryrun = (target_option=n; $(am__make_running_with_option))
-am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = docs
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(top_srcdir)/mkinstalldirs INSTALL THANKS TODO
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
- $(top_srcdir)/m4/curl-confopts.m4 \
- $(top_srcdir)/m4/curl-functions.m4 \
- $(top_srcdir)/m4/curl-openssl.m4 \
- $(top_srcdir)/m4/curl-override.m4 \
- $(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/xc-am-iface.m4 \
- $(top_srcdir)/m4/xc-cc-check.m4 \
- $(top_srcdir)/m4/xc-lt-iface.m4 \
- $(top_srcdir)/m4/xc-translit.m4 \
- $(top_srcdir)/m4/xc-val-flgs.m4 \
- $(top_srcdir)/m4/zz40-xc-ovr.m4 \
- $(top_srcdir)/m4/zz50-xc-ovr.m4 \
- $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-AM_V_P = $(am__v_P_@AM_V@)
-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
-am__v_P_0 = false
-am__v_P_1 = :
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
-am__v_GEN_1 =
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-am__v_at_1 =
-depcomp =
-am__depfiles_maybe =
-SOURCES =
-DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
- ctags-recursive dvi-recursive html-recursive info-recursive \
- install-data-recursive install-dvi-recursive \
- install-exec-recursive install-html-recursive \
- install-info-recursive install-pdf-recursive \
- install-ps-recursive install-recursive installcheck-recursive \
- installdirs-recursive pdf-recursive ps-recursive \
- tags-recursive uninstall-recursive
-am__can_run_installinfo = \
- case $$AM_UPDATE_INFO_DIR in \
- n|no|NO) false;; \
- *) (install-info --version) >/dev/null 2>&1;; \
- esac
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
- srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
- for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
- for p in $$list; do echo "$$p $$p"; done | \
- sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
- $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
- if (++n[$$2] == $(am__install_max)) \
- { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
- END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
- sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
- sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__uninstall_files_from_dir = { \
- test -z "$$files" \
- || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
- || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
- $(am__cd) "$$dir" && rm -f $$files; }; \
- }
-man1dir = $(mandir)/man1
-am__installdirs = "$(DESTDIR)$(man1dir)"
-MANS = $(man_MANS)
-RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
- distclean-recursive maintainer-clean-recursive
-am__recursive_targets = \
- $(RECURSIVE_TARGETS) \
- $(RECURSIVE_CLEAN_TARGETS) \
- $(am__extra_recursive_targets)
-AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
- distdir
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-# Read a list of newline-separated strings from the standard input,
-# and print each of them once, without duplicates. Input order is
-# *not* preserved.
-am__uniquify_input = $(AWK) '\
- BEGIN { nonempty = 0; } \
- { items[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in items) print i; }; } \
-'
-# Make sure the list of sources is unique. This is necessary because,
-# e.g., the same source file might be shared among _SOURCES variables
-# for different programs/libraries.
-am__define_uniq_tagged_files = \
- list='$(am__tagged_files)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-am__relativize = \
- dir0=`pwd`; \
- sed_first='s,^\([^/]*\)/.*$$,\1,'; \
- sed_rest='s,^[^/]*/*,,'; \
- sed_last='s,^.*/\([^/]*\)$$,\1,'; \
- sed_butlast='s,/*[^/]*$$,,'; \
- while test -n "$$dir1"; do \
- first=`echo "$$dir1" | sed -e "$$sed_first"`; \
- if test "$$first" != "."; then \
- if test "$$first" = ".."; then \
- dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
- dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
- else \
- first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
- if test "$$first2" = "$$first"; then \
- dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
- else \
- dir2="../$$dir2"; \
- fi; \
- dir0="$$dir0"/"$$first"; \
- fi; \
- fi; \
- dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
- done; \
- reldir="$$dir2"
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
-CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@
-CURLVERSION = @CURLVERSION@
-CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
-CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
-CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
-CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
-CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
-CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
-CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
-CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
-CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
-CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
-CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
-CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
-CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
-CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
-CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
-CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@
-CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@
-CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-ENABLE_SHARED = @ENABLE_SHARED@
-ENABLE_STATIC = @ENABLE_STATIC@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
-HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
-HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_NSS_INITCONTEXT = @HAVE_NSS_INITCONTEXT@
-HAVE_SSLEAY_SRP = @HAVE_SSLEAY_SRP@
-IDN_ENABLED = @IDN_ENABLED@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPV6_ENABLED = @IPV6_ENABLED@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBCURL_LIBS = @LIBCURL_LIBS@
-LIBMETALINK_CPPFLAGS = @LIBMETALINK_CPPFLAGS@
-LIBMETALINK_LDFLAGS = @LIBMETALINK_LDFLAGS@
-LIBMETALINK_LIBS = @LIBMETALINK_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-MANIFEST_TOOL = @MANIFEST_TOOL@
-MANOPT = @MANOPT@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NROFF = @NROFF@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-PKGADD_NAME = @PKGADD_NAME@
-PKGADD_PKG = @PKGADD_PKG@
-PKGADD_VENDOR = @PKGADD_VENDOR@
-PKGCONFIG = @PKGCONFIG@
-RANDOM_FILE = @RANDOM_FILE@
-RANLIB = @RANLIB@
-REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SSL_ENABLED = @SSL_ENABLED@
-STRIP = @STRIP@
-SUPPORT_FEATURES = @SUPPORT_FEATURES@
-SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-USE_ARES = @USE_ARES@
-USE_AXTLS = @USE_AXTLS@
-USE_CYASSL = @USE_CYASSL@
-USE_DARWINSSL = @USE_DARWINSSL@
-USE_GNUTLS = @USE_GNUTLS@
-USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@
-USE_LIBRTMP = @USE_LIBRTMP@
-USE_LIBSSH2 = @USE_LIBSSH2@
-USE_NGHTTP2 = @USE_NGHTTP2@
-USE_NSS = @USE_NSS@
-USE_OPENLDAP = @USE_OPENLDAP@
-USE_POLARSSL = @USE_POLARSSL@
-USE_SCHANNEL = @USE_SCHANNEL@
-USE_SSLEAY = @USE_SSLEAY@
-USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
-VERSION = @VERSION@
-VERSIONNUM = @VERSIONNUM@
-ZLIB_LIBS = @ZLIB_LIBS@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-libext = @libext@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-AUTOMAKE_OPTIONS = foreign no-dependencies
-man_MANS = curl.1 curl-config.1
-noinst_man_MANS = mk-ca-bundle.1
-GENHTMLPAGES = curl.html curl-config.html mk-ca-bundle.html
-PDFPAGES = curl.pdf curl-config.pdf mk-ca-bundle.pdf
-HTMLPAGES = $(GENHTMLPAGES) index.html
-SUBDIRS = examples libcurl
-CLEANFILES = $(GENHTMLPAGES) $(PDFPAGES)
-EXTRA_DIST = MANUAL BUGS CONTRIBUTE FAQ FEATURES INTERNALS SSLCERTS \
- README.win32 RESOURCES TODO TheArtOfHttpScripting THANKS VERSIONS \
- KNOWN_BUGS BINDINGS $(man_MANS) $(HTMLPAGES) HISTORY INSTALL \
- $(PDFPAGES) LICENSE-MIXING README.netware DISTRO-DILEMMA INSTALL.devcpp \
- MAIL-ETIQUETTE HTTP-COOKIES LIBCURL-STRUCTS
-
-MAN2HTML = roffit < $< >$@
-SUFFIXES = .1 .html .pdf
-all: all-recursive
-
-.SUFFIXES:
-.SUFFIXES: .1 .html .pdf
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
- && { if test -f $@; then exit 0; else break; fi; }; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --foreign docs/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-install-man1: $(man_MANS)
- @$(NORMAL_INSTALL)
- @list1=''; \
- list2='$(man_MANS)'; \
- test -n "$(man1dir)" \
- && test -n "`echo $$list1$$list2`" \
- || exit 0; \
- echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
- { for i in $$list1; do echo "$$i"; done; \
- if test -n "$$list2"; then \
- for i in $$list2; do echo "$$i"; done \
- | sed -n '/\.1[a-z]*$$/p'; \
- fi; \
- } | while read p; do \
- if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; echo "$$p"; \
- done | \
- sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
- -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
- sed 'N;N;s,\n, ,g' | { \
- list=; while read file base inst; do \
- if test "$$base" = "$$inst"; then list="$$list $$file"; else \
- echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
- $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
- fi; \
- done; \
- for i in $$list; do echo "$$i"; done | $(am__base_list) | \
- while read files; do \
- test -z "$$files" || { \
- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
- $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
- done; }
-
-uninstall-man1:
- @$(NORMAL_UNINSTALL)
- @list=''; test -n "$(man1dir)" || exit 0; \
- files=`{ for i in $$list; do echo "$$i"; done; \
- l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
- sed -n '/\.1[a-z]*$$/p'; \
- } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
- -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
- dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run 'make' without going through this Makefile.
-# To change the values of 'make' variables: instead of editing Makefiles,
-# (1) if the variable is set in 'config.status', edit 'config.status'
-# (which will cause the Makefiles to be regenerated when you run 'make');
-# (2) otherwise, pass the desired values on the 'make' command line.
-$(am__recursive_targets):
- @fail=; \
- if $(am__make_keepgoing); then \
- failcom='fail=yes'; \
- else \
- failcom='exit 1'; \
- fi; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-ID: $(am__tagged_files)
- $(am__define_uniq_tagged_files); mkid -fID $$unique
-tags: tags-recursive
-TAGS: tags
-
-tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
- set x; \
- here=`pwd`; \
- if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
- include_option=--etags-include; \
- empty_fix=.; \
- else \
- include_option=--include; \
- empty_fix=; \
- fi; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test ! -f $$subdir/TAGS || \
- set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
- fi; \
- done; \
- $(am__define_uniq_tagged_files); \
- shift; \
- if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- if test $$# -gt 0; then \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- "$$@" $$unique; \
- else \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$unique; \
- fi; \
- fi
-ctags: ctags-recursive
-
-CTAGS: ctags
-ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
- $(am__define_uniq_tagged_files); \
- test -z "$(CTAGS_ARGS)$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && $(am__cd) $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) "$$here"
-cscopelist: cscopelist-recursive
-
-cscopelist-am: $(am__tagged_files)
- list='$(am__tagged_files)'; \
- case "$(srcdir)" in \
- [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
- *) sdir=$(subdir)/$(srcdir) ;; \
- esac; \
- for i in $$list; do \
- if test -f "$$i"; then \
- echo "$(subdir)/$$i"; \
- else \
- echo "$$sdir/$$i"; \
- fi; \
- done >> $(top_builddir)/cscope.files
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d "$(distdir)/$$file"; then \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
- else \
- test -f "$(distdir)/$$file" \
- || cp -p $$d/$$file "$(distdir)/$$file" \
- || exit 1; \
- fi; \
- done
- @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- $(am__make_dryrun) \
- || test -d "$(distdir)/$$subdir" \
- || $(MKDIR_P) "$(distdir)/$$subdir" \
- || exit 1; \
- dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
- $(am__relativize); \
- new_distdir=$$reldir; \
- dir1=$$subdir; dir2="$(top_distdir)"; \
- $(am__relativize); \
- new_top_distdir=$$reldir; \
- echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
- echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
- ($(am__cd) $$subdir && \
- $(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$$new_top_distdir" \
- distdir="$$new_distdir" \
- am__remove_distdir=: \
- am__skip_length_check=: \
- am__skip_mode_fix=: \
- distdir) \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-recursive
-all-am: Makefile $(MANS)
-installdirs: installdirs-recursive
-installdirs-am:
- for dir in "$(DESTDIR)$(man1dir)"; do \
- test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- done
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
- if test -z '$(STRIP)'; then \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- install; \
- else \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
- fi
-mostlyclean-generic:
-
-clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-recursive
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html-am:
-
-info: info-recursive
-
-info-am:
-
-install-data-am: install-man
-
-install-dvi: install-dvi-recursive
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-recursive
-
-install-html-am:
-
-install-info: install-info-recursive
-
-install-info-am:
-
-install-man: install-man1
-
-install-pdf: install-pdf-recursive
-
-install-pdf-am:
-
-install-ps: install-ps-recursive
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am: uninstall-man
-
-uninstall-man: uninstall-man1
-
-.MAKE: $(am__recursive_targets) install-am install-strip
-
-.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
- check-am clean clean-generic clean-libtool cscopelist-am ctags \
- ctags-am distclean distclean-generic distclean-libtool \
- distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-man1 install-pdf install-pdf-am install-ps \
- install-ps-am install-strip installcheck installcheck-am \
- installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
- uninstall-am uninstall-man uninstall-man1
-
-
-html: $(HTMLPAGES)
- cd libcurl; make html
-
-pdf: $(PDFPAGES)
- cd libcurl; make pdf
-
-.1.html:
- $(MAN2HTML)
-
-.1.pdf:
- @(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \
- groff -Tps -man $< >$$foo.ps; \
- ps2pdf $$foo.ps $@; \
- rm $$foo.ps; \
- echo "converted $< to $@")
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/libs/libcurl/docs/README b/libs/libcurl/docs/README
deleted file mode 100644
index 2ffacc32cc..0000000000
--- a/libs/libcurl/docs/README
+++ /dev/null
@@ -1,49 +0,0 @@
- _ _ ____ _
- ___| | | | _ \| |
- / __| | | | |_) | |
- | (__| |_| | _ <| |___
- \___|\___/|_| \_\_____|
-
-README
-
- Curl is a command line tool for transferring data specified with URL
- syntax. Find out how to use curl by reading the curl.1 man page or the
- MANUAL document. Find out how to install Curl by reading the INSTALL
- document.
-
- libcurl is the library curl is using to do its job. It is readily
- available to be used by your software. Read the libcurl.3 man page to
- learn how!
-
- You find answers to the most frequent questions we get in the FAQ document.
-
- Study the COPYING file for distribution terms and similar. If you distribute
- curl binaries or other binaries that involve libcurl, you might enjoy the
- LICENSE-MIXING document.
-
-CONTACT
-
- If you have problems, questions, ideas or suggestions, please contact us
- by posting to a suitable mailing list. See http://curl.haxx.se/mail/
-
- All contributors to the project are listed in the THANKS document.
-
-WEB SITE
-
- Visit the curl web site for the latest news and downloads:
-
- http://curl.haxx.se/
-
-GIT
-
- To download the very latest source off the GIT server do this:
-
- git clone git://github.com/bagder/curl.git
-
- (you'll get a directory named curl created, filled with the source code)
-
-NOTICE
-
- Curl contains pieces of source code that is Copyright (c) 1998, 1999
- Kungliga Tekniska Högskolan. This notice is included here to comply with the
- distribution terms.
diff --git a/libs/libcurl/docs/README.netware b/libs/libcurl/docs/README.netware
deleted file mode 100644
index 41da2e8dc0..0000000000
--- a/libs/libcurl/docs/README.netware
+++ /dev/null
@@ -1,27 +0,0 @@
- _ _ ____ _
- ___| | | | _ \| |
- / __| | | | |_) | |
- | (__| |_| | _ <| |___
- \___|\___/|_| \_\_____|
-
-README.netware
-
- Read the README file first.
-
- Curl has been successfully compiled with gcc / nlmconv on different flavours
- of Linux as well as with the official Metrowerks CodeWarrior compiler.
- While not being the main development target, a continously growing share of
- curl users are NetWare-based, specially also consuming the lib from PHP.
-
- The unix-style man pages are tricky to read on windows, so therefore are all
- those pages converted to HTML as well as pdf, and included in the release
- archives.
-
- The main curl.1 man page is also "built-in" in the command line tool. Use a
- command line similar to this in order to extract a separate text file:
-
- curl -M >manual.txt
-
- Read the INSTALL file for instructions how to compile curl self.
-
-
diff --git a/libs/libcurl/docs/README.win32 b/libs/libcurl/docs/README.win32
deleted file mode 100644
index cfd45dd25b..0000000000
--- a/libs/libcurl/docs/README.win32
+++ /dev/null
@@ -1,26 +0,0 @@
- _ _ ____ _
- ___| | | | _ \| |
- / __| | | | |_) | |
- | (__| |_| | _ <| |___
- \___|\___/|_| \_\_____|
-
-README.win32
-
- Read the README file first.
-
- Curl has been compiled, built and run on all sorts of Windows and win32
- systems. While not being the main develop target, a fair share of curl users
- are win32-based.
-
- The unix-style man pages are tricky to read on windows, so therefore are all
- those pages converted to HTML as well as pdf, and included in the release
- archives.
-
- The main curl.1 man page is also "built-in" in the command line tool. Use a
- command line similar to this in order to extract a separate text file:
-
- curl -M >manual.txt
-
- Read the INSTALL file for instructions how to compile curl self.
-
-
diff --git a/libs/libcurl/docs/RELEASE-NOTES b/libs/libcurl/docs/RELEASE-NOTES
deleted file mode 100644
index b8f1719bab..0000000000
--- a/libs/libcurl/docs/RELEASE-NOTES
+++ /dev/null
@@ -1,111 +0,0 @@
-Curl and libcurl 7.33.0
-
- Public curl releases: 135
- Command line options: 161
- curl_easy_setopt() options: 205
- Public functions in libcurl: 58
- Known libcurl bindings: 42
- Contributors: 1057
-
-This release includes the following changes:
-
- o test code for testing the event based API [3]
- o CURLM_ADDED_ALREADY: new error code
- o test TFTP server: support "writedelay" within <servercmd>
- o krb4 support has been removed
- o imap/pop3/smtp: added basic SASL XOAUTH2 support [9]
- o darwinssl: add support for PKCS#12 files for client authentication
- o darwinssl: enable BEAST workaround on iOS 7 & later
- o Pass password to OpenSSL engine by user interface [15]
- o c-ares: Add support for various DNS binding options
- o cookies: add expiration
- o curl: added --oauth2-bearer option
-
-This release includes the following bugfixes:
-
- o nss: make sure that NSS is initialized
- o curl: make --no-[option] work properly for several options
- o FTP: with socket_action send better socket updates in active mode [1]
- o curl: fix the --sasl-ir in the --help output
- o tests 2032, 2033: Don't hardcode port in expected output
- o urlglob: better detect unclosed braces, empty lists and overflows [7]
- o urlglob: error out on range overflow [8]
- o imap: Fixed response check for SEARCH, EXPUNGE, LSUB, UID and NOOP commands [10]
- o handle arbitrary-length username and password [2]
- o TFTP: make the CURLOPT_LOW_SPEED* options work [4]
- o curl.h: name space pollution by "enum type" [5]
- o multi: move on from STATE_DONE faster [6]
- o FTP: 60 secs delay if aborted in the CURLOPT_HEADERFUNCTION callback [11]
- o multi_socket: improved 100-continue timeout handling
- o curl_multi_remove_handle: allow multiple removes
- o FTP: fix getsock during DO_MORE state [12]
- o -x: rephrased the --proxy section somewhat
- o acinclude: fix --without-ca-path when cross-compiling [13]
- o LDAP: fix bad free() when URL parsing failed [14]
- o --data: mention CRLF treatment when reading from file
- o curl_easy_pause: suggest one way to unpause
- o imap: Fixed calculation of transfer when partial FETCH received [16]
- o pingpong: Check SSL library buffers for already read data [16]
- o imap/pop3/smtp: Speed up SSL connection initialization
- o libcurl.3: for multi interface connections are held in the multi handle
- o curl_easy_setopt.3: mention RTMP URL quirks [17]
- o curl.1: detail how short/long options work [18]
- o curl.1: Added information about optional login options to --user option
- o curl: Added clarification to the --mail options in the --help output
- o curl_easy_setopt.3: clarify that TIMEOUT and TIMEOUT_MS set the same value
- o openssl: use correct port number in error message [19]
- o darwinssl: block TLS_RSA_WITH_NULL_SHA256 cipher
- o OpenSSL: acknowledge CURLOPT_SSL_VERIFYHOST without VERIFYPEER
- o xattr: add support for FreeBSD xattr API
- o win32: fix Visual Studio 2010 build with WINVER >= 0x600 [22]
- o configure: use icc options without space [21]
- o test1112: Increase the timeout from 7s to 16s [20]
- o SCP: upload speed on a fast connection limited to 16384 B/s
- o curl_setup_once: fix errno access for lwip on Windows [24]
- o HTTP: Output http response 304 when modified time is too old [23]
-
-This release includes the following known bugs:
-
- o see docs/KNOWN_BUGS (http://curl.haxx.se/docs/knownbugs.html)
-
-This release would not have looked like this without help, code, reports and
-advice from friends like these:
-
- Alex McLellan, Bill Doyle, Colby Ranger, Fabian Keil, Gisle Vanem,
- John E. Malmberg, Jonathan Nieder, Kamil Dudka, Shawn Landden,
- Tor Arntsen, Will Dietz, Yi Huang, Kyle L. Huff, Steve Holme, Mike Mio,
- Stefan Neis, Nick Zitzmann, Geoff Beier, John Dunn, Jiri Hruska,
- Tomas Mlcoch, Kim Vandry, Ben Greear, Gorilla Maguila, Jerry Krinock,
- Yamada Yasuharu, Gordon Marler, Dave Thompson, D. Flinkmann,
- Benoit Sigoure, Clemens Gruber, Guenter Knauf, Petr Pisar, Elmira A Semenova,
- Francois Charlier, Ishan SinghLevett, Marcel Raad, Ulf Samuelsson,
- Andrej E Baranov, Derek Higgins, Heinrich Schaefer
-
- Thanks! (and sorry if I forgot to mention someone)
-
-References to bug reports and discussions on issues:
-
- [1] = http://curl.haxx.se/mail/lib-2013-08/0043.html
- [2] = http://bugs.debian.org/719856
- [3] = http://daniel.haxx.se/blog/2013/08/20/testing-curl_multi_socket_action/
- [4] = http://curl.haxx.se/bug/view.cgi?id=1269
- [5] = https://github.com/bagder/curl/pull/76
- [6] = http://curl.haxx.se/mail/lib-2013-08/0211.html
- [7] = http://curl.haxx.se/bug/view.cgi?id=1264
- [8] = http://curl.haxx.se/bug/view.cgi?id=1267
- [9] = http://curl.haxx.se/mail/lib-2013-08/0234.html
- [10] = http://curl.haxx.se/mail/lib-2013-08/0136.html
- [11] = https://bugzilla.redhat.com/1005686
- [12] = http://curl.haxx.se/mail/lib-2013-08/0109.html
- [13] = http://curl.haxx.se/bug/view.cgi?id=1273
- [14] = http://curl.haxx.se/mail/lib-2013-08/0209.html
- [15] = http://curl.haxx.se/mail/lib-2013-08/0265.html
- [16] = http://curl.haxx.se/mail/lib-2013-08/0170.html
- [17] = http://curl.haxx.se/bug/view.cgi?id=1278
- [18] = http://curl.haxx.se/bug/view.cgi?id=1279
- [19] = http://curl.haxx.se/bug/view.cgi?id=1281
- [20] = http://curl.haxx.se/mail/lib-2010-02/0200.html
- [21] = http://curl.haxx.se/mail/lib-2013-09/0182.html
- [22] = http://curl.haxx.se/bug/view.cgi?id=1282
- [23] = http://curl.haxx.se/bug/view.cgi?id=1288
- [24] = http://curl.haxx.se/mail/lib-2013-10/0048.html
diff --git a/libs/libcurl/docs/RESOURCES b/libs/libcurl/docs/RESOURCES
deleted file mode 100644
index 760e75975a..0000000000
--- a/libs/libcurl/docs/RESOURCES
+++ /dev/null
@@ -1,83 +0,0 @@
- _ _ ____ _
- Project ___| | | | _ \| |
- / __| | | | |_) | |
- | (__| |_| | _ <| |___
- \___|\___/|_| \_\_____|
-
-
-This document lists documents and standards used by curl.
-
- RFC 959 - The FTP protocol
-
- RFC 1635 - How to Use Anonymous FTP
-
- RFC 1738 - Uniform Resource Locators
-
- RFC 1777 - defines the LDAP protocol
-
- RFC 1808 - Relative Uniform Resource Locators
-
- RFC 1867 - Form-based File Upload in HTML
-
- RFC 1950 - ZLIB Compressed Data Format Specification
-
- RFC 1951 - DEFLATE Compressed Data Format Specification
-
- RFC 1952 - gzip compression format
-
- RFC 1959 - LDAP URL syntax
-
- RFC 2045-2049 - Everything you need to know about MIME! (needed for form
- based upload)
-
- RFC 2068 - HTTP 1.1 (obsoleted by RFC 2616)
-
- RFC 2104 - Keyed-Hashing for Message Authentication
-
- RFC 2109 - HTTP State Management Mechanism (cookie stuff)
- - Also, read Netscape's specification at
- http://curl.haxx.se/rfc/cookie_spec.html
-
- RFC 2183 - The Content-Disposition Header Field
-
- RFC 2195 - CRAM-MD5 authentication
-
- RFC 2229 - A Dictionary Server Protocol
-
- RFC 2255 - Newer LDAP URL syntax document.
-
- RFC 2231 - MIME Parameter Value and Encoded Word Extensions:
- Character Sets, Languages, and Continuations
-
- RFC 2388 - "Returning Values from Forms: multipart/form-data"
- Use this as an addition to the RFC1867
-
- RFC 2396 - "Uniform Resource Identifiers: Generic Syntax and Semantics" This
- one obsoletes RFC 1738, but since RFC 1738 is often mentioned
- I've left it in this list.
-
- RFC 2428 - FTP Extensions for IPv6 and NATs
-
- RFC 2577 - FTP Security Considerations
-
- RFC 2616 - HTTP 1.1, the latest
-
- RFC 2617 - HTTP Authentication
-
- RFC 2718 - Guidelines for new URL Schemes
-
- RFC 2732 - Format for Literal IPv6 Addresses in URL's
-
- RFC 2818 - HTTP Over TLS (TLS is the successor to SSL)
-
- RFC 2821 - SMTP protocol
-
- RFC 2964 - Use of HTTP State Management
-
- RFC 2965 - HTTP State Management Mechanism. Cookies. Obsoletes RFC2109
-
- RFC 3207 - SMTP over TLS
-
- RFC 4616 - PLAIN authentication
-
- RFC 4954 - SMTP Authentication
diff --git a/libs/libcurl/docs/SSLCERTS b/libs/libcurl/docs/SSLCERTS
deleted file mode 100644
index e6b05c3e3f..0000000000
--- a/libs/libcurl/docs/SSLCERTS
+++ /dev/null
@@ -1,138 +0,0 @@
- Peer SSL Certificate Verification
- =================================
-
-(NOTE: If libcurl was built with Schannel or Secure Transport support, then
-this does not apply to you. Scroll down for details on how the OS-native
-engines handle SSL certificates. If you're not sure, then run "curl -V" and
-read the results. If the version string says "WinSSL" in it, then it was built
-with Schannel support.)
-
-libcurl performs peer SSL certificate verification by default. This is done
-by using CA cert bundle that the SSL library can use to make sure the peer's
-server certificate is valid.
-
-If you communicate with HTTPS or FTPS servers using certificates that are
-signed by CAs present in the bundle, you can be sure that the remote server
-really is the one it claims to be.
-
-Until 7.18.0, curl bundled a severely outdated ca bundle file that was
-installed by default. These days, the curl archives include no ca certs at
-all. You need to get them elsewhere. See below for example.
-
-If the remote server uses a self-signed certificate, if you don't install a CA
-cert bundle, if the server uses a certificate signed by a CA that isn't
-included in the bundle you use or if the remote host is an impostor
-impersonating your favorite site, and you want to transfer files from this
-server, do one of the following:
-
- 1. Tell libcurl to *not* verify the peer. With libcurl you disable this with
- curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);
-
- With the curl command line tool, you disable this with -k/--insecure.
-
- 2. Get a CA certificate that can verify the remote server and use the proper
- option to point out this CA cert for verification when connecting. For
- libcurl hackers: curl_easy_setopt(curl, CURLOPT_CAPATH, capath);
-
- With the curl command line tool: --cacert [file]
-
- 3. Add the CA cert for your server to the existing default CA cert bundle.
- The default path of the CA bundle used can be changed by running configure
- with the --with-ca-bundle option pointing out the path of your choice.
-
- To do this, you need to get the CA cert for your server in PEM format and
- then append that to your CA cert bundle.
-
- If you use Internet Explorer, this is one way to get extract the CA cert
- for a particular server:
-
- o View the certificate by double-clicking the padlock
- o Find out where the CA certificate is kept (Certificate>
- Authority Information Access>URL)
- o Get a copy of the crt file using curl
- o Convert it from crt to PEM using the openssl tool:
- openssl x509 -inform DES -in yourdownloaded.crt \
- -out outcert.pem -text
- o Append the 'outcert.pem' to the CA cert bundle or use it stand-alone
- as described below.
-
- If you use the 'openssl' tool, this is one way to get extract the CA cert
- for a particular server:
-
- o openssl s_client -connect xxxxx.com:443 |tee logfile
- o type "QUIT", followed by the "ENTER" key
- o The certificate will have "BEGIN CERTIFICATE" and "END CERTIFICATE"
- markers.
- o If you want to see the data in the certificate, you can do: "openssl
- x509 -inform PEM -in certfile -text -out certdata" where certfile is
- the cert you extracted from logfile. Look in certdata.
- o If you want to trust the certificate, you can append it to your
- cert_bundle or use it stand-alone as described. Just remember that the
- security is no better than the way you obtained the certificate.
-
- 4. If you're using the curl command line tool, you can specify your own CA
- cert path by setting the environment variable CURL_CA_BUNDLE to the path
- of your choice.
-
- If you're using the curl command line tool on Windows, curl will search
- for a CA cert file named "curl-ca-bundle.crt" in these directories and in
- this order:
- 1. application's directory
- 2. current working directory
- 3. Windows System directory (e.g. C:\windows\system32)
- 4. Windows Directory (e.g. C:\windows)
- 5. all directories along %PATH%
-
- 5. Get a better/different/newer CA cert bundle! One option is to extract the
- one a recent Firefox browser uses by running 'make ca-bundle' in the curl
- build tree root, or possibly download a version that was generated this
- way for you:
-
- http://curl.haxx.se/docs/caextract.html
-
-Neglecting to use one of the above methods when dealing with a server using a
-certificate that isn't signed by one of the certificates in the installed CA
-cert bundle, will cause SSL to report an error ("certificate verify failed")
-during the handshake and SSL will then refuse further communication with that
-server.
-
- Peer SSL Certificate Verification with NSS
- ==========================================
-
-If libcurl was built with NSS support, then depending on the OS distribution,
-it is probably required to take some additional steps to use the system-wide CA
-cert db. RedHat ships with an additional module, libnsspem.so, which enables
-NSS to read the OpenSSL PEM CA bundle. This library is missing in OpenSuSE, and
-without it, NSS can only work with its own internal formats. NSS also has a new
-database format: https://wiki.mozilla.org/NSS_Shared_DB
-
-Starting with version 7.19.7, libcurl will check for the NSS version it runs,
-and automatically add the 'sql:' prefix to the certdb directory (either the
-hardcoded default /etc/pki/nssdb or the directory configured with SSL_DIR
-environment variable) if version 3.12.0 or later is detected. To check which
-ertdb format your distribution provides, examine the default
-certdb location: /etc/pki/nssdb; the new certdb format can be identified by
-the filenames cert9.db, key4.db, pkcs11.txt; filenames of older versions are
-cert8.db, key3.db, modsec.db.
-
-Usually these cert databases are empty, but NSS also has built-in CAs which are
-provided through a shared library, libnssckbi.so; if you want to use these
-built-in CAs, then create a symlink to libnssckbi.so in /etc/pki/nssdb:
-ln -s /usr/lib[64]/libnssckbi.so /etc/pki/nssdb/libnssckbi.so
-
- Peer SSL Certificate Verification with Schannel and Secure Transport
- ====================================================================
-
-If libcurl was built with Schannel (Microsoft's TLS/SSL engine) or Secure
-Transport (Apple's TLS/SSL engine) support, then libcurl will still perform
-peer certificate verification, but instead of using a CA cert bundle, it will
-use the certificates that are built into the OS. These are the same
-certificates that appear in the Internet Options control panel (under Windows)
-or Keychain Access application (under OS X). Any custom security rules for
-certificates will be honored.
-
-Schannel will run CRL checks on certificates unless peer verification is
-disabled. Secure Transport on iOS will run OCSP checks on certificates unless
-peer verification is disabled. Secure Transport on OS X will run either OCSP
-or CRL checks on certificates if those features are enabled, and this behavior
-can be adjusted in the preferences of Keychain Access.
diff --git a/libs/libcurl/docs/TODO b/libs/libcurl/docs/TODO
deleted file mode 100644
index 8b133dc160..0000000000
--- a/libs/libcurl/docs/TODO
+++ /dev/null
@@ -1,700 +0,0 @@
- _ _ ____ _
- ___| | | | _ \| |
- / __| | | | |_) | |
- | (__| |_| | _ <| |___
- \___|\___/|_| \_\_____|
-
- Things that could be nice to do in the future
-
- Things to do in project cURL. Please tell us what you think, contribute and
- send us patches that improve things!
-
- All bugs documented in the KNOWN_BUGS document are subject for fixing!
-
- 1. libcurl
- 1.2 More data sharing
- 1.3 struct lifreq
- 1.4 signal-based resolver timeouts
- 1.5 get rid of PATH_MAX
- 1.6 Happy Eyeball dual stack connect
- 1.7 Modified buffer size approach
-
- 2. libcurl - multi interface
- 2.1 More non-blocking
- 2.2 Fix HTTP Pipelining for PUT
-
- 3. Documentation
- 3.1 More and better
-
- 4. FTP
- 4.1 HOST
- 4.2 Alter passive/active on failure and retry
- 4.3 Earlier bad letter detection
- 4.4 REST for large files
- 4.5 FTP proxy support
- 4.6 ASCII support
-
- 5. HTTP
- 5.1 Better persistency for HTTP 1.0
- 5.2 support FF3 sqlite cookie files
- 5.3 Rearrange request header order
- 5.4 HTTP2/SPDY
-
- 6. TELNET
- 6.1 ditch stdin
- 6.2 ditch telnet-specific select
- 6.3 feature negotiation debug data
- 6.4 send data in chunks
-
- 7. SMTP
- 7.1 Pipelining
- 7.2 Graceful base64 decoding failure
- 7.3 Enhanced capability support
-
- 8. POP3
- 8.1 Pipelining
- 8.2 Graceful base64 decoding failure
- 8.3 Enhanced capability support
-
- 9. IMAP
- 9.1 Graceful base64 decoding failure
- 9.2 Enhanced capability support
-
- 10. LDAP
- 10.1 SASL based authentication mechanisms
-
- 11. New protocols
- 11.1 RSYNC
-
- 12. SSL
- 12.1 Disable specific versions
- 12.2 Provide mutex locking API
- 12.3 Evaluate SSL patches
- 12.4 Cache OpenSSL contexts
- 12.5 Export session ids
- 12.6 Provide callback for cert verification
- 12.7 Support other SSL libraries
- 12.8 improve configure --with-ssl
- 12.9 Support DANE
-
- 13. GnuTLS
- 13.1 SSL engine stuff
- 13.2 check connection
-
- 14. SASL
- 14.1 Other authentication mechanisms
-
- 15. Client
- 15.1 sync
- 15.2 glob posts
- 15.3 prevent file overwriting
- 15.4 simultaneous parallel transfers
- 15.5 provide formpost headers
- 15.6 url-specific options
- 15.7 warning when setting an option
- 15.8 IPv6 addresses with globbing
-
- 16. Build
- 16.1 roffit
-
- 17. Test suite
- 17.1 SSL tunnel
- 17.2 nicer lacking perl message
- 17.3 more protocols supported
- 17.4 more platforms supported
-
- 18. Next SONAME bump
- 18.1 http-style HEAD output for ftp
- 18.2 combine error codes
- 18.3 extend CURLOPT_SOCKOPTFUNCTION prototype
-
- 19. Next major release
- 19.1 cleanup return codes
- 19.2 remove obsolete defines
- 19.3 size_t
- 19.4 remove several functions
- 19.5 remove CURLOPT_FAILONERROR
- 19.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE
- 19.7 remove progress meter from libcurl
- 19.8 remove 'curl_httppost' from public
- 19.9 have form functions use CURL handle argument
- 19.10 Add CURLOPT_MAIL_CLIENT option
-
-==============================================================================
-
-1. libcurl
-
-1.2 More data sharing
-
- curl_share_* functions already exist and work, and they can be extended to
- share more. For example, enable sharing of the ares channel and the
- connection cache.
-
-1.3 struct lifreq
-
- Use 'struct lifreq' and SIOCGLIFADDR instead of 'struct ifreq' and
- SIOCGIFADDR on newer Solaris versions as they claim the latter is obsolete.
- To support ipv6 interface addresses for network interfaces properly.
-
-1.4 signal-based resolver timeouts
-
- libcurl built without an asynchronous resolver library uses alarm() to time
- out DNS lookups. When a timeout occurs, this causes libcurl to jump from the
- signal handler back into the library with a sigsetjmp, which effectively
- causes libcurl to continue running within the signal handler. This is
- non-portable and could cause problems on some platforms. A discussion on the
- problem is available at http://curl.haxx.se/mail/lib-2008-09/0197.html
-
- Also, alarm() provides timeout resolution only to the nearest second. alarm
- ought to be replaced by setitimer on systems that support it.
-
-1.5 get rid of PATH_MAX
-
- Having code use and rely on PATH_MAX is not nice:
- http://insanecoding.blogspot.com/2007/11/pathmax-simply-isnt.html
-
- Currently the SSH based code uses it a bit, but to remove PATH_MAX from there
- we need libssh2 to properly tell us when we pass in a too small buffer and
- its current API (as of libssh2 1.2.7) doesn't.
-
-1.6 Happy Eyeball dual stack connect
-
- In order to make alternative technologies not suffer when transitioning, like
- when introducing IPv6 as an alternative to IPv4 and there are more than one
- option existing simultaneously there are reasons to reconsider internal
- choices.
-
- To make libcurl do blazing fast IPv6 in a dual-stack configuration, this needs
- to be addressed:
-
- http://tools.ietf.org/html/rfc6555
-
-1.7 Modified buffer size approach
-
- Current libcurl allocates a fixed 16K size buffer for download and an
- additional 16K for upload. They are always unconditionally part of the easy
- handle. If CRLF translations are requested, an additional 32K "scratch
- buffer" is allocated. A total of 64K transfer buffers in the worst case.
-
- First, while the handles are not actually in use these buffers could be freed
- so that lingering handles just kept in queues or whatever waste less memory.
-
- Secondly, SFTP is a protocol that needs to handle many ~30K blocks at once
- since each need to be individually acked and therefore libssh2 must be
- allowed to send (or receive) many separate ones in parallel to achieve high
- transfer speeds. A current libcurl build with a 16K buffer makes that
- impossible, but one with a 512K buffer will reach MUCH faster transfers. But
- allocating 512K unconditionally for all buffers just in case they would like
- to do fast SFTP transfers at some point is not a good solution either.
-
- Dynamically allocate buffer size depending on protocol in use in combination
- with freeing it after each individual transfer? Other suggestions?
-
-
-2. libcurl - multi interface
-
-2.1 More non-blocking
-
- Make sure we don't ever loop because of non-blocking sockets returning
- EWOULDBLOCK or similar. Blocking cases include:
-
- - Name resolves on non-windows unless c-ares is used
- - NSS SSL connections
- - HTTP proxy CONNECT operations
- - SOCKS proxy handshakes
- - file:// transfers
- - TELNET transfers
- - The "DONE" operation (post transfer protocol-specific actions) for the
- protocols SFTP, SMTP, FTP. Fixing Curl_done() for this is a worthy task.
-
-2.2 Fix HTTP Pipelining for PUT
-
- HTTP Pipelining can be a way to greatly enhance performance for multiple
- serial requests and currently libcurl only supports that for HEAD and GET
- requests but it should also be possible for PUT.
-
-3. Documentation
-
-3.1 More and better
-
- Exactly
-
-4. FTP
-
-4.1 HOST
-
- HOST is a suggested command in the works for a client to tell which host name
- to use, to offer FTP servers named-based virtual hosting:
-
- http://tools.ietf.org/html/draft-hethmon-mcmurray-ftp-hosts-11
-
-4.2 Alter passive/active on failure and retry
-
- When trying to connect passively to a server which only supports active
- connections, libcurl returns CURLE_FTP_WEIRD_PASV_REPLY and closes the
- connection. There could be a way to fallback to an active connection (and
- vice versa). http://curl.haxx.se/bug/feature.cgi?id=1754793
-
-4.3 Earlier bad letter detection
-
- Make the detection of (bad) %0d and %0a codes in FTP url parts earlier in the
- process to avoid doing a resolve and connect in vain.
-
-4.4 REST for large files
-
- REST fix for servers not behaving well on >2GB requests. This should fail if
- the server doesn't set the pointer to the requested index. The tricky
- (impossible?) part is to figure out if the server did the right thing or not.
-
-4.5 FTP proxy support
-
- Support the most common FTP proxies, Philip Newton provided a list allegedly
- from ncftp. This is not a subject without debate, and is probably not really
- suitable for libcurl. http://curl.haxx.se/mail/archive-2003-04/0126.html
-
-4.6 ASCII support
-
- FTP ASCII transfers do not follow RFC959. They don't convert the data
- accordingly.
-
-5. HTTP
-
-5.1 Better persistency for HTTP 1.0
-
- "Better" support for persistent connections over HTTP 1.0
- http://curl.haxx.se/bug/feature.cgi?id=1089001
-
-5.2 support FF3 sqlite cookie files
-
- Firefox 3 is changing from its former format to a a sqlite database instead.
- We should consider how (lib)curl can/should support this.
- http://curl.haxx.se/bug/feature.cgi?id=1871388
-
-5.3 Rearrange request header order
-
- Server implementors often make an effort to detect browser and to reject
- clients it can detect to not match. One of the last details we cannot yet
- control in libcurl's HTTP requests, which also can be exploited to detect
- that libcurl is in fact used even when it tries to impersonate a browser, is
- the order of the request headers. I propose that we introduce a new option in
- which you give headers a value, and then when the HTTP request is built it
- sorts the headers based on that number. We could then have internally created
- headers use a default value so only headers that need to be moved have to be
- specified.
-
-5.4 HTTP2/SPDY
-
- The first drafts for HTTP2 have been published
- (http://tools.ietf.org/html/draft-ietf-httpbis-http2-03) and is so far based
- on SPDY (http://www.chromium.org/spdy) designs and experiences. Chances are
- it will end up in that style. Chrome and Firefox already support SPDY and
- lots of web services do.
-
- It would make sense to implement SPDY support now and later transition into
- or add HTTP2 support as well.
-
- We should base or HTTP2/SPDY work on a 3rd party library for the protocol
- fiddling. The Spindy library (http://spindly.haxx.se/) was an attempt to make
- such a library with an API suitable for use by libcurl but that effort has
- more or less stalled. spdylay (https://github.com/tatsuhiro-t/spdylay) may
- be a better option, either used directly or wrapped with a more spindly-like
- API.
-
-
-6. TELNET
-
-6.1 ditch stdin
-
-Reading input (to send to the remote server) on stdin is a crappy solution for
-library purposes. We need to invent a good way for the application to be able
-to provide the data to send.
-
-6.2 ditch telnet-specific select
-
- Move the telnet support's network select() loop go away and merge the code
- into the main transfer loop. Until this is done, the multi interface won't
- work for telnet.
-
-6.3 feature negotiation debug data
-
- Add telnet feature negotiation data to the debug callback as header data.
-
-6.4 send data in chunks
-
- Currently, telnet sends data one byte at a time. This is fine for interactive
- use, but inefficient for any other. Sent data should be sent in larger
- chunks.
-
-7. SMTP
-
-7.1 Pipelining
-
- Add support for pipelining emails.
-
-7.2 Graceful base64 decoding failure
-
- Rather than shutting down the session and returning an error when the
- decoding of a base64 encoded authentication response fails, we should
- gracefully shutdown the authentication process by sending a * response to the
- server as per RFC4954.
-
-7.3 Enhanced capability support
-
- Add the ability, for an application that uses libcurl, to obtain the list of
- capabilities returned from the EHLO command.
-
-8. POP3
-
-8.1 Pipelining
-
- Add support for pipelining commands.
-
-8.2 Graceful base64 decoding failure
-
- Rather than shutting down the session and returning an error when the
- decoding of a base64 encoded authentication response fails, we should
- gracefully shutdown the authentication process by sending a * response to the
- server as per RFC5034.
-
-8.3 Enhanced capability support
-
- Add the ability, for an application that uses libcurl, to obtain the list of
- capabilities returned from the CAPA command.
-
-9. IMAP
-
-9.1 Graceful base64 decoding failure
-
- Rather than shutting down the session and returning an error when the
- decoding of a base64 encoded authentication response fails, we should
- gracefully shutdown the authentication process by sending a * response to the
- server as per RFC3501.
-
-9.2 Enhanced capability support
-
- Add the ability, for an application that uses libcurl, to obtain the list of
- capabilities returned from the CAPABILITY command.
-
-10. LDAP
-
-10.1 SASL based authentication mechanisms
-
- Currently the LDAP module only supports ldap_simple_bind_s() in order to bind
- to an LDAP server. However, this function sends username and password details
- using the simple authentication mechanism (as clear text). However, it should
- be possible to use ldap_bind_s() instead specifing the security context
- information ourselves.
-
-11. New protocols
-
-11.1 RSYNC
-
- There's no RFC for the protocol or an URI/URL format. An implementation
- should most probably use an existing rsync library, such as librsync.
-
-12. SSL
-
-12.1 Disable specific versions
-
- Provide an option that allows for disabling specific SSL versions, such as
- SSLv2 http://curl.haxx.se/bug/feature.cgi?id=1767276
-
-12.2 Provide mutex locking API
-
- Provide a libcurl API for setting mutex callbacks in the underlying SSL
- library, so that the same application code can use mutex-locking
- independently of OpenSSL or GnutTLS being used.
-
-12.3 Evaluate SSL patches
-
- Evaluate/apply Gertjan van Wingerde's SSL patches:
- http://curl.haxx.se/mail/lib-2004-03/0087.html
-
-12.4 Cache OpenSSL contexts
-
- "Look at SSL cafile - quick traces look to me like these are done on every
- request as well, when they should only be necessary once per ssl context (or
- once per handle)". The major improvement we can rather easily do is to make
- sure we don't create and kill a new SSL "context" for every request, but
- instead make one for every connection and re-use that SSL context in the same
- style connections are re-used. It will make us use slightly more memory but
- it will libcurl do less creations and deletions of SSL contexts.
-
-12.5 Export session ids
-
- Add an interface to libcurl that enables "session IDs" to get
- exported/imported. Cris Bailiff said: "OpenSSL has functions which can
- serialise the current SSL state to a buffer of your choice, and recover/reset
- the state from such a buffer at a later date - this is used by mod_ssl for
- apache to implement and SSL session ID cache".
-
-12.6 Provide callback for cert verification
-
- OpenSSL supports a callback for customised verification of the peer
- certificate, but this doesn't seem to be exposed in the libcurl APIs. Could
- it be? There's so much that could be done if it were!
-
-12.7 Support other SSL libraries
-
- Make curl's SSL layer capable of using other free SSL libraries. Such as
- MatrixSSL (http://www.matrixssl.org/).
-
-12.8 improve configure --with-ssl
-
- make the configure --with-ssl option first check for OpenSSL, then GnuTLS,
- then NSS...
-
-12.9 Support DANE
-
- DNS-Based Authentication of Named Entities (DANE) is a way to provide SSL
- keys and certs over DNS using DNSSEC as an alternative to the CA model.
- http://www.rfc-editor.org/rfc/rfc6698.txt
-
- An initial patch was posted by Suresh Krishnaswamy on March 7th 2013
- (http://curl.haxx.se/mail/lib-2013-03/0075.html) but it was a too simple
- approach. See Daniel's comments:
- http://curl.haxx.se/mail/lib-2013-03/0103.html . libunbound may be the
- correct library to base this development on.
-
-13. GnuTLS
-
-13.1 SSL engine stuff
-
- Is this even possible?
-
-13.2 check connection
-
- Add a way to check if the connection seems to be alive, to correspond to the
- SSL_peak() way we use with OpenSSL.
-
-14. SASL
-
-14.1 Other authentication mechanisms
-
- Add support for GSSAPI to SMTP, POP3 and IMAP.
-
-15. Client
-
-15.1 sync
-
- "curl --sync http://example.com/feed[1-100].rss" or
- "curl --sync http://example.net/{index,calendar,history}.html"
-
- Downloads a range or set of URLs using the remote name, but only if the
- remote file is newer than the local file. A Last-Modified HTTP date header
- should also be used to set the mod date on the downloaded file.
-
-15.2 glob posts
-
- Globbing support for -d and -F, as in 'curl -d "name=foo[0-9]" URL'.
- This is easily scripted though.
-
-15.3 prevent file overwriting
-
- Add an option that prevents cURL from overwriting existing local files. When
- used, and there already is an existing file with the target file name
- (either -O or -o), a number should be appended (and increased if already
- existing). So that index.html becomes first index.html.1 and then
- index.html.2 etc.
-
-15.4 simultaneous parallel transfers
-
- The client could be told to use maximum N simultaneous parallel transfers and
- then just make sure that happens. It should of course not make more than one
- connection to the same remote host. This would require the client to use the
- multi interface. http://curl.haxx.se/bug/feature.cgi?id=1558595
-
-15.5 provide formpost headers
-
- Extending the capabilities of the multipart formposting. How about leaving
- the ';type=foo' syntax as it is and adding an extra tag (headers) which
- works like this: curl -F "coolfiles=@fil1.txt;headers=@fil1.hdr" where
- fil1.hdr contains extra headers like
-
- Content-Type: text/plain; charset=KOI8-R"
- Content-Transfer-Encoding: base64
- X-User-Comment: Please don't use browser specific HTML code
-
- which should overwrite the program reasonable defaults (plain/text,
- 8bit...)
-
-15.6 url-specific options
-
- Provide a way to make options bound to a specific URL among several on the
- command line. Possibly by letting ':' separate options between URLs,
- similar to this:
-
- curl --data foo --url url.com : \
- --url url2.com : \
- --url url3.com --data foo3
-
- (More details: http://curl.haxx.se/mail/archive-2004-07/0133.html)
-
- The example would do a POST-GET-POST combination on a single command line.
-
-15.7 warning when setting an option
-
- Display a warning when libcurl returns an error when setting an option.
- This can be useful to tell when support for a particular feature hasn't been
- compiled into the library.
-
-15.8 IPv6 addresses with globbing
-
- Currently the command line client needs to get url globbing disabled (with
- -g) for it to support IPv6 numerical addresses. This is a rather silly flaw
- that should be corrected. It probably involves a smarter detection of the
- '[' and ']' letters.
-
-16. Build
-
-16.1 roffit
-
- Consider extending 'roffit' to produce decent ASCII output, and use that
- instead of (g)nroff when building src/tool_hugehelp.c
-
-17. Test suite
-
-17.1 SSL tunnel
-
- Make our own version of stunnel for simple port forwarding to enable HTTPS
- and FTP-SSL tests without the stunnel dependency, and it could allow us to
- provide test tools built with either OpenSSL or GnuTLS
-
-17.2 nicer lacking perl message
-
- If perl wasn't found by the configure script, don't attempt to run the tests
- but explain something nice why it doesn't.
-
-17.3 more protocols supported
-
- Extend the test suite to include more protocols. The telnet could just do ftp
- or http operations (for which we have test servers).
-
-17.4 more platforms supported
-
- Make the test suite work on more platforms. OpenBSD and Mac OS. Remove
- fork()s and it should become even more portable.
-
-18. Next SONAME bump
-
-18.1 http-style HEAD output for ftp
-
- #undef CURL_FTP_HTTPSTYLE_HEAD in lib/ftp.c to remove the HTTP-style headers
- from being output in NOBODY requests over ftp
-
-18.2 combine error codes
-
- Combine some of the error codes to remove duplicates. The original
- numbering should not be changed, and the old identifiers would be
- macroed to the new ones in an CURL_NO_OLDIES section to help with
- backward compatibility.
-
- Candidates for removal and their replacements:
-
- CURLE_FILE_COULDNT_READ_FILE => CURLE_REMOTE_FILE_NOT_FOUND
-
- CURLE_FTP_COULDNT_RETR_FILE => CURLE_REMOTE_FILE_NOT_FOUND
-
- CURLE_FTP_COULDNT_USE_REST => CURLE_RANGE_ERROR
-
- CURLE_FUNCTION_NOT_FOUND => CURLE_FAILED_INIT
-
- CURLE_LDAP_INVALID_URL => CURLE_URL_MALFORMAT
-
- CURLE_TFTP_NOSUCHUSER => CURLE_TFTP_ILLEGAL
-
- CURLE_TFTP_NOTFOUND => CURLE_REMOTE_FILE_NOT_FOUND
-
- CURLE_TFTP_PERM => CURLE_REMOTE_ACCESS_DENIED
-
-18.3 extend CURLOPT_SOCKOPTFUNCTION prototype
-
- The current prototype only provides 'purpose' that tells what the
- connection/socket is for, but not any protocol or similar. It makes it hard
- for applications to differentiate on TCP vs UDP and even HTTP vs FTP and
- similar.
-
-10. Next major release
-
-19.1 cleanup return codes
-
- curl_easy_cleanup() returns void, but curl_multi_cleanup() returns a
- CURLMcode. These should be changed to be the same.
-
-19.2 remove obsolete defines
-
- remove obsolete defines from curl/curl.h
-
-19.3 size_t
-
- make several functions use size_t instead of int in their APIs
-
-19.4 remove several functions
-
- remove the following functions from the public API:
-
- curl_getenv
-
- curl_mprintf (and variations)
-
- curl_strequal
-
- curl_strnequal
-
- They will instead become curlx_ - alternatives. That makes the curl app
- still capable of using them, by building with them from source.
-
- These functions have no purpose anymore:
-
- curl_multi_socket
-
- curl_multi_socket_all
-
-19.5 remove CURLOPT_FAILONERROR
-
- Remove support for CURLOPT_FAILONERROR, it has gotten too kludgy and weird
- internally. Let the app judge success or not for itself.
-
-19.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE
-
- Remove support for a global DNS cache. Anything global is silly, and we
- already offer the share interface for the same functionality but done
- "right".
-
-19.7 remove progress meter from libcurl
-
- The internally provided progress meter output doesn't belong in the library.
- Basically no application wants it (apart from curl) but instead applications
- can and should do their own progress meters using the progress callback.
-
- The progress callback should then be bumped as well to get proper 64bit
- variable types passed to it instead of doubles so that big files work
- correctly.
-
-19.8 remove 'curl_httppost' from public
-
- curl_formadd() was made to fill in a public struct, but the fact that the
- struct is public is never really used by application for their own advantage
- but instead often restricts how the form functions can or can't be modified.
-
- Changing them to return a private handle will benefit the implementation and
- allow us much greater freedoms while still maintining a solid API and ABI.
-
-19.9 have form functions use CURL handle argument
-
- curl_formadd() and curl_formget() both currently have no CURL handle
- argument, but both can use a callback that is set in the easy handle, and
- thus curl_formget() with callback cannot function without first having
- curl_easy_perform() (or similar) called - which is hard to grasp and a design
- mistake.
-
-19.10 Add CURLOPT_MAIL_CLIENT option
-
- Rather than use the URL to specify the mail client string to present in the
- HELO and EHLO commands, libcurl should support a new CURLOPT specifically for
- specifing this data as the URL is non-standard and to be honest a bit of a
- hack ;-)
-
- Please see the following thread for more information:
- http://curl.haxx.se/mail/lib-2012-05/0178.html
-
diff --git a/libs/libcurl/docs/TheArtOfHttpScripting b/libs/libcurl/docs/TheArtOfHttpScripting
deleted file mode 100644
index b0dab5ff2c..0000000000
--- a/libs/libcurl/docs/TheArtOfHttpScripting
+++ /dev/null
@@ -1,507 +0,0 @@
-Online: http://curl.haxx.se/docs/httpscripting.html
-Date: Jan 19, 2011
-
- The Art Of Scripting HTTP Requests Using Curl
- =============================================
-
- This document will assume that you're familiar with HTML and general
- networking.
-
- The possibility to write scripts is essential to make a good computer
- system. Unix' capability to be extended by shell scripts and various tools to
- run various automated commands and scripts is one reason why it has succeeded
- so well.
-
- The increasing amount of applications moving to the web has made "HTTP
- Scripting" more frequently requested and wanted. To be able to automatically
- extract information from the web, to fake users, to post or upload data to
- web servers are all important tasks today.
-
- Curl is a command line tool for doing all sorts of URL manipulations and
- transfers, but this particular document will focus on how to use it when
- doing HTTP requests for fun and profit. I'll assume that you know how to
- invoke 'curl --help' or 'curl --manual' to get basic information about it.
-
- Curl is not written to do everything for you. It makes the requests, it gets
- the data, it sends data and it retrieves the information. You probably need
- to glue everything together using some kind of script language or repeated
- manual invokes.
-
-1. The HTTP Protocol
-
- HTTP is the protocol used to fetch data from web servers. It is a very simple
- protocol that is built upon TCP/IP. The protocol also allows information to
- get sent to the server from the client using a few different methods, as will
- be shown here.
-
- HTTP is plain ASCII text lines being sent by the client to a server to
- request a particular action, and then the server replies a few text lines
- before the actual requested content is sent to the client.
-
- The client, curl, sends a HTTP request. The request contains a method (like
- GET, POST, HEAD etc), a number of request headers and sometimes a request
- body. The HTTP server responds with a status line (indicating if things went
- well), response headers and most often also a response body. The "body" part
- is the plain data you requested, like the actual HTML or the image etc.
-
- 1.1 See the Protocol
-
- Using curl's option --verbose (-v as a short option) will display what kind
- of commands curl sends to the server, as well as a few other informational
- texts.
-
- --verbose is the single most useful option when it comes to debug or even
- understand the curl<->server interaction.
-
- Sometimes even --verbose is not enough. Then --trace and --trace-ascii offer
- even more details as they show EVERYTHING curl sends and receives. Use it
- like this:
-
- curl --trace-ascii debugdump.txt http://www.example.com/
-
-2. URL
-
- The Uniform Resource Locator format is how you specify the address of a
- particular resource on the Internet. You know these, you've seen URLs like
- http://curl.haxx.se or https://yourbank.com a million times.
-
-3. GET a page
-
- The simplest and most common request/operation made using HTTP is to get a
- URL. The URL could itself refer to a web page, an image or a file. The client
- issues a GET request to the server and receives the document it asked for.
- If you issue the command line
-
- curl http://curl.haxx.se
-
- you get a web page returned in your terminal window. The entire HTML document
- that that URL holds.
-
- All HTTP replies contain a set of response headers that are normally hidden,
- use curl's --include (-i) option to display them as well as the rest of the
- document. You can also ask the remote server for ONLY the headers by using
- the --head (-I) option (which will make curl issue a HEAD request).
-
-4. Forms
-
- Forms are the general way a web site can present a HTML page with fields for
- the user to enter data in, and then press some kind of 'OK' or 'submit'
- button to get that data sent to the server. The server then typically uses
- the posted data to decide how to act. Like using the entered words to search
- in a database, or to add the info in a bug track system, display the entered
- address on a map or using the info as a login-prompt verifying that the user
- is allowed to see what it is about to see.
-
- Of course there has to be some kind of program in the server end to receive
- the data you send. You cannot just invent something out of the air.
-
- 4.1 GET
-
- A GET-form uses the method GET, as specified in HTML like:
-
- <form method="GET" action="junk.cgi">
- <input type=text name="birthyear">
- <input type=submit name=press value="OK">
- </form>
-
- In your favorite browser, this form will appear with a text box to fill in
- and a press-button labeled "OK". If you fill in '1905' and press the OK
- button, your browser will then create a new URL to get for you. The URL will
- get "junk.cgi?birthyear=1905&press=OK" appended to the path part of the
- previous URL.
-
- If the original form was seen on the page "www.hotmail.com/when/birth.html",
- the second page you'll get will become
- "www.hotmail.com/when/junk.cgi?birthyear=1905&press=OK".
-
- Most search engines work this way.
-
- To make curl do the GET form post for you, just enter the expected created
- URL:
-
- curl "http://www.hotmail.com/when/junk.cgi?birthyear=1905&press=OK"
-
- 4.2 POST
-
- The GET method makes all input field names get displayed in the URL field of
- your browser. That's generally a good thing when you want to be able to
- bookmark that page with your given data, but it is an obvious disadvantage
- if you entered secret information in one of the fields or if there are a
- large amount of fields creating a very long and unreadable URL.
-
- The HTTP protocol then offers the POST method. This way the client sends the
- data separated from the URL and thus you won't see any of it in the URL
- address field.
-
- The form would look very similar to the previous one:
-
- <form method="POST" action="junk.cgi">
- <input type=text name="birthyear">
- <input type=submit name=press value=" OK ">
- </form>
-
- And to use curl to post this form with the same data filled in as before, we
- could do it like:
-
- curl --data "birthyear=1905&press=%20OK%20" \
- http://www.example.com/when.cgi
-
- This kind of POST will use the Content-Type
- application/x-www-form-urlencoded and is the most widely used POST kind.
-
- The data you send to the server MUST already be properly encoded, curl will
- not do that for you. For example, if you want the data to contain a space,
- you need to replace that space with %20 etc. Failing to comply with this
- will most likely cause your data to be received wrongly and messed up.
-
- Recent curl versions can in fact url-encode POST data for you, like this:
-
- curl --data-urlencode "name=I am Daniel" http://www.example.com
-
- 4.3 File Upload POST
-
- Back in late 1995 they defined an additional way to post data over HTTP. It
- is documented in the RFC 1867, why this method sometimes is referred to as
- RFC1867-posting.
-
- This method is mainly designed to better support file uploads. A form that
- allows a user to upload a file could be written like this in HTML:
-
- <form method="POST" enctype='multipart/form-data' action="upload.cgi">
- <input type=file name=upload>
- <input type=submit name=press value="OK">
- </form>
-
- This clearly shows that the Content-Type about to be sent is
- multipart/form-data.
-
- To post to a form like this with curl, you enter a command line like:
-
- curl --form upload=@localfilename --form press=OK [URL]
-
- 4.4 Hidden Fields
-
- A very common way for HTML based application to pass state information
- between pages is to add hidden fields to the forms. Hidden fields are
- already filled in, they aren't displayed to the user and they get passed
- along just as all the other fields.
-
- A similar example form with one visible field, one hidden field and one
- submit button could look like:
-
- <form method="POST" action="foobar.cgi">
- <input type=text name="birthyear">
- <input type=hidden name="person" value="daniel">
- <input type=submit name="press" value="OK">
- </form>
-
- To post this with curl, you won't have to think about if the fields are
- hidden or not. To curl they're all the same:
-
- curl --data "birthyear=1905&press=OK&person=daniel" [URL]
-
- 4.5 Figure Out What A POST Looks Like
-
- When you're about fill in a form and send to a server by using curl instead
- of a browser, you're of course very interested in sending a POST exactly the
- way your browser does.
-
- An easy way to get to see this, is to save the HTML page with the form on
- your local disk, modify the 'method' to a GET, and press the submit button
- (you could also change the action URL if you want to).
-
- You will then clearly see the data get appended to the URL, separated with a
- '?'-letter as GET forms are supposed to.
-
-5. PUT
-
- The perhaps best way to upload data to a HTTP server is to use PUT. Then
- again, this of course requires that someone put a program or script on the
- server end that knows how to receive a HTTP PUT stream.
-
- Put a file to a HTTP server with curl:
-
- curl --upload-file uploadfile http://www.example.com/receive.cgi
-
-6. HTTP Authentication
-
- HTTP Authentication is the ability to tell the server your username and
- password so that it can verify that you're allowed to do the request you're
- doing. The Basic authentication used in HTTP (which is the type curl uses by
- default) is *plain* *text* based, which means it sends username and password
- only slightly obfuscated, but still fully readable by anyone that sniffs on
- the network between you and the remote server.
-
- To tell curl to use a user and password for authentication:
-
- curl --user name:password http://www.example.com
-
- The site might require a different authentication method (check the headers
- returned by the server), and then --ntlm, --digest, --negotiate or even
- --anyauth might be options that suit you.
-
- Sometimes your HTTP access is only available through the use of a HTTP
- proxy. This seems to be especially common at various companies. A HTTP proxy
- may require its own user and password to allow the client to get through to
- the Internet. To specify those with curl, run something like:
-
- curl --proxy-user proxyuser:proxypassword curl.haxx.se
-
- If your proxy requires the authentication to be done using the NTLM method,
- use --proxy-ntlm, if it requires Digest use --proxy-digest.
-
- If you use any one these user+password options but leave out the password
- part, curl will prompt for the password interactively.
-
- Do note that when a program is run, its parameters might be possible to see
- when listing the running processes of the system. Thus, other users may be
- able to watch your passwords if you pass them as plain command line
- options. There are ways to circumvent this.
-
- It is worth noting that while this is how HTTP Authentication works, very
- many web sites will not use this concept when they provide logins etc. See
- the Web Login chapter further below for more details on that.
-
-7. Referer
-
- A HTTP request may include a 'referer' field (yes it is misspelled), which
- can be used to tell from which URL the client got to this particular
- resource. Some programs/scripts check the referer field of requests to verify
- that this wasn't arriving from an external site or an unknown page. While
- this is a stupid way to check something so easily forged, many scripts still
- do it. Using curl, you can put anything you want in the referer-field and
- thus more easily be able to fool the server into serving your request.
-
- Use curl to set the referer field with:
-
- curl --referer http://www.example.come http://www.example.com
-
-8. User Agent
-
- Very similar to the referer field, all HTTP requests may set the User-Agent
- field. It names what user agent (client) that is being used. Many
- applications use this information to decide how to display pages. Silly web
- programmers try to make different pages for users of different browsers to
- make them look the best possible for their particular browsers. They usually
- also do different kinds of javascript, vbscript etc.
-
- At times, you will see that getting a page with curl will not return the same
- page that you see when getting the page with your browser. Then you know it
- is time to set the User Agent field to fool the server into thinking you're
- one of those browsers.
-
- To make curl look like Internet Explorer 5 on a Windows 2000 box:
-
- curl --user-agent "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" [URL]
-
- Or why not look like you're using Netscape 4.73 on an old Linux box:
-
- curl --user-agent "Mozilla/4.73 [en] (X11; U; Linux 2.2.15 i686)" [URL]
-
-9. Redirects
-
- When a resource is requested from a server, the reply from the server may
- include a hint about where the browser should go next to find this page, or a
- new page keeping newly generated output. The header that tells the browser
- to redirect is Location:.
-
- Curl does not follow Location: headers by default, but will simply display
- such pages in the same manner it display all HTTP replies. It does however
- feature an option that will make it attempt to follow the Location: pointers.
-
- To tell curl to follow a Location:
-
- curl --location http://www.example.com
-
- If you use curl to POST to a site that immediately redirects you to another
- page, you can safely use --location (-L) and --data/--form together. Curl will
- only use POST in the first request, and then revert to GET in the following
- operations.
-
-10. Cookies
-
- The way the web browsers do "client side state control" is by using
- cookies. Cookies are just names with associated contents. The cookies are
- sent to the client by the server. The server tells the client for what path
- and host name it wants the cookie sent back, and it also sends an expiration
- date and a few more properties.
-
- When a client communicates with a server with a name and path as previously
- specified in a received cookie, the client sends back the cookies and their
- contents to the server, unless of course they are expired.
-
- Many applications and servers use this method to connect a series of requests
- into a single logical session. To be able to use curl in such occasions, we
- must be able to record and send back cookies the way the web application
- expects them. The same way browsers deal with them.
-
- The simplest way to send a few cookies to the server when getting a page with
- curl is to add them on the command line like:
-
- curl --cookie "name=Daniel" http://www.example.com
-
- Cookies are sent as common HTTP headers. This is practical as it allows curl
- to record cookies simply by recording headers. Record cookies with curl by
- using the --dump-header (-D) option like:
-
- curl --dump-header headers_and_cookies http://www.example.com
-
- (Take note that the --cookie-jar option described below is a better way to
- store cookies.)
-
- Curl has a full blown cookie parsing engine built-in that comes to use if you
- want to reconnect to a server and use cookies that were stored from a
- previous connection (or handicrafted manually to fool the server into
- believing you had a previous connection). To use previously stored cookies,
- you run curl like:
-
- curl --cookie stored_cookies_in_file http://www.example.com
-
- Curl's "cookie engine" gets enabled when you use the --cookie option. If you
- only want curl to understand received cookies, use --cookie with a file that
- doesn't exist. Example, if you want to let curl understand cookies from a
- page and follow a location (and thus possibly send back cookies it received),
- you can invoke it like:
-
- curl --cookie nada --location http://www.example.com
-
- Curl has the ability to read and write cookie files that use the same file
- format that Netscape and Mozilla do. It is a convenient way to share cookies
- between browsers and automatic scripts. The --cookie (-b) switch
- automatically detects if a given file is such a cookie file and parses it,
- and by using the --cookie-jar (-c) option you'll make curl write a new cookie
- file at the end of an operation:
-
- curl --cookie cookies.txt --cookie-jar newcookies.txt \
- http://www.example.com
-
-11. HTTPS
-
- There are a few ways to do secure HTTP transfers. The by far most common
- protocol for doing this is what is generally known as HTTPS, HTTP over
- SSL. SSL encrypts all the data that is sent and received over the network and
- thus makes it harder for attackers to spy on sensitive information.
-
- SSL (or TLS as the latest version of the standard is called) offers a
- truckload of advanced features to allow all those encryptions and key
- infrastructure mechanisms encrypted HTTP requires.
-
- Curl supports encrypted fetches thanks to the freely available OpenSSL
- libraries. To get a page from a HTTPS server, simply run curl like:
-
- curl https://secure.example.com
-
- 11.1 Certificates
-
- In the HTTPS world, you use certificates to validate that you are the one
- you claim to be, as an addition to normal passwords. Curl supports client-
- side certificates. All certificates are locked with a pass phrase, which you
- need to enter before the certificate can be used by curl. The pass phrase
- can be specified on the command line or if not, entered interactively when
- curl queries for it. Use a certificate with curl on a HTTPS server like:
-
- curl --cert mycert.pem https://secure.example.com
-
- curl also tries to verify that the server is who it claims to be, by
- verifying the server's certificate against a locally stored CA cert
- bundle. Failing the verification will cause curl to deny the connection. You
- must then use --insecure (-k) in case you want to tell curl to ignore that
- the server can't be verified.
-
- More about server certificate verification and ca cert bundles can be read
- in the SSLCERTS document, available online here:
-
- http://curl.haxx.se/docs/sslcerts.html
-
-12. Custom Request Elements
-
- Doing fancy stuff, you may need to add or change elements of a single curl
- request.
-
- For example, you can change the POST request to a PROPFIND and send the data
- as "Content-Type: text/xml" (instead of the default Content-Type) like this:
-
- curl --data "<xml>" --header "Content-Type: text/xml" \
- --request PROPFIND url.com
-
- You can delete a default header by providing one without content. Like you
- can ruin the request by chopping off the Host: header:
-
- curl --header "Host:" http://www.example.com
-
- You can add headers the same way. Your server may want a "Destination:"
- header, and you can add it:
-
- curl --header "Destination: http://nowhere" http://example.com
-
-13. Web Login
-
- While not strictly just HTTP related, it still cause a lot of people problems
- so here's the executive run-down of how the vast majority of all login forms
- work and how to login to them using curl.
-
- It can also be noted that to do this properly in an automated fashion, you
- will most certainly need to script things and do multiple curl invokes etc.
-
- First, servers mostly use cookies to track the logged-in status of the
- client, so you will need to capture the cookies you receive in the
- responses. Then, many sites also set a special cookie on the login page (to
- make sure you got there through their login page) so you should make a habit
- of first getting the login-form page to capture the cookies set there.
-
- Some web-based login systems features various amounts of javascript, and
- sometimes they use such code to set or modify cookie contents. Possibly they
- do that to prevent programmed logins, like this manual describes how to...
- Anyway, if reading the code isn't enough to let you repeat the behavior
- manually, capturing the HTTP requests done by your browers and analyzing the
- sent cookies is usually a working method to work out how to shortcut the
- javascript need.
-
- In the actual <form> tag for the login, lots of sites fill-in random/session
- or otherwise secretly generated hidden tags and you may need to first capture
- the HTML code for the login form and extract all the hidden fields to be able
- to do a proper login POST. Remember that the contents need to be URL encoded
- when sent in a normal POST.
-
-14. Debug
-
- Many times when you run curl on a site, you'll notice that the site doesn't
- seem to respond the same way to your curl requests as it does to your
- browser's.
-
- Then you need to start making your curl requests more similar to your
- browser's requests:
-
- * Use the --trace-ascii option to store fully detailed logs of the requests
- for easier analyzing and better understanding
-
- * Make sure you check for and use cookies when needed (both reading with
- --cookie and writing with --cookie-jar)
-
- * Set user-agent to one like a recent popular browser does
-
- * Set referer like it is set by the browser
-
- * If you use POST, make sure you send all the fields and in the same order as
- the browser does it. (See chapter 4.5 above)
-
- A very good helper to make sure you do this right, is the LiveHTTPHeader tool
- that lets you view all headers you send and receive with Mozilla/Firefox
- (even when using HTTPS).
-
- A more raw approach is to capture the HTTP traffic on the network with tools
- such as ethereal or tcpdump and check what headers that were sent and
- received by the browser. (HTTPS makes this technique inefficient.)
-
-15. References
-
- RFC 2616 is a must to read if you want in-depth understanding of the HTTP
- protocol.
-
- RFC 3986 explains the URL syntax.
-
- RFC 2109 defines how cookies are supposed to work.
-
- RFC 1867 defines the HTTP post upload format.
-
- http://curl.haxx.se is the home of the cURL project
diff --git a/libs/libcurl/docs/VERSIONS b/libs/libcurl/docs/VERSIONS
deleted file mode 100644
index 0670089bdb..0000000000
--- a/libs/libcurl/docs/VERSIONS
+++ /dev/null
@@ -1,60 +0,0 @@
- _ _ ____ _
- ___| | | | _ \| |
- / __| | | | |_) | |
- | (__| |_| | _ <| |___
- \___|\___/|_| \_\_____|
-
-Version Numbers and Releases
-
- Curl is not only curl. Curl is also libcurl. They're actually individually
- versioned, but they mostly follow each other rather closely.
-
- The version numbering is always built up using the same system:
-
- X.Y[.Z]
-
- Where
- X is main version number
- Y is release number
- Z is patch number
-
- One of these numbers will get bumped in each new release. The numbers to the
- right of a bumped number will be reset to zero. If Z is zero, it may not be
- included in the version number.
-
- The main version number will get bumped when *really* big, world colliding
- changes are made. The release number is bumped when changes are performed or
- things/features are added. The patch number is bumped when the changes are
- mere bugfixes.
-
- It means that after release 1.2.3, we can release 2.0 if something really big
- has been made, 1.3 if not that big changes were made or 1.2.4 if mostly bugs
- were fixed.
-
- Bumping, as in increasing the number with 1, is unconditionally only
- affecting one of the numbers (except the ones to the right of it, that may be
- set to zero). 1 becomes 2, 3 becomes 4, 9 becomes 10, 88 becomes 89 and 99
- becomes 100. So, after 1.2.9 comes 1.2.10. After 3.99.3, 3.100 might come.
-
- All original curl source release archives are named according to the libcurl
- version (not according to the curl client version that, as said before, might
- differ).
-
- As a service to any application that might want to support new libcurl
- features while still being able to build with older versions, all releases
- have the libcurl version stored in the curl/curlver.h file using a static
- numbering scheme that can be used for comparison. The version number is
- defined as:
-
- #define LIBCURL_VERSION_NUM 0xXXYYZZ
-
- Where XX, YY and ZZ are the main version, release and patch numbers in
- hexadecimal. All three number fields are always represented using two digits
- (eight bits each). 1.2 would appear as "0x010200" while version 9.11.7
- appears as "0x090b07".
-
- This 6-digit hexadecimal number is always a greater number in a more recent
- release. It makes comparisons with greater than and less than work.
-
- This number is also available as three separate defines:
- LIBCURL_VERSION_MAJOR, LIBCURL_VERSION_MINOR and LIBCURL_VERSION_PATCH.
diff --git a/libs/libcurl/docs/curl-config.1 b/libs/libcurl/docs/curl-config.1
deleted file mode 100644
index 14a9d2ba87..0000000000
--- a/libs/libcurl/docs/curl-config.1
+++ /dev/null
@@ -1,98 +0,0 @@
-.\" **************************************************************************
-.\" * _ _ ____ _
-.\" * Project ___| | | | _ \| |
-.\" * / __| | | | |_) | |
-.\" * | (__| |_| | _ <| |___
-.\" * \___|\___/|_| \_\_____|
-.\" *
-.\" * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
-.\" *
-.\" * This software is licensed as described in the file COPYING, which
-.\" * you should have received as part of this distribution. The terms
-.\" * are also available at http://curl.haxx.se/docs/copyright.html.
-.\" *
-.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
-.\" * copies of the Software, and permit persons to whom the Software is
-.\" * furnished to do so, under the terms of the COPYING file.
-.\" *
-.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
-.\" * KIND, either express or implied.
-.\" *
-.\" **************************************************************************
-.\"
-.TH curl-config 1 "25 Oct 2007" "Curl 7.17.1" "curl-config manual"
-.SH NAME
-curl-config \- Get information about a libcurl installation
-.SH SYNOPSIS
-.B curl-config [options]
-.SH DESCRIPTION
-.B curl-config
-displays information about the curl and libcurl installation.
-.SH OPTIONS
-.IP "--ca"
-Displays the built-in path to the CA cert bundle this libcurl uses.
-.IP "--cc"
-Displays the compiler used to build libcurl.
-.IP "--cflags"
-Set of compiler options (CFLAGS) to use when compiling files that use
-libcurl. Currently that is only the include path to the curl include files.
-.IP "--checkfor [version]"
-Specify the oldest possible libcurl version string you want, and this
-script will return 0 if the current installation is new enough or it
-returns 1 and outputs a text saying that the current version is not new
-enough. (Added in 7.15.4)
-.IP "--configure"
-Displays the arguments given to configure when building curl.
-.IP "--feature"
-Lists what particular main features the installed libcurl was built with. At
-the time of writing, this list may include SSL, KRB4 or IPv6. Do not assume
-any particular order. The keywords will be separated by newlines. There may be
-none, one, or several keywords in the list.
-.IP "--help"
-Displays the available options.
-.IP "--libs"
-Shows the complete set of libs and other linker options you will need in order
-to link your application with libcurl.
-.IP "--prefix"
-This is the prefix used when libcurl was installed. Libcurl is then installed
-in $prefix/lib and its header files are installed in $prefix/include and so
-on. The prefix is set with "configure --prefix".
-.IP "--protocols"
-Lists what particular protocols the installed libcurl was built to support. At
-the time of writing, this list may include HTTP, HTTPS, FTP, FTPS, FILE,
-TELNET, LDAP, DICT. Do not assume any particular order. The protocols will
-be listed using uppercase and are separated by newlines. There may be none,
-one, or several protocols in the list. (Added in 7.13.0)
-.IP "--static-libs"
-Shows the complete set of libs and other linker options you will need in order
-to link your application with libcurl statically. (Added in 7.17.1)
-.IP "--version"
-Outputs version information about the installed libcurl.
-.IP "--vernum"
-Outputs version information about the installed libcurl, in numerical mode.
-This outputs the version number, in hexadecimal, with 8 bits for each part;
-major, minor, patch. So that libcurl 7.7.4 would appear as 070704 and libcurl
-12.13.14 would appear as 0c0d0e... Note that the initial zero might be
-omitted. (This option was broken in the 7.15.0 release.)
-.SH "EXAMPLES"
-What linker options do I need when I link with libcurl?
-
- $ curl-config --libs
-
-What compiler options do I need when I compile using libcurl functions?
-
- $ curl-config --cflags
-
-How do I know if libcurl was built with SSL support?
-
- $ curl-config --feature | grep SSL
-
-What's the installed libcurl version?
-
- $ curl-config --version
-
-How do I build a single file with a one-line command?
-
- $ `curl-config --cc --cflags` -o example example.c `curl-config --libs`
-.SH "SEE ALSO"
-.BR curl (1)
diff --git a/libs/libcurl/docs/curl-config.html b/libs/libcurl/docs/curl-config.html
deleted file mode 100644
index 1563d548b9..0000000000
--- a/libs/libcurl/docs/curl-config.html
+++ /dev/null
@@ -1,91 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html><head>
-<title>curl-config man page</title>
-<meta name="generator" content="roffit">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl-config - Get information about a libcurl installation <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">curl-config [options]</span> <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0"><span Class="bold">curl-config</span> displays information about the curl and libcurl installation. <a name="OPTIONS"></a><h2 class="nroffsh">OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="--ca"></a><span class="nroffip">--ca</span>
-<p class="level1">Displays the built-in path to the CA cert bundle this libcurl uses.
-<p class="level0"><a name="--cc"></a><span class="nroffip">--cc</span>
-<p class="level1">Displays the compiler used to build libcurl.
-<p class="level0"><a name="--cflags"></a><span class="nroffip">--cflags</span>
-<p class="level1">Set of compiler options (CFLAGS) to use when compiling files that use libcurl. Currently that is only the include path to the curl include files.
-<p class="level0"><a name="--checkfor"></a><span class="nroffip">--checkfor [version]</span>
-<p class="level1">Specify the oldest possible libcurl version string you want, and this script will return 0 if the current installation is new enough or it returns 1 and outputs a text saying that the current version is not new enough. (Added in 7.15.4)
-<p class="level0"><a name="--configure"></a><span class="nroffip">--configure</span>
-<p class="level1">Displays the arguments given to configure when building curl.
-<p class="level0"><a name="--feature"></a><span class="nroffip">--feature</span>
-<p class="level1">Lists what particular main features the installed libcurl was built with. At the time of writing, this list may include SSL, KRB4 or IPv6. Do not assume any particular order. The keywords will be separated by newlines. There may be none, one, or several keywords in the list.
-<p class="level0"><a name="--help"></a><span class="nroffip">--help</span>
-<p class="level1">Displays the available options.
-<p class="level0"><a name="--libs"></a><span class="nroffip">--libs</span>
-<p class="level1">Shows the complete set of libs and other linker options you will need in order to link your application with libcurl.
-<p class="level0"><a name="--prefix"></a><span class="nroffip">--prefix</span>
-<p class="level1">This is the prefix used when libcurl was installed. Libcurl is then installed in $prefix/lib and its header files are installed in $prefix/include and so on. The prefix is set with "configure --prefix".
-<p class="level0"><a name="--protocols"></a><span class="nroffip">--protocols</span>
-<p class="level1">Lists what particular protocols the installed libcurl was built to support. At the time of writing, this list may include HTTP, HTTPS, FTP, FTPS, FILE, TELNET, LDAP, DICT. Do not assume any particular order. The protocols will be listed using uppercase and are separated by newlines. There may be none, one, or several protocols in the list. (Added in 7.13.0)
-<p class="level0"><a name="--static-libs"></a><span class="nroffip">--static-libs</span>
-<p class="level1">Shows the complete set of libs and other linker options you will need in order to link your application with libcurl statically. (Added in 7.17.1)
-<p class="level0"><a name="--version"></a><span class="nroffip">--version</span>
-<p class="level1">Outputs version information about the installed libcurl.
-<p class="level0"><a name="--vernum"></a><span class="nroffip">--vernum</span>
-<p class="level1">Outputs version information about the installed libcurl, in numerical mode. This outputs the version number, in hexadecimal, with 8 bits for each part; major, minor, patch. So that libcurl 7.7.4 would appear as 070704 and libcurl 12.13.14 would appear as 0c0d0e... Note that the initial zero might be omitted. (This option was broken in the 7.15.0 release.) <a name="EXAMPLES"></a><h2 class="nroffsh">EXAMPLES</h2>
-<p class="level0">What linker options do I need when I link with libcurl?
-<p class="level0">&nbsp; $ curl-config --libs
-<p class="level0">What compiler options do I need when I compile using libcurl functions?
-<p class="level0">&nbsp; $ curl-config --cflags
-<p class="level0">How do I know if libcurl was built with SSL support?
-<p class="level0">&nbsp; $ curl-config --feature | grep SSL
-<p class="level0">What's the installed libcurl version?
-<p class="level0">&nbsp; $ curl-config --version
-<p class="level0">How do I build a single file with a one-line command?
-<p class="level0">&nbsp; $ `curl-config --cc --cflags` -o example example.c `curl-config --libs` <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><span Class="manpage">curl (1)</span> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/libs/libcurl/docs/curl-config.pdf b/libs/libcurl/docs/curl-config.pdf
deleted file mode 100644
index 0d0d994246..0000000000
--- a/libs/libcurl/docs/curl-config.pdf
+++ /dev/null
Binary files differ
diff --git a/libs/libcurl/docs/curl.1 b/libs/libcurl/docs/curl.1
deleted file mode 100644
index 30ef4ccf6f..0000000000
--- a/libs/libcurl/docs/curl.1
+++ /dev/null
@@ -1,2070 +0,0 @@
-.\" **************************************************************************
-.\" * _ _ ____ _
-.\" * Project ___| | | | _ \| |
-.\" * / __| | | | |_) | |
-.\" * | (__| |_| | _ <| |___
-.\" * \___|\___/|_| \_\_____|
-.\" *
-.\" * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
-.\" *
-.\" * This software is licensed as described in the file COPYING, which
-.\" * you should have received as part of this distribution. The terms
-.\" * are also available at http://curl.haxx.se/docs/copyright.html.
-.\" *
-.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
-.\" * copies of the Software, and permit persons to whom the Software is
-.\" * furnished to do so, under the terms of the COPYING file.
-.\" *
-.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
-.\" * KIND, either express or implied.
-.\" *
-.\" **************************************************************************
-.\"
-.TH curl 1 "27 July 2012" "Curl 7.27.0" "Curl Manual"
-.SH NAME
-curl \- transfer a URL
-.SH SYNOPSIS
-.B curl [options]
-.I [URL...]
-.SH DESCRIPTION
-.B curl
-is a tool to transfer data from or to a server, using one of the supported
-protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP,
-LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP). The
-command is designed to work without user interaction.
-
-curl offers a busload of useful tricks like proxy support, user
-authentication, FTP upload, HTTP post, SSL connections, cookies, file transfer
-resume, Metalink, and more. As you will see below, the number of features will
-make your head spin!
-
-curl is powered by libcurl for all transfer-related features. See
-.BR libcurl (3)
-for details.
-.SH URL
-The URL syntax is protocol-dependent. You'll find a detailed description in
-RFC 3986.
-
-You can specify multiple URLs or parts of URLs by writing part sets within
-braces as in:
-
- http://site.{one,two,three}.com
-
-or you can get sequences of alphanumeric series by using [] as in:
-
- ftp://ftp.numericals.com/file[1-100].txt
- ftp://ftp.numericals.com/file[001-100].txt (with leading zeros)
- ftp://ftp.letters.com/file[a-z].txt
-
-Nested sequences are not supported, but you can use several ones next to each
-other:
-
- http://any.org/archive[1996-1999]/vol[1-4]/part{a,b,c}.html
-
-You can specify any amount of URLs on the command line. They will be fetched
-in a sequential manner in the specified order.
-
-You can specify a step counter for the ranges to get every Nth number or
-letter:
-
- http://www.numericals.com/file[1-100:10].txt
- http://www.letters.com/file[a-z:2].txt
-
-If you specify URL without protocol:// prefix, curl will attempt to guess what
-protocol you might want. It will then default to HTTP but try other protocols
-based on often-used host name prefixes. For example, for host names starting
-with "ftp." curl will assume you want to speak FTP.
-
-curl will do its best to use what you pass to it as a URL. It is not trying to
-validate it as a syntactically correct URL by any means but is instead
-\fBvery\fP liberal with what it accepts.
-
-curl will attempt to re-use connections for multiple file transfers, so that
-getting many files from the same server will not do multiple connects /
-handshakes. This improves speed. Of course this is only done on files
-specified on a single command line and cannot be used between separate curl
-invokes.
-.SH "PROGRESS METER"
-curl normally displays a progress meter during operations, indicating the
-amount of transferred data, transfer speeds and estimated time left, etc.
-
-curl displays this data to the terminal by default, so if you invoke curl to
-do an operation and it is about to write data to the terminal, it
-\fIdisables\fP the progress meter as otherwise it would mess up the output
-mixing progress meter and response data.
-
-If you want a progress meter for HTTP POST or PUT requests, you need to
-redirect the response output to a file, using shell redirect (>), -o [file] or
-similar.
-
-It is not the same case for FTP upload as that operation does not spit out
-any response data to the terminal.
-
-If you prefer a progress "bar" instead of the regular meter, \fI-#\fP is your
-friend.
-.SH OPTIONS
-Options start with one or two dashes. Many of the options require an addition
-value next to it.
-
-The short "single-dash" form of the options, -d for example, may be used with
-or without a space between it and its value, although a space is a recommended
-separator. The long "double-dash" form, --data for example, requires a space
-between it and its value.
-
-Short version options that don't need any additional values can be used
-immediately next to each other, like for example you can specify all the
-options -O, -L and -v at once as -OLv.
-
-In general, all boolean options are enabled with --\fBoption\fP and yet again
-disabled with --\fBno-\fPoption. That is, you use the exact same option name
-but prefix it with "no-". However, in this list we mostly only list and show
-the --option version of them. (This concept with --no options was added in
-7.19.0. Previously most options were toggled on/off on repeated use of the
-same command line option.)
-.IP "-#, --progress-bar"
-Make curl display progress as a simple progress bar instead of the standard,
-more informational, meter.
-.IP "-0, --http1.0"
-(HTTP) Tells curl to use HTTP version 1.0 instead of using its internally
-preferred: HTTP 1.1.
-.IP "--http1.1"
-(HTTP) Tells curl to use HTTP version 1.1. This is the internal default
-version. (Added in 7.33.0)
-.IP "--http2.0"
-(HTTP) Tells curl to issue its requests using HTTP 2.0. This requires that the
-underlying libcurl was built to support it. (Added in 7.33.0)
-.IP "-1, --tlsv1"
-(SSL)
-Forces curl to use TLS version 1 when negotiating with a remote TLS server.
-.IP "-2, --sslv2"
-(SSL)
-Forces curl to use SSL version 2 when negotiating with a remote SSL server.
-.IP "-3, --sslv3"
-(SSL)
-Forces curl to use SSL version 3 when negotiating with a remote SSL server.
-.IP "-4, --ipv4"
-If curl is capable of resolving an address to multiple IP versions (which it
-is if it is IPv6-capable), this option tells curl to resolve names to IPv4
-addresses only.
-.IP "-6, --ipv6"
-If curl is capable of resolving an address to multiple IP versions (which it
-is if it is IPv6-capable), this option tells curl to resolve names to IPv6
-addresses only.
-.IP "-a, --append"
-(FTP/SFTP) When used in an upload, this will tell curl to append to the target
-file instead of overwriting it. If the file doesn't exist, it will be created.
-Note that this flag is ignored by some SSH servers (including OpenSSH).
-.IP "-A, --user-agent <agent string>"
-(HTTP) Specify the User-Agent string to send to the HTTP server. Some badly
-done CGIs fail if this field isn't set to "Mozilla/4.0". To encode blanks in
-the string, surround the string with single quote marks. This can also be set
-with the \fI-H, --header\fP option of course.
-
-If this option is used several times, the last one will be used.
-.IP "--anyauth"
-(HTTP) Tells curl to figure out authentication method by itself, and use the
-most secure one the remote site claims to support. This is done by first
-doing a request and checking the response-headers, thus possibly inducing an
-extra network round-trip. This is used instead of setting a specific
-authentication method, which you can do with \fI--basic\fP, \fI--digest\fP,
-\fI--ntlm\fP, and \fI--negotiate\fP.
-
-Note that using --anyauth is not recommended if you do uploads from stdin,
-since it may require data to be sent twice and then the client must be able to
-rewind. If the need should arise when uploading from stdin, the upload
-operation will fail.
-.IP "-b, --cookie <name=data>"
-(HTTP)
-Pass the data to the HTTP server as a cookie. It is supposedly the
-data previously received from the server in a "Set-Cookie:" line.
-The data should be in the format "NAME1=VALUE1; NAME2=VALUE2".
-
-If no '=' symbol is used in the line, it is treated as a filename to use to
-read previously stored cookie lines from, which should be used in this session
-if they match. Using this method also activates the "cookie parser" which will
-make curl record incoming cookies too, which may be handy if you're using this
-in combination with the \fI-L, --location\fP option. The file format of the
-file to read cookies from should be plain HTTP headers or the Netscape/Mozilla
-cookie file format.
-
-\fBNOTE\fP that the file specified with \fI-b, --cookie\fP is only used as
-input. No cookies will be stored in the file. To store cookies, use the
-\fI-c, --cookie-jar\fP option or you could even save the HTTP headers to a file
-using \fI-D, --dump-header\fP!
-
-If this option is used several times, the last one will be used.
-.IP "-B, --use-ascii"
-(FTP/LDAP) Enable ASCII transfer. For FTP, this can also be
-enforced by using an URL that ends with ";type=A". This option causes data
-sent to stdout to be in text mode for win32 systems.
-.IP "--basic"
-(HTTP) Tells curl to use HTTP Basic authentication. This is the default and
-this option is usually pointless, unless you use it to override a previously
-set option that sets a different authentication method (such as \fI--ntlm\fP,
-\fI--digest\fP, or \fI--negotiate\fP).
-.IP "-c, --cookie-jar <file name>"
-(HTTP) Specify to which file you want curl to write all cookies after a
-completed operation. Curl writes all cookies previously read from a specified
-file as well as all cookies received from remote server(s). If no cookies are
-known, no file will be written. The file will be written using the Netscape
-cookie file format. If you set the file name to a single dash, "-", the
-cookies will be written to stdout.
-
-This command line option will activate the cookie engine that makes curl
-record and use cookies. Another way to activate it is to use the \fI-b,
---cookie\fP option.
-
-If the cookie jar can't be created or written to, the whole curl operation
-won't fail or even report an error clearly. Using -v will get a warning
-displayed, but that is the only visible feedback you get about this possibly
-lethal situation.
-
-If this option is used several times, the last specified file name will be
-used.
-.IP "-C, --continue-at <offset>"
-Continue/Resume a previous file transfer at the given offset. The given offset
-is the exact number of bytes that will be skipped, counting from the beginning
-of the source file before it is transferred to the destination. If used with
-uploads, the FTP server command SIZE will not be used by curl.
-
-Use "-C -" to tell curl to automatically find out where/how to resume the
-transfer. It then uses the given output/input files to figure that out.
-
-If this option is used several times, the last one will be used.
-.IP "--ciphers <list of ciphers>"
-(SSL) Specifies which ciphers to use in the connection. The list of ciphers
-must specify valid ciphers. Read up on SSL cipher list details on this URL:
-\fIhttp://www.openssl.org/docs/apps/ciphers.html\fP
-
-NSS ciphers are done differently than OpenSSL and GnuTLS. The full list of NSS
-ciphers is in the NSSCipherSuite entry at this URL:
-\fIhttp://git.fedorahosted.org/cgit/mod_nss.git/plain/docs/mod_nss.html#Directives\fP
-
-If this option is used several times, the last one will be used.
-.IP "--compressed"
-(HTTP) Request a compressed response using one of the algorithms curl
-supports, and save the uncompressed document. If this option is used and the
-server sends an unsupported encoding, curl will report an error.
-.IP "--connect-timeout <seconds>"
-Maximum time in seconds that you allow the connection to the server to take.
-This only limits the connection phase, once curl has connected this option is
-of no more use. Since 7.32.0, this option accepts decimal values, but the
-actual timeout will decrease in accuracy as the specified timeout increases in
-decimal precision. See also the \fI-m, --max-time\fP option.
-
-If this option is used several times, the last one will be used.
-.IP "--create-dirs"
-When used in conjunction with the \fI-o\fP option, curl will create the
-necessary local directory hierarchy as needed. This option creates the dirs
-mentioned with the \fI-o\fP option, nothing else. If the \fI-o\fP file name
-uses no dir or if the dirs it mentions already exist, no dir will be created.
-
-To create remote directories when using FTP or SFTP, try
-\fI--ftp-create-dirs\fP.
-.IP "--crlf"
-(FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390).
-.IP "--crlfile <file>"
-(HTTPS/FTPS) Provide a file using PEM format with a Certificate Revocation
-List that may specify peer certificates that are to be considered revoked.
-
-If this option is used several times, the last one will be used.
-
-(Added in 7.19.7)
-.IP "-d, --data <data>"
-(HTTP) Sends the specified data in a POST request to the HTTP server, in the
-same way that a browser does when a user has filled in an HTML form and
-presses the submit button. This will cause curl to pass the data to the server
-using the content-type application/x-www-form-urlencoded. Compare to
-\fI-F, --form\fP.
-
-\fI-d, --data\fP is the same as \fI--data-ascii\fP. To post data purely binary,
-you should instead use the \fI--data-binary\fP option. To URL-encode the value
-of a form field you may use \fI--data-urlencode\fP.
-
-If any of these options is used more than once on the same command line, the
-data pieces specified will be merged together with a separating
-&-symbol. Thus, using '-d name=daniel -d skill=lousy' would generate a post
-chunk that looks like \&'name=daniel&skill=lousy'.
-
-If you start the data with the letter @, the rest should be a file name to
-read the data from, or - if you want curl to read the data from stdin. The
-contents of the file must already be URL-encoded. Multiple files can also be
-specified. Posting data from a file named 'foobar' would thus be done with
-\fI--data\fP @foobar. When --data is told to read from a file like that,
-carriage returns and newlines will be stripped out.
-.IP "-D, --dump-header <file>"
-Write the protocol headers to the specified file.
-
-This option is handy to use when you want to store the headers that an HTTP
-site sends to you. Cookies from the headers could then be read in a second
-curl invocation by using the \fI-b, --cookie\fP option! The
-\fI-c, --cookie-jar\fP option is however a better way to store cookies.
-
-When used in FTP, the FTP server response lines are considered being "headers"
-and thus are saved there.
-
-If this option is used several times, the last one will be used.
-
-.IP "--data-ascii <data>"
-See \fI-d, --data\fP.
-.IP "--data-binary <data>"
-(HTTP) This posts data exactly as specified with no extra processing
-whatsoever.
-
-If you start the data with the letter @, the rest should be a filename. Data
-is posted in a similar manner as \fI--data-ascii\fP does, except that newlines
-and carriage returns are preserved and conversions are never done.
-
-If this option is used several times, the ones following the first will append
-data as described in \fI-d, --data\fP.
-.IP "--data-urlencode <data>"
-(HTTP) This posts data, similar to the other --data options with the exception
-that this performs URL-encoding. (Added in 7.18.0)
-
-To be CGI-compliant, the <data> part should begin with a \fIname\fP followed
-by a separator and a content specification. The <data> part can be passed to
-curl using one of the following syntaxes:
-.RS
-.IP "content"
-This will make curl URL-encode the content and pass that on. Just be careful
-so that the content doesn't contain any = or @ symbols, as that will then make
-the syntax match one of the other cases below!
-.IP "=content"
-This will make curl URL-encode the content and pass that on. The preceding =
-symbol is not included in the data.
-.IP "name=content"
-This will make curl URL-encode the content part and pass that on. Note that
-the name part is expected to be URL-encoded already.
-.IP "@filename"
-This will make curl load data from the given file (including any newlines),
-URL-encode that data and pass it on in the POST.
-.IP "name@filename"
-This will make curl load data from the given file (including any newlines),
-URL-encode that data and pass it on in the POST. The name part gets an equal
-sign appended, resulting in \fIname=urlencoded-file-content\fP. Note that the
-name is expected to be URL-encoded already.
-.RE
-.IP "--delegation LEVEL"
-Set \fILEVEL\fP to tell the server what it is allowed to delegate when it
-comes to user credentials. Used with GSS/kerberos.
-.RS
-.IP "none"
-Don't allow any delegation.
-.IP "policy"
-Delegates if and only if the OK-AS-DELEGATE flag is set in the Kerberos
-service ticket, which is a matter of realm policy.
-.IP "always"
-Unconditionally allow the server to delegate.
-.RE
-.IP "--digest"
-(HTTP) Enables HTTP Digest authentication. This is an authentication scheme
-that prevents the password from being sent over the wire in clear text. Use
-this in combination with the normal \fI-u, --user\fP option to set user name
-and password. See also \fI--ntlm\fP, \fI--negotiate\fP and \fI--anyauth\fP for
-related options.
-
-If this option is used several times, only the first one is used.
-.IP "--disable-eprt"
-(FTP) Tell curl to disable the use of the EPRT and LPRT commands when doing
-active FTP transfers. Curl will normally always first attempt to use EPRT,
-then LPRT before using PORT, but with this option, it will use PORT right
-away. EPRT and LPRT are extensions to the original FTP protocol, and may not
-work on all servers, but they enable more functionality in a better way than
-the traditional PORT command.
-
-\fB--eprt\fP can be used to explicitly enable EPRT again and \fB--no-eprt\fP
-is an alias for \fB--disable-eprt\fP.
-
-Disabling EPRT only changes the active behavior. If you want to switch to
-passive mode you need to not use \fI-P, --ftp-port\fP or force it with
-\fI--ftp-pasv\fP.
-.IP "--disable-epsv"
-(FTP) Tell curl to disable the use of the EPSV command when doing passive FTP
-transfers. Curl will normally always first attempt to use EPSV before PASV,
-but with this option, it will not try using EPSV.
-
-\fB--epsv\fP can be used to explicitly enable EPSV again and \fB--no-epsv\fP
-is an alias for \fB--disable-epsv\fP.
-
-Disabling EPSV only changes the passive behavior. If you want to switch to
-active mode you need to use \fI-P, --ftp-port\fP.
-.IP "--dns-interface <interface>"
-Tell curl to send outgoing DNS requests through <interface>. This option
-is a counterpart to \fI--interface\fP (which does not affect DNS). The
-supplied string must be an interface name (not an address).
-
-This option requires that libcurl was built with a resolver backend that
-supports this operation. The c-ares backend is the only such one. (Added in
-7.33.0)
-.IP "--dns-ipv4-addr <ip-address>"
-Tell curl to bind to <ip-address> when making IPv4 DNS requests, so that
-the DNS requests originate from this address. The argument should be a
-single IPv4 address.
-
-This option requires that libcurl was built with a resolver backend that
-supports this operation. The c-ares backend is the only such one. (Added in
-7.33.0)
-.IP "--dns-ipv6-addr <ip-address>"
-Tell curl to bind to <ip-address> when making IPv6 DNS requests, so that
-the DNS requests originate from this address. The argument should be a
-single IPv6 address.
-
-This option requires that libcurl was built with a resolver backend that
-supports this operation. The c-ares backend is the only such one. (Added in
-7.33.0)
-.IP "--dns-servers <ip-address,ip-address>"
-Set the list of DNS servers to be used instead of the system default.
-The list of IP addresses should be separated with commas. Port numbers
-may also optionally be given as \fI:<port-number>\fP after each IP
-address.
-
-This option requires that libcurl was built with a resolver backend that
-supports this operation. The c-ares backend is the only such one. (Added in
-7.33.0)
-.IP "-e, --referer <URL>"
-(HTTP) Sends the "Referer Page" information to the HTTP server. This can also
-be set with the \fI-H, --header\fP flag of course. When used with
-\fI-L, --location\fP you can append ";auto" to the --referer URL to make curl
-automatically set the previous URL when it follows a Location: header. The
-\&";auto" string can be used alone, even if you don't set an initial --referer.
-
-If this option is used several times, the last one will be used.
-.IP "-E, --cert <certificate[:password]>"
-(SSL) Tells curl to use the specified client certificate file when getting a
-file with HTTPS, FTPS or another SSL-based protocol. The certificate must be
-in PKCS#12 format if using Secure Transport, or PEM format if using any other
-engine. If the optional password isn't specified, it will be queried
-for on the terminal. Note that this option assumes a \&"certificate" file that
-is the private key and the private certificate concatenated! See \fI--cert\fP
-and \fI--key\fP to specify them independently.
-
-If curl is built against the NSS SSL library then this option can tell
-curl the nickname of the certificate to use within the NSS database defined
-by the environment variable SSL_DIR (or by default /etc/pki/nssdb). If the
-NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files may be
-loaded. If you want to use a file from the current directory, please precede
-it with "./" prefix, in order to avoid confusion with a nickname. If the
-nickname contains ":", it needs to be preceded by "\\" so that it is not
-recognized as password delimiter. If the nickname contains "\\", it needs to
-be escaped as "\\\\" so that it is not recognized as an escape character.
-
-(iOS and Mac OS X only) If curl is built against Secure Transport, then the
-certificate string can either be the name of a certificate/private key in the
-system or user keychain, or the path to a PKCS#12-encoded certificate and
-private key. If you want to use a file from the current directory, please
-precede it with "./" prefix, in order to avoid confusion with a nickname.
-
-If this option is used several times, the last one will be used.
-.IP "--engine <name>"
-Select the OpenSSL crypto engine to use for cipher
-operations. Use \fI--engine list\fP to print a list of build-time supported
-engines. Note that not all (or none) of the engines may be available at
-run-time.
-.IP "--environment"
-(RISC OS ONLY) Sets a range of environment variables, using the names the
-\fI-w\fP option supports, to allow easier extraction of useful information
-after having run curl.
-.IP "--egd-file <file>"
-(SSL) Specify the path name to the Entropy Gathering Daemon socket. The socket
-is used to seed the random engine for SSL connections. See also the
-\fI--random-file\fP option.
-.IP "--cert-type <type>"
-(SSL) Tells curl what certificate type the provided certificate is in. PEM,
-DER and ENG are recognized types. If not specified, PEM is assumed.
-
-If this option is used several times, the last one will be used.
-.IP "--cacert <CA certificate>"
-(SSL) Tells curl to use the specified certificate file to verify the peer. The
-file may contain multiple CA certificates. The certificate(s) must be in PEM
-format. Normally curl is built to use a default file for this, so this option
-is typically used to alter that default file.
-
-curl recognizes the environment variable named 'CURL_CA_BUNDLE' if it is
-set, and uses the given path as a path to a CA cert bundle. This option
-overrides that variable.
-
-The windows version of curl will automatically look for a CA certs file named
-\'curl-ca-bundle.crt\', either in the same directory as curl.exe, or in the
-Current Working Directory, or in any folder along your PATH.
-
-If curl is built against the NSS SSL library, the NSS PEM PKCS#11 module
-(libnsspem.so) needs to be available for this option to work properly.
-
-If this option is used several times, the last one will be used.
-.IP "--capath <CA certificate directory>"
-(SSL) Tells curl to use the specified certificate directory to verify the
-peer. Multiple paths can be provided by separating them with ":" (e.g.
-\&"path1:path2:path3"). The certificates must be in PEM format, and if curl is
-built against OpenSSL, the directory must have been processed using the
-c_rehash utility supplied with OpenSSL. Using \fI--capath\fP can allow
-OpenSSL-powered curl to make SSL-connections much more efficiently than using
-\fI--cacert\fP if the \fI--cacert\fP file contains many CA certificates.
-
-If this option is set, the default capath value will be ignored, and if it is
-used several times, the last one will be used.
-.IP "-f, --fail"
-(HTTP) Fail silently (no output at all) on server errors. This is mostly done
-to better enable scripts etc to better deal with failed attempts. In
-normal cases when an HTTP server fails to deliver a document, it returns an
-HTML document stating so (which often also describes why and more). This flag
-will prevent curl from outputting that and return error 22.
-
-This method is not fail-safe and there are occasions where non-successful
-response codes will slip through, especially when authentication is involved
-(response codes 401 and 407).
-.IP "-F, --form <name=content>"
-(HTTP) This lets curl emulate a filled-in form in which a user has pressed the
-submit button. This causes curl to POST data using the Content-Type
-multipart/form-data according to RFC 2388. This enables uploading of binary
-files etc. To force the 'content' part to be a file, prefix the file name
-with an @ sign. To just get the content part from a file, prefix the file name
-with the symbol <. The difference between @ and < is then that @ makes a file
-get attached in the post as a file upload, while the < makes a text field and
-just get the contents for that text field from a file.
-
-Example, to send your password file to the server, where
-\&'password' is the name of the form-field to which /etc/passwd will be the
-input:
-
-\fBcurl\fP -F password=@/etc/passwd www.mypasswords.com
-
-To read content from stdin instead of a file, use - as the filename. This goes
-for both @ and < constructs.
-
-You can also tell curl what Content-Type to use by using 'type=', in a manner
-similar to:
-
-\fBcurl\fP -F "web=@index.html;type=text/html" url.com
-
-or
-
-\fBcurl\fP -F "name=daniel;type=text/foo" url.com
-
-You can also explicitly change the name field of a file upload part by setting
-filename=, like this:
-
-\fBcurl\fP -F "file=@localfile;filename=nameinpost" url.com
-
-If filename/path contains ',' or ';', it must be quoted by double-quotes like:
-
-\fBcurl\fP -F "file=@\\"localfile\\";filename=\\"nameinpost\\"" url.com
-
-or
-
-\fBcurl\fP -F 'file=@"localfile";filename="nameinpost"' url.com
-
-Note that if a filename/path is quoted by double-quotes, any double-quote
-or backslash within the filename must be escaped by backslash.
-
-See further examples and details in the MANUAL.
-
-This option can be used multiple times.
-.IP "--ftp-account [data]"
-(FTP) When an FTP server asks for "account data" after user name and password
-has been provided, this data is sent off using the ACCT command. (Added in
-7.13.0)
-
-If this option is used several times, the last one will be used.
-.IP "--ftp-alternative-to-user <command>"
-(FTP) If authenticating with the USER and PASS commands fails, send this
-command. When connecting to Tumbleweed's Secure Transport server over FTPS
-using a client certificate, using "SITE AUTH" will tell the server to retrieve
-the username from the certificate. (Added in 7.15.5)
-.IP "--ftp-create-dirs"
-(FTP/SFTP) When an FTP or SFTP URL/operation uses a path that doesn't
-currently exist on the server, the standard behavior of curl is to
-fail. Using this option, curl will instead attempt to create missing
-directories.
-.IP "--ftp-method [method]"
-(FTP) Control what method curl should use to reach a file on an FTP(S)
-server. The method argument should be one of the following alternatives:
-.RS
-.IP multicwd
-curl does a single CWD operation for each path part in the given URL. For deep
-hierarchies this means very many commands. This is how RFC 1738 says it should
-be done. This is the default but the slowest behavior.
-.IP nocwd
-curl does no CWD at all. curl will do SIZE, RETR, STOR etc and give a full
-path to the server for all these commands. This is the fastest behavior.
-.IP singlecwd
-curl does one CWD with the full target directory and then operates on the file
-\&"normally" (like in the multicwd case). This is somewhat more standards
-compliant than 'nocwd' but without the full penalty of 'multicwd'.
-.RE
-(Added in 7.15.1)
-.IP "--ftp-pasv"
-(FTP) Use passive mode for the data connection. Passive is the internal default
-behavior, but using this option can be used to override a previous
-\fI-P/-ftp-port\fP option. (Added in 7.11.0)
-
-If this option is used several times, only the first one is used. Undoing an
-enforced passive really isn't doable but you must then instead enforce the
-correct \fI-P, --ftp-port\fP again.
-
-Passive mode means that curl will try the EPSV command first and then PASV,
-unless \fI--disable-epsv\fP is used.
-.IP "--ftp-skip-pasv-ip"
-(FTP) Tell curl to not use the IP address the server suggests in its response
-to curl's PASV command when curl connects the data connection. Instead curl
-will re-use the same IP address it already uses for the control
-connection. (Added in 7.14.2)
-
-This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
-.IP "--ftp-pret"
-(FTP) Tell curl to send a PRET command before PASV (and EPSV). Certain
-FTP servers, mainly drftpd, require this non-standard command for
-directory listings as well as up and downloads in PASV mode.
-(Added in 7.20.x)
-.IP "--ftp-ssl-ccc"
-(FTP) Use CCC (Clear Command Channel)
-Shuts down the SSL/TLS layer after authenticating. The rest of the
-control channel communication will be unencrypted. This allows
-NAT routers to follow the FTP transaction. The default mode is
-passive. See \fI--ftp-ssl-ccc-mode\fP for other modes.
-(Added in 7.16.1)
-.IP "--ftp-ssl-ccc-mode [active/passive]"
-(FTP) Use CCC (Clear Command Channel)
-Sets the CCC mode. The passive mode will not initiate the shutdown, but
-instead wait for the server to do it, and will not reply to the
-shutdown from the server. The active mode initiates the shutdown and
-waits for a reply from the server.
-(Added in 7.16.2)
-.IP "--ftp-ssl-control"
-(FTP) Require SSL/TLS for the FTP login, clear for transfer. Allows secure
-authentication, but non-encrypted data transfers for efficiency. Fails the
-transfer if the server doesn't support SSL/TLS. (Added in 7.16.0)
-that can still be used but will be removed in a future version.
-.IP "--form-string <name=string>"
-(HTTP) Similar to \fI--form\fP except that the value string for the named
-parameter is used literally. Leading \&'@' and \&'<' characters, and the
-\&';type=' string in the value have no special meaning. Use this in preference
-to \fI--form\fP if there's any possibility that the string value may
-accidentally trigger the \&'@' or \&'<' features of \fI--form\fP.
-.IP "-g, --globoff"
-This option switches off the "URL globbing parser". When you set this option,
-you can specify URLs that contain the letters {}[] without having them being
-interpreted by curl itself. Note that these letters are not normal legal URL
-contents but they should be encoded according to the URI standard.
-.IP "-G, --get"
-When used, this option will make all data specified with \fI-d, --data\fP or
-\fI--data-binary\fP to be used in an HTTP GET request instead of the POST
-request that otherwise would be used. The data will be appended to the URL
-with a '?' separator.
-
-If used in combination with -I, the POST data will instead be appended to the
-URL with a HEAD request.
-
-If this option is used several times, only the first one is used. This is
-because undoing a GET doesn't make sense, but you should then instead enforce
-the alternative method you prefer.
-.IP "-H, --header <header>"
-(HTTP) Extra header to use when getting a web page. You may specify any number
-of extra headers. Note that if you should add a custom header that has the
-same name as one of the internal ones curl would use, your externally set
-header will be used instead of the internal one. This allows you to make even
-trickier stuff than curl would normally do. You should not replace internally
-set headers without knowing perfectly well what you're doing. Remove an
-internal header by giving a replacement without content on the right side of
-the colon, as in: -H \&"Host:". If you send the custom header with no-value
-then its header must be terminated with a semicolon, such as \-H
-\&"X-Custom-Header;" to send "X-Custom-Header:".
-
-curl will make sure that each header you add/replace is sent with the proper
-end-of-line marker, you should thus \fBnot\fP add that as a part of the header
-content: do not add newlines or carriage returns, they will only mess things up
-for you.
-
-See also the \fI-A, --user-agent\fP and \fI-e, --referer\fP options.
-
-This option can be used multiple times to add/replace/remove multiple headers.
-.IP "--hostpubmd5 <md5>"
-(SCP/SFTP) Pass a string containing 32 hexadecimal digits. The string should
-be the 128 bit MD5 checksum of the remote host's public key, curl will refuse
-the connection with the host unless the md5sums match. (Added in 7.17.1)
-.IP "--ignore-content-length"
-(HTTP)
-Ignore the Content-Length header. This is particularly useful for servers
-running Apache 1.x, which will report incorrect Content-Length for files
-larger than 2 gigabytes.
-.IP "-i, --include"
-(HTTP) Include the HTTP-header in the output. The HTTP-header includes things
-like server-name, date of the document, HTTP-version and more...
-.IP "-I, --head"
-(HTTP/FTP/FILE)
-Fetch the HTTP-header only! HTTP-servers feature the command HEAD
-which this uses to get nothing but the header of a document. When used
-on an FTP or FILE file, curl displays the file size and last modification
-time only.
-.IP "--interface <name>"
-Perform an operation using a specified interface. You can enter interface
-name, IP address or host name. An example could look like:
-
- curl --interface eth0:1 http://www.netscape.com/
-
-If this option is used several times, the last one will be used.
-.IP "-j, --junk-session-cookies"
-(HTTP) When curl is told to read cookies from a given file, this option will
-make it discard all "session cookies". This will basically have the same effect
-as if a new session is started. Typical browsers always discard session
-cookies when they're closed down.
-.IP "-J, --remote-header-name"
-(HTTP) This option tells the \fI-O, --remote-name\fP option to use the
-server-specified Content-Disposition filename instead of extracting a filename
-from the URL.
-.IP "-k, --insecure"
-(SSL) This option explicitly allows curl to perform "insecure" SSL connections
-and transfers. All SSL connections are attempted to be made secure by using
-the CA certificate bundle installed by default. This makes all connections
-considered "insecure" fail unless \fI-k, --insecure\fP is used.
-
-See this online resource for further details:
-\fBhttp://curl.haxx.se/docs/sslcerts.html\fP
-.IP "-K, --config <config file>"
-Specify which config file to read curl arguments from. The config file is a
-text file in which command line arguments can be written which then will be
-used as if they were written on the actual command line. Options and their
-parameters must be specified on the same config file line, separated by
-whitespace, colon, the equals sign or any combination thereof (however,
-the preferred separator is the equals sign). If the parameter is to contain
-whitespace, the parameter must be enclosed within quotes. Within double
-quotes, the following escape sequences are available: \\\\, \\", \\t, \\n,
-\\r and \\v. A backslash preceding any other letter is ignored. If the
-first column of a config line is a '#' character, the rest of the line will be
-treated as a comment. Only write one option per physical line in the config
-file.
-
-Specify the filename to -K, --config as '-' to make curl read the file from
-stdin.
-
-Note that to be able to specify a URL in the config file, you need to specify
-it using the \fI--url\fP option, and not by simply writing the URL on its own
-line. So, it could look similar to this:
-
-url = "http://curl.haxx.se/docs/"
-
-Long option names can optionally be given in the config file without the
-initial double dashes.
-
-When curl is invoked, it always (unless \fI-q\fP is used) checks for a default
-config file and uses it if found. The default config file is checked for in
-the following places in this order:
-
-1) curl tries to find the "home dir": It first checks for the CURL_HOME and
-then the HOME environment variables. Failing that, it uses getpwuid() on
-UNIX-like systems (which returns the home dir given the current user in your
-system). On Windows, it then checks for the APPDATA variable, or as a last
-resort the '%USERPROFILE%\\Application Data'.
-
-2) On windows, if there is no _curlrc file in the home dir, it checks for one
-in the same dir the curl executable is placed. On UNIX-like systems, it will
-simply try to load .curlrc from the determined home dir.
-
-.nf
-# --- Example file ---
-# this is a comment
-url = "curl.haxx.se"
-output = "curlhere.html"
-user-agent = "superagent/1.0"
-
-# and fetch another URL too
-url = "curl.haxx.se/docs/manpage.html"
--O
-referer = "http://nowhereatall.com/"
-# --- End of example file ---
-.fi
-
-This option can be used multiple times to load multiple config files.
-.IP "--keepalive-time <seconds>"
-This option sets the time a connection needs to remain idle before sending
-keepalive probes and the time between individual keepalive probes. It is
-currently effective on operating systems offering the TCP_KEEPIDLE and
-TCP_KEEPINTVL socket options (meaning Linux, recent AIX, HP-UX and more). This
-option has no effect if \fI--no-keepalive\fP is used. (Added in 7.18.0)
-
-If this option is used several times, the last one will be used. If
-unspecified, the option defaults to 60 seconds.
-.IP "--key <key>"
-(SSL/SSH) Private key file name. Allows you to provide your private key in this
-separate file.
-
-If this option is used several times, the last one will be used.
-.IP "--key-type <type>"
-(SSL) Private key file type. Specify which type your \fI--key\fP provided
-private key is. DER, PEM, and ENG are supported. If not specified, PEM is
-assumed.
-
-If this option is used several times, the last one will be used.
-.IP "--krb <level>"
-(FTP) Enable Kerberos authentication and use. The level must be entered and
-should be one of 'clear', 'safe', 'confidential', or 'private'. Should you use
-a level that is not one of these, 'private' will instead be used.
-
-This option requires a library built with kerberos4 or GSSAPI
-(GSS-Negotiate) support. This is not very common. Use \fI-V, --version\fP to
-see if your curl supports it.
-
-If this option is used several times, the last one will be used.
-.IP "-l, --list-only"
-(FTP)
-When listing an FTP directory, this switch forces a name-only view.
-Especially useful if you want to machine-parse the contents of an FTP
-directory since the normal directory view doesn't use a standard look
-or format.
-
-This option causes an FTP NLST command to be sent. Some FTP servers
-list only files in their response to NLST; they do not include
-subdirectories and symbolic links.
-
-.IP "-L, --location"
-(HTTP/HTTPS) If the server reports that the requested page has moved to a
-different location (indicated with a Location: header and a 3XX response code),
-this option will make curl redo the request on the new place. If used together
-with \fI-i, --include\fP or \fI-I, --head\fP, headers from all requested pages
-will be shown. When authentication is used, curl only sends its credentials to
-the initial host. If a redirect takes curl to a different host, it won't be
-able to intercept the user+password. See also \fI--location-trusted\fP on how
-to change this. You can limit the amount of redirects to follow by using the
-\fI--max-redirs\fP option.
-
-When curl follows a redirect and the request is not a plain GET (for example
-POST or PUT), it will do the following request with a GET if the HTTP response
-was 301, 302, or 303. If the response code was any other 3xx code, curl will
-re-send the following request using the same unmodified method.
-.IP "--libcurl <file>"
-Append this option to any ordinary curl command line, and you will get a
-libcurl-using C source code written to the file that does the equivalent
-of what your command-line operation does!
-
-If this option is used several times, the last given file name will be
-used. (Added in 7.16.1)
-.IP "--limit-rate <speed>"
-Specify the maximum transfer rate you want curl to use. This feature is useful
-if you have a limited pipe and you'd like your transfer not to use your entire
-bandwidth.
-
-The given speed is measured in bytes/second, unless a suffix is appended.
-Appending 'k' or 'K' will count the number as kilobytes, 'm' or M' makes it
-megabytes, while 'g' or 'G' makes it gigabytes. Examples: 200K, 3m and 1G.
-
-The given rate is the average speed counted during the entire transfer. It
-means that curl might use higher transfer speeds in short bursts, but over
-time it uses no more than the given rate.
-
-If you also use the \fI-Y, --speed-limit\fP option, that option will take
-precedence and might cripple the rate-limiting slightly, to help keeping the
-speed-limit logic working.
-
-If this option is used several times, the last one will be used.
-.IP "--local-port <num>[-num]"
-Set a preferred number or range of local port numbers to use for the
-connection(s). Note that port numbers by nature are a scarce resource that
-will be busy at times so setting this range to something too narrow might
-cause unnecessary connection setup failures. (Added in 7.15.2)
-.IP "--location-trusted"
-(HTTP/HTTPS) Like \fI-L, --location\fP, but will allow sending the name +
-password to all hosts that the site may redirect to. This may or may not
-introduce a security breach if the site redirects you to a site to which
-you'll send your authentication info (which is plaintext in the case of HTTP
-Basic authentication).
-.IP "-m, --max-time <seconds>"
-Maximum time in seconds that you allow the whole operation to take. This is
-useful for preventing your batch jobs from hanging for hours due to slow
-networks or links going down. Since 7.32.0, this option accepts decimal
-values, but the actual timeout will decrease in accuracy as the specified
-timeout increases in decimal precision. See also the \fI--connect-timeout\fP
-option.
-
-If this option is used several times, the last one will be used.
-.IP "--mail-auth <address>"
-(SMTP) Specify a single address. This will be used to specify the
-authentication address (identity) of a submitted message that is being relayed
-to another server.
-
-(Added in 7.25.0)
-.IP "--mail-from <address>"
-(SMTP) Specify a single address that the given mail should get sent from.
-
-(Added in 7.20.0)
-.IP "--max-filesize <bytes>"
-Specify the maximum size (in bytes) of a file to download. If the file
-requested is larger than this value, the transfer will not start and curl will
-return with exit code 63.
-
-\fBNOTE:\fP The file size is not always known prior to download, and for such
-files this option has no effect even if the file transfer ends up being larger
-than this given limit. This concerns both FTP and HTTP transfers.
-.IP "--mail-rcpt <address>"
-(SMTP) Specify a single address that the given mail should get sent to. This
-option can be used multiple times to specify many recipients.
-
-(Added in 7.20.0)
-.IP "--max-redirs <num>"
-Set maximum number of redirection-followings allowed. If \fI-L, --location\fP
-is used, this option can be used to prevent curl from following redirections
-\&"in absurdum". By default, the limit is set to 50 redirections. Set this
-option to -1 to make it limitless.
-
-If this option is used several times, the last one will be used.
-.IP "--metalink"
-This option can tell curl to parse and process a given URI as Metalink file
-(both version 3 and 4 (RFC 5854) are supported) and make use of the mirrors
-listed within for failover if there are errors (such as the file or server not
-being available). It will also verify the hash of the file after the download
-completes. The Metalink file itself is downloaded and processed in memory and
-not stored in the local file system.
-
-Example to use a remote Metalink file:
-
-\fBcurl\fP --metalink http://www.example.com/example.metalink
-
-To use a Metalink file in the local file system, use FILE protocol
-(file://):
-
-\fBcurl\fP --metalink file://example.metalink
-
-Please note that if FILE protocol is disabled, there is no way to use
-a local Metalink file at the time of this writing. Also note that if
-\fI--metalink\fP and \fI--include\fP are used together, \fI--include\fP will be
-ignored. This is because including headers in the response will break
-Metalink parser and if the headers are included in the file described
-in Metalink file, hash check will fail.
-
-(Added in 7.27.0, if built against the libmetalink library.)
-.IP "-n, --netrc"
-Makes curl scan the \fI.netrc\fP (\fI_netrc\fP on Windows) file in the user's
-home directory for login name and password. This is typically used for FTP on
-UNIX. If used with HTTP, curl will enable user authentication. See
-.BR netrc(4)
-or
-.BR ftp(1)
-for details on the file format. Curl will not complain if that file
-doesn't have the right permissions (it should not be either world- or
-group-readable). The environment variable "HOME" is used to find the home
-directory.
-
-A quick and very simple example of how to setup a \fI.netrc\fP to allow curl
-to FTP to the machine host.domain.com with user name \&'myself' and password
-\&'secret' should look similar to:
-
-.B "machine host.domain.com login myself password secret"
-.IP "-N, --no-buffer"
-Disables the buffering of the output stream. In normal work situations, curl
-will use a standard buffered output stream that will have the effect that it
-will output the data in chunks, not necessarily exactly when the data arrives.
-Using this option will disable that buffering.
-
-Note that this is the negated option name documented. You can thus use
-\fI--buffer\fP to enforce the buffering.
-.IP "--netrc-file"
-This option is similar to \fI--netrc\fP, except that you provide the path
-(absolute or relative) to the netrc file that Curl should use.
-You can only specify one netrc file per invocation. If several
-\fI--netrc-file\fP options are provided, only the \fBlast one\fP will be used.
-(Added in 7.21.5)
-
-This option overrides any use of \fI--netrc\fP as they are mutually exclusive.
-It will also abide by \fI--netrc-optional\fP if specified.
-
-.IP "--netrc-optional"
-Very similar to \fI--netrc\fP, but this option makes the .netrc usage
-\fBoptional\fP and not mandatory as the \fI--netrc\fP option does.
-
-.IP "--negotiate"
-(HTTP) Enables GSS-Negotiate authentication. The GSS-Negotiate method was
-designed by Microsoft and is used in their web applications. It is primarily
-meant as a support for Kerberos5 authentication but may be also used along
-with another authentication method. For more information see IETF draft
-draft-brezak-spnego-http-04.txt.
-
-If you want to enable Negotiate for your proxy authentication, then use
-\fI--proxy-negotiate\fP.
-
-This option requires a library built with GSSAPI support. This is
-not very common. Use \fI-V, --version\fP to see if your version supports
-GSS-Negotiate.
-
-When using this option, you must also provide a fake \fI-u, --user\fP option to
-activate the authentication code properly. Sending a '-u :' is enough as the
-user name and password from the \fI-u\fP option aren't actually used.
-
-If this option is used several times, only the first one is used.
-.IP "--no-keepalive"
-Disables the use of keepalive messages on the TCP connection, as by default
-curl enables them.
-
-Note that this is the negated option name documented. You can thus use
-\fI--keepalive\fP to enforce keepalive.
-.IP "--no-sessionid"
-(SSL) Disable curl's use of SSL session-ID caching. By default all transfers
-are done using the cache. Note that while nothing should ever get hurt by
-attempting to reuse SSL session-IDs, there seem to be broken SSL
-implementations in the wild that may require you to disable this in order for
-you to succeed. (Added in 7.16.0)
-
-Note that this is the negated option name documented. You can thus use
-\fI--sessionid\fP to enforce session-ID caching.
-.IP "--noproxy <no-proxy-list>"
-Comma-separated list of hosts which do not use a proxy, if one is specified.
-The only wildcard is a single * character, which matches all hosts, and
-effectively disables the proxy. Each name in this list is matched as either
-a domain which contains the hostname, or the hostname itself. For example,
-local.com would match local.com, local.com:80, and www.local.com, but not
-www.notlocal.com. (Added in 7.19.4).
-.IP "--ntlm"
-(HTTP) Enables NTLM authentication. The NTLM authentication method was
-designed by Microsoft and is used by IIS web servers. It is a proprietary
-protocol, reverse-engineered by clever people and implemented in curl based
-on their efforts. This kind of behavior should not be endorsed, you should
-encourage everyone who uses NTLM to switch to a public and documented
-authentication method instead, such as Digest.
-
-If you want to enable NTLM for your proxy authentication, then use
-\fI--proxy-ntlm\fP.
-
-This option requires a library built with SSL support. Use
-\fI-V, --version\fP to see if your curl supports NTLM.
-
-If this option is used several times, only the first one is used.
-.IP "-o, --output <file>"
-Write output to <file> instead of stdout. If you are using {} or [] to fetch
-multiple documents, you can use '#' followed by a number in the <file>
-specifier. That variable will be replaced with the current string for the URL
-being fetched. Like in:
-
- curl http://{one,two}.site.com -o "file_#1.txt"
-
-or use several variables like:
-
- curl http://{site,host}.host[1-5].com -o "#1_#2"
-
-You may use this option as many times as the number of URLs you have.
-
-See also the \fI--create-dirs\fP option to create the local directories
-dynamically. Specifying the output as '-' (a single dash) will force the
-output to be done to stdout.
-.IP "-O, --remote-name"
-Write output to a local file named like the remote file we get. (Only the file
-part of the remote file is used, the path is cut off.)
-
-The remote file name to use for saving is extracted from the given URL,
-nothing else.
-
-Consequentially, the file will be saved in the current working directory. If
-you want the file saved in a different directory, make sure you change current
-working directory before you invoke curl with the \fB-O, --remote-name\fP flag!
-
-You may use this option as many times as the number of URLs you have.
-.IP "--oauth2-bearer"
-(IMAP/POP3/SMTP) Specify the Bearer Token for OAUTH 2.0 server authentication.
-The Bearer Token is used in conjuction with the user name which can be
-specified as part of the \fI--url\fP or \fI-u, --user\fP options.
-
-The Bearer Token and user name are formatted according to RFC 6750.
-
-If this option is used several times, the last one will be used.
-.IP "-p, --proxytunnel"
-When an HTTP proxy is used (\fI-x, --proxy\fP), this option will cause non-HTTP
-protocols to attempt to tunnel through the proxy instead of merely using it to
-do HTTP-like operations. The tunnel approach is made with the HTTP proxy
-CONNECT request and requires that the proxy allows direct connect to the
-remote port number curl wants to tunnel through to.
-.IP "-P, --ftp-port <address>"
-(FTP) Reverses the default initiator/listener roles when connecting with
-FTP. This switch makes curl use active mode. In practice, curl then tells the
-server to connect back to the client's specified address and port, while
-passive mode asks the server to setup an IP address and port for it to connect
-to. <address> should be one of:
-.RS
-.IP interface
-i.e "eth0" to specify which interface's IP address you want to use (Unix only)
-.IP "IP address"
-i.e "192.168.10.1" to specify the exact IP address
-.IP "host name"
-i.e "my.host.domain" to specify the machine
-.IP "-"
-make curl pick the same IP address that is already used for the control
-connection
-.RE
-
-If this option is used several times, the last one will be used. Disable the
-use of PORT with \fI--ftp-pasv\fP. Disable the attempt to use the EPRT command
-instead of PORT by using \fI--disable-eprt\fP. EPRT is really PORT++.
-
-Starting in 7.19.5, you can append \&":[start]-[end]\&" to the right of the
-address, to tell curl what TCP port range to use. That means you specify a
-port range, from a lower to a higher number. A single number works as well,
-but do note that it increases the risk of failure since the port may not be
-available.
-.IP "--pass <phrase>"
-(SSL/SSH) Passphrase for the private key
-
-If this option is used several times, the last one will be used.
-.IP "--post301"
-(HTTP) Tells curl to respect RFC 2616/10.3.2 and not convert POST requests
-into GET requests when following a 301 redirection. The non-RFC behaviour is
-ubiquitous in web browsers, so curl does the conversion by default to maintain
-consistency. However, a server may require a POST to remain a POST after such
-a redirection. This option is meaningful only when using \fI-L, --location\fP
-(Added in 7.17.1)
-.IP "--post302"
-(HTTP) Tells curl to respect RFC 2616/10.3.2 and not convert POST requests
-into GET requests when following a 302 redirection. The non-RFC behaviour is
-ubiquitous in web browsers, so curl does the conversion by default to maintain
-consistency. However, a server may require a POST to remain a POST after such
-a redirection. This option is meaningful only when using \fI-L, --location\fP
-(Added in 7.19.1)
-.IP "--post303"
-(HTTP) Tells curl to respect RFC 2616/10.3.2 and not convert POST requests
-into GET requests when following a 303 redirection. The non-RFC behaviour is
-ubiquitous in web browsers, so curl does the conversion by default to maintain
-consistency. However, a server may require a POST to remain a POST after such
-a redirection. This option is meaningful only when using \fI-L, --location\fP
-(Added in 7.26.0)
-.IP "--proto <protocols>"
-Tells curl to use the listed protocols for its initial retrieval. Protocols
-are evaluated left to right, are comma separated, and are each a protocol
-name or 'all', optionally prefixed by zero or more modifiers. Available
-modifiers are:
-.RS
-.TP 3
-.B +
-Permit this protocol in addition to protocols already permitted (this is
-the default if no modifier is used).
-.TP
-.B -
-Deny this protocol, removing it from the list of protocols already permitted.
-.TP
-.B =
-Permit only this protocol (ignoring the list already permitted), though
-subject to later modification by subsequent entries in the comma separated
-list.
-.RE
-.IP
-For example:
-.RS
-.TP 15
-.B --proto -ftps
-uses the default protocols, but disables ftps
-.TP
-.B --proto -all,https,+http
-only enables http and https
-.TP
-.B --proto =http,https
-also only enables http and https
-.RE
-.IP
-Unknown protocols produce a warning. This allows scripts to safely rely on
-being able to disable potentially dangerous protocols, without relying upon
-support for that protocol being built into curl to avoid an error.
-
-This option can be used multiple times, in which case the effect is the same
-as concatenating the protocols into one instance of the option.
-
-(Added in 7.20.2)
-.IP "--proto-redir <protocols>"
-Tells curl to use the listed protocols after a redirect. See --proto for
-how protocols are represented.
-
-(Added in 7.20.2)
-.IP "--proxy-anyauth"
-Tells curl to pick a suitable authentication method when communicating with
-the given proxy. This might cause an extra request/response round-trip. (Added
-in 7.13.2)
-.IP "--proxy-basic"
-Tells curl to use HTTP Basic authentication when communicating with the given
-proxy. Use \fI--basic\fP for enabling HTTP Basic with a remote host. Basic is
-the default authentication method curl uses with proxies.
-.IP "--proxy-digest"
-Tells curl to use HTTP Digest authentication when communicating with the given
-proxy. Use \fI--digest\fP for enabling HTTP Digest with a remote host.
-.IP "--proxy-negotiate"
-Tells curl to use HTTP Negotiate authentication when communicating
-with the given proxy. Use \fI--negotiate\fP for enabling HTTP Negotiate
-with a remote host. (Added in 7.17.1)
-.IP "--proxy-ntlm"
-Tells curl to use HTTP NTLM authentication when communicating with the given
-proxy. Use \fI--ntlm\fP for enabling NTLM with a remote host.
-.IP "--proxy1.0 <proxyhost[:port]>"
-Use the specified HTTP 1.0 proxy. If the port number is not specified, it is
-assumed at port 1080.
-
-The only difference between this and the HTTP proxy option (\fI-x, --proxy\fP),
-is that attempts to use CONNECT through the proxy will specify an HTTP 1.0
-protocol instead of the default HTTP 1.1.
-.IP "--pubkey <key>"
-(SSH) Public key file name. Allows you to provide your public key in this
-separate file.
-
-If this option is used several times, the last one will be used.
-.IP "-q"
-If used as the first parameter on the command line, the \fIcurlrc\fP config
-file will not be read and used. See the \fI-K, --config\fP for details on the
-default config file search path.
-.IP "-Q, --quote <command>"
-(FTP/SFTP) Send an arbitrary command to the remote FTP or SFTP server. Quote
-commands are sent BEFORE the transfer takes place (just after the initial PWD
-command in an FTP transfer, to be exact). To make commands take place after a
-successful transfer, prefix them with a dash '-'. To make commands be sent
-after curl has changed the working directory, just before the transfer
-command(s), prefix the command with a '+' (this is only supported for
-FTP). You may specify any number of commands. If the server returns failure
-for one of the commands, the entire operation will be aborted. You must send
-syntactically correct FTP commands as RFC 959 defines to FTP servers, or one
-of the commands listed below to SFTP servers. This option can be used
-multiple times. When speaking to an FTP server, prefix the command with an
-asterisk (*) to make curl continue even if the command fails as by default
-curl will stop at first failure.
-
-SFTP is a binary protocol. Unlike for FTP, curl interprets SFTP quote commands
-itself before sending them to the server. File names may be quoted
-shell-style to embed spaces or special characters. Following is the list of
-all supported SFTP quote commands:
-.RS
-.IP "chgrp group file"
-The chgrp command sets the group ID of the file named by the file operand to
-the group ID specified by the group operand. The group operand is a decimal
-integer group ID.
-.IP "chmod mode file"
-The chmod command modifies the file mode bits of the specified file. The
-mode operand is an octal integer mode number.
-.IP "chown user file"
-The chown command sets the owner of the file named by the file operand to the
-user ID specified by the user operand. The user operand is a decimal
-integer user ID.
-.IP "ln source_file target_file"
-The ln and symlink commands create a symbolic link at the target_file location
-pointing to the source_file location.
-.IP "mkdir directory_name"
-The mkdir command creates the directory named by the directory_name operand.
-.IP "pwd"
-The pwd command returns the absolute pathname of the current working directory.
-.IP "rename source target"
-The rename command renames the file or directory named by the source
-operand to the destination path named by the target operand.
-.IP "rm file"
-The rm command removes the file specified by the file operand.
-.IP "rmdir directory"
-The rmdir command removes the directory entry specified by the directory
-operand, provided it is empty.
-.IP "symlink source_file target_file"
-See ln.
-.RE
-.IP "-r, --range <range>"
-(HTTP/FTP/SFTP/FILE) Retrieve a byte range (i.e a partial document) from a
-HTTP/1.1, FTP or SFTP server or a local FILE. Ranges can be specified
-in a number of ways.
-.RS
-.TP 10
-.B 0-499
-specifies the first 500 bytes
-.TP
-.B 500-999
-specifies the second 500 bytes
-.TP
-.B -500
-specifies the last 500 bytes
-.TP
-.B 9500-
-specifies the bytes from offset 9500 and forward
-.TP
-.B 0-0,-1
-specifies the first and last byte only(*)(H)
-.TP
-.B 500-700,600-799
-specifies 300 bytes from offset 500(H)
-.TP
-.B 100-199,500-599
-specifies two separate 100-byte ranges(*)(H)
-.RE
-
-(*) = NOTE that this will cause the server to reply with a multipart
-response!
-
-Only digit characters (0-9) are valid in the 'start' and 'stop' fields of the
-\&'start-stop' range syntax. If a non-digit character is given in the range,
-the server's response will be unspecified, depending on the server's
-configuration.
-
-You should also be aware that many HTTP/1.1 servers do not have this feature
-enabled, so that when you attempt to get a range, you'll instead get the whole
-document.
-
-FTP and SFTP range downloads only support the simple 'start-stop' syntax
-(optionally with one of the numbers omitted). FTP use depends on the extended
-FTP command SIZE.
-
-If this option is used several times, the last one will be used.
-.IP "-R, --remote-time"
-When used, this will make curl attempt to figure out the timestamp of the
-remote file, and if that is available make the local file get that same
-timestamp.
-.IP "--random-file <file>"
-(SSL) Specify the path name to file containing what will be considered as
-random data. The data is used to seed the random engine for SSL connections.
-See also the \fI--egd-file\fP option.
-.IP "--raw"
-(HTTP) When used, it disables all internal HTTP decoding of content or transfer
-encodings and instead makes them passed on unaltered, raw. (Added in 7.16.2)
-.IP "--remote-name-all"
-This option changes the default action for all given URLs to be dealt with as
-if \fI-O, --remote-name\fP were used for each one. So if you want to disable
-that for a specific URL after \fI--remote-name-all\fP has been used, you must
-use "-o -" or \fI--no-remote-name\fP. (Added in 7.19.0)
-.IP "--resolve <host:port:address>"
-Provide a custom address for a specific host and port pair. Using this, you
-can make the curl requests(s) use a specified address and prevent the
-otherwise normally resolved address to be used. Consider it a sort of
-/etc/hosts alternative provided on the command line. The port number should be
-the number used for the specific protocol the host will be used for. It means
-you need several entries if you want to provide address for the same host but
-different ports.
-
-This option can be used many times to add many host names to resolve.
-
-(Added in 7.21.3)
-.IP "--retry <num>"
-If a transient error is returned when curl tries to perform a transfer, it
-will retry this number of times before giving up. Setting the number to 0
-makes curl do no retries (which is the default). Transient error means either:
-a timeout, an FTP 4xx response code or an HTTP 5xx response code.
-
-When curl is about to retry a transfer, it will first wait one second and then
-for all forthcoming retries it will double the waiting time until it reaches
-10 minutes which then will be the delay between the rest of the retries. By
-using \fI--retry-delay\fP you disable this exponential backoff algorithm. See
-also \fI--retry-max-time\fP to limit the total time allowed for
-retries. (Added in 7.12.3)
-
-If this option is used several times, the last one will be used.
-.IP "--retry-delay <seconds>"
-Make curl sleep this amount of time before each retry when a transfer has
-failed with a transient error (it changes the default backoff time algorithm
-between retries). This option is only interesting if \fI--retry\fP is also
-used. Setting this delay to zero will make curl use the default backoff time.
-(Added in 7.12.3)
-
-If this option is used several times, the last one will be used.
-.IP "--retry-max-time <seconds>"
-The retry timer is reset before the first transfer attempt. Retries will be
-done as usual (see \fI--retry\fP) as long as the timer hasn't reached this
-given limit. Notice that if the timer hasn't reached the limit, the request
-will be made and while performing, it may take longer than this given time
-period. To limit a single request\'s maximum time, use \fI-m, --max-time\fP.
-Set this option to zero to not timeout retries. (Added in 7.12.3)
-
-If this option is used several times, the last one will be used.
-.IP "-s, --silent"
-Silent or quiet mode. Don't show progress meter or error messages. Makes Curl
-mute. It will still output the data you ask for, potentially even to the
-terminal/stdout unless you redirect it.
-.IP "--sasl-ir"
-Enable initial response in SASL authentication.
-(Added in 7.31.0)
-.IP "-S, --show-error"
-When used with \fI-s\fP it makes curl show an error message if it fails.
-.IP "--ssl"
-(FTP, POP3, IMAP, SMTP) Try to use SSL/TLS for the connection. Reverts to a
-non-secure connection if the server doesn't support SSL/TLS. See also
-\fI--ftp-ssl-control\fP and \fI--ssl-reqd\fP for different levels of
-encryption required. (Added in 7.20.0)
-
-This option was formerly known as \fI--ftp-ssl\fP (Added in 7.11.0). That
-option name can still be used but will be removed in a future version.
-.IP "--ssl-reqd"
-(FTP, POP3, IMAP, SMTP) Require SSL/TLS for the connection. Terminates the
-connection if the server doesn't support SSL/TLS. (Added in 7.20.0)
-
-This option was formerly known as \fI--ftp-ssl-reqd\fP (added in 7.15.5). That
-option name can still be used but will be removed in a future version.
-.IP "--ssl-allow-beast"
-(SSL) This option tells curl to not work around a security flaw in the SSL3
-and TLS1.0 protocols known as BEAST. If this option isn't used, the SSL layer
-may use work-arounds known to cause interoperability problems with some older
-SSL implementations. WARNING: this option loosens the SSL security, and by
-using this flag you ask for exactly that. (Added in 7.25.0)
-.IP "--socks4 <host[:port]>"
-Use the specified SOCKS4 proxy. If the port number is not specified, it is
-assumed at port 1080. (Added in 7.15.2)
-
-This option overrides any previous use of \fI-x, --proxy\fP, as they are
-mutually exclusive.
-
-Since 7.21.7, this option is superfluous since you can specify a socks4 proxy
-with \fI-x, --proxy\fP using a socks4:// protocol prefix.
-
-If this option is used several times, the last one will be used.
-.IP "--socks4a <host[:port]>"
-Use the specified SOCKS4a proxy. If the port number is not specified, it is
-assumed at port 1080. (Added in 7.18.0)
-
-This option overrides any previous use of \fI-x, --proxy\fP, as they are
-mutually exclusive.
-
-Since 7.21.7, this option is superfluous since you can specify a socks4a proxy
-with \fI-x, --proxy\fP using a socks4a:// protocol prefix.
-
-If this option is used several times, the last one will be used.
-.IP "--socks5-hostname <host[:port]>"
-Use the specified SOCKS5 proxy (and let the proxy resolve the host name). If
-the port number is not specified, it is assumed at port 1080. (Added in
-7.18.0)
-
-This option overrides any previous use of \fI-x, --proxy\fP, as they are
-mutually exclusive.
-
-Since 7.21.7, this option is superfluous since you can specify a socks5
-hostname proxy with \fI-x, --proxy\fP using a socks5h:// protocol prefix.
-
-If this option is used several times, the last one will be used. (This option
-was previously wrongly documented and used as --socks without the number
-appended.)
-.IP "--socks5 <host[:port]>"
-Use the specified SOCKS5 proxy - but resolve the host name locally. If the
-port number is not specified, it is assumed at port 1080.
-
-This option overrides any previous use of \fI-x, --proxy\fP, as they are
-mutually exclusive.
-
-Since 7.21.7, this option is superfluous since you can specify a socks5 proxy
-with \fI-x, --proxy\fP using a socks5:// protocol prefix.
-
-If this option is used several times, the last one will be used. (This option
-was previously wrongly documented and used as --socks without the number
-appended.)
-
-This option (as well as \fI--socks4\fP) does not work with IPV6, FTPS or LDAP.
-.IP "--socks5-gssapi-service <servicename>"
-The default service name for a socks server is rcmd/server-fqdn. This option
-allows you to change it.
-
-Examples: --socks5 proxy-name \fI--socks5-gssapi-service\fP sockd would use
-sockd/proxy-name --socks5 proxy-name \fI--socks5-gssapi-service\fP
-sockd/real-name would use sockd/real-name for cases where the proxy-name does
-not match the principal name. (Added in 7.19.4).
-.IP "--socks5-gssapi-nec"
-As part of the gssapi negotiation a protection mode is negotiated. RFC 1961
-says in section 4.3/4.4 it should be protected, but the NEC reference
-implementation does not. The option \fI--socks5-gssapi-nec\fP allows the
-unprotected exchange of the protection mode negotiation. (Added in 7.19.4).
-.IP "--stderr <file>"
-Redirect all writes to stderr to the specified file instead. If the file name
-is a plain '-', it is instead written to stdout.
-
-If this option is used several times, the last one will be used.
-.IP "-t, --telnet-option <OPT=val>"
-Pass options to the telnet protocol. Supported options are:
-
-TTYPE=<term> Sets the terminal type.
-
-XDISPLOC=<X display> Sets the X display location.
-
-NEW_ENV=<var,val> Sets an environment variable.
-.IP "-T, --upload-file <file>"
-This transfers the specified local file to the remote URL. If there is no file
-part in the specified URL, Curl will append the local file name. NOTE that you
-must use a trailing / on the last directory to really prove to Curl that there
-is no file name or curl will think that your last directory name is the remote
-file name to use. That will most likely cause the upload operation to fail. If
-this is used on an HTTP(S) server, the PUT command will be used.
-
-Use the file name "-" (a single dash) to use stdin instead of a given file.
-Alternately, the file name "." (a single period) may be specified instead
-of "-" to use stdin in non-blocking mode to allow reading server output
-while stdin is being uploaded.
-
-You can specify one -T for each URL on the command line. Each -T + URL pair
-specifies what to upload and to where. curl also supports "globbing" of the -T
-argument, meaning that you can upload multiple files to a single URL by using
-the same URL globbing style supported in the URL, like this:
-
-curl -T "{file1,file2}" http://www.uploadtothissite.com
-
-or even
-
-curl -T "img[1-1000].png" ftp://ftp.picturemania.com/upload/
-.IP "--tcp-nodelay"
-Turn on the TCP_NODELAY option. See the \fIcurl_easy_setopt(3)\fP man page for
-details about this option. (Added in 7.11.2)
-.IP "--tftp-blksize <value>"
-(TFTP) Set TFTP BLKSIZE option (must be >512). This is the block size that
-curl will try to use when transferring data to or from a TFTP server. By
-default 512 bytes will be used.
-
-If this option is used several times, the last one will be used.
-
-(Added in 7.20.0)
-.IP "--tlsauthtype <authtype>"
-Set TLS authentication type. Currently, the only supported option is "SRP",
-for TLS-SRP (RFC 5054). If \fI--tlsuser\fP and \fI--tlspassword\fP are
-specified but \fI--tlsauthtype\fP is not, then this option defaults to "SRP".
-(Added in 7.21.4)
-.IP "--tlsuser <user>"
-Set username for use with the TLS authentication method specified with
-\fI--tlsauthtype\fP. Requires that \fI--tlspassword\fP also be set. (Added in
-7.21.4)
-.IP "--tlspassword <password>"
-Set password for use with the TLS authentication method specified with
-\fI--tlsauthtype\fP. Requires that \fI--tlsuser\fP also be set. (Added in
-7.21.4)
-.IP "--tr-encoding"
-(HTTP) Request a compressed Transfer-Encoding response using one of the
-algorithms curl supports, and uncompress the data while receiving it.
-
-(Added in 7.21.6)
-.IP "--trace <file>"
-Enables a full trace dump of all incoming and outgoing data, including
-descriptive information, to the given output file. Use "-" as filename to have
-the output sent to stdout.
-
-This option overrides previous uses of \fI-v, --verbose\fP or
-\fI--trace-ascii\fP.
-
-If this option is used several times, the last one will be used.
-.IP "--trace-ascii <file>"
-Enables a full trace dump of all incoming and outgoing data, including
-descriptive information, to the given output file. Use "-" as filename to have
-the output sent to stdout.
-
-This is very similar to \fI--trace\fP, but leaves out the hex part and only
-shows the ASCII part of the dump. It makes smaller output that might be easier
-to read for untrained humans.
-
-This option overrides previous uses of \fI-v, --verbose\fP or \fI--trace\fP.
-
-If this option is used several times, the last one will be used.
-.IP "--trace-time"
-Prepends a time stamp to each trace or verbose line that curl displays.
-(Added in 7.14.0)
-.IP "-u, --user <user:password;options>"
-Specify the user name, password and optional login options to use for server
-authentication. Overrides \fI-n, --netrc\fP and \fI--netrc-optional\fP.
-
-If you simply specify the user name, with or without the login options, curl
-will prompt for a password.
-
-If you use an SSPI-enabled curl binary and perform NTLM authentication, you
-can force curl to select the user name and password from your environment by
-simply specifying a single colon with this option: "-u :" or by specfying the
-login options on their own, for example "-u ;auth=NTLM".
-
-You can use the optional login options part to specify protocol specific
-options that may be used during authentication. At present only IMAP, POP3 and
-SMTP support login options as part of the user login information. For more
-information about the login options please see RFC 2384, RFC 5092 and IETF
-draft draft-earhart-url-smtp-00.txt (Added in 7.31.0).
-
-If this option is used several times, the last one will be used.
-.IP "-U, --proxy-user <user:password>"
-Specify the user name and password to use for proxy authentication.
-
-If you use an SSPI-enabled curl binary and do NTLM authentication, you can
-force curl to pick up the user name and password from your environment by
-simply specifying a single colon with this option: "-U :".
-
-If this option is used several times, the last one will be used.
-.IP "--url <URL>"
-Specify a URL to fetch. This option is mostly handy when you want to specify
-URL(s) in a config file.
-
-This option may be used any number of times. To control where this URL is
-written, use the \fI-o, --output\fP or the \fI-O, --remote-name\fP options.
-.IP "-v, --verbose"
-Makes the fetching more verbose/talkative. Mostly useful for debugging. A line
-starting with '>' means "header data" sent by curl, '<' means "header data"
-received by curl that is hidden in normal cases, and a line starting with '*'
-means additional info provided by curl.
-
-Note that if you only want HTTP headers in the output, \fI-i, --include\fP
-might be the option you're looking for.
-
-If you think this option still doesn't give you enough details, consider using
-\fI--trace\fP or \fI--trace-ascii\fP instead.
-
-This option overrides previous uses of \fI--trace-ascii\fP or \fI--trace\fP.
-
-Use \fI-s, --silent\fP to make curl quiet.
-.IP "-w, --write-out <format>"
-Defines what to display on stdout after a completed and successful
-operation. The format is a string that may contain plain text mixed with any
-number of variables. The string can be specified as "string", to get read from
-a particular file you specify it "@filename" and to tell curl to read the
-format from stdin you write "@-".
-
-The variables present in the output format will be substituted by the value or
-text that curl thinks fit, as described below. All variables are specified
-as %{variable_name} and to output a normal % you just write them as
-%%. You can output a newline by using \\n, a carriage return with \\r and a tab
-space with \\t.
-
-.B NOTE:
-The %-symbol is a special symbol in the win32-environment, where all
-occurrences of % must be doubled when using this option.
-
-The variables available are:
-.RS
-.TP 15
-.B content_type
-The Content-Type of the requested document, if there was any.
-.TP
-.B filename_effective
-The ultimate filename that curl writes out to. This is only meaningful if curl
-is told to write to a file with the \fI--remote-name\fP or \fI--output\fP
-option. It's most useful in combination with the \fI--remote-header-name\fP
-option. (Added in 7.25.1)
-.TP
-.B ftp_entry_path
-The initial path curl ended up in when logging on to the remote FTP
-server. (Added in 7.15.4)
-.TP
-.B http_code
-The numerical response code that was found in the last retrieved HTTP(S) or
-FTP(s) transfer. In 7.18.2 the alias \fBresponse_code\fP was added to show the
-same info.
-.TP
-.B http_connect
-The numerical code that was found in the last response (from a proxy) to a
-curl CONNECT request. (Added in 7.12.4)
-.TP
-.B local_ip
-The IP address of the local end of the most recently done connection - can be
-either IPv4 or IPv6 (Added in 7.29.0)
-.TP
-.B local_port
-The local port number of the most recently done connection (Added in 7.29.0)
-.TP
-.B num_connects
-Number of new connects made in the recent transfer. (Added in 7.12.3)
-.TP
-.B num_redirects
-Number of redirects that were followed in the request. (Added in 7.12.3)
-.TP
-.B redirect_url
-When an HTTP request was made without -L to follow redirects, this variable
-will show the actual URL a redirect \fIwould\fP take you to. (Added in 7.18.2)
-.TP
-.B remote_ip
-The remote IP address of the most recently done connection - can be either
-IPv4 or IPv6 (Added in 7.29.0)
-.TP
-.B remote_port
-The remote port number of the most recently done connection (Added in 7.29.0)
-.TP
-.B size_download
-The total amount of bytes that were downloaded.
-.TP
-.B size_header
-The total amount of bytes of the downloaded headers.
-.TP
-.B size_request
-The total amount of bytes that were sent in the HTTP request.
-.TP
-.B size_upload
-The total amount of bytes that were uploaded.
-.TP
-.B speed_download
-The average download speed that curl measured for the complete download. Bytes
-per second.
-.TP
-.B speed_upload
-The average upload speed that curl measured for the complete upload. Bytes per
-second.
-.TP
-.B ssl_verify_result
-The result of the SSL peer certificate verification that was requested. 0
-means the verification was successful. (Added in 7.19.0)
-.TP
-.B time_appconnect
-The time, in seconds, it took from the start until the SSL/SSH/etc
-connect/handshake to the remote host was completed. (Added in 7.19.0)
-.TP
-.B time_connect
-The time, in seconds, it took from the start until the TCP connect to the
-remote host (or proxy) was completed.
-.TP
-.B time_namelookup
-The time, in seconds, it took from the start until the name resolving was
-completed.
-.TP
-.B time_pretransfer
-The time, in seconds, it took from the start until the file transfer was just
-about to begin. This includes all pre-transfer commands and negotiations that
-are specific to the particular protocol(s) involved.
-.TP
-.B time_redirect
-The time, in seconds, it took for all redirection steps include name lookup,
-connect, pretransfer and transfer before the final transaction was
-started. time_redirect shows the complete execution time for multiple
-redirections. (Added in 7.12.3)
-.TP
-.B time_starttransfer
-The time, in seconds, it took from the start until the first byte was just
-about to be transferred. This includes time_pretransfer and also the time the
-server needed to calculate the result.
-.TP
-.B time_total
-The total time, in seconds, that the full operation lasted. The time will be
-displayed with millisecond resolution.
-.TP
-.B url_effective
-The URL that was fetched last. This is most meaningful if you've told curl
-to follow location: headers.
-.RE
-
-If this option is used several times, the last one will be used.
-.IP "-x, --proxy <[protocol://][user:password@]proxyhost[:port]>"
-Use the specified proxy.
-
-The proxy string can be specified with a protocol:// prefix to specify
-alternative proxy protocols. Use socks4://, socks4a://, socks5:// or
-socks5h:// to request the specific SOCKS version to be used. No protocol
-specified, http:// and all others will be treated as HTTP proxies. (The
-protocol support was added in curl 7.21.7)
-
-If the port number is not specified in the proxy string, it is assumed to be
-1080.
-
-This option overrides existing environment variables that set the proxy to
-use. If there's an environment variable setting a proxy, you can set proxy to
-\&"" to override it.
-
-All operations that are performed over an HTTP proxy will transparently be
-converted to HTTP. It means that certain protocol specific operations might
-not be available. This is not the case if you can tunnel through the proxy, as
-one with the \fI-p, --proxytunnel\fP option.
-
-User and password that might be provided in the proxy string are URL decoded
-by curl. This allows you to pass in special characters such as @ by using %40
-or pass in a colon with %3a.
-
-The proxy host can be specified the exact same way as the proxy environment
-variables, including the protocol prefix (http://) and the embedded user +
-password.
-
-If this option is used several times, the last one will be used.
-.IP "-X, --request <command>"
-(HTTP) Specifies a custom request method to use when communicating with the
-HTTP server. The specified request will be used instead of the method
-otherwise used (which defaults to GET). Read the HTTP 1.1 specification for
-details and explanations. Common additional HTTP requests include PUT and
-DELETE, but related technologies like WebDAV offers PROPFIND, COPY, MOVE and
-more.
-
-Normally you don't need this option. All sorts of GET, HEAD, POST and PUT
-requests are rather invoked by using dedicated command line options.
-
-This option only changes the actual word used in the HTTP request, it does not
-alter the way curl behaves. So for example if you want to make a proper HEAD
-request, using -X HEAD will not suffice. You need to use the \fI-I, --head\fP
-option.
-
-(FTP)
-Specifies a custom FTP command to use instead of LIST when doing file lists
-with FTP.
-
-If this option is used several times, the last one will be used.
-
-.IP "--xattr"
-When saving output to a file, this option tells curl to store certain file
-metadata in extended file attributes. Currently, the URL is stored in the
-xdg.origin.url attribute and, for HTTP, the content type is stored in
-the mime_type attribute. If the file system does not support extended
-attributes, a warning is issued.
-
-.IP "-y, --speed-time <time>"
-If a download is slower than speed-limit bytes per second during a speed-time
-period, the download gets aborted. If speed-time is used, the default
-speed-limit will be 1 unless set with \fI-Y\fP.
-
-This option controls transfers and thus will not affect slow connects etc. If
-this is a concern for you, try the \fI--connect-timeout\fP option.
-
-If this option is used several times, the last one will be used.
-.IP "-Y, --speed-limit <speed>"
-If a download is slower than this given speed (in bytes per second) for
-speed-time seconds it gets aborted. speed-time is set with \fI-y\fP and is 30
-if not set.
-
-If this option is used several times, the last one will be used.
-.IP "-z, --time-cond <date expression>|<file>"
-(HTTP/FTP) Request a file that has been modified later than the given time and
-date, or one that has been modified before that time. The <date expression>
-can be all sorts of date strings or if it doesn't match any internal ones, it
-is taken as a filename and tries to get the modification date (mtime) from
-<file> instead. See the \fIcurl_getdate(3)\fP man pages for date expression
-details.
-
-Start the date expression with a dash (-) to make it request for a document
-that is older than the given date/time, default is a document that is newer
-than the specified date/time.
-
-If this option is used several times, the last one will be used.
-.IP "-h, --help"
-Usage help.
-.IP "-M, --manual"
-Manual. Display the huge help text.
-.IP "-V, --version"
-Displays information about curl and the libcurl version it uses.
-
-The first line includes the full version of curl, libcurl and other 3rd party
-libraries linked with the executable.
-
-The second line (starts with "Protocols:") shows all protocols that libcurl
-reports to support.
-
-The third line (starts with "Features:") shows specific features libcurl
-reports to offer. Available features include:
-.RS
-.IP "IPv6"
-You can use IPv6 with this.
-.IP "krb4"
-Krb4 for FTP is supported.
-.IP "SSL"
-HTTPS and FTPS are supported.
-.IP "libz"
-Automatic decompression of compressed files over HTTP is supported.
-.IP "NTLM"
-NTLM authentication is supported.
-.IP "GSS-Negotiate"
-Negotiate authentication and krb5 for FTP is supported.
-.IP "Debug"
-This curl uses a libcurl built with Debug. This enables more error-tracking
-and memory debugging etc. For curl-developers only!
-.IP "AsynchDNS"
-This curl uses asynchronous name resolves.
-.IP "SPNEGO"
-SPNEGO Negotiate authentication is supported.
-.IP "Largefile"
-This curl supports transfers of large files, files larger than 2GB.
-.IP "IDN"
-This curl supports IDN - international domain names.
-.IP "SSPI"
-SSPI is supported. If you use NTLM and set a blank user name, curl will
-authenticate with your current user and password.
-.IP "TLS-SRP"
-SRP (Secure Remote Password) authentication is supported for TLS.
-.IP "Metalink"
-This curl supports Metalink (both version 3 and 4 (RFC 5854)), which
-describes mirrors and hashes. curl will use mirrors for failover if
-there are errors (such as the file or server not being available).
-.RE
-.SH FILES
-.I ~/.curlrc
-.RS
-Default config file, see \fI-K, --config\fP for details.
-.SH ENVIRONMENT
-The environment variables can be specified in lower case or upper case. The
-lower case version has precedence. http_proxy is an exception as it is only
-available in lower case.
-
-Using an environment variable to set the proxy has the same effect as using
-the \fI--proxy\fP option.
-
-.IP "http_proxy [protocol://]<host>[:port]"
-Sets the proxy server to use for HTTP.
-.IP "HTTPS_PROXY [protocol://]<host>[:port]"
-Sets the proxy server to use for HTTPS.
-.IP "[url-protocol]_PROXY [protocol://]<host>[:port]"
-Sets the proxy server to use for [url-protocol], where the protocol is a
-protocol that curl supports and as specified in a URL. FTP, FTPS, POP3, IMAP,
-SMTP, LDAP etc.
-.IP "ALL_PROXY [protocol://]<host>[:port]"
-Sets the proxy server to use if no protocol-specific proxy is set.
-.IP "NO_PROXY <comma-separated list of hosts>"
-list of host names that shouldn't go through any proxy. If set to a asterisk
-\&'*' only, it matches all hosts.
-.SH "PROXY PROTOCOL PREFIXES"
-Since curl version 7.21.7, the proxy string may be specified with a
-protocol:// prefix to specify alternative proxy protocols.
-
-If no protocol is specified in the proxy string or if the string doesn't match
-a supported one, the proxy will be treated as an HTTP proxy.
-
-The supported proxy protocol prefixes are as follows:
-.IP "socks4://"
-Makes it the equivalent of \fI--socks4\fP
-.IP "socks4a://"
-Makes it the equivalent of \fI--socks4a\fP
-.IP "socks5://"
-Makes it the equivalent of \fI--socks5\fP
-.IP "socks5h://"
-Makes it the equivalent of \fI--socks5-hostname\fP
-.SH EXIT CODES
-There are a bunch of different error codes and their corresponding error
-messages that may appear during bad conditions. At the time of this writing,
-the exit codes are:
-.IP 1
-Unsupported protocol. This build of curl has no support for this protocol.
-.IP 2
-Failed to initialize.
-.IP 3
-URL malformed. The syntax was not correct.
-.IP 4
-A feature or option that was needed to perform the desired request was not
-enabled or was explicitly disabled at build-time. To make curl able to do
-this, you probably need another build of libcurl!
-.IP 5
-Couldn't resolve proxy. The given proxy host could not be resolved.
-.IP 6
-Couldn't resolve host. The given remote host was not resolved.
-.IP 7
-Failed to connect to host.
-.IP 8
-FTP weird server reply. The server sent data curl couldn't parse.
-.IP 9
-FTP access denied. The server denied login or denied access to the particular
-resource or directory you wanted to reach. Most often you tried to change to a
-directory that doesn't exist on the server.
-.IP 11
-FTP weird PASS reply. Curl couldn't parse the reply sent to the PASS request.
-.IP 13
-FTP weird PASV reply, Curl couldn't parse the reply sent to the PASV request.
-.IP 14
-FTP weird 227 format. Curl couldn't parse the 227-line the server sent.
-.IP 15
-FTP can't get host. Couldn't resolve the host IP we got in the 227-line.
-.IP 17
-FTP couldn't set binary. Couldn't change transfer method to binary.
-.IP 18
-Partial file. Only a part of the file was transferred.
-.IP 19
-FTP couldn't download/access the given file, the RETR (or similar) command
-failed.
-.IP 21
-FTP quote error. A quote command returned error from the server.
-.IP 22
-HTTP page not retrieved. The requested url was not found or returned another
-error with the HTTP error code being 400 or above. This return code only
-appears if \fI-f, --fail\fP is used.
-.IP 23
-Write error. Curl couldn't write data to a local filesystem or similar.
-.IP 25
-FTP couldn't STOR file. The server denied the STOR operation, used for FTP
-uploading.
-.IP 26
-Read error. Various reading problems.
-.IP 27
-Out of memory. A memory allocation request failed.
-.IP 28
-Operation timeout. The specified time-out period was reached according to the
-conditions.
-.IP 30
-FTP PORT failed. The PORT command failed. Not all FTP servers support the PORT
-command, try doing a transfer using PASV instead!
-.IP 31
-FTP couldn't use REST. The REST command failed. This command is used for
-resumed FTP transfers.
-.IP 33
-HTTP range error. The range "command" didn't work.
-.IP 34
-HTTP post error. Internal post-request generation error.
-.IP 35
-SSL connect error. The SSL handshaking failed.
-.IP 36
-FTP bad download resume. Couldn't continue an earlier aborted download.
-.IP 37
-FILE couldn't read file. Failed to open the file. Permissions?
-.IP 38
-LDAP cannot bind. LDAP bind operation failed.
-.IP 39
-LDAP search failed.
-.IP 41
-Function not found. A required LDAP function was not found.
-.IP 42
-Aborted by callback. An application told curl to abort the operation.
-.IP 43
-Internal error. A function was called with a bad parameter.
-.IP 45
-Interface error. A specified outgoing interface could not be used.
-.IP 47
-Too many redirects. When following redirects, curl hit the maximum amount.
-.IP 48
-Unknown option specified to libcurl. This indicates that you passed a weird
-option to curl that was passed on to libcurl and rejected. Read up in the
-manual!
-.IP 49
-Malformed telnet option.
-.IP 51
-The peer's SSL certificate or SSH MD5 fingerprint was not OK.
-.IP 52
-The server didn't reply anything, which here is considered an error.
-.IP 53
-SSL crypto engine not found.
-.IP 54
-Cannot set SSL crypto engine as default.
-.IP 55
-Failed sending network data.
-.IP 56
-Failure in receiving network data.
-.IP 58
-Problem with the local certificate.
-.IP 59
-Couldn't use specified SSL cipher.
-.IP 60
-Peer certificate cannot be authenticated with known CA certificates.
-.IP 61
-Unrecognized transfer encoding.
-.IP 62
-Invalid LDAP URL.
-.IP 63
-Maximum file size exceeded.
-.IP 64
-Requested FTP SSL level failed.
-.IP 65
-Sending the data requires a rewind that failed.
-.IP 66
-Failed to initialise SSL Engine.
-.IP 67
-The user name, password, or similar was not accepted and curl failed to log in.
-.IP 68
-File not found on TFTP server.
-.IP 69
-Permission problem on TFTP server.
-.IP 70
-Out of disk space on TFTP server.
-.IP 71
-Illegal TFTP operation.
-.IP 72
-Unknown TFTP transfer ID.
-.IP 73
-File already exists (TFTP).
-.IP 74
-No such user (TFTP).
-.IP 75
-Character conversion failed.
-.IP 76
-Character conversion functions required.
-.IP 77
-Problem with reading the SSL CA cert (path? access rights?).
-.IP 78
-The resource referenced in the URL does not exist.
-.IP 79
-An unspecified error occurred during the SSH session.
-.IP 80
-Failed to shut down the SSL connection.
-.IP 82
-Could not load CRL file, missing or wrong format (added in 7.19.0).
-.IP 83
-Issuer check failed (added in 7.19.0).
-.IP 84
-The FTP PRET command failed
-.IP 85
-RTSP: mismatch of CSeq numbers
-.IP 86
-RTSP: mismatch of Session Identifiers
-.IP 87
-unable to parse FTP file list
-.IP 88
-FTP chunk callback reported error
-.IP XX
-More error codes will appear here in future releases. The existing ones
-are meant to never change.
-.SH AUTHORS / CONTRIBUTORS
-Daniel Stenberg is the main author, but the whole list of contributors is
-found in the separate THANKS file.
-.SH WWW
-http://curl.haxx.se
-.SH FTP
-ftp://ftp.sunet.se/pub/www/utilities/curl/
-.SH "SEE ALSO"
-.BR ftp (1),
-.BR wget (1)
diff --git a/libs/libcurl/docs/curl.html b/libs/libcurl/docs/curl.html
deleted file mode 100644
index c04a69633d..0000000000
--- a/libs/libcurl/docs/curl.html
+++ /dev/null
@@ -1,961 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html><head>
-<title>curl man page</title>
-<meta name="generator" content="roffit">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl - transfer a URL <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">curl [options]</span> <a class="emphasis" href="#URL">[URL...]</a> <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0"><span Class="bold">curl</span> is a tool to transfer data from or to a server, using one of the supported protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP). The command is designed to work without user interaction.
-<p class="level0">curl offers a busload of useful tricks like proxy support, user authentication, FTP upload, HTTP post, SSL connections, cookies, file transfer resume, Metalink, and more. As you will see below, the number of features will make your head spin!
-<p class="level0">curl is powered by libcurl for all transfer-related features. See <span Class="manpage">libcurl (3)</span> for details. <a name="URL"></a><h2 class="nroffsh">URL</h2>
-<p class="level0">The URL syntax is protocol-dependent. You'll find a detailed description in <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986</a>.
-<p class="level0">You can specify multiple URLs or parts of URLs by writing part sets within braces as in:
-<p class="level0">&nbsp;<a href="http://site">http://site</a>.{one,two,three}.com
-<p class="level0">or you can get sequences of alphanumeric series by using [] as in:
-<p class="level0">&nbsp;<a href="ftp://ftp.numericals.com/file">ftp://ftp.numericals.com/file</a>[1-100].txt &nbsp;<a href="ftp://ftp.numericals.com/file">ftp://ftp.numericals.com/file</a>[001-100].txt (with leading zeros) &nbsp;<a href="ftp://ftp.letters.com/file">ftp://ftp.letters.com/file</a>[a-z].txt
-<p class="level0">Nested sequences are not supported, but you can use several ones next to each other:
-<p class="level0">&nbsp;<a href="http://any.org/archive">http://any.org/archive</a>[1996-1999]/vol[1-4]/part{a,b,c}.html
-<p class="level0">You can specify any amount of URLs on the command line. They will be fetched in a sequential manner in the specified order.
-<p class="level0">You can specify a step counter for the ranges to get every Nth number or letter:
-<p class="level0">&nbsp;<a href="http://www.numericals.com/file">http://www.numericals.com/file</a>[1-100:10].txt &nbsp;<a href="http://www.letters.com/file">http://www.letters.com/file</a>[a-z:2].txt
-<p class="level0">If you specify URL without protocol:// prefix, curl will attempt to guess what protocol you might want. It will then default to HTTP but try other protocols based on often-used host name prefixes. For example, for host names starting with "ftp." curl will assume you want to speak FTP.
-<p class="level0">curl will do its best to use what you pass to it as a URL. It is not trying to validate it as a syntactically correct URL by any means but is instead <span Class="bold">very</span> liberal with what it accepts.
-<p class="level0">curl will attempt to re-use connections for multiple file transfers, so that getting many files from the same server will not do multiple connects / handshakes. This improves speed. Of course this is only done on files specified on a single command line and cannot be used between separate curl invokes. <a name="PROGRESS"></a><h2 class="nroffsh">PROGRESS METER</h2>
-<p class="level0">curl normally displays a progress meter during operations, indicating the amount of transferred data, transfer speeds and estimated time left, etc.
-<p class="level0">curl displays this data to the terminal by default, so if you invoke curl to do an operation and it is about to write data to the terminal, it <span Class="emphasis">disables</span> the progress meter as otherwise it would mess up the output mixing progress meter and response data.
-<p class="level0">If you want a progress meter for HTTP POST or PUT requests, you need to redirect the response output to a file, using shell redirect (&gt;), -o [file] or similar.
-<p class="level0">It is not the same case for FTP upload as that operation does not spit out any response data to the terminal.
-<p class="level0">If you prefer a progress "bar" instead of the regular meter, <a class="emphasis" href="#-">-#</a> is your friend. <a name="OPTIONS"></a><h2 class="nroffsh">OPTIONS</h2>
-<p class="level0">Options start with one or two dashes. Many of the options require an addition value next to it.
-<p class="level0">The short "single-dash" form of the options, -d for example, may be used with or without a space between it and its value, although a space is a recommended separator. The long "double-dash" form, --data for example, requires a space between it and its value.
-<p class="level0">Short version options that don't need any additional values can be used immediately next to each other, like for example you can specify all the options -O, -L and -v at once as -OLv.
-<p class="level0">In general, all boolean options are enabled with --<span Class="bold">option</span> and yet again disabled with --<span Class="bold">no-</span>option. That is, you use the exact same option name but prefix it with "no-". However, in this list we mostly only list and show the --option version of them. (This concept with --no options was added in 7.19.0. Previously most options were toggled on/off on repeated use of the same command line option.)
-<p class="level0"><a name="-"></a><span class="nroffip">-#, --progress-bar</span>
-<p class="level1">Make curl display progress as a simple progress bar instead of the standard, more informational, meter.
-<p class="level0"><a name="-0"></a><span class="nroffip">-0, --http1.0</span>
-<p class="level1">(HTTP) Tells curl to use HTTP version 1.0 instead of using its internally preferred: HTTP 1.1.
-<p class="level0"><a name="--http11"></a><span class="nroffip">--http1.1</span>
-<p class="level1">(HTTP) Tells curl to use HTTP version 1.1. This is the internal default version. (Added in 7.33.0)
-<p class="level0"><a name="--http20"></a><span class="nroffip">--http2.0</span>
-<p class="level1">(HTTP) Tells curl to issue its requests using HTTP 2.0. This requires that the underlying libcurl was built to support it. (Added in 7.33.0)
-<p class="level0"><a name="-1"></a><span class="nroffip">-1, --tlsv1</span>
-<p class="level1">(SSL) Forces curl to use TLS version 1 when negotiating with a remote TLS server.
-<p class="level0"><a name="-2"></a><span class="nroffip">-2, --sslv2</span>
-<p class="level1">(SSL) Forces curl to use SSL version 2 when negotiating with a remote SSL server.
-<p class="level0"><a name="-3"></a><span class="nroffip">-3, --sslv3</span>
-<p class="level1">(SSL) Forces curl to use SSL version 3 when negotiating with a remote SSL server.
-<p class="level0"><a name="-4"></a><span class="nroffip">-4, --ipv4</span>
-<p class="level1">If curl is capable of resolving an address to multiple IP versions (which it is if it is IPv6-capable), this option tells curl to resolve names to IPv4 addresses only.
-<p class="level0"><a name="-6"></a><span class="nroffip">-6, --ipv6</span>
-<p class="level1">If curl is capable of resolving an address to multiple IP versions (which it is if it is IPv6-capable), this option tells curl to resolve names to IPv6 addresses only.
-<p class="level0"><a name="-a"></a><span class="nroffip">-a, --append</span>
-<p class="level1">(FTP/SFTP) When used in an upload, this will tell curl to append to the target file instead of overwriting it. If the file doesn't exist, it will be created. Note that this flag is ignored by some SSH servers (including OpenSSH).
-<p class="level0"><a name="-A"></a><span class="nroffip">-A, --user-agent &lt;agent string&gt;</span>
-<p class="level1">(HTTP) Specify the User-Agent string to send to the HTTP server. Some badly done CGIs fail if this field isn't set to "Mozilla/4.0". To encode blanks in the string, surround the string with single quote marks. This can also be set with the <a class="emphasis" href="#-H">-H, --header</a> option of course.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--anyauth"></a><span class="nroffip">--anyauth</span>
-<p class="level1">(HTTP) Tells curl to figure out authentication method by itself, and use the most secure one the remote site claims to support. This is done by first doing a request and checking the response-headers, thus possibly inducing an extra network round-trip. This is used instead of setting a specific authentication method, which you can do with <a class="emphasis" href="#--basic">--basic</a>, <a class="emphasis" href="#--digest">--digest</a>, <a class="emphasis" href="#--ntlm">--ntlm</a>, and <a class="emphasis" href="#--negotiate">--negotiate</a>.
-<p class="level1">Note that using --anyauth is not recommended if you do uploads from stdin, since it may require data to be sent twice and then the client must be able to rewind. If the need should arise when uploading from stdin, the upload operation will fail.
-<p class="level0"><a name="-b"></a><span class="nroffip">-b, --cookie &lt;name=data&gt;</span>
-<p class="level1">(HTTP) Pass the data to the HTTP server as a cookie. It is supposedly the data previously received from the server in a "Set-Cookie:" line. The data should be in the format "NAME1=VALUE1; NAME2=VALUE2".
-<p class="level1">If no '=' symbol is used in the line, it is treated as a filename to use to read previously stored cookie lines from, which should be used in this session if they match. Using this method also activates the "cookie parser" which will make curl record incoming cookies too, which may be handy if you're using this in combination with the <a class="emphasis" href="#-L">-L, --location</a> option. The file format of the file to read cookies from should be plain HTTP headers or the Netscape/Mozilla cookie file format.
-<p class="level1"><span Class="bold">NOTE</span> that the file specified with <a class="emphasis" href="#-b">-b, --cookie</a> is only used as input. No cookies will be stored in the file. To store cookies, use the <a class="emphasis" href="#-c">-c, --cookie-jar</a> option or you could even save the HTTP headers to a file using <a class="emphasis" href="#-D">-D, --dump-header</a>!
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-B"></a><span class="nroffip">-B, --use-ascii</span>
-<p class="level1">(FTP/LDAP) Enable ASCII transfer. For FTP, this can also be enforced by using an URL that ends with ";type=A". This option causes data sent to stdout to be in text mode for win32 systems.
-<p class="level0"><a name="--basic"></a><span class="nroffip">--basic</span>
-<p class="level1">(HTTP) Tells curl to use HTTP Basic authentication. This is the default and this option is usually pointless, unless you use it to override a previously set option that sets a different authentication method (such as <a class="emphasis" href="#--ntlm">--ntlm</a>, <a class="emphasis" href="#--digest">--digest</a>, or <a class="emphasis" href="#--negotiate">--negotiate</a>).
-<p class="level0"><a name="-c"></a><span class="nroffip">-c, --cookie-jar &lt;file name&gt;</span>
-<p class="level1">(HTTP) Specify to which file you want curl to write all cookies after a completed operation. Curl writes all cookies previously read from a specified file as well as all cookies received from remote server(s). If no cookies are known, no file will be written. The file will be written using the Netscape cookie file format. If you set the file name to a single dash, "-", the cookies will be written to stdout.
-<p class="level1">This command line option will activate the cookie engine that makes curl record and use cookies. Another way to activate it is to use the <span class="emphasis">-b, --cookie</span> option.
-<p class="level1">If the cookie jar can't be created or written to, the whole curl operation won't fail or even report an error clearly. Using -v will get a warning displayed, but that is the only visible feedback you get about this possibly lethal situation.
-<p class="level1">If this option is used several times, the last specified file name will be used.
-<p class="level0"><a name="-C"></a><span class="nroffip">-C, --continue-at &lt;offset&gt;</span>
-<p class="level1">Continue/Resume a previous file transfer at the given offset. The given offset is the exact number of bytes that will be skipped, counting from the beginning of the source file before it is transferred to the destination. If used with uploads, the FTP server command SIZE will not be used by curl.
-<p class="level1">Use "-C -" to tell curl to automatically find out where/how to resume the transfer. It then uses the given output/input files to figure that out.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--ciphers"></a><span class="nroffip">--ciphers &lt;list of ciphers&gt;</span>
-<p class="level1">(SSL) Specifies which ciphers to use in the connection. The list of ciphers must specify valid ciphers. Read up on SSL cipher list details on this URL: <span Class="emphasis"><a href="http://www.openssl.org/docs/apps/ciphers.html">http://www.openssl.org/docs/apps/ciphers.html</a></span>
-<p class="level1">NSS ciphers are done differently than OpenSSL and GnuTLS. The full list of NSS ciphers is in the NSSCipherSuite entry at this URL: <span Class="emphasis"><a href="http://git.fedorahosted.org/cgit/mod_nss.git/plain/docs/mod_nss.html">http://git.fedorahosted.org/cgit/mod_nss.git/plain/docs/mod_nss.html</a>#Directives</span>
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--compressed"></a><span class="nroffip">--compressed</span>
-<p class="level1">(HTTP) Request a compressed response using one of the algorithms curl supports, and save the uncompressed document. If this option is used and the server sends an unsupported encoding, curl will report an error.
-<p class="level0"><a name="--connect-timeout"></a><span class="nroffip">--connect-timeout &lt;seconds&gt;</span>
-<p class="level1">Maximum time in seconds that you allow the connection to the server to take. This only limits the connection phase, once curl has connected this option is of no more use. Since 7.32.0, this option accepts decimal values, but the actual timeout will decrease in accuracy as the specified timeout increases in decimal precision. See also the <a class="emphasis" href="#-m">-m, --max-time</a> option.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--create-dirs"></a><span class="nroffip">--create-dirs</span>
-<p class="level1">When used in conjunction with the <a class="emphasis" href="#-o">-o</a> option, curl will create the necessary local directory hierarchy as needed. This option creates the dirs mentioned with the <a class="emphasis" href="#-o">-o</a> option, nothing else. If the <a class="emphasis" href="#-o">-o</a> file name uses no dir or if the dirs it mentions already exist, no dir will be created.
-<p class="level1">To create remote directories when using FTP or SFTP, try <a class="emphasis" href="#--ftp-create-dirs">--ftp-create-dirs</a>.
-<p class="level0"><a name="--crlf"></a><span class="nroffip">--crlf</span>
-<p class="level1">(FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390).
-<p class="level0"><a name="--crlfile"></a><span class="nroffip">--crlfile &lt;file&gt;</span>
-<p class="level1">(HTTPS/FTPS) Provide a file using PEM format with a Certificate Revocation List that may specify peer certificates that are to be considered revoked.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level1">(Added in 7.19.7)
-<p class="level0"><a name="-d"></a><span class="nroffip">-d, --data &lt;data&gt;</span>
-<p class="level1">(HTTP) Sends the specified data in a POST request to the HTTP server, in the same way that a browser does when a user has filled in an HTML form and presses the submit button. This will cause curl to pass the data to the server using the content-type application/x-www-form-urlencoded. Compare to <a class="emphasis" href="#-F">-F, --form</a>.
-<p class="level1"><a class="emphasis" href="#-d">-d, --data</a> is the same as <a class="emphasis" href="#--data-ascii">--data-ascii</a>. To post data purely binary, you should instead use the <a class="emphasis" href="#--data-binary">--data-binary</a> option. To URL-encode the value of a form field you may use <a class="emphasis" href="#--data-urlencode">--data-urlencode</a>.
-<p class="level1">If any of these options is used more than once on the same command line, the data pieces specified will be merged together with a separating &-symbol. Thus, using '-d name=daniel -d skill=lousy' would generate a post chunk that looks like 'name=daniel&skill=lousy'.
-<p class="level1">If you start the data with the letter @, the rest should be a file name to read the data from, or - if you want curl to read the data from stdin. The contents of the file must already be URL-encoded. Multiple files can also be specified. Posting data from a file named 'foobar' would thus be done with <span Class="emphasis">--data</span> @foobar. When --data is told to read from a file like that, carriage returns and newlines will be stripped out.
-<p class="level0"><a name="-D"></a><span class="nroffip">-D, --dump-header &lt;file&gt;</span>
-<p class="level1">Write the protocol headers to the specified file.
-<p class="level1">This option is handy to use when you want to store the headers that an HTTP site sends to you. Cookies from the headers could then be read in a second curl invocation by using the <a class="emphasis" href="#-b">-b, --cookie</a> option! The <a class="emphasis" href="#-c">-c, --cookie-jar</a> option is however a better way to store cookies.
-<p class="level1">When used in FTP, the FTP server response lines are considered being "headers" and thus are saved there.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level1">
-<p class="level0"><a name="--data-ascii"></a><span class="nroffip">--data-ascii &lt;data&gt;</span>
-<p class="level1">See <a class="emphasis" href="#-d">-d, --data</a>.
-<p class="level0"><a name="--data-binary"></a><span class="nroffip">--data-binary &lt;data&gt;</span>
-<p class="level1">(HTTP) This posts data exactly as specified with no extra processing whatsoever.
-<p class="level1">If you start the data with the letter @, the rest should be a filename. Data is posted in a similar manner as <a class="emphasis" href="#--data-ascii">--data-ascii</a> does, except that newlines and carriage returns are preserved and conversions are never done.
-<p class="level1">If this option is used several times, the ones following the first will append data as described in <a class="emphasis" href="#-d">-d, --data</a>.
-<p class="level0"><a name="--data-urlencode"></a><span class="nroffip">--data-urlencode &lt;data&gt;</span>
-<p class="level1">(HTTP) This posts data, similar to the other --data options with the exception that this performs URL-encoding. (Added in 7.18.0)
-<p class="level1">To be CGI-compliant, the &lt;data&gt; part should begin with a <span Class="emphasis">name</span> followed by a separator and a content specification. The &lt;data&gt; part can be passed to curl using one of the following syntaxes:
-<p class="level2">
-<p class="level1"><a name="content"></a><span class="nroffip">content</span>
-<p class="level2">This will make curl URL-encode the content and pass that on. Just be careful so that the content doesn't contain any = or @ symbols, as that will then make the syntax match one of the other cases below!
-<p class="level1"><a name="content"></a><span class="nroffip">=content</span>
-<p class="level2">This will make curl URL-encode the content and pass that on. The preceding = symbol is not included in the data.
-<p class="level1"><a name="namecontent"></a><span class="nroffip">name=content</span>
-<p class="level2">This will make curl URL-encode the content part and pass that on. Note that the name part is expected to be URL-encoded already.
-<p class="level1"><a name="filename"></a><span class="nroffip">@filename</span>
-<p class="level2">This will make curl load data from the given file (including any newlines), URL-encode that data and pass it on in the POST.
-<p class="level1"><a name="namefilename"></a><span class="nroffip">name@filename</span>
-<p class="level2">This will make curl load data from the given file (including any newlines), URL-encode that data and pass it on in the POST. The name part gets an equal sign appended, resulting in <span Class="emphasis">name=urlencoded-file-content</span>. Note that the name is expected to be URL-encoded already.
-<p class="level1">
-<p class="level0"><a name="--delegation"></a><span class="nroffip">--delegation LEVEL</span>
-<p class="level1">Set <span Class="emphasis">LEVEL</span> to tell the server what it is allowed to delegate when it comes to user credentials. Used with GSS/kerberos.
-<p class="level2">
-<p class="level1"><a name="none"></a><span class="nroffip">none</span>
-<p class="level2">Don't allow any delegation.
-<p class="level1"><a name="policy"></a><span class="nroffip">policy</span>
-<p class="level2">Delegates if and only if the OK-AS-DELEGATE flag is set in the Kerberos service ticket, which is a matter of realm policy.
-<p class="level1"><a name="always"></a><span class="nroffip">always</span>
-<p class="level2">Unconditionally allow the server to delegate.
-<p class="level1">
-<p class="level0"><a name="--digest"></a><span class="nroffip">--digest</span>
-<p class="level1">(HTTP) Enables HTTP Digest authentication. This is an authentication scheme that prevents the password from being sent over the wire in clear text. Use this in combination with the normal <a class="emphasis" href="#-u">-u, --user</a> option to set user name and password. See also <a class="emphasis" href="#--ntlm">--ntlm</a>, <a class="emphasis" href="#--negotiate">--negotiate</a> and <a class="emphasis" href="#--anyauth">--anyauth</a> for related options.
-<p class="level1">If this option is used several times, only the first one is used.
-<p class="level0"><a name="--disable-eprt"></a><span class="nroffip">--disable-eprt</span>
-<p class="level1">(FTP) Tell curl to disable the use of the EPRT and LPRT commands when doing active FTP transfers. Curl will normally always first attempt to use EPRT, then LPRT before using PORT, but with this option, it will use PORT right away. EPRT and LPRT are extensions to the original FTP protocol, and may not work on all servers, but they enable more functionality in a better way than the traditional PORT command.
-<p class="level1"><span Class="bold">--eprt</span> can be used to explicitly enable EPRT again and <span Class="bold">--no-eprt</span> is an alias for <a class="bold" href="#--disable-eprt">--disable-eprt</a>.
-<p class="level1">Disabling EPRT only changes the active behavior. If you want to switch to passive mode you need to not use <a class="emphasis" href="#-P">-P, --ftp-port</a> or force it with <a class="emphasis" href="#--ftp-pasv">--ftp-pasv</a>.
-<p class="level0"><a name="--disable-epsv"></a><span class="nroffip">--disable-epsv</span>
-<p class="level1">(FTP) Tell curl to disable the use of the EPSV command when doing passive FTP transfers. Curl will normally always first attempt to use EPSV before PASV, but with this option, it will not try using EPSV.
-<p class="level1"><span Class="bold">--epsv</span> can be used to explicitly enable EPSV again and <span Class="bold">--no-epsv</span> is an alias for <a class="bold" href="#--disable-epsv">--disable-epsv</a>.
-<p class="level1">Disabling EPSV only changes the passive behavior. If you want to switch to active mode you need to use <a class="emphasis" href="#-P">-P, --ftp-port</a>.
-<p class="level0"><a name="--dns-interface"></a><span class="nroffip">--dns-interface &lt;interface&gt;</span>
-<p class="level1">Tell curl to send outgoing DNS requests through &lt;interface&gt;. This option is a counterpart to <a class="emphasis" href="#--interface">--interface</a> (which does not affect DNS). The supplied string must be an interface name (not an address).
-<p class="level1">This option requires that libcurl was built with a resolver backend that supports this operation. The c-ares backend is the only such one. (Added in 7.33.0)
-<p class="level0"><a name="--dns-ipv4-addr"></a><span class="nroffip">--dns-ipv4-addr &lt;ip-address&gt;</span>
-<p class="level1">Tell curl to bind to &lt;ip-address&gt; when making IPv4 DNS requests, so that the DNS requests originate from this address. The argument should be a single IPv4 address.
-<p class="level1">This option requires that libcurl was built with a resolver backend that supports this operation. The c-ares backend is the only such one. (Added in 7.33.0)
-<p class="level0"><a name="--dns-ipv6-addr"></a><span class="nroffip">--dns-ipv6-addr &lt;ip-address&gt;</span>
-<p class="level1">Tell curl to bind to &lt;ip-address&gt; when making IPv6 DNS requests, so that the DNS requests originate from this address. The argument should be a single IPv6 address.
-<p class="level1">This option requires that libcurl was built with a resolver backend that supports this operation. The c-ares backend is the only such one. (Added in 7.33.0)
-<p class="level0"><a name="--dns-servers"></a><span class="nroffip">--dns-servers &lt;ip-address,ip-address&gt;</span>
-<p class="level1">Set the list of DNS servers to be used instead of the system default. The list of IP addresses should be separated with commas. Port numbers may also optionally be given as <span Class="emphasis">:&lt;port-number&gt;</span> after each IP address.
-<p class="level1">This option requires that libcurl was built with a resolver backend that supports this operation. The c-ares backend is the only such one. (Added in 7.33.0)
-<p class="level0"><a name="-e"></a><span class="nroffip">-e, --referer &lt;URL&gt;</span>
-<p class="level1">(HTTP) Sends the "Referer Page" information to the HTTP server. This can also be set with the <a class="emphasis" href="#-H">-H, --header</a> flag of course. When used with <a class="emphasis" href="#-L">-L, --location</a> you can append ";auto" to the --referer URL to make curl automatically set the previous URL when it follows a Location: header. The ";auto" string can be used alone, even if you don't set an initial --referer.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-E"></a><span class="nroffip">-E, --cert &lt;certificate[:password]&gt;</span>
-<p class="level1">(SSL) Tells curl to use the specified client certificate file when getting a file with HTTPS, FTPS or another SSL-based protocol. The certificate must be in PKCS#12 format if using Secure Transport, or PEM format if using any other engine. If the optional password isn't specified, it will be queried for on the terminal. Note that this option assumes a "certificate" file that is the private key and the private certificate concatenated! See <span Class="emphasis">--cert</span> and <a class="emphasis" href="#--key">--key</a> to specify them independently.
-<p class="level1">If curl is built against the NSS SSL library then this option can tell curl the nickname of the certificate to use within the NSS database defined by the environment variable SSL_DIR (or by default /etc/pki/nssdb). If the NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files may be loaded. If you want to use a file from the current directory, please precede it with "./" prefix, in order to avoid confusion with a nickname. If the nickname contains ":", it needs to be preceded by "\" so that it is not recognized as password delimiter. If the nickname contains "\", it needs to be escaped as "\\" so that it is not recognized as an escape character.
-<p class="level1">(iOS and Mac OS X only) If curl is built against Secure Transport, then the certificate string can either be the name of a certificate/private key in the system or user keychain, or the path to a PKCS#12-encoded certificate and private key. If you want to use a file from the current directory, please precede it with "./" prefix, in order to avoid confusion with a nickname.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--engine"></a><span class="nroffip">--engine &lt;name&gt;</span>
-<p class="level1">Select the OpenSSL crypto engine to use for cipher operations. Use <a class="emphasis" href="#--engine">--engine list</a> to print a list of build-time supported engines. Note that not all (or none) of the engines may be available at run-time.
-<p class="level0"><a name="--environment"></a><span class="nroffip">--environment</span>
-<p class="level1">(RISC OS ONLY) Sets a range of environment variables, using the names the <a class="emphasis" href="#-w">-w</a> option supports, to allow easier extraction of useful information after having run curl.
-<p class="level0"><a name="--egd-file"></a><span class="nroffip">--egd-file &lt;file&gt;</span>
-<p class="level1">(SSL) Specify the path name to the Entropy Gathering Daemon socket. The socket is used to seed the random engine for SSL connections. See also the <a class="emphasis" href="#--random-file">--random-file</a> option.
-<p class="level0"><a name="--cert-type"></a><span class="nroffip">--cert-type &lt;type&gt;</span>
-<p class="level1">(SSL) Tells curl what certificate type the provided certificate is in. PEM, DER and ENG are recognized types. If not specified, PEM is assumed.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--cacert"></a><span class="nroffip">--cacert &lt;CA certificate&gt;</span>
-<p class="level1">(SSL) Tells curl to use the specified certificate file to verify the peer. The file may contain multiple CA certificates. The certificate(s) must be in PEM format. Normally curl is built to use a default file for this, so this option is typically used to alter that default file.
-<p class="level1">curl recognizes the environment variable named 'CURL_CA_BUNDLE' if it is set, and uses the given path as a path to a CA cert bundle. This option overrides that variable.
-<p class="level1">The windows version of curl will automatically look for a CA certs file named &acute;curl-ca-bundle.crt&acute;, either in the same directory as curl.exe, or in the Current Working Directory, or in any folder along your PATH.
-<p class="level1">If curl is built against the NSS SSL library, the NSS PEM PKCS#11 module (libnsspem.so) needs to be available for this option to work properly.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--capath"></a><span class="nroffip">--capath &lt;CA certificate directory&gt;</span>
-<p class="level1">(SSL) Tells curl to use the specified certificate directory to verify the peer. Multiple paths can be provided by separating them with ":" (e.g. "path1:path2:path3"). The certificates must be in PEM format, and if curl is built against OpenSSL, the directory must have been processed using the c_rehash utility supplied with OpenSSL. Using <a class="emphasis" href="#--capath">--capath</a> can allow OpenSSL-powered curl to make SSL-connections much more efficiently than using <a class="emphasis" href="#--cacert">--cacert</a> if the <a class="emphasis" href="#--cacert">--cacert</a> file contains many CA certificates.
-<p class="level1">If this option is set, the default capath value will be ignored, and if it is used several times, the last one will be used.
-<p class="level0"><a name="-f"></a><span class="nroffip">-f, --fail</span>
-<p class="level1">(HTTP) Fail silently (no output at all) on server errors. This is mostly done to better enable scripts etc to better deal with failed attempts. In normal cases when an HTTP server fails to deliver a document, it returns an HTML document stating so (which often also describes why and more). This flag will prevent curl from outputting that and return error 22.
-<p class="level1">This method is not fail-safe and there are occasions where non-successful response codes will slip through, especially when authentication is involved (response codes 401 and 407).
-<p class="level0"><a name="-F"></a><span class="nroffip">-F, --form &lt;name=content&gt;</span>
-<p class="level1">(HTTP) This lets curl emulate a filled-in form in which a user has pressed the submit button. This causes curl to POST data using the Content-Type multipart/form-data according to <a href="http://www.ietf.org/rfc/rfc2388.txt">RFC 2388</a>. This enables uploading of binary files etc. To force the 'content' part to be a file, prefix the file name with an @ sign. To just get the content part from a file, prefix the file name with the symbol &lt;. The difference between @ and &lt; is then that @ makes a file get attached in the post as a file upload, while the &lt; makes a text field and just get the contents for that text field from a file.
-<p class="level1">Example, to send your password file to the server, where 'password' is the name of the form-field to which /etc/passwd will be the input:
-<p class="level1"><span Class="bold">curl</span> -F password=@/etc/passwd www.mypasswords.com
-<p class="level1">To read content from stdin instead of a file, use - as the filename. This goes for both @ and &lt; constructs.
-<p class="level1">You can also tell curl what Content-Type to use by using 'type=', in a manner similar to:
-<p class="level1"><span Class="bold">curl</span> -F "web=@index.html;type=text/html" url.com
-<p class="level1">or
-<p class="level1"><span Class="bold">curl</span> -F "name=daniel;type=text/foo" url.com
-<p class="level1">You can also explicitly change the name field of a file upload part by setting filename=, like this:
-<p class="level1"><span Class="bold">curl</span> -F "file=@localfile;filename=nameinpost" url.com
-<p class="level1">If filename/path contains ',' or ';', it must be quoted by double-quotes like:
-<p class="level1"><span Class="bold">curl</span> -F "file=@\"localfile\";filename=\"nameinpost\"" url.com
-<p class="level1">or
-<p class="level1"><span Class="bold">curl</span> -F 'file=@"localfile";filename="nameinpost"' url.com
-<p class="level1">Note that if a filename/path is quoted by double-quotes, any double-quote or backslash within the filename must be escaped by backslash.
-<p class="level1">See further examples and details in the MANUAL.
-<p class="level1">This option can be used multiple times.
-<p class="level0"><a name="--ftp-account"></a><span class="nroffip">--ftp-account [data]</span>
-<p class="level1">(FTP) When an FTP server asks for "account data" after user name and password has been provided, this data is sent off using the ACCT command. (Added in 7.13.0)
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--ftp-alternative-to-user"></a><span class="nroffip">--ftp-alternative-to-user &lt;command&gt;</span>
-<p class="level1">(FTP) If authenticating with the USER and PASS commands fails, send this command. When connecting to Tumbleweed's Secure Transport server over FTPS using a client certificate, using "SITE AUTH" will tell the server to retrieve the username from the certificate. (Added in 7.15.5)
-<p class="level0"><a name="--ftp-create-dirs"></a><span class="nroffip">--ftp-create-dirs</span>
-<p class="level1">(FTP/SFTP) When an FTP or SFTP URL/operation uses a path that doesn't currently exist on the server, the standard behavior of curl is to fail. Using this option, curl will instead attempt to create missing directories.
-<p class="level0"><a name="--ftp-method"></a><span class="nroffip">--ftp-method [method]</span>
-<p class="level1">(FTP) Control what method curl should use to reach a file on an FTP(S) server. The method argument should be one of the following alternatives:
-<p class="level2">
-<p class="level1"><a name="multicwd"></a><span class="nroffip">multicwd</span>
-<p class="level2">curl does a single CWD operation for each path part in the given URL. For deep hierarchies this means very many commands. This is how <a href="http://www.ietf.org/rfc/rfc1738.txt">RFC 1738</a> says it should be done. This is the default but the slowest behavior.
-<p class="level1"><a name="nocwd"></a><span class="nroffip">nocwd</span>
-<p class="level2">curl does no CWD at all. curl will do SIZE, RETR, STOR etc and give a full path to the server for all these commands. This is the fastest behavior.
-<p class="level1"><a name="singlecwd"></a><span class="nroffip">singlecwd</span>
-<p class="level2">curl does one CWD with the full target directory and then operates on the file "normally" (like in the multicwd case). This is somewhat more standards compliant than 'nocwd' but without the full penalty of 'multicwd'.
-<p class="level1">(Added in 7.15.1)
-<p class="level0"><a name="--ftp-pasv"></a><span class="nroffip">--ftp-pasv</span>
-<p class="level1">(FTP) Use passive mode for the data connection. Passive is the internal default behavior, but using this option can be used to override a previous <span Class="emphasis">-P/-ftp-port</span> option. (Added in 7.11.0)
-<p class="level1">If this option is used several times, only the first one is used. Undoing an enforced passive really isn't doable but you must then instead enforce the correct <a class="emphasis" href="#-P">-P, --ftp-port</a> again.
-<p class="level1">Passive mode means that curl will try the EPSV command first and then PASV, unless <a class="emphasis" href="#--disable-epsv">--disable-epsv</a> is used.
-<p class="level0"><a name="--ftp-skip-pasv-ip"></a><span class="nroffip">--ftp-skip-pasv-ip</span>
-<p class="level1">(FTP) Tell curl to not use the IP address the server suggests in its response to curl's PASV command when curl connects the data connection. Instead curl will re-use the same IP address it already uses for the control connection. (Added in 7.14.2)
-<p class="level1">This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
-<p class="level0"><a name="--ftp-pret"></a><span class="nroffip">--ftp-pret</span>
-<p class="level1">(FTP) Tell curl to send a PRET command before PASV (and EPSV). Certain FTP servers, mainly drftpd, require this non-standard command for directory listings as well as up and downloads in PASV mode. (Added in 7.20.x)
-<p class="level0"><a name="--ftp-ssl-ccc"></a><span class="nroffip">--ftp-ssl-ccc</span>
-<p class="level1">(FTP) Use CCC (Clear Command Channel) Shuts down the SSL/TLS layer after authenticating. The rest of the control channel communication will be unencrypted. This allows NAT routers to follow the FTP transaction. The default mode is passive. See <a class="emphasis" href="#--ftp-ssl-ccc-mode">--ftp-ssl-ccc-mode</a> for other modes. (Added in 7.16.1)
-<p class="level0"><a name="--ftp-ssl-ccc-mode"></a><span class="nroffip">--ftp-ssl-ccc-mode [active/passive]</span>
-<p class="level1">(FTP) Use CCC (Clear Command Channel) Sets the CCC mode. The passive mode will not initiate the shutdown, but instead wait for the server to do it, and will not reply to the shutdown from the server. The active mode initiates the shutdown and waits for a reply from the server. (Added in 7.16.2)
-<p class="level0"><a name="--ftp-ssl-control"></a><span class="nroffip">--ftp-ssl-control</span>
-<p class="level1">(FTP) Require SSL/TLS for the FTP login, clear for transfer. Allows secure authentication, but non-encrypted data transfers for efficiency. Fails the transfer if the server doesn't support SSL/TLS. (Added in 7.16.0) that can still be used but will be removed in a future version.
-<p class="level0"><a name="--form-string"></a><span class="nroffip">--form-string &lt;name=string&gt;</span>
-<p class="level1">(HTTP) Similar to <span Class="emphasis">--form</span> except that the value string for the named parameter is used literally. Leading '@' and '&lt;' characters, and the ';type=' string in the value have no special meaning. Use this in preference to <span Class="emphasis">--form</span> if there's any possibility that the string value may accidentally trigger the '@' or '&lt;' features of <span Class="emphasis">--form</span>.
-<p class="level0"><a name="-g"></a><span class="nroffip">-g, --globoff</span>
-<p class="level1">This option switches off the "URL globbing parser". When you set this option, you can specify URLs that contain the letters {}[] without having them being interpreted by curl itself. Note that these letters are not normal legal URL contents but they should be encoded according to the URI standard.
-<p class="level0"><a name="-G"></a><span class="nroffip">-G, --get</span>
-<p class="level1">When used, this option will make all data specified with <a class="emphasis" href="#-d">-d, --data</a> or <a class="emphasis" href="#--data-binary">--data-binary</a> to be used in an HTTP GET request instead of the POST request that otherwise would be used. The data will be appended to the URL with a '?' separator.
-<p class="level1">If used in combination with -I, the POST data will instead be appended to the URL with a HEAD request.
-<p class="level1">If this option is used several times, only the first one is used. This is because undoing a GET doesn't make sense, but you should then instead enforce the alternative method you prefer.
-<p class="level0"><a name="-H"></a><span class="nroffip">-H, --header &lt;header&gt;</span>
-<p class="level1">(HTTP) Extra header to use when getting a web page. You may specify any number of extra headers. Note that if you should add a custom header that has the same name as one of the internal ones curl would use, your externally set header will be used instead of the internal one. This allows you to make even trickier stuff than curl would normally do. You should not replace internally set headers without knowing perfectly well what you're doing. Remove an internal header by giving a replacement without content on the right side of the colon, as in: -H "Host:". If you send the custom header with no-value then its header must be terminated with a semicolon, such as -H "X-Custom-Header;" to send "X-Custom-Header:".
-<p class="level1">curl will make sure that each header you add/replace is sent with the proper end-of-line marker, you should thus <span Class="bold">not</span> add that as a part of the header content: do not add newlines or carriage returns, they will only mess things up for you.
-<p class="level1">See also the <a class="emphasis" href="#-A">-A, --user-agent</a> and <a class="emphasis" href="#-e">-e, --referer</a> options.
-<p class="level1">This option can be used multiple times to add/replace/remove multiple headers.
-<p class="level0"><a name="--hostpubmd5"></a><span class="nroffip">--hostpubmd5 &lt;md5&gt;</span>
-<p class="level1">(SCP/SFTP) Pass a string containing 32 hexadecimal digits. The string should be the 128 bit MD5 checksum of the remote host's public key, curl will refuse the connection with the host unless the md5sums match. (Added in 7.17.1)
-<p class="level0"><a name="--ignore-content-length"></a><span class="nroffip">--ignore-content-length</span>
-<p class="level1">(HTTP) Ignore the Content-Length header. This is particularly useful for servers running Apache 1.x, which will report incorrect Content-Length for files larger than 2 gigabytes.
-<p class="level0"><a name="-i"></a><span class="nroffip">-i, --include</span>
-<p class="level1">(HTTP) Include the HTTP-header in the output. The HTTP-header includes things like server-name, date of the document, HTTP-version and more...
-<p class="level0"><a name="-I"></a><span class="nroffip">-I, --head</span>
-<p class="level1">(HTTP/FTP/FILE) Fetch the HTTP-header only! HTTP-servers feature the command HEAD which this uses to get nothing but the header of a document. When used on an FTP or FILE file, curl displays the file size and last modification time only.
-<p class="level0"><a name="--interface"></a><span class="nroffip">--interface &lt;name&gt;</span>
-<p class="level1">Perform an operation using a specified interface. You can enter interface name, IP address or host name. An example could look like:
-<p class="level1">&nbsp;curl --interface eth0:1 <a href="http://www.netscape.com/">http://www.netscape.com/</a>
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-j"></a><span class="nroffip">-j, --junk-session-cookies</span>
-<p class="level1">(HTTP) When curl is told to read cookies from a given file, this option will make it discard all "session cookies". This will basically have the same effect as if a new session is started. Typical browsers always discard session cookies when they're closed down.
-<p class="level0"><a name="-J"></a><span class="nroffip">-J, --remote-header-name</span>
-<p class="level1">(HTTP) This option tells the <a class="emphasis" href="#-O">-O, --remote-name</a> option to use the server-specified Content-Disposition filename instead of extracting a filename from the URL.
-<p class="level0"><a name="-k"></a><span class="nroffip">-k, --insecure</span>
-<p class="level1">(SSL) This option explicitly allows curl to perform "insecure" SSL connections and transfers. All SSL connections are attempted to be made secure by using the CA certificate bundle installed by default. This makes all connections considered "insecure" fail unless <a class="emphasis" href="#-k">-k, --insecure</a> is used.
-<p class="level1">See this online resource for further details: <span Class="bold"><a href="http://curl.haxx.se/docs/sslcerts.html">http://curl.haxx.se/docs/sslcerts.html</a></span>
-<p class="level0"><a name="-K"></a><span class="nroffip">-K, --config &lt;config file&gt;</span>
-<p class="level1">Specify which config file to read curl arguments from. The config file is a text file in which command line arguments can be written which then will be used as if they were written on the actual command line. Options and their parameters must be specified on the same config file line, separated by whitespace, colon, the equals sign or any combination thereof (however, the preferred separator is the equals sign). If the parameter is to contain whitespace, the parameter must be enclosed within quotes. Within double quotes, the following escape sequences are available: \\, \", \t, \n, \r and \v. A backslash preceding any other letter is ignored. If the first column of a config line is a '#' character, the rest of the line will be treated as a comment. Only write one option per physical line in the config file.
-<p class="level1">Specify the filename to -K, --config as '-' to make curl read the file from stdin.
-<p class="level1">Note that to be able to specify a URL in the config file, you need to specify it using the <a class="emphasis" href="#--url">--url</a> option, and not by simply writing the URL on its own line. So, it could look similar to this:
-<p class="level1">url = "<a href="http://curl.haxx.se/docs/">http://curl.haxx.se/docs/</a>"
-<p class="level1">Long option names can optionally be given in the config file without the initial double dashes.
-<p class="level1">When curl is invoked, it always (unless <a class="emphasis" href="#-q">-q</a> is used) checks for a default config file and uses it if found. The default config file is checked for in the following places in this order:
-<p class="level1">1) curl tries to find the "home dir": It first checks for the CURL_HOME and then the HOME environment variables. Failing that, it uses getpwuid() on UNIX-like systems (which returns the home dir given the current user in your system). On Windows, it then checks for the APPDATA variable, or as a last resort the '%USERPROFILE%\Application Data'.
-<p class="level1">2) On windows, if there is no _curlrc file in the home dir, it checks for one in the same dir the curl executable is placed. On UNIX-like systems, it will simply try to load .curlrc from the determined home dir.
-<p class="level1"><pre>
-<p class="level1"># --- Example file ---
- # this is a comment
- url = "curl.haxx.se"
- output = "curlhere.html"
- user-agent = "superagent/1.0"
- <p class="level1"># and fetch another URL too
- url = "curl.haxx.se/docs/manpage.html"
- -O
- referer = "<a href="http://nowhereatall.com/">http://nowhereatall.com/</a>"
- # --- End of example file ---
- </pre>
-
-<p class="level1">
-<p class="level1">This option can be used multiple times to load multiple config files.
-<p class="level0"><a name="--keepalive-time"></a><span class="nroffip">--keepalive-time &lt;seconds&gt;</span>
-<p class="level1">This option sets the time a connection needs to remain idle before sending keepalive probes and the time between individual keepalive probes. It is currently effective on operating systems offering the TCP_KEEPIDLE and TCP_KEEPINTVL socket options (meaning Linux, recent AIX, HP-UX and more). This option has no effect if <a class="emphasis" href="#--no-keepalive">--no-keepalive</a> is used. (Added in 7.18.0)
-<p class="level1">If this option is used several times, the last one will be used. If unspecified, the option defaults to 60 seconds.
-<p class="level0"><a name="--key"></a><span class="nroffip">--key &lt;key&gt;</span>
-<p class="level1">(SSL/SSH) Private key file name. Allows you to provide your private key in this separate file.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--key-type"></a><span class="nroffip">--key-type &lt;type&gt;</span>
-<p class="level1">(SSL) Private key file type. Specify which type your <a class="emphasis" href="#--key">--key</a> provided private key is. DER, PEM, and ENG are supported. If not specified, PEM is assumed.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--krb"></a><span class="nroffip">--krb &lt;level&gt;</span>
-<p class="level1">(FTP) Enable Kerberos authentication and use. The level must be entered and should be one of 'clear', 'safe', 'confidential', or 'private'. Should you use a level that is not one of these, 'private' will instead be used.
-<p class="level1">This option requires a library built with kerberos4 or GSSAPI (GSS-Negotiate) support. This is not very common. Use <a class="emphasis" href="#-V">-V, --version</a> to see if your curl supports it.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-l"></a><span class="nroffip">-l, --list-only</span>
-<p class="level1">(FTP) When listing an FTP directory, this switch forces a name-only view. Especially useful if you want to machine-parse the contents of an FTP directory since the normal directory view doesn't use a standard look or format.
-<p class="level1">This option causes an FTP NLST command to be sent. Some FTP servers list only files in their response to NLST; they do not include subdirectories and symbolic links.
-<p class="level1">
-<p class="level0"><a name="-L"></a><span class="nroffip">-L, --location</span>
-<p class="level1">(HTTP/HTTPS) If the server reports that the requested page has moved to a different location (indicated with a Location: header and a 3XX response code), this option will make curl redo the request on the new place. If used together with <a class="emphasis" href="#-i">-i, --include</a> or <a class="emphasis" href="#-I">-I, --head</a>, headers from all requested pages will be shown. When authentication is used, curl only sends its credentials to the initial host. If a redirect takes curl to a different host, it won't be able to intercept the user+password. See also <a class="emphasis" href="#--location-trusted">--location-trusted</a> on how to change this. You can limit the amount of redirects to follow by using the <a class="emphasis" href="#--max-redirs">--max-redirs</a> option.
-<p class="level1">When curl follows a redirect and the request is not a plain GET (for example POST or PUT), it will do the following request with a GET if the HTTP response was 301, 302, or 303. If the response code was any other 3xx code, curl will re-send the following request using the same unmodified method.
-<p class="level0"><a name="--libcurl"></a><span class="nroffip">--libcurl &lt;file&gt;</span>
-<p class="level1">Append this option to any ordinary curl command line, and you will get a libcurl-using C source code written to the file that does the equivalent of what your command-line operation does!
-<p class="level1">If this option is used several times, the last given file name will be used. (Added in 7.16.1)
-<p class="level0"><a name="--limit-rate"></a><span class="nroffip">--limit-rate &lt;speed&gt;</span>
-<p class="level1">Specify the maximum transfer rate you want curl to use. This feature is useful if you have a limited pipe and you'd like your transfer not to use your entire bandwidth.
-<p class="level1">The given speed is measured in bytes/second, unless a suffix is appended. Appending 'k' or 'K' will count the number as kilobytes, 'm' or M' makes it megabytes, while 'g' or 'G' makes it gigabytes. Examples: 200K, 3m and 1G.
-<p class="level1">The given rate is the average speed counted during the entire transfer. It means that curl might use higher transfer speeds in short bursts, but over time it uses no more than the given rate.
-<p class="level1">If you also use the <a class="emphasis" href="#-Y">-Y, --speed-limit</a> option, that option will take precedence and might cripple the rate-limiting slightly, to help keeping the speed-limit logic working.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--local-port"></a><span class="nroffip">--local-port &lt;num&gt;[-num]</span>
-<p class="level1">Set a preferred number or range of local port numbers to use for the connection(s). Note that port numbers by nature are a scarce resource that will be busy at times so setting this range to something too narrow might cause unnecessary connection setup failures. (Added in 7.15.2)
-<p class="level0"><a name="--location-trusted"></a><span class="nroffip">--location-trusted</span>
-<p class="level1">(HTTP/HTTPS) Like <a class="emphasis" href="#-L">-L, --location</a>, but will allow sending the name + password to all hosts that the site may redirect to. This may or may not introduce a security breach if the site redirects you to a site to which you'll send your authentication info (which is plaintext in the case of HTTP Basic authentication).
-<p class="level0"><a name="-m"></a><span class="nroffip">-m, --max-time &lt;seconds&gt;</span>
-<p class="level1">Maximum time in seconds that you allow the whole operation to take. This is useful for preventing your batch jobs from hanging for hours due to slow networks or links going down. Since 7.32.0, this option accepts decimal values, but the actual timeout will decrease in accuracy as the specified timeout increases in decimal precision. See also the <a class="emphasis" href="#--connect-timeout">--connect-timeout</a> option.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--mail-auth"></a><span class="nroffip">--mail-auth &lt;address&gt;</span>
-<p class="level1">(SMTP) Specify a single address. This will be used to specify the authentication address (identity) of a submitted message that is being relayed to another server.
-<p class="level1">(Added in 7.25.0)
-<p class="level0"><a name="--mail-from"></a><span class="nroffip">--mail-from &lt;address&gt;</span>
-<p class="level1">(SMTP) Specify a single address that the given mail should get sent from.
-<p class="level1">(Added in 7.20.0)
-<p class="level0"><a name="--max-filesize"></a><span class="nroffip">--max-filesize &lt;bytes&gt;</span>
-<p class="level1">Specify the maximum size (in bytes) of a file to download. If the file requested is larger than this value, the transfer will not start and curl will return with exit code 63.
-<p class="level1"><span Class="bold">NOTE:</span> The file size is not always known prior to download, and for such files this option has no effect even if the file transfer ends up being larger than this given limit. This concerns both FTP and HTTP transfers.
-<p class="level0"><a name="--mail-rcpt"></a><span class="nroffip">--mail-rcpt &lt;address&gt;</span>
-<p class="level1">(SMTP) Specify a single address that the given mail should get sent to. This option can be used multiple times to specify many recipients.
-<p class="level1">(Added in 7.20.0)
-<p class="level0"><a name="--max-redirs"></a><span class="nroffip">--max-redirs &lt;num&gt;</span>
-<p class="level1">Set maximum number of redirection-followings allowed. If <a class="emphasis" href="#-L">-L, --location</a> is used, this option can be used to prevent curl from following redirections "in absurdum". By default, the limit is set to 50 redirections. Set this option to -1 to make it limitless.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--metalink"></a><span class="nroffip">--metalink</span>
-<p class="level1">This option can tell curl to parse and process a given URI as Metalink file (both version 3 and 4 (<a href="http://www.ietf.org/rfc/rfc5854.txt">RFC 5854</a>) are supported) and make use of the mirrors listed within for failover if there are errors (such as the file or server not being available). It will also verify the hash of the file after the download completes. The Metalink file itself is downloaded and processed in memory and not stored in the local file system.
-<p class="level1">Example to use a remote Metalink file:
-<p class="level1"><span Class="bold">curl</span> --metalink <a href="http://www.example.com/example.metalink">http://www.example.com/example.metalink</a>
-<p class="level1">To use a Metalink file in the local file system, use FILE protocol (file://):
-<p class="level1"><span Class="bold">curl</span> --metalink file://example.metalink
-<p class="level1">Please note that if FILE protocol is disabled, there is no way to use a local Metalink file at the time of this writing. Also note that if <a class="emphasis" href="#--metalink">--metalink</a> and <span Class="emphasis">--include</span> are used together, <span Class="emphasis">--include</span> will be ignored. This is because including headers in the response will break Metalink parser and if the headers are included in the file described in Metalink file, hash check will fail.
-<p class="level1">(Added in 7.27.0, if built against the libmetalink library.)
-<p class="level0"><a name="-n"></a><span class="nroffip">-n, --netrc</span>
-<p class="level1">Makes curl scan the <span Class="emphasis">.netrc</span> (<span Class="emphasis">_netrc</span> on Windows) file in the user's home directory for login name and password. This is typically used for FTP on UNIX. If used with HTTP, curl will enable user authentication. See <span Class="manpage">netrc(4)</span> or <span Class="manpage">ftp(1)</span> for details on the file format. Curl will not complain if that file doesn't have the right permissions (it should not be either world- or group-readable). The environment variable "HOME" is used to find the home directory.
-<p class="level1">A quick and very simple example of how to setup a <span Class="emphasis">.netrc</span> to allow curl to FTP to the machine host.domain.com with user name 'myself' and password 'secret' should look similar to:
-<p class="level1"><span Class="bold">machine host.domain.com login myself password secret</span>
-<p class="level0"><a name="-N"></a><span class="nroffip">-N, --no-buffer</span>
-<p class="level1">Disables the buffering of the output stream. In normal work situations, curl will use a standard buffered output stream that will have the effect that it will output the data in chunks, not necessarily exactly when the data arrives. Using this option will disable that buffering.
-<p class="level1">Note that this is the negated option name documented. You can thus use <span Class="emphasis">--buffer</span> to enforce the buffering.
-<p class="level0"><a name="--netrc-file"></a><span class="nroffip">--netrc-file</span>
-<p class="level1">This option is similar to <span Class="emphasis">--netrc</span>, except that you provide the path (absolute or relative) to the netrc file that Curl should use. You can only specify one netrc file per invocation. If several <a class="emphasis" href="#--netrc-file">--netrc-file</a> options are provided, only the <span Class="bold">last one</span> will be used. (Added in 7.21.5)
-<p class="level1">This option overrides any use of <span Class="emphasis">--netrc</span> as they are mutually exclusive. It will also abide by <a class="emphasis" href="#--netrc-optional">--netrc-optional</a> if specified.
-<p class="level1">
-<p class="level0"><a name="--netrc-optional"></a><span class="nroffip">--netrc-optional</span>
-<p class="level1">Very similar to <span Class="emphasis">--netrc</span>, but this option makes the .netrc usage <span Class="bold">optional</span> and not mandatory as the <span Class="emphasis">--netrc</span> option does.
-<p class="level1">
-<p class="level0"><a name="--negotiate"></a><span class="nroffip">--negotiate</span>
-<p class="level1">(HTTP) Enables GSS-Negotiate authentication. The GSS-Negotiate method was designed by Microsoft and is used in their web applications. It is primarily meant as a support for Kerberos5 authentication but may be also used along with another authentication method. For more information see IETF draft draft-brezak-spnego-http-04.txt.
-<p class="level1">If you want to enable Negotiate for your proxy authentication, then use <a class="emphasis" href="#--proxy-negotiate">--proxy-negotiate</a>.
-<p class="level1">This option requires a library built with GSSAPI support. This is not very common. Use <a class="emphasis" href="#-V">-V, --version</a> to see if your version supports GSS-Negotiate.
-<p class="level1">When using this option, you must also provide a fake <a class="emphasis" href="#-u">-u, --user</a> option to activate the authentication code properly. Sending a '-u :' is enough as the user name and password from the <a class="emphasis" href="#-u">-u</a> option aren't actually used.
-<p class="level1">If this option is used several times, only the first one is used.
-<p class="level0"><a name="--no-keepalive"></a><span class="nroffip">--no-keepalive</span>
-<p class="level1">Disables the use of keepalive messages on the TCP connection, as by default curl enables them.
-<p class="level1">Note that this is the negated option name documented. You can thus use <span Class="emphasis">--keepalive</span> to enforce keepalive.
-<p class="level0"><a name="--no-sessionid"></a><span class="nroffip">--no-sessionid</span>
-<p class="level1">(SSL) Disable curl's use of SSL session-ID caching. By default all transfers are done using the cache. Note that while nothing should ever get hurt by attempting to reuse SSL session-IDs, there seem to be broken SSL implementations in the wild that may require you to disable this in order for you to succeed. (Added in 7.16.0)
-<p class="level1">Note that this is the negated option name documented. You can thus use <span Class="emphasis">--sessionid</span> to enforce session-ID caching.
-<p class="level0"><a name="--noproxy"></a><span class="nroffip">--noproxy &lt;no-proxy-list&gt;</span>
-<p class="level1">Comma-separated list of hosts which do not use a proxy, if one is specified. The only wildcard is a single * character, which matches all hosts, and effectively disables the proxy. Each name in this list is matched as either a domain which contains the hostname, or the hostname itself. For example, local.com would match local.com, local.com:80, and www.local.com, but not www.notlocal.com. (Added in 7.19.4).
-<p class="level0"><a name="--ntlm"></a><span class="nroffip">--ntlm</span>
-<p class="level1">(HTTP) Enables NTLM authentication. The NTLM authentication method was designed by Microsoft and is used by IIS web servers. It is a proprietary protocol, reverse-engineered by clever people and implemented in curl based on their efforts. This kind of behavior should not be endorsed, you should encourage everyone who uses NTLM to switch to a public and documented authentication method instead, such as Digest.
-<p class="level1">If you want to enable NTLM for your proxy authentication, then use <a class="emphasis" href="#--proxy-ntlm">--proxy-ntlm</a>.
-<p class="level1">This option requires a library built with SSL support. Use <a class="emphasis" href="#-V">-V, --version</a> to see if your curl supports NTLM.
-<p class="level1">If this option is used several times, only the first one is used.
-<p class="level0"><a name="-o"></a><span class="nroffip">-o, --output &lt;file&gt;</span>
-<p class="level1">Write output to &lt;file&gt; instead of stdout. If you are using {} or [] to fetch multiple documents, you can use '#' followed by a number in the &lt;file&gt; specifier. That variable will be replaced with the current string for the URL being fetched. Like in:
-<p class="level1">&nbsp; curl http://{one,two}.site.com -o "file_#1.txt"
-<p class="level1">or use several variables like:
-<p class="level1">&nbsp; curl http://{site,host}.host[1-5].com -o "#1_#2"
-<p class="level1">You may use this option as many times as the number of URLs you have.
-<p class="level1">See also the <a class="emphasis" href="#--create-dirs">--create-dirs</a> option to create the local directories dynamically. Specifying the output as '-' (a single dash) will force the output to be done to stdout.
-<p class="level0"><a name="-O"></a><span class="nroffip">-O, --remote-name</span>
-<p class="level1">Write output to a local file named like the remote file we get. (Only the file part of the remote file is used, the path is cut off.)
-<p class="level1">The remote file name to use for saving is extracted from the given URL, nothing else.
-<p class="level1">Consequentially, the file will be saved in the current working directory. If you want the file saved in a different directory, make sure you change current working directory before you invoke curl with the <a class="bold" href="#-O">-O, --remote-name</a> flag!
-<p class="level1">You may use this option as many times as the number of URLs you have.
-<p class="level0"><a name="--oauth2-bearer"></a><span class="nroffip">--oauth2-bearer</span>
-<p class="level1">(IMAP/POP3/SMTP) Specify the Bearer Token for OAUTH 2.0 server authentication. The Bearer Token is used in conjuction with the user name which can be specified as part of the <a class="emphasis" href="#--url">--url</a> or <a class="emphasis" href="#-u">-u, --user</a> options.
-<p class="level1">The Bearer Token and user name are formatted according to <a href="http://www.ietf.org/rfc/rfc6750.txt">RFC 6750</a>.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-p"></a><span class="nroffip">-p, --proxytunnel</span>
-<p class="level1">When an HTTP proxy is used (<a class="emphasis" href="#-x">-x, --proxy</a>), this option will cause non-HTTP protocols to attempt to tunnel through the proxy instead of merely using it to do HTTP-like operations. The tunnel approach is made with the HTTP proxy CONNECT request and requires that the proxy allows direct connect to the remote port number curl wants to tunnel through to.
-<p class="level0"><a name="-P"></a><span class="nroffip">-P, --ftp-port &lt;address&gt;</span>
-<p class="level1">(FTP) Reverses the default initiator/listener roles when connecting with FTP. This switch makes curl use active mode. In practice, curl then tells the server to connect back to the client's specified address and port, while passive mode asks the server to setup an IP address and port for it to connect to. &lt;address&gt; should be one of:
-<p class="level2">
-<p class="level1"><a name="interface"></a><span class="nroffip">interface</span>
-<p class="level2">i.e "eth0" to specify which interface's IP address you want to use (Unix only)
-<p class="level1"><a name="IP"></a><span class="nroffip">IP address</span>
-<p class="level2">i.e "192.168.10.1" to specify the exact IP address
-<p class="level1"><a name="host"></a><span class="nroffip">host name</span>
-<p class="level2">i.e "my.host.domain" to specify the machine
-<p class="level1"><a name="-"></a><span class="nroffip">-</span>
-<p class="level2">make curl pick the same IP address that is already used for the control connection
-<p class="level1">
-<p class="level1">If this option is used several times, the last one will be used. Disable the use of PORT with <a class="emphasis" href="#--ftp-pasv">--ftp-pasv</a>. Disable the attempt to use the EPRT command instead of PORT by using <a class="emphasis" href="#--disable-eprt">--disable-eprt</a>. EPRT is really PORT++.
-<p class="level1">Starting in 7.19.5, you can append ":[start]-[end]" to the right of the address, to tell curl what TCP port range to use. That means you specify a port range, from a lower to a higher number. A single number works as well, but do note that it increases the risk of failure since the port may not be available.
-<p class="level0"><a name="--pass"></a><span class="nroffip">--pass &lt;phrase&gt;</span>
-<p class="level1">(SSL/SSH) Passphrase for the private key
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--post301"></a><span class="nroffip">--post301</span>
-<p class="level1">(HTTP) Tells curl to respect <a href="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616</a>/10.3.2 and not convert POST requests into GET requests when following a 301 redirection. The non-RFC behaviour is ubiquitous in web browsers, so curl does the conversion by default to maintain consistency. However, a server may require a POST to remain a POST after such a redirection. This option is meaningful only when using <a class="emphasis" href="#-L">-L, --location</a> (Added in 7.17.1)
-<p class="level0"><a name="--post302"></a><span class="nroffip">--post302</span>
-<p class="level1">(HTTP) Tells curl to respect <a href="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616</a>/10.3.2 and not convert POST requests into GET requests when following a 302 redirection. The non-RFC behaviour is ubiquitous in web browsers, so curl does the conversion by default to maintain consistency. However, a server may require a POST to remain a POST after such a redirection. This option is meaningful only when using <a class="emphasis" href="#-L">-L, --location</a> (Added in 7.19.1)
-<p class="level0"><a name="--post303"></a><span class="nroffip">--post303</span>
-<p class="level1">(HTTP) Tells curl to respect <a href="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616</a>/10.3.2 and not convert POST requests into GET requests when following a 303 redirection. The non-RFC behaviour is ubiquitous in web browsers, so curl does the conversion by default to maintain consistency. However, a server may require a POST to remain a POST after such a redirection. This option is meaningful only when using <a class="emphasis" href="#-L">-L, --location</a> (Added in 7.26.0)
-<p class="level0"><a name="--proto"></a><span class="nroffip">--proto &lt;protocols&gt;</span>
-<p class="level1">Tells curl to use the listed protocols for its initial retrieval. Protocols are evaluated left to right, are comma separated, and are each a protocol name or 'all', optionally prefixed by zero or more modifiers. Available modifiers are:
-<p class="level2">
-<p class="level2"><a class="bold" href="#">+</a> Permit this protocol in addition to protocols already permitted (this is the default if no modifier is used).
-<p class="level2"><a class="bold" href="#-">-</a> Deny this protocol, removing it from the list of protocols already permitted.
-<p class="level2"><a class="bold" href="#">=</a> Permit only this protocol (ignoring the list already permitted), though subject to later modification by subsequent entries in the comma separated list.
-<p class="level1">
-<p class="level0"><a name=""></a><span class="nroffip"></span>
-<p class="level1">For example:
-<p class="level2">
-<p class="level2"><a class="bold" href="#--proto">--proto -ftps</a> uses the default protocols, but disables ftps
-<p class="level2"><a class="bold" href="#--proto">--proto -all,https,+http</a> only enables http and https
-<p class="level2"><a class="bold" href="#--proto">--proto =http,https</a> also only enables http and https
-<p class="level1">
-<p class="level0"><a name=""></a><span class="nroffip"></span>
-<p class="level1">Unknown protocols produce a warning. This allows scripts to safely rely on being able to disable potentially dangerous protocols, without relying upon support for that protocol being built into curl to avoid an error.
-<p class="level1">This option can be used multiple times, in which case the effect is the same as concatenating the protocols into one instance of the option.
-<p class="level1">(Added in 7.20.2)
-<p class="level0"><a name="--proto-redir"></a><span class="nroffip">--proto-redir &lt;protocols&gt;</span>
-<p class="level1">Tells curl to use the listed protocols after a redirect. See --proto for how protocols are represented.
-<p class="level1">(Added in 7.20.2)
-<p class="level0"><a name="--proxy-anyauth"></a><span class="nroffip">--proxy-anyauth</span>
-<p class="level1">Tells curl to pick a suitable authentication method when communicating with the given proxy. This might cause an extra request/response round-trip. (Added in 7.13.2)
-<p class="level0"><a name="--proxy-basic"></a><span class="nroffip">--proxy-basic</span>
-<p class="level1">Tells curl to use HTTP Basic authentication when communicating with the given proxy. Use <a class="emphasis" href="#--basic">--basic</a> for enabling HTTP Basic with a remote host. Basic is the default authentication method curl uses with proxies.
-<p class="level0"><a name="--proxy-digest"></a><span class="nroffip">--proxy-digest</span>
-<p class="level1">Tells curl to use HTTP Digest authentication when communicating with the given proxy. Use <a class="emphasis" href="#--digest">--digest</a> for enabling HTTP Digest with a remote host.
-<p class="level0"><a name="--proxy-negotiate"></a><span class="nroffip">--proxy-negotiate</span>
-<p class="level1">Tells curl to use HTTP Negotiate authentication when communicating with the given proxy. Use <a class="emphasis" href="#--negotiate">--negotiate</a> for enabling HTTP Negotiate with a remote host. (Added in 7.17.1)
-<p class="level0"><a name="--proxy-ntlm"></a><span class="nroffip">--proxy-ntlm</span>
-<p class="level1">Tells curl to use HTTP NTLM authentication when communicating with the given proxy. Use <a class="emphasis" href="#--ntlm">--ntlm</a> for enabling NTLM with a remote host.
-<p class="level0"><a name="--proxy10"></a><span class="nroffip">--proxy1.0 &lt;proxyhost[:port]&gt;</span>
-<p class="level1">Use the specified HTTP 1.0 proxy. If the port number is not specified, it is assumed at port 1080.
-<p class="level1">The only difference between this and the HTTP proxy option (<a class="emphasis" href="#-x">-x, --proxy</a>), is that attempts to use CONNECT through the proxy will specify an HTTP 1.0 protocol instead of the default HTTP 1.1.
-<p class="level0"><a name="--pubkey"></a><span class="nroffip">--pubkey &lt;key&gt;</span>
-<p class="level1">(SSH) Public key file name. Allows you to provide your public key in this separate file.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-q"></a><span class="nroffip">-q</span>
-<p class="level1">If used as the first parameter on the command line, the <span Class="emphasis">curlrc</span> config file will not be read and used. See the <a class="emphasis" href="#-K">-K, --config</a> for details on the default config file search path.
-<p class="level0"><a name="-Q"></a><span class="nroffip">-Q, --quote &lt;command&gt;</span>
-<p class="level1">(FTP/SFTP) Send an arbitrary command to the remote FTP or SFTP server. Quote commands are sent BEFORE the transfer takes place (just after the initial PWD command in an FTP transfer, to be exact). To make commands take place after a successful transfer, prefix them with a dash '-'. To make commands be sent after curl has changed the working directory, just before the transfer command(s), prefix the command with a '+' (this is only supported for FTP). You may specify any number of commands. If the server returns failure for one of the commands, the entire operation will be aborted. You must send syntactically correct FTP commands as <a href="http://www.ietf.org/rfc/rfc959.txt">RFC 959</a> defines to FTP servers, or one of the commands listed below to SFTP servers. This option can be used multiple times. When speaking to an FTP server, prefix the command with an asterisk (*) to make curl continue even if the command fails as by default curl will stop at first failure.
-<p class="level1">SFTP is a binary protocol. Unlike for FTP, curl interprets SFTP quote commands itself before sending them to the server. File names may be quoted shell-style to embed spaces or special characters. Following is the list of all supported SFTP quote commands:
-<p class="level2">
-<p class="level1"><a name="chgrp"></a><span class="nroffip">chgrp group file</span>
-<p class="level2">The chgrp command sets the group ID of the file named by the file operand to the group ID specified by the group operand. The group operand is a decimal integer group ID.
-<p class="level1"><a name="chmod"></a><span class="nroffip">chmod mode file</span>
-<p class="level2">The chmod command modifies the file mode bits of the specified file. The mode operand is an octal integer mode number.
-<p class="level1"><a name="chown"></a><span class="nroffip">chown user file</span>
-<p class="level2">The chown command sets the owner of the file named by the file operand to the user ID specified by the user operand. The user operand is a decimal integer user ID.
-<p class="level1"><a name="ln"></a><span class="nroffip">ln source_file target_file</span>
-<p class="level2">The ln and symlink commands create a symbolic link at the target_file location pointing to the source_file location.
-<p class="level1"><a name="mkdir"></a><span class="nroffip">mkdir directory_name</span>
-<p class="level2">The mkdir command creates the directory named by the directory_name operand.
-<p class="level1"><a name="pwd"></a><span class="nroffip">pwd</span>
-<p class="level2">The pwd command returns the absolute pathname of the current working directory.
-<p class="level1"><a name="rename"></a><span class="nroffip">rename source target</span>
-<p class="level2">The rename command renames the file or directory named by the source operand to the destination path named by the target operand.
-<p class="level1"><a name="rm"></a><span class="nroffip">rm file</span>
-<p class="level2">The rm command removes the file specified by the file operand.
-<p class="level1"><a name="rmdir"></a><span class="nroffip">rmdir directory</span>
-<p class="level2">The rmdir command removes the directory entry specified by the directory operand, provided it is empty.
-<p class="level1"><a name="symlink"></a><span class="nroffip">symlink source_file target_file</span>
-<p class="level2">See ln.
-<p class="level1">
-<p class="level0"><a name="-r"></a><span class="nroffip">-r, --range &lt;range&gt;</span>
-<p class="level1">(HTTP/FTP/SFTP/FILE) Retrieve a byte range (i.e a partial document) from a HTTP/1.1, FTP or SFTP server or a local FILE. Ranges can be specified in a number of ways.
-<p class="level2">
-<p class="level2"><span Class="bold">0-499</span> specifies the first 500 bytes
-<p class="level2"><span Class="bold">500-999</span> specifies the second 500 bytes
-<p class="level2"><span Class="bold">-500</span> specifies the last 500 bytes
-<p class="level2"><span Class="bold">9500-</span> specifies the bytes from offset 9500 and forward
-<p class="level2"><span Class="bold">0-0,-1</span> specifies the first and last byte only(*)(H)
-<p class="level2"><span Class="bold">500-700,600-799</span> specifies 300 bytes from offset 500(H)
-<p class="level2"><span Class="bold">100-199,500-599</span> specifies two separate 100-byte ranges(*)(H)
-<p class="level1">
-<p class="level1">(*) = NOTE that this will cause the server to reply with a multipart response!
-<p class="level1">Only digit characters (0-9) are valid in the 'start' and 'stop' fields of the 'start-stop' range syntax. If a non-digit character is given in the range, the server's response will be unspecified, depending on the server's configuration.
-<p class="level1">You should also be aware that many HTTP/1.1 servers do not have this feature enabled, so that when you attempt to get a range, you'll instead get the whole document.
-<p class="level1">FTP and SFTP range downloads only support the simple 'start-stop' syntax (optionally with one of the numbers omitted). FTP use depends on the extended FTP command SIZE.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-R"></a><span class="nroffip">-R, --remote-time</span>
-<p class="level1">When used, this will make curl attempt to figure out the timestamp of the remote file, and if that is available make the local file get that same timestamp.
-<p class="level0"><a name="--random-file"></a><span class="nroffip">--random-file &lt;file&gt;</span>
-<p class="level1">(SSL) Specify the path name to file containing what will be considered as random data. The data is used to seed the random engine for SSL connections. See also the <a class="emphasis" href="#--egd-file">--egd-file</a> option.
-<p class="level0"><a name="--raw"></a><span class="nroffip">--raw</span>
-<p class="level1">(HTTP) When used, it disables all internal HTTP decoding of content or transfer encodings and instead makes them passed on unaltered, raw. (Added in 7.16.2)
-<p class="level0"><a name="--remote-name-all"></a><span class="nroffip">--remote-name-all</span>
-<p class="level1">This option changes the default action for all given URLs to be dealt with as if <a class="emphasis" href="#-O">-O, --remote-name</a> were used for each one. So if you want to disable that for a specific URL after <a class="emphasis" href="#--remote-name-all">--remote-name-all</a> has been used, you must use "-o -" or <span Class="emphasis">--no-remote-name</span>. (Added in 7.19.0)
-<p class="level0"><a name="--resolve"></a><span class="nroffip">--resolve &lt;host:port:address&gt;</span>
-<p class="level1">Provide a custom address for a specific host and port pair. Using this, you can make the curl requests(s) use a specified address and prevent the otherwise normally resolved address to be used. Consider it a sort of /etc/hosts alternative provided on the command line. The port number should be the number used for the specific protocol the host will be used for. It means you need several entries if you want to provide address for the same host but different ports.
-<p class="level1">This option can be used many times to add many host names to resolve.
-<p class="level1">(Added in 7.21.3)
-<p class="level0"><a name="--retry"></a><span class="nroffip">--retry &lt;num&gt;</span>
-<p class="level1">If a transient error is returned when curl tries to perform a transfer, it will retry this number of times before giving up. Setting the number to 0 makes curl do no retries (which is the default). Transient error means either: a timeout, an FTP 4xx response code or an HTTP 5xx response code.
-<p class="level1">When curl is about to retry a transfer, it will first wait one second and then for all forthcoming retries it will double the waiting time until it reaches 10 minutes which then will be the delay between the rest of the retries. By using <a class="emphasis" href="#--retry-delay">--retry-delay</a> you disable this exponential backoff algorithm. See also <a class="emphasis" href="#--retry-max-time">--retry-max-time</a> to limit the total time allowed for retries. (Added in 7.12.3)
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--retry-delay"></a><span class="nroffip">--retry-delay &lt;seconds&gt;</span>
-<p class="level1">Make curl sleep this amount of time before each retry when a transfer has failed with a transient error (it changes the default backoff time algorithm between retries). This option is only interesting if <a class="emphasis" href="#--retry">--retry</a> is also used. Setting this delay to zero will make curl use the default backoff time. (Added in 7.12.3)
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--retry-max-time"></a><span class="nroffip">--retry-max-time &lt;seconds&gt;</span>
-<p class="level1">The retry timer is reset before the first transfer attempt. Retries will be done as usual (see <a class="emphasis" href="#--retry">--retry</a>) as long as the timer hasn't reached this given limit. Notice that if the timer hasn't reached the limit, the request will be made and while performing, it may take longer than this given time period. To limit a single request&acute;s maximum time, use <a class="emphasis" href="#-m">-m, --max-time</a>. Set this option to zero to not timeout retries. (Added in 7.12.3)
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-s"></a><span class="nroffip">-s, --silent</span>
-<p class="level1">Silent or quiet mode. Don't show progress meter or error messages. Makes Curl mute. It will still output the data you ask for, potentially even to the terminal/stdout unless you redirect it.
-<p class="level0"><a name="--sasl-ir"></a><span class="nroffip">--sasl-ir</span>
-<p class="level1">Enable initial response in SASL authentication. (Added in 7.31.0)
-<p class="level0"><a name="-S"></a><span class="nroffip">-S, --show-error</span>
-<p class="level1">When used with <a class="emphasis" href="#-s">-s</a> it makes curl show an error message if it fails.
-<p class="level0"><a name="--ssl"></a><span class="nroffip">--ssl</span>
-<p class="level1">(FTP, POP3, IMAP, SMTP) Try to use SSL/TLS for the connection. Reverts to a non-secure connection if the server doesn't support SSL/TLS. See also <a class="emphasis" href="#--ftp-ssl-control">--ftp-ssl-control</a> and <a class="emphasis" href="#--ssl-reqd">--ssl-reqd</a> for different levels of encryption required. (Added in 7.20.0)
-<p class="level1">This option was formerly known as <span Class="emphasis">--ftp-ssl</span> (Added in 7.11.0). That option name can still be used but will be removed in a future version.
-<p class="level0"><a name="--ssl-reqd"></a><span class="nroffip">--ssl-reqd</span>
-<p class="level1">(FTP, POP3, IMAP, SMTP) Require SSL/TLS for the connection. Terminates the connection if the server doesn't support SSL/TLS. (Added in 7.20.0)
-<p class="level1">This option was formerly known as <span Class="emphasis">--ftp-ssl-reqd</span> (added in 7.15.5). That option name can still be used but will be removed in a future version.
-<p class="level0"><a name="--ssl-allow-beast"></a><span class="nroffip">--ssl-allow-beast</span>
-<p class="level1">(SSL) This option tells curl to not work around a security flaw in the SSL3 and TLS1.0 protocols known as BEAST. If this option isn't used, the SSL layer may use work-arounds known to cause interoperability problems with some older SSL implementations. WARNING: this option loosens the SSL security, and by using this flag you ask for exactly that. (Added in 7.25.0)
-<p class="level0"><a name="--socks4"></a><span class="nroffip">--socks4 &lt;host[:port]&gt;</span>
-<p class="level1">Use the specified SOCKS4 proxy. If the port number is not specified, it is assumed at port 1080. (Added in 7.15.2)
-<p class="level1">This option overrides any previous use of <a class="emphasis" href="#-x">-x, --proxy</a>, as they are mutually exclusive.
-<p class="level1">Since 7.21.7, this option is superfluous since you can specify a socks4 proxy with <a class="emphasis" href="#-x">-x, --proxy</a> using a socks4:// protocol prefix.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--socks4a"></a><span class="nroffip">--socks4a &lt;host[:port]&gt;</span>
-<p class="level1">Use the specified SOCKS4a proxy. If the port number is not specified, it is assumed at port 1080. (Added in 7.18.0)
-<p class="level1">This option overrides any previous use of <a class="emphasis" href="#-x">-x, --proxy</a>, as they are mutually exclusive.
-<p class="level1">Since 7.21.7, this option is superfluous since you can specify a socks4a proxy with <a class="emphasis" href="#-x">-x, --proxy</a> using a socks4a:// protocol prefix.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--socks5-hostname"></a><span class="nroffip">--socks5-hostname &lt;host[:port]&gt;</span>
-<p class="level1">Use the specified SOCKS5 proxy (and let the proxy resolve the host name). If the port number is not specified, it is assumed at port 1080. (Added in 7.18.0)
-<p class="level1">This option overrides any previous use of <a class="emphasis" href="#-x">-x, --proxy</a>, as they are mutually exclusive.
-<p class="level1">Since 7.21.7, this option is superfluous since you can specify a socks5 hostname proxy with <a class="emphasis" href="#-x">-x, --proxy</a> using a socks5h:// protocol prefix.
-<p class="level1">If this option is used several times, the last one will be used. (This option was previously wrongly documented and used as --socks without the number appended.)
-<p class="level0"><a name="--socks5"></a><span class="nroffip">--socks5 &lt;host[:port]&gt;</span>
-<p class="level1">Use the specified SOCKS5 proxy - but resolve the host name locally. If the port number is not specified, it is assumed at port 1080.
-<p class="level1">This option overrides any previous use of <a class="emphasis" href="#-x">-x, --proxy</a>, as they are mutually exclusive.
-<p class="level1">Since 7.21.7, this option is superfluous since you can specify a socks5 proxy with <a class="emphasis" href="#-x">-x, --proxy</a> using a socks5:// protocol prefix.
-<p class="level1">If this option is used several times, the last one will be used. (This option was previously wrongly documented and used as --socks without the number appended.)
-<p class="level1">This option (as well as <a class="emphasis" href="#--socks4">--socks4</a>) does not work with IPV6, FTPS or LDAP.
-<p class="level0"><a name="--socks5-gssapi-service"></a><span class="nroffip">--socks5-gssapi-service &lt;servicename&gt;</span>
-<p class="level1">The default service name for a socks server is rcmd/server-fqdn. This option allows you to change it.
-<p class="level1">Examples: --socks5 proxy-name <a class="emphasis" href="#--socks5-gssapi-service">--socks5-gssapi-service</a> sockd would use sockd/proxy-name --socks5 proxy-name <a class="emphasis" href="#--socks5-gssapi-service">--socks5-gssapi-service</a> sockd/real-name would use sockd/real-name for cases where the proxy-name does not match the principal name. (Added in 7.19.4).
-<p class="level0"><a name="--socks5-gssapi-nec"></a><span class="nroffip">--socks5-gssapi-nec</span>
-<p class="level1">As part of the gssapi negotiation a protection mode is negotiated. <a href="http://www.ietf.org/rfc/rfc1961.txt">RFC 1961</a> says in section 4.3/4.4 it should be protected, but the NEC reference implementation does not. The option <a class="emphasis" href="#--socks5-gssapi-nec">--socks5-gssapi-nec</a> allows the unprotected exchange of the protection mode negotiation. (Added in 7.19.4).
-<p class="level0"><a name="--stderr"></a><span class="nroffip">--stderr &lt;file&gt;</span>
-<p class="level1">Redirect all writes to stderr to the specified file instead. If the file name is a plain '-', it is instead written to stdout.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-t"></a><span class="nroffip">-t, --telnet-option &lt;OPT=val&gt;</span>
-<p class="level1">Pass options to the telnet protocol. Supported options are:
-<p class="level1">TTYPE=&lt;term&gt; Sets the terminal type.
-<p class="level1">XDISPLOC=&lt;X display&gt; Sets the X display location.
-<p class="level1">NEW_ENV=&lt;var,val&gt; Sets an environment variable.
-<p class="level0"><a name="-T"></a><span class="nroffip">-T, --upload-file &lt;file&gt;</span>
-<p class="level1">This transfers the specified local file to the remote URL. If there is no file part in the specified URL, Curl will append the local file name. NOTE that you must use a trailing / on the last directory to really prove to Curl that there is no file name or curl will think that your last directory name is the remote file name to use. That will most likely cause the upload operation to fail. If this is used on an HTTP(S) server, the PUT command will be used.
-<p class="level1">Use the file name "-" (a single dash) to use stdin instead of a given file. Alternately, the file name "." (a single period) may be specified instead of "-" to use stdin in non-blocking mode to allow reading server output while stdin is being uploaded.
-<p class="level1">You can specify one -T for each URL on the command line. Each -T + URL pair specifies what to upload and to where. curl also supports "globbing" of the -T argument, meaning that you can upload multiple files to a single URL by using the same URL globbing style supported in the URL, like this:
-<p class="level1">curl -T "{file1,file2}" <a href="http://www.uploadtothissite.com">http://www.uploadtothissite.com</a>
-<p class="level1">or even
-<p class="level1">curl -T "img[1-1000].png" <a href="ftp://ftp.picturemania.com/upload/">ftp://ftp.picturemania.com/upload/</a>
-<p class="level0"><a name="--tcp-nodelay"></a><span class="nroffip">--tcp-nodelay</span>
-<p class="level1">Turn on the TCP_NODELAY option. See the <span Class="emphasis">curl_easy_setopt(3)</span> man page for details about this option. (Added in 7.11.2)
-<p class="level0"><a name="--tftp-blksize"></a><span class="nroffip">--tftp-blksize &lt;value&gt;</span>
-<p class="level1">(TFTP) Set TFTP BLKSIZE option (must be &gt;512). This is the block size that curl will try to use when transferring data to or from a TFTP server. By default 512 bytes will be used.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level1">(Added in 7.20.0)
-<p class="level0"><a name="--tlsauthtype"></a><span class="nroffip">--tlsauthtype &lt;authtype&gt;</span>
-<p class="level1">Set TLS authentication type. Currently, the only supported option is "SRP", for TLS-SRP (<a href="http://www.ietf.org/rfc/rfc5054.txt">RFC 5054</a>). If <a class="emphasis" href="#--tlsuser">--tlsuser</a> and <a class="emphasis" href="#--tlspassword">--tlspassword</a> are specified but <a class="emphasis" href="#--tlsauthtype">--tlsauthtype</a> is not, then this option defaults to "SRP". (Added in 7.21.4)
-<p class="level0"><a name="--tlsuser"></a><span class="nroffip">--tlsuser &lt;user&gt;</span>
-<p class="level1">Set username for use with the TLS authentication method specified with <a class="emphasis" href="#--tlsauthtype">--tlsauthtype</a>. Requires that <a class="emphasis" href="#--tlspassword">--tlspassword</a> also be set. (Added in 7.21.4)
-<p class="level0"><a name="--tlspassword"></a><span class="nroffip">--tlspassword &lt;password&gt;</span>
-<p class="level1">Set password for use with the TLS authentication method specified with <a class="emphasis" href="#--tlsauthtype">--tlsauthtype</a>. Requires that <a class="emphasis" href="#--tlsuser">--tlsuser</a> also be set. (Added in 7.21.4)
-<p class="level0"><a name="--tr-encoding"></a><span class="nroffip">--tr-encoding</span>
-<p class="level1">(HTTP) Request a compressed Transfer-Encoding response using one of the algorithms curl supports, and uncompress the data while receiving it.
-<p class="level1">(Added in 7.21.6)
-<p class="level0"><a name="--trace"></a><span class="nroffip">--trace &lt;file&gt;</span>
-<p class="level1">Enables a full trace dump of all incoming and outgoing data, including descriptive information, to the given output file. Use "-" as filename to have the output sent to stdout.
-<p class="level1">This option overrides previous uses of <a class="emphasis" href="#-v">-v, --verbose</a> or <a class="emphasis" href="#--trace-ascii">--trace-ascii</a>.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--trace-ascii"></a><span class="nroffip">--trace-ascii &lt;file&gt;</span>
-<p class="level1">Enables a full trace dump of all incoming and outgoing data, including descriptive information, to the given output file. Use "-" as filename to have the output sent to stdout.
-<p class="level1">This is very similar to <a class="emphasis" href="#--trace">--trace</a>, but leaves out the hex part and only shows the ASCII part of the dump. It makes smaller output that might be easier to read for untrained humans.
-<p class="level1">This option overrides previous uses of <a class="emphasis" href="#-v">-v, --verbose</a> or <a class="emphasis" href="#--trace">--trace</a>.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--trace-time"></a><span class="nroffip">--trace-time</span>
-<p class="level1">Prepends a time stamp to each trace or verbose line that curl displays. (Added in 7.14.0)
-<p class="level0"><a name="-u"></a><span class="nroffip">-u, --user &lt;user:password;options&gt;</span>
-<p class="level1">Specify the user name, password and optional login options to use for server authentication. Overrides <a class="emphasis" href="#-n">-n, --netrc</a> and <a class="emphasis" href="#--netrc-optional">--netrc-optional</a>.
-<p class="level1">If you simply specify the user name, with or without the login options, curl will prompt for a password.
-<p class="level1">If you use an SSPI-enabled curl binary and perform NTLM authentication, you can force curl to select the user name and password from your environment by simply specifying a single colon with this option: "-u :" or by specfying the login options on their own, for example "-u ;auth=NTLM".
-<p class="level1">You can use the optional login options part to specify protocol specific options that may be used during authentication. At present only IMAP, POP3 and SMTP support login options as part of the user login information. For more information about the login options please see <a href="http://www.ietf.org/rfc/rfc2384.txt">RFC 2384</a>, RFC 5092 and IETF draft draft-earhart-url-smtp-00.txt (Added in 7.31.0).
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-U"></a><span class="nroffip">-U, --proxy-user &lt;user:password&gt;</span>
-<p class="level1">Specify the user name and password to use for proxy authentication.
-<p class="level1">If you use an SSPI-enabled curl binary and do NTLM authentication, you can force curl to pick up the user name and password from your environment by simply specifying a single colon with this option: "-U :".
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--url"></a><span class="nroffip">--url &lt;URL&gt;</span>
-<p class="level1">Specify a URL to fetch. This option is mostly handy when you want to specify URL(s) in a config file.
-<p class="level1">This option may be used any number of times. To control where this URL is written, use the <a class="emphasis" href="#-o">-o, --output</a> or the <a class="emphasis" href="#-O">-O, --remote-name</a> options.
-<p class="level0"><a name="-v"></a><span class="nroffip">-v, --verbose</span>
-<p class="level1">Makes the fetching more verbose/talkative. Mostly useful for debugging. A line starting with '&gt;' means "header data" sent by curl, '&lt;' means "header data" received by curl that is hidden in normal cases, and a line starting with '*' means additional info provided by curl.
-<p class="level1">Note that if you only want HTTP headers in the output, <a class="emphasis" href="#-i">-i, --include</a> might be the option you're looking for.
-<p class="level1">If you think this option still doesn't give you enough details, consider using <a class="emphasis" href="#--trace">--trace</a> or <a class="emphasis" href="#--trace-ascii">--trace-ascii</a> instead.
-<p class="level1">This option overrides previous uses of <a class="emphasis" href="#--trace-ascii">--trace-ascii</a> or <a class="emphasis" href="#--trace">--trace</a>.
-<p class="level1">Use <a class="emphasis" href="#-s">-s, --silent</a> to make curl quiet.
-<p class="level0"><a name="-w"></a><span class="nroffip">-w, --write-out &lt;format&gt;</span>
-<p class="level1">Defines what to display on stdout after a completed and successful operation. The format is a string that may contain plain text mixed with any number of variables. The string can be specified as "string", to get read from a particular file you specify it "@filename" and to tell curl to read the format from stdin you write "@-".
-<p class="level1">The variables present in the output format will be substituted by the value or text that curl thinks fit, as described below. All variables are specified as %{variable_name} and to output a normal % you just write them as %%. You can output a newline by using \n, a carriage return with \r and a tab space with \t.
-<p class="level1"><span Class="bold">NOTE:</span> The %-symbol is a special symbol in the win32-environment, where all occurrences of % must be doubled when using this option.
-<p class="level1">The variables available are:
-<p class="level2">
-<p class="level2"><span Class="bold">content_type</span> The Content-Type of the requested document, if there was any.
-<p class="level2"><span Class="bold">filename_effective</span> The ultimate filename that curl writes out to. This is only meaningful if curl is told to write to a file with the <span Class="emphasis">--remote-name</span> or <span Class="emphasis">--output</span> option. It's most useful in combination with the <span Class="emphasis">--remote-header-name</span> option. (Added in 7.25.1)
-<p class="level2"><span Class="bold">ftp_entry_path</span> The initial path curl ended up in when logging on to the remote FTP server. (Added in 7.15.4)
-<p class="level2"><span Class="bold">http_code</span> The numerical response code that was found in the last retrieved HTTP(S) or FTP(s) transfer. In 7.18.2 the alias <span Class="bold">response_code</span> was added to show the same info.
-<p class="level2"><span Class="bold">http_connect</span> The numerical code that was found in the last response (from a proxy) to a curl CONNECT request. (Added in 7.12.4)
-<p class="level2"><span Class="bold">local_ip</span> The IP address of the local end of the most recently done connection - can be either IPv4 or IPv6 (Added in 7.29.0)
-<p class="level2"><span Class="bold">local_port</span> The local port number of the most recently done connection (Added in 7.29.0)
-<p class="level2"><span Class="bold">num_connects</span> Number of new connects made in the recent transfer. (Added in 7.12.3)
-<p class="level2"><span Class="bold">num_redirects</span> Number of redirects that were followed in the request. (Added in 7.12.3)
-<p class="level2"><span Class="bold">redirect_url</span> When an HTTP request was made without -L to follow redirects, this variable will show the actual URL a redirect <span Class="emphasis">would</span> take you to. (Added in 7.18.2)
-<p class="level2"><span Class="bold">remote_ip</span> The remote IP address of the most recently done connection - can be either IPv4 or IPv6 (Added in 7.29.0)
-<p class="level2"><span Class="bold">remote_port</span> The remote port number of the most recently done connection (Added in 7.29.0)
-<p class="level2"><span Class="bold">size_download</span> The total amount of bytes that were downloaded.
-<p class="level2"><span Class="bold">size_header</span> The total amount of bytes of the downloaded headers.
-<p class="level2"><span Class="bold">size_request</span> The total amount of bytes that were sent in the HTTP request.
-<p class="level2"><span Class="bold">size_upload</span> The total amount of bytes that were uploaded.
-<p class="level2"><span Class="bold">speed_download</span> The average download speed that curl measured for the complete download. Bytes per second.
-<p class="level2"><span Class="bold">speed_upload</span> The average upload speed that curl measured for the complete upload. Bytes per second.
-<p class="level2"><span Class="bold">ssl_verify_result</span> The result of the SSL peer certificate verification that was requested. 0 means the verification was successful. (Added in 7.19.0)
-<p class="level2"><span Class="bold">time_appconnect</span> The time, in seconds, it took from the start until the SSL/SSH/etc connect/handshake to the remote host was completed. (Added in 7.19.0)
-<p class="level2"><span Class="bold">time_connect</span> The time, in seconds, it took from the start until the TCP connect to the remote host (or proxy) was completed.
-<p class="level2"><span Class="bold">time_namelookup</span> The time, in seconds, it took from the start until the name resolving was completed.
-<p class="level2"><span Class="bold">time_pretransfer</span> The time, in seconds, it took from the start until the file transfer was just about to begin. This includes all pre-transfer commands and negotiations that are specific to the particular protocol(s) involved.
-<p class="level2"><span Class="bold">time_redirect</span> The time, in seconds, it took for all redirection steps include name lookup, connect, pretransfer and transfer before the final transaction was started. time_redirect shows the complete execution time for multiple redirections. (Added in 7.12.3)
-<p class="level2"><span Class="bold">time_starttransfer</span> The time, in seconds, it took from the start until the first byte was just about to be transferred. This includes time_pretransfer and also the time the server needed to calculate the result.
-<p class="level2"><span Class="bold">time_total</span> The total time, in seconds, that the full operation lasted. The time will be displayed with millisecond resolution.
-<p class="level2"><span Class="bold">url_effective</span> The URL that was fetched last. This is most meaningful if you've told curl to follow location: headers.
-<p class="level1">
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-x"></a><span class="nroffip">-x, --proxy &lt;[protocol://][user:password@]proxyhost[:port]&gt;</span>
-<p class="level1">Use the specified proxy.
-<p class="level1">The proxy string can be specified with a protocol:// prefix to specify alternative proxy protocols. Use socks4://, socks4a://, socks5:// or socks5h:// to request the specific SOCKS version to be used. No protocol specified, http:// and all others will be treated as HTTP proxies. (The protocol support was added in curl 7.21.7)
-<p class="level1">If the port number is not specified in the proxy string, it is assumed to be 1080.
-<p class="level1">This option overrides existing environment variables that set the proxy to use. If there's an environment variable setting a proxy, you can set proxy to "" to override it.
-<p class="level1">All operations that are performed over an HTTP proxy will transparently be converted to HTTP. It means that certain protocol specific operations might not be available. This is not the case if you can tunnel through the proxy, as one with the <a class="emphasis" href="#-p">-p, --proxytunnel</a> option.
-<p class="level1">User and password that might be provided in the proxy string are URL decoded by curl. This allows you to pass in special characters such as @ by using %40 or pass in a colon with %3a.
-<p class="level1">The proxy host can be specified the exact same way as the proxy environment variables, including the protocol prefix (http://) and the embedded user + password.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-X"></a><span class="nroffip">-X, --request &lt;command&gt;</span>
-<p class="level1">(HTTP) Specifies a custom request method to use when communicating with the HTTP server. The specified request will be used instead of the method otherwise used (which defaults to GET). Read the HTTP 1.1 specification for details and explanations. Common additional HTTP requests include PUT and DELETE, but related technologies like WebDAV offers PROPFIND, COPY, MOVE and more.
-<p class="level1">Normally you don't need this option. All sorts of GET, HEAD, POST and PUT requests are rather invoked by using dedicated command line options.
-<p class="level1">This option only changes the actual word used in the HTTP request, it does not alter the way curl behaves. So for example if you want to make a proper HEAD request, using -X HEAD will not suffice. You need to use the <a class="emphasis" href="#-I">-I, --head</a> option.
-<p class="level1">(FTP) Specifies a custom FTP command to use instead of LIST when doing file lists with FTP.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level1">
-<p class="level0"><a name="--xattr"></a><span class="nroffip">--xattr</span>
-<p class="level1">When saving output to a file, this option tells curl to store certain file metadata in extended file attributes. Currently, the URL is stored in the xdg.origin.url attribute and, for HTTP, the content type is stored in the mime_type attribute. If the file system does not support extended attributes, a warning is issued.
-<p class="level1">
-<p class="level0"><a name="-y"></a><span class="nroffip">-y, --speed-time &lt;time&gt;</span>
-<p class="level1">If a download is slower than speed-limit bytes per second during a speed-time period, the download gets aborted. If speed-time is used, the default speed-limit will be 1 unless set with <a class="emphasis" href="#-Y">-Y</a>.
-<p class="level1">This option controls transfers and thus will not affect slow connects etc. If this is a concern for you, try the <a class="emphasis" href="#--connect-timeout">--connect-timeout</a> option.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-Y"></a><span class="nroffip">-Y, --speed-limit &lt;speed&gt;</span>
-<p class="level1">If a download is slower than this given speed (in bytes per second) for speed-time seconds it gets aborted. speed-time is set with <a class="emphasis" href="#-y">-y</a> and is 30 if not set.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-z"></a><span class="nroffip">-z, --time-cond &lt;date expression&gt;|&lt;file&gt;</span>
-<p class="level1">(HTTP/FTP) Request a file that has been modified later than the given time and date, or one that has been modified before that time. The &lt;date expression&gt; can be all sorts of date strings or if it doesn't match any internal ones, it is taken as a filename and tries to get the modification date (mtime) from &lt;file&gt; instead. See the <span Class="emphasis">curl_getdate(3)</span> man pages for date expression details.
-<p class="level1">Start the date expression with a dash (-) to make it request for a document that is older than the given date/time, default is a document that is newer than the specified date/time.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-h"></a><span class="nroffip">-h, --help</span>
-<p class="level1">Usage help.
-<p class="level0"><a name="-M"></a><span class="nroffip">-M, --manual</span>
-<p class="level1">Manual. Display the huge help text.
-<p class="level0"><a name="-V"></a><span class="nroffip">-V, --version</span>
-<p class="level1">Displays information about curl and the libcurl version it uses.
-<p class="level1">The first line includes the full version of curl, libcurl and other 3rd party libraries linked with the executable.
-<p class="level1">The second line (starts with "Protocols:") shows all protocols that libcurl reports to support.
-<p class="level1">The third line (starts with "Features:") shows specific features libcurl reports to offer. Available features include:
-<p class="level2">
-<p class="level1"><a name="IPv6"></a><span class="nroffip">IPv6</span>
-<p class="level2">You can use IPv6 with this.
-<p class="level1"><a name="krb4"></a><span class="nroffip">krb4</span>
-<p class="level2">Krb4 for FTP is supported.
-<p class="level1"><a name="SSL"></a><span class="nroffip">SSL</span>
-<p class="level2">HTTPS and FTPS are supported.
-<p class="level1"><a name="libz"></a><span class="nroffip">libz</span>
-<p class="level2">Automatic decompression of compressed files over HTTP is supported.
-<p class="level1"><a name="NTLM"></a><span class="nroffip">NTLM</span>
-<p class="level2">NTLM authentication is supported.
-<p class="level1"><a name="GSS-Negotiate"></a><span class="nroffip">GSS-Negotiate</span>
-<p class="level2">Negotiate authentication and krb5 for FTP is supported.
-<p class="level1"><a name="Debug"></a><span class="nroffip">Debug</span>
-<p class="level2">This curl uses a libcurl built with Debug. This enables more error-tracking and memory debugging etc. For curl-developers only!
-<p class="level1"><a name="AsynchDNS"></a><span class="nroffip">AsynchDNS</span>
-<p class="level2">This curl uses asynchronous name resolves.
-<p class="level1"><a name="SPNEGO"></a><span class="nroffip">SPNEGO</span>
-<p class="level2">SPNEGO Negotiate authentication is supported.
-<p class="level1"><a name="Largefile"></a><span class="nroffip">Largefile</span>
-<p class="level2">This curl supports transfers of large files, files larger than 2GB.
-<p class="level1"><a name="IDN"></a><span class="nroffip">IDN</span>
-<p class="level2">This curl supports IDN - international domain names.
-<p class="level1"><a name="SSPI"></a><span class="nroffip">SSPI</span>
-<p class="level2">SSPI is supported. If you use NTLM and set a blank user name, curl will authenticate with your current user and password.
-<p class="level1"><a name="TLS-SRP"></a><span class="nroffip">TLS-SRP</span>
-<p class="level2">SRP (Secure Remote Password) authentication is supported for TLS.
-<p class="level1"><a name="Metalink"></a><span class="nroffip">Metalink</span>
-<p class="level2">This curl supports Metalink (both version 3 and 4 (<a href="http://www.ietf.org/rfc/rfc5854.txt">RFC 5854</a>)), which describes mirrors and hashes. curl will use mirrors for failover if there are errors (such as the file or server not being available).
-<p class="level1"><a name="FILES"></a><h2 class="nroffsh">FILES</h2>
-<p class="level0"><span Class="emphasis">~/.curlrc</span>
-<p class="level1">Default config file, see <a class="emphasis" href="#-K">-K, --config</a> for details. <a name="ENVIRONMENT"></a><h2 class="nroffsh">ENVIRONMENT</h2>
-<p class="level0">The environment variables can be specified in lower case or upper case. The lower case version has precedence. http_proxy is an exception as it is only available in lower case.
-<p class="level0">Using an environment variable to set the proxy has the same effect as using the <span Class="emphasis">--proxy</span> option.
-<p class="level0">
-<p class="level0"><a name="httpproxy"></a><span class="nroffip">http_proxy [protocol://]&lt;host&gt;[:port]</span>
-<p class="level1">Sets the proxy server to use for HTTP.
-<p class="level0"><a name="HTTPSPROXY"></a><span class="nroffip">HTTPS_PROXY [protocol://]&lt;host&gt;[:port]</span>
-<p class="level1">Sets the proxy server to use for HTTPS.
-<p class="level0"><a name="url-protocolPROXY"></a><span class="nroffip">[url-protocol]_PROXY [protocol://]&lt;host&gt;[:port]</span>
-<p class="level1">Sets the proxy server to use for [url-protocol], where the protocol is a protocol that curl supports and as specified in a URL. FTP, FTPS, POP3, IMAP, SMTP, LDAP etc.
-<p class="level0"><a name="ALLPROXY"></a><span class="nroffip">ALL_PROXY [protocol://]&lt;host&gt;[:port]</span>
-<p class="level1">Sets the proxy server to use if no protocol-specific proxy is set.
-<p class="level0"><a name="NOPROXY"></a><span class="nroffip">NO_PROXY &lt;comma-separated list of hosts&gt;</span>
-<p class="level1">list of host names that shouldn't go through any proxy. If set to a asterisk '*' only, it matches all hosts. <a name="PROXY"></a><h2 class="nroffsh">PROXY PROTOCOL PREFIXES</h2>
-<p class="level0">Since curl version 7.21.7, the proxy string may be specified with a protocol:// prefix to specify alternative proxy protocols.
-<p class="level0">If no protocol is specified in the proxy string or if the string doesn't match a supported one, the proxy will be treated as an HTTP proxy.
-<p class="level0">The supported proxy protocol prefixes are as follows:
-<p class="level0"><a name="socks4"></a><span class="nroffip">socks4://</span>
-<p class="level1">Makes it the equivalent of <a class="emphasis" href="#--socks4">--socks4</a>
-<p class="level0"><a name="socks4a"></a><span class="nroffip">socks4a://</span>
-<p class="level1">Makes it the equivalent of <a class="emphasis" href="#--socks4a">--socks4a</a>
-<p class="level0"><a name="socks5"></a><span class="nroffip">socks5://</span>
-<p class="level1">Makes it the equivalent of <a class="emphasis" href="#--socks5">--socks5</a>
-<p class="level0"><a name="socks5h"></a><span class="nroffip">socks5h://</span>
-<p class="level1">Makes it the equivalent of <a class="emphasis" href="#--socks5-hostname">--socks5-hostname</a> <a name="EXIT"></a><h2 class="nroffsh">EXIT CODES</h2>
-<p class="level0">There are a bunch of different error codes and their corresponding error messages that may appear during bad conditions. At the time of this writing, the exit codes are:
-<p class="level0"><a name="1"></a><span class="nroffip">1</span>
-<p class="level1">Unsupported protocol. This build of curl has no support for this protocol.
-<p class="level0"><a name="2"></a><span class="nroffip">2</span>
-<p class="level1">Failed to initialize.
-<p class="level0"><a name="3"></a><span class="nroffip">3</span>
-<p class="level1">URL malformed. The syntax was not correct.
-<p class="level0"><a name="4"></a><span class="nroffip">4</span>
-<p class="level1">A feature or option that was needed to perform the desired request was not enabled or was explicitly disabled at build-time. To make curl able to do this, you probably need another build of libcurl!
-<p class="level0"><a name="5"></a><span class="nroffip">5</span>
-<p class="level1">Couldn't resolve proxy. The given proxy host could not be resolved.
-<p class="level0"><a name="6"></a><span class="nroffip">6</span>
-<p class="level1">Couldn't resolve host. The given remote host was not resolved.
-<p class="level0"><a name="7"></a><span class="nroffip">7</span>
-<p class="level1">Failed to connect to host.
-<p class="level0"><a name="8"></a><span class="nroffip">8</span>
-<p class="level1">FTP weird server reply. The server sent data curl couldn't parse.
-<p class="level0"><a name="9"></a><span class="nroffip">9</span>
-<p class="level1">FTP access denied. The server denied login or denied access to the particular resource or directory you wanted to reach. Most often you tried to change to a directory that doesn't exist on the server.
-<p class="level0"><a name="11"></a><span class="nroffip">11</span>
-<p class="level1">FTP weird PASS reply. Curl couldn't parse the reply sent to the PASS request.
-<p class="level0"><a name="13"></a><span class="nroffip">13</span>
-<p class="level1">FTP weird PASV reply, Curl couldn't parse the reply sent to the PASV request.
-<p class="level0"><a name="14"></a><span class="nroffip">14</span>
-<p class="level1">FTP weird 227 format. Curl couldn't parse the 227-line the server sent.
-<p class="level0"><a name="15"></a><span class="nroffip">15</span>
-<p class="level1">FTP can't get host. Couldn't resolve the host IP we got in the 227-line.
-<p class="level0"><a name="17"></a><span class="nroffip">17</span>
-<p class="level1">FTP couldn't set binary. Couldn't change transfer method to binary.
-<p class="level0"><a name="18"></a><span class="nroffip">18</span>
-<p class="level1">Partial file. Only a part of the file was transferred.
-<p class="level0"><a name="19"></a><span class="nroffip">19</span>
-<p class="level1">FTP couldn't download/access the given file, the RETR (or similar) command failed.
-<p class="level0"><a name="21"></a><span class="nroffip">21</span>
-<p class="level1">FTP quote error. A quote command returned error from the server.
-<p class="level0"><a name="22"></a><span class="nroffip">22</span>
-<p class="level1">HTTP page not retrieved. The requested url was not found or returned another error with the HTTP error code being 400 or above. This return code only appears if <a class="emphasis" href="#-f">-f, --fail</a> is used.
-<p class="level0"><a name="23"></a><span class="nroffip">23</span>
-<p class="level1">Write error. Curl couldn't write data to a local filesystem or similar.
-<p class="level0"><a name="25"></a><span class="nroffip">25</span>
-<p class="level1">FTP couldn't STOR file. The server denied the STOR operation, used for FTP uploading.
-<p class="level0"><a name="26"></a><span class="nroffip">26</span>
-<p class="level1">Read error. Various reading problems.
-<p class="level0"><a name="27"></a><span class="nroffip">27</span>
-<p class="level1">Out of memory. A memory allocation request failed.
-<p class="level0"><a name="28"></a><span class="nroffip">28</span>
-<p class="level1">Operation timeout. The specified time-out period was reached according to the conditions.
-<p class="level0"><a name="30"></a><span class="nroffip">30</span>
-<p class="level1">FTP PORT failed. The PORT command failed. Not all FTP servers support the PORT command, try doing a transfer using PASV instead!
-<p class="level0"><a name="31"></a><span class="nroffip">31</span>
-<p class="level1">FTP couldn't use REST. The REST command failed. This command is used for resumed FTP transfers.
-<p class="level0"><a name="33"></a><span class="nroffip">33</span>
-<p class="level1">HTTP range error. The range "command" didn't work.
-<p class="level0"><a name="34"></a><span class="nroffip">34</span>
-<p class="level1">HTTP post error. Internal post-request generation error.
-<p class="level0"><a name="35"></a><span class="nroffip">35</span>
-<p class="level1">SSL connect error. The SSL handshaking failed.
-<p class="level0"><a name="36"></a><span class="nroffip">36</span>
-<p class="level1">FTP bad download resume. Couldn't continue an earlier aborted download.
-<p class="level0"><a name="37"></a><span class="nroffip">37</span>
-<p class="level1">FILE couldn't read file. Failed to open the file. Permissions?
-<p class="level0"><a name="38"></a><span class="nroffip">38</span>
-<p class="level1">LDAP cannot bind. LDAP bind operation failed.
-<p class="level0"><a name="39"></a><span class="nroffip">39</span>
-<p class="level1">LDAP search failed.
-<p class="level0"><a name="41"></a><span class="nroffip">41</span>
-<p class="level1">Function not found. A required LDAP function was not found.
-<p class="level0"><a name="42"></a><span class="nroffip">42</span>
-<p class="level1">Aborted by callback. An application told curl to abort the operation.
-<p class="level0"><a name="43"></a><span class="nroffip">43</span>
-<p class="level1">Internal error. A function was called with a bad parameter.
-<p class="level0"><a name="45"></a><span class="nroffip">45</span>
-<p class="level1">Interface error. A specified outgoing interface could not be used.
-<p class="level0"><a name="47"></a><span class="nroffip">47</span>
-<p class="level1">Too many redirects. When following redirects, curl hit the maximum amount.
-<p class="level0"><a name="48"></a><span class="nroffip">48</span>
-<p class="level1">Unknown option specified to libcurl. This indicates that you passed a weird option to curl that was passed on to libcurl and rejected. Read up in the manual!
-<p class="level0"><a name="49"></a><span class="nroffip">49</span>
-<p class="level1">Malformed telnet option.
-<p class="level0"><a name="51"></a><span class="nroffip">51</span>
-<p class="level1">The peer's SSL certificate or SSH MD5 fingerprint was not OK.
-<p class="level0"><a name="52"></a><span class="nroffip">52</span>
-<p class="level1">The server didn't reply anything, which here is considered an error.
-<p class="level0"><a name="53"></a><span class="nroffip">53</span>
-<p class="level1">SSL crypto engine not found.
-<p class="level0"><a name="54"></a><span class="nroffip">54</span>
-<p class="level1">Cannot set SSL crypto engine as default.
-<p class="level0"><a name="55"></a><span class="nroffip">55</span>
-<p class="level1">Failed sending network data.
-<p class="level0"><a name="56"></a><span class="nroffip">56</span>
-<p class="level1">Failure in receiving network data.
-<p class="level0"><a name="58"></a><span class="nroffip">58</span>
-<p class="level1">Problem with the local certificate.
-<p class="level0"><a name="59"></a><span class="nroffip">59</span>
-<p class="level1">Couldn't use specified SSL cipher.
-<p class="level0"><a name="60"></a><span class="nroffip">60</span>
-<p class="level1">Peer certificate cannot be authenticated with known CA certificates.
-<p class="level0"><a name="61"></a><span class="nroffip">61</span>
-<p class="level1">Unrecognized transfer encoding.
-<p class="level0"><a name="62"></a><span class="nroffip">62</span>
-<p class="level1">Invalid LDAP URL.
-<p class="level0"><a name="63"></a><span class="nroffip">63</span>
-<p class="level1">Maximum file size exceeded.
-<p class="level0"><a name="64"></a><span class="nroffip">64</span>
-<p class="level1">Requested FTP SSL level failed.
-<p class="level0"><a name="65"></a><span class="nroffip">65</span>
-<p class="level1">Sending the data requires a rewind that failed.
-<p class="level0"><a name="66"></a><span class="nroffip">66</span>
-<p class="level1">Failed to initialise SSL Engine.
-<p class="level0"><a name="67"></a><span class="nroffip">67</span>
-<p class="level1">The user name, password, or similar was not accepted and curl failed to log in.
-<p class="level0"><a name="68"></a><span class="nroffip">68</span>
-<p class="level1">File not found on TFTP server.
-<p class="level0"><a name="69"></a><span class="nroffip">69</span>
-<p class="level1">Permission problem on TFTP server.
-<p class="level0"><a name="70"></a><span class="nroffip">70</span>
-<p class="level1">Out of disk space on TFTP server.
-<p class="level0"><a name="71"></a><span class="nroffip">71</span>
-<p class="level1">Illegal TFTP operation.
-<p class="level0"><a name="72"></a><span class="nroffip">72</span>
-<p class="level1">Unknown TFTP transfer ID.
-<p class="level0"><a name="73"></a><span class="nroffip">73</span>
-<p class="level1">File already exists (TFTP).
-<p class="level0"><a name="74"></a><span class="nroffip">74</span>
-<p class="level1">No such user (TFTP).
-<p class="level0"><a name="75"></a><span class="nroffip">75</span>
-<p class="level1">Character conversion failed.
-<p class="level0"><a name="76"></a><span class="nroffip">76</span>
-<p class="level1">Character conversion functions required.
-<p class="level0"><a name="77"></a><span class="nroffip">77</span>
-<p class="level1">Problem with reading the SSL CA cert (path? access rights?).
-<p class="level0"><a name="78"></a><span class="nroffip">78</span>
-<p class="level1">The resource referenced in the URL does not exist.
-<p class="level0"><a name="79"></a><span class="nroffip">79</span>
-<p class="level1">An unspecified error occurred during the SSH session.
-<p class="level0"><a name="80"></a><span class="nroffip">80</span>
-<p class="level1">Failed to shut down the SSL connection.
-<p class="level0"><a name="82"></a><span class="nroffip">82</span>
-<p class="level1">Could not load CRL file, missing or wrong format (added in 7.19.0).
-<p class="level0"><a name="83"></a><span class="nroffip">83</span>
-<p class="level1">Issuer check failed (added in 7.19.0).
-<p class="level0"><a name="84"></a><span class="nroffip">84</span>
-<p class="level1">The FTP PRET command failed
-<p class="level0"><a name="85"></a><span class="nroffip">85</span>
-<p class="level1">RTSP: mismatch of CSeq numbers
-<p class="level0"><a name="86"></a><span class="nroffip">86</span>
-<p class="level1">RTSP: mismatch of Session Identifiers
-<p class="level0"><a name="87"></a><span class="nroffip">87</span>
-<p class="level1">unable to parse FTP file list
-<p class="level0"><a name="88"></a><span class="nroffip">88</span>
-<p class="level1">FTP chunk callback reported error
-<p class="level0"><a name="XX"></a><span class="nroffip">XX</span>
-<p class="level1">More error codes will appear here in future releases. The existing ones are meant to never change. <a name="AUTHORS"></a><h2 class="nroffsh">AUTHORS / CONTRIBUTORS</h2>
-<p class="level0">Daniel Stenberg is the main author, but the whole list of contributors is found in the separate THANKS file. <a name="WWW"></a><h2 class="nroffsh">WWW</h2>
-<p class="level0"><a href="http://curl.haxx.se">http://curl.haxx.se</a> <a name="FTP"></a><h2 class="nroffsh">FTP</h2>
-<p class="level0"><a href="ftp://ftp.sunet.se/pub/www/utilities/curl/">ftp://ftp.sunet.se/pub/www/utilities/curl/</a> <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><span Class="manpage">ftp (1)</span> <span Class="manpage">wget (1)</span> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/libs/libcurl/docs/curl.pdf b/libs/libcurl/docs/curl.pdf
deleted file mode 100644
index d990270390..0000000000
--- a/libs/libcurl/docs/curl.pdf
+++ /dev/null
Binary files differ
diff --git a/libs/libcurl/docs/index.html b/libs/libcurl/docs/index.html
deleted file mode 100644
index 4390378afd..0000000000
--- a/libs/libcurl/docs/index.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html><head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>Index to Curl documentation</title>
-</head>
-
-<body>
-<h1 align="center">Index to Curl documentation</h1>
-
-<h2>Programs</h2>
-<a href="curl-config.html">curl-config</A>
-<br><a href="curl.html">curl</A>
-
-<h2>Tutorial</h2>
-<a href="TheArtOfHttpScripting">The Art Of Scripting HTTP Requests Using Curl</a> (plain text)
-
-<h2>libcurl</h2>
-See the <a href="libcurl/index.html">libcurl section</a>
-
-</body></html>
diff --git a/libs/libcurl/docs/mk-ca-bundle.1 b/libs/libcurl/docs/mk-ca-bundle.1
deleted file mode 100644
index c2f9f0c76a..0000000000
--- a/libs/libcurl/docs/mk-ca-bundle.1
+++ /dev/null
@@ -1,70 +0,0 @@
-.\" **************************************************************************
-.\" * _ _ ____ _
-.\" * Project ___| | | | _ \| |
-.\" * / __| | | | |_) | |
-.\" * | (__| |_| | _ <| |___
-.\" * \___|\___/|_| \_\_____|
-.\" *
-.\" * Copyright (C) 2008 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
-.\" *
-.\" * This software is licensed as described in the file COPYING, which
-.\" * you should have received as part of this distribution. The terms
-.\" * are also available at http://curl.haxx.se/docs/copyright.html.
-.\" *
-.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
-.\" * copies of the Software, and permit persons to whom the Software is
-.\" * furnished to do so, under the terms of the COPYING file.
-.\" *
-.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
-.\" * KIND, either express or implied.
-.\" *
-.\" **************************************************************************
-.\"
-.TH mk-ca-bundle 1 "5 Jan 2013" "version 1.17" "mk-ca-bundle manual"
-.SH NAME
-mk-ca-bundle \- convert mozilla's certdata.txt to PEM format
-.SH SYNOPSIS
-mk-ca-bundle [bilnqtuv]
-.I [outputfile]
-.SH DESCRIPTION
-The mk-ca-bundle tool downloads the certdata.txt file from Mozilla's source
-tree over HTTP, then parses certdata.txt and extracts CA Root Certificates
-into PEM format. These are then processed with the OpenSSL commandline tool
-to produce the final ca-bundle file.
-
-The default \fIoutputfile\fP name is \fBca-bundle.crt\fP. By setting it to '-'
-(a single dash) you will get the output sent to STDOUT instead of a file.
-
-The PEM format this scripts uses for output makes the result readily available
-for use by just about all OpenSSL or GnuTLS powered applications, such as
-curl, wget and more.
-.SH OPTIONS
-The following options are supported:
-.IP -b
-backup an existing version of \fIoutputfilename\fP
-.IP -f
-force rebuild even if certdata.txt is current (Added in version 1.17)
-.IP -i
-print version info about used modules
-.IP -l
-print license info about certdata.txt
-.IP -n
-no download of certdata.txt (to use existing)
-.IP -q
-be really quiet (no progress output at all)
-.IP -t
-include plain text listing of certificates
-.IP -u
-unlink (remove) certdata.txt after processing
-.IP -v
-be verbose and print out processed CAs
-.SH EXIT STATUS
-Returns 0 on success. Returns 1 if it fails to download data.
-.SH SEE ALSO
-.BR curl (1)
-.SH HISTORY
-\fBmk-ca-bundle\fP is a command line tool that is shipped as part of every
-curl and libcurl release (see http://curl.haxx.se/). It was originally based
-on the parse-certs script written by Roland Krikava and was later much
-improved by Guenter Knauf. This manual page was written by Jan Schaumann
-\&<jschauma@netmeister.org>.
diff --git a/libs/libcurl/docs/mk-ca-bundle.html b/libs/libcurl/docs/mk-ca-bundle.html
deleted file mode 100644
index fbdd58957a..0000000000
--- a/libs/libcurl/docs/mk-ca-bundle.html
+++ /dev/null
@@ -1,82 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html><head>
-<title>mk-ca-bundle man page</title>
-<meta name="generator" content="roffit">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">mk-ca-bundle - convert mozilla's certdata.txt to PEM format <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0">mk-ca-bundle [bilnqtuv] <span Class="emphasis">[outputfile]</span> <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">The mk-ca-bundle tool downloads the certdata.txt file from Mozilla's source tree over HTTP, then parses certdata.txt and extracts CA Root Certificates into PEM format. These are then processed with the OpenSSL commandline tool to produce the final ca-bundle file.
-<p class="level0">The default <span Class="emphasis">outputfile</span> name is <span Class="bold">ca-bundle.crt</span>. By setting it to '-' (a single dash) you will get the output sent to STDOUT instead of a file.
-<p class="level0">The PEM format this scripts uses for output makes the result readily available for use by just about all OpenSSL or GnuTLS powered applications, such as curl, wget and more. <a name="OPTIONS"></a><h2 class="nroffsh">OPTIONS</h2>
-<p class="level0">The following options are supported:
-<p class="level0"><a name="-b"></a><span class="nroffip">-b</span>
-<p class="level1">backup an existing version of <span Class="emphasis">outputfilename</span>
-<p class="level0"><a name="-f"></a><span class="nroffip">-f</span>
-<p class="level1">force rebuild even if certdata.txt is current (Added in version 1.17)
-<p class="level0"><a name="-i"></a><span class="nroffip">-i</span>
-<p class="level1">print version info about used modules
-<p class="level0"><a name="-l"></a><span class="nroffip">-l</span>
-<p class="level1">print license info about certdata.txt
-<p class="level0"><a name="-n"></a><span class="nroffip">-n</span>
-<p class="level1">no download of certdata.txt (to use existing)
-<p class="level0"><a name="-q"></a><span class="nroffip">-q</span>
-<p class="level1">be really quiet (no progress output at all)
-<p class="level0"><a name="-t"></a><span class="nroffip">-t</span>
-<p class="level1">include plain text listing of certificates
-<p class="level0"><a name="-u"></a><span class="nroffip">-u</span>
-<p class="level1">unlink (remove) certdata.txt after processing
-<p class="level0"><a name="-v"></a><span class="nroffip">-v</span>
-<p class="level1">be verbose and print out processed CAs <a name="EXIT"></a><h2 class="nroffsh">EXIT STATUS</h2>
-<p class="level0">Returns 0 on success. Returns 1 if it fails to download data. <a name="CERTDATA"></a><h2 class="nroffsh">CERTDATA FORMAT</h2>
-<p class="level0">The file format used by Mozilla for this trust information seems to be documented here: <pre>
-<p class="level0"><a href="http://p11-glue.freedesktop.org/doc/storing-trust-policy/storing-trust-existing.html">http://p11-glue.freedesktop.org/doc/storing-trust-policy/storing-trust-existing.html</a>
- </pre>
-
-<p class="level0"><a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><span Class="manpage">curl (1)</span> <a name="HISTORY"></a><h2 class="nroffsh">HISTORY</h2>
-<p class="level0"><span Class="bold">mk-ca-bundle</span> is a command line tool that is shipped as part of every curl and libcurl release (see <a href="http://curl.haxx.se/">http://curl.haxx.se/</a>). It was originally based on the parse-certs script written by Roland Krikava and was later much improved by Guenter Knauf. This manual page was initially written by Jan Schaumann &lt;jschauma@netmeister.org&gt;. <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/libs/libcurl/docs/mk-ca-bundle.pdf b/libs/libcurl/docs/mk-ca-bundle.pdf
deleted file mode 100644
index aa11a96672..0000000000
--- a/libs/libcurl/docs/mk-ca-bundle.pdf
+++ /dev/null
Binary files differ
diff --git a/libs/liblua/docs/logo.gif b/libs/liblua/docs/logo.gif
new file mode 100644
index 0000000000..5c77eacc3b
--- /dev/null
+++ b/libs/liblua/docs/logo.gif
Binary files differ
diff --git a/libs/liblua/docs/lua.css b/libs/liblua/docs/lua.css
new file mode 100644
index 0000000000..5bedf7eb89
--- /dev/null
+++ b/libs/liblua/docs/lua.css
@@ -0,0 +1,164 @@
+html {
+ background-color: #F8F8F8 ;
+}
+
+body {
+ background-color: #FFFFFF ;
+ color: #000000 ;
+ font-family: Helvetica, Arial, sans-serif ;
+ text-align: justify ;
+ line-height: 1.25 ;
+ margin: 16px auto ;
+ padding: 32px ;
+ border: solid #a0a0a0 1px ;
+ border-radius: 20px ;
+ max-width: 70em ;
+ width: 90% ;
+}
+
+h1, h2, h3, h4 {
+ color: #000080 ;
+ font-family: Verdana, Geneva, sans-serif ;
+ font-weight: normal ;
+ font-style: normal ;
+ text-align: left ;
+}
+
+h1 {
+ font-size: 28pt ;
+}
+
+h1 img {
+ vertical-align: text-bottom ;
+}
+
+h2:before {
+ content: "\2756" ;
+ padding-right: 0.5em ;
+}
+
+a {
+ text-decoration: none ;
+}
+
+a:link {
+ color: #000080 ;
+}
+
+a:link:hover, a:visited:hover {
+ background-color: #D0D0FF ;
+ color: #000080 ;
+ border-radius: 4px ;
+}
+
+a:link:active, a:visited:active {
+ color: #FF0000 ;
+}
+
+div.menubar {
+ padding-bottom: 0.5em ;
+}
+
+p.menubar {
+ margin-left: 2.5em ;
+}
+
+.menubar a:hover {
+ margin: -3px -3px -3px -3px ;
+ padding: 3px 3px 3px 3px ;
+ border-radius: 4px ;
+}
+
+:target {
+ background-color: #F0F0F0 ;
+ margin: -8px ;
+ padding: 8px ;
+ border-radius: 8px ;
+ outline: none ;
+}
+
+hr {
+ display: none ;
+}
+
+table hr {
+ background-color: #a0a0a0 ;
+ color: #a0a0a0 ;
+ border: 0 ;
+ height: 1px ;
+ display: block ;
+}
+
+.footer {
+ color: gray ;
+ font-size: x-small ;
+ text-transform: lowercase ;
+}
+
+input[type=text] {
+ border: solid #a0a0a0 2px ;
+ border-radius: 2em ;
+ background-image: url('images/search.png') ;
+ background-repeat: no-repeat ;
+ background-position: 4px center ;
+ padding-left: 20px ;
+ height: 2em ;
+}
+
+pre.session {
+ background-color: #F8F8F8 ;
+ padding: 1em ;
+ border-radius: 8px ;
+}
+
+td.gutter {
+ width: 4% ;
+}
+
+table.columns {
+ border: none ;
+ border-spacing: 0 ;
+ border-collapse: collapse ;
+}
+
+table.columns td {
+ vertical-align: top ;
+ padding: 0 ;
+ padding-bottom: 1em ;
+ text-align: justify ;
+ line-height: 1.25 ;
+}
+
+p.logos a:link:hover, p.logos a:visited:hover {
+ background-color: inherit ;
+}
+
+table.book {
+ border: none ;
+ border-spacing: 0 ;
+ border-collapse: collapse ;
+}
+
+table.book td {
+ padding: 0 ;
+ vertical-align: top ;
+}
+
+table.book td.cover {
+ padding-right: 1em ;
+}
+
+table.book img {
+ border: solid #000080 1px ;
+}
+
+table.book span {
+ font-size: small ;
+ text-align: left ;
+ display: block ;
+ margin-top: 0.25em ;
+}
+
+img {
+ background-color: white ;
+}
diff --git a/libs/liblua/docs/osi-certified-72x60.png b/libs/liblua/docs/osi-certified-72x60.png
new file mode 100644
index 0000000000..07df5f6ee7
--- /dev/null
+++ b/libs/liblua/docs/osi-certified-72x60.png
Binary files differ
diff --git a/libs/liblua/docs/readme.html b/libs/liblua/docs/readme.html
new file mode 100644
index 0000000000..96a9386e2a
--- /dev/null
+++ b/libs/liblua/docs/readme.html
@@ -0,0 +1,365 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<TITLE>Lua 5.3 readme</TITLE>
+<LINK REL="stylesheet" TYPE="text/css" HREF="lua.css">
+<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=iso-8859-1">
+<STYLE TYPE="text/css">
+blockquote, .display {
+ border: solid #a0a0a0 2px ;
+ border-radius: 8px ;
+ padding: 1em ;
+ margin: 0px ;
+}
+
+.display {
+ word-spacing: 0.25em ;
+}
+
+dl.display dd {
+ padding-bottom: 0.2em ;
+}
+
+tt, kbd, code {
+ font-size: 12pt ;
+}
+</STYLE>
+</HEAD>
+
+<BODY>
+
+<H1>
+<A HREF="http://www.lua.org/"><IMG SRC="logo.gif" ALT="Lua"></A>
+Welcome to Lua 5.3
+</H1>
+
+<DIV CLASS="menubar">
+<A HREF="#about">about</A>
+&middot;
+<A HREF="#install">installation</A>
+&middot;
+<A HREF="#changes">changes</A>
+&middot;
+<A HREF="#license">license</A>
+&middot;
+<A HREF="contents.html">reference manual</A>
+</DIV>
+
+<H2><A NAME="about">About Lua</A></H2>
+<P>
+Lua is a powerful, fast, lightweight, embeddable scripting language
+developed by a
+<A HREF="http://www.lua.org/authors.html">team</A>
+at
+<A HREF="http://www.puc-rio.br/">PUC-Rio</A>,
+the Pontifical Catholic University of Rio de Janeiro in Brazil.
+Lua is
+<A HREF="#license">free software</A>
+used in many products and projects around the world.
+
+<P>
+Lua's
+<A HREF="http://www.lua.org/">official web site</A>
+provides complete information
+about Lua,
+including
+an
+<A HREF="http://www.lua.org/about.html">executive summary</A>
+and
+updated
+<A HREF="http://www.lua.org/docs.html">documentation</A>,
+especially the
+<A HREF="http://www.lua.org/manual/5.3/">reference manual</A>,
+which may differ slightly from the
+<A HREF="contents.html">local copy</A>
+distributed in this package.
+
+<H2><A NAME="install">Installing Lua</A></H2>
+<P>
+Lua is distributed in
+<A HREF="http://www.lua.org/ftp/">source</A>
+form.
+You need to build it before using it.
+Building Lua should be straightforward
+because
+Lua is implemented in pure ANSI C and compiles unmodified in all known
+platforms that have an ANSI C compiler.
+Lua also compiles unmodified as C++.
+The instructions given below for building Lua are for Unix-like platforms.
+See also
+<A HREF="#other">instructions for other systems</A>
+and
+<A HREF="#customization">customization options</A>.
+
+<P>
+If you don't have the time or the inclination to compile Lua yourself,
+get a binary from
+<A HREF="http://lua-users.org/wiki/LuaBinaries">LuaBinaries</A>.
+Try also
+<A HREF="http://luadist.org/">LuaDist</A>,
+a multi-platform distribution of Lua that includes batteries.
+
+<H3>Building Lua</H3>
+<P>
+In most Unix-like platforms, simply do "<KBD>make</KBD>" with a suitable target.
+Here are the details.
+
+<OL>
+<LI>
+Open a terminal window and move to
+the top-level directory, which is named <TT>lua-5.3.x</TT>.
+The <TT>Makefile</TT> there controls both the build process and the installation process.
+<P>
+<LI>
+ Do "<KBD>make</KBD>" and see if your platform is listed.
+ The platforms currently supported are:
+<P>
+<P CLASS="display">
+ aix bsd c89 freebsd generic linux macosx mingw posix solaris
+</P>
+<P>
+ If your platform is listed, just do "<KBD>make xxx</KBD>", where xxx
+ is your platform name.
+<P>
+ If your platform is not listed, try the closest one or posix, generic,
+ c89, in this order.
+<P>
+<LI>
+The compilation takes only a few moments
+and produces three files in the <TT>src</TT> directory:
+lua (the interpreter),
+luac (the compiler),
+and liblua.a (the library).
+<P>
+<LI>
+ To check that Lua has been built correctly, do "<KBD>make test</KBD>"
+ after building Lua. This will run the interpreter and print its version.
+</OL>
+<P>
+If you're running Linux and get compilation errors,
+make sure you have installed the <TT>readline</TT> development package
+(which is probably named <TT>libreadline-dev</TT> or <TT>readline-devel</TT>).
+If you get link errors after that,
+then try "<KBD>make linux MYLIBS=-ltermcap</KBD>".
+
+<H3>Installing Lua</H3>
+<P>
+ Once you have built Lua, you may want to install it in an official
+ place in your system. In this case, do "<KBD>make install</KBD>". The official
+ place and the way to install files are defined in the <TT>Makefile</TT>. You'll
+ probably need the right permissions to install files.
+
+<P>
+ To build and install Lua in one step, do "<KBD>make xxx install</KBD>",
+ where xxx is your platform name.
+
+<P>
+ To install Lua locally, do "<KBD>make local</KBD>".
+ This will create a directory <TT>install</TT> with subdirectories
+ <TT>bin</TT>, <TT>include</TT>, <TT>lib</TT>, <TT>man</TT>, <TT>share</TT>,
+ and install Lua as listed below.
+
+ To install Lua locally, but in some other directory, do
+ "<KBD>make install INSTALL_TOP=xxx</KBD>", where xxx is your chosen directory.
+ The installation starts in the <TT>src</TT> and <TT>doc</TT> directories,
+ so take care if <TT>INSTALL_TOP</TT> is not an absolute path.
+
+<DL CLASS="display">
+<DT>
+ bin:
+<DD>
+ lua luac
+<DT>
+ include:
+<DD>
+ lua.h luaconf.h lualib.h lauxlib.h lua.hpp
+<DT>
+ lib:
+<DD>
+ liblua.a
+<DT>
+ man/man1:
+<DD>
+ lua.1 luac.1
+</DL>
+
+<P>
+ These are the only directories you need for development.
+ If you only want to run Lua programs,
+ you only need the files in <TT>bin</TT> and <TT>man</TT>.
+ The files in <TT>include</TT> and <TT>lib</TT> are needed for
+ embedding Lua in C or C++ programs.
+
+<H3><A NAME="customization">Customization</A></H3>
+<P>
+ Three kinds of things can be customized by editing a file:
+<UL>
+ <LI> Where and how to install Lua &mdash; edit <TT>Makefile</TT>.
+ <LI> How to build Lua &mdash; edit <TT>src/Makefile</TT>.
+ <LI> Lua features &mdash; edit <TT>src/luaconf.h</TT>.
+</UL>
+
+<P>
+ You don't actually need to edit the Makefiles because you may set the
+ relevant variables in the command line when invoking make.
+ Nevertheless, it's probably best to edit and save the Makefiles to
+ record the changes you've made.
+
+<P>
+ On the other hand, if you need to customize some Lua features, you'll need
+ to edit <TT>src/luaconf.h</TT> before building and installing Lua.
+ The edited file will be the one installed, and
+ it will be used by any Lua clients that you build, to ensure consistency.
+ Further customization is available to experts by editing the Lua sources.
+
+<H3><A NAME="other">Building Lua on other systems</A></H3>
+<P>
+ If you're not using the usual Unix tools, then the instructions for
+ building Lua depend on the compiler you use. You'll need to create
+ projects (or whatever your compiler uses) for building the library,
+ the interpreter, and the compiler, as follows:
+
+<DL CLASS="display">
+<DT>
+library:
+<DD>
+lapi.c lcode.c lctype.c ldebug.c ldo.c ldump.c lfunc.c lgc.c llex.c
+lmem.c lobject.c lopcodes.c lparser.c lstate.c lstring.c ltable.c
+ltm.c lundump.c lvm.c lzio.c
+lauxlib.c lbaselib.c lbitlib.c lcorolib.c ldblib.c liolib.c
+lmathlib.c loslib.c lstrlib.c ltablib.c lutf8lib.c loadlib.c linit.c
+<DT>
+interpreter:
+<DD>
+ library, lua.c
+<DT>
+compiler:
+<DD>
+ library, luac.c
+</DL>
+
+<P>
+ To use Lua as a library in your own programs you'll need to know how to
+ create and use libraries with your compiler. Moreover, to dynamically load
+ C libraries for Lua you'll need to know how to create dynamic libraries
+ and you'll need to make sure that the Lua API functions are accessible to
+ those dynamic libraries &mdash; but <EM>don't</EM> link the Lua library
+ into each dynamic library. For Unix, we recommend that the Lua library
+ be linked statically into the host program and its symbols exported for
+ dynamic linking; <TT>src/Makefile</TT> does this for the Lua interpreter.
+ For Windows, we recommend that the Lua library be a DLL.
+ In all cases, the compiler luac should be linked statically.
+
+<P>
+ As mentioned above, you may edit <TT>src/luaconf.h</TT> to customize
+ some features before building Lua.
+
+<H2><A NAME="changes">Changes since Lua 5.2</A></H2>
+<P>
+Here are the main changes introduced in Lua 5.3.
+The
+<A HREF="contents.html">reference manual</A>
+lists the
+<A HREF="manual.html#8">incompatibilities</A> that had to be introduced.
+
+<H3>Main changes</H3>
+<UL>
+<LI> integers (64-bit by default)
+<LI> official support for 32-bit numbers
+<LI> bitwise operators
+<LI> basic utf-8 support
+<LI> functions for packing and unpacking values
+
+</UL>
+
+Here are the other changes introduced in Lua 5.3:
+<H3>Language</H3>
+<UL>
+<LI> userdata can have any Lua value as uservalue
+<LI> floor division
+<LI> more flexible rules for some metamethods
+</UL>
+
+<H3>Libraries</H3>
+<UL>
+<LI> <CODE>ipairs</CODE> and the table library respect metamethods
+<LI> strip option in <CODE>string.dump</CODE>
+<LI> table library respects metamethods
+<LI> new function <CODE>table.move</CODE>
+<LI> new function <CODE>string.pack</CODE>
+<LI> new function <CODE>string.unpack</CODE>
+<LI> new function <CODE>string.packsize</CODE>
+</UL>
+
+<H3>C API</H3>
+<UL>
+<LI> simpler API for continuation functions in C
+<LI> <CODE>lua_gettable</CODE> and similar functions return type of resulted value
+<LI> strip option in <CODE>lua_dump</CODE>
+<LI> new function: <CODE>lua_geti</CODE>
+<LI> new function: <CODE>lua_seti</CODE>
+<LI> new function: <CODE>lua_isyieldable</CODE>
+<LI> new function: <CODE>lua_numbertointeger</CODE>
+<LI> new function: <CODE>lua_rotate</CODE>
+<LI> new function: <CODE>lua_stringtonumber</CODE>
+</UL>
+
+<H3>Lua standalone interpreter</H3>
+<UL>
+<LI> can be used as calculator; no need to prefix with '='
+<LI> <CODE>arg</CODE> table available to all code
+</UL>
+
+<H2><A NAME="license">License</A></H2>
+<P>
+<A HREF="http://www.opensource.org/docs/definition.php">
+<IMG SRC="osi-certified-72x60.png" ALIGN="right" ALT="[osi certified]" STYLE="padding-left: 30px ;">
+</A>
+Lua is free software distributed under the terms of the
+<A HREF="http://www.opensource.org/licenses/mit-license.html">MIT license</A>
+reproduced below;
+it may be used for any purpose, including commercial purposes,
+at absolutely no cost without having to ask us.
+
+The only requirement is that if you do use Lua,
+then you should give us credit by including the appropriate copyright notice somewhere in your product or its documentation.
+
+For details, see
+<A HREF="http://www.lua.org/license.html">this</A>.
+
+<BLOCKQUOTE STYLE="padding-bottom: 0em">
+Copyright &copy; 1994&ndash;2017 Lua.org, PUC-Rio.
+
+<P>
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+<P>
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+<P>
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+</BLOCKQUOTE>
+<P>
+
+<P CLASS="footer">
+Last update:
+Thu Dec 22 18:22:57 BRST 2016
+</P>
+<!--
+Last change: revised for Lua 5.3.4
+-->
+
+</BODY>
+</HTML>
diff --git a/libs/libsodium/docs/README.markdown b/libs/libsodium/docs/README.markdown
deleted file mode 100644
index 815240abea..0000000000
--- a/libs/libsodium/docs/README.markdown
+++ /dev/null
@@ -1,46 +0,0 @@
-[![Build Status](https://travis-ci.org/jedisct1/libsodium.svg?branch=master)](https://travis-ci.org/jedisct1/libsodium?branch=master)
-[![Windows build status](https://ci.appveyor.com/api/projects/status/fu8s2elx25il98hj?svg=true)](https://ci.appveyor.com/project/jedisct1/libsodium)
-[![Coverity Scan Build Status](https://scan.coverity.com/projects/2397/badge.svg)](https://scan.coverity.com/projects/2397)
-
-![libsodium](https://raw.github.com/jedisct1/libsodium/master/logo.png)
-============
-
-Sodium is a new, easy-to-use software library for encryption,
-decryption, signatures, password hashing and more.
-
-It is a portable, cross-compilable, installable, packageable
-fork of [NaCl](http://nacl.cr.yp.to/), with a compatible API, and an
-extended API to improve usability even further.
-
-Its goal is to provide all of the core operations needed to build
-higher-level cryptographic tools.
-
-Sodium supports a variety of compilers and operating systems,
-including Windows (with MingW or Visual Studio, x86 and x64), iOS, Android,
-as well as Javascript and Webassembly.
-
-## Documentation
-
-The documentation is available on Gitbook:
-
-* [libsodium documentation](https://download.libsodium.org/doc/) -
-online, requires Javascript.
-* [offline documentation](https://www.gitbook.com/book/jedisct1/libsodium/details)
-in PDF, MOBI and ePUB formats.
-
-## Integrity Checking
-
-The integrity checking instructions (including the signing key for libsodium)
-are available in the [installation](https://download.libsodium.org/doc/installation/index.html#integrity-checking)
-section of the documentation.
-
-## Community
-
-A mailing-list is available to discuss libsodium.
-
-In order to join, just send a random mail to `sodium-subscribe` {at}
-`pureftpd` {dot} `org`.
-
-## License
-
-[ISC license](https://en.wikipedia.org/wiki/ISC_license).
diff --git a/libs/libsodium/docs/THANKS b/libs/libsodium/docs/THANKS
deleted file mode 100644
index 0d0da788f3..0000000000
--- a/libs/libsodium/docs/THANKS
+++ /dev/null
@@ -1,91 +0,0 @@
-Special thanks to people, companies and organizations having written
-libsodium bindings for their favorite programming languages:
-
-@alethia7
-@artemisc
-@carblue
-@dnaq
-@ektrah
-@graxrabble
-@harleqin
-@joshjdevl
-@jrmarino
-@jshahbazi
-@lvh
-@neheb
-
-Adam Caudill (@adamcaudill)
-Alexander Morris (@alexpmorris)
-Amit Murthy (@amitmurthy)
-Andrew Bennett (@potatosalad)
-Andrew Lambert (@charonn0)
-Bruce Mitchener (@waywardmonkeys)
-Bruno Oliveira (@abstractj)
-Caolan McMahon (@caolan)
-Chris Rebert (@cvrebert)
-Christian Hermann (@bitbeans)
-Christian Wiese (@morfoh)
-Christian Wiese (@morfoh)
-Colm MacCárthaigh (@colmmacc)
-David Parrish (@dmp1ce)
-Donald Stufft (@dstufft)
-Douglas Campos (@qmx)
-Drew Crawford (@drewcrawford)
-Emil Bay (@emilbayes)
-Eric Dong (@quantum1423)
-Eric Voskuil (@evoskuil)
-Farid Hajji (@fhajji)
-Frank Siebenlist (@franks42)
-Gabriel Handford (@gabriel)
-Geo Carncross (@geocar)
-Henrik Gassmann (BurningEnlightenment)
-Jachym Holecek (@freza)
-Jack Wink (@jackwink)
-James Ruan (@jamesruan)
-Jan de Muijnck-Hughes (@jfdm)
-Jason McCampbell (@jasonmccampbell)
-Jeroen Habraken (@VeXocide)
-Jeroen Ooms (@jeroen)
-Jesper Louis Andersen (@jlouis)
-Joe Eli McIlvain (@jemc)
-Jonathan Stowe (@jonathanstowe)
-Joseph Abrahamson (@tel)
-Julien Kauffmann (@ereOn)
-Kenneth Ballenegger (@kballenegger)
-Loic Maury (@loicmaury)
-Michael Gorlick (@mgorlick)
-Michael Gregorowicz (@mgregoro)
-Michał Zieliński (@zielmicha)
-Omar Ayub (@electricFeel)
-Pedro Paixao (@paixaop)
-Project ArteMisc (@artemisc)
-Rich FitzJohn (@richfitz)
-Ruben De Visscher (@rubendv)
-Rudolf Von Krugstein (@rudolfvonkrugstein)
-Samuel Neves (@sneves)
-Scott Arciszewski (@paragonie-scott)
-Stanislav Ovsiannikov (@naphaso)
-Stefan Marsiske (@stef)
-Stephan Touset (@stouset)
-Stephen Chavez (@redragonx)
-Steve Gibson (@sggrc)
-Tony Arcieri (@bascule)
-Tony Garnock-Jones (@tonyg)
-Y. T. Chung (@zonyitoo)
-
-Bytecurry Software
-Cryptotronix
-Facebook
-FSF France
-MaidSafe
-Paragonie Initiative Enterprises
-Python Cryptographic Authority
-
-(this list may not be complete, if you don't see your name, please
-submit a pull request!)
-
-Also thanks to:
-
-- Coverity, Inc. to provide static analysis.
-- FSF France for providing access to their compilation servers.
-- Private Internet Access for having sponsored a complete security audit.
diff --git a/libs/pthreads/docs/ANNOUNCE b/libs/pthreads/docs/ANNOUNCE
deleted file mode 100644
index 950c86ff03..0000000000
--- a/libs/pthreads/docs/ANNOUNCE
+++ /dev/null
@@ -1,483 +0,0 @@
-PTHREADS-WIN32 RELEASE 2.9.0 (2012-05-25)
------------------------------------------
-Web Site: http://sourceware.org/pthreads-win32/
-FTP Site: ftp://sourceware.org/pub/pthreads-win32
-Maintainer: Ross Johnson <ross.johnson@loungebythelake.net>
-
-
-We are pleased to announce the availability of a new release of
-Pthreads-win32, an Open Source Software implementation of the
-Threads component of the POSIX 1003.1 2001 Standard for Microsoft's
-Win32 environment. Some functions from other sections of POSIX
-1003.1 2001 are also supported including semaphores and scheduling
-functions.
-
-Some common non-portable functions are also implemented for
-additional compatibility, as are a few functions specific
-to pthreads-win32 for easier integration with Win32 applications.
-
-Pthreads-win32 is free software, distributed under the GNU Lesser
-General Public License (LGPL).
-
-
-Acknowledgements
-----------------
-This library is based originally on a Win32 pthreads
-implementation contributed by John Bossom.
-
-The implementation of Condition Variables uses algorithms developed
-by Alexander Terekhov and Louis Thomas.
-
-The implementation of POSIX mutexes has been improved by Thomas Pfaff
-and later by Alexander Terekhov.
-
-The implementation of Spinlocks and Barriers was contributed
-by Ross Johnson.
-
-The implementation of read/write locks was contributed by
-Aurelio Medina and improved by Alexander Terekhov.
-
-Many others have contributed significant time and effort to solve crutial
-problems in order to make the library workable, robust and reliable.
-
-Thanks to Xavier Leroy for granting permission to use and modify his
-LinuxThreads manual pages.
-
-Thanks to The Open Group for making the Single Unix Specification
-publicly available - many of the manual pages included in the package
-were extracted from it.
-
-There is also a separate CONTRIBUTORS file. This file and others are
-on the web site:
-
- http://sourceware.org/pthreads-win32
-
-As much as possible, the ChangeLog file acknowledges contributions to the
-code base in more detail.
-
-
-Changes since the last release
-------------------------------
-These are now documented in the NEWS file.
-See the ChangeLog file also.
-
-
-Known Bugs
-----------
-These are now documented in the BUGS file.
-
-
-Level of standards conformance
-------------------------------
-
-The following POSIX 1003.1 2001 options are defined and set to 200112L:
-
- _POSIX_THREADS
- _POSIX_THREAD_SAFE_FUNCTIONS
- _POSIX_THREAD_ATTR_STACKSIZE
- _POSIX_THREAD_PRIORITY_SCHEDULING
- _POSIX_SEMAPHORES
- _POSIX_READER_WRITER_LOCKS
- _POSIX_SPIN_LOCKS
- _POSIX_BARRIERS
-
-
-The following POSIX 1003.1 2001 options are defined and set to -1:
-
- _POSIX_THREAD_ATTR_STACKADDR
- _POSIX_THREAD_PRIO_INHERIT
- _POSIX_THREAD_PRIO_PROTECT
- _POSIX_THREAD_PROCESS_SHARED
-
-
-The following POSIX 1003.1 2001 limits are defined and set:
-
- _POSIX_THREAD_THREADS_MAX
- _POSIX_SEM_VALUE_MAX
- _POSIX_SEM_NSEMS_MAX
- _POSIX_THREAD_KEYS_MAX
- _POSIX_THREAD_DESTRUCTOR_ITERATIONS
- PTHREAD_STACK_MIN
- PTHREAD_THREADS_MAX
- SEM_VALUE_MAX
- SEM_NSEMS_MAX
- PTHREAD_KEYS_MAX
- PTHREAD_DESTRUCTOR_ITERATIONS
-
-
-The following functions are implemented:
-
- ---------------------------
- PThreads
- ---------------------------
- pthread_attr_init
- pthread_attr_destroy
- pthread_attr_getdetachstate
- pthread_attr_getstackaddr
- pthread_attr_getstacksize
- pthread_attr_setdetachstate
- pthread_attr_setstackaddr
- pthread_attr_setstacksize
-
- pthread_create
- pthread_detach
- pthread_equal
- pthread_exit
- pthread_join
- pthread_once
- pthread_self
-
- pthread_cancel
- pthread_cleanup_pop
- pthread_cleanup_push
- pthread_setcancelstate
- pthread_setcanceltype
- pthread_testcancel
-
- ---------------------------
- Thread Specific Data
- ---------------------------
- pthread_key_create
- pthread_key_delete
- pthread_setspecific
- pthread_getspecific
-
- ---------------------------
- Mutexes
- ---------------------------
- pthread_mutexattr_init
- pthread_mutexattr_destroy
- pthread_mutexattr_getpshared
- pthread_mutexattr_setpshared
- pthread_mutexattr_gettype
- pthread_mutexattr_settype (types: PTHREAD_MUTEX_DEFAULT
- PTHREAD_MUTEX_NORMAL
- PTHREAD_MUTEX_ERRORCHECK
- PTHREAD_MUTEX_RECURSIVE )
- pthread_mutexattr_getrobust
- pthread_mutexattr_setrobust (values: PTHREAD_MUTEX_STALLED
- PTHREAD_MUTEX_ROBUST)
- pthread_mutex_init
- pthread_mutex_destroy
- pthread_mutex_lock
- pthread_mutex_trylock
- pthread_mutex_timedlock
- pthread_mutex_unlock
- pthread_mutex_consistent
-
- ---------------------------
- Condition Variables
- ---------------------------
- pthread_condattr_init
- pthread_condattr_destroy
- pthread_condattr_getpshared
- pthread_condattr_setpshared
-
- pthread_cond_init
- pthread_cond_destroy
- pthread_cond_wait
- pthread_cond_timedwait
- pthread_cond_signal
- pthread_cond_broadcast
-
- ---------------------------
- Read/Write Locks
- ---------------------------
- pthread_rwlock_init
- pthread_rwlock_destroy
- pthread_rwlock_tryrdlock
- pthread_rwlock_trywrlock
- pthread_rwlock_rdlock
- pthread_rwlock_timedrdlock
- pthread_rwlock_rwlock
- pthread_rwlock_timedwrlock
- pthread_rwlock_unlock
- pthread_rwlockattr_init
- pthread_rwlockattr_destroy
- pthread_rwlockattr_getpshared
- pthread_rwlockattr_setpshared
-
- ---------------------------
- Spin Locks
- ---------------------------
- pthread_spin_init
- pthread_spin_destroy
- pthread_spin_lock
- pthread_spin_unlock
- pthread_spin_trylock
-
- ---------------------------
- Barriers
- ---------------------------
- pthread_barrier_init
- pthread_barrier_destroy
- pthread_barrier_wait
- pthread_barrierattr_init
- pthread_barrierattr_destroy
- pthread_barrierattr_getpshared
- pthread_barrierattr_setpshared
-
- ---------------------------
- Semaphores
- ---------------------------
- sem_init
- sem_destroy
- sem_post
- sem_wait
- sem_trywait
- sem_timedwait
- sem_getvalue (# free if +ve, # of waiters if -ve)
- sem_open (returns an error ENOSYS)
- sem_close (returns an error ENOSYS)
- sem_unlink (returns an error ENOSYS)
-
- ---------------------------
- RealTime Scheduling
- ---------------------------
- pthread_attr_getschedparam
- pthread_attr_setschedparam
- pthread_attr_getinheritsched
- pthread_attr_setinheritsched
- pthread_attr_getschedpolicy (only supports SCHED_OTHER)
- pthread_attr_setschedpolicy (only supports SCHED_OTHER)
- pthread_getschedparam
- pthread_setschedparam
- pthread_getconcurrency
- pthread_setconcurrency
- pthread_attr_getscope
- pthread_attr_setscope (only supports PTHREAD_SCOPE_SYSTEM)
- sched_get_priority_max
- sched_get_priority_min
- sched_rr_get_interval (returns an error ENOTSUP)
- sched_setscheduler (only supports SCHED_OTHER)
- sched_getscheduler (only supports SCHED_OTHER)
- sched_yield
-
- ---------------------------
- Signals
- ---------------------------
- pthread_sigmask
- pthread_kill (only supports zero sig value,
- for thread validity checking)
-
- ---------------------------
- Non-portable routines (see the README.NONPORTABLE file for usage)
- ---------------------------
- pthread_getw32threadhandle_np
- pthread_timechange_handler_np
- pthread_delay_np
- pthread_getunique_np
- pthread_mutexattr_getkind_np
- pthread_mutexattr_setkind_np (types: PTHREAD_MUTEX_FAST_NP,
- PTHREAD_MUTEX_ERRORCHECK_NP,
- PTHREAD_MUTEX_RECURSIVE_NP,
- PTHREAD_MUTEX_ADAPTIVE_NP,
- PTHREAD_MUTEX_TIMED_NP)
- pthread_num_processors_np
- (The following four routines may be required when linking statically.
- The process_* routines should not be needed for MSVC or GCC.)
- pthread_win32_process_attach_np
- pthread_win32_process_detach_np
- (The following routines should only be needed to manage implicit
- POSIX handles i.e. when Win native threads call POSIX thread routines
- (other than pthread_create))
- pthread_win32_thread_attach_np
- pthread_win32_thread_detach_np
-
- ---------------------------
- Static Initializers
- ---------------------------
- PTHREAD_ONCE_INIT
- PTHREAD_MUTEX_INITIALIZER
- PTHREAD_RECURSIVE_MUTEX_INITIALIZER
- PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
- PTHREAD_ERRORCHECK_MUTEX_INITIALIZER
- PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
- PTHREAD_COND_INITIALIZER
- PTHREAD_RWLOCK_INITIALIZER
- PTHREAD_SPINLOCK_INITIALIZER
-
-
-The library includes two non-API functions for creating cancellation
-points in applications and libraries:
-
- pthreadCancelableWait
- pthreadCancelableTimedWait
-
-
-The following functions are not implemented:
-
- ---------------------------
- RealTime Scheduling
- ---------------------------
- pthread_mutex_getprioceiling
- pthread_mutex_setprioceiling
- pthread_mutex_attr_getprioceiling
- pthread_mutex_attr_getprotocol
- pthread_mutex_attr_setprioceiling
- pthread_mutex_attr_setprotocol
-
- ---------------------------
- Fork Handlers
- ---------------------------
- pthread_atfork
-
- ---------------------------
- Stdio
- ---------------------------
- flockfile
- ftrylockfile
- funlockfile
- getc_unlocked
- getchar_unlocked
- putc_unlocked
- putchar_unlocked
-
- ---------------------------
- Thread-Safe C Runtime Library
- ---------------------------
- readdir_r
- getgrgid_r
- getgrnam_r
- getpwuid_r
- getpwnam_r
-
- ---------------------------
- Signals
- ---------------------------
- sigtimedwait
- sigwait
- sigwaitinfo
-
- ---------------------------
- General
- ---------------------------
- sysconf
-
- ---------------------------
- Thread-Safe C Runtime Library (macros)
- ---------------------------
- strtok_r
- asctime_r
- ctime_r
- gmtime_r
- localtime_r
- rand_r
-
-
-Availability
-------------
-
-The prebuilt DLL, export libs (for both MSVC and Mingw32), and the header
-files (pthread.h, semaphore.h, sched.h) are available along with the
-complete source code.
-
-The source code can be found at:
-
- ftp://sources.redhat.com/pub/pthreads-win32
-
-and as individual source code files at
-
- ftp://sources.redhat.com/pub/pthreads-win32/source
-
-The pre-built DLL, export libraries and include files can be found at:
-
- ftp://sources.redhat.com/pub/pthreads-win32/dll-latest
-
-
-
-Mailing List
-------------
-
-There is a mailing list for discussing pthreads on Win32. To join,
-send email to:
-
- pthreads-win32-subscribe@sourceware.cygnus.com
-
-
-Application Development Environments
-------------------------------------
-
-See the README file for more information.
-
-MSVC:
-MSVC using SEH works. Distribute pthreadVSE.dll with your application.
-MSVC using C++ EH works. Distribute pthreadVCE.dll with your application.
-MSVC using C setjmp/longjmp works. Distribute pthreadVC.dll with your application.
-
-
-Mingw32:
-See the FAQ, Questions 6 and 10.
-
-Mingw using C++ EH works. Distribute pthreadGCE.dll with your application.
-Mingw using C setjmp/longjmp works. Distribute pthreadGC.dll with your application.
-
-
-Cygwin: (http://sourceware.cygnus.com/cygwin/)
-Developers using Cygwin do not need pthreads-win32 since it has POSIX threads
-support. Refer to its documentation for details and extent.
-
-
-UWIN:
-UWIN is a complete Unix-like environment for Windows from AT&T. Pthreads-win32
-doesn't currently support UWIN (and vice versa), but that may change in the
-future.
-
-Generally:
-For convenience, the following pre-built files are available on the FTP site
-(see Availability above):
-
- pthread.h - for POSIX threads
- semaphore.h - for POSIX semaphores
- sched.h - for POSIX scheduling
- pthreadVCE.dll - built with MSVC++ compiler using C++ EH
- pthreadVCE.lib
- pthreadVC.dll - built with MSVC compiler using C setjmp/longjmp
- pthreadVC.lib
- pthreadVSE.dll - built with MSVC compiler using SEH
- pthreadVSE.lib
- pthreadGCE.dll - built with Mingw32 G++ 2.95.2-1
- pthreadGC.dll - built with Mingw32 GCC 2.95.2-1 using setjmp/longjmp
- libpthreadGCE.a - derived from pthreadGCE.dll
- libpthreadGC.a - derived from pthreadGC.dll
- gcc.dll - needed if distributing applications that use
- pthreadGCE.dll (but see the FAQ Q 10 for the latest
- related information)
-
-These are the only files you need in order to build POSIX threads
-applications for Win32 using either MSVC or Mingw32.
-
-See the FAQ file in the source tree for additional information.
-
-
-Documentation
--------------
-
-For the authoritative reference, see the online POSIX
-standard reference at:
-
- http://www.OpenGroup.org
-
-For POSIX Thread API programming, several reference books are
-available:
-
- Programming with POSIX Threads
- David R. Butenhof
- Addison-Wesley (pub)
-
- Pthreads Programming
- By Bradford Nichols, Dick Buttlar & Jacqueline Proulx Farrell
- O'Reilly (pub)
-
-On the web: see the links at the bottom of the pthreads-win32 site:
-
- http://sources.redhat.com/pthreads-win32/
-
- Currently, there is no documentation included in the package apart
- from the copious comments in the source code.
-
-
-
-Enjoy!
-
-Ross Johnson
diff --git a/libs/pthreads/docs/BUGS b/libs/pthreads/docs/BUGS
deleted file mode 100644
index 285ba4eb98..0000000000
--- a/libs/pthreads/docs/BUGS
+++ /dev/null
@@ -1,141 +0,0 @@
-----------
-Known bugs
-----------
-
-1. Not strictly a bug, more of a gotcha.
-
- Under MS VC++ (only tested with version 6.0), a term_func
- set via the standard C++ set_terminate() function causes the
- application to abort.
-
- Notes from the MSVC++ manual:
- 1) A term_func() should call exit(), otherwise
- abort() will be called on return to the caller.
- A call to abort() raises SIGABRT and the default signal handler
- for all signals terminates the calling program with
- exit code 3.
- 2) A term_func() must not throw an exception. Therefore
- term_func() should not call pthread_exit(), which
- works by throwing an exception (pthreadVCE or pthreadVSE)
- or by calling longjmp (pthreadVC).
-
- Workaround: avoid using pthread_exit() in C++ applications. Exit
- threads by dropping through the end of the thread routine.
-
-2. Cancellation problems in C++ builds
- - Milan Gardian
-
- [Note: It's not clear if this problem isn't simply due to the context
- switch in pthread_cancel() which occurs unless the QueueUserAPCEx
- library and driver are installed and used. Just like setjmp/longjmp,
- this is probably not going to work well in C++. In any case, unless for
- some very unusual reason you really must use the C++ build then please
- use the C build pthreadVC2.dll or pthreadGC2.dll, i.e. for C++
- applications.]
-
- This is suspected to be a compiler bug in VC6.0, and also seen in
- VC7.0 and VS .NET 2003. The GNU C++ compiler does not have a problem
- with this, and it has been reported that the Intel C++ 8.1 compiler
- and Visual C++ 2005 Express Edition Beta2 pass tests\semaphore4.c
- (which exposes the bug).
-
- Workaround [rpj - 2 Feb 2002]
- -----------------------------
- [Please note: this workaround did not solve a similar problem in
- snapshot-2004-11-03 or later, even though similar symptoms were seen.
- tests\semaphore4.c fails in that snapshot for the VCE version of the
- DLL.]
-
- The problem disappears when /Ob0 is used, i.e. /O2 /Ob0 works OK,
- but if you want to use inlining optimisation you can be much more
- specific about where it's switched off and on by using a pragma.
-
- So the inlining optimisation is interfering with the way that cleanup
- handlers are run. It appears to relate to auto-inlining of class methods
- since this is the only auto inlining that is performed at /O1 optimisation
- (functions with the "inline" qualifier are also inlined, but the problem
- doesn't appear to involve any such functions in the library or testsuite).
-
- In order to confirm the inlining culprit, the following use of pragmas
- eliminate the problem but I don't know how to make it transparent, putting
- it in, say, pthread.h where pthread_cleanup_push defined as a macro.
-
- #pragma inline_depth(0)
- pthread_cleanup_push(handlerFunc, (void *) &arg);
-
- /* ... */
-
- pthread_cleanup_pop(0);
- #pragma inline_depth()
-
- Note the empty () pragma value after the pop macro. This resets depth to the
- default. Or you can specify a non-zero depth here.
-
- The pragma is also needed (and now used) within the library itself wherever
- cleanup handlers are used (condvar.c and rwlock.c).
-
- Use of these pragmas allows compiler optimisations /O1 and /O2 to be
- used for either or both the library and applications.
-
- Experimenting further, I found that wrapping the actual cleanup handler
- function with #pragma auto_inline(off|on) does NOT work.
-
- MSVC6.0 doesn't appear to support the C99 standard's _Pragma directive,
- however, later versions may. This form is embeddable inside #define
- macros, which would be ideal because it would mean that it could be added
- to the push/pop macro definitions in pthread.h and hidden from the
- application programmer.
-
- [/rpj]
-
- Original problem description
- ----------------------------
-
- The cancellation (actually, cleanup-after-cancel) tests fail when using VC
- (professional) optimisation switches (/O1 or /O2) in pthreads library. I
- have not investigated which concrete optimisation technique causes this
- problem (/Og, /Oi, /Ot, /Oy, /Ob1, /Gs, /Gf, /Gy, etc.), but here is a
- summary of builds and corresponding failures:
-
- * pthreads VSE (optimised tests): OK
- * pthreads VCE (optimised tests): Failed "cleanup1" test (runtime)
-
- * pthreads VSE (DLL in CRT, optimised tests): OK
- * pthreads VCE (DLL in CRT, optimised tests): Failed "cleanup1" test
- (runtime)
-
- Please note that while in VSE version of the pthreads library the
- optimisation does not really have any impact on the tests (they pass OK), in
- VCE version addition of optimisation (/O2 in this case) causes the tests to
- fail uniformly - either in "cleanup0" or "cleanup1" test cases.
-
- Please note that all the tests above use default pthreads DLL (no
- optimisations, linked with either static or DLL CRT, based on test type).
- Therefore the problem lies not within the pthreads DLL but within the
- compiled client code (the application using pthreads -> involvement of
- "pthread.h").
-
- I think the message of this section is that usage of VCE version of pthreads
- in applications relying on cancellation/cleanup AND using optimisations for
- creation of production code is highly unreliable for the current version of
- the pthreads library.
-
-3. The Borland Builder 5.5 version of the library produces memory read exceptions
-in some tests.
-
-4. pthread_barrier_wait() can deadlock if the number of potential calling
-threads for a particular barrier is greater than the barrier count parameter
-given to pthread_barrier_init() for that barrier.
-
-This is due to the very lightweight implementation of pthread-win32 barriers.
-To cope with more than "count" possible waiters, barriers must effectively
-implement all the same safeguards as condition variables, making them much
-"heavier" than at present.
-
-The workaround is to ensure that no more than "count" threads attempt to wait
-at the barrier.
-
-5. Canceling a thread blocked on pthread_once appears not to work in the MSVC++
-version of the library "pthreadVCE.dll". The test case "once3.c" hangs. I have no
-clues on this at present. All other versions pass this test ok - pthreadsVC.dll,
-pthreadsVSE.dll, pthreadsGC.dll and pthreadsGCE.dll.
diff --git a/libs/pthreads/docs/Bmakefile b/libs/pthreads/docs/Bmakefile
deleted file mode 100644
index ea25dec4fd..0000000000
--- a/libs/pthreads/docs/Bmakefile
+++ /dev/null
@@ -1,268 +0,0 @@
-# This makefile is compatible with BCB make. Use "make -fBMakefile" to compile.
-#
-# The variables $DLLDEST and $LIBDEST hold the destination directories for the
-# dll and the lib, respectively. Probably all that needs to change is $DEVROOT.
-#
-# Currently only the recommended pthreadBC.dll is built by this makefile.
-#
-
-
-DLL_VER = 2
-
-DEVROOT = .
-
-DLLDEST = $(DEVROOT)\DLL
-LIBDEST = $(DEVROOT)\DLL
-
-DLLS = pthreadBC$(DLL_VER).dll
-
-OPTIM = /O2
-
-RC = brcc32
-RCFLAGS = -i.
-
-CFLAGS = /q /I. /D_WIN32_WINNT=0x400 /DHAVE_PTW32_CONFIG_H=1 /4 /tWD /tWM \
- /w-aus /w-asc /w-par
-
-#C cleanup code
-BCFLAGS = $(PTW32_FLAGS) $(CFLAGS)
-
-# Agregate modules for inlinability
-DLL_OBJS = \
- attr.obj \
- barrier.obj \
- cancel.obj \
- cleanup.obj \
- condvar.obj \
- create.obj \
- dll.obj \
- errno.obj \
- exit.obj \
- fork.obj \
- global.obj \
- misc.obj \
- mutex.obj \
- nonportable.obj \
- private.obj \
- rwlock.obj \
- sched.obj \
- semaphore.obj \
- signal.obj \
- spin.obj \
- sync.obj \
- tsd.obj
-
-INCL = config.h implement.h semaphore.h pthread.h need_errno.h
-
-ATTR_SRCS = \
- pthread_attr_init.c \
- pthread_attr_destroy.c \
- pthread_attr_getdetachstate.c \
- pthread_attr_setdetachstate.c \
- pthread_attr_getstackaddr.c \
- pthread_attr_setstackaddr.c \
- pthread_attr_getstacksize.c \
- pthread_attr_setstacksize.c \
- pthread_attr_getscope.c \
- pthread_attr_setscope.c
-
-BARRIER_SRCS = \
- pthread_barrier_init.c \
- pthread_barrier_destroy.c \
- pthread_barrier_wait.c \
- pthread_barrierattr_init.c \
- pthread_barrierattr_destroy.c \
- pthread_barrierattr_setpshared.c \
- pthread_barrierattr_getpshared.c
-
-CANCEL_SRCS = \
- pthread_setcancelstate.c \
- pthread_setcanceltype.c \
- pthread_testcancel.c \
- pthread_cancel.c
-
-CONDVAR_SRCS = \
- ptw32_cond_check_need_init.c \
- pthread_condattr_destroy.c \
- pthread_condattr_getpshared.c \
- pthread_condattr_init.c \
- pthread_condattr_setpshared.c \
- pthread_cond_destroy.c \
- pthread_cond_init.c \
- pthread_cond_signal.c \
- pthread_cond_wait.c
-
-EXIT_SRCS = \
- pthread_exit.c
-
-MISC_SRCS = \
- pthread_equal.c \
- pthread_getconcurrency.c \
- pthread_once.c \
- pthread_self.c \
- pthread_setconcurrency.c \
- ptw32_calloc.c \
- ptw32_MCS_lock.c \
- ptw32_new.c \
- w32_CancelableWait.c
-
-MUTEX_SRCS = \
- ptw32_mutex_check_need_init.c \
- pthread_mutex_init.c \
- pthread_mutex_destroy.c \
- pthread_mutexattr_init.c \
- pthread_mutexattr_destroy.c \
- pthread_mutexattr_getpshared.c \
- pthread_mutexattr_setpshared.c \
- pthread_mutexattr_settype.c \
- pthread_mutexattr_gettype.c \
- pthread_mutexattr_setrobust.c \
- pthread_mutexattr_getrobust.c \
- pthread_mutex_lock.c \
- pthread_mutex_timedlock.c \
- pthread_mutex_unlock.c \
- pthread_mutex_trylock.c \
- pthread_mutex_consistent.c
-
-NONPORTABLE_SRCS = \
- pthread_mutexattr_setkind_np.c \
- pthread_mutexattr_getkind_np.c \
- pthread_getw32threadhandle_np.c \
- pthread_delay_np.c \
- pthread_num_processors_np.c \
- pthread_win32_attach_detach_np.c \
- pthread_timechange_handler_np.c
-
-PRIVATE_SRCS = \
- ptw32_is_attr.c \
- ptw32_processInitialize.c \
- ptw32_processTerminate.c \
- ptw32_threadStart.c \
- ptw32_threadDestroy.c \
- ptw32_tkAssocCreate.c \
- ptw32_tkAssocDestroy.c \
- ptw32_callUserDestroyRoutines.c \
- ptw32_timespec.c \
- ptw32_relmillisecs.c \
- ptw32_throw.c \
- ptw32_getprocessors.c
-
-RWLOCK_SRCS = \
- ptw32_rwlock_check_need_init.c \
- ptw32_rwlock_cancelwrwait.c \
- pthread_rwlock_init.c \
- pthread_rwlock_destroy.c \
- pthread_rwlockattr_init.c \
- pthread_rwlockattr_destroy.c \
- pthread_rwlockattr_getpshared.c \
- pthread_rwlockattr_setpshared.c \
- pthread_rwlock_rdlock.c \
- pthread_rwlock_timedrdlock.c \
- pthread_rwlock_wrlock.c \
- pthread_rwlock_timedwrlock.c \
- pthread_rwlock_unlock.c \
- pthread_rwlock_tryrdlock.c \
- pthread_rwlock_trywrlock.c
-
-SCHED_SRCS = \
- pthread_attr_setschedpolicy.c \
- pthread_attr_getschedpolicy.c \
- pthread_attr_setschedparam.c \
- pthread_attr_getschedparam.c \
- pthread_attr_setinheritsched.c \
- pthread_attr_getinheritsched.c \
- pthread_setschedparam.c \
- pthread_getschedparam.c \
- sched_get_priority_max.c \
- sched_get_priority_min.c \
- sched_setscheduler.c \
- sched_getscheduler.c \
- sched_yield.c
-
-SEMAPHORE_SRCS = \
- sem_init.c \
- sem_destroy.c \
- sem_trywait.c \
- sem_timedwait.c \
- sem_wait.c \
- sem_post.c \
- sem_post_multiple.c \
- sem_getvalue.c \
- sem_open.c \
- sem_close.c \
- sem_unlink.c
-
-SPIN_SRCS = \
- ptw32_spinlock_check_need_init.c \
- pthread_spin_init.c \
- pthread_spin_destroy.c \
- pthread_spin_lock.c \
- pthread_spin_unlock.c \
- pthread_spin_trylock.c
-
-SYNC_SRCS = \
- pthread_detach.c \
- pthread_join.c
-
-TSD_SRCS = \
- pthread_key_create.c \
- pthread_key_delete.c \
- pthread_setspecific.c \
- pthread_getspecific.c
-
-
-all: clean $(DLLS)
-
-realclean: clean
- if exist pthread*.dll del pthread*.dll
- if exist pthread*.lib del pthread*.lib
- if exist *.stamp del *.stamp
-
-clean:
- if exist *.obj del *.obj
- if exist *.ilk del *.ilk
- if exist *.ilc del *.ilc
- if exist *.ild del *.ild
- if exist *.ilf del *.ilf
- if exist *.ils del *.ils
- if exist *.tds del *.tds
- if exist *.pdb del *.pdb
- if exist *.exp del *.exp
- if exist *.map del *.map
- if exist *.o del *.o
- if exist *.i del *.i
- if exist *.res del *.res
-
-
-install: $(DLLS)
- copy pthread*.dll $(DLLDEST)
- copy pthread*.lib $(LIBDEST)
-
-$(DLLS): $(DLL_OBJS) version.res
- ilink32 /Tpd /Gi c0d32x.obj $(DLL_OBJS), \
- $@, ,\
- cw32mti.lib import32.lib, ,\
- version.res
-
-.c.obj:
- $(CC) $(OPTIM) $(BCFLAGS) -c $<
-
-.rc.res:
- $(RC) $(RCFLAGS) $<
-
-attr.obj: attr.c $(ATTR_SRCS) $(INCL)
-barrier.obj: barrier.c $(BARRIER_SRCS) $(INCL)
-cancel.obj: cancel.c $(CANCEL_SRCS) $(INCL)
-condvar.obj: condvar.c $(CONDVAR_SRCS) $(INCL)
-exit.obj: exit.c $(EXIT_SRCS) $(INCL)
-misc.obj: misc.c $(MISC_SRCS) $(INCL)
-mutex.obj: mutex.c $(MUTEX_SRCS) $(INCL)
-nonportable.obj: nonportable.c $(NONPORTABLE_SRCS) $(INCL)
-private.obj: private.c $(PRIVATE_SRCS) $(INCL)
-rwlock.obj: rwlock.c $(RWLOCK_SRCS) $(INCL)
-sched.obj: sched.c $(SCHED_SRCS) $(INCL)
-semaphore.obj: semaphore.c $(SEMAPHORE_SRCS) $(INCL)
-spin.obj: spin.c $(SPIN_SRCS) $(INCL)
-sync.obj: sync.c $(SYNC_SRCS) $(INCL)
-tsd.obj: tsd.c $(TSD_SRCS) $(INCL)
-version.res: version.rc $(INCL)
diff --git a/libs/pthreads/docs/ChangeLog b/libs/pthreads/docs/ChangeLog
deleted file mode 100644
index 42abcc457a..0000000000
--- a/libs/pthreads/docs/ChangeLog
+++ /dev/null
@@ -1,5211 +0,0 @@
-2012-03-18 Ross Johnson <ross dot johnson at homemail dot com dot au>
-
- * create.c (pthread_create): add __cdecl attribute to thread routine
- arg
- * implement.h (pthread_key_t): add __cdecl attribute to destructor
- element
- (ThreadParms): likewise for start element
- * pthread.h (pthread_create): add __cdecl to prototype start arg
- (pthread_once): likewise for init_routine arg
- (pthread_key_create): likewise for destructor arg
- (ptw32_cleanup_push): replace type of routine arg with previously
- defined ptw32_cleanup_callback_t
- * pthread_key_create.c: add __cdecl attribute to destructor arg
- * pthread_once.c: add __cdecl attribute to init_routine arg
- * ptw32_threadStart.c (start): add __cdecl to start variable type
-
-
-2011-07-06 Ross Johnson <ross dot johnson at homemail dot com dot au>
-
- * pthread_cond_wait.c (pragma inline_depth): this is almost redundant
- now nevertheless fixed thei controlling MSC_VER from "< 800" to
- "< 1400" (i.e. any prior to VC++ 8.0).
- * pthread_once.ci (pragma inline_depth): Likewise.
- * pthread_rwlock_timedwrlock.ci (pragma inline_depth): Likewise.
- * pthread_rwlock_wrlock.ci (pragma inline_depth): Likewise.
- * sem_timedwait.ci (pragma inline_depth): Likewise.
- * sem_wait.ci (pragma inline_depth): Likewise.
-
-2011-07-05 Ross Johnson <ross dot johnson at homemail dot com dot au>
-
- * pthread_win32_attach_detach_np.c: Use strncat_s if available
- to removei a compile warning; MingW supports this routine but we
- continue to use strncat anyway there because it is secure if
- given the correct parameters; fix strncat param 3 to avoid
- buffer overrun exploitation potential.
-
-2011-07-03 Ross Johnson <ross dot johnson at homemail dot com dot au>
-
- * pthread_spin_unlock.c (EPERM): Return success if unlocking a lock
- that is not locked, because single CPU machines wrap a
- PTHREAD_MUTEX_NORMAL mutex, which returns success in this case.
- * pthread_win32_attach_detach_np.c (QUSEREX.DLL): Load from an
- absolute path only which must be the Windows System folder.
-
-2011-07-03 Daniel Richard G. <skunk at iskunk dot org>
-
- * Makefile (_WIN32_WINNT): Removed; duplicate definition in
- implement.h; more cleanup and enhancements.
-
-2011-07-02 Daniel Richard G. <skunk at iskunk dot org>
-
- * Makefile: Cleanups and implovements.
- * ptw32_MCS_locks.c: Casting fixes.
- * implement.h: Interlocked call and argument casting macro fixes
- to support older and newer build environments.
-
-2011-07-01 Ross Johnson <ross dot johnson at homemail dot com dot au>
-
- * *.[ch] (PTW32_INTERLOCKED_*): Redo 23 and 64 bit versions of these
- macros and re-apply in code to undo the incorrect changes from
- 2011-06-29; remove some size_t casts which should not be required
- and may be problematic.a
- There are now two sets of macros:
- PTW32_INTERLOCKED_*_LONG which work only on 32 bit integer variables;
- PTW32_INTERLOCKED_*_SIZE which work on size_t integer variables, i.e.
- LONG for 32 bit systems and LONGLONG for 64 bit systems.
- * implement.h (MCS locks): nextFlag and waitFlag are now HANDLE type.
- * ptw32_MCS_locks.c: Likewise.
- * pthread.h (#include <setjmp.h>): Removed.
- * ptw32_throw.c (#include <setjmp.h>): Added.
- * ptw32_threadStart.c (#include <setjmp.h>): Added.
- * implement.h (#include <setjmp.h>): Added.
-
-2011-06-30 Ross Johnson <ross dot johnson at homemail dot com dot au>
-
- * pthread_once.c: Tighten 'if' statement casting; fix interlocked
- pointer cast for 64 bit compatibility (missed yesterday); remove
- the superfluous static cleanup routine and call the release routine
- directly if popped.
- * create.c (stackSize): Now type size_t.
- * pthread.h (struct ptw32_thread_t_): Rearrange to fix element alignments.
-
-2011-06-29 Daniel Richard G. <skunk at iskunk dot org>
-
- * ptw32_relmillisecs.c (ftime):
- _ftime64_s() is only available in MSVC 2005 or later;
- _ftime64() is available in MinGW or MSVC 2002 or later;
- _ftime() is always available.
- * pthread.h (long long): Not defined in older MSVC 6.
- * implement.h (long long): Likewise.
- * pthread_getunique_np.c (long long): Likewise.
-
-2011-06-29 Ross Johnson <ross dot johnson at homemail dot com dot au>
-
- * *.[ch] (PTW32_INTERLOCKED_*): These macros should now work for
- both 32 and 64 bit builds. The MingW versions are all inlined asm
- while the MSVC versions expand to their Interlocked* or Interlocked*64
- counterparts appropriately. The argument type have also been changed
- to cast to the appropriate value or pointer size for the architecture.
-
-2011-05-29 Ross Johnson <ross dot johnson at homemail dot com dot au>
-
- * *.[ch] (#ifdef): Extended cleanup to whole project.
-
-2011-05-29 Daniel Richard G. <skunk at iskunk dot org>
-
- * Makefile (CC): Define CC to allow use of other compatible
- compilers such as the Intel compilter icl.
- * implement.h (#if): Fix forms like #if HAVE_SOMETHING.
- * pthread.h: Likewise.
- * sched.h: Likewise; PTW32_LEVEL_* becomes PTW32_SCHED_LEVEL_*.
- * semaphore.h: Likewise.
-
-2011-05-11 Ross Johnson <ross.johnson at homemail.com.au>
-
- * ptw32_callUserDestroyRoutines.c (terminate): Altered includes
- to match ptw32_threadStart.c.
- * GNUmakefile (GCE-inlined-debug, DOPT): Fixed.
-
-2011-04-31 Ross Johnson <ross.johnson at homemail.com.au>
-
- * (robust mutexes): Added this API. The API is not
- mandatory for implementations that don't support PROCESS_SHARED
- mutexes, nevertheless it was considered useful both functionally
- and for source-level compatibility.
-
-2011-03-26 Ross Johnson <ross.johnson at homemail.com.au>
-
- * pthread_getunique_np.c: New non-POSIX interface for compatibility
- with some other implementations; returns a 64 bit sequence number
- that is unique to each thread in the process.
- * pthread.h (pthread_getunique_np): Added.
- * global.c: Add global sequence counter for above.
- * implement.h: Likewise.
-
-2011-03-25 Ross Johnson <ross.johnson at homemail.com.au>
-
- * (cancelLock): Convert to an MCS lock and rename to stateLock.
- * (threadLock): Likewise.
- * (keyLock): Likewise.
- * pthread_mutex*.c: First working robust mutexes.
-
-2011-03-11 Ross Johnson <ross.johnson at homemail.com.au>
-
- * implement.h (PTW32_INTERLOCKED_*CREMENT macros): increment/decrement
- using ++/-- instead of add/subtract 1.
- * ptw32_MCS_lock.c: Make casts consistent.
-
-2011-03-09 Ross Johnson <ross.johnson at homemail.com.au>
-
- * implement.h (ptw32_thread_t_): Add process unique sequence number.
- * global.c: Replace global Critical Section objects with MCS
- queue locks.
- * implement.h: Likewise.
- * pthread_cond_destroy.c: Likewise.
- * pthread_cond_init.c: Likewise.
- * pthread_detach.c: Likewise.
- * pthread_join.c: Likewise.
- * pthread_kill.c: Likewise.
- * pthread_mutex_destroy.c: Likewise.
- * pthread_rwlock_destroy.c: Likewise.
- * pthread_spin_destroy.c: Likewise.
- * pthread_timechange_handler_np.c: Likewise.
- * ptw32_cond_check_need_init.c: Likewise.
- * ptw32_mutex_check_need_init.c: Likewise.
- * ptw32_processInitialize.c: Likewise.
- * ptw32_processTerminate.c: Likewise.
- * ptw32_reuse.c: Likewise.
- * ptw32_rwlock_check_need_init.c: Likewise.
- * ptw32_spinlock_check_need_init.c: Likewise.
-
-2011-03-06 Ross Johnson <ross.johnson at homemail.com.au>
-
- * several (MINGW64): Cast and call fixups for 64 bit compatibility;
- clean build via x86_64-w64-mingw32 cross toolchain on Linux i686
- targeting x86_64 win64.
- * ptw32_threadStart.c (ptw32_threadStart): Routine no longer attempts
- to pass [unexpected C++] exceptions out of scope but ends the thread
- normally setting EINTR as the exit status.
- * ptw32_throw.c: Fix C++ exception throwing warnings; ignore
- informational warning.
- * implement.h: Likewise with the corresponding header definition.
-
-2011-03-04 Ross Johnson <ross.johnson at homemail.com.au>
-
- * implement.h (PTW32_INTERLOCKED_*): Mingw32 does not provide
- the __sync_* intrinsics so implemented them here as macro
- assembler routines. MSVS Interlocked* are emmitted as intrinsics
- wherever possible, so we want mingw to match it; Extended to
- include all interlocked routines used by the library; implemented
- x86_64 versions also.
- * ptw32_InterlockedCompareExchange.c: No code remaining here.
- * ptw32_MCS_lock.c: Converted interlocked calls to use new macros.
- * pthread_barrier_wait.c: Likewise.
- * pthread_once.c: Likewise.
- * ptw32_MCS_lock.c (ptw32_mcs_node_substitute): Name changed to
- ptw32_mcs_node_transfer.
-
-2011-02-28 Ross Johnson <ross.johnson at homemail.com.au>
-
- * ptw32_relmillisecs.c: If possible, use _ftime64_s or _ftime64
- before resorting to _ftime.
-
-2011-02-27 Ross Johnson <ross.johnson at homemail.com.au>
-
- * sched_setscheduler.c: Ensure the handle is closed after use.
- * sched_getscheduler.c: Likewise.
- * pthread.h: Remove POSIX compatibility macros; don't define
- timespec if already defined.
- * context.h: Changes for 64 bit.
- * pthread_cancel.c: Likewise.
- * pthread_exit.c: Likewise.
- * pthread_spin_destroy.c: Likewise.
- * pthread_timechange_handler_np.c: Likewise.
- * ptw32_MCS_lock.c: Likewise; some of these changes may
- not be compatible with pre Windows 2000 systems; reverse the order of
- the includes.
- * ptw32_threadStart.c: Likewise.
- * ptw32_throw.c: Likewise.
-
-2011-02-13 Ross Johnson <ross.johnson at homemail.com.au>
-
- * pthread_self: Add comment re returning 'nil' value to
- indicate failure only to win32 threads that call us.
- * pthread_attr_setstackaddr: Fix comments; note this
- function and it's compliment are now removed from SUSv4.
-
-2011-02-12 Ross Johnson <ross.johnson at homemail.com.au>
-
- README.NONPORTABLE: Record a description of an obvious
- method for nulling/comparing/hashing pthread_t using a
- union; plus and investigation of a change of type for
- pthread_t (to a union) to neutralise any padding bits and
- bytes if they occur in pthread_t (the current pthread_t struct
- does not contain padding AFAIK, but porting the library to a
- future architecture may introduce them). Padding affects
- byte-by-byte copies and compare operations.
-
-2010-11-16 Ross Johnson <ross.johnson at homemail.com.au>
-
- * ChangeLog: Add this entry ;-)
- Restore entries from 2007 through 2009 that went missing
- at the last update.
-
-2010-06-19 Ross Johnson <ross.johnson at homemail.com.au>
-
- * ptw32_MCS_lock.c (ptw32_mcs_node_substitute): Fix variable
- names to avoid using C++ keyword ("new").
- * implement.h (ptw32_mcs_node_substitute): Likewise.
- * pthread_barrier_wait.c: Fix signed/unsigned comparison warning.
-
-2010-06-18 Ramiro Polla <ramiro.polla at gmail.com >
-
- * autostatic.c: New file; call pthread_win32_process_*()
- libary init/cleanup routines automatically on application start
- when statically linked.
- * pthread.c (autostatic.c): Included.
- * pthread.h (declspec): Remove import/export defines if compiler
- is MINGW.
- * sched.h (declspec): Likewise.
- * semaphore.h (declspec): Likewise.
- * need_errno.h (declspec): Likewise.
- * Makefile (autostatic.obj): Add for small static builds.
- * GNUmakefile (autostatic.o): Likewise.
- * NEWS (Version 2.9.0): Add changes.
- * README.NONPORTABLE (pthread_win32_process_*): Update
- description.
-
-2010-06-15 Ramiro Polla <ramiro.polla at gmail.com >
-
- * Makefile: Remove linkage with the winsock library by default.
- * GNUmakefile: Likewise.
- * pthread_getspecific.c: Likewise by removing calls to WSA
- functions.
- * config.h (RETAIN_WSALASTERROR): Can be defined if necessary.
-
-2010-01-26 Ross Johnson <ross.johnson at homemail.com.au>
-
- * ptw32_MCS_lock.c (ptw32_mcs_node_substitute): New routine
- to allow relocating the lock owners thread-local node to somewhere
- else, e.g. to global space so that another thread can release the
- lock. Used in pthread_barrier_wait.
- (ptw32_mcs_lock_try_acquire): New routine.
- * pthread_barrier_init: Only one semaphore is used now.
- * pthread_barrier_wait: Added an MCS guard lock with the last thread
- to leave the barrier releasing the lock. This removes a deadlock bug
- observed when there are greater than barrier-count threads
- attempting to cross.
- * pthread_barrier_destroy: Added an MCS guard lock.
-
-2009-03-03 Stephan O'Farrill <stephan dot ofarrill at gmail dot com>
-
- * pthread_attr_getschedpolicy.c: Add "const" to function parameter
- in accordance with SUSv3 (POSIX).
- * pthread_attr_getinheritsched.c: Likewise.
- * pthread_mutexattr_gettype.c: Likewise.
-
-2008-06-06 Robert Kindred <RKindred at SwRI dot edu>
-
- * ptw32_throw.c (ptw32_throw): Remove possible reference to NULL
- pointer. (At the same time made the switch block conditionally
- included only if exitCode is needed - RPJ.)
- * pthread_testcancel.c (pthread_testcancel): Remove duplicate and
- misplaced pthread_mutex_unlock().
-
-2008-02-21 Sebastian Gottschalk <seppig_relay at gmx dot de>
-
- * pthread_attr_getdetachstate.c (pthread_attr_getdetachstate):
- Remove potential and superfluous null pointer assignment.
-
-2007-11-22 Ivan Pizhenko <ivanp4 at ua dot fm>
-
- * pthread.h (gmtime_r): gmtime returns 0 if tm represents a time
- prior to 1/1/1970. Notice this to prevent raising an exception.
- * pthread.h (localtime_r): Likewise for localtime.
-
-2007-07-14 Marcel Ruff <mr at marcelruff dot info>
-
- * errno.c (_errno): Fix test for pthread_self() success.
- * need_errno.h: Remove unintentional line wrap from #if line.
-
-2007-07-14 Mike Romanchuk <mromanchuk at empirix dot com>
-
- * pthread.h (timespec): Fix tv_sec type.
-
-2007-01-07 Sinan Kaya <sinan.kaya at siemens dot com>
-
- * need_errno.h: Fix declaration of _errno - the local version of
- _errno() is used, e.g. by WinCE.
-
-2007-01-06 Ross Johnson <ross.johnson at homemail dot com dot au>
-
- * ptw32_semwait.c: Add check for invalid sem_t after acquiring the
- sem_t state guard mutex and before affecting changes to sema state.
-
-2007-01-06 Marcel Ruff <mr at marcelruff dot info>
-
- * error.c: Fix reference to pthread handle exitStatus member for
- builds that use NEED_ERRNO (i.e. WINCE).
- * context.h: Add support for ARM processor (WinCE).
- * mutex.c (process.h): Exclude for WINCE.
- * create.c: Likewise.
- * exit.c: Likewise.
- * implement.h: Likewise.
- * pthread_detach.c (signal.h): Exclude for WINCE.
- * pthread_join.c: Likewise.
- * pthread_kill.c: Likewise.
- * pthread_rwlock_init.c (errno.h): Remove - included by pthread.h.
- * pthread_rwlock_destroy.c: Likewise.
- * pthread_rwlock_rdlock.c: Likewise.
- * pthread_rwlock_timedrdlock.c: Likewise.
- * pthread_rwlock_timedwrlock.c: Likewise.
- * pthread_rwlock_tryrdlock.c: Likewise.
- * pthread_rwlock_trywrlock.c: likewise.
- * pthread_rwlock_unlock.c: Likewise.
- * pthread_rwlock_wrlock.c: Likewise.
- * pthread_rwlockattr_destroy.c: Likewise.
- * pthread_rwlockattr_getpshared.c: Likewise.
- * pthread_rwlockattr_init.c: Likewise.
- * pthread_rwlockattr_setpshared.c: Likewise.
-
-2007-01-06 Romano Paolo Tenca <rotenca at telvia dot it>
-
- * pthread_cond_destroy.c: Replace sem_wait() with non-cancelable
- ptw32_semwait() since pthread_cond_destroy() is not a cancelation
- point.
- * implement.h (ptw32_spinlock_check_need_init): Add prototype.
- * ptw32_MCS_lock.c: Reverse order of includes.
-
-2007-01-06 Eric Berge <eric dot berge at quantum dot com>
-
- * pthread_cond_destroy.c: Add LeaveCriticalSection before returning
- after errors.
-
-2007-01-04 Ross Johnson <ross.johnson at homemail dot com dot au>
-
- * ptw32_InterlockedCompareExchange.c: Conditionally skip for
- Win64 as not required.
- * pthread_win32_attach_detach_np.c (pthread_win32_process_attach_np):
- Test for InterlockedCompareExchange is not required for Win64.
- * context.h: New file. Included by pthread_cancel.h and any tests
- that need it (e.g. context1.c).
- * pthread_cancel.c: Architecture-dependent context macros moved
- to context.h.
-
-2007-01-04 Kip Streithorst <KSTREITH at ball dot com>
-
- * implement.h (PTW32_INTERLOCKED_COMPARE_EXCHANGE): Add Win64
- support.
-
-2006-12-20 Ross Johnson <ross.johnson at homemail.com.au>
-
- * sem_destroy.c: Fix the race involving invalidation of the sema;
- fix incorrect return of EBUSY resulting from the mutex trylock
- on the private mutex guard.
- * sem_wait.c: Add check for invalid sem_t after acquiring the
- sem_t state guard mutex and before affecting changes to sema state.
- * sem_trywait.c: Likewise.
- * sem_timedwait.c: Likewise.
- * sem_getvalue.c: Likewise.
- * sem_post.c: Similar.
- * sem_post_multiple.c: Likewise.
- * sem_init.c: Set max Win32 semaphore count to SEM_VALUE_MAX (was
- _POSIX_SEM_VALUE_MAX, which is a lower value - the minimum).
-
- * pthread_win32_attach_detach_np.c (pthread_win32_process_attach_np):
- Load COREDLL.DLL under WINCE to check existence of
- InterlockedCompareExchange() routine. This used to be done to test
- for TryEnterCriticalSection() but was removed when this was no
- longer needed.
-
-2006-01-25 Prashant Thakre <prashant.thakre at gmail.com>
-
- * pthread_cancel.c: Added _M_IA64 register context support.
-
-2005-05-13 Ross Johnson <ross at callisto.canberra.edu.au>
-
- * pthread_kill.c (pthread_kill): Remove check for Win32 thread
- priority (to confirm HANDLE validity). Useless since thread HANDLEs
- a not recycle-unique.
-
-2005-05-30 Vladimir Kliatchko <vladimir at kliatchko.com>
-
- * pthread_once.c: Re-implement using an MCS queue-based lock. The form
- of pthread_once is as proposed by Alexander Terekhov (see entry of
- 2005-03-13). The MCS lock implementation does not require a unique
- 'name' to identify the lock between threads. Attempts to get the Event
- or Semaphore based versions of pthread_once to a satisfactory level
- of robustness have thus far failed. The last problem (avoiding races
- involving non recycle-unique Win32 HANDLEs) was giving everyone
- grey hair trying to solve it.
-
- * ptw32_MCS_lock.c: New MCS queue-based lock implementation. These
- locks are efficient: they have very low overhead in the uncontended case;
- are efficient in contention and minimise cache-coherence updates in
- managing the user level FIFO queue; do not require an ABI change in the
- library.
-
-2005-05-27 Alexander Gottwald <alexander.gottwald at s1999.tu-chemnitz.de>
-
- * pthread.h: Some things, like HANDLE, were only defined if
- PTW32_LEVEL was >= 3. They should always be defined.
-
-2005-05-25 Vladimir Kliatchko <vladimir at kliatchko.com>
-
- * pthread_once.c: Eliminate all priority operations and other
- complexity by replacing the event with a semaphore. The advantage
- of the change is the ability to release just one waiter if the
- init_routine thread is cancelled yet still release all waiters when
- done. Simplify once_control state checks to improve efficiency
- further.
-
-2005-05-24 Mikael Magnusson <mikaelmagnusson at glocalnet.net>
-
- * GNUmakefile: Patched to allow cross-compile with mingw32 on Linux.
- It uses macros instead of referencing dlltool, gcc and g++ directly;
- added a call to ranlib. For example the GC static library can be
- built with:
- make CC=i586-mingw32msvc-gcc RC=i586-mingw32msvc-windres \
- RANLIB=i586-mingw32msvc-ranlib clean GC-static
-
-2005-05-13 Ross Johnson <ross at callisto.canberra.edu.au>
-
- * pthread_win32_attach_detach_np.c (pthread_win32_thread_detach_np):
- Move on-exit-only stuff from ptw32_threadDestroy() to here.
- * ptw32_threadDestroy.c: It's purpose is now only to reclaim thread
- resources for detached threads, or via pthread_join() or
- pthread_detach() on joinable threads.
- * ptw32_threadStart.c: Calling user destruct routines has moved to
- pthread_win32_thread_detach_np(); call pthread_win32_thread_detach_np()
- directly if statically linking, otherwise do so via dllMain; store
- thread return value in thread struct for all cases, including
- cancellation and exception exits; thread abnormal exits go via
- pthread_win32_thread_detach_np.
- * pthread_join.c (pthread_join): Don't try to get return code from
- Win32 thread - always get it from he thread struct.
- * pthread_detach.c (pthread_detach): reduce extent of the thread
- existence check since we now don't care if the Win32 thread HANDLE has
- been closed; reclaim thread resources if the thread has exited already.
- * ptw32_throw.c (ptw32_throw): For Win32 threads that are not implicit,
- only Call thread cleanup if statically linking, otherwise leave it to
- dllMain.
- * sem_post.c (_POSIX_SEM_VALUE_MAX): Change to SEM_VALUE_MAX.
- * sem_post_multiple.c: Likewise.
- * sem_init.c: Likewise.
-
-2005-05-10 Ross Johnson <ross at callisto.canberra.edu.au>
-
- * pthread_join.c (pthread_join): Add missing check for thread ID
- reference count in thread existence test; reduce extent of the
- existence test since we don't care if the Win32 thread HANDLE has
- been closed.
-
-2005-05-09 Ross Johnson <ross at callisto.canberra.edu.au>
-
- * ptw32_callUserDestroyRoutines.c: Run destructor process (i.e.
- loop over all keys calling destructors) up to
- PTHREAD_DESTRUCTOR_ITERATIONS times if TSD value isn't NULL yet;
- modify assoc management.
- * pthread_key_delete.c: Modify assoc management.
- * ptw32_tkAssocDestroy.c: Fix error in assoc removal from chains.
- * pthread.h
- (_POSIX_THREAD_DESTRUCTOR_ITERATIONS): Define to value specified by
- POSIX.
- (_POSIX_THREAD_KEYS_MAX): Define to value specified by POSIX.
- (PTHREAD_KEYS_MAX): Redefine [upward] to minimum required by POSIX.
- (SEM_NSEMS_MAX): Define to implementation value.
- (SEM_VALUE_MAX): Define to implementation value.
- (_POSIX_SEM_NSEMS_MAX): Redefine to value specified by POSIX.
- (_POSIX_SEM_VALUE_MAX): Redefine to value specified by POSIX.
-
-2005-05-06 Ross Johnson <ross at callisto.canberra.edu.au>
-
- * signal.c (sigwait): Add a cancellation point to this otherwise
- no-op.
- * sem_init.c (sem_init): Check for and return ERANGE error.
- * sem_post.c (sem_post): Likewise.
- * sem_post_multiple.c (sem_post_multiple): Likewise.
- * manual (directory): Added; see ChangeLog inside.
-
-2005-05-02 Ross Johnson <ross at callisto.canberra.edu.au>
-
- * implement.h (struct pthread_key_t_): Change threadsLock to keyLock
- so as not to be confused with the per thread lock 'threadlock';
- change all references to it.
- * implement.h (struct ThreadKeyAssoc): Remove lock; add prevKey
- and prevThread pointers; re-implemented all routines that use this
- struct. The effect of this is to save one handle per association,
- which could potentially equal the number of keys multiplied by the
- number of threads, accumulating over time - and to free the
- association memory as soon as it is no longer referenced by either
- the key or the thread. Previously, the handle and memory were
- released only after BOTH key and thread no longer referenced the
- association. That is, often no association resources were released
- until the process itself exited. In addition, at least one race
- condition has been removed - where two threads could attempt to
- release the association resources simultaneously - one via
- ptw32_callUserDestroyRoutines and the other via
- pthread_key_delete.
- - thanks to Richard Hughes at Aculab for discovering the problem.
- * pthread_key_create.c: See above.
- * pthread_key_delete.c: See above.
- * pthread_setspecific.c: See above.
- * ptw32_callUserDestroyRoutines.c: See above.
- * ptw32_tkAssocCreate.c: See above.
- * ptw32_tkAssocDestroy.c: See above.
-
-2005-04-27 Ross Johnson <ross at callisto.canberra.edu.au>
-
- * sem_wait.c (ptw32_sem_wait_cleanup): after cancellation re-attempt
- to acquire the semaphore to avoid a race with a late sem_post.
- * sem_timedwait.c: Modify comments.
-
-2005-04-25 Ross Johnson <ross at callisto.canberra.edu.au>
-
- * ptw32_relmillisecs.c: New module; converts future abstime to
- milliseconds relative to 'now'.
- * pthread_mutex_timedlock.c: Use new ptw32_relmillisecs routine in
- place of internal code; remove the NEED_SEM code - this routine is now
- implemented for builds that define NEED_SEM (WinCE etc)
- * sem_timedwait.c: Likewise; after timeout or cancellation,
- re-attempt to acquire the semaphore in case one has been posted since
- the timeout/cancel occurred. Thanks to Stefan Mueller.
- * Makefile: Add ptw32_relmillisecs.c module; remove
- ptw32_{in,de}crease_semaphore.c modules.
- * GNUmakefile: Likewise.
- * Bmakefile: Likewise.
-
- * sem_init.c: Re-write the NEED_SEM code to be consistent with the
- non-NEED_SEM code, but retaining use of an event in place of the w32 sema
- for w32 systems that don't include semaphores (WinCE);
- the NEED_SEM versions of semaphores has been broken for a long time but is
- now fixed and supports all of the same routines as the non-NEED_SEM case.
- * sem_destroy.c: Likewise.
- * sem_wait.c: Likewise.
- * sem_post.c: Likewise.
- * sem_post_multple.c: Likewise.
- * implement.h: Likewise.
- * sem_timedwait.c: Likewise; this routine is now
- implemented for builds that define NEED_SEM (WinCE etc).
- * sem_trywait.c: Likewise.
- * sem_getvalue.c: Likewise.
-
- * pthread_once.c: Yet more changes, reverting closer to Gottlob Frege's
- first design, but retaining cancellation, priority boosting, and adding
- preservation of W32 error codes to make pthread_once transparent to
- GetLastError.
-
-2005-04-11 Ross Johnson <ross at callisto.canberra.edu.au>
-
- * pthread_once.c (pthread_once): Added priority boosting to
- solve starvation problem after once_routine cancellation.
- See notes in file.
-
-2005-04-06 Kevin Lussier <Kevin at codegreennetworks.com>
-
- * Makefile: Added debug targets for all versions of the library.
-
-2005-04-01 Ross Johnson <ross at callisto.canberra.edu.au>
-
- * GNUmakefile: Add target to build libpthreadGC1.a as a static link
- library.
- * Makefile: Likewise for pthreadGC1.lib.
-
-2005-04-01 Kevin Lussier <Kevin at codegreennetworks.com>
-
- * sem_timedwait.c (sem_timedwait): Increase size of temp variables to
- avoid int overflows for large timeout values.
- * implement.h (int64_t): Include or define.
-
-2005-03-31 Dimitar Panayotov <develop at mail.bg>^M
-
- * pthread.h: Fix conditional defines for static linking.
- * sched.h: Liekwise.
- * semaphore.h: Likewise.
- * dll.c (PTW32_STATIC_LIB): Module is conditionally included
- in the build.
-
-2005-03-16 Ross Johnson <ross at callisto.canberra.edu.au>^M
-
- * pthread_setcancelstate.c: Undo the last change.
-
-2005-03-16 Ross Johnson <ross at callisto.canberra.edu.au>^M
-
- * pthread_setcancelstate.c: Don't check for an async cancel event
- if the library is using alertable async cancel..
-
-2005-03-14 Ross Johnson <ross at callisto.canberra.edu.au>
-
- * pthread_once.c (pthread_once): Downgrade interlocked operations to simple
- memory operations where these are protected by the critical section; edit
- comments.
-
-2005-03-13 Ross Johnson <rpj at callisto.canberra.edu.au>
-
- * pthread_once.c (pthread_once): Completely redesigned; a change was
- required to the ABI (pthread_once_t_), and resulting in a version
- compatibility index increment.
-
- NOTES:
- The design (based on pseudo code contributed by Gottlob Frege) avoids
- creating a kernel object if there is no contention. See URL for details:-
- http://sources.redhat.com/ml/pthreads-win32/2005/msg00029.html
- This uses late initialisation similar to the technique already used for
- pthreads-win32 mutexes and semaphores (from Alexander Terekhov).
-
- The subsequent cancelation cleanup additions (by rpj) could not be implemented
- without sacrificing some of the efficiency in Gottlob's design. In particular,
- although each once_control uses it's own event to block on, a global CS is
- required to manage it - since the event must be either re-usable or
- re-creatable under cancelation. This is not needed in the non-cancelable
- design because it is able to mark the event as closed (forever).
-
- When uncontested, a CS operation is equivalent to an Interlocked operation
- in speed. So, in the final design with cancelability, an uncontested
- once_control operation involves a minimum of five interlocked operations
- (including the LeaveCS operation).
-
- ALTERNATIVES:
- An alternative design from Alexander Terekhov proposed using a named mutex,
- as sketched below:-
-
- if (!once_control) { // May be in TLS
- named_mutex::guard guard(&once_control2);
- if (!once_control2) {
- <init>
- once_control2 = true;
- }
- once_control = true;
- }
-
- A more detailed description of this can be found here:-
- http://groups.yahoo.com/group/boost/message/15442
-
- [Although the definition of a suitable PTHREAD_ONCE_INIT precludes use of the
- TLS located flag, this is not critical.]
-
- There are three primary concerns though:-
- 1) The [named] mutex is 'created' even in the uncontended case.
- 2) A system wide unique name must be generated.
- 3) Win32 mutexes are VERY slow even in the uncontended case. An uncontested
- Win32 mutex lock operation can be 50 (or more) times slower than an
- uncontested EnterCS operation.
-
- Ultimately, the named mutex trick is making use of the global locks maintained
- by the kernel.
-
- * pthread.h (pthread_once_t_): One flag and an event HANDLE added.
- (PTHREAD_ONCE_INIT): Additional values included.
-
-2005-03-08 Ross Johnson <rpj at callisto.canberra.edu.au>
-
- * pthread_once.c (pthread_once): Redesigned to elliminate potential
- starvation problem.
- - reported by Gottlob Frege <gottlobfrege at gmail.com>
-
- * ptw32_threadDestroy.c (ptw32_threadDestroy): Implicit threads were
- not closing their Win32 thread duplicate handle.
- - reported by Dmitrii Semii <bogolt at gmail.com>
-
-2005-01-25 Ralf Kubis <RKubis at mc.com>
-
- * Attempted acquisition of recursive mutex was causing waiting
- threads to not be woken when the mutex is released.
-
- * GNUmakefile (GCE): Generate correct version resource comments.
-
-2005-01-01 Konstantin Voronkov <beowinkle at yahoo.com>
-
- * pthread_mutex_lock.c (pthread_mutex_lock): The new atomic exchange
- mutex algorithm is known to allow a thread to steal the lock off
- FIFO waiting threads. The next waiting FIFO thread gets a spurious
- wake-up and must attempt to re-acquire the lock. The woken thread
- was setting itself as the mutex's owner before the re-acquisition.
-
-2004-11-22 Ross Johnson <rpj at callisto.canberra.edu.au>
-
- * pthread_cond_wait.c (ptw32_cond_wait_cleanup): Undo change
- from 2004-11-02.
- * Makefile (DLL_VER): Added for DLL naming suffix - see README.
- * GNUmakefile (DLL_VER): Likewise.
- * Wmakefile (DLL_VER): Likewise.
- * Bmakefile (DLL_VER): Likewise.
- * pthread.dsw (version.rc): Added to MSVS workspace.
-
-2004-11-20 Boudewijn Dekker <b.dekker at ellipsis.nl>
-
- * pthread_getspecific.c (pthread_getspecific): Check for
- invalid (NULL) key argument.
-
-2004-11-19 Ross Johnson <rpj at callisto.canberra.edu.au>
-
- * config.h (PTW32_THREAD_ID_REUSE_INCREMENT): Added to allow
- building the library for either unique thread IDs like Solaris
- or non-unique thread IDs like Linux; allows application developers
- to override the library's default insensitivity to some apps
- that may not be strictly POSIX compliant.
- * version.rc: New resource module to encode version information
- within the DLL.
- * pthread.h: Added PTW32_VERSION* defines and grouped sections
- required by resource compiler together; bulk of file is skipped
- if RC_INVOKED. Defined some error numbers and other names for
- Borland compiler.
-
-2004-11-02 Ross Johnson <rpj at callisto.canberra.edu.au>
-
- * pthread_cond_wait.c (ptw32_cond_wait_cleanup): Lock CV mutex at
- start of cleanup handler rather than at the end.
- * implement.h (PTW32_THREAD_REUSE_EMPTY): Renamed from *_BOTTOM.
- (ptw32_threadReuseBottom): New global variable.
- * global.c (ptw32_threadReuseBottom): Declare new variable.
- * ptw32_reuse.c (ptw32_reuse): Change reuse LIFO stack to LILO queue
- to more evenly distribute use of reusable thread IDs; use renamed
- PTW32_THREAD_REUSE_EMPTY.
- * ptw32_processTerminate.c (ptw2_processTerminate): Use renamed
- PTW32_THREAD_REUSE_EMPTY.
-
-2004-10-31 Ross Johnson <rpj at callisto.canberra.edu.au>
-
- * implement.h (PThreadState): Add new state value
- 'PThreadStateCancelPending'.
- * pthread_testcancel.c (pthread_testcancel): Use new thread
- 'PThreadStateCancelPending' state as short cut to avoid entering
- kernel space via WaitForSingleObject() call. This was obviated
- by user space sema acquisition in sem_wait() and sem_timedwait(),
- which are also cancelation points. A call to pthread_testcancel()
- was required, which introduced a kernel call, effectively nullifying
- any gains made by the user space sem acquisition checks.
- * pthread_cancel.c (pthread_cancel): Set new thread
- 'PThreadStateCancelPending' state.
-
-2004-10-29 Ross Johnson <rpj at callisto.canberra.edu.au>
-
- * implement.h (pthread_t): Renamed to ptw32_thread_t; struct contains
- all thread state.
- * pthread.h (ptw32_handle_t): New general purpose struct to serve
- as a handle for various reusable object IDs - currently only used
- by pthread_t; contains a pointer to ptw32_thread_t (thread state)
- and a general purpose uint for use as a reuse counter or flags etc.
- (pthread_t): typedef'ed to ptw32_handle_t; the uint is the reuse
- counter that allows the library to maintain unique POSIX thread IDs.
- When the pthread struct reuse stack was introduced, threads would
- often acquire an identical ID to a previously destroyed thread. The
- same was true for the pre-reuse stack library, by virtue of pthread_t
- being the address of the thread struct. The new pthread_t retains
- the reuse stack but provides virtually unique thread IDs.
- * sem_wait.c (ptw32_sem_wait_cleanup): New routine used for
- cancelation cleanup.
- * sem_timedwait.c (ptw32_sem_timedwait_cleanup): Likewise.
-
-2004-10-22 Ross Johnson <rpj at callisto.canberra.edu.au>
-
- * sem_init.c (sem_init): Introduce a 'lock' element in order to
- replace the interlocked operations with conventional serialisation.
- This is needed in order to be able to atomically modify the sema
- value and perform Win32 sema release operations. Win32 semaphores are
- used instead of events in order to support efficient multiple posting.
- If the whole modify/release isn't atomic, a race between
- sem_timedwait() and sem_post() could result in a release when there is
- no waiting semaphore, which would cause too many threads to proceed.
- * sem_wait.c (sem_wait): Use new 'lock'element.
- * sem_timedwait.c (sem_timedwait): Likewise.
- * sem_trywait.c (sem_trywait): Likewise.
- * sem_post.c (sem_post): Likewise.
- * sem_post_multiple.c (sem_post_multiple): Likewise.
- * sem_getvalue.c (sem_getvalue): Likewise.
- * ptw32_semwait.c (ptw32_semwait): Likewise.
- * sem_destroy.c (sem_destroy): Likewise; also tightened the conditions
- for semaphore destruction; in particular, a semaphore will not be
- destroyed if it has waiters.
- * sem_timedwait.c (sem_timedwait): Added cancel cleanup handler to
- restore sema value when cancelled.
- * sem_wait.c (sem_wait): Likewise.
-
-2004-10-21 Ross Johnson <rpj at callisto.canberra.edu.au>
-
- * pthread_mutex_unlock.c (pthread_mutex_unlock): Must use PulseEvent()
- rather than SetEvent() to reset the event if there are no waiters.
-
-2004-10-19 Ross Johnson <rpj at callisto.canberra.edu.au>
-
- * sem_init.c (sem_init): New semaphore model based on the same idea
- as mutexes, i.e. user space interlocked check to avoid
- unnecessarily entering kernel space. Wraps the Win32 semaphore and
- keeps it's own counter. Although the motivation to do this has existed
- for a long time, credit goes to Alexander Terekhov for providing
- the logic. I have deviated slightly from AT's logic to add the waiters
- count, which has made the code more complicated by adding cancelation
- cleanup. This also appears to have broken the VCE (C++ EH) version of
- the library (the same problem as previously reported - see BUGS #2),
- only apparently not fixable using the usual workaround, nor by turning
- all optimisation off. The GCE version works fine, so it is presumed to
- be a bug in MSVC++ 6.0. The cancelation exception is thrown and caught
- correctly, but the cleanup class destructor is never called. The failing
- test is tests\semaphore4.c.
- * sem_wait.c (sem_wait): Implemented user space check model.
- * sem_post.c (sem_post): Likewise.
- * sem_trywait.c (sem_trywait): Likewise.
- * sem_timedwait.c (sem_timedwait): Likewise.
- * sem_post_multiple.c (sem_post_multiple): Likewise.
- * sem_getvalue.c (sem_getvalue): Likewise.
- * ptw32_semwait.c (ptw32_semwait): Likewise.
- * implement.h (sem_t_): Add counter element.
-
-2004-10-15 Ross Johnson <rpj at callisto.canberra.edu.au>
-
- * implement.h (pthread_mutex_t_): Use an event in place of
- the POSIX semaphore.
- * pthread_mutex_init.c: Create the event; remove semaphore init.
- * pthread_mutex_destroy.c: Delete the event.
- * pthread_mutex_lock.c: Replace the semaphore wait with the event wait.
- * pthread_mutex_trylock.c: Likewise.
- * pthread_mutex_timedlock.c: Likewise.
- * pthread_mutex_unlock.c: Set the event.
-
-2004-10-14 Ross Johnson <rpj at callisto.canberra.edu.au>
-
- * pthread_mutex_lock.c (pthread_mutex_lock): New algorithm using
- Terekhov's xchg based variation of Drepper's cmpxchg model.
- Theoretically, xchg uses fewer clock cycles than cmpxchg (using IA-32
- as a reference), however, in my opinion bus locking dominates the
- equation on smp systems, so the model with the least number of bus
- lock operations in the execution path should win, which is Terekhov's
- variant. On IA-32 uni-processor systems, it's faster to use the
- CMPXCHG instruction without locking the bus than to use the XCHG
- instruction, which always locks the bus. This makes the two variants
- equal for the non-contended lock (fast lane) execution path on up
- IA-32. Testing shows that the xchg variant is faster on up IA-32 as
- well if the test forces higher lock contention frequency, even though
- kernel calls should be dominating the times (on up IA-32, both
- variants used CMPXCHG instructions and neither locked the bus).
- * pthread_mutex_timedlock.c pthread_mutex_timedlock(): Similarly.
- * pthread_mutex_trylock.c (pthread_mutex_trylock): Similarly.
- * pthread_mutex_unlock.c (pthread_mutex_unlock): Similarly.
- * ptw32_InterlockedCompareExchange.c (ptw32_InterlockExchange): New
- function.
- (PTW32_INTERLOCKED_EXCHANGE): Sets up macro to use inlined
- ptw32_InterlockedExchange.
- * implement.h (PTW32_INTERLOCKED_EXCHANGE): Set default to
- InterlockedExchange().
- * Makefile: Building using /Ob2 so that asm sections within inline
- functions are inlined.
-
-2004-10-08 Ross Johnson <rpj at callisto.canberra.edu.au>
-
- * pthread_mutex_destroy.c (pthread_mutex_destroy): Critical Section
- element is no longer required.
- * pthread_mutex_init.c (pthread_mutex_init): Likewise.
- * pthread_mutex_lock.c (pthread_mutex_lock): New algorithm following
- Drepper's paper at http://people.redhat.com/drepper/futex.pdf, but
- using the existing semaphore in place of the futex described in the
- paper. Idea suggested by Alexander Terekhov - see:
- http://sources.redhat.com/ml/pthreads-win32/2003/msg00108.html
- * pthread_mutex_timedlock.c pthread_mutex_timedlock(): Similarly.
- * pthread_mutex_trylock.c (pthread_mutex_trylock): Similarly.
- * pthread_mutex_unlock.c (pthread_mutex_unlock): Similarly.
- * pthread_barrier_wait.c (pthread_barrier_wait): Use inlined version
- of InterlockedCompareExchange() if possible - determined at
- build-time.
- * pthread_spin_destroy.c pthread_spin_destroy(): Likewise.
- * pthread_spin_lock.c pthread_spin_lock():Likewise.
- * pthread_spin_trylock.c (pthread_spin_trylock):Likewise.
- * pthread_spin_unlock.c (pthread_spin_unlock):Likewise.
- * ptw32_InterlockedCompareExchange.c: Sets up macro for inlined use.
- * implement.h (pthread_mutex_t_): Remove Critical Section element.
- (PTW32_INTERLOCKED_COMPARE_EXCHANGE): Set to default non-inlined
- version of InterlockedCompareExchange().
- * private.c: Include ptw32_InterlockedCompareExchange.c first for
- inlining.
- * GNUmakefile: Add commandline option to use inlined
- InterlockedCompareExchange().
- * Makefile: Likewise.
-
-2004-09-27 Ross Johnson <rpj at callisto.canberra.edu.au>
-
- * pthread_mutex_lock.c (pthread_mutex_lock): Separate
- PTHREAD_MUTEX_NORMAL logic since we do not need to keep or check some
- state required by other mutex types; do not check mutex pointer arg
- for validity - leave this to the system since we are only checking
- for NULL pointers. This should improve speed of NORMAL mutexes and
- marginally improve speed of other type.
- * pthread_mutex_trylock.c (pthread_mutex_trylock): Likewise.
- * pthread_mutex_unlock.c (pthread_mutex_unlock): Likewise; also avoid
- entering the critical section for the no-waiters case, with approx.
- 30% reduction in lock/unlock overhead for this case.
- * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise; also
- no longer keeps mutex if post-timeout second attempt succeeds - this
- will assist applications that wish to impose strict lock deadlines,
- rather than simply to escape from frozen locks.
-
-2004-09-09 Tristan Savatier <tristan at mpegtv.com>
- * pthread.h (struct pthread_once_t_): Qualify the 'done' element
- as 'volatile'.
- * pthread_once.c: Concerned about possible race condition,
- specifically on MPU systems re concurrent access to multibyte types.
- [Maintainer's note: the race condition is harmless on SPU systems
- and only a problem on MPU systems if concurrent access results in an
- exception (presumably generated by a hardware interrupt). There are
- other instances of similar harmless race conditions that have not
- been identified as issues.]
-
-2004-09-09 Ross Johnson <rpj at callisto.canberra.edu.au>
-
- * pthread.h: Declare additional types as volatile.
-
-2004-08-27 Ross Johnson <rpj at callisto.canberra.edu.au>
-
- * pthread_barrier_wait.c (pthread_barrier_wait): Remove excessive code
- by substituting the internal non-cancelable version of sem_wait
- (ptw32_semwait).
-
-2004-08-25 Ross Johnson <rpj at callisto.canberra.edu.au>
-
- * pthread_join.c (pthread_join): Rewrite and re-order the conditional
- tests in an attempt to improve efficiency and remove a race
- condition.
-
-2004-08-23 Ross Johnson <rpj at callisto.canberra.edu.au>
-
- * create.c (pthread_create): Don't create a thread if the thread
- id pointer location (first arg) is inaccessible. A memory
- protection fault will result if the thread id arg isn't an accessible
- location. This is consistent with GNU/Linux but different to
- Solaris or MKS (and possibly others), which accept NULL as meaning
- 'don't return the created thread's ID'. Applications that run
- using pthreads-win32 will run on all other POSIX threads
- implementations, at least w.r.t. this feature.
-
- It was decided not to copy the Solaris et al behaviour because,
- although it would have simplified some application porting (but only
- from Solaris to Windows), the feature is not technically necessary,
- and the alternative segfault behaviour helps avoid buggy application
- code.
-
-2004-07-01 Anuj Goyal <anuj.goyal at gmail.com>
-
- * builddmc.bat: New; Windows bat file to build the library.
- * config.h (__DMC__): Support for Digital Mars compiler.
- * create.c (__DMC__): Likewise.
- * pthread_exit.c (__DMC__): Likewise.
- * pthread_join.c (__DMC__): Likewise.
- * ptw32_threadDestroy.c (__DMC__): Likewise.
- * ptw32_threadStart.c (__DMC__): Likewise.
- * ptw32_throw.c (__DMC__): Likewise.
-
-2004-06-29 Anuj Goyal <anuj.goyal at gmail.com>
-
- * pthread.h (__DMC__): Initial support for Digital Mars compiler.
-
-2004-06-29 Will Bryant <will.bryant at ecosm.com>
-
- * README.Borland: New; description of Borland changes.
- * Bmakefile: New makefile for the Borland make utility.
- * ptw32_InterlockedCompareExchange.c:
- Add Borland compatible asm code.
-
-2004-06-26 Jason Bard <BardJA at Npt.NUWC.Navy.Mil>
-
- * pthread.h (HAVE_STRUCT_TIMESPEC): If undefined, define it
- to avoid timespec struct redefined errors elsewhere in an
- application.
-
-2004-06-21 Ross Johnson <rpj at callisto.canberra.edu.au>
-
- * pthread.h (PTHREAD_RECURSIVE_MUTEX_INITIALIZER): Mutex
- initialiser added for compatibility with Linux threads and
- others; currently not included in SUSV3.
- * pthread.h (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER): Likewise.
- * pthread.h (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
- * pthread.h (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
-
- * ptw32_mutex_check_need_init.c (ptw32_mutex_check_need_init):
- Add new initialisers.
-
- * pthread_mutex_lock.c (pthread_mutex_lock): Check for new
- initialisers.
- * pthread_mutex_trylock.c (pthread_mutex_trylock): Likewise.
- * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
- * pthread_mutex_unlock.c (pthread_mutex_unlock): Likewise.
- * pthread_mutex_destroy.c (pthread_mutex_destroy): Likewise.
-
-2004-05-20 Ross Johnson <rpj at callisto.canberra.edu.au>
-
- * README.NONPORTABLE: Document pthread_win32_test_features_np().
- * FAQ: Update various answers.
-
-2004-05-19 Ross Johnson <rpj at callisto.canberra.edu.au>
-
- * Makefile: Don't define _WIN32_WINNT on compiler command line.
- * GNUmakefile: Likewise.
-
-2004-05-16 Ross Johnson <rpj at callisto.canberra.edu.au>
-
- * pthread_cancel.c (pthread_cancel): Adapted to use auto-detected
- QueueUserAPCEx features at run-time.
- (ptw32_RegisterCancelation): Drop in replacement for QueueUserAPCEx()
- if it can't be used. Provides older style non-preemptive async
- cancelation.
- * pthread_win32_attach_detach_np.c (pthread_win32_attach_np):
- Auto-detect quserex.dll and the availability of alertdrv.sys;
- initialise and close on process attach/detach.
- * global.c (ptw32_register_cancelation): Pointer to either
- QueueUserAPCEx() or ptw32_RegisterCancelation() depending on
- availability. QueueUserAPCEx makes pre-emptive async cancelation
- possible.
- * implement.h: Add definitions and prototypes related to QueueUserAPC.
-
-2004-05-16 Panagiotis E. Hadjidoukas <peh at hpclab.ceid.upatras.gr>
-
- * QueueUserAPCEx (separate contributed package): Provides preemptive
- APC feature.
- * pthread_cancel.c (pthread_cancel): Initial integration of
- QueueUserAPCEx into pthreads-win32 to provide true pre-emptive
- async cancelation of threads, including blocked threads.
-
-2004-05-06 Makoto Kato <raven at oldskool.jp>
-
- * pthread.h (DWORD_PTR): Define typedef for older MSVC.
- * pthread_cancel.c (AMD64): Add architecture specific Context register.
- * ptw32_getprocessors.c: Use correct types (DWORD_PTR) for mask
- variables.
-
-2004-04-06 P. van Bruggen <pietvb at newbridges.nl>
-
- * ptw32_threadDestroy.c: Destroy threadLock mutex to
- close a memory leak.
-
-2004-02-13 Gustav Hallberg <gustav at virtutech.com>
-
- * pthread_equal.c: Remove redundant equality logic.
-
-2003-12-10 Philippe Di Cristo <philipped at voicebox.com>
-
- * sem_timedwait.c (sem_timedwait): Fix timeout calculations.
-
-2003-10-20 Alexander Terekhov <TEREKHOV at de.ibm.com>
-
- * pthread_mutex_timedlock.c (ptw32_semwait): Move to individual module.
- * ptw32_semwait.c: New module.
- * pthread_cond_wait.c (ptw32_cond_wait_cleanup): Replace cancelable
- sem_wait() call with non-cancelable ptw32_semwait() call.
- * pthread.c (private.c): Re-order for inlining. GNU C warned that
- function ptw32_semwait() was defined 'inline' after it was called.
- * pthread_cond_signal.c (ptw32_cond_unblock): Likewise.
- * pthread_delay_np.c: Disable Watcom warning with comment.
- * *.c (process.h): Remove include from .c files. This is conditionally
- included by the common project include files.
-
-2003-10-20 James Ewing <james.ewing at sveasoft.com>
-
- * ptw32_getprocessors.c: Some Win32 environments don't have
- GetProcessAffinityMask(), so always return CPU count = 1 for them.
- * config.h (NEED_PROCESSOR_AFFINITY_MASK): Define for WinCE.
-
-2003-10-15 Ross Johnson <ross at callisto.canberra.edu.au>
-
- * Re-indented all .c files using default GNU style to remove assorted
- editor ugliness (used GNU indent utility in default style).
-
-2003-10-15 Alex Blanco <Alex.Blanco at motorola.com>
-
- * sem_init.c (sem_init): Would call CreateSemaphore even if the sema
- struct calloc failed; was not freeing calloced memory if either
- CreateSemaphore or CreateEvent failed.
-
-2003-10-14 Ross Johnson <ross at callisto.canberra.edu.au>
-
- * pthread.h: Add Watcom compiler compatibility. Esssentially just add
- the cdecl attribute to all exposed function prototypes so that Watcom
- generates function call code compatible with non-Watcom built libraries.
- By default, Watcom uses registers to pass function args if possible rather
- than pushing to stack.
- * semaphore.h: Likewise.
- * sched.h: Likewise.
- * pthread_cond_wait.c (ptw32_cond_wait_cleanup): Define with cdecl attribute
- for Watcom compatibility. This routine is called via pthread_cleanup_push so
- it had to match function arg definition.
- * Wmakefile: New makefile for Watcom builds.
-
-2003-09-14 Ross Johnson <rpj at callisto.canberra.edu.au>
-
- * pthread_setschedparam.c (pthread_setschedparam): Attempt to map
- all priority levels between max and min (as returned by
- sched_get_priority_min/max) to reasonable Win32 priority levels - i.e.
- levels between THREAD_PRIORITY_LOWEST/IDLE to THREAD_PRIORITY_LOWEST and
- between THREAD_PRIORITY_HIGHEST/TIME_CRITICAL to THREAD_PRIORITY_HIGHEST
- while others remain unchanged; record specified thread priority level
- for return by pthread_getschedparam.
-
- Note that, previously, specified levels not matching Win32 priority levels
- would silently leave the current thread priority unaltered.
-
- * pthread_getschedparam.c (pthread_getschedparam): Return the priority
- level specified by the latest pthread_setschedparam or pthread_create rather
- than the actual running thread priority as returned by GetThreadPriority - as
- required by POSIX. I.e. temporary or adjusted actual priority levels are not
- returned by this routine.
-
- * pthread_create.c (pthread_create): For priority levels specified via
- pthread attributes, attempt to map all priority levels between max and
- min (as returned by sched_get_priority_min/max) to reasonable Win32
- priority levels; record priority level given via attributes, or
- inherited from parent thread, for later return by pthread_getschedparam.
-
- * ptw32_new.c (ptw32_new): Initialise pthread_t_ sched_priority element.
-
- * pthread_self.c (pthread_self): Set newly created implicit POSIX thread
- sched_priority to Win32 thread's current actual priority. Temporarily
- altered priorities can't be avoided in this case.
-
- * implement.h (struct pthread_t_): Add new sched_priority element.
-
-2003-09-12 Ross Johnson <rpj at callisto.canberra.edu.au>
-
- * sched_get_priority_min.c (sched_get_priority_min): On error should return -1
- with errno set.
- * sched_get_priority_max.c (sched_get_priority_max): Likewise.
-
-2003-09-03 Ross Johnson <rpj at callisto.canberra.edu.au>
-
- * w32_cancelableWait.c (ptw32_cancelable_wait): Allow cancelation
- of implicit POSIX threads as well.
-
-2003-09-02 Ross Johnson <rpj at callisto.canberra.edu.au>
-
- * pthread_win32_attach_detach_np.c (pthread_win32_thread_detach_np):
- Add comment.
-
- * pthread_exit.c (pthread_exit): Fix to recycle the POSIX thread handle in
- addition to calling user TSD destructors. Move the implicit POSIX thread exit
- handling to ptw32_throw to centralise the logic.
-
- * ptw32_throw.c (ptw32_throw): Implicit POSIX threads have no point
- to jump or throw to, so cleanup and exit the thread here in this case. For
- processes using the C runtime, the exit code will be set to the POSIX
- reason for the throw (i.e. PTHREAD_CANCEL or the value given to pthread_exit).
- Note that pthread_exit() already had similar logic, which has been moved to
- here.
-
- * ptw32_threadDestroy.c (ptw32_threadDestroy): Don't close the Win32 handle
- of implicit POSIX threads - expect this to be done by Win32?
-
-2003-09-01 Ross Johnson <rpj at callisto.canberra.edu.au>
-
- * pthread_self.c (pthread_self): The newly aquired pthread_t must be
- assigned to the reuse stack, not freed, if the routine fails somehow.
-
-2003-08-13 Ross Johnson <rpj at ise.canberra.edu.au>
-
- * pthread_getschedparam.c (pthread_getschedparam): An invalid thread ID
- parameter was returning an incorrect error value; now uses a more exhaustive
- check for validity.
-
- * pthread_setschedparam.c (pthread_setschedparam): Likewise.
-
- * pthread_join.c (pthread_join): Now uses a more exhaustive
- check for validity.
-
- * pthread_detach.c (pthread_detach): Likewise.
-
- * pthread_cancel.c (pthread_cancel): Likewise.
-
- * ptw32_threadDestroy.c (ptw32_threadDestroy): pthread_t structs are
- never freed - push them onto a stack for reuse.
-
- * ptw32_new.c (ptw32_new): Check for reusable pthread_t before dynamically
- allocating new memory for the struct.
-
- * pthread_kill.c (pthread_kill): New file; new routine; takes only a zero
- signal arg so that applications can check the thread arg for validity; checks
- that the underlying Win32 thread HANDLE is valid.
-
- * pthread.h (pthread_kill): Add prototype.
-
- * ptw32_reuse.c (ptw32_threadReusePop): New file; new routine; pop a
- pthread_t off the reuse stack. pthread_t_ structs that have been destroyed, i.e.
- have exited detached or have been joined, are cleaned up and put onto a reuse
- stack. Consequently, thread IDs are no longer freed once calloced. The library
- will attempt to get a struct off this stack before asking the system to alloc
- new memory when creating threads. The stack is guarded by a global mutex.
- (ptw32_threadReusePush): New routine; push a pthread_t onto the reuse stack.
-
- * implement.h (ptw32_threadReusePush): Add new prototype.
- (ptw32_threadReusePop): Likewise.
- (pthread_t): Add new element.
-
- * ptw32_processTerminate.c (ptw32_processTerminate): Delete the thread
- reuse lock; free all thread ID structs on the thread reuse stack.
-
- * ptw32_processInitialize.c (ptw32_processInitialize): Initialise the
- thread reuse lock.
-
-2003-07-19 Ross Johnson <rpj at ise.canberra.edu.au>
-
- * GNUmakefile: modified to work under MsysDTK environment.
- * pthread_spin_lock.c (pthread_spin_lock): Check for NULL arg.
- * pthread_spin_unlock.c (pthread_spin_unlock): Likewise.
- * pthread_spin_trylock.c (pthread_spin_trylock): Likewise;
- fix incorrect pointer value if lock is dynamically initialised by
- this function.
- * sem_init.c (sem_init): Initialise sem_t value to quell compiler warning.
- * sem_destroy.c (sem_destroy): Likewise.
- * ptw32_threadStart.c (non-MSVC code sections): Include <exception> rather
- than old-style <new.h>; fix all std:: namespace entities such as
- std::terminate_handler instances and associated methods.
- * ptw32_callUserDestroyRoutines.c (non-MSVC code sections): Likewise.
-
-2003-06-24 Piet van Bruggen <pietvb at newbridges.nl>
-
- * pthread_spin_destroy.c (pthread_spin_destroy): Was not freeing the
- spinlock struct.
-
-2003-06-22 Nicolas Barry <boozai at yahoo.com>
-
- * pthread_mutex_destroy.c (pthread_mutex_destroy): When called
- with a recursive mutex that was locked by the current thread, the
- function was failing with a success return code.
-
-2003-05-15 Steven Reddie <Steven.Reddie at ca.com>
-
- * pthread_win32_attach_detach_np.c (pthread_win32_process_detach_np):
- NULLify ptw32_selfThreadKey after the thread is destroyed, otherwise
- destructors calling pthreads routines might resurrect it again, creating
- memory leaks. Call the underlying Win32 Tls routine directly rather than
- pthread_setspecific().
- (pthread_win32_thread_detach_np): Likewise.
-
-2003-05-14 Viv <vcotirlea at hotmail.com>
-
- * pthread.dsp: Change /MT compile flag to /MD.
-
-2003-03-04 Alexander Terekhov <TEREKHOV at de.ibm.com>
-
- * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Fix failure to
- set ownership of mutex on second grab after abstime timeout.
- - bug reported by Robert Strycek <strycek at posam.sk>
-
-2002-12-17 Thomas Pfaff <tpfaff at gmx.net>
-
- * pthread_mutex_lock.c (ptw32_semwait): New static routine to provide
- a non-cancelable sem_wait() function. This is consistent with the
- way that pthread_mutex_timedlock.c does it.
- (pthread_mutex_lock): Use ptw32_semwait() instead of sem_wait().
-
-2002-12-11 Thomas Pfaff <tpfaff at gmx.net>
-
- * pthread_mutex_trylock.c: Should return EBUSY rather than EDEADLK.
- * pthread_mutex_destroy.c: Remove redundant ownership test (the
- trylock call does this for us); do not destroy a recursively locked
- mutex.
-
-2002-09-20 Michael Johnson <michaelj at maine.rr.com>
-
- * pthread_cond_destroy.c (pthread_cond_destroy):
- When two different threads exist, and one is attempting to
- destroy a condition variable while the other is attempting to
- initialize a condition variable that was created with
- PTHREAD_COND_INITIALIZER, a deadlock can occur. Shrink
- the ptw32_cond_list_lock critical section to fix it.
-
-2002-07-31 Ross Johnson <rpj at special.ise.canberra.edu.au>
-
- * ptw32_threadStart.c (ptw32_threadStart): Thread cancelLock
- destruction moved to ptw32_threadDestroy().
-
- * ptw32_threadDestroy.c (ptw32_threadDestroy): Destroy
- the thread's cancelLock. Moved here from ptw32_threadStart.c
- to cleanup implicit threads as well.
-
-2002-07-30 Alexander Terekhov <TEREKHOV at de.ibm.com>
-
- * pthread_cond_wait.c (ptw32_cond_wait_cleanup):
- Remove code designed to avoid/prevent spurious wakeup
- problems. It is believed that the sem_timedwait() call
- is consuming a CV signal that it shouldn't and this is
- breaking the avoidance logic.
-
-2002-07-30 Ross Johnson <rpj at ise.canberra.edu.au>
-
- * sem_timedwait.c (sem_timedwait): Tighten checks for
- unreasonable abstime values - that would result in
- unexpected timeout values.
-
- * w32_CancelableWait.c (ptw32_cancelable_wait):
- Tighten up return value checking and add comments.
-
-
-2002-06-08 Ross Johnson <rpj at special.ise.canberra.edu.au>
-
- * sem_getvalue.c (sem_getvalue): Now returns a value for the
- NEED_SEM version (i.e. earlier versions of WinCE).
-
-
-2002-06-04 Rob Fanner <rfanner at stonethree.com>
-
- * sem_getvalue.c (sem_getvalue): The Johnson M. Hart
- approach didn't work - we are forced to take an
- intrusive approach. We try to decrement the sema
- and then immediately release it again to get the
- value. There is a small probability that this may
- block other threads, but only momentarily.
-
-2002-06-03 Ross Johnson <rpj at ise.canberra.edu.au>
-
- * sem_init.c (sem_init): Initialise Win32 semaphores
- to _POSIX_SEM_VALUE_MAX (which this implementation
- defines in pthread.h) so that sem_getvalue() can use
- the trick described in the comments in sem_getvalue().
- * pthread.h (_POSIX_SEM_VALUE_MAX): Defined.
- (_POSIX_SEM_NSEMS_MAX): Defined - not used but may be
- useful for source code portability.
-
-2002-06-03 Rob Fanner <rfanner at stonethree.com>
-
- * sem_getvalue.c (sem_getvalue): Did not work on NT.
- Use approach suggested by Johnson M. Hart in his book
- "Win32 System Programming".
-
-2002-02-28 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * errno.c: Compiler directive was incorrectly including code.
- * pthread.h: Conditionally added some #defines from config.h
- needed when not building the library. e.g. NEED_ERRNO, NEED_SEM.
- (PTW32_DLLPORT): Now only defined if _DLL defined.
- (_errno): Compiler directive was incorrectly including prototype.
- * sched.h: Conditionally added some #defines from config.h
- needed when not building the library.
- * semaphore.h: Replace an instance of NEED_SEM that should
- have been NEED_ERRNO. This change currently has nil effect.
-
- * GNUmakefile: Correct some recent changes.
-
- * Makefile: Add rule to generate pre-processor output.
-
-2002-02-23 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * pthread_rwlock_timedrdlock.c: New - untested.
- * pthread_rwlock_timedwrlock.c: New - untested.
-
- * Testsuite passed (except known MSVC++ problems)
-
- * pthread_cond_destroy.c: Expand the time change
- critical section to solve deadlock problem.
-
- * pthread.c: Add all remaining C modules.
- * pthread.h: Use dllexport/dllimport attributes on functions
- to avoid using pthread.def.
- * sched.h: Likewise.
- * semaphore.h: Likewise.
- * GNUmakefile: Add new targets for single translation
- unit build to maximise inlining potential; generate
- pthread.def automatically.
- * Makefile: Likewise, but no longer uses pthread.def.
-
-2002-02-20 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * pthread_cond_destroy.c (pthread_cond_destroy):
- Enter the time change critical section earlier.
-
-2002-02-17 Ross Johnson <rpj at setup1.ise.canberra.edu.au
-
- * Testsuite passed.
-
- * pthread_timechange_handler_np.c: New; following
- a suggestion from Alexander Terekhov that CVs should
- be broadcast so that they all re-evaluate their
- condition variables and reset a new timeout if
- required, whenever an application receives a
- WM_TIMECHANGE message. This message indicates that
- the system time has been changed. Therefore, CVs
- waiting for a timeout set as an abs_time will possibly
- not wake up at the expected time. Some applications
- may not be tolerant of this.
- * pthread_cond_init.c: Add CV to linked list.
- * pthread_cond_destroy.c: Remove CV from linked list.
- * global.c (ptw32_cond_list_head): New variable.
- (ptw32_cond_list_tail): New variable.
- (ptw32_cond_list_cs): New critical section.
- * ptw32_processInitialize (ptw32_cond_list_cs): Initialize.
- * ptw32_processTerminate (ptw32_cond_list_cs): Delete.
-
-
- * Reduce executable size.
- -----------------------
- When linking with the static library, only those
- routines actually called, either directly or indirectly
- should be included.
-
- [Gcc has the -ffunction-segments option to do this but MSVC
- doesn't have this feature as far as I can determine. Other
- compilers are undetermined as well. - rpj]
-
- * spin.c: Split file into function segments.
- * ptw32_spinlock_check_need_init.c: Separated routine from spin.c.
- * pthread_spin_init.c: Likewise.
- * pthread_spin_destroy.c: Likewise.
- * pthread_spin_lock.c: Likewise.
- * pthread_spin_unlock.c: Likewise.
- * pthread_spin_trylock.c: Likewise.
-
- * sync.c: Split file into function segments.
- * pthread_detach.c: Separated routine from sync.c.
- * pthread_join.c: Likewise.
-
- * tsd.c: Split file into function segments.
- * pthread_key_create.c: Separated routine from tsd.c.
- * pthread_key_delete.c: Likewise.
- * pthread_setspecific.c: Likewise.
- * pthread_getspecific.c: Likewise.
-
- * sched.c: Split file into function segments.
- * pthread_attr_setschedpolicy.c: Separated routine from sched.c.
- * pthread_attr_getschedpolicy.c: Likewise.
- * pthread_attr_setschedparam.c: Likewise.
- * pthread_attr_getschedparam.c: Likewise.
- * pthread_attr_setinheritsched.c: Likewise.
- * pthread_attr_getinheritsched.c: Likewise.
- * pthread_setschedparam.c: Likewise.
- * pthread_getschedparam.c: Likewise.
- * sched_get_priority_max.c: Likewise.
- * sched_get_priority_min.c: Likewise.
- * sched_setscheduler.c: Likewise.
- * sched_getscheduler.c: Likewise.
- * sched_yield.c: Likewise.
-
-
-2002-02-16 Ross Johnson <rpj at setup1.ise.canberra.edu.au
-
- Reduce executable size.
- -----------------------
- When linking with the static library, only those
- routines actually called, either directly or indirectly
- should be included.
-
- [Gcc has the -ffunction-segments option to do this but MSVC
- doesn't have this feature as far as I can determine. Other
- compilers are undetermined as well. - rpj]
-
- * mutex.c: Split file into function segments.
- * pthread_mutexattr_destroy.c: Separated routine from mutex.c
- * pthread_mutexattr_getpshared.c: Likewise.
- * pthread_mutexattr_gettype.c: Likewise.
- * pthread_mutexattr_init.c: Likewise.
- * pthread_mutexattr_setpshared.c: Likewise.
- * pthread_mutexattr_settype.c: Likewise.
- * ptw32_mutex_check_need_init.c: Likewise.
- * pthread_mutex_destroy.c: Likewise.
- * pthread_mutex_init.c: Likewise.
- * pthread_mutex_lock.c: Likewise.
- * pthread_mutex_timedlock.c: Likewise.
- * pthread_mutex_trylock.c: Likewise.
- * pthread_mutex_unlock.c: Likewise.
-
- * private.c: Split file into function segments.
- * ptw32_InterlockedCompareExchange.c: Separated routine from private.c
- * ptw32_callUserDestroyRoutines.c: Likewise.
- * ptw32_getprocessors.c: Likewise.
- * ptw32_processInitialize.c: Likewise.
- * ptw32_processTerminate.c: Likewise.
- * ptw32_threadDestroy.c: Likewise.
- * ptw32_threadStart.c: Likewise.
- * ptw32_throw.c: Likewise.
- * ptw32_timespec.c: Likewise.
- * ptw32_tkAssocCreate.c: Likewise.
- * ptw32_tkAssocDestroy.c: Likewise.
-
- * rwlock.c: Split file into function segments.
- * pthread_rwlockattr_destroy.c: Separated routine from rwlock.c
- * pthread_rwlockattr_getpshared.c: Likewise.
- * pthread_rwlockattr_init.c: Likewise.
- * pthread_rwlockattr_setpshared.c: Likewise.
- * ptw32_rwlock_check_need_init.c: Likewise.
- * pthread_rwlock_destroy.c: Likewise.
- * pthread_rwlock_init.c: Likewise.
- * pthread_rwlock_rdlock.c: Likewise.
- * pthread_rwlock_tryrdlock.c: Likewise.
- * pthread_rwlock_trywrlock.c: Likewise.
- * pthread_rwlock_unlock.c: Likewise.
- * pthread_rwlock_wrlock.c: Likewise.
-
-2002-02-10 Ross Johnson <rpj at setup1.ise.canberra.edu.au
-
- Reduce executable size.
- -----------------------
- When linking with the static library, only those
- routines actually called, either directly or indirectly
- should be included.
-
- [Gcc has the -ffunction-segments option to do this but MSVC
- doesn't have this feature as far as I can determine. Other
- compilers are undetermined as well. - rpj]
-
- * nonportable.c: Split file into function segments.
- * np_delay.c: Separated routine from nonportable.c
- * np_getw32threadhandle.c: Likewise.
- * np_mutexattr_setkind.c: Likewise.
- * np_mutexattr_getkind.c: Likewise.
- * np_num_processors.c: Likewise.
- * np_win32_attach_detach.c: Likewise.
-
- * misc.c: Split file into function segments.
- * pthread_equal.c: Separated routine from nonportable.c.
- * pthread_getconcurrency.c: Likewise.
- * pthread_once.c: Likewise.
- * pthread_self.c: Likewise.
- * pthread_setconcurrency.c: Likewise.
- * ptw32_calloc.c: Likewise.
- * ptw32_new.c: Likewise.
- * w32_CancelableWait.c: Likewise.
-
-2002-02-09 Ross Johnson <rpj at setup1.ise.canberra.edu.au
-
- Reduce executable size.
- -----------------------
- When linking with the static library, only those
- routines actually called, either directly or indirectly
- should be included.
-
- [Gcc has the -ffunction-segments option to do this but MSVC
- doesn't have this feature as far as I can determine. Other
- compilers are undetermined as well. - rpj]
-
- * condvar.c: Split file into function segments.
- * pthread_condattr_destroy.c: Separated routine from condvar.c.
- * pthread_condattr_getpshared.c: Likewise.
- * pthread_condattr_init.c: Likewise.
- * pthread_condattr_setpshared.c: Likewise.
- * ptw32_cond_check_need_init.c: Likewise.
- * pthread_cond_destroy.c: Likewise.
- * pthread_cond_init.c: Likewise.
- * pthread_cond_signal.c: Likewise.
- * pthread_cond_wait.c: Likewise.
-
-2002-02-07 Alexander Terekhov<TEREKHOV at de.ibm.com>
-
- * nonportable.c (pthread_delay_np): Make a true
- cancelation point. Deferred cancels will interrupt the
- wait.
-
-2002-02-07 Ross Johnson <rpj at setup1.ise.canberra.edu.au
-
- * misc.c (ptw32_new): Add creation of cancelEvent so that
- implicit POSIX threads (Win32 threads with a POSIX face)
- are cancelable; mainly so that pthread_delay_np doesn't fail
- if called from the main thread.
- * create.c (pthread_create): Remove creation of cancelEvent
- from here; now in ptw32_new().
-
- Reduce executable size.
- -----------------------
- When linking with the static library, only those
- routines actually called, either directly or indirectly
- should be included.
-
- [Gcc has the -ffunction-segments option to do this but MSVC
- doesn't have this feature as far as I can determine. Other
- compilers are undetermined as well. - rpj]
-
- * barrier.c: All routines are now in separate compilation units;
- This file is used to congregate the separate modules for
- potential inline optimisation and backward build compatibility.
- * cancel.c: Likewise.
- * pthread_barrierattr_destroy.c: Separated routine from cancel.c.
- * pthread_barrierattr_getpshared.c: Likewise.
- * pthread_barrierattr_init.c: Likewise.
- * pthread_barrierattr_setpshared.c: Likewise.
- * pthread_barrier_destroy.c: Likewise.
- * pthread_barrier_init.c: Likewise.
- * pthread_barrier_wait.c: Likewise.
- * pthread_cancel.c: Likewise.
- * pthread_setcancelstate.c: Likewise.
- * pthread_setcanceltype.c: Likewise.
- * pthread_testcancel.c: Likewise.
-
-2002-02-04 Max Woodbury <mtew at cds.duke.edu>
-
- Reduced name space pollution.
- -----------------------------
- When the appropriate symbols are defined, the headers
- will restrict the definitions of new names. In particular,
- it must be possible to NOT include the <windows.h>
- header and related definitions with some combination
- of symbol definitions. Secondly, it should be possible
- that additional definitions should be limited to POSIX
- compliant symbols by the definition of appropriate symbols.
-
- * pthread.h: POSIX conditionals.
- * sched.h: POSIX conditionals.
- * semaphore.h: POSIX conditionals.
-
- * semaphore.c: Included <limits.h>.
- (sem_init): Changed magic 0x7FFFFFFFL to INT_MAX.
- (sem_getvalue): Trial version.
-
- Reduce executable size.
- -----------------------
- When linking with the static library, only those
- routines actually called, either directly or indirectly
- should be included.
-
- [Gcc has the -ffunction-segments option to do this but MSVC
- doesn't have this feature as far as I can determine. Other
- compilers are undetermined as well. - rpj]
-
- * semaphore.c: All routines are now in separate compilation units;
- This file is used to congregate the separate modules for
- potential inline optimisation and backward build compatibility.
- * sem_close.c: Separated routine from semaphore.c.
- * ptw32_decrease_semaphore.c: Likewise.
- * sem_destroy.c: Likewise.
- * sem_getvalue.c: Likewise.
- * ptw32_increase_semaphore.c: Likewise.
- * sem_init.c: Likewise.
- * sem_open.c: Likewise.
- * sem_post.c: Likewise.
- * sem_post_multiple.c: Likewise.
- * sem_timedwait.c: Likewise.
- * sem_trywait.c: Likewise.
- * sem_unlink.c: Likewise.
- * sem_wait.c: Likewise.
-
-2002-02-04 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- The following extends the idea above to the rest of pthreads-win32 - rpj
-
- * attr.c: All routines are now in separate compilation units;
- This file is used to congregate the separate modules for
- potential inline optimisation and backward build compatibility.
- * pthread_attr_destroy.c: Separated routine from attr.c.
- * pthread_attr_getdetachstate.c: Likewise.
- * pthread_attr_getscope.c: Likewise.
- * pthread_attr_getstackaddr.c: Likewise.
- * pthread_attr_getstacksize.c: Likewise.
- * pthread_attr_init.c: Likewise.
- * pthread_attr_is_attr.c: Likewise.
- * pthread_attr_setdetachstate.c: Likewise.
- * pthread_attr_setscope.c: Likewise.
- * pthread_attr_setstackaddr.c: Likewise.
- * pthread_attr_setstacksize.c: Likewise.
-
- * pthread.c: Agregation of agregate modules for super-inlineability.
-
-2002-02-02 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * cancel.c: Rearranged some code and introduced checks
- to disable cancelation at the start of a thread's cancelation
- run to prevent double cancelation. The main problem
- arises if a thread is canceling and then receives a subsequent
- async cancel request.
- * private.c: Likewise.
- * condvar.c: Place pragmas around cleanup_push/pop to turn
- off inline optimisation (/Obn where n>0 - MSVC only). Various
- optimisation switches in MSVC turn this on, which interferes with
- the way that cleanup handlers are run in C++ EH and SEH
- code. Application code compiled with inline optimisation must
- also wrap cleanup_push/pop blocks with the pragmas, e.g.
- #pragma inline_depth(0)
- pthread_cleanup_push(...)
- ...
- pthread_cleanup_pop(...)
- #pragma inline_depth(8)
- * rwlock.c: Likewise.
- * mutex.c: Remove attempts to inline some functions.
- * signal.c: Modify misleading comment.
-
-2002-02-01 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * semaphore.c (sem_trywait): Fix missing errno return
- for systems that define NEED_SEM (e.g. early WinCE).
- * mutex.c (pthread_mutex_timedlock): Return ENOTSUP
- for systems that define NEED_SEM since they don't
- have sem_trywait().
-
-2002-01-27 Ross Johnson <rpj at special.ise.canberra.edu.au>
-
- * mutex.c (pthread_mutex_timedlock): New function suggested by
- Alexander Terekhov. The logic required to implement this
- properly came from Alexander, with some collaboration
- with Thomas Pfaff.
- (pthread_mutex_unlock): Wrap the waiters check and sema
- post in a critical section to prevent a race with
- pthread_mutex_timedlock.
- (ptw32_timed_semwait): New function;
- returns a special result if the absolute timeout parameter
- represents a time already passed when called; used by
- pthread_mutex_timedwait(). Have deliberately not reused
- the name "ptw32_sem_timedwait" because they are not the same
- routine.
- * condvar.c (ptw32_cond_timedwait): Use the new sem_timedwait()
- instead of ptw32_sem_timedwait(), which now has a different
- function. See previous.
- * implement.h: Remove prototype for ptw32_sem_timedwait.
- See next.
- (pthread_mutex_t_): Add critical section element for access
- to lock_idx during mutex post-timeout processing.
- * semaphore.h (sem_timedwait): See next.
- * semaphore.c (sem_timedwait): See next.
- * private.c (ptw32_sem_timedwait): Move to semaphore.c
- and rename as sem_timedwait().
-
-2002-01-18 Ross Johnson <rpj at special.ise.canberra.edu.au>
-
- * sync.c (pthread_join): Was getting the exit code from the
- calling thread rather than the joined thread if
- defined(__MINGW32__) && !defined(__MSVCRT__).
-
-2002-01-15 Ross Johnson <rpj at special.ise.canberra.edu.au>
-
- * pthread.h: Unless the build explicitly defines __CLEANUP_SEH,
- __CLEANUP_CXX, or __CLEANUP_C, then the build defaults to
- __CLEANUP_C style cleanup. This style uses setjmp/longjmp
- in the cancelation and thread exit implementations and therefore
- won't do stack unwinding if linked to applications that have it
- (e.g. C++ apps). This is currently consistent with most/all
- commercial Unix POSIX threads implementations.
-
- * spin.c (pthread_spin_init): Edit renamed function call.
- * nonportable.c (pthread_num_processors_np): New.
- (pthread_getprocessors_np): Renamed to ptw32_getprocessors
- and moved to private.c.
- * private.c (pthread_getprocessors): Moved here from
- nonportable.c.
- * pthread.def (pthread_getprocessors_np): Removed
- from export list.
-
- * rwlock.c (pthread_rwlockattr_init): New.
- (pthread_rwlockattr_destroy): New.
- (pthread_rwlockattr_getpshared): New.
- (pthread_rwlockattr_setpshared): New.
-
-2002-01-14 Ross Johnson <rpj at special.ise.canberra.edu.au>
-
- * attr.c (pthread_attr_setscope): Fix struct pointer
- indirection error introduced 2002-01-04.
- (pthread_attr_getscope): Likewise.
-
-2002-01-12 Ross Johnson <rpj at special.ise.canberra.edu.au>
-
- * pthread.dsp (SOURCE): Add missing source files.
-
-2002-01-08 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * mutex.c (pthread_mutex_trylock): use
- ptw32_interlocked_compare_exchange function pointer
- rather than ptw32_InterlockedCompareExchange() directly
- to retain portability to non-iX86 processors,
- e.g. WinCE etc. The pointer will point to the native
- OS version of InterlockedCompareExchange() if the
- OS supports it (see ChangeLog entry of 2001-10-17).
-
-2002-01-07 Thomas Pfaff <tpfaff at gmx.net>, Alexander Terekhov <TEREKHOV at de.ibm.com>
-
- * mutex.c (pthread_mutex_init): Remove critical
- section calls.
- (pthread_mutex_destroy): Likewise.
- (pthread_mutex_unlock): Likewise.
- (pthread_mutex_trylock): Likewise; uses
- ptw32_InterlockedCompareExchange() to avoid need for
- critical section; library is no longer i386 compatible;
- recursive mutexes now increment the lock count rather
- than return EBUSY; errorcheck mutexes return EDEADLCK
- rather than EBUSY. This behaviour is consistent with the
- Solaris pthreads implementation.
- * implement.h (pthread_mutex_t_): Remove critical
- section element - no longer needed.
-
-
-2002-01-04 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * attr.c (pthread_attr_setscope): Add more error
- checking and actually store the scope value even
- though it's not really necessary.
- (pthread_attr_getscope): Return stored value.
- * implement.h (pthread_attr_t_): Add new scope element.
- * ANNOUNCE: Fix out of date comment next to
- pthread_attr_setscope in conformance section.
-
-2001-12-21 Alexander Terekhov <TEREKHOV at de.ibm.com>
-
- * mutex.c (pthread_mutex_lock): Decrementing lock_idx was
- not thread-safe.
- (pthread_mutex_trylock): Likewise.
-
-2001-10-26 prionx@juno.com
-
- * semaphore.c (sem_init): Fix typo and missing bracket
- in conditionally compiled code. Only older versions of
- WinCE require this code, hence it doesn't normally get
- tested; somehow when sem_t reverted to an opaque struct
- the calloc NULL check was left in the conditionally included
- section.
- (sem_destroy): Likewise, the calloced sem_t wasn't being freed.
-
-2001-10-25 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * GNUmakefile (libwsock32): Add to linker flags for
- WSAGetLastError() and WSASetLastError().
- * Makefile (wsock32.lib): Likewise.
- * create.c: Minor mostly inert changes.
- * implement.h (PTW32_MAX): Move into here and renamed
- from sched.h.
- (PTW32_MIN): Likewise.
- * GNUmakefile (TEST_ICE): Define if testing internal
- implementation of InterlockedCompareExchange.
- * Makefile (TEST_ICE): Likewise.
- * private.c (TEST_ICE): Likewise.
-
-2001-10-24 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * attr.c (pthread_attr_setstacksize): Quell warning
- from LCC by conditionally compiling the stacksize
- validity check. LCC correctly warns that the condition
- (stacksize < PTHREAD_STACK_MIN) is suspicious
- because STACK_MIN is 0 and stacksize is of type
- size_t (or unsigned int).
-
-2001-10-17 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * barrier.c: Move _LONG and _LPLONG defines into
- implement.h; rename to PTW32_INTERLOCKED_LONG and
- PTW32_INTERLOCKED_LPLONG respectively.
- * spin.c: Likewise; ptw32_interlocked_compare_exchange used
- in place of InterlockedCompareExchange directly.
- * global.c (ptw32_interlocked_compare_exchange): Add
- prototype for this new routine pointer to be used when
- InterlockedCompareExchange isn't supported by Windows.
- * nonportable.c (pthread_win32_process_attach_np): Check for
- support of InterlockedCompareExchange in kernel32 and assign its
- address to ptw32_interlocked_compare_exchange if it exists, or
- our own ix86 specific implementation ptw32_InterlockedCompareExchange.
- *private.c (ptw32_InterlockedCompareExchange): An
- implementation of InterlockedCompareExchange() which is
- specific to ix86; written directly in assembler for either
- MSVC or GNU C; needed because Windows 95 doesn't support
- InterlockedCompareExchange().
-
- * sched.c (sched_get_priority_min): Extend to return
- THREAD_PRIORITY_IDLE.
- (sched_get_priority_max): Extend to return
- THREAD_PRIORITY_CRITICAL.
-
-2001-10-15 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * spin.c (pthread_spin_lock): PTHREAD_SPINLOCK_INITIALIZER
- was causing a program fault.
- (pthread_spin_init): Could have alloced memory
- without freeing under some error conditions.
-
- * mutex.c (pthread_mutex_init): Move memory
- allocation of mutex struct after checking for
- PROCESS_SHARED.
-
-2001-10-12 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * spin.c (pthread_spin_unlock): Was not returning
- EPERM if the spinlock was not locked, for multi CPU
- machines.
-
-2001-10-08 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * spin.c (pthread_spin_trylock): Was not returning
- EBUSY for multi CPU machines.
-
-2001-08-24 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * condvar.c (pthread_cond_destroy): Remove cv element
- that is no longer used.
- * implement.h: Likewise.
-
-2001-08-23 Alexander Terekhov <TEREKHOV at de.ibm.com>
-
- * condvar.c (pthread_cond_destroy): fix bug with
- respect to deadlock in the case of concurrent
- _destroy/_unblock; a condition variable can be destroyed
- immediately after all the threads that are blocked on
- it are awakened.
-
-2001-08-23 Phil Frisbie, Jr. <phil at hawksoft.com>
-
- * tsd.c (pthread_getspecific): Preserve the last
- winsock error [from WSAGetLastError()].
-
-2001-07-18 Scott McCaskill <scott at magruder.org>
-
- * mutex.c (pthread_mutexattr_init): Return ENOMEM
- immediately and don't dereference the NULL pointer
- if calloc fails.
- (pthread_mutexattr_getpshared): Don't dereference
- a pointer that is possibly NULL.
- * barrier.c (pthread_barrierattr_init): Likewise
- (pthread_barrierattr_getpshared): Don't dereference
- a pointer that is possibly NULL.
- * condvar.c (pthread_condattr_getpshared): Don't dereference
- a pointer that is possibly NULL.
-
-2001-07-15 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * rwlock.c (pthread_rwlock_wrlock): Is allowed to be
- a cancelation point; re-enable deferred cancelability
- around the CV call.
-
-2001-07-10 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * barrier.c: Still more revamping. The exclusive access
- mutex isn't really needed so it has been removed and replaced
- by an InterlockedDecrement(). nSerial has been removed.
- iStep is now dual-purpose. The process shared attribute
- is now stored in the barrier struct.
- * implement.h (pthread_barrier_t_): Lost some/gained one
- elements.
- * private.c (ptw32_threadStart): Removed some comments.
-
-2001-07-10 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * barrier.c: Revamped to fix the race condition. Two alternating
- semaphores are used instead of the PulseEvent. Also improved
- overall throughput by returning PTHREAD_BARRIER_SERIAL_THREAD
- to the first waking thread.
- * implement.h (pthread_barrier_t_): Revamped.
-
-2001-07-09 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * barrier.c: Fix several bugs in all routines. Now passes
- tests/barrier5.c which is fairly rigorous. There is still
- a non-optimal work-around for a race condition between
- the barrier breeched event signal and event wait. Basically
- the last (signalling) thread to hit the barrier yields
- to allow any other threads, which may have lost the race,
- to complete.
-
-2001-07-07 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * barrier.c: Changed synchronisation mechanism to a
- Win32 manual reset Event and use PulseEvent to signal
- waiting threads. If the implementation continued to use
- a semaphore it would require a second semaphore and
- some management to use them alternately as barriers. A
- single semaphore allows threads to cascade from one barrier
- through the next, leaving some threads blocked at the first.
- * implement.h (pthread_barrier_t_): As per above.
- * general: Made a number of other routines inlinable.
-
-2001-07-07 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * spin.c: Revamped and working; included static initialiser.
- Now beta level.
- * barrier.c: Likewise.
- * condvar.c: Macro constant change; inline auto init routine.
- * mutex.c: Likewise.
- * rwlock.c: Likewise.
- * private.c: Add support for spinlock initialiser.
- * global.c: Likewise.
- * implement.h: Likewise.
- * pthread.h (PTHREAD_SPINLOCK_INITIALIZER): Fix typo.
-
-2001-07-05 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * barrier.c: Remove static initialisation - irrelevent
- for this object.
- * pthread.h (PTHREAD_BARRIER_INITIALIZER): Removed.
- * rwlock.c (pthread_rwlock_wrlock): This routine is
- not a cancelation point - disable deferred
- cancelation around call to pthread_cond_wait().
-
-2001-07-05 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * spin.c: New module implementing spin locks.
- * barrier.c: New module implementing barriers.
- * pthread.h (_POSIX_SPIN_LOCKS): defined.
- (_POSIX_BARRIERS): Defined.
- (pthread_spin_*): Defined.
- (pthread_barrier*): Defined.
- (PTHREAD_BARRIER_SERIAL_THREAD): Defined.
- * implement.h (pthread_spinlock_t_): Defined.
- (pthread_barrier_t_): Defined.
- (pthread_barrierattr_t_): Defined.
-
- * mutex.c (pthread_mutex_lock): Return with the error
- if an auto-initialiser initialisation fails.
-
- * nonportable.c (pthread_getprocessors_np): New; gets the
- number of available processors for the current process.
-
-2001-07-03 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * pthread.h (_POSIX_READER_WRITER_LOCKS): Define it
- if not already defined.
-
-2001-07-01 Alexander Terekhov <TEREKHOV at de.ibm.com>
-
- * condvar.c: Fixed lost signal bug reported by Timur Aydin
- (taydin@snet.net).
- [RPJ (me) didn't translate the original algorithm
- correctly.]
- * semaphore.c: Added sem_post_multiple; this is a useful
- routine, but it doesn't appear to be standard. For now it's
- not an exported function.
-
-2001-06-25 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * create.c (pthread_create): Add priority inheritance
- attributes.
- * mutex.c (pthread_mutex_lock): Remove some overhead for
- PTHREAD_MUTEX_NORMAL mutex types. Specifically, avoid
- calling pthread_self() and pthread_equal() to check/set
- the mutex owner. Introduce a new pseudo owner for this
- type. Test results suggest increases in speed of up to
- 90% for non-blocking locks.
- This is the default type of mutex used internally by other
- synchronising objects, ie. condition variables and
- read-write locks. The test rwlock7.c shows about a
- 30-35% speed increase over snapshot 2001-06-06. The
- price of this is that the application developer
- must ensure correct behaviour, or explicitly set the
- mutex to a safer type such as PTHREAD_MUTEX_ERRORCHECK.
- For example, PTHREAD_MUTEX_NORMAL (or PTHREAD_MUTEX_DEFAULT)
- type mutexes will not return an error if a thread which is not
- the owner calls pthread_mutex_unlock. The call will succeed
- in unlocking the mutex if it is currently locked, but a
- subsequent unlock by the true owner will then fail with EPERM.
- This is however consistent with some other implementations.
- (pthread_mutex_unlock): Likewise.
- (pthread_mutex_trylock): Likewise.
- (pthread_mutex_destroy): Likewise.
- * attr.c (pthread_attr_init): PTHREAD_EXPLICIT_SCHED is the
- default inheritance attribute; THREAD_PRIORITY_NORMAL is
- the default priority for new threads.
- * sched.c (pthread_attr_setschedpolicy): Added routine.
- (pthread_attr_getschedpolicy): Added routine.
- (pthread_attr_setinheritsched): Added routine.
- (pthread_attr_getinheritsched): Added routine.
- * pthread.h (sched_rr_set_interval): Added as a macro;
- returns -1 with errno set to ENOSYS.
-
-2001-06-23 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- *sched.c (pthread_attr_setschedparam): Add priority range
- check.
- (sched_setscheduler): New function; checks for a valid
- pid and policy; checks for permission to set information
- in the target process; expects pid to be a Win32 process ID,
- not a process handle; the only scheduler policy allowed is
- SCHED_OTHER.
- (sched_getscheduler): Likewise, but checks for permission
- to query.
- * pthread.h (SCHED_*): Moved to sched.h as defined in the
- POSIX standard.
- * sched.h (SCHED_*): Moved from pthread.h.
- (pid_t): Defined if necessary.
- (sched_setscheduler): Defined.
- (sched_getscheduler): Defined.
- * pthread.def (sched_setscheduler): Exported.
- (sched_getscheduler): Likewise.
-
-2001-06-23 Ralf Brese <Ralf.Brese at pdb4.siemens.de>
-
- * create.c (pthread_create): Set thread priority from
- thread attributes.
-
-2001-06-18 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * Made organisational-only changes to UWIN additions.
- * dll.c (dllMain): Moved UWIN process attach code
- to pthread_win32_process_attach_np(); moved
- instance of pthread_count to global.c.
- * global.c (pthread_count): Moved from dll.c.
- * nonportable.c (pthread_win32_process_attach_np):
- Moved _UWIN code to here from dll.c.
- * implement.h (pthread_count): Define extern int.
- * create.c (pthread_count): Remove extern int.
- * private.c (pthread_count): Likewise.
- * exit.c (pthread_count): Likewise.
-
-2001-06-18 David Korn <dgk at research.att.com>
-
- * dll.c: Added changes necessary to work with UWIN.
- * create.c: Likewise.
- * pthread.h: Likewise.
- * misc.c: Likewise.
- * exit.c: Likewise.
- * private.c: Likewise.
- * implement.h: Likewise.
- There is some room at the start of struct pthread_t_
- to implement the signal semantics in UWIN's posix.dll
- although this is not yet complete.
- * Nmakefile: Compatible with UWIN's Nmake utility.
- * Nmakefile.tests: Likewise - for running the tests.
-
-2001-06-08 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * semaphore.h (sem_t): Fixed for compile and test.
- * implement.h (sem_t_): Likewise.
- * semaphore.c: Likewise.
- * private.c (ptw32_sem_timedwait): Updated to use new
- opaque sem_t.
-
-2001-06-06 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * semaphore.h (sem_t): Is now an opaque pointer;
- moved actual definition to implement.h.
- * implement.h (sem_t_): Move here from semaphore.h;
- was the definition of sem_t.
- * semaphore.c: Wherever necessary, changed use of sem
- from that of a pointer to a pointer-pointer; added
- extra checks for a valid sem_t; NULL sem_t when
- it is destroyed; added extra checks when creating
- and destroying sem_t elements in the NEED_SEM
- code branches; changed from using a pthread_mutex_t
- ((*sem)->mutex) to CRITICAL_SECTION ((*sem)->sem_lock_cs)
- in NEED_SEM branches for access serialisation.
-
-2001-06-06 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * mutex.c (pthread_mutexattr_init): Remove
- ptw32_mutex_default_kind.
-
-2001-06-05 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * nonportable.c (pthread_mutex_setdefaultkind_np):
- Remove - should not have been included in the first place.
- (pthread_mutex_getdefaultkind_np): Likewise.
- * global.c (ptw32_mutex_default_kind): Likewise.
- * mutex.c (pthread_mutex_init): Remove use of
- ptw32_mutex_default_kind.
- * pthread.h (pthread_mutex_setdefaultkind_np): Likewise.
- (pthread_mutex_getdefaultkind_np): Likewise.
- * pthread.def (pthread_mutexattr_setkind_np): Added.
- (pthread_mutexattr_getkind_np): Likewise.
-
- * README: Many changes that should have gone in before
- the last snapshot.
- * README.NONPORTABLE: New - referred to by ANNOUNCE
- but never created; documents the non-portable routines
- included in the library - moved from README with new
- routines added.
- * ANNOUNCE (pthread_mutexattr_setkind_np): Added to
- compliance list.
- (pthread_mutexattr_getkind_np): Likewise.
-
-2001-06-04 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * condvar.c: Add original description of the algorithm as
- developed by Terekhov and Thomas, plus reference to
- README.CV.
-
-2001-06-03 Alexander Terekhov <TEREKHOV at de.ibm.com>, Louis Thomas <lthomas at arbitrade.com>
-
- * condvar.c (pthread_cond_init): Completely revamped.
- (pthread_cond_destroy): Likewise.
- (ptw32_cond_wait_cleanup): Likewise.
- (ptw32_cond_timedwait): Likewise.
- (ptw32_cond_unblock): New general signaling routine.
- (pthread_cond_signal): Now calls ptw32_cond_unblock.
- (pthread_cond_broadcast): Likewise.
- * implement.h (pthread_cond_t_): Revamped.
- * README.CV: New; explanation of the above changes.
-
-2001-05-30 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * pthread.h (rand_r): Fake using _seed argument to quell
- compiler warning (compiler should optimise this away later).
-
- * GNUmakefile (OPT): Leave symbolic information out of the library
- and increase optimisation level - for smaller faster prebuilt
- dlls.
-
-2001-05-29 Milan Gardian <Milan.Gardian at LEIBINGER.com>
-
- * Makefile: fix typo.
- * pthreads.h: Fix problems with stdcall/cdecl conventions, in particular
- remove the need for PT_STDCALL everywhere; remove warning supression.
- * (errno): Fix the longstanding "inconsistent dll linkage" problem
- with errno; now also works with /MD debugging libs -
- warnings emerged when compiling pthreads library with /MD (or /MDd)
- compiler switch, instead of /MT (or /MTd) (i.e. when compiling pthreads
- using Multithreaded DLL CRT instead of Multithreaded statically linked
- CRT).
- * create.c (pthread_create): Likewise; fix typo.
- * private.c (ptw32_threadStart): Eliminate use of terminate() which doesn't
- throw exceptions.
- * Remove unnecessary #includes from a number of modules -
- [I had to #include malloc.h in implement.h for gcc - rpj].
-
-2001-05-29 Thomas Pfaff <tpfaff at gmx.net>
-
- * pthread.h (PTHREAD_MUTEX_DEFAULT): New; equivalent to
- PTHREAD_MUTEX_DEFAULT_NP.
- * (PTHREAD_MUTEX_NORMAL): Similarly.
- * (PTHREAD_MUTEX_ERRORCHECK): Similarly.
- * (PTHREAD_MUTEX_RECURSIVE): Similarly.
- * (pthread_mutex_setdefaultkind_np): New; Linux compatibility stub
- for pthread_mutexattr_settype.
- * (pthread_mutexattr_getkind_np): New; Linux compatibility stub
- for pthread_mutexattr_gettype.
- * mutex.c (pthread_mutexattr_settype): New; allow
- the following types of mutex:
- PTHREAD_MUTEX_DEFAULT_NP
- PTHREAD_MUTEX_NORMAL_NP
- PTHREAD_MUTEX_ERRORCHECK_NP
- PTHREAD_MUTEX_RECURSIVE_NP
- * Note that PTHREAD_MUTEX_DEFAULT is equivalent to
- PTHREAD_MUTEX_NORMAL - ie. mutexes should no longer
- be recursive by default, and a thread will deadlock if it
- tries to relock a mutex it already owns. This is inline with
- other pthreads implementations.
- * (pthread_mutex_lock): Process the lock request
- according to the mutex type.
- * (pthread_mutex_init): Eliminate use of Win32 mutexes as the
- basis of POSIX mutexes - instead, a combination of one critical section
- and one semaphore are used in conjunction with Win32 Interlocked* routines.
- * (pthread_mutex_destroy): Likewise.
- * (pthread_mutex_lock): Likewise.
- * (pthread_mutex_trylock): Likewise.
- * (pthread_mutex_unlock): Likewise.
- * Use longjmp/setjmp to implement cancelation when building the library
- using a C compiler which doesn't support exceptions, e.g. gcc -x c (note
- that gcc -x c++ uses exceptions).
- * Also fixed some of the same typos and eliminated PT_STDCALL as
- Milan Gardian's patches above.
-
-2001-02-07 Alexander Terekhov <TEREKHOV at de.ibm.com>
-
- * rwlock.c: Revamped.
- * implement.h (pthread_rwlock_t_): Redefined.
- This implementation does not have reader/writer starvation problem.
- Rwlock attempts to behave more like a normal mutex with
- races and scheduling policy determining who is more important;
- It also supports recursive locking,
- has less synchronization overhead (no broadcasts at all,
- readers are not blocked on any condition variable) and seem to
- be faster than the current implementation [W98 appears to be
- approximately 15 percent faster at least - on top of speed increase
- from Thomas Pfaff's changes to mutex.c - rpj].
-
-2000-12-29 Ross Johnson <rpj at special.ise.canberra.edu.au>
-
- * Makefile: Back-out "for" loops which don't work.
-
- * GNUmakefile: Remove the fake.a target; add the "realclean"
- target; don't remove built libs under the "clean" target.
-
- * config.h: Add a guard against multiple inclusion.
-
- * semaphore.h: Add some defines from config.h to make
- semaphore.h independent of config.h when building apps.
-
- * pthread.h (_errno): Back-out previous fix until we know how to
- fix it properly.
-
- * implement.h (lockCount): Add missing element to pthread_mutex_t_.
-
- * sync.c (pthread_join): Spelling fix in comment.
-
- * private.c (ptw32_threadStart): Reset original termination
- function (C++).
- (ptw32_threadStart): Cleanup detached threads early in case
- the library is statically linked.
- (ptw32_callUserDestroyRoutines): Remove [SEH] __try block from
- destructor call so that unhandled exceptions will be passed through
- to the system; call terminate() from [C++] try block for the same
- reason.
-
- * tsd.c (pthread_getspecific): Add comment.
-
- * mutex.c (pthread_mutex_init): Initialise new elements in
- pthread_mutex_t.
- (pthread_mutex_unlock): Invert "pthread_equal()" test.
-
-2000-12-28 Ross Johnson <rpj at special.ise.canberra.edu.au>
-
- * semaphore.c (mode_t): Use ifndef HAVE_MODE_T to include definition.
-
- * config.h.in (HAVE_MODE_T): Added.
- (_UWIN): Start adding defines for the UWIN package.
-
- * private.c (ptw32_threadStart): Unhandled exceptions are
- now passed through to the system to deal with. This is consistent
- with normal Windows behaviour. C++ applications may use
- set_terminate() to override the default behaviour which is
- to call ptw32_terminate(). Ptw32_terminate() cleans up some
- POSIX thread stuff before calling the system default function
- which calls abort(). The users termination function should conform
- to standard C++ semantics which is to not return. It should
- exit the thread (call pthread_exit()) or exit the application.
- * private.c (ptw32_terminate): Added as the default set_terminate()
- function. It calls the system default function after cleaning up
- some POSIX thread stuff.
-
- * implement.h (ptw32_try_enter_critical_section): Move
- declaration.
- * global.c (ptw32_try_enter_critical_section): Moved
- from dll.c.
- * dll.c: Move process and thread attach/detach code into
- functions in nonportable.c.
- * nonportable.c (pthread_win32_process_attach_np): Process
- attach code from dll.c is now available to static linked
- applications.
- * nonportable.c (pthread_win32_process_detach_np): Likewise.
- * nonportable.c (pthread_win32_thread_attach_np): Likewise.
- * nonportable.c (pthread_win32_thread_detach_np): Likewise.
-
- * pthread.h: Add new non-portable prototypes for static
- linked applications.
-
- * GNUmakefile (OPT): Increase optimisation flag and remove
- debug info flag.
-
- * pthread.def: Add new non-portable exports for static
- linked applications.
-
-2000-12-11 Ross Johnson <rpj at special.ise.canberra.edu.au>
-
- * FAQ: Update Answer 6 re getting a fully working
- Mingw32 built library.
-
-2000-10-10 Steven Reddie <smr at essemer.com.au>
-
- * misc.c (pthread_self): Restore Win32 "last error"
- cleared by TlsGetValue() call in
- pthread_getspecific()
-
-2000-09-20 Arthur Kantor <akantor at bexusa.com>
-
- * mutex.c (pthread_mutex_lock): Record the owner
- of the mutex. This requires also keeping count of
- recursive locks ourselves rather than leaving it
- to Win32 since we need to know when to NULL the
- thread owner when the mutex is unlocked.
- (pthread_mutex_trylock): Likewise.
- (pthread_mutex_unlock): Check that the calling
- thread owns the mutex, decrement the recursive
- lock count, and NULL the owner if zero. Return
- EPERM if the mutex is owned by another thread.
- * implement.h (pthread_mutex_t_): Add ownerThread
- and lockCount members.
-
-2000-09-13 Jef Gearhart <jgearhart at tpssys.com>
-
- * mutex.c (pthread_mutex_init): Call
- TryEnterCriticalSection through the pointer
- rather than directly so that the dll can load
- on Windows versions that can't resolve the
- function, eg. Windows 95
-
-2000-09-09 Ross Johnson <rpj at special.ise.canberra.edu.au>
-
- * pthread.h (ctime_r): Fix arg.
-
-2000-09-08 Ross Johnson <rpj at special.ise.canberra.edu.au>
-
- * GNUmakefile(_WIN32_WINNT=0x400): Define in CFLAGS;
- doesn't seem to be needed though.
-
- * cancel.c (pthread_cancel): Must get "self" through
- calling pthread_self() which will ensure a POSIX thread
- struct is built for non-POSIX threads; return an error
- if this fails
- - Ollie Leahy <ollie at mpt.ie>
- (pthread_setcancelstate): Likewise.
- (pthread_setcanceltype): Likewise.
- * misc.c (ptw32_cancelable_wait): Likewise.
-
- * private.c (ptw32_tkAssocCreate): Remove unused #if 0
- wrapped code.
-
- * pthread.h (ptw32_get_exception_services_code):
- Needed to be forward declared unconditionally.
-
-2000-09-06 Ross Johnson <rpj at special.ise.canberra.edu.au>
-
- * cancel.c (pthread_cancel): If called from the main
- thread "self" would be NULL; get "self" via pthread_self()
- instead of directly from TLS so that an implicit
- pthread object is created.
-
- * misc.c (pthread_equal): Strengthen test for NULLs.
-
-2000-09-02 Ross Johnson <rpj at special.ise.canberra.edu.au>
-
- * condvar.c (ptw32_cond_wait_cleanup): Ensure that all
- waking threads check if they are the last, and notify
- the broadcaster if so - even if an error occurs in the
- waiter.
-
- * semaphore.c (_decrease_semaphore): Should be
- a call to ptw32_decrease_semaphore.
- (_increase_semaphore): Should be a call to
- ptw32_increase_semaphore.
-
- * misc.c (ptw32_cancelable_wait): Renamed from
- CancelableWait.
- * rwlock.c (_rwlock_check*): Renamed to
- ptw32_rwlock_check*.
- * mutex.c (_mutex_check*): Renamed to ptw32_mutex_check*.
- * condvar.c (cond_timed*): Renamed to ptw32_cond_timed*.
- (_cond_check*): Renamed to ptw32_cond_check*.
- (cond_wait_cleanup*): Rename to ptw32_cond_wait_cleanup*.
- (ptw32_cond_timedwait): Add comments.
-
-2000-08-22 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * private.c (ptw32_throw): Fix exception test;
- move exceptionInformation declaration.
-
- * tsd.c (pthread_key_create): newkey wrongly declared.
-
- * pthread.h: Fix comment block.
-
-2000-08-18 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * mutex.c (pthread_mutex_destroy): Check that the mutex isn't
- held; invalidate the mutex as early as possible to avoid
- contention; not perfect - FIXME!
-
- * rwlock.c (pthread_rwlock_init): Remove redundant assignment
- to "rw".
- (pthread_rwlock_destroy): Invalidate the rwlock before
- freeing up any of it's resources - to avoid contention.
-
- * private.c (ptw32_tkAssocCreate): Change assoc->lock
- to use a dynamically initialised mutex - only consumes
- a W32 mutex or critical section when first used,
- not before.
-
- * mutex.c (pthread_mutex_init): Remove redundant assignment
- to "mx".
- (pthread_mutexattr_destroy): Set attribute to NULL
- before freeing it's memory - to avoid contention.
-
- * implement.h (PTW32_EPS_CANCEL/PTW32_EPS_EXIT):
- Must be defined for all compilers - used as generic
- exception selectors by ptw32_throw().
-
- * Several: Fix typos from scripted edit session
- yesterday.
-
- * nonportable.c (pthread_mutexattr_setforcecs_np):
- Moved this function from mutex.c.
- (pthread_getw32threadhandle_np): New function to
- return the win32 thread handle that the POSIX
- thread is using.
- * mutex.c (pthread_mutexattr_setforcecs_np):
- Moved to new file "nonportable.c".
-
- * pthread.h (PTW32_BUILD): Only redefine __except
- and catch compiler keywords if we aren't building
- the library (ie. PTW32_BUILD is not defined) -
- this is safer than defining and then undefining
- if not building the library.
- * implement.h: Remove __except and catch undefines.
- * Makefile (CFLAGS): Define PTW32_BUILD.
- * GNUmakefile (CFLAGS): Define PTW32_BUILD.
-
- * All appropriate: Change Pthread_exception* to
- ptw32_exception* to be consistent with internal
- identifier naming.
-
- * private.c (ptw32_throw): New function to provide
- a generic exception throw for all internal
- exceptions and EH schemes.
- (ptw32_threadStart): pthread_exit() value is now
- returned via the thread structure exitStatus
- element.
- * exit.c (pthread_exit): pthread_exit() value is now
- returned via the thread structure exitStatus
- element.
- * cancel.c (ptw32_cancel_self): Now uses ptw32_throw.
- (pthread_setcancelstate): Ditto.
- (pthread_setcanceltype): Ditto.
- (pthread_testcancel): Ditto.
- (pthread_cancel): Ditto.
- * misc.c (CancelableWait): Ditto.
- * exit.c (pthread_exit): Ditto.
- * All applicable: Change PTW32_ prefix to
- PTW32_ prefix to remove leading underscores
- from private library identifiers.
-
-2000-08-17 Ross Johnson <rpj at special.ise.canberra.edu.au>
-
- * All applicable: Change _pthread_ prefix to
- ptw32_ prefix to remove leading underscores
- from private library identifiers (single
- and double leading underscores are reserved in the
- ANSI C standard for compiler implementations).
-
- * tsd.c (pthread_create_key): Initialise temporary
- key before returning it's address to avoid race
- conditions.
-
-2000-08-13 Ross Johnson <rpj at special.ise.canberra.edu.au>
-
- * errno.c: Add _MD precompile condition; thus far
- had no effect when using /MD compile option but I
- thnk it should be there.
-
- * exit.c: Add __cplusplus to various #if lines;
- was compiling SEH code even when VC++ had
- C++ compile options.
-
- * private.c: ditto.
-
- * create.c (pthread_create): Add PT_STDCALL macro to
- function pointer arg in _beginthread().
-
- * pthread.h: PT_STDCALL really does need to be defined
- in both this and impliment.h; don't set it to __cdecl
- - this macro is only used to extend function pointer
- casting for functions that will be passed as parameters.
- (~PThreadCleanup): add cast and group expression.
- (_errno): Add _MD compile conditional.
- (PtW32NoCatchWarn): Change pragma message.
-
- * implement.h: Move and change PT_STDCALL define.
-
- * need_errno.h: Add _MD to compilation conditional.
-
- * GNUmakefile: Substantial rewrite for new naming
- convention; set for nil optimisation (turn it up
- when we have a working library build; add target
- "fake.a" to build a libpthreadw32.a from the VC++
- built DLL pthreadVCE.dll.
-
- * pthread.def (LIBRARY): Don't specify in the .def
- file - it is specified on the linker command line
- since we now use the same .def file for variously
- named .dlls.
-
- * Makefile: Substantial rewrite for new naming
- convention; default nmake target only issues a
- help message; run nmake with specific target
- corresponding to the EH scheme being used.
-
- * README: Update information; add naming convention
- explanation.
-
- * ANNOUNCE: Update information.
-
-2000-08-12 Ross Johnson <rpj at special.ise.canberra.edu.au>
-
- * pthread.h: Add compile-time message when using
- MSC_VER compiler and C++ EH to warn application
- programmers to use PtW32Catch instead of catch(...)
- if they want cancelation and pthread_exit to work.
-
- * implement.h: Remove #include <semaphore.h>; we
- use our own local semaphore.h.
-
-2000-08-10 Ross Johnson <rpj at special.ise.canberra.edu.au>
-
- * cleanup.c (pthread_pop_cleanup): Remove _pthread
- prefix from __except and catch keywords; implement.h
- now simply undefines ptw32__except and
- ptw32_catch if defined; VC++ was not textually
- substituting ptw32_catch etc back to catch as
- it was redefined; the reason for using the prefixed
- version was to make it clear that it was not using
- the pthread.h redefined catch keyword.
-
- * private.c (ptw32_threadStart): Ditto.
- (ptw32_callUserDestroyRoutines): Ditto.
-
- * implement.h (ptw32__except): Remove #define.
- (ptw32_catch): Remove #define.
-
- * GNUmakefile (pthread.a): New target to build
- libpthread32.a from pthread.dll using dlltool.
-
- * buildlib.bat: Duplicate cl commands with args to
- build C++ EH version of pthread.dll; use of .bat
- files is redundant now that nmake compatible
- Makefile is included; used as a kludge only now.
-
- * Makefile: Localise some macros and fix up the clean:
- target to extend it and work properly.
-
- * CONTRIBUTORS: Add contributors.
-
- * ANNOUNCE: Updated.
-
- * README: Updated.
-
-2000-08-06 Ross Johnson <rpj at special.ise.canberra.edu.au>
-
- * pthread.h: Remove #warning - VC++ doesn't accept it.
-
-2000-08-05 Ross Johnson <rpj at special.ise.canberra.edu.au>
-
- * pthread.h (PtW32CatchAll): Add macro. When compiling
- applications using VC++ with C++ EH rather than SEH
- 'PtW32CatchAll' must be used in place of any 'catch( ... )'
- if the application wants pthread cancelation or
- pthread_exit() to work.
-
-2000-08-03 Ross Johnson <rpj at special.ise.canberra.edu.au>
-
- * pthread.h: Add a base class ptw32_exception for
- library internal exceptions and change the "catch"
- re-define macro to use it.
-
-2000-08-02 Ross Johnson <rpj at special.ise.canberra.edu.au>
-
- * GNUmakefile (CFLAGS): Add -mthreads.
- Add new targets to generate cpp and asm output.
-
- * sync.c (pthread_join): Remove dead code.
-
-2000-07-25 Tristan Savatier <tristan at mpegtv.com>
-
- * sched.c (sched_get_priority_max): Handle different WinCE and
- Win32 priority values together.
- (sched_get_priority_min): Ditto.
-
-2000-07-25 Ross Johnson <rpj at special.ise.canberra.edu.au>
-
- * create.c (pthread_create): Force new threads to wait until
- pthread_create has the new thread's handle; we also retain
- a local copy of the handle for internal use until
- pthread_create returns.
-
- * private.c (ptw32_threadStart): Initialise ei[].
- (ptw32_threadStart): When beginthread is used to start the
- thread, force waiting until the creator thread had the
- thread handle.
-
- * cancel.c (ptw32_cancel_thread): Include context switch
- code for defined(_X86_) environments in addition to _M_IX86.
-
- * rwlock.c (pthread_rwlock_destroy): Assignment changed
- to avoid compiler warning.
-
- * private.c (ptw32_get_exception_services_code): Cast
- NULL return value to avoid compiler warning.
-
- * cleanup.c (pthread_pop_cleanup): Initialise "cleanup" variable
- to avoid compiler warnings.
-
- * misc.c (ptw32_new): Change "new" variable to "t" to avoid
- confusion with the C++ keyword of the same name.
-
- * condvar.c (cond_wait_cleanup): Initialise lastWaiter variable.
- (cond_timedwait): Remove unused local variables. to avoid
- compiler warnings.
-
- * dll.c (dllMain): Remove 2000-07-21 change - problem
- appears to be in pthread_create().
-
-2000-07-22 Ross Johnson <rpj at special.ise.canberra.edu.au>
-
- * tsd.c (pthread_key_create): If a destructor was given
- and the pthread_mutex_init failed, then would try to
- reference a NULL pointer (*key); eliminate this section of
- code by using a dynamically initialised mutex
- (PTHREAD_MUTEX_INITIALIZER).
-
- * tsd.c (pthread_setspecific): Return an error if
- unable to set the value; simplify cryptic conditional.
-
- * tsd.c (pthread_key_delete): Locking threadsLock relied
- on mutex_lock returning an error if the key has no destructor.
- ThreadsLock is only initialised if the key has a destructor.
- Making this mutex a static could reduce the number of mutexes
- used by an application since it is actually created only at
- first use and it's often destroyed soon after.
-
-2000-07-22 Ross Johnson <rpj at special.ise.canberra.edu.au>
-
- * FAQ: Added Q5 and Q6.
-
-2000-07-21 David Baggett <dmb at itasoftware.com>
-
- * dll.c: Include resource leakage work-around. This is a
- partial FIXME which doesn't stop all leakage. The real
- problem needs to be found and fixed.
-
-2000-07-21 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
-
- * create.c (pthread_create): Set threadH to 0 (zero)
- everywhere. Some assignments were using NULL. Maybe
- it should be NULL everywhere - need to check. (I know
- they are nearly always the same thing - but not by
- definition.)
-
- * misc.c (pthread_self): Try to catch NULL thread handles
- at the point where they might be generated, even though
- they should always be valid at this point.
-
- * tsd.c (pthread_setspecific): return an error value if
- pthread_self() returns NULL.
-
- * sync.c (pthread_join): return an error value if
- pthread_self() returns NULL.
-
- * signal.c (pthread_sigmask): return an error value if
- pthread_self() returns NULL.
-
-2000-03-02 Ross Johnson <rpj at special.ise.canberra.edu.au>
-
- * attr.c (pthread_attr_init): Set default stacksize to zero (0)
- rather than PTHREAD_STACK_MIN even though these are now the same.
-
- * pthread.h (PTHREAD_STACK_MIN): Lowered to 0.
-
-2000-01-28 Ross Johnson <rpj at special.ise.canberra.edu.au>
-
- * mutex.c (pthread_mutex_init): Free mutex if it has been alloced;
- if critical sections can be used instead of Win32 mutexes, test
- that the critical section works and return an error if not.
-
-2000-01-07 Ross Johnson <rpj at special.ise.canberra.edu.au>
-
- * cleanup.c (pthread_pop_cleanup): Include SEH code only if MSC is not
- compiling as C++.
- (pthread_push_cleanup): Include SEH code only if MSC is not
- compiling as C++.
-
- * pthread.h: Include SEH code only if MSC is not
- compiling as C++.
-
- * implement.h: Include SEH code only if MSC is not
- compiling as C++.
-
- * cancel.c (ptw32_cancel_thread): Add _M_IX86 check.
- (pthread_testcancel): Include SEH code only if MSC is not
- compiling as C++.
- (ptw32_cancel_self): Include SEH code only if MSC is not
- compiling as C++.
-
-2000-01-06 Erik Hensema <erik.hensema at group2000.nl>
-
- * Makefile: Remove inconsistencies in 'cl' args
-
-2000-01-04 Ross Johnson <rpj at special.ise.canberra.edu.au>
-
- * private.c (ptw32_get_exception_services_code): New; returns
- value of EXCEPTION_PTW32_SERVICES.
- (ptw32_processInitialize): Remove initialisation of
- ptw32_exception_services which is no longer needed.
-
- * pthread.h (ptw32_exception_services): Remove extern.
- (ptw32_get_exception_services_code): Add function prototype;
- use this to return EXCEPTION_PTW32_SERVICES value instead of
- using the ptw32_exception_services variable which I had
- trouble exporting through pthread.def.
-
- * global.c (ptw32_exception_services): Remove declaration.
-
-1999-11-22 Ross Johnson <rpj at special.ise.canberra.edu.au>
-
- * implement.h: Forward declare ptw32_new();
-
- * misc.c (ptw32_new): New; alloc and initialise a new pthread_t.
- (pthread_self): New thread struct is generated by new routine
- ptw32_new().
-
- * create.c (pthread_create): New thread struct is generated
- by new routine ptw32_new().
-
-1999-11-21 Ross Johnson <rpj at special.ise.canberra.edu.au>
-
- * global.c (ptw32_exception_services): Declare new variable.
-
- * private.c (ptw32_threadStart): Destroy thread's
- cancelLock mutex; make 'catch' and '__except' usageimmune to
- redfinitions in pthread.h.
- (ptw32_processInitialize): Init new constant ptw32_exception_services.
-
- * create.c (pthread_create): Initialise thread's cancelLock
- mutex.
-
- * cleanup.c (pthread_pop_cleanup): Make 'catch' and '__except'
- usage immune to redfinition s in pthread.h.
-
- * private.c: Ditto.
-
- * pthread.h (catch): Redefine 'catch' so that C++ applications
- won't catch our internal exceptions.
- (__except): ditto for __except.
-
- * implement.h (ptw32_catch): Define internal version
- of 'catch' because 'catch' is redefined by pthread.h.
- (__except): ditto for __except.
- (struct pthread_t_): Add cancelLock mutex for async cancel
- safety.
-
-1999-11-21 Jason Nye <jnye at nbnet.nb.ca>, Erik Hensema <erik.hensema at group2000.nl>
-
- * cancel.c (ptw32_cancel_self): New; part of the async
- cancellation implementation.
- (ptw32_cancel_thread): Ditto; this function is X86
- processor specific.
- (pthread_setcancelstate): Add check for pending async
- cancel request and cancel the calling thread if
- required; add async-cancel safety lock.
- (pthread_setcanceltype): Ditto.
-
-1999-11-13 Erik Hensema <erik.hensema at group2000.nl>
-
- * configure.in (AC_OUTPUT): Put generated output into GNUmakefile
- rather than Makefile. Makefile will become the MSC nmake compatible
- version
-
-1999-11-13 John Bossom (John.Bossom@cognos.com>
-
- * misc.c (pthread_self): Add a note about GetCurrentThread
- returning a pseudo-handle
-
-1999-11-10 Todd Owen <towen at lucidcalm.dropbear.id.au>
-
- * dll.c (dllMain): Free kernel32 ASAP.
- If TryEnterCriticalSection is not being used, then free
- the kernel32.dll handle now, rather than leaving it until
- DLL_PROCESS_DETACH.
-
- Note: this is not a pedantic exercise in freeing unused
- resources! It is a work-around for a bug in Windows 95
- (see microsoft knowledge base article, Q187684) which
- does Bad Things when FreeLibrary is called within
- the DLL_PROCESS_DETACH code, in certain situations.
- Since w95 just happens to be a platform which does not
- provide TryEnterCriticalSection, the bug will be
- effortlessly avoided.
-
-1999-11-10 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * sync.c (pthread_join): Make it a deferred cancelation point.
-
- * misc.c (pthread_self): Explicitly initialise implicitly
- created thread state to default values.
-
-1999-11-05 Tristan Savatier <tristan at mpegtv.com>
-
- * pthread.h (winsock.h): Include unconditionally.
- (ETIMEDOUT): Change fallback value to that defined by winsock.h.
-
- * general: Patched for portability to WinCE. The details are
- described in the file WinCE-PORT. Follow the instructions
- in README.WinCE to make the appropriate changes in config.h.
-
-1999-10-30 Erik Hensema <erik.hensema at group2000.nl>
-
- * create.c (pthread_create): Explicitly initialise thread state to
- default values.
-
- * cancel.c (pthread_setcancelstate): Check for NULL 'oldstate'
- for compatibility with Solaris pthreads;
- (pthread_setcanceltype): ditto:
-
-1999-10-23 Erik Hensema <erik.hensema at group2000.nl>
-
- * pthread.h (ctime_r): Fix incorrect argument "_tm"
-
-1999-10-21 Aurelio Medina <aureliom at crt.com>
-
- * pthread.h (_POSIX_THREADS): Only define it if it isn't
- already defined. Projects may need to define this on
- the CC command line under Win32 as it doesn't have unistd.h
-
-1999-10-17 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * rwlock.c (pthread_rwlock_destroy): Add cast to remove compile
- warning.
-
- * condvar.c (pthread_cond_broadcast): Only release semaphores
- if there are waiting threads.
-
-1999-10-15 Lorin Hochstein <lmh at xiphos.ca>, Peter Slacik <Peter.Slacik at tatramed.sk>
-
- * condvar.c (cond_wait_cleanup): New static cleanup handler for
- cond_timedwait;
- (cond_timedwait): pthread_cleanup_push args changed;
- canceling a thread while it's in pthread_cond_wait
- will now decrement the waiters count and cleanup if it's the
- last waiter.
-
-1999-10-15 Graham Dumpleton <Graham.Dumpleton at ra.pad.otc.telstra.com.au>
-
- * condvar.c (cond_wait_cleanup): the last waiter will now reset the CV's
- wasBroadcast flag
-
-Thu Sep 16 1999 Ross Johnson <rpj at swan.canberra.edu.au>
-
- * rwlock.c (pthread_rwlock_destroy): Add serialisation.
- (_rwlock_check_need_init): Check for detroyed rwlock.
- * rwlock.c: Check return codes from _rwlock_check_need_init();
- modify comments; serialise access to rwlock objects during
- operations; rename rw_mutex to rw_lock.
- * implement.h: Rename rw_mutex to rw_lock.
- * mutex.c (pthread_mutex_destroy): Add serialisation.
- (_mutex_check_need_init): Check for detroyed mutex.
- * condvar.c (pthread_cond_destroy): Add serialisation.
- (_cond_check_need_init): Check for detroyed condvar.
- * mutex.c: Modify comments.
- * condvar.c: Modify comments.
-
-1999-08-10 Aurelio Medina <aureliom at crt.com>
-
- * implement.h (pthread_rwlock_t_): Add.
- * pthread.h (pthread_rwlock_t): Add.
- (PTHREAD_RWLOCK_INITIALIZER): Add.
- Add rwlock function prototypes.
- * rwlock.c: New module.
- * pthread.def: Add new rwlock functions.
- * private.c (ptw32_processInitialize): initialise
- ptw32_rwlock_test_init_lock critical section.
- * global.c (ptw32_rwlock_test_init_lock): Add.
-
- * mutex.c (pthread_mutex_destroy): Don't free mutex memory
- if mutex is PTHREAD_MUTEX_INITIALIZER and has not been
- initialised yet.
-
-1999-08-08 Milan Gardian <mg at tatramed.sk>
-
- * mutex.c (pthread_mutex_destroy): Free mutex memory.
-
-1999-08-22 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * exit.c (pthread_exit): Fix reference to potentially
- uninitialised pointer.
-
-1999-08-21 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * private.c (ptw32_threadStart): Apply fix of 1999-08-19
- this time to C++ and non-trapped C versions. Ommitted to
- do this the first time through.
-
-1999-08-19 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * private.c (ptw32_threadStart): Return exit status from
- the application thread startup routine.
- - Milan Gardian <mg at tatramed.sk>
-
-1999-08-18 John Bossom <john.Bossom at cognos.com>
-
- * exit.c (pthread_exit): Put status into pthread_t->exitStatus
- * private.c (ptw32_threadStart): Set pthread->exitStatus
- on exit of try{} block.
- * sync.c (pthread_join): use pthread_exitStatus value if the
- thread exit doesn't return a value (for Mingw32 CRTDLL
- which uses endthread instead of _endthreadex).
-
-Tue Aug 17 20:17:58 CDT 1999 Mumit Khan <khan at xraylith.wisc.edu>
-
- * create.c (pthread_create): Add CRTDLL suppport.
- * exit.c (pthread_exit): Likewise.
- * private.c (ptw32_threadStart): Likewise.
- (ptw32_threadDestroy): Likewise.
- * sync.c (pthread_join): Likewise.
- * tests/join1.c (main): Warn about partial support for CRTDLL.
-
-Tue Aug 17 20:00:08 1999 Mumit Khan <khan at xraylith.wisc.edu>
-
- * Makefile.in (LD): Delete entry point.
- * acconfig.h (STDCALL): Delete unused macro.
- * configure.in: Remove test for STDCALL.
- * config.h.in: Regenerate.
- * errno.c (_errno): Fix self type.
- * pthread.h (PT_STDCALL): Move from here to
- * implement.h (PT_STDCALL): here.
- (ptw32_threadStart): Fix prototype.
- * private.c (ptw32_threadStart): Likewise.
-
-1999-08-14 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * exit.c (pthread_exit): Don't call pthread_self() but
- get thread handle directly from TSD for efficiency.
-
-1999-08-12 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * private.c (ptw32_threadStart): ei[] only declared if _MSC_VER.
-
- * exit.c (pthread_exit): Check for implicitly created threads
- to avoid raising an unhandled exception.
-
-1999-07-12 Peter Slacik <Peter.Slacik at tatramed.sk>
-
- * condvar.c (pthread_cond_destroy): Add critical section.
- (cond_timedwait): Add critical section; check for timeout
- waiting on semaphore.
- (pthread_cond_broadcast): Add critical section.
-
-1999-07-09 Lorin Hochstein <lmh at xiphos.ca>, John Bossom <John.Bossom at Cognos.COM>
-
- The problem was that cleanup handlers were not executed when
- pthread_exit() was called.
-
- * implement.h (pthread_t_): Add exceptionInformation element for
- C++ per-thread exception information.
- (general): Define and rename exceptions.
-
-1999-07-09 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * misc.c (CancelableWait): PTW32_EPS_CANCEL (SEH) and
- ptw32_exception_cancel (C++) used to identify the exception.
-
- * cancel.c (pthread_testcancel): PTW32_EPS_CANCEL (SEH) and
- ptw32_exception_cancel (C++) used to identify the exception.
-
- * exit.c (pthread_exit): throw/raise an exception to return to
- ptw32_threadStart() to exit the thread. PTW32_EPS_EXIT (SEH)
- and ptw32_exception_exit (C++) used to identify the exception.
-
- * private.c (ptw32_threadStart): Add pthread_exit exception trap;
- clean up and exit the thread directly rather than via pthread_exit().
-
-Sun May 30 00:25:02 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * semaphore.h (mode_t): Conditionally typedef it.
-
-Fri May 28 13:33:05 1999 Mark E. Armstrong <avail at pacbell.net>
-
- * condvar.c (pthread_cond_broadcast): Fix possible memory fault
-
-Thu May 27 13:08:46 1999 Peter Slacik <Peter.Slacik at tatramed.sk>
-
- * condvar.c (pthread_cond_broadcast): Fix logic bug
-
-Thu May 27 13:08:46 1999 Bossom, John <John.Bossom at Cognos.COM>
-
- * condvar.c (pthread_cond_broadcast): optimise sem_post loop
-
-Fri May 14 12:13:18 1999 Mike Russo <miker at eai.com>
-
- * attr.c (pthread_attr_setdetachstate): Fix logic bug
-
-Sat May 8 09:42:30 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * pthread.def (sem_open): Add.
- (sem_close): Add.
- (sem_unlink): Add.
- (sem_getvalue): Add.
-
- * FAQ (Question 3): Add.
-
-Thu Apr 8 01:16:23 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * semaphore.c (sem_open): New function; returns an error (ENOSYS).
- (sem_close): ditto.
- (sem_unlink): ditto.
- (sem_getvalue): ditto.
-
- * semaphore.h (_POSIX_SEMAPHORES): define.
-
-Wed Apr 7 14:09:52 1999 Ross Johnson <rpj at swan.canberra.edu.au>
-
- * errno.c (_REENTRANT || _MT): Invert condition.
-
- * pthread.h (_errno): Conditionally include prototype.
-
-Wed Apr 7 09:37:00 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * *.c (comments): Remove individual attributions - these are
- documented sufficiently elsewhere.
-
- * implement.h (pthread.h): Remove extraneous include.
-
-Sun Apr 4 11:05:57 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * sched.c (sched.h): Include.
-
- * sched.h: New file for POSIX 1b scheduling.
-
- * pthread.h: Move opaque structures to implement.h; move sched_*
- prototypes out and into sched.h.
-
- * implement.h: Add opaque structures from pthread.h.
-
- * sched.c (sched_yield): New function.
-
- * condvar.c (ptw32_sem_*): Rename to sem_*; except for
- ptw32_sem_timedwait which is an private function.
-
-Sat Apr 3 23:28:00 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * Makefile.in (OBJS): Add errno.o.
-
-Fri Apr 2 11:08:50 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * implement.h (ptw32_sem_*): Remove prototypes now defined in
- semaphore.h.
-
- * pthread.h (sempahore.h): Include.
-
- * semaphore.h: New file for POSIX 1b semaphores.
-
- * semaphore.c (ptw32_sem_timedwait): Moved to private.c.
-
- * pthread.h (ptw32_sem_t): Change to sem_t.
-
- * private.c (ptw32_sem_timedwait): Moved from semaphore.c;
- set errno on error.
-
- * pthread.h (pthread_t_): Add per-thread errno element.
-
-Fri Apr 2 11:08:50 1999 John Bossom <jebossom at cognos.com>
-
- * semaphore.c (ptw32_sem_*): Change to sem_*; these functions
- will be exported from the library; set errno on error.
-
- * errno.c (_errno): New file. New function.
-
-Fri Mar 26 14:11:45 1999 Tor Lillqvist <tml at iki.fi>
-
- * semaphore.c (ptw32_sem_timedwait): Check for negative
- milliseconds.
-
-Wed Mar 24 11:32:07 1999 John Bossom <jebossom at cognos.com>
-
- * misc.c (CancelableWait): Initialise exceptionInformation[2].
- (pthread_self): Get a real Win32 thread handle for implicit threads.
-
- * cancel.c (pthread_testcancel): Initialise exceptionInformation[2].
-
- * implement.h (SE_INFORMATION): Fix values.
-
- * private.c (ptw32_threadDestroy): Close the thread handle.
-
-Fri Mar 19 12:57:27 1999 Ross Johnson <rpj at swan.canberra.edu.au>
-
- * cancel.c (comments): Update and cleanup.
-
-Fri Mar 19 09:12:59 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * private.c (ptw32_threadStart): status returns PTHREAD_CANCELED.
-
- * pthread.h (PTHREAD_CANCELED): defined.
-
-Tue Mar 16 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * all: Add GNU LGPL and Copyright and Warranty.
-
-Mon Mar 15 00:20:13 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * condvar.c (pthread_cond_init): fix possible uninitialised use
- of cv.
-
-Sun Mar 14 21:01:59 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * condvar.c (pthread_cond_destroy): don't do full cleanup if
- static initialised cv has never been used.
- (cond_timedwait): check result of auto-initialisation.
-
-Thu Mar 11 09:01:48 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * pthread.h (pthread_mutex_t): revert to (pthread_mutex_t *);
- define a value to serve as PTHREAD_MUTEX_INITIALIZER.
- (pthread_mutex_t_): remove staticinit and valid elements.
- (pthread_cond_t): revert to (pthread_cond_t_ *);
- define a value to serve as PTHREAD_COND_INITIALIZER.
- (pthread_cond_t_): remove staticinit and valid elements.
-
- * mutex.c (pthread_mutex_t args): adjust indirection of references.
- (all functions): check for PTHREAD_MUTEX_INITIALIZER value;
- check for NULL (invalid).
-
- * condvar.c (pthread_cond_t args): adjust indirection of references.
- (all functions): check for PTHREAD_COND_INITIALIZER value;
- check for NULL (invalid).
-
-Wed Mar 10 17:18:12 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * misc.c (CancelableWait): Undo changes from Mar 8 and 7.
-
-Mon Mar 8 11:18:59 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * misc.c (CancelableWait): Ensure cancelEvent handle is the lowest
- indexed element in the handles array. Enhance test for abandoned
- objects.
-
- * pthread.h (PTHREAD_MUTEX_INITIALIZER): Trailing elements not
- initialised are set to zero by the compiler. This avoids the
- problem of initialising the opaque critical section element in it.
- (PTHREAD_COND_INITIALIZER): Ditto.
-
- * semaphore.c (ptw32_sem_timedwait): Check sem == NULL earlier.
-
-Sun Mar 7 12:31:14 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * condvar.c (pthread_cond_init): set semaphore initial value
- to 0, not 1. cond_timedwait was returning signaled immediately.
-
- * misc.c (CancelableWait): Place the cancel event handle first
- in the handle table for WaitForMultipleObjects. This ensures that
- the cancel event is recognised and acted apon if both objects
- happen to be signaled together.
-
- * private.c (ptw32_cond_test_init_lock): Initialise and destroy.
-
- * implement.h (ptw32_cond_test_init_lock): Add extern.
-
- * global.c (ptw32_cond_test_init_lock): Add declaration.
-
- * condvar.c (pthread_cond_destroy): check for valid initialised CV;
- flag destroyed CVs as invalid.
- (pthread_cond_init): pthread_cond_t is no longer just a pointer.
- This is because PTHREAD_COND_INITIALIZER needs state info to reside
- in pthread_cond_t so that it can initialise on first use. Will work on
- making pthread_cond_t (and other objects like it) opaque again, if
- possible, later.
- (cond_timedwait): add check for statically initialisation of
- CV; initialise on first use.
- (pthread_cond_signal): check for valid CV.
- (pthread_cond_broadcast): check for valid CV.
- (_cond_check_need_init): Add.
-
- * pthread.h (PTHREAD_COND_INITIALIZER): Fix.
- (pthread_cond_t): no longer a pointer to pthread_cond_t_.
- (pthread_cond_t_): add 'staticinit' and 'valid' elements.
-
-Sat Mar 6 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * implement.h: Undate comments.
-
-Sun Feb 21 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * pthread.h (PTHREAD_MUTEX_INITIALIZER): missing braces around
- cs element initialiser.
-
-1999-02-21 Ben Elliston <bje at cygnus.com>
-
- * pthread.h (pthread_exit): The return type of this function is
- void, not int.
-
- * exit.c (pthread_exit): Do not return 0.
-
-Sat Feb 20 16:03:30 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * dll.c (DLLMain): Expand TryEnterCriticalSection support test.
-
- * mutex.c (pthread_mutex_trylock): The check for
- ptw32_try_enter_critical_section == NULL should have been
- removed long ago.
-
-Fri Feb 19 16:03:30 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * sync.c (pthread_join): Fix pthread_equal() test.
-
- * mutex.c (pthread_mutex_trylock): Check mutex != NULL before
- using it.
-
-Thu Feb 18 16:17:30 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * misc.c (pthread_equal): Fix inverted result.
-
- * Makefile.in: Use libpthread32.a as the name of the DLL export
- library instead of pthread.lib.
-
- * condvar.c (pthread_cond_init): cv could have been used unitialised;
- initialise.
-
- * create.c (pthread_create): parms could have been used unitialised;
- initialise.
-
- * pthread.h (struct pthread_once_t_): Remove redefinition.
-
-Sat Feb 13 03:03:30 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * pthread.h (struct pthread_once_t_): Replaced.
-
- * misc.c (pthread_once): Replace with John Bossom's version;
- has lighter weight serialisation; fixes problem of not holding
- competing threads until after the init_routine completes.
-
-Thu Feb 11 13:34:14 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * misc.c (CancelableWait): Change C++ exception throw.
-
- * sync.c (pthread_join): Change FIXME comment - issue resolved.
-
-Wed Feb 10 12:49:11 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * configure: Various temporary changes.
- - Kevin Ruland <Kevin.Ruland at anheuser-busch.com>
-
- * README: Update.
-
- * pthread.def (pthread_attr_getstackaddr): uncomment
- (pthread_attr_setstackaddr): uncomment
-
-Fri Feb 5 13:42:30 1999 Ross Johnson <rpj at swan.canberra.edu.au>
-
- * semaphore.c: Comment format changes.
-
-Thu Feb 4 10:07:28 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * global.c: Remove ptw32_exception instantiation.
-
- * cancel.c (pthread_testcancel): Change C++ exception throw.
-
- * implement.h: Remove extern declaration.
-
-Wed Feb 3 13:04:44 1999 Ross Johnson <rpj at swan.canberra.edu.au>
-
- * cleanup.c: Rename ptw32_*_cleanup() to pthread_*_cleanup().
-
- * pthread.def: Ditto.
-
- * pthread.h: Ditto.
-
- * pthread.def (pthread_cleanup_push): Remove from export list;
- the function is defined as a macro under all compilers.
- (pthread_cleanup_pop): Ditto.
-
- * pthread.h: Remove #if defined().
-
-Wed Feb 3 10:13:48 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * sync.c (pthread_join): Check for NULL value_ptr arg;
- check for detached threads.
-
-Tue Feb 2 18:07:43 1999 Ross Johnson <rpj at swan.canberra.edu.au>
-
- * implement.h: Add #include <pthread.h>.
- Change sem_t to ptw32_sem_t.
-
-Tue Feb 2 18:07:43 1999 Kevin Ruland <Kevin.Ruland at anheuser-busch.com>
-
- * signal.c (pthread_sigmask): Add and modify casts.
- Reverse LHS/RHS bitwise assignments.
-
- * pthread.h: Remove #include <semaphore.h>.
- (PTW32_ATTR_VALID): Add cast.
- (struct pthread_t_): Add sigmask element.
-
- * dll.c: Add "extern C" for DLLMain.
- (DllMain): Add cast.
-
- * create.c (pthread_create): Set sigmask in thread.
-
- * condvar.c: Remove #include. Change sem_* to ptw32_sem_*.
-
- * attr.c: Changed #include.
-
- * Makefile.in: Additional targets and changes to build the library
- as a DLL.
-
-Fri Jan 29 11:56:28 1999 Ross Johnson <rpj at swan.canberra.edu.au>
-
- * Makefile.in (OBJS): Add semaphore.o to list.
-
- * semaphore.c (ptw32_sem_timedwait): Move from private.c.
- Rename sem_* to ptw32_sem_*.
-
- * pthread.h (pthread_cond_t): Change type of sem_t.
- _POSIX_SEMAPHORES no longer defined.
-
- * semaphore.h: Contents moved to implement.h.
- Removed from source tree.
-
- * implement.h: Add semaphore function prototypes and rename all
- functions to prepend 'ptw32_'. They are
- now private to the pthreads-win32 implementation.
-
- * private.c: Change #warning.
- Move ptw32_sem_timedwait() to semaphore.c.
-
- * cleanup.c: Change #warning.
-
- * misc.c: Remove #include <errno.h>
-
- * pthread.def: Cleanup CVS merge conflicts.
-
- * global.c: Ditto.
-
- * ChangeLog: Ditto.
-
- * cleanup.c: Ditto.
-
-Sun Jan 24 01:34:52 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * semaphore.c (sem_wait): Remove second arg to
- pthreadCancelableWait() call.
-
-Sat Jan 23 17:36:40 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * pthread.def: Add new functions to export list.
-
- * pthread.h (PTHREAD_MUTEX_AUTO_CS_NP): New.
- (PTHREAD_MUTEX_FORCE_CS_NP): New.
-
- * README: Updated.
-
-Fri Jan 22 14:31:59 1999 Ross Johnson <rpj at swan.canberra.edu.au>
-
- * Makefile.in (CFLAGS): Remove -fhandle-exceptions. Not needed
- with egcs. Add -g for debugging.
-
- * create.c (pthread_create): Replace __stdcall with PT_STDCALL
- macro. This is a hack and must be fixed.
-
- * misc.c (CancelableWait): Remove redundant statement.
-
- * mutex.c (pthread_mutexattr_init): Cast calloc return value.
-
- * misc.c (CancelableWait): Add cast.
- (pthread_self): Add cast.
-
- * exit.c (pthread_exit): Add cast.
-
- * condvar.c (pthread_condattr_init): Cast calloc return value.
-
- * cleanup.c: Reorganise conditional compilation.
-
- * attr.c (pthread_attr_init): Remove unused 'result'.
- Cast malloc return value.
-
- * private.c (ptw32_callUserDestroyRoutines): Redo conditional
- compilation.
-
- * misc.c (CancelableWait): C++ version uses 'throw'.
-
- * cancel.c (pthread_testcancel): Ditto.
-
- * implement.h (class ptw32_exception): Define for C++.
-
- * pthread.h: Fix C, C++, and Win32 SEH condition compilation
- mayhem around pthread_cleanup_* defines. C++ version now uses John
- Bossom's cleanup handlers.
- (pthread_attr_t): Make 'valid' unsigned.
- Define '_timeb' as 'timeb' for Ming32.
- Define PT_STDCALL as nothing for Mingw32. May be temporary.
-
- * cancel.c (pthread_testcancel): Cast return value.
-
-Wed Jan 20 09:31:28 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * pthread.h (pthread_mutexattr_t): Changed to a pointer.
-
- * mutex.c (pthread_mutex_init): Conditionally create Win32 mutex
- - from John Bossom's implementation.
- (pthread_mutex_destroy): Conditionally close Win32 mutex
- - from John Bossom's implementation.
- (pthread_mutexattr_init): Replaced by John Bossom's version.
- (pthread_mutexattr_destroy): Ditto.
- (pthread_mutexattr_getpshared): New function from John Bossom's
- implementation.
- (pthread_mutexattr_setpshared): New function from John Bossom's
- implementation.
-
-Tue Jan 19 18:27:42 1999 Ross Johnson <rpj at swan.canberra.edu.au>
-
- * pthread.h (pthreadCancelableTimedWait): New prototype.
- (pthreadCancelableWait): Remove second argument.
-
- * misc.c (CancelableWait): New static function is
- pthreadCancelableWait() renamed.
- (pthreadCancelableWait): Now just calls CancelableWait() with
- INFINITE timeout.
- (pthreadCancelableTimedWait): Just calls CancelableWait()
- with passed in timeout.
-
-Tue Jan 19 18:27:42 1999 Scott Lightner <scott at curriculum.com>
-
- * private.c (ptw32_sem_timedwait): 'abstime' arg really is
- absolute time. Calculate relative time to wait from current
- time before passing timeout to new routine
- pthreadCancelableTimedWait().
-
-Tue Jan 19 10:27:39 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * pthread.h (pthread_mutexattr_setforcecs_np): New prototype.
-
- * mutex.c (pthread_mutexattr_init): Init 'pshared' and 'forcecs'
- attributes to 0.
- (pthread_mutexattr_setforcecs_np): New function (not portable).
-
- * pthread.h (pthread_mutex_t):
- Add 'mutex' element. Set to NULL in PTHREAD_MUTEX_INITIALIZER.
- The pthread_mutex_*() routines will try to optimise performance
- by choosing either mutexes or critical sections as the basis
- for pthread mutexes for each indevidual mutex.
- (pthread_mutexattr_t_): Add 'forcecs' element.
- Some applications may choose to force use of critical sections
- if they know that:-
- the mutex is PROCESS_PRIVATE and,
- either the OS supports TryEnterCriticalSection() or
- pthread_mutex_trylock() will never be called on the mutex.
- This attribute will be setable via a non-portable routine.
-
- Note: We don't yet support PROCESS_SHARED mutexes, so the
- implementation as it stands will default to Win32 mutexes only if
- the OS doesn't support TryEnterCriticalSection. On Win9x, and early
- versions of NT 'forcecs' will need to be set in order to get
- critical section based mutexes.
-
-Sun Jan 17 12:01:26 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * pthread.h (PTHREAD_MUTEX_INITIALIZER): Init new 'staticinit'
- value to '1' and existing 'valid' value to '1'.
-
- * global.c (ptw32_mutex_test_init_lock): Add.
-
- * implement.h (ptw32_mutex_test_init_lock.): Add extern.
-
- * private.c (ptw32_processInitialize): Init critical section for
- global lock used by _mutex_check_need_init().
- (ptw32_processTerminate): Ditto (:s/Init/Destroy/).
-
- * dll.c (dllMain): Move call to FreeLibrary() so that it is only
- called once when the process detaches.
-
- * mutex.c (_mutex_check_need_init): New static function to test
- and init PTHREAD_MUTEX_INITIALIZER mutexes. Provides serialised
- access to the internal state of the uninitialised static mutex.
- Called from pthread_mutex_trylock() and pthread_mutex_lock() which
- do a quick unguarded test to check if _mutex_check_need_init()
- needs to be called. This is safe as the test is conservative
- and is repeated inside the guarded section of
- _mutex_check_need_init(). Thus in all calls except the first
- calls to lock static mutexes, the additional overhead to lock any
- mutex is a single memory fetch and test for zero.
-
- * pthread.h (pthread_mutex_t_): Add 'staticinit' member. Mutexes
- initialised by PTHREAD_MUTEX_INITIALIZER aren't really initialised
- until the first attempt to lock it. Using the 'valid'
- flag (which flags the mutex as destroyed or not) to record this
- information would be messy. It is possible for a statically
- initialised mutex such as this to be destroyed before ever being
- used.
-
- * mutex.c (pthread_mutex_trylock): Call _mutex_check_need_init()
- to test/init PTHREAD_MUTEX_INITIALIZER mutexes.
- (pthread_mutex_lock): Ditto.
- (pthread_mutex_unlock): Add check to ensure we don't try to unlock
- an unitialised static mutex.
- (pthread_mutex_destroy): Add check to ensure we don't try to delete
- a critical section that we never created. Allows us to destroy
- a static mutex that has never been locked (and hence initialised).
- (pthread_mutex_init): Set 'staticinit' flag to 0 for the new mutex.
-
-Sun Jan 17 12:01:26 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * private.c (ptw32_sem_timedwait): Move from semaphore.c.
-
- * semaphore.c : Remove redundant #includes.
- (ptw32_sem_timedwait): Move to private.c.
- (sem_wait): Add missing abstime arg to pthreadCancelableWait() call.
-
-Fri Jan 15 23:38:05 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * condvar.c (cond_timedwait): Remove comment.
-
-Fri Jan 15 15:41:28 1999 Ross Johnson <rpj at swan.canberra.edu.au>
-
- * pthread.h: Add new 'abstime' arg to pthreadCancelableWait()
- prototype.
-
- * condvar.c (cond_timedwait): New generalised function called by
- both pthread_cond_wait() and pthread_cond_timedwait(). This is
- essentially pthread_cond_wait() renamed and modified to add the
- 'abstime' arg and call the new ptw32_sem_timedwait() instead of
- sem_wait().
- (pthread_cond_wait): Now just calls the internal static
- function cond_timedwait() with an INFINITE wait.
- (pthread_cond_timedwait): Now implemented. Calls the internal
- static function cond_timedwait().
-
- * implement.h (ptw32_sem_timedwait): New internal function
- prototype.
-
- * misc.c (pthreadCancelableWait): Added new 'abstime' argument
- to allow shorter than INFINITE wait.
-
- * semaphore.c (ptw32_sem_timedwait): New function for internal
- use. This is essentially sem_wait() modified to add the
- 'abstime' arg and call the modified (see above)
- pthreadCancelableWait().
-
-Thu Jan 14 14:27:13 1999 Ross Johnson <rpj at swan.canberra.edu.au>
-
- * cleanup.c: Correct _cplusplus to __cplusplus wherever used.
-
- * Makefile.in: Add CC=g++ and add -fhandle-exceptions to CFLAGS.
- The derived Makefile will compile all units of the package as C++
- so that those which include try/catch exception handling should work
- properly. The package should compile ok if CC=gcc, however, exception
- handling will not be included and thus thread cancellation, for
- example, will not work.
-
- * cleanup.c (ptw32_pop_cleanup): Add #warning to compile this
- file as C++ if using a cygwin32 environment. Perhaps the whole package
- should be compiled using g++ under cygwin.
-
- * private.c (ptw32_threadStart): Change #error directive
- into #warning and bracket for __CYGWIN__ and derivative compilers.
-
-Wed Jan 13 09:34:52 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * build.bat: Delete old binaries before compiling/linking.
-
-Tue Jan 12 09:58:38 1999 Tor Lillqvist <tml at iki.fi>
-
- * dll.c: The Microsoft compiler pragmas probably are more
- appropriately protected by _MSC_VER than by _WIN32.
-
- * pthread.h: Define ETIMEDOUT. This should be returned by
- pthread_cond_timedwait which is not implemented yet as of
- snapshot-1999-01-04-1305. It was implemented in the older version.
- The Microsoft compiler pragmas probably are more appropriately
- protected by _MSC_VER than by _WIN32.
-
- * pthread.def: pthread_mutex_destroy was missing from the def file
-
- * condvar.c (pthread_cond_broadcast): Ensure we only wait on threads
- if there were any waiting on the condition.
- I think pthread_cond_broadcast should do the WaitForSingleObject
- only if cv->waiters > 0? Otherwise it seems to hang, at least in the
- testg thread program from glib.
-
-Tue Jan 12 09:58:38 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * condvar.c (pthread_cond_timedwait): Fix function description
- comments.
-
- * semaphore.c (sem_post): Correct typo in comment.
-
-Mon Jan 11 20:33:19 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * pthread.h: Re-arrange conditional compile of pthread_cleanup-*
- macros.
-
- * cleanup.c (ptw32_push_cleanup): Provide conditional
- compile of cleanup->prev.
-
-1999-01-11 Tor Lillqvist <tml at iki.fi>
-
- * condvar.c (pthread_cond_init): Invert logic when testing the
- return value from calloc().
-
-Sat Jan 9 14:32:08 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * implement.h: Compile-time switch for CYGWIN derived environments
- to use CreateThread instead of _beginthreadex. Ditto for ExitThread.
- Patch provided by Anders Norlander <anorland at hem2.passagen.se>.
-
-Tue Jan 5 16:33:04 1999 Ross Johnson <rpj at swan.canberra.edu.au>
-
- * cleanup.c (ptw32_pop_cleanup): Add C++ version of __try/__except
- block. Move trailing "}" out of #ifdef _WIN32 block left there by
- (rpj's) mistake.
-
- * private.c: Remove #include <errno.h> which is included by pthread.h.
-
-1998-12-11 Ben Elliston <bje at toilet.to.cygnus.com>
-
- * README: Update info about subscribing to the mailing list.
-
-Mon Jan 4 11:23:40 1999 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * all: No code changes, just cleanup.
- - remove #if 0 /* Pre Bossom */ enclosed code.
- - Remove some redundant #includes.
- * pthread.h: Update implemented/unimplemented routines list.
- * Tag the bossom merge branch getting ready to merge back to main
- trunk.
-
-Tue Dec 29 13:11:16 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * implement.h: Move the following struct definitions to pthread.h:
- pthread_t_, pthread_attr_t_, pthread_mutex_t_, pthread_mutex_t_,
- pthread_mutexattr_t_, pthread_key_t_, pthread_cond_t_,
- pthread_condattr_t_, pthread_once_t_.
-
- * pthread.h: Add "_" prefix to pthread_push_cleanup and
- pthread_pop_cleanup internal routines, and associated struct and
- typedefs.
-
- * buildlib.bat: Add compile command for semaphore.c
-
- * pthread.def: Comment out pthread_atfork routine name.
- Now unimplemented.
-
- * tsd.c (pthread_setspecific): Rename tkAssocCreate to
- ptw32_tkAssocCreate.
- (pthread_key_delete): Rename tkAssocDestroy to
- ptw32_tkAssocDestroy.
-
- * sync.c (pthread_join): Rename threadDestroy to ptw32_threadDestroy
-
- * sched.c (is_attr): attr is now **attr (was *attr), so add extra
- NULL pointer test.
- (pthread_attr_setschedparam): Increase redirection for attr which is
- now a **.
- (pthread_attr_getschedparam): Ditto.
- (pthread_setschedparam): Change thread validation and rename "thread"
- Win32 thread Handle element name to match John Bossom's version.
- (pthread_getschedparam): Ditto.
-
- * private.c (ptw32_threadDestroy): Rename call to
- callUserDestroyRoutines() as ptw32_callUserDestroyRoutines()
-
- * misc.c: Add #include "implement.h".
-
- * dll.c: Remove defined(KLUDGE) wrapped code.
-
- * fork.c: Remove redefinition of ENOMEM.
- Remove pthread_atfork() and fork() with #if 0/#endif.
-
- * create.c (pthread_create): Rename threadStart and threadDestroy calls
- to ptw32_threadStart and ptw32_threadDestroy.
-
- * implement.h: Rename "detachedstate" to "detachstate".
-
- * attr.c: Rename "detachedstate" to "detachstate".
-
-Mon Dec 28 09:54:39 1998 John Bossom
-
- * semaphore.c: Initial version.
- * semaphore.h: Initial version.
-
-Mon Dec 28 09:54:39 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * pthread.h (pthread_attr_t_): Change to *pthread_attr_t.
-
-Mon Dec 28 09:54:39 1998 John Bossom, Ben Elliston
-
- * attr.c (pthread_attr_setstacksize): Merge with John's version.
- (pthread_attr_getstacksize): Merge with John's version.
- (pthread_attr_setstackaddr): Merge with John's version.
- (pthread_attr_getstackaddr): Merge with John's version.
- (pthread_attr_init): Merge with John's version.
- (pthread_attr_destroy): Merge with John's version.
- (pthread_attr_getdetachstate): Merge with John's version.
- (pthread_attr_setdetachstate): Merge with John's version.
- (is_attr): attr is now **attr (was *attr), so add extra NULL pointer
- test.
-
-Mon Dec 28 09:54:39 1998 Ross Johnson
-
- * implement.h (pthread_attr_t_): Add and rename elements in JEB's
- version to correspond to original, so that it can be used with
- original attr routines.
-
- * pthread.h: Add #endif at end which was truncated in merging.
-
-Sun Dec 20 14:51:58 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * misc.c (pthreadCancelableWait): New function by John Bossom. Non-standard
- but provides a hook that can be used to implement cancellation points in
- applications that use this library.
-
- * pthread.h (pthread_cleanup_pop): C++ (non-WIN32) version uses
- try/catch to emulate John Bossom's WIN32 __try/__finally behaviour.
- In the WIN32 version __finally block, add a test for AbnormalTermination otherwise
- cleanup is only run if the cleanup_pop execute arg is non-zero. Cancellation
- should cause the cleanup to run irrespective of the execute arg.
-
- * condvar.c (pthread_condattr_init): Replaced by John Bossom's version.
- (pthread_condattr_destroy): Replaced by John Bossom's version.
- (pthread_condattr_getpshared): Replaced by John Bossom's version.
- (pthread_condattr_setpshared): Replaced by John Bossom's version.
- (pthread_cond_init): Replaced by John Bossom's version.
- Fix comment (refered to mutex rather than condition variable).
- (pthread_cond_destroy): Replaced by John Bossom's version.
- (pthread_cond_wait): Replaced by John Bossom's version.
- (pthread_cond_timedwait): Replaced by John Bossom's version.
- (pthread_cond_signal): Replaced by John Bossom's version.
- (pthread_cond_broadcast): Replaced by John Bossom's version.
-
-Thu Dec 17 19:10:46 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * tsd.c (pthread_key_create): Replaced by John Bossom's version.
- (pthread_key_delete): Replaced by John Bossom's version.
- (pthread_setspecific): Replaced by John Bossom's version.
- (pthread_getspecific): Replaced by John Bossom's version.
-
-Mon Dec 7 09:44:40 1998 John Bossom
-
- * cancel.c (pthread_setcancelstate): Replaced.
- (pthread_setcanceltype): Replaced.
- (pthread_testcancel): Replaced.
- (pthread_cancel): Replaced.
-
- * exit.c (pthread_exit): Replaced.
-
- * misc.c (pthread_self): Replaced.
- (pthread_equal): Replaced.
-
- * sync.c (pthread_detach): Replaced.
- (pthread_join): Replaced.
-
- * create.c (pthread_create): Replaced.
-
- * private.c (ptw32_processInitialize): New.
- (ptw32_processTerminate): New.
- (ptw32_threadStart): New.
- (ptw32_threadDestroy): New.
- (ptw32_cleanupStack): New.
- (ptw32_tkAssocCreate): New.
- (ptw32_tkAssocDestroy): New.
- (ptw32_callUserDestroyRoutines): New.
-
- * implement.h: Added non-API structures and declarations.
-
- * dll.c (PthreadsEntryPoint): Cast return value of GetProcAddress
- to resolve compile warning from MSVC.
-
- * dll.c (DLLmain): Replaced.
- * dll.c (PthreadsEntryPoint):
- Re-applied Anders Norlander's patch:-
- Initialize ptw32_try_enter_critical_section at startup
- and release kernel32 handle when DLL is being unloaded.
-
-Sun Dec 6 21:54:35 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * buildlib.bat: Fix args to CL when building the .DLL
-
- * cleanup.c (ptw32_destructor_run_all): Fix TSD key management.
- This is a tidy-up before TSD and Thread management is completely
- replaced by John Bossom's code.
-
- * tsd.c (pthread_key_create): Fix TSD key management.
-
- * global.c (ptw32_key_virgin_next): Initialise.
-
- * build.bat: New DOS script to compile and link a pthreads app
- using Microsoft's CL compiler linker.
- * buildlib.bat: New DOS script to compile all the object files
- and create pthread.lib and pthread.dll using Microsoft's CL
- compiler linker.
-
-1998-12-05 Anders Norlander <anorland at hem2.passagen.se>
-
- * implement.h (ptw32_try_enter_critical_section): New extern
- * dll.c (ptw32_try_enter_critical_section): New pointer to
- TryEnterCriticalSection if it exists; otherwise NULL.
- * dll.c (PthreadsEntryPoint):
- Initialize ptw32_try_enter_critical_section at startup
- and release kernel32 handle when DLL is being unloaded.
- * mutex.c (pthread_mutex_trylock): Replaced check for NT with
- a check if ptw32_try_enter_critical_section is valid
- pointer to a function. Call ptw32_try_enter_critical_section
- instead of TryEnterCriticalSection to avoid errors on Win95.
-
-Thu Dec 3 13:32:00 1998 Ross Johnson <rpj at ise.canberra.edu.au>
-
- * README: Correct cygwin32 compatibility statement.
-
-Sun Nov 15 21:24:06 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * cleanup.c (ptw32_destructor_run_all): Declare missing void * arg.
- Fixup CVS merge conflicts.
-
-1998-10-30 Ben Elliston <bje at cygnus.com>
-
- * condvar.c (cond_wait): Fix semantic error. Test for equality
- instead of making an assignment.
-
-Fri Oct 30 15:15:50 1998 Ross Johnson <rpj at swan.canberra.edu.au>
-
- * cleanup.c (ptw32_handler_push): Fixed bug appending new
- handler to list reported by Peter Slacik
- <Peter.Slacik at leibinger.freinet.de>.
- (new_thread): Rename poorly named local variable to
- "new_handler".
-
-Sat Oct 24 18:34:59 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * global.c: Add TSD key management array and index declarations.
-
- * implement.h: Ditto for externs.
-
-Fri Oct 23 00:08:09 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * implement.h (PTW32_TSD_KEY_REUSE): Add enum.
-
- * private.c (ptw32_delete_thread): Add call to
- ptw32_destructor_run_all() to clean up the threads keys.
-
- * cleanup.c (ptw32_destructor_run_all): Check for no more dirty
- keys to run destructors on. Assume that the destructor call always
- succeeds and set the key value to NULL.
-
-Thu Oct 22 21:44:44 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * tsd.c (pthread_setspecific): Add key management code.
- (pthread_key_create): Ditto.
- (pthread_key_delete): Ditto.
-
- * implement.h (struct ptw32_tsd_key): Add status member.
-
- * tsd.c: Add description of pthread_key_delete() from the
- standard as a comment.
-
-Fri Oct 16 17:38:47 1998 Ross Johnson <rpj at swan.canberra.edu.au>
-
- * cleanup.c (ptw32_destructor_run_all): Fix and improve
- stepping through the key table.
-
-Thu Oct 15 14:05:01 1998 Ross Johnson <rpj at swan.canberra.edu.au>
-
- * private.c (ptw32_new_thread): Remove init of destructorstack.
- No longer an element of pthread_t.
-
- * tsd.c (pthread_setspecific): Fix type declaration and cast.
- (pthread_getspecific): Ditto.
- (pthread_getspecific): Change error return value to NULL if key
- is not in use.
-
-Thu Oct 15 11:53:21 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * global.c (ptw32_tsd_key_table): Fix declaration.
-
- * implement.h(ptw32_TSD_keys_TlsIndex): Add missing extern.
- (ptw32_tsd_mutex): Ditto.
-
- * create.c (ptw32_start_call): Fix "keys" array declaration.
- Add comment.
-
- * tsd.c (pthread_setspecific): Fix type declaration and cast.
- (pthread_getspecific): Ditto.
-
- * cleanup.c (ptw32_destructor_run_all): Declare missing loop
- counter.
-
-Wed Oct 14 21:09:24 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * private.c (ptw32_new_thread): Increment ptw32_threads_count.
- (ptw32_delete_thread): Decrement ptw32_threads_count.
- Remove some comments.
-
- * exit.c (ptw32_exit): : Fix two pthread_mutex_lock() calls that
- should have been pthread_mutex_unlock() calls.
- (ptw32_vacuum): Remove call to ptw32_destructor_pop_all().
-
- * create.c (pthread_create): Fix two pthread_mutex_lock() calls that
- should have been pthread_mutex_unlock() calls.
-
- * global.c (ptw32_tsd_mutex): Add mutex for TSD operations.
-
- * tsd.c (pthread_key_create): Add critical section.
- (pthread_setspecific): Ditto.
- (pthread_getspecific): Ditto.
- (pthread_key_delete): Ditto.
-
- * sync.c (pthread_join): Fix two pthread_mutex_lock() calls that
- should have been pthread_mutex_unlock() calls.
-
-Mon Oct 12 00:00:44 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * implement.h (ptw32_tsd_key_table): New.
-
- * create.c (ptw32_start_call): Initialise per-thread TSD keys
- to NULL.
-
- * misc.c (pthread_once): Correct typo in comment.
-
- * implement.h (ptw32_destructor_push): Remove.
- (ptw32_destructor_pop): Remove.
- (ptw32_destructor_run_all): Rename from ptw32_destructor_pop_all.
- (PTW32_TSD_KEY_DELETED): Add enum.
- (PTW32_TSD_KEY_INUSE): Add enum.
-
- * cleanup.c (ptw32_destructor_push): Remove.
- (ptw32_destructor_pop): Remove.
- (ptw32_destructor_run_all): Totally revamped TSD.
-
- * dll.c (ptw32_TSD_keys_TlsIndex): Initialise.
-
- * tsd.c (pthread_setspecific): Totally revamped TSD.
- (pthread_getspecific): Ditto.
- (pthread_create): Ditto.
- (pthread_delete): Ditto.
-
-Sun Oct 11 22:44:55 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * global.c (ptw32_tsd_key_table): Add new global.
-
- * implement.h (ptw32_tsd_key_t and struct ptw32_tsd_key):
- Add.
- (struct _pthread): Remove destructorstack.
-
- * cleanup.c (ptw32_destructor_run_all): Rename from
- ptw32_destructor_pop_all. The key destructor stack was made
- global rather than per-thread. No longer removes destructor nodes
- from the stack. Comments updated.
-
-1998-10-06 Ben Elliston <bje at cygnus.com>
-
- * condvar.c (cond_wait): Use POSIX, not Win32 mutex calls.
- (pthread_cond_broadcast): Likewise.
- (pthread_cond_signal): Likewise.
-
-1998-10-05 Ben Elliston <bje at cygnus.com>
-
- * pthread.def: Update. Some functions aren't available yet, others
- are macros in <pthread.h>.
-
- * tests/join.c: Remove; useless.
-
-Mon Oct 5 14:25:08 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * pthread.def: New file for building the DLL.
-
-1998-10-05 Ben Elliston <bje at cygnus.com>
-
- * misc.c (pthread_equal): Correct inverted logic bug.
- (pthread_once): Use the POSIX mutex primitives, not Win32. Remove
- irrelevant FIXME comment.
-
- * global.c (PTHREAD_MUTEX_INITIALIZER): Move to pthread.h.
-
- * pthread.h (PTHREAD_MUTEX_INITIALIZER): Define.
- (pthread_mutex_t): Reimplement as a struct containing a valid
- flag. If the flag is ever down upon entry to a mutex operation,
- we call pthread_mutex_create() to initialise the object. This
- fixes the problem of how to handle statically initialised objects
- that can't call InitializeCriticalSection() due to their context.
- (PTHREAD_ONCE_INIT): Define.
-
- * mutex.c (pthread_mutex_init): Set valid flag.
- (pthread_mutex_destroy): Clear valid flag.
- (pthread_mutex_lock): Check and handle the valid flag.
- (pthread_mutex_unlock): Likewise.
- (pthread_mutex_trylock): Likewise.
-
- * tests/mutex3.c: New file; test for the static initialisation
- macro. Passes.
-
- * tests/create1.c: New file; test pthread_create(). Passes.
-
- * tests/equal.c: Poor test; remove.
-
- * tests/equal1.c New file; test pthread_equal(). Passes.
-
- * tests/once1.c: New file; test for pthread_once(). Passes.
-
- * tests/self.c: Remove; rename to self1.c.
-
- * tests/self1.c: This is the old self.c.
-
- * tests/self2.c: New file. Test pthread_self() with a single
- thread. Passes.
-
- * tests/self3.c: New file. Test pthread_self() with a couple of
- threads to ensure their thread IDs differ. Passes.
-
-1998-10-04 Ben Elliston <bje at cygnus.com>
-
- * tests/mutex2.c: Test pthread_mutex_trylock(). Passes.
-
- * tests/mutex1.c: New basic test for mutex functions (it passes).
- (main): Eliminate warning.
-
- * configure.in: Test for __stdcall, not _stdcall. Typo.
-
- * configure: Regenerate.
-
- * attr.c (pthread_attr_setstackaddr): Remove FIXME comment. Win32
- does know about ENOSYS after all.
- (pthread_attr_setstackaddr): Likewise.
-
-1998-10-03 Ben Elliston <bje at cygnus.com>
-
- * configure.in: Test for the `_stdcall' keyword. Define `STDCALL'
- to `_stdcall' if we have it, null otherwise.
-
- * configure: Regenerate.
-
- * acconfig.h (STDCALL): New define.
-
- * config.h.in: Regenerate.
-
- * create.c (ptw32_start_call): Add STDCALL prefix.
-
- * mutex.c (pthread_mutex_init): Correct function signature.
-
- * attr.c (pthread_attr_init): Only zero out the `sigmask' member
- if we have the sigset_t type.
-
- * pthread.h: No need to include <unistd.h>. It doesn't even exist
- on Win32! Again, an artifact of cross-compilation.
- (pthread_sigmask): Only provide if we have the sigset_t type.
-
- * process.h: Remove. This was a stand-in before we started doing
- native compilation under Win32.
-
- * pthread.h (pthread_mutex_init): Make `attr' argument const.
-
-1998-10-02 Ben Elliston <bje at cygnus.com>
-
- * COPYING: Remove.
-
- * COPYING.LIB: Add. This library is under the LGPL.
-
-1998-09-13 Ben Elliston <bje at cygnus.com>
-
- * configure.in: Test for required system features.
-
- * configure: Generate.
-
- * acconfig.h: New file.
-
- * config.h.in: Generate.
-
- * Makefile.in: Renamed from Makefile.
-
- * COPYING: Import from a recent GNU package.
-
- * config.guess: Likewise.
-
- * config.sub: Likewise.
-
- * install-sh: Likewise.
-
- * config.h: Remove.
-
- * Makefile: Likewise.
-
-1998-09-12 Ben Elliston <bje at cygnus.com>
-
- * windows.h: No longer needed; remove.
-
- * windows.c: Likewise.
-
-Sat Sep 12 20:09:24 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * windows.h: Remove error number definitions. These are in <errno.h>
-
- * tsd.c: Add comment explaining rationale for not building
- POSIX TSD on top of Win32 TLS.
-
-1998-09-12 Ben Elliston <bje at cygnus.com>
-
- * {most}.c: Include <errno.h> to get POSIX error values.
-
- * signal.c (pthread_sigmask): Only provide if HAVE_SIGSET_T is
- defined.
-
- * config.h: #undef features, don't #define them. This will be
- generated by autoconf very soon.
-
-1998-08-11 Ben Elliston <bje at cygnus.com>
-
- * Makefile (LIB): Define.
- (clean): Define target.
- (all): Build a library not just the object files.
-
- * pthread.h: Provide a definition for struct timespec if we don't
- already have one.
-
- * windows.c (TlsGetValue): Bug fix.
-
-Thu Aug 6 15:19:22 1998 Ross Johnson <rpj at swan.canberra.edu.au>
-
- * misc.c (pthread_once): Fix arg 1 of EnterCriticalSection()
- and LeaveCriticalSection() calls to pass address-of lock.
-
- * fork.c (pthread_atfork): Typecast (void (*)(void *)) funcptr
- in each ptw32_handler_push() call.
-
- * exit.c (ptw32_exit): Fix attr arg in
- pthread_attr_getdetachstate() call.
-
- * private.c (ptw32_new_thread): Typecast (HANDLE) NULL.
- (ptw32_delete_thread): Ditto.
-
- * implement.h: (PTW32_MAX_THREADS): Add define. This keeps
- changing in an attempt to make thread administration data types
- opaque and cleanup DLL startup.
-
- * dll.c (PthreadsEntryPoint):
- (ptw32_virgins): Remove malloc() and free() calls.
- (ptw32_reuse): Ditto.
- (ptw32_win32handle_map): Ditto.
- (ptw32_threads_mutex_table): Ditto.
-
- * global.c (_POSIX_THREAD_THREADS_MAX): Initialise with
- PTW32_MAX_THREADS.
- (ptw32_virgins): Ditto.
- (ptw32_reuse): Ditto.
- (ptw32_win32handle_map): Ditto.
- (ptw32_threads_mutex_table): Ditto.
-
- * create.c (pthread_create): Typecast (HANDLE) NULL.
- Typecast (unsigned (*)(void *)) start_routine.
-
- * condvar.c (pthread_cond_init): Add address-of operator & to
- arg 1 of pthread_mutex_init() call.
- (pthread_cond_destroy): Add address-of operator & to
- arg 1 of pthread_mutex_destroy() call.
-
- * cleanup.c (ptw32_destructor_pop_all): Add (int) cast to
- pthread_getspecific() arg.
- (ptw32_destructor_pop): Add (void *) cast to "if" conditional.
- (ptw32_destructor_push): Add (void *) cast to
- ptw32_handler_push() "key" arg.
- (malloc.h): Add include.
-
- * implement.h (ptw32_destructor_pop): Add prototype.
-
- * tsd.c (implement.h): Add include.
-
- * sync.c (pthread_join): Remove target_thread_mutex and it's
- initialisation. Rename getdetachedstate to getdetachstate.
- Remove unused variable "exitcode".
- (pthread_detach): Remove target_thread_mutex and it's
- initialisation. Rename getdetachedstate to getdetachstate.
- Rename setdetachedstate to setdetachstate.
-
- * signal.c (pthread_sigmask): Rename SIG_SET to SIG_SETMASK.
- Cast "set" to (long *) in assignment to passify compiler warning.
- Add address-of operator & to thread->attr.sigmask in memcpy() call
- and assignment.
- (pthread_sigmask): Add address-of operator & to thread->attr.sigmask
- in memcpy() call and assignment.
-
- * windows.h (THREAD_PRIORITY_ERROR_RETURN): Add.
- (THREAD_PRIORITY_LOWEST): Add.
- (THREAD_PRIORITY_HIGHEST): Add.
-
- * sched.c (is_attr): Add function.
- (implement.h): Add include.
- (pthread_setschedparam): Rename all instances of "sched_policy"
- to "sched_priority".
- (pthread_getschedparam): Ditto.
-
-Tue Aug 4 16:57:58 1998 Ross Johnson <rpj at swan.canberra.edu.au>
-
- * private.c (ptw32_delete_thread): Fix typo. Add missing ';'.
-
- * global.c (ptw32_virgins): Change types from pointer to
- array pointer.
- (ptw32_reuse): Ditto.
- (ptw32_win32handle_map): Ditto.
- (ptw32_threads_mutex_table): Ditto.
-
- * implement.h(ptw32_virgins): Change types from pointer to
- array pointer.
- (ptw32_reuse): Ditto.
- (ptw32_win32handle_map): Ditto.
- (ptw32_threads_mutex_table): Ditto.
-
- * private.c (ptw32_delete_thread): Fix "entry" should be "thread".
-
- * misc.c (pthread_self): Add extern for ptw32_threadID_TlsIndex.
-
- * global.c: Add comment.
-
- * misc.c (pthread_once): Fix member -> dereferences.
- Change ptw32_once_flag to once_control->flag in "if" test.
-
-Tue Aug 4 00:09:30 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * implement.h(ptw32_virgins): Add extern.
- (ptw32_virgin_next): Ditto.
- (ptw32_reuse): Ditto.
- (ptw32_reuse_top): Ditto.
- (ptw32_win32handle_map): Ditto.
- (ptw32_threads_mutex_table): Ditto.
-
- * global.c (ptw32_virgins): Changed from array to pointer.
- Storage allocation for the array moved into dll.c.
- (ptw32_reuse): Ditto.
- (ptw32_win32handle_map): Ditto.
- (ptw32_threads_mutex_table): Ditto.
-
- * dll.c (PthreadsEntryPoint): Set up thread admin storage when
- DLL is loaded.
-
- * fork.c (pthread_atfork): Fix function pointer arg to all
- ptw32_handler_push() calls. Change "arg" arg to NULL in child push.
-
- * exit.c: Add windows.h and process.h includes.
- (ptw32_exit): Add local detachstate declaration.
- (ptw32_exit): Fix incorrect name for pthread_attr_getdetachstate().
-
- * pthread.h (_POSIX_THREAD_ATTR_STACKSIZE): Move from global.c
- (_POSIX_THREAD_ATTR_STACKADDR): Ditto.
-
- * create.c (pthread_create): Fix #if should be #ifdef.
- (ptw32_start_call): Remove usused variables.
-
- * process.h: Create.
-
- * windows.h: Move _beginthreadex and _endthreadex into
- process.h
-
-Mon Aug 3 21:19:57 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * condvar.c (pthread_cond_init): Add NULL attr to
- pthread_mutex_init() call - default attributes will be used.
- (cond_wait): Fix typo.
- (cond_wait): Fix typo - cv was ev.
- (pthread_cond_broadcast): Fix two identical typos.
-
- * cleanup.c (ptw32_destructor_pop_all): Remove _ prefix from
- PTHREAD_DESTRUCTOR_ITERATIONS.
-
- * pthread.h: Move _POSIX_* values into posix.h
-
- * pthread.h: Fix typo in pthread_mutex_init() prototype.
-
- * attr.c (pthread_attr_init): Fix error in priority member init.
-
- * windows.h (THREAD_PRIORITY_NORMAL): Add.
-
- * pthread.h (sched_param): Add missing ';' to struct definition.
-
- * attr.c (pthread_attr_init): Remove obsolete pthread_attr_t
- member initialisation - cancelstate, canceltype, cancel_pending.
- (is_attr): Make arg "attr" a const.
-
- * implement.h (PTW32_HANDLER_POP_LIFO): Remove definition.
- (PTW32_HANDLER_POP_FIFO): Ditto.
- (PTW32_VALID): Add missing newline escape (\).
- (ptw32_handler_node): Make element "next" a pointer.
-
-1998-08-02 Ben Elliston <bje at cygnus.com>
-
- * windows.h: Remove duplicate TlsSetValue() prototype. Add
- TlsGetValue() prototype.
- (FALSE): Define.
- (TRUE): Likewise.
- Add forgotten errno values. Guard against multiple #includes.
-
- * windows.c: New file. Implement stubs for Win32 functions.
-
- * Makefile (SRCS): Remove. Not explicitly needed.
- (CFLAGS): Add -Wall for all warnings with GCC.
-
-Sun Aug 2 19:03:42 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * config.h: Create. This is a temporary stand-in for autoconf yet
- to be done.
- (HAVE_SIGNAL_H): Add.
-
- * pthread.h: Minor rearrangement for temporary config.h.
-
-Fri Jul 31 14:00:29 1998 Ross Johnson <rpj at swan.canberra.edu.au>
-
- * cleanup.c (ptw32_destructor_pop): Implement. Removes
- destructors associated with a key without executing them.
- (ptw32_destructor_pop_all): Add FIXME comment.
-
- * tsd.c (pthread_key_delete): Add call to ptw32_destructor_pop().
-
-Fri Jul 31 00:05:45 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * tsd.c (pthread_key_create): Update to properly associate
- the destructor routine with the key.
- (pthread_key_delete): Add FIXME comment.
-
- * exit.c (ptw32_vacuum): Add call to
- ptw32_destructor_pop_all().
-
- * implement.h (ptw32_handler_pop_all): Add prototype.
- (ptw32_destructor_pop_all): Ditto.
-
- * cleanup.c (ptw32_destructor_push): Implement. This is just a
- call to ptw32_handler_push().
- (ptw32_destructor_pop_all): Implement. This is significantly
- different to ptw32_handler_pop_all().
-
- * Makefile (SRCS): Create. Preliminary.
-
- * windows.h: Create. Contains Win32 definitions for compile
- testing. This is just a standin for the real one.
-
- * pthread.h (SIG_UNBLOCK): Fix typo. Was SIG_BLOCK.
- (windows.h): Add include. Required for CRITICAL_SECTION.
- (pthread_cond_t): Move enum declaration outside of struct
- definition.
- (unistd.h): Add include - may be temporary.
-
- * condvar.c (windows.h): Add include.
-
- * implement.h (PTW32_THIS): Remove - no longer required.
- (PTW32_STACK): Use pthread_self() instead of PTW32_THIS.
-
-Thu Jul 30 23:12:45 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * implement.h: Remove ptw32_find_entry() prototype.
-
- * private.c: Extend comments.
- Remove ptw32_find_entry() - no longer needed.
-
- * create.c (ptw32_start_call): Add call to TlsSetValue() to
- store the thread ID.
-
- * dll.c (PthreadsEntryPoint): Implement. This is called
- whenever a process loads the DLL. Used to initialise thread
- local storage.
-
- * implement.h: Add ptw32_threadID_TlsIndex.
- Add ()s around PTW32_VALID expression.
-
- * misc.c (pthread_self): Re-implement using Win32 TLS to store
- the threads own ID.
-
-Wed Jul 29 11:39:03 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * private.c: Corrections in comments.
- (ptw32_new_thread): Alter "if" flow to be more natural.
-
- * cleanup.c (ptw32_handler_push): Same as below.
-
- * create.c (pthread_create): Same as below.
-
- * private.c (ptw32_new_thread): Rename "new" to "new_thread".
- Since when has a C programmer been required to know C++?
-
-Tue Jul 28 14:04:29 1998 Ross Johnson <rpj at swan.canberra.edu.au>
-
- * implement.h: Add PTW32_VALID macro.
-
- * sync.c (pthread_join): Modify to use the new thread
- type and ptw32_delete_thread(). Rename "target" to "thread".
- Remove extra local variable "target".
- (pthread_detach): Ditto.
-
- * signal.c (pthread_sigmask): Move init of "us" out of inner block.
- Fix instance of "this" should have been "us". Rename "us" to "thread".
-
- * sched.c (pthread_setschedparam): Modify to use the new thread
- type.
- (pthread_getschedparam): Ditto.
-
- * private.c (ptw32_find_thread): Fix return type and arg.
-
- * implement.h: Remove PTW32_YES and PTW32_NO.
- (ptw32_new_thread): Add prototype.
- (ptw32_find_thread): Ditto.
- (ptw32_delete_thread): Ditto.
- (ptw32_new_thread_entry): Remove prototype.
- (ptw32_find_thread_entry): Ditto.
- (ptw32_delete_thread_entry): Ditto.
- ( PTW32_NEW, PTW32_INUSE, PTW32_EXITED, PTW32_REUSE):
- Add.
-
-
- * create.c (pthread_create): Minor rename "us" to "new" (I need
- these cues but it doesn't stop me coming out with some major bugs
- at times).
- Load start_routine and arg into the thread so the wrapper can
- call it.
-
- * exit.c (pthread_exit): Fix pthread_this should be pthread_self.
-
- * cancel.c (pthread_setcancelstate): Change
- ptw32_threads_thread_t * to pthread_t and init with
- pthread_this().
- (pthread_setcanceltype): Ditto.
-
- * exit.c (ptw32_exit): Add new pthread_t arg.
- Rename ptw32_delete_thread_entry to ptw32_delete_thread.
- Rename "us" to "thread".
- (pthread_exit): Call ptw32_exit with added thread arg.
-
- * create.c (ptw32_start_call): Insert missing ")".
- Add "us" arg to ptw32_exit() call.
- (pthread_create): Modify to use new thread allocation scheme.
-
- * private.c: Added detailed explanation of the new thread
- allocation scheme.
- (ptw32_new_thread): Totally rewritten to use
- new thread allocation scheme.
- (ptw32_delete_thread): Ditto.
- (ptw32_find_thread): Obsolete.
-
-Mon Jul 27 17:46:37 1998 Ross Johnson <rpj at swan.canberra.edu.au>
-
- * create.c (pthread_create): Start of rewrite. Not completed yet.
-
- * private.c (ptw32_new_thread_entry): Start of rewrite. Not
- complete.
-
- * implement.h (ptw32_threads_thread): Rename, remove thread
- member, add win32handle and ptstatus members.
- (ptw32_t): Add.
-
- * pthread.h: pthread_t is no longer mapped directly to a Win32
- HANDLE type. This is so we can let the Win32 thread terminate and
- reuse the HANDLE while pthreads holds it's own thread ID until
- the last waiting join exits.
-
-Mon Jul 27 00:20:37 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * private.c (ptw32_delete_thread_entry): Destroy the thread
- entry attribute object before deleting the thread entry itself.
-
- * attr.c (pthread_attr_init): Initialise cancel_pending = FALSE.
- (pthread_attr_setdetachstate): Rename "detached" to "detachedstate".
- (pthread_attr_getdetachstate): Ditto.
-
- * exit.c (ptw32_exit): Fix incorrect check for detachedstate.
-
- * implement.h (ptw32_call_t): Remove env member.
-
-Sun Jul 26 13:06:12 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * implement.h (ptw32_new_thread_entry): Fix prototype.
- (ptw32_find_thread_entry): Ditto.
- (ptw32_delete_thread_entry): Ditto.
- (ptw32_exit): Add prototype.
-
- * exit.c (ptw32_exit): New function. Called from pthread_exit()
- and ptw32_start_call() to exit the thread. It allows an extra
- argument which is the return code passed to _endthreadex().
- (ptw32_exit): Move thread entry delete call from ptw32_vacuum()
- into here. Add more explanation of thread entry deletion.
- (ptw32_exit): Clarify comment.
-
- * create.c (ptw32_start_call): Change pthread_exit() call to
- ptw32_exit() call.
-
- * exit.c (ptw32_vacuum): Add thread entry deletion code
- moved from ptw32_start_call(). See next item.
- (pthread_exit): Remove longjmp(). Add mutex lock around thread table
- manipulation code. This routine now calls _enthreadex().
-
- * create.c (ptw32_start_call): Remove setjmp() call and move
- cleanup code out. Call pthread_exit(NULL) to terminate the thread.
-
-1998-07-26 Ben Elliston <bje at cygnus.com>
-
- * tsd.c (pthread_getspecific): Update comments.
-
- * mutex.c (pthread_mutexattr_setpshared): Not supported; remove.
- (pthread_mutexattr_getpshared): Likewise.
-
- * pthread.h (pthread_mutexattr_setpshared): Remove prototype.
- (pthread_mutexattr_getpshared): Likewise.
-
-Sun Jul 26 00:09:59 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * sync.c: Rename all instances of ptw32_count_mutex to
- ptw32_table_mutex.
-
- * implement.h: Rename ptw32_count_mutex to
- ptw32_table_mutex.
-
- * global.c: Rename ptw32_count_mutex to
- ptw32_table_mutex.
-
- * create.c (pthread_create): Add critical sections.
- (ptw32_start_call): Rename ptw32_count_mutex to
- ptw32_table_mutex.
-
- * cancel.c (pthread_setcancelstate): Fix indirection bug and rename
- "this" to "us".
-
- * signal.c (pthread_sigmask): Rename "this" to "us" and fix some
- minor syntax errors. Declare "us" and initialise it.
-
- * sync.c (pthread_detach): Rename "this" to "target".
-
- * pthread.h: Converting PTHREAD_* defines to alias the (const int)
- values in global.c.
-
- * global.c: Started converting PTHREAD_* defines to (const int) as
- a part of making the eventual pthreads DLL binary compatible
- through version changes.
-
- * condvar.c (cond_wait): Add cancelation point. This applies the
- point to both pthread_cond_wait() and pthread_cond_timedwait().
-
- * exit.c (pthread_exit): Rename "this" to "us".
-
- * implement.h: Add comment.
-
- * sync.c (pthread_join): I've satisfied myself that pthread_detach()
- does set the detached attribute in the thread entry attributes
- to PTHREAD_CREATE_DETACHED. "if" conditions were changed to test
- that attribute instead of a separate flag.
-
- * create.c (pthread_create): Rename "this" to "us".
- (pthread_create): cancelstate and canceltype are not attributes
- so the copy to thread entry attribute storage was removed.
- Only the thread itself can change it's cancelstate or canceltype,
- ie. the thread must exist already.
-
- * private.c (ptw32_delete_thread_entry): Mutex locks removed.
- Mutexes must be applied at the caller level.
- (ptw32_new_thread_entry): Ditto.
- (ptw32_new_thread_entry): Init cancelstate, canceltype, and
- cancel_pending to default values.
- (ptw32_new_thread_entry): Rename "this" to "new".
- (ptw32_find_thread_entry): Rename "this" to "entry".
- (ptw32_delete_thread_entry): Rename "thread_entry" to "entry".
-
- * create.c (ptw32_start_call): Mutexes changed to
- ptw32_count_mutex. All access to the threads table entries is
- under the one mutex. Otherwise chaos reigns.
-
-Sat Jul 25 23:16:51 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * implement.h (ptw32_threads_thread): Move cancelstate and
- canceltype members out of pthread_attr_t into here.
-
- * fork.c (fork): Add comment.
-
-1998-07-25 Ben Elliston <bje at cygnus.com>
-
- * fork.c (fork): Autoconfiscate.
-
-Sat Jul 25 00:00:13 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * create.c (ptw32_start_call): Set thread priority. Ensure our
- thread entry is removed from the thread table but only if
- pthread_detach() was called and there are no waiting joins.
- (pthread_create): Set detach flag in thread entry if the
- thread is created PTHREAD_CREATE_DETACHED.
-
- * pthread.h (pthread_attr_t): Rename member "detachedstate".
-
- * attr.c (pthread_attr_init): Rename attr members.
-
- * exit.c (pthread_exit): Fix indirection mistake.
-
- * implement.h (PTW32_THREADS_TABLE_INDEX): Add.
-
- * exit.c (ptw32_vacuum): Fix incorrect args to
- ptw32_handler_pop_all() calls.
- Make thread entry removal conditional.
-
- * sync.c (pthread_join): Add multiple join and async detach handling.
-
- * implement.h (PTW32_THREADS_TABLE_INDEX): Add.
-
- * global.c (ptw32_threads_mutex_table): Add.
-
- * implement.h (ptw32_once_flag): Remove.
- (ptw32_once_lock): Ditto.
- (ptw32_threads_mutex_table): Add.
-
- * global.c (ptw32_once_flag): Remove.
- (ptw32_once_lock): Ditto.
-
- * sync.c (pthread_join): Fix tests involving new return value
- from ptw32_find_thread_entry().
- (pthread_detach): Ditto.
-
- * private.c (ptw32_find_thread_entry): Failure return code
- changed from -1 to NULL.
-
-Fri Jul 24 23:09:33 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * create.c (pthread_create): Change . to -> in sigmask memcpy() args.
-
- * pthread.h: (pthread_cancel): Add function prototype.
- (pthread_testcancel): Ditto.
-
-1998-07-24 Ben Elliston <bje at cygnus.com>
-
- * pthread.h (pthread_condattr_t): Rename dummy structure member.
- (pthread_mutexattr_t): Likewise.
-
-Fri Jul 24 21:13:55 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * cancel.c (pthread_cancel): Implement.
- (pthread_testcancel): Implement.
-
- * exit.c (pthread_exit): Add comment explaining the longjmp().
-
- * implement.h (ptw32_threads_thread_t): New member cancelthread.
- (PTW32_YES): Define.
- (PTW32_NO): Define.
- (RND_SIZEOF): Remove.
-
- * create.c (pthread_create): Rename cancelability to cancelstate.
-
- * pthread.h (pthread_attr_t): Rename cancelability to cancelstate.
- (PTHREAD_CANCELED): Define.
-
-1998-07-24 Ben Elliston <bje at cygnus.com>
-
- * pthread.h (SIG_BLOCK): Define if not already defined.
- (SIG_UNBLOCK): Likewise.
- (SIG_SETMASK): Likewise.
- (pthread_attr_t): Add signal mask member.
- (pthread_sigmask): Add function prototype.
-
- * signal.c (pthread_sigmask): Implement.
-
- * create.c: #include <string.h> to get a prototype for memcpy().
- (pthread_create): New threads inherit their creator's signal
- mask. Copy the signal mask to the new thread structure if we know
- about signals.
-
-Fri Jul 24 16:33:17 1998 Ross Johnson <rpj at swan.canberra.edu.au>
-
- * fork.c (pthread_atfork): Add all the necessary push calls.
- Local implementation semantics:
- If we get an ENOMEM at any time then ALL handlers
- (including those from previous pthread_atfork() calls) will be
- popped off each of the three atfork stacks before we return.
- (fork): Add all the necessary pop calls. Add the thread cancellation
- and join calls to the child fork.
- Add #includes.
-
- * implement.h: (ptw32_handler_push): Fix return type and stack arg
- type in prototype.
- (ptw32_handler_pop): Fix stack arg type in prototype.
- (ptw32_handler_pop_all): Fix stack arg type in prototype.
-
- * cleanup.c (ptw32_handler_push): Change return type to int and
- return ENOMEM if malloc() fails.
-
- * sync.c (pthread_detach): Use equality test, not assignment.
-
- * create.c (ptw32_start_call): Add call to Win32 CloseHandle()
- if thread is detached.
-
-1998-07-24 Ben Elliston <bje at cygnus.com>
-
- * sync.c (pthread_detach): Close the Win32 thread handle to
- emulate detached (or daemon) threads.
-
-Fri Jul 24 03:00:25 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * sync.c (pthread_join): Save valueptr arg in joinvalueptr for
- pthread_exit() to use.
-
- * private.c (ptw32_new_thread_entry): Initialise joinvalueptr to
- NULL.
-
- * create.c (ptw32_start_call): Rewrite to facilitate joins.
- pthread_exit() will do a longjmp() back to here. Does appropriate
- cleanup and exit/return from the thread.
- (pthread_create): _beginthreadex() now passes a pointer to our
- thread table entry instead of just the call member of that entry.
-
- * implement.h (ptw32_threads_thread): New member
- void ** joinvalueptr.
- (ptw32_call_t): New member jmpbuf env.
-
- * exit.c (pthread_exit): Major rewrite to handle joins and handing
- value pointer to joining thread. Uses longjmp() back to
- ptw32_start_call().
-
- * create.c (pthread_create): Ensure values of new attribute members
- are copied to the thread attribute object.
-
- * attr.c (pthread_attr_destroy): Fix merge conflicts.
- (pthread_attr_getdetachstate): Fix merge conflicts.
- (pthread_attr_setdetachstate): Fix merge conflicts.
-
- * pthread.h: Fix merge conflicts.
-
- * sync.c (pthread_join): Fix merge conflicts.
-
-Fri Jul 24 00:21:21 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * sync.c (pthread_join): Add check for valid and joinable
- thread.
- (pthread_detach): Implement. After checking for a valid and joinable
- thread, it's still a no-op.
-
- * private.c (ptw32_find_thread_entry): Bug prevented returning
- an error value in some cases.
-
- * attr.c (pthread_attr_setdetachedstate): Implement.
- (pthread_attr_getdetachedstate): Implement.
-
- * implement.h: Move more hidden definitions into here from
- pthread.h.
-
-1998-07-24 Ben Elliston <bje at cygnus.com>
-
- * pthread.h (PTHREAD_CREATE_JOINABLE): Define.
- (PTHREAD_CREATE_DETACHED): Likewise.
- (pthread_attr_t): Add new structure member `detached'.
- (pthread_attr_getdetachstate): Add function prototype.
- (pthread_attr_setdetachstate): Likewise.
-
- * sync.c (pthread_join): Return if the target thread is detached.
-
- * attr.c (pthread_attr_init): Initialise cancelability and
- canceltype structure members.
- (pthread_attr_getdetachstate): Implement.
- (pthread_attr_setdetachstate): Likewise.
-
- * implement.h (PTW32_CANCEL_DEFAULTS): Remove. Bit fields
- proved to be too cumbersome. Set the defaults in attr.c using the
- public PTHREAD_CANCEL_* constants.
-
- * cancel.c: New file.
-
- * pthread.h (sched_param): Define this type.
- (pthread_attr_getschedparam): Add function prototype.
- (pthread_attr_setschedparam): Likewise.
- (pthread_setcancelstate): Likewise.
- (pthread_setcanceltype): Likewise.
- (sched_get_priority_min): Likewise.
- (sched_get_priority_max): Likewise.
- (pthread_mutexattr_setprotocol): Remove; not supported.
- (pthread_mutexattr_getprotocol): Likewise.
- (pthread_mutexattr_setprioceiling): Likewise.
- (pthread_mutexattr_getprioceiling): Likewise.
- (pthread_attr_t): Add canceltype member. Update comments.
- (SCHED_OTHER): Define this scheduling policy constant.
- (SCHED_FIFO): Likewise.
- (SCHED_RR): Likewise.
- (SCHED_MIN): Define the lowest possible value for this constant.
- (SCHED_MAX): Likewise, the maximum possible value.
- (PTHREAD_CANCEL_ASYNCHRONOUS): Redefine.
- (PTHREAD_CANCEL_DEFERRED): Likewise.
-
- * sched.c: New file.
- (pthread_setschedparam): Implement.
- (pthread_getschedparam): Implement.
- (sched_get_priority_max): Validate policy argument.
- (sched_get_priority_min): Likewise.
-
- * mutex.c (pthread_mutexattr_setprotocol): Remove; not supported.
- (pthread_mutexattr_getprotocol): Likewise.
- (pthread_mutexattr_setprioceiling): Likewise.
- (pthread_mutexattr_getprioceiling): Likewise.
-
-Fri Jul 24 00:21:21 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * create.c (pthread_create): Arg to ptw32_new_thread_entry()
- changed. See next entry. Move mutex locks out. Changes made yesterday
- and today allow us to start the new thread running rather than
- temporarily suspended.
-
- * private.c (ptw32_new_thread_entry): ptw32_thread_table
- was changed back to a table of thread structures rather than pointers.
- As such we're trading storage for increaded speed. This routine
- was modified to work with the new table. Mutex lock put in around
- global data accesses.
- (ptw32_find_thread_entry): Ditto
- (ptw32_delete_thread_entry): Ditto
-
-Thu Jul 23 23:25:30 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * global.c: New. Global data objects declared here. These moved from
- pthread.h.
-
- * pthread.h: Move implementation hidden definitions into
- implement.h.
-
- * implement.h: Move implementation hidden definitions from
- pthread.h. Add constants to index into the different handler stacks.
-
- * cleanup.c (ptw32_handler_push): Simplify args. Restructure.
- (ptw32_handler_pop): Simplify args. Restructure.
- (ptw32_handler_pop_all): Simplify args. Restructure.
-
-Wed Jul 22 00:16:22 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * attr.c, implement.h, pthread.h, ChangeLog: Resolve CVS merge
- conflicts.
-
- * private.c (ptw32_find_thread_entry): Changes to return type
- to support leaner ptw32_threads_table[] which now only stores
- ptw32_thread_thread_t *.
- (ptw32_new_thread_entry): Internal changes.
- (ptw32_delete_thread_entry): Internal changes to avoid contention.
- Calling routines changed accordingly.
-
- * pthread.h: Modified cleanup macros to use new generic push and pop.
- Added destructor and atfork stacks to ptw32_threads_thread_t.
-
- * cleanup.c (ptw32_handler_push, ptw32_handler_pop,
- ptw32_handler_pop_all): Renamed cleanup push and pop routines
- and made generic to handle destructors and atfork handlers as
- well.
-
- * create.c (ptw32_start_call): New function is a wrapper for
- all new threads. It allows us to do some cleanup when the thread
- returns, ie. that is otherwise only done if the thread is cancelled.
-
- * exit.c (ptw32_vacuum): New function contains code from
- pthread_exit() that we need in the new ptw32_start_call()
- as well.
-
- * implement.h: Various additions and minor changes.
-
- * pthread.h: Various additions and minor changes.
- Change cleanup handler macros to use generic handler push and pop
- functions.
-
- * attr.c: Minor mods to all functions.
- (is_attr): Implemented missing function.
-
- * create.c (pthread_create): More clean up.
-
- * private.c (ptw32_find_thread_entry): Implement.
- (ptw32_delete_thread_entry): Implement.
- (ptw32_new_thread_entry): Implement.
- These functions manipulate the implementations internal thread
- table and are part of general code cleanup and modularisation.
- They replace ptw32_getthreadindex() which was removed.
-
- * exit.c (pthread_exit): Changed to use the new code above.
-
- * pthread.h: Add cancelability constants. Update comments.
-
-1998-07-22 Ben Elliston <bje at cygnus.com>
-
- * attr.c (pthread_setstacksize): Update test of attr argument.
- (pthread_getstacksize): Likewise.
- (pthread_setstackaddr): Likewise.
- (pthread_getstackaddr): Likewise.
- (pthread_attr_init): No need to allocate any storage.
- (pthread_attr_destroy): No need to free any storage.
-
- * mutex.c (is_attr): Not likely to be needed; remove.
- (remove_attr): Likewise.
- (insert_attr): Likewise.
-
- * implement.h (ptw32_mutexattr_t): Moved to a public definition
- in pthread.h. There was little gain in hiding these details.
- (ptw32_condattr_t): Likewise.
- (ptw32_attr_t): Likewise.
-
- * pthread.h (pthread_atfork): Add function prototype.
- (pthread_attr_t): Moved here from implement.h.
-
- * fork.c (pthread_atfork): Preliminary implementation.
- (ptw32_fork): Likewise.
-
-Wed Jul 22 00:16:22 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * cleanup.c (ptw32_cleanup_push): Implement.
- (ptw32_cleanup_pop): Implement.
- (ptw32_do_cancellation): Implement.
- These are private to the implementation. The real cleanup functions
- are macros. See below.
-
- * pthread.h (pthread_cleanup_push): Implement as a macro.
- (pthread_cleanup_pop): Implement as a macro.
- Because these are macros which start and end a block, the POSIX scoping
- requirement is observed. See the comment in the file.
-
- * exit.c (pthread_exit): Refine the code.
-
- * create.c (pthread_create): Code cleanup.
-
- * implement.h (RND_SIZEOF): Add RND_SIZEOF(T) to round sizeof(T)
- up to multiple of DWORD.
- Add function prototypes.
-
- * private.c (ptw32_getthreadindex): "*thread" should have been
- "thread". Detect empty slot fail condition.
-
-1998-07-20 Ben Elliston <bje at cygnus.com>
-
- * misc.c (pthread_once): Implement. Don't use a per-application
- flag and mutex--make `pthread_once_t' contain these elements in
- their structure. The earlier version had incorrect semantics.
-
- * pthread.h (ptw32_once_flag): Add new variable. Remove.
- (ptw32_once_lock): Add new mutex lock to ensure integrity of
- access to ptw32_once_flag. Remove.
- (pthread_once): Add function prototype.
- (pthread_once_t): Define this type.
-
-Mon Jul 20 02:31:05 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * private.c (ptw32_getthreadindex): Implement.
-
- * pthread.h: Add application static data dependent on
- _PTHREADS_BUILD_DLL define. This is needed to avoid allocating
- non-sharable static data within the pthread DLL.
-
- * implement.h: Add ptw32_cleanup_stack_t, ptw32_cleanup_node_t
- and PTW32_HASH_INDEX.
-
- * exit.c (pthread_exit): Begin work on cleanup and de-allocate
- thread-private storage.
-
- * create.c (pthread_create): Add thread to thread table.
- Keep a thread-private copy of the attributes with default values
- filled in when necessary. Same for the cleanup stack. Make
- pthread_create C run-time library friendly by using _beginthreadex()
- instead of CreateThread(). Fix error returns.
-
-Sun Jul 19 16:26:23 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * implement.h: Rename pthreads_thread_count to ptw32_threads_count.
- Create ptw32_threads_thread_t struct to keep thread specific data.
-
- * create.c: Rename pthreads_thread_count to ptw32_threads_count.
- (pthread_create): Handle errors from CreateThread().
-
-1998-07-19 Ben Elliston <bje at cygnus.com>
-
- * condvar.c (pthread_cond_wait): Generalise. Moved from here ..
- (cond_wait): To here.
- (pthread_cond_timedwait): Implement; use generalised cond_wait().
-
- * pthread.h (pthread_key_t): Define this type.
- (pthread_key_create): Add function prototype.
- (pthread_setspecific): Likewise.
- (pthread_getspecific): Likwise.
- (pthread_key_delete): Likewise.
-
- * tsd.c (pthread_key_create): Implement.
- (pthread_setspecific): Likewise.
- (pthread_getspecific): Likewise.
- (pthread_key_delete): Likewise.
-
- * mutex.c (pthread_mutex_trylock): Return ENOSYS if this function
- is called on a Win32 platform which is not Windows NT.
-
-1998-07-18 Ben Elliston <bje at cygnus.com>
-
- * condvar.c (pthread_condattr_init): Do not attempt to malloc any
- storage; none is needed now that condattr_t is an empty struct.
- (pthread_condattr_destory): Likewise; do not free storage.
- (pthread_condattr_setpshared): No longer supported; return ENOSYS.
- (pthread_condattr_getpshared): Likewise.
- (pthread_cond_init): Implement with help from Douglas Schmidt.
- Remember to initialise the cv's internal mutex.
- (pthread_cond_wait): Likewise.
- (pthread_cond_signal): Likewise.
- (pthread_cond_broadcast): Likewise.
- (pthread_cond_timedwait): Preliminary implementation, but I need
- to see some API documentation for `WaitForMultipleObject'.
- (pthread_destory): Implement.
-
- * pthread.h (pthread_cond_init): Add function protoype.
- (pthread_cond_broadcast): Likewise.
- (pthread_cond_signal): Likewise.
- (pthread_cond_timedwait): Likewise.
- (pthread_cond_wait): Likewise.
- (pthread_cond_destroy): Likewise.
- (pthread_cond_t): Define this type. Fix for u_int. Do not assume
- that the mutex contained withing the pthread_cond_t structure will
- be a critical section. Use our new POSIX type!
-
- * implement.h (ptw32_condattr_t): Remove shared attribute.
-
-1998-07-17 Ben Elliston <bje at cygnus.com>
-
- * pthread.h (PTHREADS_PROCESS_PRIVATE): Remove.
- (PTHREAD_PROCESS_SHARED): Likewise. No support for mutexes shared
- across processes for now.
- (pthread_mutex_t): Use a Win32 CRITICAL_SECTION type for better
- performance.
-
- * implement.h (ptw32_mutexattr_t): Remove shared attribute.
-
- * mutex.c (pthread_mutexattr_setpshared): This optional function
- is no longer supported, since we want to implement POSIX mutex
- variables using the much more efficient Win32 critical section
- primitives. Critical section objects in Win32 cannot be shared
- between processes.
- (pthread_mutexattr_getpshared): Likewise.
- (pthread_mutexattr_init): No need to malloc any storage; the
- attributes structure is now empty.
- (pthread_mutexattr_destroy): This is now a nop.
- (pthread_mutex_init): Use InitializeCriticalSection().
- (pthread_mutex_destroy): Use DeleteCriticalSection().
- (pthread_mutex_lock): Use EnterCriticalSection().
- (pthread_mutex_trylock): Use TryEnterCriticalSection(). This is
- not supported by Windows 9x, but trylock is a hack anyway, IMHO.
- (pthread_mutex_unlock): Use LeaveCriticalSection().
-
-1998-07-14 Ben Elliston <bje at cygnus.com>
-
- * attr.c (pthread_attr_setstacksize): Implement.
- (pthread_attr_getstacksize): Likewise.
- (pthread_attr_setstackaddr): Likewise.
- (pthread_attr_getstackaddr): Likewise.
- (pthread_attr_init): Likewise.
- (pthread_attr_destroy): Likewise.
-
- * condvar.c (pthread_condattr_init): Add `_cond' to function name.
-
- * mutex.c (pthread_mutex_lock): Add `_mutex' to function name.
- (pthread_mutex_trylock): Likewise.
- (pthread_mutex_unlock): Likewise.
-
- * pthread.h (pthread_condattr_setpshared): Fix typo.
- (pthread_attr_init): Add function prototype.
- (pthread_attr_destroy): Likewise.
- (pthread_attr_setstacksize): Likewise.
- (pthread_attr_getstacksize): Likewise.
- (pthread_attr_setstackaddr): Likewise.
- (pthread_attr_getstackaddr): Likewise.
-
-Mon Jul 13 01:09:55 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * implement.h: Wrap in #ifndef _IMPLEMENT_H
-
- * create.c (pthread_create): Map stacksize attr to Win32.
-
- * mutex.c: Include implement.h
-
-1998-07-13 Ben Elliston <bje at cygnus.com>
-
- * condvar.c (pthread_condattr_init): Implement.
- (pthread_condattr_destroy): Likewise.
- (pthread_condattr_setpshared): Likewise.
- (pthread_condattr_getpshared): Likewise.
-
- * implement.h (PTHREAD_THREADS_MAX): Remove trailing semicolon.
- (PTHREAD_STACK_MIN): Specify; needs confirming.
- (ptw32_attr_t): Define this type.
- (ptw32_condattr_t): Likewise.
-
- * pthread.h (pthread_mutex_t): Define this type.
- (pthread_condattr_t): Likewise.
- (pthread_mutex_destroy): Add function prototype.
- (pthread_lock): Likewise.
- (pthread_trylock): Likewise.
- (pthread_unlock): Likewise.
- (pthread_condattr_init): Likewise.
- (pthread_condattr_destroy): Likewise.
- (pthread_condattr_setpshared): Likewise.
- (pthread_condattr_getpshared): Likewise.
-
- * mutex.c (pthread_mutex_init): Implement.
- (pthread_mutex_destroy): Likewise.
- (pthread_lock): Likewise.
- (pthread_trylock): Likewise.
- (pthread_unlock): Likewise.
-
-1998-07-12 Ben Elliston <bje at cygnus.com>
-
- * implement.h (ptw32_mutexattr_t): Define this implementation
- internal type. Application programmers only see a mutex attribute
- object as a void pointer.
-
- * pthread.h (pthread_mutexattr_t): Define this type.
- (pthread_mutexattr_init): Add function prototype.
- (pthread_mutexattr_destroy): Likewise.
- (pthread_mutexattr_setpshared): Likewise.
- (pthread_mutexattr_getpshared): Likewise.
- (pthread_mutexattr_setprotocol): Likewise.
- (pthread_mutexattr_getprotocol): Likewise.
- (pthread_mutexattr_setprioceiling): Likewise.
- (pthread_mutexattr_getprioceiling): Likewise.
- (PTHREAD_PROCESS_PRIVATE): Define.
- (PTHREAD_PROCESS_SHARED): Define.
-
- * mutex.c (pthread_mutexattr_init): Implement.
- (pthread_mutexattr_destroy): Implement.
- (pthread_mutexattr_setprotocol): Implement.
- (pthread_mutexattr_getprotocol): Likewise.
- (pthread_mutexattr_setprioceiling): Likewise.
- (pthread_mutexattr_getprioceiling): Likewise.
- (pthread_mutexattr_setpshared): Likewise.
- (pthread_mutexattr_getpshared): Likewise.
- (insert_attr): New function; very preliminary implementation!
- (is_attr): Likewise.
- (remove_attr): Likewise.
-
-Sat Jul 11 14:48:54 1998 Ross Johnson <rpj at ixobrychus.canberra.edu.au>
-
- * implement.h: Preliminary implementation specific defines.
-
- * create.c (pthread_create): Preliminary implementation.
-
-1998-07-11 Ben Elliston <bje at cygnus.com>
-
- * sync.c (pthread_join): Implement.
-
- * misc.c (pthread_equal): Likewise.
-
- * pthread.h (pthread_join): Add function prototype.
- (pthread_equal): Likewise.
-
-1998-07-10 Ben Elliston <bje at cygnus.com>
-
- * misc.c (pthread_self): Implement.
-
- * exit.c (pthread_exit): Implement.
-
- * pthread.h (pthread_exit): Add function prototype.
- (pthread_self): Likewise.
- (pthread_t): Define this type.
-
-1998-07-09 Ben Elliston <bje at cygnus.com>
-
- * create.c (pthread_create): A dummy stub right now.
-
- * pthread.h (pthread_create): Add function prototype.
diff --git a/libs/pthreads/docs/FAQ b/libs/pthreads/docs/FAQ
deleted file mode 100644
index cb1786c5ae..0000000000
--- a/libs/pthreads/docs/FAQ
+++ /dev/null
@@ -1,451 +0,0 @@
- =========================================
- PTHREADS-WIN32 Frequently Asked Questions
- =========================================
-
-INDEX
------
-
-Q 1 What is it?
-
-Q 2 Which of the several dll versions do I use?
- or,
- What are all these pthread*.dll and pthread*.lib files?
-
-Q 3 What is the library naming convention?
-
-Q 4 Cleanup code default style or: it used to work when I built
- the library myself, but now it doesn't - why?
-
-Q 5 Why is the default library version now less exception-friendly?
-
-Q 6 Should I use Cygwin or Mingw32 as a development environment?
-
-Q 7 Now that pthreads-win32 builds under Mingw32, why do I get
- memory access violations (segfaults)?
-
-Q 8 How do I use pthread.dll for Win32 (Visual C++ 5.0)
-
-Q 9 Cancelation doesn't work for me, why?
-
-Q 10 How do I generate pthreadGCE.dll and libpthreadw32.a for use
- with Mingw32?
-
-Q 11 Why isn't pthread_t defined as a scalar (e.g. pointer or int)
- like it is for other POSIX threads implementations?
-
-=============================================================================
-
-Q 1 What is it?
----
-
-Pthreads-win32 is an Open Source Software implementation of the
-Threads component of the POSIX 1003.1c 1995 Standard for Microsoft's
-Win32 environment. Some functions from POSIX 1003.1b are also
-supported including semaphores. Other related functions include
-the set of read-write lock functions. The library also supports
-some of the functionality of the Open Group's Single Unix
-specification, version 2, namely mutex types.
-
-See the file "ANNOUNCE" for more information including standards
-conformance details and list of supported routines.
-
-
-------------------------------------------------------------------------------
-
-Q 2 Which of the several dll versions do I use?
---- or,
- What are all these pthread*.dll and pthread*.lib files?
-
-Simply, you only use one of them, but you need to choose carefully.
-
-The most important choice you need to make is whether to use a
-version that uses exceptions internally, or not (there are versions
-of the library that use exceptions as part of the thread
-cancelation and cleanup implementation, and one that uses
-setjmp/longjmp instead).
-
-There is some contension amongst POSIX threads experts as
-to how POSIX threads cancelation and exit should work
-with languages that include exceptions and handlers, e.g.
-C++ and even C (Microsoft's Structured Exceptions).
-
-The issue is: should cancelation of a thread in, say,
-a C++ application cause object destructors and C++ exception
-handlers to be invoked as the stack unwinds during thread
-exit, or not?
-
-There seems to be more opinion in favour of using the
-standard C version of the library (no EH) with C++ applications
-since this appears to be the assumption commercial pthreads
-implementations make. Therefore, if you use an EH version
-of pthreads-win32 then you may be under the illusion that
-your application will be portable, when in fact it is likely to
-behave very differently linked with other pthreads libraries.
-
-Now you may be asking: why have you kept the EH versions of
-the library?
-
-There are a couple of reasons:
-- there is division amongst the experts and so the code may
- be needed in the future. (Yes, it's in the repository and we
- can get it out anytime in the future, but ...)
-- pthreads-win32 is one of the few implementations, and possibly
- the only freely available one, that has EH versions. It may be
- useful to people who want to play with or study application
- behaviour under these conditions.
-
-
-------------------------------------------------------------------------------
-
-Q 3 What is the library naming convention?
----
-
-Because the library is being built using various exception
-handling schemes and compilers - and because the library
-may not work reliably if these are mixed in an application,
-each different version of the library has it's own name.
-
-Note 1: the incompatibility is really between EH implementations
-of the different compilers. It should be possible to use the
-standard C version from either compiler with C++ applications
-built with a different compiler. If you use an EH version of
-the library, then you must use the same compiler for the
-application. This is another complication and dependency that
-can be avoided by using only the standard C library version.
-
-Note 2: if you use a standard C pthread*.dll with a C++
-application, then any functions that you define that are
-intended to be called via pthread_cleanup_push() must be
-__cdecl.
-
-Note 3: the intention is to also name either the VC or GC
-version (it should be arbitrary) as pthread.dll, including
-pthread.lib and libpthread.a as appropriate.
-
-In general:
- pthread[VG]{SE,CE,C}.dll
- pthread[VG]{SE,CE,C}.lib
-
-where:
- [VG] indicates the compiler
- V - MS VC
- G - GNU C
-
- {SE,CE,C} indicates the exception handling scheme
- SE - Structured EH
- CE - C++ EH
- C - no exceptions - uses setjmp/longjmp
-
-For example:
- pthreadVSE.dll (MSVC/SEH)
- pthreadGCE.dll (GNUC/C++ EH)
- pthreadGC.dll (GNUC/not dependent on exceptions)
-
-The GNU library archive file names have changed to:
-
- libpthreadGCE.a
- libpthreadGC.a
-
-
-------------------------------------------------------------------------------
-
-Q 4 Cleanup code default style or: it used to work when I built
---- the library myself, but now it doesn't - why?
-
-Up to and including snapshot 2001-07-12, if not defined, the cleanup
-style was determined automatically from the compiler used, and one
-of the following was defined accordingly:
-
- __CLEANUP_SEH MSVC only
- __CLEANUP_CXX C++, including MSVC++, GNU G++
- __CLEANUP_C C, including GNU GCC, not MSVC
-
-These defines determine the style of cleanup (see pthread.h) and,
-most importantly, the way that cancelation and thread exit (via
-pthread_exit) is performed (see the routine ptw32_throw() in private.c).
-
-In short, the exceptions versions of the library throw an exception
-when a thread is canceled or exits (via pthread_exit()), which is
-caught by a handler in the thread startup routine, so that the
-the correct stack unwinding occurs regardless of where the thread
-is when it's canceled or exits via pthread_exit().
-
-After snapshot 2001-07-12, unless your build explicitly defines (e.g.
-via a compiler option) __CLEANUP_SEH, __CLEANUP_CXX, or __CLEANUP_C, then
-the build now ALWAYS defaults to __CLEANUP_C style cleanup. This style
-uses setjmp/longjmp in the cancelation and pthread_exit implementations,
-and therefore won't do stack unwinding even when linked to applications
-that have it (e.g. C++ apps). This is for consistency with most/all
-commercial Unix POSIX threads implementations.
-
-Although it was not clearly documented before, it is still necessary to
-build your application using the same __CLEANUP_* define as was
-used for the version of the library that you link with, so that the
-correct parts of pthread.h are included. That is, the possible
-defines require the following library versions:
-
- __CLEANUP_SEH pthreadVSE.dll
- __CLEANUP_CXX pthreadVCE.dll or pthreadGCE.dll
- __CLEANUP_C pthreadVC.dll or pthreadGC.dll
-
-THE POINT OF ALL THIS IS: if you have not been defining one of these
-explicitly, then the defaults have been set according to the compiler
-and language you are using, as described at the top of this
-section.
-
-THIS NOW CHANGES, as has been explained above. For example:
-
-If you were building your application with MSVC++ i.e. using C++
-exceptions (rather than SEH) and not explicitly defining one of
-__CLEANUP_*, then __CLEANUP_C++ was defined for you in pthread.h.
-You should have been linking with pthreadVCE.dll, which does
-stack unwinding.
-
-If you now build your application as you had before, pthread.h will now
-set __CLEANUP_C as the default style, and you will need to link
-with pthreadVC.dll. Stack unwinding will now NOT occur when a
-thread is canceled, nor when the thread calls pthread_exit().
-
-Your application will now most likely behave differently to previous
-versions, and in non-obvious ways. Most likely is that local
-objects may not be destroyed or cleaned up after a thread
-is canceled.
-
-If you want the same behaviour as before, then you must now define
-__CLEANUP_C++ explicitly using a compiler option and link with
-pthreadVCE.dll as you did before.
-
-
-------------------------------------------------------------------------------
-
-Q 5 Why is the default library version now less exception-friendly?
----
-
-Because most commercial Unix POSIX threads implementations don't allow you to
-choose to have stack unwinding. (Compaq's TRU64 Unix is possibly an exception.)
-
-Therefore, providing it in pthread-win32 as a default could be dangerous
-and non-portable. We still provide the choice but you must now consciously
-make it.
-
-WHY NOT REMOVE THE EXCEPTIONS VERSIONS OF THE LIBRARY ALTOGETHER?
-There are a few reasons:
-- because there are well respected POSIX threads people who believe
- that POSIX threads implementations should be exceptions-aware and
- do the expected thing in that context. (There are equally respected
- people who believe it should not be easily accessible, if it's there
- at all.)
-- because pthreads-win32 is one of the few implementations that has
- the choice, perhaps the only freely available one, and so offers
- a laboratory to people who may want to explore the effects;
-- although the code will always be around somewhere for anyone who
- wants it, once it's removed from the current version it will not be
- nearly as visible to people who may have a use for it.
-
-
-------------------------------------------------------------------------------
-
-Q 6 Should I use Cygwin or Mingw32 as a development environment?
----
-
-Important: see Q7 also.
-
-Use Mingw32 with the MSVCRT library to build applications that use
-the pthreads DLL.
-
-Cygwin's own internal support for POSIX threads is growing.
-Consult that project's documentation for more information.
-
-------------------------------------------------------------------------------
-
-Q 7 Now that pthreads-win32 builds under Mingw32, why do I get
---- memory access violations (segfaults)?
-
-The latest Mingw32 package has thread-safe exception handling (see Q10).
-Also, see Q6 above.
-
-------------------------------------------------------------------------------
-
-Q 8 How do I use pthread.dll for Win32 (Visual C++ 5.0)
----
-
->
-> I'm a "rookie" when it comes to your pthread implementation. I'm currently
-> desperately trying to install the prebuilt .dll file into my MSVC compiler.
-> Could you please provide me with explicit instructions on how to do this (or
-> direct me to a resource(s) where I can acquire such information)?
->
-> Thank you,
->
-
-You should have a .dll, .lib, .def, and three .h files. It is recommended
-that you use pthreadVC.dll, rather than pthreadVCE.dll or pthreadVSE.dll
-(see Q2 above).
-
-The .dll can go in any directory listed in your PATH environment
-variable, so putting it into C:\WINDOWS should work.
-
-The .lib file can go in any directory listed in your LIB environment
-variable.
-
-The .h files can go in any directory listed in your INCLUDE
-environment variable.
-
-Or you might prefer to put the .lib and .h files into a new directory
-and add its path to LIB and INCLUDE. You can probably do this easiest
-by editing the file:-
-
-C:\Program Files\DevStudio\vc\bin\vcvars32.bat
-
-The .def file isn't used by anything in the pre-compiled version but
-is included for information.
-
-Cheers.
-Ross
-
-------------------------------------------------------------------------------
-
-Q 9 Cancelation doesn't work for me, why?
----
-
-> I'm investigating a problem regarding thread cancelation. The thread I want
-> to cancel has PTHREAD_CANCEL_ASYNCHRONOUS, however, this piece of code
-> blocks on the join():
->
-> if ((retv = Pthread_cancel( recvThread )) == 0)
-> {
-> retv = Pthread_join( recvThread, 0 );
-> }
->
-> Pthread_* are just macro's; they call pthread_*.
->
-> The thread recvThread seems to block on a select() call. It doesn't get
-> cancelled.
->
-> Two questions:
->
-> 1) is this normal behaviour?
->
-> 2) if not, how does the cancel mechanism work? I'm not very familliar to
-> win32 programming, so I don't really understand how the *Event() family of
-> calls work.
-
-The answer to your first question is, normal POSIX behaviour would
-be to asynchronously cancel the thread. However, even that doesn't
-guarantee cancelation as the standard only says it should be
-cancelled as soon as possible.
-
-Snapshot 99-11-02 or earlier only partially supports asynchronous cancellation.
-Snapshots since then simulate async cancelation by poking the address of
-a cancelation routine into the PC of the threads context. This requires
-the thread to be resumed in some way for the cancelation to actually
-proceed. This is not true async cancelation, but it is as close as we've
-been able to get to it.
-
-If the thread you're trying to cancel is blocked (for instance, it could be
-waiting for data from the network), it will only get cancelled when it unblocks
-(when the data arrives). For true pre-emptive cancelation in these cases,
-pthreads-win32 from snapshot 2004-05-16 can automatically recognise and use the
-QueueUserAPCEx package by Panagiotis E. Hadjidoukas. This package is available
-from the pthreads-win32 ftp site and is included in the pthreads-win32
-self-unpacking zip from 2004-05-16 onwards.
-
-Using deferred cancelation would normally be the way to go, however,
-even though the POSIX threads standard lists a number of C library
-functions that are defined as deferred cancelation points, there is
-no hookup between those which are provided by Windows and the
-pthreads-win32 library.
-
-Incidently, it's worth noting for code portability that the older POSIX
-threads standards cancelation point lists didn't include "select" because
-(as I read in Butenhof) it wasn't part of POSIX. However, it does appear in
-the SUSV3.
-
-Effectively, the only mandatory cancelation points that pthreads-win32
-recognises are those the library implements itself, ie.
-
- pthread_testcancel
- pthread_cond_wait
- pthread_cond_timedwait
- pthread_join
- sem_wait
- sem_timedwait
- pthread_delay_np
-
-The following routines from the non-mandatory list in SUSV3 are
-cancelation points in pthreads-win32:
-
- pthread_rwlock_wrlock
- pthread_rwlock_timedwrlock
-
-The following routines from the non-mandatory list in SUSV3 are not
-cancelation points in pthreads-win32:
-
- pthread_rwlock_rdlock
- pthread_rwlock_timedrdlock
-
-Pthreads-win32 also provides two functions that allow you to create
-cancelation points within your application, but only for cases where
-a thread is going to block on a Win32 handle. These are:
-
- pthreadCancelableWait(HANDLE waitHandle) /* Infinite wait */
-
- pthreadCancelableTimedWait(HANDLE waitHandle, DWORD timeout)
-
-------------------------------------------------------------------------------
-
-
-Q 10 How do I create thread-safe applications using
----- pthreadGCE.dll, libpthreadw32.a and Mingw32?
-
-This should not be a problem with recent versions of MinGW32.
-
-For early versions, see Thomas Pfaff's email at:
-http://sources.redhat.com/ml/pthreads-win32/2002/msg00000.html
-------------------------------------------------------------------------------
-
-Q 11 Why isn't pthread_t defined as a scalar (e.g. pointer or int)
- like it is for other POSIX threads implementations?
-----
-
-Originally pthread_t was defined as a pointer (to the opaque pthread_t_
-struct) and later it was changed to a struct containing the original
-pointer plus a sequence counter. This is allowed under both the original
-POSIX Threads Standard and the current Single Unix Specification.
-
-When pthread_t is a simple pointer to a struct some very difficult to
-debug problems arise from the process of freeing and later allocing
-thread structs because new pthread_t handles can acquire the identity of
-previously detached threads. The change to a struct was made, along with
-some changes to their internal managment, in order to guarantee (for
-practical applications) that the pthread_t handle will be unique over the
-life of the running process.
-
-Where application code attempts to compare one pthread_t against another
-directly, a compiler error will be emitted because structs can't be
-compared at that level. This should signal a potentially serious problem
-in the code design, which would go undetected if pthread_t was a scalar.
-
-The POSIX Threading API provides a function named pthread_equal() to
-compare pthread_t thread handles.
-
-Other pthreads implementations, such as Sun's, use an int as the handle
-but do guarantee uniqueness within the process scope. Win32 scalar typed
-thread handles also guarantee uniqueness in system scope. It wasn't clear
-how well the internal management of these handles would scale as the
-number of threads and the fragmentation of the sequence numbering
-increased for applications where thousands or millions of threads are
-created and detached over time. The current management of threads within
-pthreads-win32 using structs for pthread_t, and reusing without ever
-freeing them, reduces the management time overheads to a constant, which
-could be important given that pthreads-win32 threads are built on top of
-Win32 threads and will therefore include that management overhead on top
-of their own. The cost is that the memory resources used for thread
-handles will remain at the peak level until the process exits.
-
-While it may be inconvenient for developers to be forced away from making
-assumptions about the internals of pthread_t, the advantage for the
-future development of pthread-win32, as well as those applications that
-use it and other pthread implementations, is that the library is free to
-change pthread_t internals and management as better methods arise.
-
diff --git a/libs/pthreads/docs/GNUmakefile b/libs/pthreads/docs/GNUmakefile
deleted file mode 100644
index e489f002ec..0000000000
--- a/libs/pthreads/docs/GNUmakefile
+++ /dev/null
@@ -1,593 +0,0 @@
-#
-# --------------------------------------------------------------------------
-#
-# Pthreads-win32 - POSIX Threads Library for Win32
-# Copyright(C) 1998 John E. Bossom
-# Copyright(C) 1999,2005 Pthreads-win32 contributors
-#
-# Contact Email: rpj@callisto.canberra.edu.au
-#
-# The current list of contributors is contained
-# in the file CONTRIBUTORS included with the source
-# code distribution. The list can also be seen at the
-# following World Wide Web location:
-# http://sources.redhat.com/pthreads-win32/contributors.html
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library in the file COPYING.LIB;
-# if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-#
-
-DLL_VER = 2
-DLL_VERD= $(DLL_VER)d
-
-DEVROOT = C:\PTHREADS
-
-DLLDEST = $(DEVROOT)\DLL
-LIBDEST = $(DEVROOT)\DLL
-
-# If Running MsysDTK
-RM = rm -f
-MV = mv -f
-CP = cp -f
-
-# If not.
-#RM = erase
-#MV = rename
-#CP = copy
-
-# For cross compiling use e.g.
-# make CROSS=x86_64-w64-mingw32- clean GC-inlined
-CROSS =
-
-AR = $(CROSS)ar
-DLLTOOL = $(CROSS)dlltool
-CC = $(CROSS)gcc
-CXX = $(CROSS)g++
-RANLIB = $(CROSS)ranlib
-RC = $(CROSS)windres
-
-OPT = $(CLEANUP) -O3 # -finline-functions -findirect-inlining
-XOPT =
-
-RCFLAGS = --include-dir=.
-# Uncomment this if config.h defines RETAIN_WSALASTERROR
-#LFLAGS = -lws2_32
-
-# ----------------------------------------------------------------------
-# The library can be built with some alternative behaviour to
-# facilitate development of applications on Win32 that will be ported
-# to other POSIX systems. Nothing definable here will make the library
-# non-compliant, but applications that make assumptions that POSIX
-# does not garrantee may fail or misbehave under some settings.
-#
-# PTW32_THREAD_ID_REUSE_INCREMENT
-# Purpose:
-# POSIX says that applications should assume that thread IDs can be
-# recycled. However, Solaris and some other systems use a [very large]
-# sequence number as the thread ID, which provides virtual uniqueness.
-# Pthreads-win32 provides pseudo-unique IDs when the default increment
-# (1) is used, but pthread_t is not a scalar type like Solaris's.
-#
-# Usage:
-# Set to any value in the range: 0 <= value <= 2^wordsize
-#
-# Examples:
-# Set to 0 to emulate non recycle-unique behaviour like Linux or *BSD.
-# Set to 1 for recycle-unique thread IDs (this is the default).
-# Set to some other +ve value to emulate smaller word size types
-# (i.e. will wrap sooner).
-#
-#PTW32_FLAGS = "-DPTW32_THREAD_ID_REUSE_INCREMENT=0"
-#
-# ----------------------------------------------------------------------
-
-GC_CFLAGS = $(PTW32_FLAGS)
-GCE_CFLAGS = $(PTW32_FLAGS) -mthreads
-
-## Mingw
-MAKE ?= make
-CFLAGS = $(OPT) $(XOPT) -I. -DHAVE_PTW32_CONFIG_H -Wall
-
-DLL_INLINED_OBJS = \
- pthread.o \
- version.o
-
-# Agregate modules for inlinability
-DLL_OBJS = \
- attr.o \
- barrier.o \
- cancel.o \
- cleanup.o \
- condvar.o \
- create.o \
- dll.o \
- errno.o \
- exit.o \
- fork.o \
- global.o \
- misc.o \
- mutex.o \
- nonportable.o \
- private.o \
- rwlock.o \
- sched.o \
- semaphore.o \
- signal.o \
- spin.o \
- sync.o \
- tsd.o \
- version.o
-
-# Separate modules for minimum size statically linked images
-SMALL_STATIC_OBJS = \
- pthread_attr_init.o \
- pthread_attr_destroy.o \
- pthread_attr_getdetachstate.o \
- pthread_attr_setdetachstate.o \
- pthread_attr_getstackaddr.o \
- pthread_attr_setstackaddr.o \
- pthread_attr_getstacksize.o \
- pthread_attr_setstacksize.o \
- pthread_attr_getscope.o \
- pthread_attr_setscope.o \
- pthread_attr_setschedpolicy.o \
- pthread_attr_getschedpolicy.o \
- pthread_attr_setschedparam.o \
- pthread_attr_getschedparam.o \
- pthread_attr_setinheritsched.o \
- pthread_attr_getinheritsched.o \
- pthread_barrier_init.o \
- pthread_barrier_destroy.o \
- pthread_barrier_wait.o \
- pthread_barrierattr_init.o \
- pthread_barrierattr_destroy.o \
- pthread_barrierattr_setpshared.o \
- pthread_barrierattr_getpshared.o \
- pthread_setcancelstate.o \
- pthread_setcanceltype.o \
- pthread_testcancel.o \
- pthread_cancel.o \
- cleanup.o \
- pthread_condattr_destroy.o \
- pthread_condattr_getpshared.o \
- pthread_condattr_init.o \
- pthread_condattr_setpshared.o \
- pthread_cond_destroy.o \
- pthread_cond_init.o \
- pthread_cond_signal.o \
- pthread_cond_wait.o \
- create.o \
- dll.o \
- autostatic.o \
- errno.o \
- pthread_exit.o \
- fork.o \
- global.o \
- pthread_mutex_init.o \
- pthread_mutex_destroy.o \
- pthread_mutexattr_init.o \
- pthread_mutexattr_destroy.o \
- pthread_mutexattr_getpshared.o \
- pthread_mutexattr_setpshared.o \
- pthread_mutexattr_settype.o \
- pthread_mutexattr_gettype.o \
- pthread_mutexattr_setrobust.o \
- pthread_mutexattr_getrobust.o \
- pthread_mutex_lock.o \
- pthread_mutex_timedlock.o \
- pthread_mutex_unlock.o \
- pthread_mutex_trylock.o \
- pthread_mutex_consistent.o \
- pthread_mutexattr_setkind_np.o \
- pthread_mutexattr_getkind_np.o \
- pthread_getw32threadhandle_np.o \
- pthread_getunique_np.o \
- pthread_delay_np.o \
- pthread_num_processors_np.o \
- pthread_win32_attach_detach_np.o \
- pthread_equal.o \
- pthread_getconcurrency.o \
- pthread_once.o \
- pthread_self.o \
- pthread_setconcurrency.o \
- pthread_rwlock_init.o \
- pthread_rwlock_destroy.o \
- pthread_rwlockattr_init.o \
- pthread_rwlockattr_destroy.o \
- pthread_rwlockattr_getpshared.o \
- pthread_rwlockattr_setpshared.o \
- pthread_rwlock_rdlock.o \
- pthread_rwlock_wrlock.o \
- pthread_rwlock_unlock.o \
- pthread_rwlock_tryrdlock.o \
- pthread_rwlock_trywrlock.o \
- pthread_setschedparam.o \
- pthread_getschedparam.o \
- pthread_timechange_handler_np.o \
- ptw32_is_attr.o \
- ptw32_cond_check_need_init.o \
- ptw32_MCS_lock.o \
- ptw32_mutex_check_need_init.o \
- ptw32_processInitialize.o \
- ptw32_processTerminate.o \
- ptw32_threadStart.o \
- ptw32_threadDestroy.o \
- ptw32_tkAssocCreate.o \
- ptw32_tkAssocDestroy.o \
- ptw32_callUserDestroyRoutines.o \
- ptw32_timespec.o \
- ptw32_throw.o \
- ptw32_getprocessors.o \
- ptw32_calloc.o \
- ptw32_new.o \
- ptw32_reuse.o \
- ptw32_semwait.o \
- ptw32_relmillisecs.o \
- ptw32_rwlock_check_need_init.o \
- sched_get_priority_max.o \
- sched_get_priority_min.o \
- sched_setscheduler.o \
- sched_getscheduler.o \
- sched_yield.o \
- sem_init.o \
- sem_destroy.o \
- sem_trywait.o \
- sem_timedwait.o \
- sem_wait.o \
- sem_post.o \
- sem_post_multiple.o \
- sem_getvalue.o \
- sem_open.o \
- sem_close.o \
- sem_unlink.o \
- signal.o \
- pthread_kill.o \
- ptw32_spinlock_check_need_init.o \
- pthread_spin_init.o \
- pthread_spin_destroy.o \
- pthread_spin_lock.o \
- pthread_spin_unlock.o \
- pthread_spin_trylock.o \
- pthread_detach.o \
- pthread_join.o \
- pthread_key_create.o \
- pthread_key_delete.o \
- pthread_setspecific.o \
- pthread_getspecific.o \
- w32_CancelableWait.o \
- version.o
-
-INCL = \
- config.h \
- implement.h \
- semaphore.h \
- pthread.h \
- need_errno.h
-
-ATTR_SRCS = \
- pthread_attr_init.c \
- pthread_attr_destroy.c \
- pthread_attr_getdetachstate.c \
- pthread_attr_setdetachstate.c \
- pthread_attr_getstackaddr.c \
- pthread_attr_setstackaddr.c \
- pthread_attr_getstacksize.c \
- pthread_attr_setstacksize.c \
- pthread_attr_getscope.c \
- pthread_attr_setscope.c
-
-BARRIER_SRCS = \
- pthread_barrier_init.c \
- pthread_barrier_destroy.c \
- pthread_barrier_wait.c \
- pthread_barrierattr_init.c \
- pthread_barrierattr_destroy.c \
- pthread_barrierattr_setpshared.c \
- pthread_barrierattr_getpshared.c
-
-CANCEL_SRCS = \
- pthread_setcancelstate.c \
- pthread_setcanceltype.c \
- pthread_testcancel.c \
- pthread_cancel.c
-
-CONDVAR_SRCS = \
- ptw32_cond_check_need_init.c \
- pthread_condattr_destroy.c \
- pthread_condattr_getpshared.c \
- pthread_condattr_init.c \
- pthread_condattr_setpshared.c \
- pthread_cond_destroy.c \
- pthread_cond_init.c \
- pthread_cond_signal.c \
- pthread_cond_wait.c
-
-EXIT_SRCS = \
- pthread_exit.c
-
-MISC_SRCS = \
- pthread_equal.c \
- pthread_getconcurrency.c \
- pthread_kill.c \
- pthread_once.c \
- pthread_self.c \
- pthread_setconcurrency.c \
- ptw32_calloc.c \
- ptw32_MCS_lock.c \
- ptw32_new.c \
- ptw32_reuse.c \
- w32_CancelableWait.c
-
-MUTEX_SRCS = \
- ptw32_mutex_check_need_init.c \
- pthread_mutex_init.c \
- pthread_mutex_destroy.c \
- pthread_mutexattr_init.c \
- pthread_mutexattr_destroy.c \
- pthread_mutexattr_getpshared.c \
- pthread_mutexattr_setpshared.c \
- pthread_mutexattr_settype.c \
- pthread_mutexattr_gettype.c \
- pthread_mutexattr_setrobust.c \
- pthread_mutexattr_getrobust.c \
- pthread_mutex_lock.c \
- pthread_mutex_timedlock.c \
- pthread_mutex_unlock.c \
- pthread_mutex_trylock.c \
- pthread_mutex_consistent.c
-
-NONPORTABLE_SRCS = \
- pthread_mutexattr_setkind_np.c \
- pthread_mutexattr_getkind_np.c \
- pthread_getw32threadhandle_np.c \
- pthread_getunique_np.c \
- pthread_delay_np.c \
- pthread_num_processors_np.c \
- pthread_win32_attach_detach_np.c \
- pthread_timechange_handler_np.c
-
-PRIVATE_SRCS = \
- ptw32_is_attr.c \
- ptw32_processInitialize.c \
- ptw32_processTerminate.c \
- ptw32_threadStart.c \
- ptw32_threadDestroy.c \
- ptw32_tkAssocCreate.c \
- ptw32_tkAssocDestroy.c \
- ptw32_callUserDestroyRoutines.c \
- ptw32_semwait.c \
- ptw32_relmillisecs.c \
- ptw32_timespec.c \
- ptw32_throw.c \
- ptw32_getprocessors.c
-
-RWLOCK_SRCS = \
- ptw32_rwlock_check_need_init.c \
- ptw32_rwlock_cancelwrwait.c \
- pthread_rwlock_init.c \
- pthread_rwlock_destroy.c \
- pthread_rwlockattr_init.c \
- pthread_rwlockattr_destroy.c \
- pthread_rwlockattr_getpshared.c \
- pthread_rwlockattr_setpshared.c \
- pthread_rwlock_rdlock.c \
- pthread_rwlock_timedrdlock.c \
- pthread_rwlock_wrlock.c \
- pthread_rwlock_timedwrlock.c \
- pthread_rwlock_unlock.c \
- pthread_rwlock_tryrdlock.c \
- pthread_rwlock_trywrlock.c
-
-SCHED_SRCS = \
- pthread_attr_setschedpolicy.c \
- pthread_attr_getschedpolicy.c \
- pthread_attr_setschedparam.c \
- pthread_attr_getschedparam.c \
- pthread_attr_setinheritsched.c \
- pthread_attr_getinheritsched.c \
- pthread_setschedparam.c \
- pthread_getschedparam.c \
- sched_get_priority_max.c \
- sched_get_priority_min.c \
- sched_setscheduler.c \
- sched_getscheduler.c \
- sched_yield.c
-
-SEMAPHORE_SRCS = \
- sem_init.c \
- sem_destroy.c \
- sem_trywait.c \
- sem_timedwait.c \
- sem_wait.c \
- sem_post.c \
- sem_post_multiple.c \
- sem_getvalue.c \
- sem_open.c \
- sem_close.c \
- sem_unlink.c
-
-SPIN_SRCS = \
- ptw32_spinlock_check_need_init.c \
- pthread_spin_init.c \
- pthread_spin_destroy.c \
- pthread_spin_lock.c \
- pthread_spin_unlock.c \
- pthread_spin_trylock.c
-
-SYNC_SRCS = \
- pthread_detach.c \
- pthread_join.c
-
-TSD_SRCS = \
- pthread_key_create.c \
- pthread_key_delete.c \
- pthread_setspecific.c \
- pthread_getspecific.c
-
-
-GCE_DLL = pthreadGCE$(DLL_VER).dll
-GCED_DLL= pthreadGCE$(DLL_VERD).dll
-GCE_LIB = libpthreadGCE$(DLL_VER).a
-GCED_LIB= libpthreadGCE$(DLL_VERD).a
-GCE_INLINED_STAMP = pthreadGCE$(DLL_VER).stamp
-GCED_INLINED_STAMP = pthreadGCE$(DLL_VERD).stamp
-GCE_STATIC_STAMP = libpthreadGCE$(DLL_VER).stamp
-GCED_STATIC_STAMP = libpthreadGCE$(DLL_VERD).stamp
-
-GC_DLL = pthreadGC$(DLL_VER).dll
-GCD_DLL = pthreadGC$(DLL_VERD).dll
-GC_LIB = libpthreadGC$(DLL_VER).a
-GCD_LIB = libpthreadGC$(DLL_VERD).a
-GC_INLINED_STAMP = pthreadGC$(DLL_VER).stamp
-GCD_INLINED_STAMP = pthreadGC$(DLL_VERD).stamp
-GC_STATIC_STAMP = libpthreadGC$(DLL_VER).stamp
-GCD_STATIC_STAMP = libpthreadGC$(DLL_VERD).stamp
-
-PTHREAD_DEF = pthread.def
-
-help:
- @ echo "Run one of the following command lines:"
- @ echo "make clean GC (to build the GNU C dll with C cleanup code)"
- @ echo "make clean GCE (to build the GNU C dll with C++ exception handling)"
- @ echo "make clean GC-inlined (to build the GNU C inlined dll with C cleanup code)"
- @ echo "make clean GCE-inlined (to build the GNU C inlined dll with C++ exception handling)"
- @ echo "make clean GC-static (to build the GNU C inlined static lib with C cleanup code)"
- @ echo "make clean GC-debug (to build the GNU C debug dll with C cleanup code)"
- @ echo "make clean GCE-debug (to build the GNU C debug dll with C++ exception handling)"
- @ echo "make clean GC-inlined-debug (to build the GNU C inlined debug dll with C cleanup code)"
- @ echo "make clean GCE-inlined-debug (to build the GNU C inlined debug dll with C++ exception handling)"
- @ echo "make clean GC-static-debug (to build the GNU C inlined static debug lib with C cleanup code)"
-
-all:
- @ $(MAKE) clean GCE
- @ $(MAKE) clean GC
-
-GC:
- $(MAKE) CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_DLL)
-
-GC-debug:
- $(MAKE) CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_DLL)
-
-GCE:
- $(MAKE) CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_DLL)
-
-GCE-debug:
- $(MAKE) CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_CXX -g -O0" $(GCED_DLL)
-
-GC-inlined:
- $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_INLINED_OBJS)" $(GC_INLINED_STAMP)
-
-GC-inlined-debug:
- $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_INLINED_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_INLINED_STAMP)
-
-GCE-inlined:
- $(MAKE) CC=$(CXX) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_INLINED_OBJS)" $(GCE_INLINED_STAMP)
-
-GCE-inlined-debug:
- $(MAKE) CC=$(CXX) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_INLINED_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_CXX -g -O0" $(GCED_INLINED_STAMP)
-
-GC-static:
- $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_INLINED_OBJS)" $(GC_STATIC_STAMP)
-
-GC-static-debug:
- $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_INLINED_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_STATIC_STAMP)
-
-tests:
- @ cd tests
- @ $(MAKE) auto
-
-%.pre: %.c
- $(CC) -E -o $@ $(CFLAGS) $^
-
-%.s: %.c
- $(CC) -c $(CFLAGS) -DPTW32_BUILD_INLINED -Wa,-ahl $^ > $@
-
-%.o: %.rc
- $(RC) $(RCFLAGS) $(CLEANUP) -o $@ -i $<
-
-.SUFFIXES: .dll .rc .c .o
-
-.c.o:; $(CC) -c -o $@ $(CFLAGS) $(XC_FLAGS) $<
-
-
-$(GC_DLL) $(GCD_DLL): $(DLL_OBJS)
- $(CC) $(OPT) -shared -o $(GC_DLL) $(DLL_OBJS) $(LFLAGS)
- $(DLLTOOL) -z pthread.def $(DLL_OBJS)
- $(DLLTOOL) -k --dllname $@ --output-lib $(GC_LIB) --def $(PTHREAD_DEF)
-
-$(GCE_DLL): $(DLL_OBJS)
- $(CC) $(OPT) -mthreads -shared -o $(GCE_DLL) $(DLL_OBJS) $(LFLAGS)
- $(DLLTOOL) -z pthread.def $(DLL_OBJS)
- $(DLLTOOL) -k --dllname $@ --output-lib $(GCE_LIB) --def $(PTHREAD_DEF)
-
-$(GC_INLINED_STAMP) $(GCD_INLINED_STAMP): $(DLL_INLINED_OBJS)
- $(CC) $(OPT) $(XOPT) -shared -o $(GC_DLL) $(DLL_INLINED_OBJS) $(LFLAGS)
- $(DLLTOOL) -z pthread.def $(DLL_INLINED_OBJS)
- $(DLLTOOL) -k --dllname $(GC_DLL) --output-lib $(GC_LIB) --def $(PTHREAD_DEF)
- echo touched > $(GC_INLINED_STAMP)
-
-$(GCE_INLINED_STAMP) $(GCED_INLINED_STAMP): $(DLL_INLINED_OBJS)
- $(CC) $(OPT) $(XOPT) -mthreads -shared -o $(GCE_DLL) $(DLL_INLINED_OBJS) $(LFLAGS)
- $(DLLTOOL) -z pthread.def $(DLL_INLINED_OBJS)
- $(DLLTOOL) -k --dllname $(GCE_DLL) --output-lib $(GCE_LIB) --def $(PTHREAD_DEF)
- echo touched > $(GCE_INLINED_STAMP)
-
-$(GC_STATIC_STAMP) $(GCD_STATIC_STAMP): $(DLL_INLINED_OBJS)
- $(RM) $(GC_LIB)
- $(AR) -rv $(GC_LIB) $(DLL_INLINED_OBJS)
- $(RANLIB) $(GC_LIB)
- echo touched > $(GC_STATIC_STAMP)
-
-clean:
- -$(RM) *~
- -$(RM) *.i
- -$(RM) *.s
- -$(RM) *.o
- -$(RM) *.obj
- -$(RM) *.exe
- -$(RM) $(PTHREAD_DEF)
-
-realclean: clean
- -$(RM) $(GC_LIB)
- -$(RM) $(GCE_LIB)
- -$(RM) $(GC_DLL)
- -$(RM) $(GCE_DLL)
- -$(RM) $(GC_INLINED_STAMP)
- -$(RM) $(GCE_INLINED_STAMP)
- -$(RM) $(GC_STATIC_STAMP)
- -$(RM) $(GCD_LIB)
- -$(RM) $(GCED_LIB)
- -$(RM) $(GCD_DLL)
- -$(RM) $(GCED_DLL)
- -$(RM) $(GCD_INLINED_STAMP)
- -$(RM) $(GCED_INLINED_STAMP)
- -$(RM) $(GCD_STATIC_STAMP)
-
-attr.o: attr.c $(ATTR_SRCS) $(INCL)
-barrier.o: barrier.c $(BARRIER_SRCS) $(INCL)
-cancel.o: cancel.c $(CANCEL_SRCS) $(INCL)
-condvar.o: condvar.c $(CONDVAR_SRCS) $(INCL)
-exit.o: exit.c $(EXIT_SRCS) $(INCL)
-misc.o: misc.c $(MISC_SRCS) $(INCL)
-mutex.o: mutex.c $(MUTEX_SRCS) $(INCL)
-nonportable.o: nonportable.c $(NONPORTABLE_SRCS) $(INCL)
-private.o: private.c $(PRIVATE_SRCS) $(INCL)
-rwlock.o: rwlock.c $(RWLOCK_SRCS) $(INCL)
-sched.o: sched.c $(SCHED_SRCS) $(INCL)
-semaphore.o: semaphore.c $(SEMAPHORE_SRCS) $(INCL)
-spin.o: spin.c $(SPIN_SRCS) $(INCL)
-sync.o: sync.c $(SYNC_SRCS) $(INCL)
-tsd.o: tsd.c $(TSD_SRCS) $(INCL)
-version.o: version.rc $(INCL)
diff --git a/libs/pthreads/docs/MAINTAINERS b/libs/pthreads/docs/MAINTAINERS
deleted file mode 100644
index d253c1f69e..0000000000
--- a/libs/pthreads/docs/MAINTAINERS
+++ /dev/null
@@ -1,4 +0,0 @@
-CVS Repository maintainers
-
-Ross Johnson rpj@ise.canberra.edu.au
-Ben Elliston bje@cygnus.com
diff --git a/libs/pthreads/docs/Makefile b/libs/pthreads/docs/Makefile
deleted file mode 100644
index 472969cf9b..0000000000
--- a/libs/pthreads/docs/Makefile
+++ /dev/null
@@ -1,514 +0,0 @@
-# This makefile is compatible with MS nmake and can be used as a
-# replacement for buildlib.bat. I've changed the target from an ordinary dll
-# (/LD) to a debugging dll (/LDd).
-#
-# The variables $DLLDEST and $LIBDEST hold the destination directories for the
-# dll and the lib, respectively. Probably all that needs to change is $DEVROOT.
-
-
-# DLL_VER:
-# See pthread.h and README - This number is computed as 'current - age'
-DLL_VER = 2
-DLL_VERD= $(DLL_VER)d
-
-DEVROOT = C:\pthreads
-
-DLLDEST = $(DEVROOT)\dll
-LIBDEST = $(DEVROOT)\lib
-HDRDEST = $(DEVROOT)\include
-
-DLLS = pthreadVCE$(DLL_VER).dll pthreadVSE$(DLL_VER).dll pthreadVC$(DLL_VER).dll \
- pthreadVCE$(DLL_VERD).dll pthreadVSE$(DLL_VERD).dll pthreadVC$(DLL_VERD).dll
-INLINED_STAMPS = pthreadVCE$(DLL_VER).stamp pthreadVSE$(DLL_VER).stamp pthreadVC$(DLL_VER).stamp \
- pthreadVCE$(DLL_VERD).stamp pthreadVSE$(DLL_VERD).stamp pthreadVC$(DLL_VERD).stamp
-STATIC_STAMPS = pthreadVCE$(DLL_VER).static pthreadVSE$(DLL_VER).static pthreadVC$(DLL_VER).static \
- pthreadVCE$(DLL_VERD).static pthreadVSE$(DLL_VERD).static pthreadVC$(DLL_VERD).static
-
-CC = cl
-CPPFLAGS = /I. /DHAVE_PTW32_CONFIG_H
-XCFLAGS = /W3 /MD /nologo
-CFLAGS = /O2 /Ob2 $(XCFLAGS)
-CFLAGSD = /Z7 $(XCFLAGS)
-
-# Uncomment this if config.h defines RETAIN_WSALASTERROR
-#XLIBS = wsock32.lib
-
-# Default cleanup style
-CLEANUP = __CLEANUP_C
-
-# C++ Exceptions
-VCEFLAGS = /EHsc /TP $(CPPFLAGS) $(CFLAGS)
-VCEFLAGSD = /EHsc /TP $(CPPFLAGS) $(CFLAGSD)
-#Structured Exceptions
-VSEFLAGS = $(CPPFLAGS) $(CFLAGS)
-VSEFLAGSD = $(CPPFLAGS) $(CFLAGSD)
-#C cleanup code
-VCFLAGS = $(CPPFLAGS) $(CFLAGS)
-VCFLAGSD = $(CPPFLAGS) $(CFLAGSD)
-
-DLL_INLINED_OBJS = \
- pthread.obj \
- version.res
-
-# Aggregate modules for inlinability
-DLL_OBJS = \
- attr.obj \
- barrier.obj \
- cancel.obj \
- cleanup.obj \
- condvar.obj \
- create.obj \
- dll.obj \
- autostatic.obj \
- errno.obj \
- exit.obj \
- fork.obj \
- global.obj \
- misc.obj \
- mutex.obj \
- nonportable.obj \
- private.obj \
- rwlock.obj \
- sched.obj \
- semaphore.obj \
- signal.obj \
- spin.obj \
- sync.obj \
- tsd.obj \
- version.res
-
-# Separate modules for minimising the size of statically linked images
-SMALL_STATIC_OBJS = \
- pthread_attr_init.obj \
- pthread_attr_destroy.obj \
- pthread_attr_getdetachstate.obj \
- pthread_attr_setdetachstate.obj \
- pthread_attr_getstackaddr.obj \
- pthread_attr_setstackaddr.obj \
- pthread_attr_getstacksize.obj \
- pthread_attr_setstacksize.obj \
- pthread_attr_getscope.obj \
- pthread_attr_setscope.obj \
- pthread_attr_setschedpolicy.obj \
- pthread_attr_getschedpolicy.obj \
- pthread_attr_setschedparam.obj \
- pthread_attr_getschedparam.obj \
- pthread_attr_setinheritsched.obj \
- pthread_attr_getinheritsched.obj \
- pthread_barrier_init.obj \
- pthread_barrier_destroy.obj \
- pthread_barrier_wait.obj \
- pthread_barrierattr_init.obj \
- pthread_barrierattr_destroy.obj \
- pthread_barrierattr_setpshared.obj \
- pthread_barrierattr_getpshared.obj \
- pthread_setcancelstate.obj \
- pthread_setcanceltype.obj \
- pthread_testcancel.obj \
- pthread_cancel.obj \
- cleanup.obj \
- pthread_condattr_destroy.obj \
- pthread_condattr_getpshared.obj \
- pthread_condattr_init.obj \
- pthread_condattr_setpshared.obj \
- pthread_cond_destroy.obj \
- pthread_cond_init.obj \
- pthread_cond_signal.obj \
- pthread_cond_wait.obj \
- create.obj \
- dll.obj \
- autostatic.obj \
- errno.obj \
- pthread_exit.obj \
- fork.obj \
- global.obj \
- pthread_mutex_init.obj \
- pthread_mutex_destroy.obj \
- pthread_mutexattr_init.obj \
- pthread_mutexattr_destroy.obj \
- pthread_mutexattr_getpshared.obj \
- pthread_mutexattr_setpshared.obj \
- pthread_mutexattr_settype.obj \
- pthread_mutexattr_gettype.obj \
- pthread_mutexattr_setrobust.obj \
- pthread_mutexattr_getrobust.obj \
- pthread_mutex_lock.obj \
- pthread_mutex_timedlock.obj \
- pthread_mutex_unlock.obj \
- pthread_mutex_trylock.obj \
- pthread_mutex_consistent.obj \
- pthread_mutexattr_setkind_np.obj \
- pthread_mutexattr_getkind_np.obj \
- pthread_getw32threadhandle_np.obj \
- pthread_getunique_np.obj \
- pthread_delay_np.obj \
- pthread_num_processors_np.obj \
- pthread_win32_attach_detach_np.obj \
- pthread_equal.obj \
- pthread_getconcurrency.obj \
- pthread_once.obj \
- pthread_self.obj \
- pthread_setconcurrency.obj \
- pthread_rwlock_init.obj \
- pthread_rwlock_destroy.obj \
- pthread_rwlockattr_init.obj \
- pthread_rwlockattr_destroy.obj \
- pthread_rwlockattr_getpshared.obj \
- pthread_rwlockattr_setpshared.obj \
- pthread_rwlock_rdlock.obj \
- pthread_rwlock_wrlock.obj \
- pthread_rwlock_unlock.obj \
- pthread_rwlock_tryrdlock.obj \
- pthread_rwlock_trywrlock.obj \
- pthread_setschedparam.obj \
- pthread_getschedparam.obj \
- pthread_timechange_handler_np.obj \
- ptw32_is_attr.obj \
- ptw32_processInitialize.obj \
- ptw32_processTerminate.obj \
- ptw32_threadStart.obj \
- ptw32_threadDestroy.obj \
- ptw32_tkAssocCreate.obj \
- ptw32_tkAssocDestroy.obj \
- ptw32_callUserDestroyRoutines.obj \
- ptw32_timespec.obj \
- ptw32_throw.obj \
- ptw32_getprocessors.obj \
- ptw32_calloc.obj \
- ptw32_new.obj \
- ptw32_reuse.obj \
- ptw32_rwlock_check_need_init.obj \
- ptw32_cond_check_need_init.obj \
- ptw32_mutex_check_need_init.obj \
- ptw32_semwait.obj \
- ptw32_relmillisecs.obj \
- ptw32_MCS_lock.obj \
- sched_get_priority_max.obj \
- sched_get_priority_min.obj \
- sched_setscheduler.obj \
- sched_getscheduler.obj \
- sched_yield.obj \
- sem_init.obj \
- sem_destroy.obj \
- sem_trywait.obj \
- sem_timedwait.obj \
- sem_wait.obj \
- sem_post.obj \
- sem_post_multiple.obj \
- sem_getvalue.obj \
- sem_open.obj \
- sem_close.obj \
- sem_unlink.obj \
- signal.obj \
- pthread_kill.obj \
- ptw32_spinlock_check_need_init.obj \
- pthread_spin_init.obj \
- pthread_spin_destroy.obj \
- pthread_spin_lock.obj \
- pthread_spin_unlock.obj \
- pthread_spin_trylock.obj \
- pthread_detach.obj \
- pthread_join.obj \
- pthread_key_create.obj \
- pthread_key_delete.obj \
- pthread_setspecific.obj \
- pthread_getspecific.obj \
- w32_CancelableWait.obj \
- version.res
-
-INCL = config.h implement.h semaphore.h pthread.h need_errno.h
-
-ATTR_SRCS = \
- pthread_attr_init.c \
- pthread_attr_destroy.c \
- pthread_attr_getdetachstate.c \
- pthread_attr_setdetachstate.c \
- pthread_attr_getstackaddr.c \
- pthread_attr_setstackaddr.c \
- pthread_attr_getstacksize.c \
- pthread_attr_setstacksize.c \
- pthread_attr_getscope.c \
- pthread_attr_setscope.c
-
-BARRIER_SRCS = \
- pthread_barrier_init.c \
- pthread_barrier_destroy.c \
- pthread_barrier_wait.c \
- pthread_barrierattr_init.c \
- pthread_barrierattr_destroy.c \
- pthread_barrierattr_setpshared.c \
- pthread_barrierattr_getpshared.c
-
-CANCEL_SRCS = \
- pthread_setcancelstate.c \
- pthread_setcanceltype.c \
- pthread_testcancel.c \
- pthread_cancel.c
-
-CONDVAR_SRCS = \
- ptw32_cond_check_need_init.c \
- pthread_condattr_destroy.c \
- pthread_condattr_getpshared.c \
- pthread_condattr_init.c \
- pthread_condattr_setpshared.c \
- pthread_cond_destroy.c \
- pthread_cond_init.c \
- pthread_cond_signal.c \
- pthread_cond_wait.c
-
-EXIT_SRCS = \
- pthread_exit.c
-
-MISC_SRCS = \
- pthread_equal.c \
- pthread_getconcurrency.c \
- pthread_kill.c \
- pthread_once.c \
- pthread_self.c \
- pthread_setconcurrency.c \
- ptw32_calloc.c \
- ptw32_MCS_lock.c \
- ptw32_new.c \
- ptw32_reuse.c \
- ptw32_relmillisecs.c \
- w32_CancelableWait.c
-
-MUTEX_SRCS = \
- ptw32_mutex_check_need_init.c \
- pthread_mutex_init.c \
- pthread_mutex_destroy.c \
- pthread_mutexattr_init.c \
- pthread_mutexattr_destroy.c \
- pthread_mutexattr_getpshared.c \
- pthread_mutexattr_setpshared.c \
- pthread_mutexattr_settype.c \
- pthread_mutexattr_gettype.c \
- pthread_mutexattr_setrobust.c \
- pthread_mutexattr_getrobust.c \
- pthread_mutex_lock.c \
- pthread_mutex_timedlock.c \
- pthread_mutex_unlock.c \
- pthread_mutex_trylock.c \
- pthread_mutex_consistent.c
-
-NONPORTABLE_SRCS = \
- pthread_mutexattr_setkind_np.c \
- pthread_mutexattr_getkind_np.c \
- pthread_getw32threadhandle_np.c \
- pthread_getunique_np.c \
- pthread_delay_np.c \
- pthread_num_processors_np.c \
- pthread_win32_attach_detach_np.c \
- pthread_timechange_handler_np.c
-
-PRIVATE_SRCS = \
- ptw32_is_attr.c \
- ptw32_processInitialize.c \
- ptw32_processTerminate.c \
- ptw32_threadStart.c \
- ptw32_threadDestroy.c \
- ptw32_tkAssocCreate.c \
- ptw32_tkAssocDestroy.c \
- ptw32_callUserDestroyRoutines.c \
- ptw32_semwait.c \
- ptw32_timespec.c \
- ptw32_throw.c \
- ptw32_getprocessors.c
-
-RWLOCK_SRCS = \
- ptw32_rwlock_check_need_init.c \
- ptw32_rwlock_cancelwrwait.c \
- pthread_rwlock_init.c \
- pthread_rwlock_destroy.c \
- pthread_rwlockattr_init.c \
- pthread_rwlockattr_destroy.c \
- pthread_rwlockattr_getpshared.c \
- pthread_rwlockattr_setpshared.c \
- pthread_rwlock_rdlock.c \
- pthread_rwlock_timedrdlock.c \
- pthread_rwlock_wrlock.c \
- pthread_rwlock_timedwrlock.c \
- pthread_rwlock_unlock.c \
- pthread_rwlock_tryrdlock.c \
- pthread_rwlock_trywrlock.c
-
-SCHED_SRCS = \
- pthread_attr_setschedpolicy.c \
- pthread_attr_getschedpolicy.c \
- pthread_attr_setschedparam.c \
- pthread_attr_getschedparam.c \
- pthread_attr_setinheritsched.c \
- pthread_attr_getinheritsched.c \
- pthread_setschedparam.c \
- pthread_getschedparam.c \
- sched_get_priority_max.c \
- sched_get_priority_min.c \
- sched_setscheduler.c \
- sched_getscheduler.c \
- sched_yield.c
-
-SEMAPHORE_SRCS = \
- sem_init.c \
- sem_destroy.c \
- sem_trywait.c \
- sem_timedwait.c \
- sem_wait.c \
- sem_post.c \
- sem_post_multiple.c \
- sem_getvalue.c \
- sem_open.c \
- sem_close.c \
- sem_unlink.c
-
-SPIN_SRCS = \
- ptw32_spinlock_check_need_init.c \
- pthread_spin_init.c \
- pthread_spin_destroy.c \
- pthread_spin_lock.c \
- pthread_spin_unlock.c \
- pthread_spin_trylock.c
-
-SYNC_SRCS = \
- pthread_detach.c \
- pthread_join.c
-
-TSD_SRCS = \
- pthread_key_create.c \
- pthread_key_delete.c \
- pthread_setspecific.c \
- pthread_getspecific.c
-
-
-help:
- @ echo Run one of the following command lines:
- @ echo nmake clean VCE (to build the MSVC dll with C++ exception handling)
- @ echo nmake clean VSE (to build the MSVC dll with structured exception handling)
- @ echo nmake clean VC (to build the MSVC dll with C cleanup code)
- @ echo nmake clean VCE-inlined (to build the MSVC inlined dll with C++ exception handling)
- @ echo nmake clean VSE-inlined (to build the MSVC inlined dll with structured exception handling)
- @ echo nmake clean VC-inlined (to build the MSVC inlined dll with C cleanup code)
- @ echo nmake clean VC-static (to build the MSVC static lib with C cleanup code)
- @ echo nmake clean VCE-debug (to build the debug MSVC dll with C++ exception handling)
- @ echo nmake clean VSE-debug (to build the debug MSVC dll with structured exception handling)
- @ echo nmake clean VC-debug (to build the debug MSVC dll with C cleanup code)
- @ echo nmake clean VCE-inlined-debug (to build the debug MSVC inlined dll with C++ exception handling)
- @ echo nmake clean VSE-inlined-debug (to build the debug MSVC inlined dll with structured exception handling)
- @ echo nmake clean VC-inlined-debug (to build the debug MSVC inlined dll with C cleanup code)
- @ echo nmake clean VC-static-debug (to build the debug MSVC static lib with C cleanup code)
-
-all:
- @ $(MAKE) /E clean VCE-inlined
- @ $(MAKE) /E clean VSE-inlined
- @ $(MAKE) /E clean VC-inlined
- @ $(MAKE) /E clean VCE-inlined-debug
- @ $(MAKE) /E clean VSE-inlined-debug
- @ $(MAKE) /E clean VC-inlined-debug
-
-VCE:
- @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGS)" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VER).dll
-
-VCE-debug:
- @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGSD)" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VERD).dll
-
-VSE:
- @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGS)" CLEANUP=__CLEANUP_SEH pthreadVSE$(DLL_VER).dll
-
-VSE-debug:
- @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGSD)" CLEANUP=__CLEANUP_SEH pthreadVSE$(DLL_VERD).dll
-
-VC:
- @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS)" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VER).dll
-
-VC-debug:
- @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD)" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VERD).dll
-
-#
-# The so-called inlined DLL is just a single translation unit with
-# inlining optimisation turned on.
-#
-VCE-inlined:
- @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGS) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VER).stamp
-
-VCE-inlined-debug:
- @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGSD) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VERD).stamp
-
-VSE-inlined:
- @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGS) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_SEH pthreadVSE$(DLL_VER).stamp
-
-VSE-inlined-debug:
- @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGSD) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_SEH pthreadVSE$(DLL_VERD).stamp
-
-VC-inlined:
- @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VER).stamp
-
-VC-inlined-debug:
- @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VERD).stamp
-
-VC-static:
- @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /DPTW32_BUILD_INLINED /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VER).static
-
-VC-static-debug:
- @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /DPTW32_BUILD_INLINED /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VERD).static
-
-realclean: clean
- if exist pthread*.dll del pthread*.dll
- if exist pthread*.lib del pthread*.lib
- if exist *.manifest del *.manifest
- if exist *.stamp del *.stamp
-
-clean:
- if exist *.obj del *.obj
- if exist *.def del *.def
- if exist *.ilk del *.ilk
- if exist *.pdb del *.pdb
- if exist *.exp del *.exp
- if exist *.map del *.map
- if exist *.o del *.o
- if exist *.i del *.i
- if exist *.res del *.res
-
-
-install:
- copy pthread*.dll $(DLLDEST)
- copy pthread*.lib $(LIBDEST)
- copy pthread.h $(HDRDEST)
- copy sched.h $(HDRDEST)
- copy semaphore.h $(HDRDEST)
-
-$(DLLS): $(DLL_OBJS)
- $(CC) /LDd /Zi /nologo $(DLL_OBJS) /link /implib:$*.lib $(XLIBS) /out:$@
-
-$(INLINED_STAMPS): $(DLL_INLINED_OBJS)
- $(CC) /LDd /Zi /nologo $(DLL_INLINED_OBJS) /link /implib:$*.lib $(XLIBS) /out:$*.dll
-
-$(STATIC_STAMPS): $(DLL_INLINED_OBJS)
- if exist $*.lib del $*.lib
- lib $(DLL_INLINED_OBJS) /out:$*.lib
-
-.c.obj:
- $(CC) $(EHFLAGS) /D$(CLEANUP) -c $<
-
-# TARGET_CPU is an environment variable set by Visual Studio Command Prompt
-# as provided by the SDK
-.rc.res:
- rc /dPTW32_ARCH$(TARGET_CPU) /dPTW32_RC_MSC /d$(CLEANUP) $<
-
-.c.i:
- $(CC) /P /O2 /Ob1 $(VCFLAGS) $<
-
-attr.obj: attr.c $(ATTR_SRCS) $(INCL)
-barrier.obj: barrier.c $(BARRIER_SRCS) $(INCL)
-cancel.obj: cancel.c $(CANCEL_SRCS) $(INCL)
-condvar.obj: condvar.c $(CONDVAR_SRCS) $(INCL)
-exit.obj: exit.c $(EXIT_SRCS) $(INCL)
-misc.obj: misc.c $(MISC_SRCS) $(INCL)
-mutex.obj: mutex.c $(MUTEX_SRCS) $(INCL)
-nonportable.obj: nonportable.c $(NONPORTABLE_SRCS) $(INCL)
-private.obj: private.c $(PRIVATE_SRCS) $(INCL)
-rwlock.obj: rwlock.c $(RWLOCK_SRCS) $(INCL)
-sched.obj: sched.c $(SCHED_SRCS) $(INCL)
-semaphore.obj: semaphore.c $(SEMAPHORE_SRCS) $(INCL)
-spin.obj: spin.c $(SPIN_SRCS) $(INCL)
-sync.obj: sync.c $(SYNC_SRCS) $(INCL)
-tsd.obj: tsd.c $(TSD_SRCS) $(INCL)
-version.res: version.rc $(INCL)
diff --git a/libs/pthreads/docs/Nmakefile b/libs/pthreads/docs/Nmakefile
deleted file mode 100644
index d9e5bf1bc7..0000000000
--- a/libs/pthreads/docs/Nmakefile
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * nmake file for uwin pthread library
- */
-
-VERSION = -
-CCFLAGS = -V -g $(CC.DLL)
-HAVE_PTW32_CONFIG_H == 1
-_MT == 1
-_timeb == timeb
-_ftime == ftime
-_errno == _ast_errno
-
-$(INCLUDEDIR) :INSTALLDIR: pthread.h sched.h
-
-pthread $(VERSION) :LIBRARY: attr.c barrier.c cancel.c cleanup.c condvar.c \
- create.c dll.c exit.c fork.c global.c misc.c mutex.c private.c \
- rwlock.c sched.c semaphore.c spin.c sync.c tsd.c nonportable.c
-
-:: ANNOUNCE CONTRIBUTORS COPYING.LIB ChangeLog FAQ GNUmakefile MAINTAINERS \
- Makefile Makefile.in Makefile.vc NEWS PROGRESS README README.WinCE \
- TODO WinCE-PORT install-sh errno.c tests tests.mk acconfig.h \
- config.guess config.h.in config.sub configure configure.in signal.c \
- README.CV README.NONPORTABLE pthread.dsp pthread.dsw
-
diff --git a/libs/pthreads/docs/PROGRESS b/libs/pthreads/docs/PROGRESS
deleted file mode 100644
index 9abf0bca47..0000000000
--- a/libs/pthreads/docs/PROGRESS
+++ /dev/null
@@ -1,4 +0,0 @@
-Please see the ANNOUNCE file "Level of Standards Conformance"
-or the web page:
-
-http://sources.redhat.com/pthreads-win32/conformance.html
diff --git a/libs/pthreads/docs/README b/libs/pthreads/docs/README
deleted file mode 100644
index 545360bfa7..0000000000
--- a/libs/pthreads/docs/README
+++ /dev/null
@@ -1,601 +0,0 @@
-PTHREADS-WIN32
-==============
-
-Pthreads-win32 is free software, distributed under the GNU Lesser
-General Public License (LGPL). See the file 'COPYING.LIB' for terms
-and conditions. Also see the file 'COPYING' for information
-specific to pthreads-win32, copyrights and the LGPL.
-
-
-What is it?
------------
-
-Pthreads-win32 is an Open Source Software implementation of the
-Threads component of the POSIX 1003.1c 1995 Standard (or later)
-for Microsoft's Win32 environment. Some functions from POSIX
-1003.1b are also supported including semaphores. Other related
-functions include the set of read-write lock functions. The
-library also supports some of the functionality of the Open
-Group's Single Unix specification, version 2, namely mutex types,
-plus some common and pthreads-win32 specific non-portable
-routines (see README.NONPORTABLE).
-
-See the file "ANNOUNCE" for more information including standards
-conformance details and the list of supported and unsupported
-routines.
-
-
-Prerequisites
--------------
-MSVC or GNU C (MinGW32 MSys development kit)
- To build from source.
-
-QueueUserAPCEx by Panagiotis E. Hadjidoukas
- To support any thread cancelation in C++ library builds or
- to support cancelation of blocked threads in any build.
- This library is not required otherwise.
-
- For true async cancelation of threads (including blocked threads).
- This is a DLL and Windows driver that provides pre-emptive APC
- by forcing threads into an alertable state when the APC is queued.
- Both the DLL and driver are provided with the pthreads-win32.exe
- self-unpacking ZIP, and on the pthreads-win32 FTP site (in source
- and pre-built forms). Currently this is a separate LGPL package to
- pthreads-win32. See the README in the QueueUserAPCEx folder for
- installation instructions.
-
- Pthreads-win32 will automatically detect if the QueueUserAPCEx DLL
- QuserEx.DLL is available and whether the driver AlertDrv.sys is
- loaded. If it is not available, pthreads-win32 will simulate async
- cancelation, which means that it can async cancel only threads that
- are runnable. The simulated async cancellation cannot cancel blocked
- threads.
-
- [FOR SECURITY] To be found Quserex.dll MUST be installed in the
- Windows System Folder. This is not an unreasonable constraint given a
- driver must also be installed and loaded at system startup.
-
-
-Library naming
---------------
-
-Because the library is being built using various exception
-handling schemes and compilers - and because the library
-may not work reliably if these are mixed in an application,
-each different version of the library has it's own name.
-
-Note 1: the incompatibility is really between EH implementations
-of the different compilers. It should be possible to use the
-standard C version from either compiler with C++ applications
-built with a different compiler. If you use an EH version of
-the library, then you must use the same compiler for the
-application. This is another complication and dependency that
-can be avoided by using only the standard C library version.
-
-Note 2: if you use a standard C pthread*.dll with a C++
-application, then any functions that you define that are
-intended to be called via pthread_cleanup_push() must be
-__cdecl.
-
-Note 3: the intention was to also name either the VC or GC
-version (it should be arbitrary) as pthread.dll, including
-pthread.lib and libpthread.a as appropriate. This is no longer
-likely to happen.
-
-Note 4: the compatibility number was added so that applications
-can differentiate between binary incompatible versions of the
-libs and dlls.
-
-In general:
- pthread[VG]{SE,CE,C}[c].dll
- pthread[VG]{SE,CE,C}[c].lib
-
-where:
- [VG] indicates the compiler
- V - MS VC, or
- G - GNU C
-
- {SE,CE,C} indicates the exception handling scheme
- SE - Structured EH, or
- CE - C++ EH, or
- C - no exceptions - uses setjmp/longjmp
-
- c - DLL compatibility number indicating ABI and API
- compatibility with applications built against
- a snapshot with the same compatibility number.
- See 'Version numbering' below.
-
-The name may also be suffixed by a 'd' to indicate a debugging version
-of the library. E.g. pthreadVC2d.lib. Debugging versions contain
-additional information for debugging (symbols etc) and are often not
-optimised in any way (compiled with optimisation turned off).
-
-Examples:
- pthreadVSE.dll (MSVC/SEH)
- pthreadGCE.dll (GNUC/C++ EH)
- pthreadGC.dll (GNUC/not dependent on exceptions)
- pthreadVC1.dll (MSVC/not dependent on exceptions - not binary
- compatible with pthreadVC.dll)
- pthreadVC2.dll (MSVC/not dependent on exceptions - not binary
- compatible with pthreadVC1.dll or pthreadVC.dll)
-
-The GNU library archive file names have correspondingly changed to:
-
- libpthreadGCEc.a
- libpthreadGCc.a
-
-
-Versioning numbering
---------------------
-
-Version numbering is separate from the snapshot dating system, and
-is the canonical version identification system embedded within the
-DLL using the Microsoft version resource system. The versioning
-system chosen follows the GNU Libtool system. See
-http://www.gnu.org/software/libtool/manual.html section 6.2.
-
-See the resource file 'version.rc'.
-
-Microsoft version numbers use 4 integers:
-
- 0.0.0.0
-
-Pthreads-win32 uses the first 3 following the Libtool convention.
-The fourth is commonly used for the build number, but will be reserved
-for future use.
-
- current.revision.age.0
-
-The numbers are changed as follows:
-
-1. If the library source code has changed at all since the last update,
- then increment revision (`c:r:a' becomes `c:r+1:a').
-2. If any interfaces have been added, removed, or changed since the last
- update, increment current, and set revision to 0.
-3. If any interfaces have been added since the last public release, then
- increment age.
-4. If any interfaces have been removed or changed since the last public
- release, then set age to 0.
-
-
-DLL compatibility numbering is an attempt to ensure that applications
-always load a compatible pthreads-win32 DLL by using a DLL naming system
-that is consistent with the version numbering system. It also allows
-older and newer DLLs to coexist in the same filesystem so that older
-applications can continue to be used. For pre .NET Windows systems,
-this inevitably requires incompatible versions of the same DLLs to have
-different names.
-
-Pthreads-win32 has adopted the Cygwin convention of appending a single
-integer number to the DLL name. The number used is based on the library
-version number and is computed as 'current' - 'age'.
-
-(See http://home.att.net/~perlspinr/libversioning.html for a nicely
-detailed explanation.)
-
-Using this method, DLL name/s will only change when the DLL's
-backwards compatibility changes. Note that the addition of new
-'interfaces' will not of itself change the DLL's compatibility for older
-applications.
-
-
-Which of the several dll versions to use?
------------------------------------------
-or,
----
-What are all these pthread*.dll and pthread*.lib files?
--------------------------------------------------------
-
-Simple, use either pthreadGCv.* if you use GCC, or pthreadVCv.* if you
-use MSVC - where 'v' is the DLL versioning (compatibility) number.
-
-Otherwise, you need to choose carefully and know WHY.
-
-The most important choice you need to make is whether to use a
-version that uses exceptions internally, or not. There are versions
-of the library that use exceptions as part of the thread
-cancelation and exit implementation. The default version uses
-setjmp/longjmp.
-
-There is some contension amongst POSIX threads experts as
-to how POSIX threads cancelation and exit should work
-with languages that use exceptions, e.g. C++ and even C
-(Microsoft's Structured Exceptions).
-
-The issue is: should cancelation of a thread in, say,
-a C++ application cause object destructors and C++ exception
-handlers to be invoked as the stack unwinds during thread
-exit, or not?
-
-There seems to be more opinion in favour of using the
-standard C version of the library (no EH) with C++ applications
-for the reason that this appears to be the assumption commercial
-pthreads implementations make. Therefore, if you use an EH version
-of pthreads-win32 then you may be under the illusion that
-your application will be portable, when in fact it is likely to
-behave differently when linked with other pthreads libraries.
-
-Now you may be asking: then why have you kept the EH versions of
-the library?
-
-There are a couple of reasons:
-- there is division amongst the experts and so the code may
- be needed in the future. Yes, it's in the repository and we
- can get it out anytime in the future, but it would be difficult
- to find.
-- pthreads-win32 is one of the few implementations, and possibly
- the only freely available one, that has EH versions. It may be
- useful to people who want to play with or study application
- behaviour under these conditions.
-
-Notes:
-
-[If you use either pthreadVCE or pthreadGCE]
-
-1. [See also the discussion in the FAQ file - Q2, Q4, and Q5]
-
-If your application contains catch(...) blocks in your POSIX
-threads then you will need to replace the "catch(...)" with the macro
-"PtW32Catch", eg.
-
- #ifdef PtW32Catch
- PtW32Catch {
- ...
- }
- #else
- catch(...) {
- ...
- }
- #endif
-
-Otherwise neither pthreads cancelation nor pthread_exit() will work
-reliably when using versions of the library that use C++ exceptions
-for cancelation and thread exit.
-
-This is due to what is believed to be a C++ compliance error in VC++
-whereby you may not have multiple handlers for the same exception in
-the same try/catch block. GNU G++ doesn't have this restriction.
-
-
-Other name changes
-------------------
-
-All snapshots prior to and including snapshot 2000-08-13
-used "_pthread_" as the prefix to library internal
-functions, and "_PTHREAD_" to many library internal
-macros. These have now been changed to "ptw32_" and "PTW32_"
-respectively so as to not conflict with the ANSI standard's
-reservation of identifiers beginning with "_" and "__" for
-use by compiler implementations only.
-
-If you have written any applications and you are linking
-statically with the pthreads-win32 library then you may have
-included a call to _pthread_processInitialize. You will
-now have to change that to ptw32_processInitialize.
-
-
-Cleanup code default style
---------------------------
-
-Previously, if not defined, the cleanup style was determined automatically
-from the compiler used, and one of the following was defined accordingly:
-
- __CLEANUP_SEH MSVC only
- __CLEANUP_CXX C++, including MSVC++, GNU G++
- __CLEANUP_C C, including GNU GCC, not MSVC
-
-These defines determine the style of cleanup (see pthread.h) and,
-most importantly, the way that cancelation and thread exit (via
-pthread_exit) is performed (see the routine ptw32_throw()).
-
-In short, the exceptions versions of the library throw an exception
-when a thread is canceled, or exits via pthread_exit(). This exception is
-caught by a handler in the thread startup routine, so that the
-the correct stack unwinding occurs regardless of where the thread
-is when it's canceled or exits via pthread_exit().
-
-In this snapshot, unless the build explicitly defines (e.g. via a
-compiler option) __CLEANUP_SEH, __CLEANUP_CXX, or __CLEANUP_C, then
-the build NOW always defaults to __CLEANUP_C style cleanup. This style
-uses setjmp/longjmp in the cancelation and pthread_exit implementations,
-and therefore won't do stack unwinding even when linked to applications
-that have it (e.g. C++ apps). This is for consistency with most/all
-commercial Unix POSIX threads implementations.
-
-Although it was not clearly documented before, it is still necessary to
-build your application using the same __CLEANUP_* define as was
-used for the version of the library that you link with, so that the
-correct parts of pthread.h are included. That is, the possible
-defines require the following library versions:
-
- __CLEANUP_SEH pthreadVSE.dll
- __CLEANUP_CXX pthreadVCE.dll or pthreadGCE.dll
- __CLEANUP_C pthreadVC.dll or pthreadGC.dll
-
-It is recommended that you let pthread.h use it's default __CLEANUP_C
-for both library and application builds. That is, don't define any of
-the above, and then link with pthreadVC.lib (MSVC or MSVC++) and
-libpthreadGC.a (MinGW GCC or G++). The reason is explained below, but
-another reason is that the prebuilt pthreadVCE.dll is currently broken.
-Versions built with MSVC++ later than version 6 may not be broken, but I
-can't verify this yet.
-
-WHY ARE WE MAKING THE DEFAULT STYLE LESS EXCEPTION-FRIENDLY?
-Because no commercial Unix POSIX threads implementation allows you to
-choose to have stack unwinding. Therefore, providing it in pthread-win32
-as a default is dangerous. We still provide the choice but unless
-you consciously choose to do otherwise, your pthreads applications will
-now run or crash in similar ways irrespective of the pthreads platform
-you use. Or at least this is the hope.
-
-
-Building under VC++ using C++ EH, Structured EH, or just C
-----------------------------------------------------------
-
-From the source directory run nmake without any arguments to list
-help information. E.g.
-
-$ nmake
-
-Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
-Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
-
-Run one of the following command lines:
-nmake clean VCE (to build the MSVC dll with C++ exception handling)
-nmake clean VSE (to build the MSVC dll with structured exception handling)
-nmake clean VC (to build the MSVC dll with C cleanup code)
-nmake clean VCE-inlined (to build the MSVC inlined dll with C++ exception handling)
-nmake clean VSE-inlined (to build the MSVC inlined dll with structured exception handling)
-nmake clean VC-inlined (to build the MSVC inlined dll with C cleanup code)
-nmake clean VC-static (to build the MSVC static lib with C cleanup code)
-nmake clean VCE-debug (to build the debug MSVC dll with C++ exception handling)
-nmake clean VSE-debug (to build the debug MSVC dll with structured exception handling)
-nmake clean VC-debug (to build the debug MSVC dll with C cleanup code)
-nmake clean VCE-inlined-debug (to build the debug MSVC inlined dll with C++ exception handling)
-nmake clean VSE-inlined-debug (to build the debug MSVC inlined dll with structured exception handling)
-nmake clean VC-inlined-debug (to build the debug MSVC inlined dll with C cleanup code)
-nmake clean VC-static-debug (to build the debug MSVC static lib with C cleanup code)
-
-
-The pre-built dlls are normally built using the *-inlined targets.
-
-You can run the testsuite by changing to the "tests" directory and
-running nmake. E.g.:
-
-$ cd tests
-$ nmake
-
-Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
-Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
-
-Run one of the following command lines:
-nmake clean VC (to test using VC dll with VC (no EH) applications)
-nmake clean VCX (to test using VC dll with VC++ (EH) applications)
-nmake clean VCE (to test using the VCE dll with VC++ EH applications)
-nmake clean VSE (to test using VSE dll with VC (SEH) applications)
-nmake clean VC-bench (to benchtest using VC dll with C bench app)
-nmake clean VCX-bench (to benchtest using VC dll with C++ bench app)
-nmake clean VCE-bench (to benchtest using VCE dll with C++ bench app)
-nmake clean VSE-bench (to benchtest using VSE dll with SEH bench app)
-nmake clean VC-static (to test using VC static lib with VC (no EH) applications)
-
-
-Building under Mingw32
-----------------------
-
-The dll can be built easily with recent versions of Mingw32.
-(The distributed versions are built using Mingw32 and MsysDTK
-from www.mingw32.org.)
-
-From the source directory, run make for help information. E.g.:
-
-$ make
-Run one of the following command lines:
-make clean GC (to build the GNU C dll with C cleanup code)
-make clean GCE (to build the GNU C dll with C++ exception handling)
-make clean GC-inlined (to build the GNU C inlined dll with C cleanup code)
-make clean GCE-inlined (to build the GNU C inlined dll with C++ exception handling)
-make clean GC-static (to build the GNU C inlined static lib with C cleanup code)
-make clean GC-debug (to build the GNU C debug dll with C cleanup code)
-make clean GCE-debug (to build the GNU C debug dll with C++ exception handling)
-make clean GC-inlined-debug (to build the GNU C inlined debug dll with C cleanup code)
-make clean GCE-inlined-debug (to build the GNU C inlined debug dll with C++ exception handling)
-make clean GC-static-debug (to build the GNU C inlined static debug lib with C cleanup code)
-
-
-The pre-built dlls are normally built using the *-inlined targets.
-
-You can run the testsuite by changing to the "tests" directory and
-running make for help information. E.g.:
-
-$ cd tests
-$ make
-Run one of the following command lines:
-make clean GC (to test using GC dll with C (no EH) applications)
-make clean GCX (to test using GC dll with C++ (EH) applications)
-make clean GCE (to test using GCE dll with C++ (EH) applications)
-make clean GC-bench (to benchtest using GNU C dll with C cleanup code)
-make clean GCE-bench (to benchtest using GNU C dll with C++ exception handling)
-make clean GC-static (to test using GC static lib with C (no EH) applications)
-
-
-Building under Linux using the Mingw32 cross development tools
---------------------------------------------------------------
-
-You can build the library without leaving Linux by using the Mingw32 cross
-development toolchain. See http://www.libsdl.org/extras/win32/cross/ for
-tools and info. The GNUmakefile contains some support for this, for example:
-
-make CROSS=i386-mingw32msvc- clean GC-inlined
-
-will build pthreadGCn.dll and libpthreadGCn.a (n=version#), provided your
-cross-tools/bin directory is in your PATH (or use the cross-make.sh script
-at the URL above).
-
-
-Building the library as a statically linkable library
------------------------------------------------------
-
-General: PTW32_STATIC_LIB must be defined for both the library build and the
-application build. The makefiles supplied and used by the following 'make'
-command lines will define this for you.
-
-MSVC (creates pthreadVCn.lib as a static link lib):
-
-nmake clean VC-static
-
-
-MinGW32 (creates libpthreadGCn.a as a static link lib):
-
-make clean GC-static
-
-
-Define PTW32_STATIC_LIB when building your application. Also, your
-application must call a two non-portable routines to initialise the
-some state on startup and cleanup before exit. One other routine needs
-to be called to cleanup after any Win32 threads have called POSIX API
-routines. See README.NONPORTABLE or the html reference manual pages for
-details on these routines:
-
-BOOL pthread_win32_process_attach_np (void);
-BOOL pthread_win32_process_detach_np (void);
-BOOL pthread_win32_thread_attach_np (void); // Currently a no-op
-BOOL pthread_win32_thread_detach_np (void);
-
-
-The tests makefiles have the same targets but only check that the
-static library is statically linkable. They don't run the full
-testsuite. To run the full testsuite, build the dlls and run the
-dll test targets.
-
-
-Building the library under Cygwin
----------------------------------
-
-Cygwin is implementing it's own POSIX threads routines and these
-will be the ones to use if you develop using Cygwin.
-
-
-Ready to run binaries
----------------------
-
-For convenience, the following ready-to-run files can be downloaded
-from the FTP site (see under "Availability" below):
-
- pthread.h
- semaphore.h
- sched.h
- pthreadVC.dll - built with MSVC compiler using C setjmp/longjmp
- pthreadVC.lib
- pthreadVCE.dll - built with MSVC++ compiler using C++ EH
- pthreadVCE.lib
- pthreadVSE.dll - built with MSVC compiler using SEH
- pthreadVSE.lib
- pthreadGC.dll - built with Mingw32 GCC
- libpthreadGC.a - derived from pthreadGC.dll
- pthreadGCE.dll - built with Mingw32 G++
- libpthreadGCE.a - derived from pthreadGCE.dll
-
-As of August 2003 pthreads-win32 pthreadG* versions are built and tested
-using the MinGW + MsysDTK environment current as of that date or later.
-The following file MAY be needed for older MinGW environments.
-
- gcc.dll - needed to build and run applications that use
- pthreadGCE.dll.
-
-
-Building applications with GNU compilers
-----------------------------------------
-
-If you're using pthreadGC.dll:
-
-With the three header files, pthreadGC.dll and libpthreadGC.a in the
-same directory as your application myapp.c, you could compile, link
-and run myapp.c under Mingw32 as follows:
-
- gcc -o myapp.exe myapp.c -I. -L. -lpthreadGC
- myapp
-
-Or put pthreadGC.dll in an appropriate directory in your PATH,
-put libpthreadGC.a in your system lib directory, and
-put the three header files in your system include directory,
-then use:
-
- gcc -o myapp.exe myapp.c -lpthreadGC
- myapp
-
-
-If you're using pthreadGCE.dll:
-
-With the three header files, pthreadGCE.dll, gcc.dll and libpthreadGCE.a
-in the same directory as your application myapp.c, you could compile,
-link and run myapp.c under Mingw32 as follows:
-
- gcc -x c++ -o myapp.exe myapp.c -I. -L. -lpthreadGCE
- myapp
-
-Or put pthreadGCE.dll and gcc.dll in an appropriate directory in
-your PATH, put libpthreadGCE.a in your system lib directory, and
-put the three header files in your system include directory,
-then use:
-
- gcc -x c++ -o myapp.exe myapp.c -lpthreadGCE
- myapp
-
-
-Availability
-------------
-
-The complete source code in either unbundled, self-extracting
-Zip file, or tar/gzipped format can be found at:
-
- ftp://sources.redhat.com/pub/pthreads-win32
-
-The pre-built DLL, export libraries and matching pthread.h can
-be found at:
-
- ftp://sources.redhat.com/pub/pthreads-win32/dll-latest
-
-Home page:
-
- http://sources.redhat.com/pthreads-win32/
-
-
-Mailing list
-------------
-
-There is a mailing list for discussing pthreads on Win32.
-To join, send email to:
-
- pthreads-win32-subscribe@sources.redhat.com
-
-Unsubscribe by sending mail to:
-
- pthreads-win32-unsubscribe@sources.redhat.com
-
-
-Acknowledgements
-----------------
-
-See the ANNOUNCE file for acknowledgements.
-See the 'CONTRIBUTORS' file for the list of contributors.
-
-As much as possible, the ChangeLog file attributes
-contributions and patches that have been incorporated
-in the library to the individuals responsible.
-
-Finally, thanks to all those who work on and contribute to the
-POSIX and Single Unix Specification standards. The maturity of an
-industry can be measured by it's open standards.
-
-----
-Ross Johnson
-<rpj@callisto.canberra.edu.au>
-
-
-
-
-
-
-
-
diff --git a/libs/pthreads/docs/TODO b/libs/pthreads/docs/TODO
deleted file mode 100644
index fa9efc46e7..0000000000
--- a/libs/pthreads/docs/TODO
+++ /dev/null
@@ -1,7 +0,0 @@
- Things that aren't done yet
- ---------------------------
-
-1. Implement PTHREAD_PROCESS_SHARED for semaphores, mutexes,
- condition variables, read/write locks, barriers.
-
-
diff --git a/libs/pthreads/docs/WinCE-PORT b/libs/pthreads/docs/WinCE-PORT
deleted file mode 100644
index 7bcfdea6cc..0000000000
--- a/libs/pthreads/docs/WinCE-PORT
+++ /dev/null
@@ -1,222 +0,0 @@
-NOTE: The comments in this file relate to the original WinCE port
-done by Tristan Savatier. The semaphore routines have been
-completely rewritten since (2005-04-25), having been progressively
-broken more and more by changes to the library. All of the semaphore
-routines implemented for W9x/WNT/2000 and up should now also work for
-WinCE. Also, pthread_mutex_timedlock should now work.
-
-Additional WinCE updates have been applied since this as well. Check the
-ChangeLog file and search for WINCE for example. (2007-01-07)
-
-[RPJ]
-
-----
-
-Some interesting news:
-
-I have been able to port pthread-win32 to Windows-CE,
-which uses a subset of the WIN32 API.
-
-Since we intend to keep using pthread-win32 for our
-Commercial WinCE developments, I would be very interested
-if WinCE support could be added to the main source tree
-of pthread-win32. Also, I would like to be credited
-for this port :-)
-
-Now, here is the story...
-
-The port was performed and tested on a Casio "Cassiopeia"
-PalmSize PC, which runs a MIP processor. The OS in the
-Casio is WinCE version 2.11, but I used VC++ 6.0 with
-the WinCE SDK for version 2.01.
-
-I used pthread-win32 to port a heavily multithreaded
-commercial application (real-time MPEG video player)
-from Linux to WinCE. I consider the changes that
-I have done to be quite well tested.
-
-Overall the modifications that we had to do are minor.
-
-The WinCE port were based on pthread-win32-snap-1999-05-30,
-but I am certain that they can be integrated very easiely
-to more recent versions of the source.
-
-I have attached the modified source code:
-pthread-win32-snap-1999-05-30-WinCE.
-
-All the changes do not affect the code compiled on non-WinCE
-environment, provided that the macros used for WinCE compilation
-are not used, of course!
-
-Overall description of the WinCE port:
--------------------------------------
-
-Most of the changes had to be made in areas where
-pthread-win32 was relying on some standard-C librairies
-(e.g. _ftime, calloc, errno), which are not available
-on WinCE. We have changed the code to use native Win32
-API instead (or in some cases we made wrappers).
-
-The Win32 Semaphores are not available,
-so we had to re-implement Semaphores using mutexes
-and events.
-
-Limitations / known problems of the WinCE port:
-----------------------------------------------
-
-Not all the semaphore routines have been ported
-(semaphores are defined by Posix but are not part
-pf pthread). I have just done enough to make
-pthread routines (that rely internally on semaphores)
-work, like signal conditions.
-
-I noticed that the Win32 threads work slightly
-differently on WinCE. This may have some impact
-on some tricky parts of pthread-win32, but I have
-not really investigated. For example, on WinCE,
-the process is killed if the main thread falls off
-the bottom (or calls pthread_exit), regardless
-of the existence of any other detached thread.
-Microsoft manual indicates that this behavior is
-deffirent from that of Windows Threads for other
-Win32 platforms.
-
-
-Detailed descriptions of the changes and rationals:
-
-------------------------------------
-- use a new macro NEED_ERRNO.
-
-If defined, the code in errno.c that defines a reentrant errno
-is compiled, regardless of _MT and _REENTRANT.
-
-Rational: On WinCE, there is no support for <stdio.h>, <errno.h> or
-any other standard C library, i.e. even if _MT or _REENTRANT
-is defined, errno is not provided by any library. NEED_ERRNO
-must be set to compile for WinCE.
-
-------------------------------------
-- In implement.h, change #include <semaphore.h> to #include "semaphore.h".
-
-Rational: semaphore.h is provided in pthread-win32 and should not
-be searched in the systems standard include. would not compile.
-This change does not seem to create problems on "classic" win32
-(e.g. win95).
-
-------------------------------------
-- use a new macro NEED_CALLOC.
-
-If defined, some code in misc.c will provide a replacement
-for calloc, which is not available on Win32.
-
-
-------------------------------------
-- use a new macro NEED_CREATETHREAD.
-
-If defined, implement.h defines the macro _beginthreadex
-and _endthreadex.
-
-Rational: On WinCE, the wrappers _beginthreadex and _endthreadex
-do not exist. The native Win32 routines must be used.
-
-------------------------------------
-- in misc.c:
-
-#ifdef NEED_DUPLICATEHANDLE
- /* DuplicateHandle does not exist on WinCE */
- self->threadH = GetCurrentThread();
-#else
- if( !DuplicateHandle(
- GetCurrentProcess(),
- GetCurrentThread(),
- GetCurrentProcess(),
- &self->threadH,
- 0,
- FALSE,
- DUPLICATE_SAME_ACCESS ) )
- {
- free( self );
- return (NULL);
- }
-#endif
-
-Rational: On WinCE, DuplicateHandle does not exist. I could not understand
-why DuplicateHandle must be used. It seems to me that getting the current
-thread handle with GetCurrentThread() is sufficient, and it seems to work
-perfectly fine, so maybe DuplicateHandle was just plain useless to begin with ?
-
-------------------------------------
-- In private.c, added some code at the beginning of ptw32_processInitialize
-to detect the case of multiple calls to ptw32_processInitialize.
-
-Rational: In order to debug pthread-win32, it is easier to compile
-it as a regular library (it is not possible to debug DLL's on winCE).
-In that case, the application must call ptw32_rocessInitialize()
-explicitely, to initialize pthread-win32. It is safer in this circumstance
-to handle the case where ptw32_processInitialize() is called on
-an already initialized library:
-
-int
-ptw32_processInitialize (void)
-{
- if (ptw32_processInitialized) {
- /*
- * ignore if already initialized. this is useful for
- * programs that uses a non-dll pthread
- * library. such programs must call ptw32_processInitialize() explicitely,
- * since this initialization routine is automatically called only when
- * the dll is loaded.
- */
- return TRUE;
- }
- ptw32_processInitialized = TRUE;
- [...]
-}
-
-------------------------------------
-- in private.c, if macro NEED_FTIME is defined, add routines to
-convert timespec_to_filetime and filetime_to_timespec, and modified
-code that was using _ftime() to use Win32 API instead.
-
-Rational: _ftime is not available on WinCE. It is necessary to use
-the native Win32 time API instead.
-
-Note: the routine timespec_to_filetime is provided as a convenience and a mean
-to test that filetime_to_timespec works, but it is not used by the library.
-
-------------------------------------
-- in semaphore.c, if macro NEED_SEM is defined, add code for the routines
-_increase_semaphore and _decrease_semaphore, and modify significantly
-the implementation of the semaphores so that it does not use CreateSemaphore.
-
-Rational: CreateSemaphore is not available on WinCE. I had to re-implement
-semaphores using mutexes and Events.
-
-Note: Only the semaphore routines that are used by pthread are implemented
-(i.e. signal conditions rely on a subset of the semaphores routines, and
-this subset works). Some other semaphore routines (e.g. sem_trywait) are
-not yet supported on my WinCE port (and since I don't need them, I am not
-planning to do anything about them).
-
-------------------------------------
-- in tsd.c, changed the code that defines TLS_OUT_OF_INDEXES
-
-/* TLS_OUT_OF_INDEXES not defined on WinCE */
-#ifndef TLS_OUT_OF_INDEXES
-#define TLS_OUT_OF_INDEXES 0xffffffff
-#endif
-
-Rational: TLS_OUT_OF_INDEXES is not defined in any standard include file
-on WinCE.
-
-------------------------------------
-- added file need_errno.h
-
-Rational: On WinCE, there is no errno.h file. need_errno.h is just a
-copy of windows version of errno.h, with minor modifications due to the fact
-that some of the error codes are defined by the WinCE socket library.
-In pthread.h, if NEED_ERRNO is defined, the file need_errno.h is
-included (instead of <errno.h>).
-
-
--- eof
diff --git a/libs/zlib/docs/FAQ b/libs/zlib/docs/FAQ
deleted file mode 100644
index 99b7cf92e4..0000000000
--- a/libs/zlib/docs/FAQ
+++ /dev/null
@@ -1,368 +0,0 @@
-
- Frequently Asked Questions about zlib
-
-
-If your question is not there, please check the zlib home page
-http://zlib.net/ which may have more recent information.
-The lastest zlib FAQ is at http://zlib.net/zlib_faq.html
-
-
- 1. Is zlib Y2K-compliant?
-
- Yes. zlib doesn't handle dates.
-
- 2. Where can I get a Windows DLL version?
-
- The zlib sources can be compiled without change to produce a DLL. See the
- file win32/DLL_FAQ.txt in the zlib distribution. Pointers to the
- precompiled DLL are found in the zlib web site at http://zlib.net/ .
-
- 3. Where can I get a Visual Basic interface to zlib?
-
- See
- * http://marknelson.us/1997/01/01/zlib-engine/
- * win32/DLL_FAQ.txt in the zlib distribution
-
- 4. compress() returns Z_BUF_ERROR.
-
- Make sure that before the call of compress(), the length of the compressed
- buffer is equal to the available size of the compressed buffer and not
- zero. For Visual Basic, check that this parameter is passed by reference
- ("as any"), not by value ("as long").
-
- 5. deflate() or inflate() returns Z_BUF_ERROR.
-
- Before making the call, make sure that avail_in and avail_out are not zero.
- When setting the parameter flush equal to Z_FINISH, also make sure that
- avail_out is big enough to allow processing all pending input. Note that a
- Z_BUF_ERROR is not fatal--another call to deflate() or inflate() can be
- made with more input or output space. A Z_BUF_ERROR may in fact be
- unavoidable depending on how the functions are used, since it is not
- possible to tell whether or not there is more output pending when
- strm.avail_out returns with zero. See http://zlib.net/zlib_how.html for a
- heavily annotated example.
-
- 6. Where's the zlib documentation (man pages, etc.)?
-
- It's in zlib.h . Examples of zlib usage are in the files test/example.c
- and test/minigzip.c, with more in examples/ .
-
- 7. Why don't you use GNU autoconf or libtool or ...?
-
- Because we would like to keep zlib as a very small and simple package.
- zlib is rather portable and doesn't need much configuration.
-
- 8. I found a bug in zlib.
-
- Most of the time, such problems are due to an incorrect usage of zlib.
- Please try to reproduce the problem with a small program and send the
- corresponding source to us at zlib@gzip.org . Do not send multi-megabyte
- data files without prior agreement.
-
- 9. Why do I get "undefined reference to gzputc"?
-
- If "make test" produces something like
-
- example.o(.text+0x154): undefined reference to `gzputc'
-
- check that you don't have old files libz.* in /usr/lib, /usr/local/lib or
- /usr/X11R6/lib. Remove any old versions, then do "make install".
-
-10. I need a Delphi interface to zlib.
-
- See the contrib/delphi directory in the zlib distribution.
-
-11. Can zlib handle .zip archives?
-
- Not by itself, no. See the directory contrib/minizip in the zlib
- distribution.
-
-12. Can zlib handle .Z files?
-
- No, sorry. You have to spawn an uncompress or gunzip subprocess, or adapt
- the code of uncompress on your own.
-
-13. How can I make a Unix shared library?
-
- By default a shared (and a static) library is built for Unix. So:
-
- make distclean
- ./configure
- make
-
-14. How do I install a shared zlib library on Unix?
-
- After the above, then:
-
- make install
-
- However, many flavors of Unix come with a shared zlib already installed.
- Before going to the trouble of compiling a shared version of zlib and
- trying to install it, you may want to check if it's already there! If you
- can #include <zlib.h>, it's there. The -lz option will probably link to
- it. You can check the version at the top of zlib.h or with the
- ZLIB_VERSION symbol defined in zlib.h .
-
-15. I have a question about OttoPDF.
-
- We are not the authors of OttoPDF. The real author is on the OttoPDF web
- site: Joel Hainley, jhainley@myndkryme.com.
-
-16. Can zlib decode Flate data in an Adobe PDF file?
-
- Yes. See http://www.pdflib.com/ . To modify PDF forms, see
- http://sourceforge.net/projects/acroformtool/ .
-
-17. Why am I getting this "register_frame_info not found" error on Solaris?
-
- After installing zlib 1.1.4 on Solaris 2.6, running applications using zlib
- generates an error such as:
-
- ld.so.1: rpm: fatal: relocation error: file /usr/local/lib/libz.so:
- symbol __register_frame_info: referenced symbol not found
-
- The symbol __register_frame_info is not part of zlib, it is generated by
- the C compiler (cc or gcc). You must recompile applications using zlib
- which have this problem. This problem is specific to Solaris. See
- http://www.sunfreeware.com for Solaris versions of zlib and applications
- using zlib.
-
-18. Why does gzip give an error on a file I make with compress/deflate?
-
- The compress and deflate functions produce data in the zlib format, which
- is different and incompatible with the gzip format. The gz* functions in
- zlib on the other hand use the gzip format. Both the zlib and gzip formats
- use the same compressed data format internally, but have different headers
- and trailers around the compressed data.
-
-19. Ok, so why are there two different formats?
-
- The gzip format was designed to retain the directory information about a
- single file, such as the name and last modification date. The zlib format
- on the other hand was designed for in-memory and communication channel
- applications, and has a much more compact header and trailer and uses a
- faster integrity check than gzip.
-
-20. Well that's nice, but how do I make a gzip file in memory?
-
- You can request that deflate write the gzip format instead of the zlib
- format using deflateInit2(). You can also request that inflate decode the
- gzip format using inflateInit2(). Read zlib.h for more details.
-
-21. Is zlib thread-safe?
-
- Yes. However any library routines that zlib uses and any application-
- provided memory allocation routines must also be thread-safe. zlib's gz*
- functions use stdio library routines, and most of zlib's functions use the
- library memory allocation routines by default. zlib's *Init* functions
- allow for the application to provide custom memory allocation routines.
-
- Of course, you should only operate on any given zlib or gzip stream from a
- single thread at a time.
-
-22. Can I use zlib in my commercial application?
-
- Yes. Please read the license in zlib.h.
-
-23. Is zlib under the GNU license?
-
- No. Please read the license in zlib.h.
-
-24. The license says that altered source versions must be "plainly marked". So
- what exactly do I need to do to meet that requirement?
-
- You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h. In
- particular, the final version number needs to be changed to "f", and an
- identification string should be appended to ZLIB_VERSION. Version numbers
- x.x.x.f are reserved for modifications to zlib by others than the zlib
- maintainers. For example, if the version of the base zlib you are altering
- is "1.2.3.4", then in zlib.h you should change ZLIB_VERNUM to 0x123f, and
- ZLIB_VERSION to something like "1.2.3.f-zachary-mods-v3". You can also
- update the version strings in deflate.c and inftrees.c.
-
- For altered source distributions, you should also note the origin and
- nature of the changes in zlib.h, as well as in ChangeLog and README, along
- with the dates of the alterations. The origin should include at least your
- name (or your company's name), and an email address to contact for help or
- issues with the library.
-
- Note that distributing a compiled zlib library along with zlib.h and
- zconf.h is also a source distribution, and so you should change
- ZLIB_VERSION and ZLIB_VERNUM and note the origin and nature of the changes
- in zlib.h as you would for a full source distribution.
-
-25. Will zlib work on a big-endian or little-endian architecture, and can I
- exchange compressed data between them?
-
- Yes and yes.
-
-26. Will zlib work on a 64-bit machine?
-
- Yes. It has been tested on 64-bit machines, and has no dependence on any
- data types being limited to 32-bits in length. If you have any
- difficulties, please provide a complete problem report to zlib@gzip.org
-
-27. Will zlib decompress data from the PKWare Data Compression Library?
-
- No. The PKWare DCL uses a completely different compressed data format than
- does PKZIP and zlib. However, you can look in zlib's contrib/blast
- directory for a possible solution to your problem.
-
-28. Can I access data randomly in a compressed stream?
-
- No, not without some preparation. If when compressing you periodically use
- Z_FULL_FLUSH, carefully write all the pending data at those points, and
- keep an index of those locations, then you can start decompression at those
- points. You have to be careful to not use Z_FULL_FLUSH too often, since it
- can significantly degrade compression. Alternatively, you can scan a
- deflate stream once to generate an index, and then use that index for
- random access. See examples/zran.c .
-
-29. Does zlib work on MVS, OS/390, CICS, etc.?
-
- It has in the past, but we have not heard of any recent evidence. There
- were working ports of zlib 1.1.4 to MVS, but those links no longer work.
- If you know of recent, successful applications of zlib on these operating
- systems, please let us know. Thanks.
-
-30. Is there some simpler, easier to read version of inflate I can look at to
- understand the deflate format?
-
- First off, you should read RFC 1951. Second, yes. Look in zlib's
- contrib/puff directory.
-
-31. Does zlib infringe on any patents?
-
- As far as we know, no. In fact, that was originally the whole point behind
- zlib. Look here for some more information:
-
- http://www.gzip.org/#faq11
-
-32. Can zlib work with greater than 4 GB of data?
-
- Yes. inflate() and deflate() will process any amount of data correctly.
- Each call of inflate() or deflate() is limited to input and output chunks
- of the maximum value that can be stored in the compiler's "unsigned int"
- type, but there is no limit to the number of chunks. Note however that the
- strm.total_in and strm_total_out counters may be limited to 4 GB. These
- counters are provided as a convenience and are not used internally by
- inflate() or deflate(). The application can easily set up its own counters
- updated after each call of inflate() or deflate() to count beyond 4 GB.
- compress() and uncompress() may be limited to 4 GB, since they operate in a
- single call. gzseek() and gztell() may be limited to 4 GB depending on how
- zlib is compiled. See the zlibCompileFlags() function in zlib.h.
-
- The word "may" appears several times above since there is a 4 GB limit only
- if the compiler's "long" type is 32 bits. If the compiler's "long" type is
- 64 bits, then the limit is 16 exabytes.
-
-33. Does zlib have any security vulnerabilities?
-
- The only one that we are aware of is potentially in gzprintf(). If zlib is
- compiled to use sprintf() or vsprintf(), then there is no protection
- against a buffer overflow of an 8K string space (or other value as set by
- gzbuffer()), other than the caller of gzprintf() assuring that the output
- will not exceed 8K. On the other hand, if zlib is compiled to use
- snprintf() or vsnprintf(), which should normally be the case, then there is
- no vulnerability. The ./configure script will display warnings if an
- insecure variation of sprintf() will be used by gzprintf(). Also the
- zlibCompileFlags() function will return information on what variant of
- sprintf() is used by gzprintf().
-
- If you don't have snprintf() or vsnprintf() and would like one, you can
- find a portable implementation here:
-
- http://www.ijs.si/software/snprintf/
-
- Note that you should be using the most recent version of zlib. Versions
- 1.1.3 and before were subject to a double-free vulnerability, and versions
- 1.2.1 and 1.2.2 were subject to an access exception when decompressing
- invalid compressed data.
-
-34. Is there a Java version of zlib?
-
- Probably what you want is to use zlib in Java. zlib is already included
- as part of the Java SDK in the java.util.zip package. If you really want
- a version of zlib written in the Java language, look on the zlib home
- page for links: http://zlib.net/ .
-
-35. I get this or that compiler or source-code scanner warning when I crank it
- up to maximally-pedantic. Can't you guys write proper code?
-
- Many years ago, we gave up attempting to avoid warnings on every compiler
- in the universe. It just got to be a waste of time, and some compilers
- were downright silly as well as contradicted each other. So now, we simply
- make sure that the code always works.
-
-36. Valgrind (or some similar memory access checker) says that deflate is
- performing a conditional jump that depends on an uninitialized value.
- Isn't that a bug?
-
- No. That is intentional for performance reasons, and the output of deflate
- is not affected. This only started showing up recently since zlib 1.2.x
- uses malloc() by default for allocations, whereas earlier versions used
- calloc(), which zeros out the allocated memory. Even though the code was
- correct, versions 1.2.4 and later was changed to not stimulate these
- checkers.
-
-37. Will zlib read the (insert any ancient or arcane format here) compressed
- data format?
-
- Probably not. Look in the comp.compression FAQ for pointers to various
- formats and associated software.
-
-38. How can I encrypt/decrypt zip files with zlib?
-
- zlib doesn't support encryption. The original PKZIP encryption is very
- weak and can be broken with freely available programs. To get strong
- encryption, use GnuPG, http://www.gnupg.org/ , which already includes zlib
- compression. For PKZIP compatible "encryption", look at
- http://www.info-zip.org/
-
-39. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings?
-
- "gzip" is the gzip format, and "deflate" is the zlib format. They should
- probably have called the second one "zlib" instead to avoid confusion with
- the raw deflate compressed data format. While the HTTP 1.1 RFC 2616
- correctly points to the zlib specification in RFC 1950 for the "deflate"
- transfer encoding, there have been reports of servers and browsers that
- incorrectly produce or expect raw deflate data per the deflate
- specification in RFC 1951, most notably Microsoft. So even though the
- "deflate" transfer encoding using the zlib format would be the more
- efficient approach (and in fact exactly what the zlib format was designed
- for), using the "gzip" transfer encoding is probably more reliable due to
- an unfortunate choice of name on the part of the HTTP 1.1 authors.
-
- Bottom line: use the gzip format for HTTP 1.1 encoding.
-
-40. Does zlib support the new "Deflate64" format introduced by PKWare?
-
- No. PKWare has apparently decided to keep that format proprietary, since
- they have not documented it as they have previous compression formats. In
- any case, the compression improvements are so modest compared to other more
- modern approaches, that it's not worth the effort to implement.
-
-41. I'm having a problem with the zip functions in zlib, can you help?
-
- There are no zip functions in zlib. You are probably using minizip by
- Giles Vollant, which is found in the contrib directory of zlib. It is not
- part of zlib. In fact none of the stuff in contrib is part of zlib. The
- files in there are not supported by the zlib authors. You need to contact
- the authors of the respective contribution for help.
-
-42. The match.asm code in contrib is under the GNU General Public License.
- Since it's part of zlib, doesn't that mean that all of zlib falls under the
- GNU GPL?
-
- No. The files in contrib are not part of zlib. They were contributed by
- other authors and are provided as a convenience to the user within the zlib
- distribution. Each item in contrib has its own license.
-
-43. Is zlib subject to export controls? What is its ECCN?
-
- zlib is not subject to export controls, and so is classified as EAR99.
-
-44. Can you please sign these lengthy legal documents and fax them back to us
- so that we can use your software in our product?
-
- No. Go away. Shoo.
diff --git a/libs/zlib/docs/INDEX b/libs/zlib/docs/INDEX
deleted file mode 100644
index 2ba0641204..0000000000
--- a/libs/zlib/docs/INDEX
+++ /dev/null
@@ -1,68 +0,0 @@
-CMakeLists.txt cmake build file
-ChangeLog history of changes
-FAQ Frequently Asked Questions about zlib
-INDEX this file
-Makefile dummy Makefile that tells you to ./configure
-Makefile.in template for Unix Makefile
-README guess what
-configure configure script for Unix
-make_vms.com makefile for VMS
-test/example.c zlib usages examples for build testing
-test/minigzip.c minimal gzip-like functionality for build testing
-test/infcover.c inf*.c code coverage for build coverage testing
-treebuild.xml XML description of source file dependencies
-zconf.h.cmakein zconf.h template for cmake
-zconf.h.in zconf.h template for configure
-zlib.3 Man page for zlib
-zlib.3.pdf Man page in PDF format
-zlib.map Linux symbol information
-zlib.pc.in Template for pkg-config descriptor
-zlib.pc.cmakein zlib.pc template for cmake
-zlib2ansi perl script to convert source files for C++ compilation
-
-amiga/ makefiles for Amiga SAS C
-as400/ makefiles for AS/400
-doc/ documentation for formats and algorithms
-msdos/ makefiles for MSDOS
-nintendods/ makefile for Nintendo DS
-old/ makefiles for various architectures and zlib documentation
- files that have not yet been updated for zlib 1.2.x
-qnx/ makefiles for QNX
-watcom/ makefiles for OpenWatcom
-win32/ makefiles for Windows
-
- zlib public header files (required for library use):
-zconf.h
-zlib.h
-
- private source files used to build the zlib library:
-adler32.c
-compress.c
-crc32.c
-crc32.h
-deflate.c
-deflate.h
-gzclose.c
-gzguts.h
-gzlib.c
-gzread.c
-gzwrite.c
-infback.c
-inffast.c
-inffast.h
-inffixed.h
-inflate.c
-inflate.h
-inftrees.c
-inftrees.h
-trees.c
-trees.h
-uncompr.c
-zutil.c
-zutil.h
-
- source files for sample programs
-See examples/README.examples
-
- unsupported contributions by third parties
-See contrib/README.contrib