ViewVC logotype

Diff of /code/trunk/ChangeLog

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 83 by nigel, Sat Feb 24 21:41:06 2007 UTC revision 89 by nigel, Sat Feb 24 21:41:27 2007 UTC
# Line 1  Line 1 
1  ChangeLog for PCRE  ChangeLog for PCRE
2  ------------------  ------------------
4    Version 6.6 06-Feb-06
5    ---------------------
7     1. Change 16(a) for 6.5 broke things, because PCRE_DATA_SCOPE was not defined
8        in pcreposix.h. I have copied the definition from pcre.h.
10     2. Change 25 for 6.5 broke compilation in a build directory out-of-tree
11        because pcre.h is no longer a built file.
13     3. Added Jeff Friedl's additional debugging patches to pcregrep. These are
14        not normally included in the compiled code.
17    Version 6.5 01-Feb-06
18    ---------------------
20     1. When using the partial match feature with pcre_dfa_exec(), it was not
21        anchoring the second and subsequent partial matches at the new starting
22        point. This could lead to incorrect results. For example, with the pattern
23        /1234/, partially matching against "123" and then "a4" gave a match.
25     2. Changes to pcregrep:
27        (a) All non-match returns from pcre_exec() were being treated as failures
28            to match the line. Now, unless the error is PCRE_ERROR_NOMATCH, an
29            error message is output. Some extra information is given for the
31            probably the only errors that are likely to be caused by users (by
32            specifying a regex that has nested indefinite repeats, for instance).
33            If there are more than 20 of these errors, pcregrep is abandoned.
35        (b) A binary zero was treated as data while matching, but terminated the
36            output line if it was written out. This has been fixed: binary zeroes
37            are now no different to any other data bytes.
39        (c) Whichever of the LC_ALL or LC_CTYPE environment variables is set is
40            used to set a locale for matching. The --locale=xxxx long option has
41            been added (no short equivalent) to specify a locale explicitly on the
42            pcregrep command, overriding the environment variables.
44        (d) When -B was used with -n, some line numbers in the output were one less
45            than they should have been.
47        (e) Added the -o (--only-matching) option.
49        (f) If -A or -C was used with -c (count only), some lines of context were
50            accidentally printed for the final match.
52        (g) Added the -H (--with-filename) option.
54        (h) The combination of options -rh failed to suppress file names for files
55            that were found from directory arguments.
57        (i) Added the -D (--devices) and -d (--directories) options.
59        (j) Added the -F (--fixed-strings) option.
61        (k) Allow "-" to be used as a file name for -f as well as for a data file.
63        (l) Added the --colo(u)r option.
65        (m) Added Jeffrey Friedl's -S testing option, but within #ifdefs so that it
66            is not present by default.
68     3. A nasty bug was discovered in the handling of recursive patterns, that is,
69        items such as (?R) or (?1), when the recursion could match a number of
70        alternatives. If it matched one of the alternatives, but subsequently,
71        outside the recursion, there was a failure, the code tried to back up into
72        the recursion. However, because of the way PCRE is implemented, this is not
73        possible, and the result was an incorrect result from the match.
75        In order to prevent this happening, the specification of recursion has
76        been changed so that all such subpatterns are automatically treated as
77        atomic groups. Thus, for example, (?R) is treated as if it were (?>(?R)).
79     4. I had overlooked the fact that, in some locales, there are characters for
80        which isalpha() is true but neither isupper() nor islower() are true. In
81        the fr_FR locale, for instance, the \xAA and \xBA characters (ordmasculine
82        and ordfeminine) are like this. This affected the treatment of \w and \W
83        when they appeared in character classes, but not when they appeared outside
84        a character class. The bit map for "word" characters is now created
85        separately from the results of isalnum() instead of just taking it from the
86        upper, lower, and digit maps. (Plus the underscore character, of course.)
88     5. The above bug also affected the handling of POSIX character classes such as
89        [[:alpha:]] and [[:alnum:]]. These do not have their own bit maps in PCRE's
90        permanent tables. Instead, the bit maps for such a class were previously
91        created as the appropriate unions of the upper, lower, and digit bitmaps.
92        Now they are created by subtraction from the [[:word:]] class, which has
93        its own bitmap.
95     6. The [[:blank:]] character class matches horizontal, but not vertical space.
96        It is created by subtracting the vertical space characters (\x09, \x0a,
97        \x0b, \x0c) from the [[:space:]] bitmap. Previously, however, the
98        subtraction was done in the overall bitmap for a character class, meaning
99        that a class such as [\x0c[:blank:]] was incorrect because \x0c would not
100        be recognized. This bug has been fixed.
102     7. Patches from the folks at Google:
104          (a) pcrecpp.cc: "to handle a corner case that may or may not happen in
105          real life, but is still worth protecting against".
107          (b) pcrecpp.cc: "corrects a bug when negative radixes are used with
108          regular expressions".
110          (c) pcre_scanner.cc: avoid use of std::count() because not all systems
111          have it.
113          (d) Split off pcrecpparg.h from pcrecpp.h and had the former built by
114          "configure" and the latter not, in order to fix a problem somebody had
115          with compiling the Arg class on HP-UX.
117          (e) Improve the error-handling of the C++ wrapper a little bit.
119          (f) New tests for checking recursion limiting.
121     8. The pcre_memmove() function, which is used only if the environment does not
122        have a standard memmove() function (and is therefore rarely compiled),
123        contained two bugs: (a) use of int instead of size_t, and (b) it was not
124        returning a result (though PCRE never actually uses the result).
126     9. In the POSIX regexec() interface, if nmatch is specified as a ridiculously
127        large number - greater than INT_MAX/(3*sizeof(int)) - REG_ESPACE is
128        returned instead of calling malloc() with an overflowing number that would
129        most likely cause subsequent chaos.
131    10. The debugging option of pcretest was not showing the NO_AUTO_CAPTURE flag.
133    11. The POSIX flag REG_NOSUB is now supported. When a pattern that was compiled
134        with this option is matched, the nmatch and pmatch options of regexec() are
135        ignored.
137    12. Added REG_UTF8 to the POSIX interface. This is not defined by POSIX, but is
138        provided in case anyone wants to the the POSIX interface with UTF-8
139        strings.
141    13. Added CXXLDFLAGS to the Makefile parameters to provide settings only on the
142        C++ linking (needed for some HP-UX environments).
144    14. Avoid compiler warnings in get_ucpname() when compiled without UCP support
145        (unused parameter) and in the pcre_printint() function (omitted "default"
146        switch label when the default is to do nothing).
148    15. Added some code to make it possible, when PCRE is compiled as a C++
149        library, to replace subject pointers for pcre_exec() with a smart pointer
150        class, thus making it possible to process discontinuous strings.
152    16. The two macros PCRE_EXPORT and PCRE_DATA_SCOPE are confusing, and perform
153        much the same function. They were added by different people who were trying
154        to make PCRE easy to compile on non-Unix systems. It has been suggested
155        that PCRE_EXPORT be abolished now that there is more automatic apparatus
156        for compiling on Windows systems. I have therefore replaced it with
157        PCRE_DATA_SCOPE. This is set automatically for Windows; if not set it
158        defaults to "extern" for C or "extern C" for C++, which works fine on
159        Unix-like systems. It is now possible to override the value of PCRE_DATA_
160        SCOPE with something explicit in config.h. In addition:
162        (a) pcreposix.h still had just "extern" instead of either of these macros;
163            I have replaced it with PCRE_DATA_SCOPE.
165        (b) Functions such as _pcre_xclass(), which are internal to the library,
166            but external in the C sense, all had PCRE_EXPORT in their definitions.
167            This is apparently wrong for the Windows case, so I have removed it.
168            (It makes no difference on Unix-like systems.)
170    17. Added a new limit, MATCH_LIMIT_RECURSION, which limits the depth of nesting
171        of recursive calls to match(). This is different to MATCH_LIMIT because
172        that limits the total number of calls to match(), not all of which increase
173        the depth of recursion. Limiting the recursion depth limits the amount of
174        stack (or heap if NO_RECURSE is set) that is used. The default can be set
175        when PCRE is compiled, and changed at run time. A patch from Google adds
176        this functionality to the C++ interface.
178    18. Changes to the handling of Unicode character properties:
180        (a) Updated the table to Unicode 4.1.0.
182        (b) Recognize characters that are not in the table as "Cn" (undefined).
184        (c) I revised the way the table is implemented to a much improved format
185            which includes recognition of ranges. It now supports the ranges that
186            are defined in UnicodeData.txt, and it also amalgamates other
187            characters into ranges. This has reduced the number of entries in the
188            table from around 16,000 to around 3,000, thus reducing its size
189            considerably. I realized I did not need to use a tree structure after
190            all - a binary chop search is just as efficient. Having reduced the
191            number of entries, I extended their size from 6 bytes to 8 bytes to
192            allow for more data.
194        (d) Added support for Unicode script names via properties such as \p{Han}.
196    19. In UTF-8 mode, a backslash followed by a non-Ascii character was not
197        matching that character.
199    20. When matching a repeated Unicode property with a minimum greater than zero,
200        (for example \pL{2,}), PCRE could look past the end of the subject if it
201        reached it while seeking the minimum number of characters. This could
202        happen only if some of the characters were more than one byte long, because
203        there is a check for at least the minimum number of bytes.
205    21. Refactored the implementation of \p and \P so as to be more general, to
206        allow for more different types of property in future. This has changed the
207        compiled form incompatibly. Anybody with saved compiled patterns that use
208        \p or \P will have to recompile them.
210    22. Added "Any" and "L&" to the supported property types.
212    23. Recognize \x{...} as a code point specifier, even when not in UTF-8 mode,
213        but give a compile time error if the value is greater than 0xff.
215    24. The man pages for pcrepartial, pcreprecompile, and pcre_compile2 were
216        accidentally not being installed or uninstalled.
218    25. The pcre.h file was built from pcre.h.in, but the only changes that were
219        made were to insert the current release number. This seemed silly, because
220        it made things harder for people building PCRE on systems that don't run
221        "configure". I have turned pcre.h into a distributed file, no longer built
222        by "configure", with the version identification directly included. There is
223        no longer a pcre.h.in file.
225        However, this change necessitated a change to the pcre-config script as
226        well. It is built from pcre-config.in, and one of the substitutions was the
227        release number. I have updated configure.ac so that ./configure now finds
228        the release number by grepping pcre.h.
230    26. Added the ability to run the tests under valgrind.
233    Version 6.4 05-Sep-05
234    ---------------------
236     1. Change 6.0/10/(l) to pcregrep introduced a bug that caused separator lines
237        "--" to be printed when multiple files were scanned, even when none of the
238        -A, -B, or -C options were used. This is not compatible with Gnu grep, so I
239        consider it to be a bug, and have restored the previous behaviour.
241     2. A couple of code tidies to get rid of compiler warnings.
243     3. The pcretest program used to cheat by referring to symbols in the library
244        whose names begin with _pcre_. These are internal symbols that are not
245        really supposed to be visible externally, and in some environments it is
246        possible to suppress them. The cheating is now confined to including
247        certain files from the library's source, which is a bit cleaner.
249     4. Renamed pcre.in as pcre.h.in to go with pcrecpp.h.in; it also makes the
250        file's purpose clearer.
252     5. Reorganized pcre_ucp_findchar().
255  Version 6.3 15-Aug-05  Version 6.3 15-Aug-05
256  ---------------------  ---------------------

Removed from v.83  
changed lines
  Added in v.89

  ViewVC Help
Powered by ViewVC 1.1.5