cvs: php4(PHP_4_2_0) /ext/mbstring mbstring.c mbstring.h
| From: | Rui Hirokawa | Date: | Wed, 03 Jul 2002 22:14:15 +0000 |
| Subject: | cvs: php4(PHP_4_2_0) /ext/mbstring mbstring.c mbstring.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-12706@lists.php.net to get a copy of this message | ||
hirokawa Wed Jul 3 18:14:15 2002 EDT
Modified files: (Branch: PHP_4_2_0)
/php4/ext/mbstring mbstring.c mbstring.h
Log:
fixed ZTS build and added language check.
Index: php4/ext/mbstring/mbstring.c
diff -u php4/ext/mbstring/mbstring.c:1.48.2.7 php4/ext/mbstring/mbstring.c:1.48.2.8
--- php4/ext/mbstring/mbstring.c:1.48.2.7 Tue Jul 2 11:26:25 2002
+++ php4/ext/mbstring/mbstring.c Wed Jul 3 18:14:14 2002
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mbstring.c,v 1.48.2.7 2002/07/02 15:26:25 hirokawa Exp $ */
+/* $Id: mbstring.c,v 1.48.2.8 2002/07/03 22:14:14 hirokawa Exp $ */
/*
* PHP4 Multibyte String module "mbstring" (currently only for Japanese)
@@ -1145,7 +1145,7 @@
#define IS_SJIS1(c) ((((c)>=0x81 && (c)<=0x9f) || ((c)>=0xe0 &&
(c)<=0xf5)) ? 1 : 0)
#define IS_SJIS2(c) ((((c)>=0x40 && (c)<=0x7e) || ((c)>=0x80 &&
(c)<=0xfc)) ? 1 : 0)
-char *mbstr_strrchr(const char *s, char c){
+char *mbstr_strrchr(const char *s, char c TSRMLS_DC){
unsigned char *p = (unsigned char *)s, *last = NULL;
while(*p++) {
if (*p == c) {
@@ -1154,7 +1154,8 @@
if (*p == '\0'){
break;
}
- if (IS_SJIS1(*p) && IS_SJIS2(*(p+1))) {
+ if (MBSTRG(current_language) == mbfl_no_language_japanese
+ && IS_SJIS1(*p) && IS_SJIS2(*(p+1))) {
p++;
}
}
Index: php4/ext/mbstring/mbstring.h
diff -u php4/ext/mbstring/mbstring.h:1.14.2.2 php4/ext/mbstring/mbstring.h:1.14.2.3
--- php4/ext/mbstring/mbstring.h:1.14.2.2 Tue Jul 2 11:27:07 2002
+++ php4/ext/mbstring/mbstring.h Wed Jul 3 18:14:14 2002
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mbstring.h,v 1.14.2.2 2002/07/02 15:27:07 hirokawa Exp $ */
+/* $Id: mbstring.h,v 1.14.2.3 2002/07/03 22:14:14 hirokawa Exp $ */
/*
* PHP4 Multibyte String module "mbstring" (currently only for Japanese)
@@ -117,7 +117,7 @@
int php_mbregex_name2mbctype(const char *pname);
#endif
-char *mbstr_strrchr(const char *s, char c);
+char *mbstr_strrchr(const char *s, char c TSRMLS_DC);
ZEND_BEGIN_MODULE_GLOBALS(mbstring)
int language;