summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2008-08-25 18:28:05 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2008-08-25 18:28:05 +0000
commitd68f7d9fa6a81170dd9b1b5e8871d32b8a3a726c (patch)
treec3586277f92c23d03d7311691ded336574be3e32
parenta8a7a4c76ffd3885762e37880b5363e374831501 (diff)
downloadpcre-d68f7d9fa6a81170dd9b1b5e8871d32b8a3a726c.tar.gz
Source tidies for 7.8-RC1
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@371 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r--ChangeLog54
-rw-r--r--NEWS7
-rw-r--r--NON-UNIX-USE12
-rwxr-xr-xRunTest6
-rw-r--r--doc/html/pcreapi.html50
-rw-r--r--doc/pcre.txt112
-rw-r--r--doc/pcreapi.32
-rw-r--r--pcre_compile.c4
-rw-r--r--pcre_dfa_exec.c20
-rw-r--r--pcre_exec.c24
-rw-r--r--pcre_internal.h6
-rw-r--r--pcre_ord2utf8.c6
-rw-r--r--pcre_valid_utf8.c2
-rw-r--r--pcretest.c16
14 files changed, 168 insertions, 153 deletions
diff --git a/ChangeLog b/ChangeLog
index 4a2676c..507b4d1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -31,47 +31,47 @@ Version 7.8 25-Aug-08
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.
-
+
+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
+ 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
-
+ 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
+ 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.
-
+ 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.
-
+ 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.
+ /^[^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
+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.
+
+18. Tidied a few places to stop certain compilers from issuing warnings.
Version 7.7 07-May-08
diff --git a/NEWS b/NEWS
index affe6ea..b587ec5 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,13 @@ News about PCRE releases
------------------------
+Release 7.8 25-Aug-08
+---------------------
+
+More bug fixes, plus a performance improvement in Unicode character property
+lookup.
+
+
Release 7.7 07-May-08
---------------------
diff --git a/NON-UNIX-USE b/NON-UNIX-USE
index ea3931f..fb47fb1 100644
--- a/NON-UNIX-USE
+++ b/NON-UNIX-USE
@@ -192,12 +192,12 @@ __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
+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).
diff --git a/RunTest b/RunTest
index 24f4c15..514bb79 100755
--- a/RunTest
+++ b/RunTest
@@ -144,13 +144,13 @@ if [ $do2 = yes ] ; then
if [ $? = 0 ] ; then
$cf $testdata/testoutput2 testtry
if [ $? != 0 ] ; then exit 1; fi
- else
+ else
echo " "
echo "** Test 2 requires a lot of stack. If it has crashed with a"
echo "** segmentation fault, it may be that you do not have enough"
echo "** stack available by default. Please see the 'pcrestack' man"
- echo "** page for a discussion of PCRE's stack usage."
- echo " "
+ echo "** page for a discussion of PCRE's stack usage."
+ echo " "
exit 1
fi
echo "OK"
diff --git a/doc/html/pcreapi.html b/doc/html/pcreapi.html
index 266e2e6..d6a1612 100644
--- a/doc/html/pcreapi.html
+++ b/doc/html/pcreapi.html
@@ -1376,11 +1376,11 @@ 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 byte offset in
-<i>startoffset</i>. In UTF-8 mode, the byte offset must point to the start of a
-UTF-8 character. Unlike the pattern string, the subject may contain binary zero
-bytes. 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.
+<i>subject</i>, a length (in bytes) in <i>length</i>, and a starting byte offset
+in <i>startoffset</i>. In UTF-8 mode, the byte offset must point to the start of
+a UTF-8 character. Unlike the pattern string, the subject may contain binary
+zero bytes. 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.
</P>
<P>
A non-zero starting offset is useful when searching for another match in the
@@ -1418,32 +1418,36 @@ 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 integer offsets
-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.
+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 length passed in
+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 a
-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. The
-first pair, <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.
+continuing up to two-thirds of its length at the most. The first element of
+each pair is set to the byte offset of the first character in a substring, and
+the second is set to the byte offset of the first character after the end of a
+substring. <b>Note</b>: these values are always byte offsets, even in UTF-8
+mode. 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
@@ -1452,8 +1456,8 @@ 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. In particular, if the substring offsets are not of
-interest, <b>pcre_exec()</b> may be called with <i>ovector</i> passed as NULL and
+returns a value of zero. If the substring offsets are not 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
@@ -1972,7 +1976,7 @@ Cambridge CB2 3QH, England.
</P>
<br><a name="SEC22" href="#TOC1">REVISION</a><br>
<P>
-Last updated: 12 April 2008
+Last updated: 24 August 2008
<br>
Copyright &copy; 1997-2008 University of Cambridge.
<br>
diff --git a/doc/pcre.txt b/doc/pcre.txt
index f9a76b1..d07bfea 100644
--- a/doc/pcre.txt
+++ b/doc/pcre.txt
@@ -2047,83 +2047,87 @@ MATCHING A PATTERN: THE TRADITIONAL FUNCTION
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 byte offset in startoffset. In UTF-8
- mode, the byte offset must point to the start of a UTF-8 character.
- Unlike the pattern string, the subject may contain binary zero bytes.
- 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.
-
- 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
+ length (in bytes) in length, and a starting byte offset in startoffset.
+ In UTF-8 mode, the byte offset must point to the start of a UTF-8 char-
+ acter. Unlike the pattern string, the subject may contain binary zero
+ bytes. 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.
+
+ 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,
+ 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
+ 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
+ rence of "iss" because it is able to look behind the starting point to
discover that it is preceded by a letter.
- If a non-zero starting offset is passed when the pattern is anchored,
+ 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
+ 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
+ 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 integer
- offsets whose address is passed in ovector. The number of elements in
- the vector is passed in ovecsize, which must be a non-negative number.
- Note: this argument is NOT the size of ovector in bytes.
+ 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 length passed in ovecsize should always be a multiple of three. If
+ 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 a pair is set to the offset of the first character in a sub-
- string, and the second is set to the offset of the first character
- after the end of a substring. The first pair, ovector[0] and ovec-
- tor[1], identify the portion of the subject string matched by the
- entire pattern. The next pair is used for the first capturing subpat-
- tern, 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.
+ 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 byte offset of the first character
+ in a substring, and the second is set to the byte offset of the first
+ character after the end of a substring. Note: these values are always
+ byte offsets, even in UTF-8 mode. 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. In particular, if the substring off-
- sets are not of interest, pcre_exec() may be called with ovector passed
- as NULL and ovecsize as zero. However, if the pattern 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.
+ function returns a value of zero. If the substring offsets are not of
+ interest, pcre_exec() may be called with ovector passed as NULL and
+ ovecsize as zero. However, if the pattern 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 usu-
+ ally advisable to supply an ovector.
The pcre_info() function can be used to find out how many capturing
subpatterns there are in a compiled pattern. The smallest size for
@@ -2604,7 +2608,7 @@ AUTHOR
REVISION
- Last updated: 12 April 2008
+ Last updated: 24 August 2008
Copyright (c) 1997-2008 University of Cambridge.
------------------------------------------------------------------------------
diff --git a/doc/pcreapi.3 b/doc/pcreapi.3
index 30c3d23..e8875f8 100644
--- a/doc/pcreapi.3
+++ b/doc/pcreapi.3
@@ -1423,7 +1423,7 @@ 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
+continuing up to two-thirds of its length at the most. The first element of
each pair is set to the byte offset of the first character in a substring, and
the second is set to the byte offset of the first character after the end of a
substring. \fBNote\fP: these values are always byte offsets, even in UTF-8
diff --git a/pcre_compile.c b/pcre_compile.c
index ebf6b2c..6dac21b 100644
--- a/pcre_compile.c
+++ b/pcre_compile.c
@@ -4926,7 +4926,7 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
both phases.
If we are not at the pattern start, compile code to change the ims
- options if this setting actually changes any of them, and reset the
+ options if this setting actually changes any of them, and reset the
greedy defaults and the case value for firstbyte and reqbyte. */
if (*ptr == ')')
@@ -4950,7 +4950,7 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
/* Change options at this level, and pass them back for use
in subsequent branches. When not at the start of the pattern, this
- information is also necessary so that a resetting item can be
+ information is also necessary so that a resetting item can be
compiled at the end of a group (if we are in a group). */
*optionsptr = options = newoptions;
diff --git a/pcre_dfa_exec.c b/pcre_dfa_exec.c
index 11a03e6..61bf0ce 100644
--- a/pcre_dfa_exec.c
+++ b/pcre_dfa_exec.c
@@ -2736,15 +2736,15 @@ for (;;)
USPTR t = current_subject;
#ifdef SUPPORT_UTF8
if (utf8)
- {
- while (t < md->end_subject && !IS_NEWLINE(t))
+ {
+ while (t < md->end_subject && !IS_NEWLINE(t))
{
t++;
while (t < end_subject && (*t & 0xc0) == 0x80) t++;
- }
+ }
}
else
-#endif
+#endif
while (t < md->end_subject && !IS_NEWLINE(t)) t++;
end_subject = t;
}
@@ -2771,17 +2771,17 @@ for (;;)
{
while (current_subject < end_subject && !WAS_NEWLINE(current_subject))
{
- current_subject++;
- while(current_subject < end_subject &&
- (*current_subject & 0xc0) == 0x80)
+ current_subject++;
+ while(current_subject < end_subject &&
+ (*current_subject & 0xc0) == 0x80)
current_subject++;
- }
+ }
}
else
-#endif
+#endif
while (current_subject < end_subject && !WAS_NEWLINE(current_subject))
current_subject++;
-
+
/* If we have just passed a CR and the newline option is ANY or
ANYCRLF, and we are now at a LF, advance the match position by one more
character. */
diff --git a/pcre_exec.c b/pcre_exec.c
index 6f5140c..8096f3a 100644
--- a/pcre_exec.c
+++ b/pcre_exec.c
@@ -2613,7 +2613,7 @@ for (;;)
GETCHARINC(d, eptr);
if (d < 256) d = md->lcc[d];
if (fc == d) RRETURN(MATCH_NOMATCH);
-
+
}
}
else
@@ -2721,7 +2721,7 @@ for (;;)
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
GETCHARINC(d, eptr);
- if (fc == d) RRETURN(MATCH_NOMATCH);
+ if (fc == d) RRETURN(MATCH_NOMATCH);
}
}
else
@@ -4699,15 +4699,15 @@ for(;;)
USPTR t = start_match;
#ifdef SUPPORT_UTF8
if (utf8)
- {
- while (t < md->end_subject && !IS_NEWLINE(t))
+ {
+ while (t < md->end_subject && !IS_NEWLINE(t))
{
t++;
while (t < end_subject && (*t & 0xc0) == 0x80) t++;
- }
+ }
}
else
-#endif
+#endif
while (t < md->end_subject && !IS_NEWLINE(t)) t++;
end_subject = t;
}
@@ -4735,16 +4735,16 @@ for(;;)
{
while (start_match < end_subject && !WAS_NEWLINE(start_match))
{
- start_match++;
- while(start_match < end_subject && (*start_match & 0xc0) == 0x80)
+ start_match++;
+ while(start_match < end_subject && (*start_match & 0xc0) == 0x80)
start_match++;
- }
+ }
}
else
-#endif
+#endif
while (start_match < end_subject && !WAS_NEWLINE(start_match))
start_match++;
-
+
/* If we have just passed a CR and the newline option is ANY or ANYCRLF,
and we are now at a LF, advance the match position by one more character.
*/
@@ -4840,7 +4840,7 @@ for(;;)
}
/* OK, we can now run the match. */
-
+
md->start_match_ptr = start_match;
md->match_call_count = 0;
rc = match(start_match, md->start_code, start_match, 2, md, ims, NULL, 0, 0);
diff --git a/pcre_internal.h b/pcre_internal.h
index 2d2217b..dcded9f 100644
--- a/pcre_internal.h
+++ b/pcre_internal.h
@@ -133,14 +133,14 @@ PCRE_EXP_DATA_DEFN only if they are not already set. */
#endif
/* When compiling with the MSVC compiler, it is sometimes necessary to include
-a "calling convention" before exported function names. (This is secondhand
+a "calling convention" before exported function names. (This is secondhand
information; I know nothing about MSVC myself). For example, something like
void __cdecl function(....)
-
+
might be needed. In order so make this easy, all the exported functions have
PCRE_CALL_CONVENTION just before their names. It is rarely needed; if not
-set, we ensure here that it has no effect. */
+set, we ensure here that it has no effect. */
#ifndef PCRE_CALL_CONVENTION
#define PCRE_CALL_CONVENTION
diff --git a/pcre_ord2utf8.c b/pcre_ord2utf8.c
index 202031f..6f4eb9e 100644
--- a/pcre_ord2utf8.c
+++ b/pcre_ord2utf8.c
@@ -79,9 +79,9 @@ for (j = i; j > 0; j--)
return i + 1;
#else
(void)(cvalue); /* Keep compiler happy; this function won't ever be */
-(void)(buffer); /* called when SUPPORT_UTF8 is not defined. */
-return 0;
-#endif
+(void)(buffer); /* called when SUPPORT_UTF8 is not defined. */
+return 0;
+#endif
}
/* End of pcre_ord2utf8.c */
diff --git a/pcre_valid_utf8.c b/pcre_valid_utf8.c
index 5f2df08..c53da33 100644
--- a/pcre_valid_utf8.c
+++ b/pcre_valid_utf8.c
@@ -156,7 +156,7 @@ for (p = string; length-- > 0; p++)
}
#else
(void)(string); /* Keep picky compilers happy */
-(void)(length);
+(void)(length);
#endif
return -1;
diff --git a/pcretest.c b/pcretest.c
index 0263c54..ead6e90 100644
--- a/pcretest.c
+++ b/pcretest.c
@@ -2027,23 +2027,23 @@ while (!done)
}
*q = 0;
len = q - dbuffer;
-
+
/* Move the data to the end of the buffer so that a read over the end of
- the buffer will be seen by valgrind, even if it doesn't cause a crash. If
+ the buffer will be seen by valgrind, even if it doesn't cause a crash. If
we are using the POSIX interface, we must include the terminating zero. */
-
+
#if !defined NOPOSIX
if (posix || do_posix)
{
memmove(bptr + buffer_size - len - 1, bptr, len + 1);
- bptr += buffer_size - len - 1;
+ bptr += buffer_size - len - 1;
}
- else
-#endif
+ else
+#endif
{
memmove(bptr + buffer_size - len, bptr, len);
- bptr += buffer_size - len;
- }
+ bptr += buffer_size - len;
+ }
if ((all_use_dfa || use_dfa) && find_match_limit)
{