cvs: php-src /ext/pcre php_pcre.c
| From: | Moriyoshi Koizumi | Date: | Sat, 31 Jan 2004 21:56:43 +0000 |
| Subject: | cvs: php-src /ext/pcre php_pcre.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-25956@lists.php.net to get a copy of this message | ||
moriyoshi Sat Jan 31 16:56:43 2004 EDT
Modified files:
/php-src/ext/pcre php_pcre.c
Log:
- POSIX / ISOX compliancy. This is needed to correctly handle UTF-8 characters.
http://cvs.php.net/diff.php/php-src/ext/pcre/php_pcre.c?r1=1.152&r2=1.153&ty=u
Index: php-src/ext/pcre/php_pcre.c
diff -u php-src/ext/pcre/php_pcre.c:1.152 php-src/ext/pcre/php_pcre.c:1.153
--- php-src/ext/pcre/php_pcre.c:1.152 Wed Jan 28 16:47:36 2004
+++ php-src/ext/pcre/php_pcre.c Sat Jan 31 16:56:42 2004
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pcre.c,v 1.152 2004/01/28 21:47:36 iliaa Exp $ */
+/* $Id: php_pcre.c,v 1.153 2004/01/31 21:56:42 moriyoshi Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -172,7 +172,7 @@
/* Parse through the leading whitespace, and display a warning if we
get to the end without encountering a delimiter. */
- while (isspace((int)*p)) p++;
+ while (isspace((int)*(unsigned char *)p)) p++;
if (*p == 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty regular expression");
return NULL;
@@ -181,7 +181,7 @@
/* Get the delimiter and display a warning if it is alphanumeric
or a backslash. */
delimiter = *p++;
- if (isalnum((int)delimiter) || delimiter == '\\') {
+ if (isalnum((int)*(unsigned char *)&delimiter) || delimiter == '\\') {
php_error_docref(NULL TSRMLS_CC,E_WARNING, "Delimiter must not be alphanumeric or
backslash");
return NULL;
}