hyanantha Thu Oct 24 07:20:21 2002 EDT
Modified files: (Branch: PHP_4_2_0)
/php4/ext/standard string.c
Log:
NetWare related changes/modifications.
Index: php4/ext/standard/string.c
diff -u php4/ext/standard/string.c:1.263.2.6 php4/ext/standard/string.c:1.263.2.7
--- php4/ext/standard/string.c:1.263.2.6 Mon Jun 24 04:19:43 2002
+++ php4/ext/standard/string.c Thu Oct 24 07:20:21 2002
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: string.c,v 1.263.2.6 2002/06/24 08:19:43 derick Exp $ */
+/* $Id: string.c,v 1.263.2.7 2002/10/24 11:20:21 hyanantha Exp $ */
/* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
@@ -105,9 +105,9 @@
register unsigned char *result = NULL;
size_t i, j;
- result = (char *) emalloc(oldlen * 2 * sizeof(char) + 1);
+ result = (unsigned char*) emalloc(oldlen * 2 * sizeof(char) + 1); /*
+Type-casting done due to NetWare */
if(!result) {
- return result;
+ return (char*)result; /* Type-casting done due to NetWare */
}
for(i = j = 0; i < oldlen; i++) {
@@ -119,7 +119,7 @@
if (newlen)
*newlen = oldlen * 2 * sizeof(char);
- return result;
+ return (char *)result; /* Type-casting done due to NetWare */
}
/* }}} */
@@ -183,7 +183,7 @@
}
convert_to_string_ex(data);
- result = php_bin2hex(Z_STRVAL_PP(data), Z_STRLEN_PP(data), &newlen);
+ result = php_bin2hex((const unsigned char*)Z_STRVAL_PP(data),
+Z_STRLEN_PP(data), &newlen); /* Type-casting done due to NetWare */
if (!result) {
RETURN_FALSE;
@@ -514,9 +514,9 @@
char mask[256];
if (what) {
- php_charmask(Z_STRVAL_PP(what), Z_STRLEN_PP(what), mask TSRMLS_CC);
+ php_charmask((unsigned char*)Z_STRVAL_PP(what), Z_STRLEN_PP(what),
+mask TSRMLS_CC); /* Type-casting done due to NetWare */
} else {
- php_charmask(" \n\r\t\v\0", 6, mask TSRMLS_CC);
+ php_charmask((unsigned char*)" \n\r\t\v\0", 6, mask TSRMLS_CC); /*
+Type-casting done due to NetWare */
}
if (mode & 1) {
@@ -1238,9 +1238,9 @@
PHPAPI char *php_stristr(unsigned char *s, unsigned char *t,
size_t s_len, size_t t_len)
{
- php_strtolower(s, s_len);
- php_strtolower(t, t_len);
- return php_memnstr(s, t, t_len, s + s_len);
+ php_strtolower((char*)s, s_len); /* Type-casting done due to NetWare */
+ php_strtolower((char*)t, t_len); /* Type-casting done due to NetWare */
+ return php_memnstr((char*)s, (char*)t, t_len, (char*)(s + s_len)); /*
+Type-casting done due to NetWare */
}
/* }}} */
@@ -1313,7 +1313,7 @@
RETURN_FALSE;
}
- found = php_stristr(Z_STRVAL_PP(haystack), Z_STRVAL_PP(needle),
+ found = php_stristr((unsigned char*)Z_STRVAL_PP(haystack), (unsigned
+char*)Z_STRVAL_PP(needle), /* Type-casting done due to NetWare */
Z_STRLEN_PP(haystack), Z_STRLEN_PP(needle));
}
else {
@@ -1321,7 +1321,7 @@
needle_char[0] = (char) Z_LVAL_PP(needle);
needle_char[1] = 0;
- found = php_stristr(Z_STRVAL_PP(haystack), needle_char,
+ found = php_stristr((unsigned char*)Z_STRVAL_PP(haystack), (unsigned
+char*)needle_char, /* Type-casting done due to NetWare */
Z_STRLEN_PP(haystack), 1);
}
@@ -2367,7 +2367,7 @@
length = strlen(str);
}
- php_charmask(what, wlength, flags TSRMLS_CC);
+ php_charmask((unsigned char*)what, wlength, flags TSRMLS_CC); /*
+Type-casting done due to NetWare */
for (source=str, end=source+length, target=new_str; (c=*source) || source<end;
source++) {
if (flags[(unsigned char)c]) {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php