cvs: php4(PHP_4_3) /ext/standard array.c cyr_convert.c exec.c url_scanner_ex.re
| From: | Moriyoshi Koizumi | Date: | Wed, 16 Apr 2003 22:57:16 +0000 |
| Subject: | cvs: php4(PHP_4_3) /ext/standard array.c cyr_convert.c exec.c url_scanner_ex.re | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-20342@lists.php.net to get a copy of this message | ||
moriyoshi Wed Apr 16 18:57:16 2003 EDT
Modified files: (Branch: PHP_4_3)
/php4/ext/standard array.c cyr_convert.c exec.c url_scanner_ex.re
Log:
MFH(r-1.226, r-1.24, r-1.99, r-1.68): fixed implicit cast issue
Index: php4/ext/standard/array.c
diff -u php4/ext/standard/array.c:1.199.2.15 php4/ext/standard/array.c:1.199.2.16
--- php4/ext/standard/array.c:1.199.2.15 Tue Apr 1 16:44:47 2003
+++ php4/ext/standard/array.c Wed Apr 16 18:57:15 2003
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: array.c,v 1.199.2.15 2003/04/01 21:44:47 rasmus Exp $ */
+/* $Id: array.c,v 1.199.2.16 2003/04/16 22:57:15 moriyoshi Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -1125,12 +1125,12 @@
len = strlen(var_name);
- if (!isalpha((int)var_name[0]) && var_name[0] != '_')
+ if (!isalpha((int)((unsigned char *)var_name)[0]) && var_name[0] != '_')
return 0;
if (len > 1) {
for (i=1; i<len; i++) {
- if (!isalnum((int)var_name[i]) && var_name[i] != '_') {
+ if (!isalnum((int)((unsigned char *)var_name)[i]) && var_name[i] != '_') {
return 0;
}
}
Index: php4/ext/standard/cyr_convert.c
diff -u php4/ext/standard/cyr_convert.c:1.22.4.1 php4/ext/standard/cyr_convert.c:1.22.4.2
--- php4/ext/standard/cyr_convert.c:1.22.4.1 Tue Dec 31 11:35:26 2002
+++ php4/ext/standard/cyr_convert.c Wed Apr 16 18:57:15 2003
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: cyr_convert.c,v 1.22.4.1 2002/12/31 16:35:26 sebastian Exp $ */
+/* $Id: cyr_convert.c,v 1.22.4.2 2003/04/16 22:57:15 moriyoshi Exp $ */
#include <stdlib.h>
@@ -210,7 +210,7 @@
from_table = NULL;
to_table = NULL;
- switch (toupper(from))
+ switch (toupper((int)(unsigned char)from))
{
case 'W':
from_table = _cyr_win1251;
@@ -232,7 +232,7 @@
break;
}
- switch (toupper(to))
+ switch (toupper((int)(unsigned char)to))
{
case 'W':
to_table = _cyr_win1251;
Index: php4/ext/standard/exec.c
diff -u php4/ext/standard/exec.c:1.84.2.7 php4/ext/standard/exec.c:1.84.2.8
--- php4/ext/standard/exec.c:1.84.2.7 Fri Mar 7 08:42:18 2003
+++ php4/ext/standard/exec.c Wed Apr 16 18:57:15 2003
@@ -15,7 +15,7 @@
| Author: Rasmus Lerdorf |
+----------------------------------------------------------------------+
*/
-/* $Id: exec.c,v 1.84.2.7 2003/03/07 13:42:18 ddhill Exp $ */
+/* $Id: exec.c,v 1.84.2.8 2003/04/16 22:57:15 moriyoshi Exp $ */
#include <stdio.h>
#include "php.h"
@@ -250,7 +250,7 @@
/* strip trailing whitespaces */
l = strlen(buf);
t = l;
- while (l-- && isspace((int)buf[l]));
+ while (l-- && isspace(((unsigned char *)buf)[l]));
if (l < t) {
buf[l + 1] = '\0';
}
@@ -261,7 +261,7 @@
/* strip trailing spaces */
l = strlen(buf);
t = l;
- while (l && isspace((int)buf[l - 1])) {
+ while (l && isspace(((unsigned char *)buf)[l - 1])) {
l--;
}
if (l < t) buf[l] = '\0';
Index: php4/ext/standard/url_scanner_ex.re
diff -u php4/ext/standard/url_scanner_ex.re:1.63.2.4 php4/ext/standard/url_scanner_ex.re:1.63.2.5
--- php4/ext/standard/url_scanner_ex.re:1.63.2.4 Mon Mar 10 21:31:52 2003
+++ php4/ext/standard/url_scanner_ex.re Wed Apr 16 18:57:15 2003
@@ -236,7 +236,7 @@
ctx->tag.len = 0;
smart_str_appendl(&ctx->tag, start, YYCURSOR - start);
for (i = 0; i < ctx->tag.len; i++)
- ctx->tag.c[i] = tolower(ctx->tag.c[i]);
+ ctx->tag.c[i] = tolower((int)(unsigned char)ctx->tag.c[i]);
if (zend_hash_find(ctx->tags, ctx->tag.c, ctx->tag.len, (void **)
&ctx->lookup_data) == SUCCESS)
ok = 1;
STATE = ok ? STATE_NEXT_ARG : STATE_PLAIN;