summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2011-01-15 11:31:39 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2011-01-15 11:31:39 +0000
commit076d2153a38327a35ed525cd6e18ab878ee5732d (patch)
tree2d521f37d6ca3e620fdaa57ac713cf17080ba8a3
parent1482ba5c96cf56eadaf32e150e989ce8975a3eaf (diff)
downloadpcre-076d2153a38327a35ed525cd6e18ab878ee5732d.tar.gz
Tidies for Release 8.12
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@589 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r--ChangeLog28
-rw-r--r--Makefile.am1
-rw-r--r--NEWS2
-rw-r--r--doc/html/index.html16
-rw-r--r--doc/html/pcregrep.html12
-rw-r--r--doc/pcre.txt58
-rw-r--r--doc/pcregrep.12
-rw-r--r--doc/pcregrep.txt10
-rw-r--r--pcregrep.c8
9 files changed, 73 insertions, 64 deletions
diff --git a/ChangeLog b/ChangeLog
index 9303a92..a988bcc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,34 +6,34 @@ Version 8.15 12-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
+ 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.
-
+ 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
+ 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
+
+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
+ 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
------------------------
diff --git a/Makefile.am b/Makefile.am
index 4e5cbca..a3712a3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -256,6 +256,7 @@ pcregrep_LDADD = libpcreposix.la $(LIBZ) $(LIBBZ2)
EXTRA_DIST += \
testdata/grepinput \
+ testdata/grepinput3 \
testdata/grepinput8 \
testdata/grepinputv \
testdata/grepinputx \
diff --git a/NEWS b/NEWS
index 66d9987..5f2b29b 100644
--- a/NEWS
+++ b/NEWS
@@ -4,7 +4,7 @@ News about PCRE releases
Release 8.12 15-Jan-2011
------------------------
-This release fixes some bugs in pcregrep, one of which caused the tests to fail
+This release fixes some bugs in pcregrep, one of which caused the tests to fail
on 64-bit big-endian systems. There are no changes to the code of the library.
diff --git a/doc/html/index.html b/doc/html/index.html
index 58dfe45..d9af7e1 100644
--- a/doc/html/index.html
+++ b/doc/html/index.html
@@ -1,10 +1,10 @@
<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
+<!-- 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>
@@ -74,11 +74,11 @@ The HTML documentation for PCRE comprises the following pages:
</table>
<p>
-There are also individual pages that summarize the interface for each function
+There are also individual pages that summarize the interface for each function
in the library:
</p>
-<table>
+<table>
<tr><td><a href="pcre_compile.html">pcre_compile</a></td>
<td>&nbsp;&nbsp;Compile a regular expression</td></tr>
@@ -129,7 +129,7 @@ in the library:
<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_refcount.html">pcre_refcount</a></td>
<td>&nbsp;&nbsp;Maintain reference count in compiled pattern</td></tr>
diff --git a/doc/html/pcregrep.html b/doc/html/pcregrep.html
index 7a03b7c..925d1e2 100644
--- a/doc/html/pcregrep.html
+++ b/doc/html/pcregrep.html
@@ -399,8 +399,12 @@ when the PCRE library is compiled, with the default default being 10 million.
<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 any one match may consist of more than one
-line. When this option is set, the PCRE library is called in "multiline" mode.
+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
@@ -616,9 +620,9 @@ Cambridge CB2 3QH, England.
</P>
<br><a name="SEC13" href="#TOC1">REVISION</a><br>
<P>
-Last updated: 16 November 2010
+Last updated: 14 January 2011
<br>
-Copyright &copy; 1997-2010 University of Cambridge.
+Copyright &copy; 1997-2011 University of Cambridge.
<br>
<p>
Return to the <a href="index.html">PCRE index page</a>.
diff --git a/doc/pcre.txt b/doc/pcre.txt
index 081d023..ac4254e 100644
--- a/doc/pcre.txt
+++ b/doc/pcre.txt
@@ -2,7 +2,7 @@
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
+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.
-----------------------------------------------------------------------------
@@ -269,8 +269,8 @@ REVISION
Last updated: 13 November 2010
Copyright (c) 1997-2010 University of Cambridge.
------------------------------------------------------------------------------
-
-
+
+
PCREBUILD(3) PCREBUILD(3)
@@ -600,8 +600,8 @@ REVISION
Last updated: 29 September 2009
Copyright (c) 1997-2009 University of Cambridge.
------------------------------------------------------------------------------
-
-
+
+
PCREMATCHING(3) PCREMATCHING(3)
@@ -804,8 +804,8 @@ REVISION
Last updated: 17 November 2010
Copyright (c) 1997-2010 University of Cambridge.
------------------------------------------------------------------------------
-
-
+
+
PCREAPI(3) PCREAPI(3)
@@ -2877,8 +2877,8 @@ REVISION
Last updated: 21 November 2010
Copyright (c) 1997-2010 University of Cambridge.
------------------------------------------------------------------------------
-
-
+
+
PCRECALLOUT(3) PCRECALLOUT(3)
@@ -3059,8 +3059,8 @@ REVISION
Last updated: 21 November 2010
Copyright (c) 1997-2010 University of Cambridge.
------------------------------------------------------------------------------
-
-
+
+
PCRECOMPAT(3) PCRECOMPAT(3)
@@ -3215,8 +3215,8 @@ REVISION
Last updated: 31 October 2010
Copyright (c) 1997-2010 University of Cambridge.
------------------------------------------------------------------------------
-
-
+
+
PCREPATTERN(3) PCREPATTERN(3)
@@ -5694,8 +5694,8 @@ REVISION
Last updated: 21 November 2010
Copyright (c) 1997-2010 University of Cambridge.
------------------------------------------------------------------------------
-
-
+
+
PCRESYNTAX(3) PCRESYNTAX(3)
@@ -6064,8 +6064,8 @@ REVISION
Last updated: 21 November 2010
Copyright (c) 1997-2010 University of Cambridge.
------------------------------------------------------------------------------
-
-
+
+
PCREPARTIAL(3) PCREPARTIAL(3)
@@ -6484,8 +6484,8 @@ REVISION
Last updated: 07 November 2010
Copyright (c) 1997-2010 University of Cambridge.
------------------------------------------------------------------------------
-
-
+
+
PCREPRECOMPILE(3) PCREPRECOMPILE(3)
@@ -6609,8 +6609,8 @@ REVISION
Last updated: 17 November 2010
Copyright (c) 1997-2010 University of Cambridge.
------------------------------------------------------------------------------
-
-
+
+
PCREPERFORM(3) PCREPERFORM(3)
@@ -6777,8 +6777,8 @@ REVISION
Last updated: 16 May 2010
Copyright (c) 1997-2010 University of Cambridge.
------------------------------------------------------------------------------
-
-
+
+
PCREPOSIX(3) PCREPOSIX(3)
@@ -7040,8 +7040,8 @@ REVISION
Last updated: 16 May 2010
Copyright (c) 1997-2010 University of Cambridge.
------------------------------------------------------------------------------
-
-
+
+
PCRECPP(3) PCRECPP(3)
@@ -7381,8 +7381,8 @@ REVISION
Last updated: 17 March 2009
------------------------------------------------------------------------------
-
-
+
+
PCRESAMPLE(3) PCRESAMPLE(3)
@@ -7617,5 +7617,5 @@ REVISION
Last updated: 03 January 2010
Copyright (c) 1997-2010 University of Cambridge.
------------------------------------------------------------------------------
-
-
+
+
diff --git a/doc/pcregrep.1 b/doc/pcregrep.1
index bd3b381..5818c92 100644
--- a/doc/pcregrep.1
+++ b/doc/pcregrep.1
@@ -337,7 +337,7 @@ when the PCRE library is compiled, with the default default being 10 million.
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
+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.
diff --git a/doc/pcregrep.txt b/doc/pcregrep.txt
index 6a50e60..1881b42 100644
--- a/doc/pcregrep.txt
+++ b/doc/pcregrep.txt
@@ -383,7 +383,11 @@ OPTIONS
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 any one match may consist of more than one line.
+ 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
@@ -603,5 +607,5 @@ AUTHOR
REVISION
- Last updated: 16 November 2010
- Copyright (c) 1997-2010 University of Cambridge.
+ Last updated: 14 January 2011
+ Copyright (c) 1997-2011 University of Cambridge.
diff --git a/pcregrep.c b/pcregrep.c
index f01833d..9b63eae 100644
--- a/pcregrep.c
+++ b/pcregrep.c
@@ -1349,10 +1349,10 @@ while (ptr < endptr)
/* We have to split the line(s) up if colouring, and search for further
matches, but not of course if the line is a non-match. */
-
+
if (do_colour && !invert)
{
- int plength;
+ int plength;
int last_offset = 0;
FWRITE(ptr, 1, offsets[0], stdout);
fprintf(stdout, "%c[%sm", 0x1b, colour_string);
@@ -1372,9 +1372,9 @@ while (ptr < endptr)
}
/* In multiline mode, we may have already printed the complete line
- and its line-ending characters (if they matched the pattern), so there
+ and its line-ending characters (if they matched the pattern), so there
may be no more to print. */
-
+
plength = (linelength + endlinelength) - last_offset;
if (plength > 0)
FWRITE(ptr + last_offset, 1, plength, stdout);