summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2007-12-23 12:17:20 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2007-12-23 12:17:20 +0000
commitc523bf28b09f185eb7e0f4b1f4eb7bd6d5476c95 (patch)
treeed6abf9e0f4d50744c32f013a341cf274bc3d615
parent8f950d0c993f85b219fb5148b481f8f87250f730 (diff)
downloadpcre-c523bf28b09f185eb7e0f4b1f4eb7bd6d5476c95.tar.gz
Tidies for 7.5-RC1 release.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@289 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r--ChangeLog16
-rw-r--r--NEWS8
-rw-r--r--README14
-rw-r--r--configure.ac10
-rw-r--r--doc/html/pcrebuild.html27
-rw-r--r--doc/html/pcretest.html9
-rw-r--r--doc/pcre.txt15
-rw-r--r--doc/pcrebuild.38
-rw-r--r--doc/pcretest.12
-rw-r--r--doc/pcretest.txt8
-rw-r--r--pcretest.c26
11 files changed, 96 insertions, 47 deletions
diff --git a/ChangeLog b/ChangeLog
index 3df9102..77943ea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
ChangeLog for PCRE
------------------
-Version 7.5 12-Nov-07
+Version 7.5 23-Dec-07
---------------------
1. Applied a patch from Craig: "This patch makes it possible to 'ignore'
@@ -76,26 +76,28 @@ Version 7.5 12-Nov-07
does the same. The return code can be used to tell if there were any
non-matching lines.
-14. The pattern (?=something)(?R) was not being diagnosed as a potentially
+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).
-15. Fixed two typos in the Windows-only code in pcregrep.c, and moved the
+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).
-16. Specifying a possessive quantifier with a specific limit for a Unicode
+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.
-17. Added --enable-pcregrep-libz and --enable-pcregrep-libbz2.
+18. Added --enable-pcregrep-libz and --enable-pcregrep-libbz2.
-18. Added --enable-pcretest-libreadline.
+19. Added --enable-pcretest-libreadline.
-19. In pcrecpp.cc, the variable 'count' was incremented twice in
+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 have removed one of the increments.
diff --git a/NEWS b/NEWS
index 8ef40b0..9ce997c 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,14 @@
News about PCRE releases
------------------------
+Release 7.5 23-Dec-07
+---------------------
+
+This is mainly a bug-fix release. However the ability to link pcregrep with
+libz or libbz2 and the ability to link pcretest with libreadline have been
+added. Also the --line-offsets and --file-offsets options were added to
+pcregrep.
+
Release 7.4 21-Sep-07
---------------------
diff --git a/README b/README
index 64156e2..ad6ca4d 100644
--- a/README
+++ b/README
@@ -258,19 +258,19 @@ library. You can read more about them in the pcrebuild man page.
This automatically implies --enable-rebuild-chartables (see above).
-. It is possible to compile pcregrep to use libz and/or libbz2, in order to
+. 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.
-
-. It is possible to compile pcretest so that it links with the libreadline
+
+. It is possible to compile pcretest so that it links with the libreadline
library, by specifying
-
- --enable-pcretest-libreadline
-
+
+ --enable-pcretest-libreadline
+
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
diff --git a/configure.ac b/configure.ac
index b9821ff..ba6a585 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl empty.
m4_define(pcre_major, [7])
m4_define(pcre_minor, [5])
m4_define(pcre_prerelease, [-RC1])
-m4_define(pcre_date, [2007-11-12])
+m4_define(pcre_date, [2007-12-23])
# Libtool shared library interface versions (current:revision:age)
m4_define(libpcre_version, [0:1:0])
@@ -378,7 +378,7 @@ fi
if test "$enable_pcretest_libreadline" = "yes"; then
AC_DEFINE([SUPPORT_LIBREADLINE], [], [
Define to allow pcretest to be linked with libreadline.])
-fi
+fi
AC_DEFINE_UNQUOTED([NEWLINE], [$ac_pcre_newline_value], [
The value of NEWLINE determines the newline character sequence. On
@@ -534,7 +534,7 @@ if test "$enable_pcretest_libreadline" = "yes"; then
exit 1
fi
if test "$LIBS" = ""; then LIBS=-lreadline; else LIBS="$LIBS -lreadline"; fi
-fi
+fi
# Produce these files, in addition to config.h.
AC_CONFIG_FILES(
@@ -574,7 +574,7 @@ $PACKAGE-$VERSION configuration summary:
C++ compiler flags .............. : ${CXXFLAGS}
Linker flags .................... : ${LDFLAGS}
Extra libraries ................. : ${LIBS}
-
+
Build C++ library ............... : ${enable_cpp}
Enable UTF-8 support ............ : ${enable_utf8}
Unicode properties .............. : ${enable_unicode_properties}
@@ -591,7 +591,7 @@ $PACKAGE-$VERSION configuration summary:
Build static libs ............... : ${enable_static}
Link pcregrep with libz ......... : ${enable_pcregrep_libz}
Link pcregrep with libbz2 ....... : ${enable_pcregrep_libbz2}
- Link pcretest with libreadline .. : ${enable_pcretest_libreadline}
+ Link pcretest with libreadline .. : ${enable_pcretest_libreadline}
EOF
diff --git a/doc/html/pcrebuild.html b/doc/html/pcrebuild.html
index 13fd573..d76104e 100644
--- a/doc/html/pcrebuild.html
+++ b/doc/html/pcrebuild.html
@@ -27,9 +27,10 @@ man page, in case the conversion went wrong.
<li><a name="TOC12" href="#SEC12">CREATING CHARACTER TABLES AT BUILD TIME</a>
<li><a name="TOC13" href="#SEC13">USING EBCDIC CODE</a>
<li><a name="TOC14" href="#SEC14">PCREGREP OPTIONS FOR COMPRESSED FILE SUPPORT</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>
+<li><a name="TOC15" href="#SEC15">PCRETEST OPTION FOR LIBREADLINE SUPPORT</a>
+<li><a name="TOC16" href="#SEC16">SEE ALSO</a>
+<li><a name="TOC17" href="#SEC17">AUTHOR</a>
+<li><a name="TOC18" href="#SEC18">REVISION</a>
</ul>
<br><a name="SEC1" href="#TOC1">PCRE BUILD-TIME OPTIONS</a><br>
<P>
@@ -284,11 +285,23 @@ 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="SEC15" href="#TOC1">SEE ALSO</a><br>
+<br><a name="SEC15" 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-licenced, so if you distribute a
+binary of <b>pcretest</b> linked in this way, there may be licensing issues.
+</P>
+<br><a name="SEC16" href="#TOC1">SEE ALSO</a><br>
<P>
<b>pcreapi</b>(3), <b>pcre_config</b>(3).
</P>
-<br><a name="SEC16" href="#TOC1">AUTHOR</a><br>
+<br><a name="SEC17" href="#TOC1">AUTHOR</a><br>
<P>
Philip Hazel
<br>
@@ -297,9 +310,9 @@ University Computing Service
Cambridge CB2 3QH, England.
<br>
</P>
-<br><a name="SEC17" href="#TOC1">REVISION</a><br>
+<br><a name="SEC18" href="#TOC1">REVISION</a><br>
<P>
-Last updated: 17 December 2007
+Last updated: 18 December 2007
<br>
Copyright &copy; 1997-2007 University of Cambridge.
<br>
diff --git a/doc/html/pcretest.html b/doc/html/pcretest.html
index 02ae2a6..c5c72e6 100644
--- a/doc/html/pcretest.html
+++ b/doc/html/pcretest.html
@@ -130,6 +130,13 @@ stdout, and prompts for each line of input, using "re&#62;" to prompt for regula
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 the pattern.
@@ -689,7 +696,7 @@ Cambridge CB2 3QH, England.
</P>
<br><a name="SEC15" href="#TOC1">REVISION</a><br>
<P>
-Last updated: 19 November 2007
+Last updated: 18 December 2007
<br>
Copyright &copy; 1997-2007 University of Cambridge.
<br>
diff --git a/doc/pcre.txt b/doc/pcre.txt
index 7a863bb..c025808 100644
--- a/doc/pcre.txt
+++ b/doc/pcre.txt
@@ -531,6 +531,19 @@ PCREGREP OPTIONS FOR COMPRESSED FILE SUPPORT
if they are not.
+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-licenced, so if you distribute a binary of
+ pcretest linked in this way, there may be licensing issues.
+
+
SEE ALSO
pcreapi(3), pcre_config(3).
@@ -545,7 +558,7 @@ AUTHOR
REVISION
- Last updated: 17 December 2007
+ Last updated: 18 December 2007
Copyright (c) 1997-2007 University of Cambridge.
------------------------------------------------------------------------------
diff --git a/doc/pcrebuild.3 b/doc/pcrebuild.3
index b6fe597..2c40eb4 100644
--- a/doc/pcrebuild.3
+++ b/doc/pcrebuild.3
@@ -277,10 +277,10 @@ 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-licenced, so if you distribute a
+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-licenced, so if you distribute a
binary of \fBpcretest\fP linked in this way, there may be licensing issues.
.
.
diff --git a/doc/pcretest.1 b/doc/pcretest.1
index 8660718..7e7d80f 100644
--- a/doc/pcretest.1
+++ b/doc/pcretest.1
@@ -97,7 +97,7 @@ 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
+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
diff --git a/doc/pcretest.txt b/doc/pcretest.txt
index 889e38d..039d2f0 100644
--- a/doc/pcretest.txt
+++ b/doc/pcretest.txt
@@ -85,6 +85,12 @@ DESCRIPTION
"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 the pattern.
@@ -643,5 +649,5 @@ AUTHOR
REVISION
- Last updated: 19 November 2007
+ Last updated: 18 December 2007
Copyright (c) 1997-2007 University of Cambridge.
diff --git a/pcretest.c b/pcretest.c
index b99ac84..d31bf3c 100644
--- a/pcretest.c
+++ b/pcretest.c
@@ -214,36 +214,36 @@ for (;;)
if (rlen > 1000)
{
int dlen;
-
+
/* If libreadline support is required, use readline() to read a line if the
input is a terminal. Note that readline() removes the trailing newline, so
we must put it back again, to be compatible with fgets(). */
-
+
#ifdef SUPPORT_LIBREADLINE
if (isatty(fileno(f)))
{
- size_t len;
+ size_t len;
char *s = readline(prompt);
if (s == NULL) return (here == start)? NULL : start;
len = strlen(s);
- if (len > 0) add_history(s);
+ if (len > 0) add_history(s);
if (len > rlen - 1) len = rlen - 1;
memcpy(here, s, len);
here[len] = '\n';
- here[len+1] = 0;
- free(s);
+ here[len+1] = 0;
+ free(s);
}
- else
-#endif
-
+ else
+#endif
+
/* Read the next line by normal means, prompting if the file is stdin. */
-
+
{
- if (f == stdin) printf(prompt);
+ if (f == stdin) printf(prompt);
if (fgets((char *)here, rlen, f) == NULL)
return (here == start)? NULL : start;
- }
-
+ }
+
dlen = (int)strlen((char *)here);
if (dlen > 0 && here[dlen - 1] == '\n') return start;
here += dlen;