CVS update: php4/ext/standard
| From: | zeev | Date: | Sat, 05 Jun 1999 13:56:19 +0000 |
| Subject: | CVS update: php4/ext/standard | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-1291@lists.php.net to get a copy of this message | ||
Date: Saturday June 5, 1999 @ 9:56
Author: zeev
Update of /repository/php4/ext/standard
In directory php:/tmp/cvs-serv16774/ext/standard
Modified Files:
reg.c
Log Message:
Not sure that's the right fix, but at least it fixes the symptom
Index: php4/ext/standard/reg.c
diff -u php4/ext/standard/reg.c:1.10 php4/ext/standard/reg.c:1.11
--- php4/ext/standard/reg.c:1.10 Wed May 26 14:45:53 1999
+++ php4/ext/standard/reg.c Sat Jun 5 09:56:18 1999
@@ -28,7 +28,7 @@
| Jaakko Hyvätti <jaakko@hyvatti.iki.fi> |
+----------------------------------------------------------------------+
*/
-/* $Id: reg.c,v 1.10 1999/05/26 18:45:53 andrey Exp $ */
+/* $Id: reg.c,v 1.11 1999/06/05 13:56:18 zeev Exp $ */
#include <stdio.h>
#include "php.h"
@@ -564,6 +564,7 @@
/* churn through str, generating array entries as we go */
while ((count == -1 || count > 0) && !(err = regexec(&re, strp, 1, subs, 0))) {
+ printf("In the loop...\n");
if (subs[0].rm_so == 0 && subs[0].rm_eo) {
/* match is at start of string, return empty string */
add_next_index_stringl(return_value, empty_string, 0, 1);
@@ -591,7 +592,9 @@
/* if we're only looking for a certain number of points,
stop looking once we hit it */
- if (count != -1) count--;
+ if (count != -1) {
+ count--;
+ }
}
/* see if we encountered an error */
@@ -604,7 +607,7 @@
}
/* otherwise we just have one last element to add to the array */
- if (count == -1) {
+ if (count == -1 || err==REG_NOMATCH) {
size = endp - strp;
add_next_index_stringl(return_value, strp, size, 1);