diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2009-03-01 12:00:59 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2009-03-01 12:00:59 +0000 |
commit | 6099fcbf59090ab631a52b8bb216d38bf4af8c70 (patch) | |
tree | b8bce7d3e3aa20ff050afdcf0db58f21b9ef9ec0 | |
parent | fe0dcd7f2edc025240f59e1d4a3361abaedc812f (diff) | |
download | pcre-6099fcbf59090ab631a52b8bb216d38bf4af8c70.tar.gz |
Bug fixes: forgot to commit these individually.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@376 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r-- | ChangeLog | 24 | ||||
-rw-r--r-- | Makefile.am | 4 | ||||
-rw-r--r-- | README | 6 | ||||
-rw-r--r-- | configure.ac | 17 | ||||
-rw-r--r-- | doc/pcreapi.3 | 8 | ||||
-rw-r--r-- | doc/pcregrep.1 | 41 | ||||
-rw-r--r-- | pcre_config.c | 6 | ||||
-rw-r--r-- | pcre_internal.h | 7 | ||||
-rw-r--r-- | pcretest.c | 9 |
9 files changed, 76 insertions, 46 deletions
@@ -1,6 +1,30 @@ ChangeLog for PCRE ------------------ +Version 7.9 xx-xxx-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_RETURSION 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. + + Version 7.8 05-Sep-08 --------------------- diff --git a/Makefile.am b/Makefile.am index 6d929b9..1dcec00 100644 --- a/Makefile.am +++ b/Makefile.am @@ -243,13 +243,13 @@ dist_noinst_SCRIPTS += RunTest EXTRA_DIST += RunTest.bat bin_PROGRAMS += pcretest pcretest_SOURCES = pcretest.c -pcretest_LDADD = libpcreposix.la +pcretest_LDADD = libpcreposix.la $(LIBREADLINE) TESTS += RunGrepTest dist_noinst_SCRIPTS += RunGrepTest bin_PROGRAMS += pcregrep pcregrep_SOURCES = pcregrep.c -pcregrep_LDADD = libpcreposix.la +pcregrep_LDADD = libpcreposix.la $(LIBZ) $(LIBBZ2) EXTRA_DIST += \ testdata/grepinput \ @@ -286,7 +286,9 @@ library. You can read more about them in the pcrebuild man page. 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." + 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: @@ -753,4 +755,4 @@ The distribution should contain the following files: Philip Hazel Email local part: ph10 Email domain: cam.ac.uk -Last updated: 05 September 2008 +Last updated: 27 February 2009 diff --git a/configure.ac b/configure.ac index 9370462..f5dabf0 100644 --- a/configure.ac +++ b/configure.ac @@ -7,9 +7,9 @@ dnl be defined as -RC2, for example. For real releases, it should be defined dnl empty. m4_define(pcre_major, [7]) -m4_define(pcre_minor, [8]) -m4_define(pcre_prerelease, []) -m4_define(pcre_date, [2008-09-05]) +m4_define(pcre_minor, [9]) +m4_define(pcre_prerelease, [-RC1]) +m4_define(pcre_date, [2009-02-27]) # Libtool shared library interface versions (current:revision:age) m4_define(libpcre_version, [0:1:0]) @@ -539,7 +539,7 @@ DISTCHECK_CONFIGURE_FLAGS="--enable-cpp --enable-unicode-properties" AC_SUBST(DISTCHECK_CONFIGURE_FLAGS) # Check that, if --enable-pcregrep-libz or --enable-pcregrep-libbz2 is -# specified, the relevant library is available. If so, add it to LIBS. +# specified, the relevant library is available. if test "$enable_pcregrep_libz" = "yes"; then if test "$HAVE_ZLIB_H" != "1"; then @@ -550,8 +550,9 @@ if test "$enable_pcregrep_libz" = "yes"; then echo "** Cannot --enable-pcregrep-libz because libz was not found" exit 1 fi - if test "$LIBS" = ""; then LIBS=-lz; else LIBS="$LIBS -lz"; fi + LIBZ="-lz" fi +AC_SUBST(LIBZ) if test "$enable_pcregrep_libbz2" = "yes"; then if test "$HAVE_BZLIB_H" != "1"; then @@ -562,8 +563,9 @@ if test "$enable_pcregrep_libbz2" = "yes"; then echo "** Cannot --enable-pcregrep-libbz2 because libbz2 was not found" exit 1 fi - if test "$LIBS" = ""; then LIBS=-lbz2; else LIBS="$LIBS -lbz2"; fi + LIBBZ2="-lbz2" fi +AC_SUBST(LIBBZ2) # Similarly for --enable-pcretest-readline @@ -576,8 +578,9 @@ if test "$enable_pcretest_libreadline" = "yes"; then echo "** Cannot --enable-pcretest-readline because readline/history.h was not found." exit 1 fi - if test "$LIBS" = ""; then LIBS=-lreadline; else LIBS="$LIBS -lreadline"; fi + LIBREADLINE="-lreadline" fi +AC_SUBST(LIBREADLINE) # Produce these files, in addition to config.h. AC_CONFIG_FILES( diff --git a/doc/pcreapi.3 b/doc/pcreapi.3 index e8875f8..3bb39d7 100644 --- a/doc/pcreapi.3 +++ b/doc/pcreapi.3 @@ -347,13 +347,13 @@ documentation. .sp PCRE_CONFIG_MATCH_LIMIT .sp -The output is an integer that gives the default limit for the number of +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 an integer that gives the default limit for the depth of +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 @@ -1978,6 +1978,6 @@ Cambridge CB2 3QH, England. .rs .sp .nf -Last updated: 24 August 2008 -Copyright (c) 1997-2008 University of Cambridge. +Last updated: 28 February 2009 +Copyright (c) 1997-2009 University of Cambridge. .fi diff --git a/doc/pcregrep.1 b/doc/pcregrep.1 index 8803cf1..3ba8a05 100644 --- a/doc/pcregrep.1 +++ b/doc/pcregrep.1 @@ -115,16 +115,16 @@ 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 part of a line that matched -a pattern should be coloured in the output. The value may be "never" (the -default), "always", or "auto". In the latter case, colouring happens only if -the standard output is connected to a terminal. The colour 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. +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. 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 @@ -204,16 +204,15 @@ and \fB--only-matching\fP. \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 and a space; for context lines, a -hyphen separator is used. If a line number is also being output, it follows the -file name without a space. +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 and a space; for context lines, a hyphen -separator is used. If a line number is also being output, it follows the file -name without a space. +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 @@ -305,9 +304,9 @@ being scanned does not agree with the convention set by this option, .TP \fB-n\fP, \fB--line-number\fP Precede each output line by its line number in the file, followed by a colon -and a space for matching lines or a hyphen and a space 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. +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-o\fP, \fB--only-matching\fP Show only the part of the line that matched a pattern. In this mode, no @@ -458,6 +457,6 @@ Cambridge CB2 3QH, England. .rs .sp .nf -Last updated: 08 March 2008 -Copyright (c) 1997-2008 University of Cambridge. +Last updated: 01 March 2009 +Copyright (c) 1997-2009 University of Cambridge. .fi diff --git a/pcre_config.c b/pcre_config.c index 114f0fb..78e8560 100644 --- a/pcre_config.c +++ b/pcre_config.c @@ -6,7 +6,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel - Copyright (c) 1997-2008 University of Cambridge + Copyright (c) 1997-2009 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -104,11 +104,11 @@ switch (what) break; case PCRE_CONFIG_MATCH_LIMIT: - *((unsigned int *)where) = MATCH_LIMIT; + *((unsigned long int *)where) = MATCH_LIMIT; break; case PCRE_CONFIG_MATCH_LIMIT_RECURSION: - *((unsigned int *)where) = MATCH_LIMIT_RECURSION; + *((unsigned long int *)where) = MATCH_LIMIT_RECURSION; break; case PCRE_CONFIG_STACKRECURSE: diff --git a/pcre_internal.h b/pcre_internal.h index dcded9f..8d132a2 100644 --- a/pcre_internal.h +++ b/pcre_internal.h @@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel - Copyright (c) 1997-2008 University of Cambridge + Copyright (c) 1997-2009 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -560,11 +560,12 @@ variable-length repeat, or a anything other than literal characters. */ #define REQ_VARY 0x0200 /* reqbyte followed non-literal item */ /* Miscellaneous definitions. The #ifndef is to pacify compiler warnings in -environments where these macros are defined elsewhere. */ +environments where these macros are defined elsewhere. Unfortunately, there +is no way to do the same for the typedef. */ -#ifndef FALSE typedef int BOOL; +#ifndef FALSE #define FALSE 0 #define TRUE 1 #endif @@ -925,6 +925,7 @@ while (argc > 1 && argv[op][0] == '-') else if (strcmp(argv[op], "-C") == 0) { int rc; + unsigned long int lrc; printf("PCRE version %s\n", pcre_version()); printf("Compiled with\n"); (void)pcre_config(PCRE_CONFIG_UTF8, &rc); @@ -943,10 +944,10 @@ while (argc > 1 && argv[op][0] == '-') printf(" Internal link size = %d\n", rc); (void)pcre_config(PCRE_CONFIG_POSIX_MALLOC_THRESHOLD, &rc); printf(" POSIX malloc threshold = %d\n", rc); - (void)pcre_config(PCRE_CONFIG_MATCH_LIMIT, &rc); - printf(" Default match limit = %d\n", rc); - (void)pcre_config(PCRE_CONFIG_MATCH_LIMIT_RECURSION, &rc); - printf(" Default recursion depth limit = %d\n", rc); + (void)pcre_config(PCRE_CONFIG_MATCH_LIMIT, &lrc); + printf(" Default match limit = %ld\n", lrc); + (void)pcre_config(PCRE_CONFIG_MATCH_LIMIT_RECURSION, &lrc); + printf(" Default recursion depth limit = %ld\n", lrc); (void)pcre_config(PCRE_CONFIG_STACKRECURSE, &rc); printf(" Match recursion uses %s\n", rc? "stack" : "heap"); goto EXIT; |