[PHP4BETA] CVS update: php4/ext/pcre/pcrelib

From: Date: Fri, 28 May 1999 20:54:52 +0000
Subject: [PHP4BETA] CVS update: php4/ext/pcre/pcrelib
Groups: php.version4 
Request: Send a blank email to php-version4+get-1152@lists.php.net to get a copy of this message
Date: Friday May 28, 1999 @ 16:54 Author: andrey Update of /repository/php4/ext/pcre/pcrelib In directory php:/tmp/cvs-serv13820/pcre/pcrelib Modified Files: pcre.c pcre.h Log Message: -Modified PCRE library slightly to do what needs to be done -Updated preg_replace() code to handle stuff properly -Removed ability to specify external PCRE library source to link against (since our bundled version is patched now) Index: php4/ext/pcre/pcrelib/pcre.c diff -u php4/ext/pcre/pcrelib/pcre.c:1.1 php4/ext/pcre/pcrelib/pcre.c:1.2 --- php4/ext/pcre/pcrelib/pcre.c:1.1 Wed May 26 17:47:57 1999 +++ php4/ext/pcre/pcrelib/pcre.c Fri May 28 16:54:52 1999 @@ -4125,7 +4125,7 @@ int pcre_exec(const pcre *external_re, const pcre_extra *external_extra, - const char *subject, int length, int options, int *offsets, int offsetcount) + const char *subject, int length, int options, int *offsets, int offsetcount, int minlen) { int resetcount, ocount; int first_char = -1; @@ -4285,6 +4285,10 @@ if certain parts of the pattern were not used. */ if (!match(start_match, re->code, 2, &match_block, ims, FALSE, start_match)) + continue; + + /* Check that the match is not closer than minlen (Andrey Zmievski) */ + if (start_match - match_block.start_subject < minlen) continue; /* Copy the offset information from temporary store if necessary */ Index: php4/ext/pcre/pcrelib/pcre.h diff -u php4/ext/pcre/pcrelib/pcre.h:1.1 php4/ext/pcre/pcrelib/pcre.h:1.2 --- php4/ext/pcre/pcrelib/pcre.h:1.1 Wed May 26 17:47:57 1999 +++ php4/ext/pcre/pcrelib/pcre.h Fri May 28 16:54:52 1999 @@ -59,7 +59,7 @@ const unsigned char *); extern int pcre_copy_substring(const char *, int *, int, int, char *, int); extern int pcre_exec(const pcre *, const pcre_extra *, const char *, - int, int, int *, int); + int, int, int *, int, int); extern int pcre_get_substring(const char *, int *, int, int, const char **); extern int pcre_get_substring_list(const char *, int *, int, const char ***); extern int pcre_info(const pcre *, int *, int *); -- PHP 4 Beta

« previous php.version4 (#1152) next »