cvs: php-src /ext/pdo pdo_stmt.c /ext/simplexml simplexml.c /ext/sqlite sqlite.c /ext/standard array.c base64.c dns.c exec.c file.c filters.c
ftp_fopen_wrapper.c html.c html.h http.c http_fopen_wrapper.c image.c info.c iptc.c levenshtein.c md5.c php_string.h sha1.c streamsfuncs.c string.c
url.c user_filters.c var.c var_unserializer.c var_unserializer.re /ext/unicode unicode.c /main fopen_wrappers.c main.c output.c php_logos.c
php_output.h php_variables.c php_variables.h rfc1867.c spprintf.c /main/streams plain_wrapper.c ZendEngine2 zend_unicode.c zend_unicode.h

From: Date: Thu, 02 Mar 2006 13:12:46 +0000
Subject: cvs: php-src /ext/pdo pdo_stmt.c /ext/simplexml simplexml.c /ext/sqlite sqlite.c /ext/standard array.c base64.c dns.c exec.c file.c filters.c
ftp_fopen_wrapper.c html.c html.h http.c http_fopen_wrapper.c image.c info.c iptc.c levenshtein.c md5.c php_string.h sha1.c streamsfuncs.c string.c
url.c user_filters.c var.c var_unserializer.c var_unserializer.re /ext/unicode unicode.c /main fopen_wrappers.c main.c output.c php_logos.c
php_output.h php_variables.c php_variables.h rfc1867.c spprintf.c /main/streams plain_wrapper.c ZendEngine2 zend_unicode.c zend_unicode.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-37075@lists.php.net to get a copy of this message
dmitry Thu Mar 2 13:12:46 2006 UTC Modified files: /ZendEngine2 zend_unicode.c zend_unicode.h /php-src/ext/pdo pdo_stmt.c /php-src/ext/simplexml simplexml.c /php-src/ext/sqlite sqlite.c /php-src/ext/standard array.c base64.c dns.c exec.c file.c filters.c ftp_fopen_wrapper.c html.c html.h http.c http_fopen_wrapper.c image.c info.c iptc.c levenshtein.c md5.c php_string.h sha1.c streamsfuncs.c string.c url.c user_filters.c var.c var_unserializer.c var_unserializer.re /php-src/ext/unicode unicode.c /php-src/main fopen_wrappers.c main.c output.c php_logos.c php_output.h php_variables.c php_variables.h rfc1867.c spprintf.c /php-src/main/streams plain_wrapper.c Log: Nuke int32_t (everywhere except streams layer) and signed/unsigned warnings

http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_unicode.c?r1=1.8&r2=1.9&diff_format=u Index: ZendEngine2/zend_unicode.c diff -u ZendEngine2/zend_unicode.c:1.8 ZendEngine2/zend_unicode.c:1.9 --- ZendEngine2/zend_unicode.c:1.8 Tue Feb 21 20:12:41 2006 +++ ZendEngine2/zend_unicode.c Thu Mar 2 13:12:44 2006 @@ -215,7 +215,7 @@ /* }}} */ /* {{{ zend_convert_from_unicode */ -ZEND_API void zend_convert_from_unicode(UConverter *conv, char **target, int32_t *target_len, const UChar *source, int32_t source_len, UErrorCode *status) +ZEND_API void zend_convert_from_unicode(UConverter *conv, char **target, int *target_len, const UChar *source, int source_len, UErrorCode *status) { char *buffer = NULL; char *output; @@ -262,8 +262,8 @@ /* {{{ zend_convert_encodings */ ZEND_API void zend_convert_encodings(UConverter *target_conv, UConverter *source_conv, - char **target, int32_t *target_len, - const char *source, int32_t source_len, UErrorCode *status) + char **target, int *target_len, + const char *source, int source_len, UErrorCode *status) { char *buffer = NULL; char *output; @@ -362,7 +362,7 @@ #endif UChar *u = Z_USTRVAL_P(string); - int32_t u_len = Z_USTRLEN_P(string); + int u_len = Z_USTRLEN_P(string); Z_TYPE_P(string) = IS_STRING; zend_convert_from_unicode(conv, &s, &s_len, u, u_len, &status); @@ -383,7 +383,7 @@ UErrorCode status = U_ZERO_ERROR; int retval = TRUE; UChar *u = NULL; - int32_t u_len; + int u_len; char *s = Z_STRVAL_P(string); int s_len = Z_STRLEN_P(string); @@ -413,7 +413,7 @@ { UErrorCode status = U_ZERO_ERROR; UChar *u = NULL; - int32_t u_len; + int u_len; int retval = TRUE; TSRMLS_FETCH(); @@ -434,13 +434,13 @@ * range U+0000 .. U+007F, we can simply casst ASCII chars to Unicode values and avoid * memory allocation. */ -ZEND_API int zend_cmp_unicode_and_literal(UChar *ustr, int32_t ulen, char *str, int32_t slen) +ZEND_API int zend_cmp_unicode_and_literal(UChar *ustr, int ulen, char *str, int slen) { - int32_t result; + int result; uint len = MIN(ulen, slen); while (len--) { - result = (int32_t)(uint16_t)*ustr - (int32_t)(uint16_t)*str; + result = (int)(uint16_t)*ustr - (int)(uint16_t)*str; if (result != 0) return result; ustr++; @@ -452,10 +452,11 @@ /* }}} */ /* {{{ zend_is_valid_identifier */ -ZEND_API int zend_is_valid_identifier(UChar *ident, int32_t ident_len) +ZEND_API int zend_is_valid_identifier(UChar *ident, int len) { UChar32 codepoint; int32_t i; + int32_t ident_len = len; UProperty id_prop = UCHAR_XID_START; for (i = 0; i < ident_len; ) { @@ -472,7 +473,7 @@ /* }}} */ /* {{{ zend_normalize_string */ -static inline void zend_normalize_string(UChar **dest, int32_t *dest_len, UChar *src, int32_t src_len, UErrorCode *status) +static inline void zend_normalize_string(UChar **dest, int32_t *dest_len, UChar *src, int src_len, UErrorCode *status) { UChar *buffer = NULL; int32_t buffer_len; http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_unicode.h?r1=1.8&r2=1.9&diff_format=u Index: ZendEngine2/zend_unicode.h diff -u ZendEngine2/zend_unicode.h:1.8 ZendEngine2/zend_unicode.h:1.9 --- ZendEngine2/zend_unicode.h:1.8 Tue Feb 21 20:12:41 2006 +++ ZendEngine2/zend_unicode.h Thu Mar 2 13:12:44 2006 @@ -43,25 +43,25 @@ /* API functions */ ZEND_API void zend_convert_to_unicode(UConverter *conv, UChar **target, int *target_len, const char *source, int source_len, UErrorCode *status); -ZEND_API void zend_convert_from_unicode(UConverter *conv, char **target, int32_t *target_len, const UChar *source, int32_t source_len, UErrorCode *status); -ZEND_API void zend_convert_encodings(UConverter *target_conv, UConverter *source_conv, char **target, int32_t *target_len, const char *source, int32_t source_len, UErrorCode *status); +ZEND_API void zend_convert_from_unicode(UConverter *conv, char **target, int *target_len, const UChar *source, int source_len, UErrorCode *status); +ZEND_API void zend_convert_encodings(UConverter *target_conv, UConverter *source_conv, char **target, int *target_len, const char *source, int source_len, UErrorCode *status); ZEND_API int zval_string_to_unicode_ex(zval *string, UConverter *conv); ZEND_API int zval_string_to_unicode(zval *string TSRMLS_DC); ZEND_API int zval_unicode_to_string(zval *string, UConverter *conv TSRMLS_DC); ZEND_API int zend_cmp_unicode_and_string(UChar *ustr, char* str, uint len); -ZEND_API int zend_cmp_unicode_and_literal(UChar *ustr, int32_t ulen, char* str, int32_t slen); +ZEND_API int zend_cmp_unicode_and_literal(UChar *ustr, int ulen, char* str, int slen); ZEND_API void zend_case_fold_string(UChar **dest, int *dest_len, UChar *src, int src_len, uint32_t options, UErrorCode *status); -ZEND_API int zend_is_valid_identifier(UChar *ident, int32_t ident_len); +ZEND_API int zend_is_valid_identifier(UChar *ident, int ident_len); ZEND_API int zend_normalize_identifier(UChar **dest, int *dest_len, UChar *ident, int ident_len, zend_bool fold_case); /* * Function to get a codepoint at position n. Iterates over codepoints starting from the * beginning of the string. Does not check for n > length, this is left up to the caller. */ -static inline UChar32 zend_get_codepoint_at(UChar *str, int32_t length, int32_t n) +static inline UChar32 zend_get_codepoint_at(UChar *str, int length, int n) { int32_t offset = 0; UChar32 c = 0; http://cvs.php.net/viewcvs.cgi/php-src/ext/pdo/pdo_stmt.c?r1=1.148&r2=1.149&diff_format=u Index: php-src/ext/pdo/pdo_stmt.c diff -u php-src/ext/pdo/pdo_stmt.c:1.148 php-src/ext/pdo/pdo_stmt.c:1.149 --- php-src/ext/pdo/pdo_stmt.c:1.148 Fri Feb 24 16:04:13 2006 +++ php-src/ext/pdo/pdo_stmt.c Thu Mar 2 13:12:45 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_stmt.c,v 1.148 2006/02/24 16:04:13 helly Exp $ */ +/* $Id: pdo_stmt.c,v 1.149 2006/03/02 13:12:45 dmitry Exp $ */ /* The PDO Statement Handle Class */ @@ -508,7 +508,7 @@ if (UG(unicode)) { UErrorCode status = U_ZERO_ERROR; UChar *u_str; - int32_t u_len; + int u_len; zend_convert_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &u_str, &u_len, value, value_len, &status); ZVAL_UNICODEL(dest, u_str, u_len, 0); http://cvs.php.net/viewcvs.cgi/php-src/ext/simplexml/simplexml.c?r1=1.196&r2=1.197&diff_format=u Index: php-src/ext/simplexml/simplexml.c diff -u php-src/ext/simplexml/simplexml.c:1.196 php-src/ext/simplexml/simplexml.c:1.197 --- php-src/ext/simplexml/simplexml.c:1.196 Wed Mar 1 15:36:34 2006 +++ php-src/ext/simplexml/simplexml.c Thu Mar 2 13:12:45 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: simplexml.c,v 1.196 2006/03/01 15:36:34 rrichards Exp $ */ +/* $Id: simplexml.c,v 1.197 2006/03/02 13:12:45 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1912,7 +1912,7 @@ if (UG(unicode)) { UErrorCode status = U_ZERO_ERROR; - int32_t u_len; + int u_len; namelen = xmlStrlen(curnode->name); zend_convert_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &str_key->u, &u_len, (char*)curnode->name, namelen, &status); @@ -2116,7 +2116,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, "Simplexml support", "enabled"); - php_info_print_table_row(2, "Revision", "$Revision: 1.196 $"); + php_info_print_table_row(2, "Revision", "$Revision: 1.197 $"); php_info_print_table_row(2, "Schema support", #ifdef LIBXML_SCHEMAS_ENABLED "enabled"); http://cvs.php.net/viewcvs.cgi/php-src/ext/sqlite/sqlite.c?r1=1.187&r2=1.188&diff_format=u Index: php-src/ext/sqlite/sqlite.c diff -u php-src/ext/sqlite/sqlite.c:1.187 php-src/ext/sqlite/sqlite.c:1.188 --- php-src/ext/sqlite/sqlite.c:1.187 Tue Feb 21 20:12:42 2006 +++ php-src/ext/sqlite/sqlite.c Thu Mar 2 13:12:45 2006 @@ -17,7 +17,7 @@ | Marcus Boerger <helly@php.net> | +----------------------------------------------------------------------+ - $Id: sqlite.c,v 1.187 2006/02/21 20:12:42 dmitry Exp $ + $Id: sqlite.c,v 1.188 2006/03/02 13:12:45 dmitry Exp $ */ #ifdef HAVE_CONFIG_H @@ -1127,7 +1127,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, "SQLite support", "enabled"); - php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.187 2006/02/21 20:12:42 dmitry Exp $"); + php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.188 2006/03/02 13:12:45 dmitry Exp $"); php_info_print_table_row(2, "SQLite Library", sqlite_libversion()); php_info_print_table_row(2, "SQLite Encoding", sqlite_libencoding()); php_info_print_table_end(); @@ -1685,7 +1685,7 @@ char *tmp = colnames[ncols + i] ? (char *)colnames[ncols + i] : ""; UErrorCode status = U_ZERO_ERROR; UChar *u_str; - int32_t u_len; + int u_len; zend_convert_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &u_str, &u_len, tmp, strlen(tmp), &status); if (result_type == PHPSQLITE_ASSOC) { @@ -1851,7 +1851,7 @@ if (UG(unicode)) { UErrorCode status = U_ZERO_ERROR; UChar *u_str; - int32_t u_len; + int u_len; zend_convert_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &u_str, &u_len, (char*)rowdata[j], strlen((char*)rowdata[j]), &status); ZVAL_UNICODEL(decoded, u_str, u_len, 0); @@ -1939,7 +1939,7 @@ } else if (UG(unicode)) { UErrorCode status = U_ZERO_ERROR; UChar *u_str; - int32_t u_len; + int u_len; zend_convert_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &u_str, &u_len, (char*)rowdata[j], strlen((char*)rowdata[j]), &status); RETVAL_UNICODEL(u_str, u_len, 0); @@ -2271,7 +2271,7 @@ } else if (UG(unicode)) { UErrorCode status = U_ZERO_ERROR; UChar *u_str; - int32_t u_len; + int u_len; zend_convert_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &u_str, &u_len, decoded, decoded_len, &status); if (free_decoded) { http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/array.c?r1=1.343&r2=1.344&diff_format=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.343 php-src/ext/standard/array.c:1.344 --- php-src/ext/standard/array.c:1.343 Sun Feb 26 11:57:14 2006 +++ php-src/ext/standard/array.c Thu Mar 2 13:12:45 2006 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: array.c,v 1.343 2006/02/26 11:57:14 dmitry Exp $ */ +/* $Id: array.c,v 1.344 2006/03/02 13:12:45 dmitry Exp $ */ #include "php.h" #include "php_ini.h" @@ -1738,7 +1738,7 @@ goto err; } for (; *low >= *high; (*low) -= (unsigned int)lstep) { - add_next_index_stringl(return_value, low, 1, 1); + add_next_index_stringl(return_value, (char*)low, 1, 1); if (((signed int)*low - lstep) < 0) { break; } @@ -1749,13 +1749,13 @@ goto err; } for (; *low <= *high; (*low) += (unsigned int)lstep) { - add_next_index_stringl(return_value, low, 1, 1); + add_next_index_stringl(return_value, (char*)low, 1, 1); if (((signed int)*low + lstep) > 255) { break; } } } else { - add_next_index_stringl(return_value, low, 1, 1); + add_next_index_stringl(return_value, (char*)low, 1, 1); } } else if (Z_TYPE_P(zlow) == IS_UNICODE && Z_USTRLEN_P(zlow) >= 1 && Z_USTRLEN_P(zhigh) >= 1) { @@ -2095,7 +2095,7 @@ zval **stack, /* Input stack */ **val; /* Value to be popped */ zstr key = NULL_ZSTR; - int key_len = 0; + uint key_len = 0; ulong index; zend_uchar key_type; @@ -2927,6 +2927,7 @@ zstr string_key; zstr new_key; uint str_key_len; + int str_len; ulong num_key; ulong change_to_upper=0; @@ -2968,13 +2969,12 @@ break; case HASH_KEY_IS_UNICODE: new_key.u = eustrndup(string_key.u, str_key_len - 1); - str_key_len--; + str_len = str_key_len - 1; if (change_to_upper) - new_key.u = php_u_strtoupper(&new_key.u, &str_key_len, UG(default_locale)); + new_key.u = php_u_strtoupper(&new_key.u, &str_len, UG(default_locale)); else - new_key.u = php_u_strtolower(&new_key.u, &str_key_len, UG(default_locale)); - str_key_len++; - zend_u_hash_update(Z_ARRVAL_P(return_value), IS_UNICODE, new_key, str_key_len, entry, sizeof(entry), NULL); + new_key.u = php_u_strtolower(&new_key.u, &str_len, UG(default_locale)); + zend_u_hash_update(Z_ARRVAL_P(return_value), IS_UNICODE, new_key, str_len+1, entry, sizeof(entry), NULL); efree(new_key.u); break; } http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/base64.c?r1=1.45&r2=1.46&diff_format=u Index: php-src/ext/standard/base64.c diff -u php-src/ext/standard/base64.c:1.45 php-src/ext/standard/base64.c:1.46 --- php-src/ext/standard/base64.c:1.45 Sun Jan 1 13:09:54 2006 +++ php-src/ext/standard/base64.c Thu Mar 2 13:12:45 2006 @@ -15,7 +15,7 @@ | Author: Jim Winstead <jimw@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: base64.c,v 1.45 2006/01/01 13:09:54 sniper Exp $ */ +/* $Id: base64.c,v 1.46 2006/03/02 13:12:45 dmitry Exp $ */ #include <string.h> @@ -207,9 +207,9 @@ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &str, &str_len) == FAILURE) { return; } - result = php_base64_encode(str, str_len, &ret_length); + result = php_base64_encode((unsigned char*)str, str_len, &ret_length); if (result != NULL) { - RETVAL_STRINGL(result, ret_length, 0); + RETVAL_STRINGL((char*)result, ret_length, 0); } else { RETURN_FALSE; } @@ -228,9 +228,9 @@ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &str, &str_len) == FAILURE) { return; } - result = php_base64_decode(str, str_len, &ret_length); + result = php_base64_decode((unsigned char*)str, str_len, &ret_length); if (result != NULL) { - RETVAL_STRINGL(result, ret_length, 0); + RETVAL_STRINGL((char*)result, ret_length, 0); } else { RETURN_FALSE; } http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/dns.c?r1=1.78&r2=1.79&diff_format=u Index: php-src/ext/standard/dns.c diff -u php-src/ext/standard/dns.c:1.78 php-src/ext/standard/dns.c:1.79 --- php-src/ext/standard/dns.c:1.78 Sun Jan 1 13:09:55 2006 +++ php-src/ext/standard/dns.c Thu Mar 2 13:12:45 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dns.c,v 1.78 2006/01/01 13:09:55 sniper Exp $ */ +/* $Id: dns.c,v 1.79 2006/03/02 13:12:45 dmitry Exp $ */ /* {{{ includes */ #include "php.h" @@ -462,11 +462,11 @@ add_assoc_string(*subarray, "type", "HINFO", 1); n = *cp & 0xFF; cp++; - add_assoc_stringl(*subarray, "cpu", cp, n, 1); + add_assoc_stringl(*subarray, "cpu", (char*)cp, n, 1); cp += n; n = *cp & 0xFF; cp++; - add_assoc_stringl(*subarray, "os", cp, n, 1); + add_assoc_stringl(*subarray, "os", (char*)cp, n, 1); cp += n; break; case DNS_T_TXT: @@ -476,7 +476,7 @@ memcpy(tp, cp + 1, n); tp[n] = '\0'; cp += dlen; - add_assoc_stringl(*subarray, "txt", tp, n, 0); + add_assoc_stringl(*subarray, "txt", (char*)tp, n, 0); break; case DNS_T_SOA: add_assoc_string(*subarray, "type", "SOA", 1); @@ -504,7 +504,7 @@ add_assoc_long(*subarray, "minimum-ttl", n); break; case DNS_T_AAAA: - tp = name; + tp = (u_char*)name; for(i=0; i < 8; i++) { GETSHORT(s, cp); if (s != 0) { @@ -513,7 +513,7 @@ tp[0] = ':'; tp++; } - tp += sprintf(tp,"%x",s); + tp += sprintf((char*)tp,"%x",s); } else { if (!have_v6_break) { have_v6_break = 1; @@ -542,7 +542,7 @@ n = ((int)cp[0]) & 0xFF; cp++; add_assoc_long(*subarray, "masklen", n); - tp = name; + tp = (u_char*)name; if (n > 15) { have_v6_break = 1; in_v6_break = 1; @@ -557,7 +557,7 @@ tp[0] = ':'; tp++; } - sprintf(tp, "%x", cp[0] & 0xFF); + sprintf((char*)tp, "%x", cp[0] & 0xFF); } else { if (!have_v6_break) { have_v6_break = 1; @@ -581,7 +581,7 @@ tp[0] = ':'; tp++; } - tp += sprintf(tp,"%x",s); + tp += sprintf((char*)tp,"%x",s); } else { if (!have_v6_break) { have_v6_break = 1; @@ -633,13 +633,13 @@ GETSHORT(n, cp); add_assoc_long(*subarray, "pref", n); n = (cp[0] & 0xFF); - add_assoc_stringl(*subarray, "flags", ++cp, n, 1); + add_assoc_stringl(*subarray, "flags", (char*)++cp, n, 1); cp += n; n = (cp[0] & 0xFF); - add_assoc_stringl(*subarray, "services", ++cp, n, 1); + add_assoc_stringl(*subarray, "services", (char*)++cp, n, 1); cp += n; n = (cp[0] & 0xFF); - add_assoc_stringl(*subarray, "regex", ++cp, n, 1); + add_assoc_stringl(*subarray, "regex", (char*)++cp, n, 1); cp += n; n = dn_expand(answer->qb2, answer->qb2+65536, cp, name, (sizeof name) - 2); if (n < 0) { http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/exec.c?r1=1.116&r2=1.117&diff_format=u Index: php-src/ext/standard/exec.c diff -u php-src/ext/standard/exec.c:1.116 php-src/ext/standard/exec.c:1.117 --- php-src/ext/standard/exec.c:1.116 Sun Feb 19 18:19:33 2006 +++ php-src/ext/standard/exec.c Thu Mar 2 13:12:45 2006 @@ -16,7 +16,7 @@ | Ilia Alshanetsky <iliaa@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: exec.c,v 1.116 2006/02/19 18:19:33 iliaa Exp $ */ +/* $Id: exec.c,v 1.117 2006/03/02 13:12:45 dmitry Exp $ */ #include <stdio.h> #include "php.h" @@ -61,7 +61,7 @@ FILE *fp; char *buf, *tmp=NULL; int l, pclose_return; - char *cmd_p, *b, *c, *d=NULL; + char *cmd_p, *b, *d=NULL; php_stream *stream; size_t buflen, bufl = 0; #if PHP_SIGCHILD http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/file.c?r1=1.420&r2=1.421&diff_format=u Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.420 php-src/ext/standard/file.c:1.421 --- php-src/ext/standard/file.c:1.420 Sun Feb 19 18:19:33 2006 +++ php-src/ext/standard/file.c Thu Mar 2 13:12:45 2006 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c,v 1.420 2006/02/19 18:19:33 iliaa Exp $ */ +/* $Id: file.c,v 1.421 2006/03/02 13:12:45 dmitry Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -625,8 +625,8 @@ numbytes = -1; break; } else if (wrote_bytes != UBYTES(Z_USTRLEN_PP(tmp))) { - int32_t ustrlen = u_countChar32(Z_USTRVAL_PP(tmp), Z_USTRLEN_PP(tmp)); - int32_t numchars = u_countChar32(Z_USTRVAL_PP(tmp), wrote_bytes / UBYTES(1)); + int ustrlen = u_countChar32(Z_USTRVAL_PP(tmp), Z_USTRLEN_PP(tmp)); + int numchars = u_countChar32(Z_USTRVAL_PP(tmp), wrote_bytes / UBYTES(1)); php_error_docref(NULL TSRMLS_CC, E_WARNING, "Only %d of %d characters written, possibly out of free disk space", numchars, ustrlen); numbytes = -1; @@ -675,8 +675,8 @@ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to write %d characters to %s", Z_USTRLEN_P(data), filename); numbytes = -1; } else if (numbytes != UBYTES(Z_USTRLEN_P(data))) { - int32_t ustrlen = u_countChar32(Z_USTRVAL_P(data), Z_USTRLEN_P(data)); - int32_t numchars = u_countChar32(Z_USTRVAL_P(data), numbytes / UBYTES(1)); + int ustrlen = u_countChar32(Z_USTRVAL_P(data), Z_USTRLEN_P(data)); + int numchars = u_countChar32(Z_USTRVAL_P(data), numbytes / UBYTES(1)); php_error_docref(NULL TSRMLS_CC, E_WARNING, "Only %d of %d characters written, possibly out of free disk space", numchars, ustrlen); numbytes = -1; @@ -935,8 +935,7 @@ { zval **arg1, **arg2; FILE *fp; - char *p, *tmp = NULL; - char *b, *buf = 0; + char *p; php_stream *stream; if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) { @@ -1076,7 +1075,7 @@ } else { if (is_unicode) { UChar *ubuf = (UChar *)buf; - int32_t num_u16 = num_bytes >> 1; + int num_u16 = num_bytes >> 1; ubuf[num_u16] = 0; RETURN_UNICODEL(ubuf, num_u16, 1); } else { http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/filters.c?r1=1.51&r2=1.52&diff_format=u Index: php-src/ext/standard/filters.c diff -u php-src/ext/standard/filters.c:1.51 php-src/ext/standard/filters.c:1.52 --- php-src/ext/standard/filters.c:1.51 Wed Jan 18 23:55:27 2006 +++ php-src/ext/standard/filters.c Thu Mar 2 13:12:45 2006 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: filters.c,v 1.51 2006/01/18 23:55:27 tony2001 Exp $ */ +/* $Id: filters.c,v 1.52 2006/03/02 13:12:45 dmitry Exp $ */ #include "php.h" #include "php_globals.h" @@ -1362,7 +1362,7 @@ static int php_conv_get_uint_prop_ex(const HashTable *ht, unsigned int *pretval, char *field_name, size_t field_name_len) { - long l; + ulong l; php_conv_err_t err; *pretval = 0; http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/ftp_fopen_wrapper.c?r1=1.88&r2=1.89&diff_format=u Index: php-src/ext/standard/ftp_fopen_wrapper.c diff -u php-src/ext/standard/ftp_fopen_wrapper.c:1.88 php-src/ext/standard/ftp_fopen_wrapper.c:1.89 --- php-src/ext/standard/ftp_fopen_wrapper.c:1.88 Sun Jan 1 13:09:55 2006 +++ php-src/ext/standard/ftp_fopen_wrapper.c Thu Mar 2 13:12:45 2006 @@ -18,7 +18,7 @@ | Sara Golemon <pollita@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: ftp_fopen_wrapper.c,v 1.88 2006/01/01 13:09:55 sniper Exp $ */ +/* $Id: ftp_fopen_wrapper.c,v 1.89 2006/03/02 13:12:45 dmitry Exp $ */ #include "php.h" #include "php_globals.h" @@ -210,7 +210,7 @@ } #define PHP_FTP_CNTRL_CHK(val, val_len, err_msg) { \ - unsigned char *s = val, *e = s + val_len; \ + unsigned char *s = (unsigned char*)val, *e = s + val_len; \ while (s < e) { \ if (iscntrl(*s)) { \ php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, err_msg, val); \ http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/html.c?r1=1.113&r2=1.114&diff_format=u Index: php-src/ext/standard/html.c diff -u php-src/ext/standard/html.c:1.113 php-src/ext/standard/html.c:1.114 --- php-src/ext/standard/html.c:1.113 Sat Feb 25 21:30:32 2006 +++ php-src/ext/standard/html.c Thu Mar 2 13:12:45 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: html.c,v 1.113 2006/02/25 21:30:32 rasmus Exp $ */ +/* $Id: html.c,v 1.114 2006/03/02 13:12:45 dmitry Exp $ */ /* * HTML entity resources: @@ -875,8 +875,9 @@ /* {{{ php_unescape_html_entities */ -PHPAPI char *php_unescape_html_entities(unsigned char *old, int oldlen, int *newlen, int all, int quote_style, char *hint_charset TSRMLS_DC) +PHPAPI char *php_unescape_html_entities(char *orig, int oldlen, int *newlen, int all, int quote_style, char *hint_charset TSRMLS_DC) { + unsigned char *old = (unsigned char*)orig; int retlen; int j, k; char *replaced, *ret, *p, *q, *lim, *next; @@ -884,7 +885,7 @@ unsigned char replacement[15]; int replacement_len; - ret = estrndup(old, oldlen); + ret = estrndup((char*)old, oldlen); retlen = oldlen; if (!retlen) { goto empty_source; @@ -897,7 +898,7 @@ continue; for (k = entity_map[j].basechar; k <= entity_map[j].endchar; k++) { - unsigned char entity[32]; + char entity[32]; int entity_length = 0; if (entity_map[j].table[k - entity_map[j].basechar] == NULL) @@ -943,7 +944,7 @@ } if (php_memnstr(ret, entity, entity_length, ret+retlen)) { - replaced = php_str_to_str(ret, retlen, entity, entity_length, replacement, replacement_len, &retlen); + replaced = php_str_to_str(ret, retlen, entity, entity_length, (char*)replacement, replacement_len, &retlen); efree(ret); ret = replaced; } @@ -960,7 +961,7 @@ replacement[1] = '\0'; if (php_memnstr(ret, basic_entities[j].entity, basic_entities[j].entitylen, ret+retlen)) { - replaced = php_str_to_str(ret, retlen, basic_entities[j].entity, basic_entities[j].entitylen, replacement, 1, &retlen); + replaced = php_str_to_str(ret, retlen, basic_entities[j].entity, basic_entities[j].entitylen, (char*)replacement, 1, &retlen); efree(ret); ret = replaced; } @@ -985,7 +986,7 @@ if (next != NULL && *next == ';') { switch (charset) { case cs_utf_8: - q += php_utf32_utf8(q, code); + q += php_utf32_utf8((unsigned char*)q, code); break; case cs_8859_1: @@ -1075,8 +1076,9 @@ /* {{{ php_escape_html_entities */ -PHPAPI char *php_escape_html_entities(unsigned char *old, int oldlen, int *newlen, int all, int quote_style, char *hint_charset TSRMLS_DC) +PHPAPI char *php_escape_html_entities(char *orig, int oldlen, int *newlen, int all, int quote_style, char *hint_charset TSRMLS_DC) { + unsigned char *old = (unsigned char *)orig; int i, j, maxlen, len; char *replaced; enum entity_charset charset = determine_charset(hint_charset TSRMLS_CC); @@ -1101,14 +1103,14 @@ if (all) { /* look for a match in the maps for this charset */ - unsigned char *rep = NULL; + char *rep = NULL; for (j = 0; entity_map[j].charset != cs_terminator; j++) { if (entity_map[j].charset == charset && this_char >= entity_map[j].basechar && this_char <= entity_map[j].endchar) { - rep = (unsigned char*)entity_map[j].table[this_char - entity_map[j].basechar]; + rep = (char*)entity_map[j].table[this_char - entity_map[j].basechar]; if (rep == NULL) { /* there is no entity for this position; fall through and * just output the character itself */ http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/html.h?r1=1.21&r2=1.22&diff_format=u Index: php-src/ext/standard/html.h diff -u php-src/ext/standard/html.h:1.21 php-src/ext/standard/html.h:1.22 --- php-src/ext/standard/html.h:1.21 Sun Jan 1 13:09:55 2006 +++ php-src/ext/standard/html.h Thu Mar 2 13:12:45 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: html.h,v 1.21 2006/01/01 13:09:55 sniper Exp $ */ +/* $Id: html.h,v 1.22 2006/03/02 13:12:45 dmitry Exp $ */ #ifndef HTML_H #define HTML_H @@ -37,6 +37,6 @@ PHP_FUNCTION(html_entity_decode); PHP_FUNCTION(get_html_translation_table); -PHPAPI char *php_escape_html_entities(unsigned char *old, int oldlen, int *newlen, int all, int quote_style, char *hint_charset TSRMLS_DC); +PHPAPI char *php_escape_html_entities(char *old, int oldlen, int *newlen, int all, int quote_style, char *hint_charset TSRMLS_DC); #endif /* HTML_H */ http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/http.c?r1=1.18&r2=1.19&diff_format=u Index: php-src/ext/standard/http.c diff -u php-src/ext/standard/http.c:1.18 php-src/ext/standard/http.c:1.19 --- php-src/ext/standard/http.c:1.18 Tue Feb 21 20:12:42 2006 +++ php-src/ext/standard/http.c Thu Mar 2 13:12:45 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: http.c,v 1.18 2006/02/21 20:12:42 dmitry Exp $ */ +/* $Id: http.c,v 1.19 2006/03/02 13:12:45 dmitry Exp $ */ #include "php_http.h" #include "php_ini.h" @@ -33,7 +33,8 @@ { zstr key; char *ekey, *newprefix, *p; - int arg_sep_len, key_len, ekey_len, key_type, newprefix_len; + uint key_len; + int arg_sep_len, ekey_len, key_type, newprefix_len; ulong idx; zval **zdata = NULL, *copyzval; http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/http_fopen_wrapper.c?r1=1.110&r2=1.111&diff_format=u Index: php-src/ext/standard/http_fopen_wrapper.c diff -u php-src/ext/standard/http_fopen_wrapper.c:1.110 php-src/ext/standard/http_fopen_wrapper.c:1.111 --- php-src/ext/standard/http_fopen_wrapper.c:1.110 Sun Feb 19 04:29:41 2006 +++ php-src/ext/standard/http_fopen_wrapper.c Thu Mar 2 13:12:45 2006 @@ -19,7 +19,7 @@ | Sara Golemon <pollita@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: http_fopen_wrapper.c,v 1.110 2006/02/19 04:29:41 andi Exp $ */ +/* $Id: http_fopen_wrapper.c,v 1.111 2006/03/02 13:12:45 dmitry Exp $ */ #include "php.h" #include "php_globals.h" @@ -378,7 +378,7 @@ strcat(scratch, ":"); strcat(scratch, resource->pass); - tmp = php_base64_encode((unsigned char*)scratch, strlen(scratch), NULL); + tmp = (char*)php_base64_encode((unsigned char*)scratch, strlen(scratch), NULL); if (snprintf(scratch, scratch_len, "Authorization: Basic %s\r\n", tmp) > 0) { php_stream_write(stream, scratch, strlen(scratch)); @@ -627,7 +627,7 @@ unsigned char *s, *e; \ int l; \ l = php_url_decode(val, strlen(val)); \ - s = val; e = s + l; \ + s = (unsigned char*)val; e = s + l; \ while (s < e) { \ if (iscntrl(*s)) { \ php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "Invalid redirect url! %s", new_path); \ http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/image.c?r1=1.119&r2=1.120&diff_format=u Index: php-src/ext/standard/image.c diff -u php-src/ext/standard/image.c:1.119 php-src/ext/standard/image.c:1.120 --- php-src/ext/standard/image.c:1.119 Sun Feb 19 04:29:41 2006 +++ php-src/ext/standard/image.c Thu Mar 2 13:12:45 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: image.c,v 1.119 2006/02/19 04:29:41 andi Exp $ */ +/* $Id: image.c,v 1.120 2006/03/02 13:12:45 dmitry Exp $ */ #include "php.h" #include <stdio.h> @@ -101,7 +101,7 @@ if (php_stream_seek(stream, 3, SEEK_CUR)) return NULL; - if (php_stream_read(stream, dim, sizeof(dim)) != sizeof(dim)) + if (php_stream_read(stream, (char*)dim, sizeof(dim)) != sizeof(dim)) return NULL; result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); @@ -124,7 +124,7 @@ if (php_stream_seek(stream, 11, SEEK_CUR)) return NULL; - if (php_stream_read(stream, dim, sizeof(dim)) != sizeof(dim)) + if (php_stream_read(stream, (char*)dim, sizeof(dim)) != sizeof(dim)) return NULL; result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); @@ -146,7 +146,7 @@ if (php_stream_seek(stream, 11, SEEK_CUR)) return NULL; - if (php_stream_read(stream, dim, sizeof(dim)) != sizeof(dim)) + if (php_stream_read(stream, (char*)dim, sizeof(dim)) != sizeof(dim)) return NULL; size = (((unsigned int)dim[ 3]) << 24) + (((unsigned int)dim[ 2]) << 16) + (((unsigned int)dim[ 1]) << 8) + ((unsigned int) dim[ 0]); @@ -196,22 +196,22 @@ unsigned long len=64, szlength; int factor=1,maxfactor=16; int slength, status=0; - char *b, *buf=NULL, *bufz=NULL; + unsigned char *b, *buf=NULL, *bufz=NULL; b = ecalloc (1, len + 1); if (php_stream_seek(stream, 5, SEEK_CUR)) return NULL; - if (php_stream_read(stream, a, sizeof(a)) != sizeof(a)) + if (php_stream_read(stream, (char*)a, sizeof(a)) != sizeof(a)) return NULL; - if (uncompress(b, &len, a, sizeof(a)) != Z_OK) { + if (uncompress((unsigned char*)b, &len, a, sizeof(a)) != Z_OK) { /* failed to decompress the file, will try reading the rest of the file */ if (php_stream_seek(stream, 8, SEEK_SET)) return NULL; - slength = php_stream_copy_to_mem(stream, &bufz, PHP_STREAM_COPY_ALL, 0); + slength = php_stream_copy_to_mem(stream, (char**)&bufz, PHP_STREAM_COPY_ALL, 0); /* * zlib::uncompress() wants to know the output data length @@ -223,7 +223,7 @@ do { szlength=slength*(1<<factor++); - buf = (char *) erealloc(buf,szlength); + buf = (unsigned char *) erealloc(buf,szlength); status = uncompress(buf, &szlength, bufz, slength); } while ((status==Z_BUF_ERROR)&&(factor<maxfactor)); @@ -268,7 +268,7 @@ if (php_stream_seek(stream, 5, SEEK_CUR)) return NULL; - if (php_stream_read(stream, a, sizeof(a)) != sizeof(a)) + if (php_stream_read(stream, (char*)a, sizeof(a)) != sizeof(a)) return NULL; result = (struct gfxinfo *) ecalloc (1, sizeof (struct gfxinfo)); @@ -301,7 +301,7 @@ if (php_stream_seek(stream, 8, SEEK_CUR)) return NULL; - if((php_stream_read(stream, dim, sizeof(dim))) < sizeof(dim)) + if((php_stream_read(stream, (char*)dim, sizeof(dim))) < sizeof(dim)) return NULL; result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); @@ -358,7 +358,7 @@ unsigned char a[2]; /* just return 0 if we hit the end-of-file */ - if((php_stream_read(stream, a, sizeof(a))) <= 0) return 0; + if((php_stream_read(stream, (char*)a, sizeof(a))) <= 0) return 0; return (((unsigned short)a[0]) << 8) + ((unsigned short)a[1]); } @@ -437,8 +437,8 @@ static int php_read_APP(php_stream * stream, unsigned int marker, zval *info TSRMLS_DC) { unsigned short length; - unsigned char *buffer; - unsigned char markername[16]; + char *buffer; + char markername[16]; zval *tmp; length = php_read2(stream TSRMLS_CC); @@ -562,7 +562,7 @@ unsigned char a[4]; /* just return 0 if we hit the end-of-file */ - if ((php_stream_read(stream, a, sizeof(a))) != sizeof(a)) return 0; + if ((php_stream_read(stream, (char*)a, sizeof(a))) != sizeof(a)) return 0; return (((unsigned int)a[0]) << 24) + (((unsigned int)a[1]) << 16) @@ -803,7 +803,8 @@ unsigned char *dir_entry; size_t ifd_size, dir_size, entry_value, width=0, height=0, ifd_addr; int entry_tag , entry_type; - char *ifd_data, ifd_ptr[4]; + unsigned char *ifd_data; + char ifd_ptr[4]; if (php_stream_read(stream, ifd_ptr, 4) != 4) return NULL; @@ -812,7 +813,7 @@ return NULL; ifd_size = 2; ifd_data = emalloc(ifd_size); - if (php_stream_read(stream, ifd_data, 2) != 2) { + if (php_stream_read(stream, (char*)ifd_data, 2) != 2) { efree(ifd_data); return NULL; } @@ -820,7 +821,7 @@ dir_size = 2/*num dir entries*/ +12/*length of entry*/*num_entries +4/* offset to next ifd (points to thumbnail or NULL)*/; ifd_size = dir_size; ifd_data = erealloc(ifd_data,ifd_size); - if (php_stream_read(stream, ifd_data+2, dir_size-2) != dir_size-2) { + if (php_stream_read(stream, (char*)ifd_data+2, dir_size-2) != dir_size-2) { efree(ifd_data); return NULL; } @@ -885,16 +886,16 @@ int size; short width, height, bits; - if (php_stream_read(stream, a, 8) != 8) { + if (php_stream_read(stream, (char*)a, 8) != 8) { return NULL; } - if (strncmp(a+4, "ILBM", 4) && strncmp(a+4, "PBM ", 4)) { + if (strncmp((char*)a+4, "ILBM", 4) && strncmp((char*)a+4, "PBM ", 4)) { return NULL; } /* loop chunks to find BMHD chunk */ do { - if (php_stream_read(stream, a, 8) != 8) { + if (php_stream_read(stream, (char*)a, 8) != 8) { return NULL; } chunkId = php_ifd_get32s(a+0, 1); @@ -906,7 +907,7 @@ size++; } if (chunkId == 0x424d4844) { /* BMHD chunk */ - if (size < 9 || php_stream_read(stream, a, 9) != 9) { + if (size < 9 || php_stream_read(stream, (char*)a, 9) != 9) { return NULL; } width = php_ifd_get16s(a+0, 1); http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/info.c?r1=1.259&r2=1.260&diff_format=u Index: php-src/ext/standard/info.c diff -u php-src/ext/standard/info.c:1.259 php-src/ext/standard/info.c:1.260 --- php-src/ext/standard/info.c:1.259 Tue Feb 21 20:12:42 2006 +++ php-src/ext/standard/info.c Thu Mar 2 13:12:45 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: info.c,v 1.259 2006/02/21 20:12:42 dmitry Exp $ */ +/* $Id: info.c,v 1.260 2006/03/02 13:12:45 dmitry Exp $ */ #include "php.h" #include "php_ini.h" @@ -508,7 +508,7 @@ HashTable *url_stream_wrappers_hash; zstr stream_protocol; char *stream_protocols_buf = NULL; - int stream_protocol_len, stream_protocols_buf_len = 0; + uint stream_protocol_len, stream_protocols_buf_len = 0; ulong num_key; if ((url_stream_wrappers_hash = php_stream_get_url_stream_wrappers_hash())) { @@ -540,7 +540,7 @@ HashTable *stream_xport_hash; zstr xport_name; char *xport_buf = NULL; - int xport_name_len, xport_buf_len = 0, xport_buf_size = 0; + uint xport_name_len, xport_buf_len = 0, xport_buf_size = 0; ulong num_key; if ((stream_xport_hash = php_stream_xport_get_hash())) { @@ -582,7 +582,7 @@ HashTable *stream_filter_hash; zstr filter_name; char *filter_buf = NULL; - int filter_name_len, filter_buf_len = 0, filter_buf_size = 0; + uint filter_name_len, filter_buf_len = 0, filter_buf_size = 0; ulong num_key; if ((stream_filter_hash = php_get_stream_filters_hash())) { http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/iptc.c?r1=1.53&r2=1.54&diff_format=u Index: php-src/ext/standard/iptc.c diff -u php-src/ext/standard/iptc.c:1.53 php-src/ext/standard/iptc.c:1.54 --- php-src/ext/standard/iptc.c:1.53 Sun Feb 19 03:07:39 2006 +++ php-src/ext/standard/iptc.c Thu Mar 2 13:12:45 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: iptc.c,v 1.53 2006/02/19 03:07:39 andi Exp $ */ +/* $Id: iptc.c,v 1.54 2006/03/02 13:12:45 dmitry Exp $ */ /* * Functions to parse & compse IPTC data. @@ -286,7 +286,7 @@ fclose(fp); if (spool < 2) { - RETVAL_STRINGL(spoolbuf, poi - spoolbuf, 0); + RETVAL_STRINGL((char*)spoolbuf, poi - spoolbuf, 0); } else { RETURN_TRUE; } @@ -300,7 +300,7 @@ unsigned int length, inx, len, tagsfound; unsigned char *buffer; unsigned char recnum, dataset; - unsigned char key[ 16 ]; + char key[16]; zval *values, **str, **element; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) { @@ -310,7 +310,7 @@ inx = 0; length = Z_STRLEN_PP(str); - buffer = Z_STRVAL_PP(str); + buffer = (unsigned char*)Z_STRVAL_PP(str); tagsfound = 0; /* number of tags already found */ @@ -359,7 +359,7 @@ zend_hash_update(Z_ARRVAL_P(return_value), key, strlen(key)+1, (void *) &values, sizeof(zval*), (void **) &element); } - add_next_index_stringl(*element, buffer+inx, len, 1); + add_next_index_stringl(*element, (char*)buffer+inx, len, 1); inx += len; http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/levenshtein.c?r1=1.38&r2=1.39&diff_format=u Index: php-src/ext/standard/levenshtein.c diff -u php-src/ext/standard/levenshtein.c:1.38 php-src/ext/standard/levenshtein.c:1.39 --- php-src/ext/standard/levenshtein.c:1.38 Thu Jan 12 15:37:56 2006 +++ php-src/ext/standard/levenshtein.c Thu Mar 2 13:12:45 2006 @@ -15,7 +15,7 @@ | Author: Hartmut Holzgraefe <hholzgra@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: levenshtein.c,v 1.38 2006/01/12 15:37:56 hholzgra Exp $ */ +/* $Id: levenshtein.c,v 1.39 2006/03/02 13:12:45 dmitry Exp $ */ #include "php.h" #include <stdlib.h> @@ -27,7 +27,7 @@ /* {{{ reference_levdist * reference implementation, only optimized for memory usage, not speed */ -static int reference_levdist(void *s1, int32_t l1, void *s2, int32_t l2, zend_uchar str_type, int cost_ins, int cost_rep, int cost_del ) +static int reference_levdist(void *s1, int l1, void *s2, int l2, zend_uchar str_type, int cost_ins, int cost_rep, int cost_del ) { int *p1, *p2, *tmp; int32_t i1, i2, j1, j2, cp1, cp2; @@ -104,7 +104,7 @@ { int argc = ZEND_NUM_ARGS(); void *str1, *str2; - int32_t str1_len, str2_len; + int str1_len, str2_len; zend_uchar str1_type, str2_type; long cost_ins, cost_rep, cost_del; char *callback_name; http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/md5.c?r1=1.45&r2=1.46&diff_format=u Index: php-src/ext/standard/md5.c diff -u php-src/ext/standard/md5.c:1.45 php-src/ext/standard/md5.c:1.46 --- php-src/ext/standard/md5.c:1.45 Sun Feb 19 04:29:41 2006 +++ php-src/ext/standard/md5.c Thu Mar 2 13:12:45 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: md5.c,v 1.45 2006/02/19 04:29:41 andi Exp $ */ +/* $Id: md5.c,v 1.46 2006/03/02 13:12:45 dmitry Exp $ */ /* * md5.c - Copyright 1997 Lachlan Roche @@ -55,10 +55,10 @@ md5str[0] = '\0'; PHP_MD5Init(&context); - PHP_MD5Update(&context, arg, arg_len); + PHP_MD5Update(&context, (unsigned char*)arg, arg_len); PHP_MD5Final(digest, &context); if (raw_output) { - RETURN_STRINGL(digest, 16, 1); + RETURN_STRINGL((char*)digest, 16, 1); } else { make_digest(md5str, digest); RETVAL_ASCII_STRING(md5str, 1); @@ -92,7 +92,7 @@ PHP_MD5Init(&context); - while ((n = php_stream_read(stream, buf, sizeof(buf))) > 0) { + while ((n = php_stream_read(stream, (char*)buf, sizeof(buf))) > 0) { PHP_MD5Update(&context, buf, n); } @@ -105,7 +105,7 @@ } if (raw_output) { - RETURN_STRINGL(digest, 16, 1); + RETURN_STRINGL((char*)digest, 16, 1); } else { make_digest(md5str, digest); RETVAL_ASCII_STRING(md5str, 1); http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/php_string.h?r1=1.95&r2=1.96&diff_format=u Index: php-src/ext/standard/php_string.h diff -u php-src/ext/standard/php_string.h:1.95 php-src/ext/standard/php_string.h:1.96 --- php-src/ext/standard/php_string.h:1.95 Sun Jan 1 13:09:55 2006 +++ php-src/ext/standard/php_string.h Thu Mar 2 13:12:45 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_string.h,v 1.95 2006/01/01 13:09:55 sniper Exp $ */ +/* $Id: php_string.h,v 1.96 2006/03/02 13:12:45 dmitry Exp $ */ /* Synced with php 3.0 revision 1.43 1999-06-16 [ssb] */ @@ -117,30 +117,30 @@ PHPAPI char *php_strtoupper(char *s, size_t len); PHPAPI char *php_strtolower(char *s, size_t len); -PHPAPI UChar *php_u_strtoupper(UChar **s, int32_t *len, const char *locale); -PHPAPI UChar *php_u_strtolower(UChar **s, int32_t *len, const char *locale); +PHPAPI UChar *php_u_strtoupper(UChar **s, int *len, const char *locale); +PHPAPI UChar *php_u_strtolower(UChar **s, int *len, const char *locale); PHPAPI char *php_strtr(char *str, int len, char *str_from, char *str_to, int trlen); -PHPAPI UChar *php_u_addslashes(UChar *str, int32_t length, int32_t *new_length, int freeit TSRMLS_DC); -PHPAPI UChar *php_u_addslashes_ex(UChar *str, int32_t length, int32_t *new_length, int freeit, int ignore_sybase TSRMLS_DC); +PHPAPI UChar *php_u_addslashes(UChar *str, int length, int *new_length, int freeit TSRMLS_DC); +PHPAPI UChar *php_u_addslashes_ex(UChar *str, int length, int *new_length, int freeit, int ignore_sybase TSRMLS_DC); PHPAPI char *php_addslashes(char *str, int length, int *new_length, int freeit TSRMLS_DC); PHPAPI char *php_addslashes_ex(char *str, int length, int *new_length, int freeit, int ignore_sybase TSRMLS_DC); PHPAPI char *php_addcslashes(char *str, int length, int *new_length, int freeit, char *what, int wlength TSRMLS_DC); PHPAPI void php_stripslashes(char *str, int *len TSRMLS_DC); -PHPAPI void php_u_stripslashes(UChar *str, int32_t *len TSRMLS_DC); +PHPAPI void php_u_stripslashes(UChar *str, int *len TSRMLS_DC); PHPAPI void php_stripcslashes(char *str, int *len); PHPAPI void php_basename(char *s, size_t len, char *suffix, size_t sufflen, char **p_ret, size_t *p_len TSRMLS_DC); PHPAPI size_t php_dirname(char *str, size_t len); -PHPAPI UChar *php_u_stristr(UChar *s, UChar *t, int32_t s_len, int32_t t_len); -PHPAPI char *php_stristr(unsigned char *s, unsigned char *t, size_t s_len, size_t t_len); -PHPAPI int32_t php_u_strspn(UChar *s1, UChar *s2, UChar *s1_end, UChar *s2_end); +PHPAPI UChar *php_u_stristr(UChar *s, UChar *t, int s_len, int t_len); +PHPAPI char *php_stristr(char *s, char *t, size_t s_len, size_t t_len); +PHPAPI int php_u_strspn(UChar *s1, UChar *s2, UChar *s1_end, UChar *s2_end); PHPAPI size_t php_strspn(char *s1, char *s2, char *s1_end, char *s2_end); -PHPAPI int32_t php_u_strcspn(UChar *s1, UChar *s2, UChar *s1_end, UChar *s2_end); +PHPAPI int php_u_strcspn(UChar *s1, UChar *s2, UChar *s1_end, UChar *s2_end); PHPAPI char *php_str_to_str_ex(char *haystack, int length, char *needle, int needle_len, char *str, int str_len, int *_new_length, int case_sensitivity, int *replace_count); PHPAPI char *php_str_to_str(char *haystack, int length, char *needle, int needle_len, char *str, int str_len, int *_new_length); PHPAPI char *php_trim(char *c, int len, char *what, int what_len, zend_uchar str_type, zval *return_value, int mode TSRMLS_DC); -PHPAPI int32_t php_u_strip_tags(UChar *rbuf, int32_t len, int *stateptr, UChar *allow, int32_t allow_len TSRMLS_DC); +PHPAPI int php_u_strip_tags(UChar *rbuf, int len, int *stateptr, UChar *allow, int allow_len TSRMLS_DC); PHPAPI size_t php_strip_tags(char *rbuf, int len, int *state, char *allow, int allow_len); PHPAPI int php_char_to_str_ex(char *str, uint len, char from, char *to, int to_len, zval *result, int case_sensitivity, int *replace_count); PHPAPI int php_char_to_str(char *str, uint len, char from, char *to, int to_len, zval *result); http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/sha1.c?r1=1.16&r2=1.17&diff_format=u Index: php-src/ext/standard/sha1.c diff -u php-src/ext/standard/sha1.c:1.16 php-src/ext/standard/sha1.c:1.17 --- php-src/ext/standard/sha1.c:1.16 Sun Feb 19 04:29:41 2006 +++ php-src/ext/standard/sha1.c Thu Mar 2 13:12:45 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sha1.c,v 1.16 2006/02/19 04:29:41 andi Exp $ */ +/* $Id: sha1.c,v 1.17 2006/03/02 13:12:45 dmitry Exp $ */ #include "php.h" @@ -53,10 +53,10 @@ sha1str[0] = '\0'; PHP_SHA1Init(&context); - PHP_SHA1Update(&context, arg, arg_len); + PHP_SHA1Update(&context, (unsigned char*)arg, arg_len); PHP_SHA1Final(digest, &context); if (raw_output) { - RETURN_STRINGL(digest, 20, 1); + RETURN_STRINGL((char*)digest, 20, 1); } else { make_sha1_digest(sha1str, digest); RETVAL_ASCII_STRING(sha1str, 1); @@ -92,7 +92,7 @@ PHP_SHA1Init(&context); - while ((n = php_stream_read(stream, buf, sizeof(buf))) > 0) { + while ((n = php_stream_read(stream, (char*)buf, sizeof(buf))) > 0) { PHP_SHA1Update(&context, buf, n); } @@ -105,7 +105,7 @@ } if (raw_output) { - RETURN_STRINGL(digest, 20, 1); + RETURN_STRINGL((char*)digest, 20, 1); } else { make_sha1_digest(sha1str, digest); RETVAL_ASCII_STRING(sha1str, 1); http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/streamsfuncs.c?r1=1.65&r2=1.66&diff_format=u Index: php-src/ext/standard/streamsfuncs.c diff -u php-src/ext/standard/streamsfuncs.c:1.65 php-src/ext/standard/streamsfuncs.c:1.66 --- php-src/ext/standard/streamsfuncs.c:1.65 Sun Feb 26 11:57:14 2006 +++ php-src/ext/standard/streamsfuncs.c Thu Mar 2 13:12:45 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: streamsfuncs.c,v 1.65 2006/02/26 11:57:14 dmitry Exp $ */ +/* $Id: streamsfuncs.c,v 1.66 2006/03/02 13:12:45 dmitry Exp $ */ #include "php.h" #include "php_globals.h" @@ -524,7 +524,7 @@ { HashTable *stream_xport_hash; zstr stream_xport; - int stream_xport_len; + uint stream_xport_len; ulong num_key; if (ZEND_NUM_ARGS() != 0) { @@ -552,7 +552,7 @@ { HashTable *url_stream_wrappers_hash; zstr stream_protocol; - int key_flags, stream_protocol_len = 0; + uint key_flags, stream_protocol_len = 0; ulong num_key; if (ZEND_NUM_ARGS() != 0) { @@ -859,7 +859,7 @@ HashPosition pos, opos; zval **wval, **oval; zstr wkey, okey; - int wkey_len, okey_len; + uint wkey_len, okey_len; int ret = SUCCESS; ulong num_key; @@ -871,8 +871,12 @@ if (HASH_KEY_IS_UNICODE == wtype) { /* fold to string */ UErrorCode errCode = 0; + char *tmp; + int tmp_len; - zend_convert_from_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &wkey.s, &wkey_len, wkey.u, wkey_len, &errCode); + zend_convert_from_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &tmp, &tmp_len, wkey.u, wkey_len, &errCode); + wkey.s = tmp; + wkey_len = tmp_len; } zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(wval), &opos); @@ -881,8 +885,12 @@ if (HASH_KEY_IS_UNICODE == otype) { /* fold to string */ UErrorCode errCode = 0; + char *tmp; + int tmp_len; - zend_convert_from_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &okey.s, &okey_len, okey.u, okey_len, &errCode); + zend_convert_from_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &tmp, &tmp_len, okey.u, okey_len, &errCode); + okey.s = tmp; + okey_len = tmp_len; php_stream_context_set_option(context, wkey.s, okey.s, *oval); efree(okey.v); } http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/string.c?r1=1.519&r2=1.520&diff_format=u Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.519 php-src/ext/standard/string.c:1.520 --- php-src/ext/standard/string.c:1.519 Wed Mar 1 11:19:35 2006 +++ php-src/ext/standard/string.c Thu Mar 2 13:12:45 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c,v 1.519 2006/03/01 11:19:35 rrichards Exp $ */ +/* $Id: string.c,v 1.520 2006/03/02 13:12:45 dmitry Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -120,7 +120,7 @@ register unsigned char *result = NULL; size_t i, j; - result = (char *) safe_emalloc(oldlen * 2, sizeof(char), 1); + result = (unsigned char *) safe_emalloc(oldlen * 2, sizeof(char), 1); for (i = j = 0; i < oldlen; i++) { result[j++] = hexconvtab[old[i] >> 4]; @@ -131,7 +131,7 @@ if (newlen) *newlen = oldlen * 2 * sizeof(char); - return result; + return (char*)result; } /* }}} */ @@ -572,9 +572,9 @@ char mask[256]; if (what) { - php_charmask(what, what_len, mask TSRMLS_CC); + php_charmask((unsigned char*)what, what_len, mask TSRMLS_CC); } 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); } if (mode & 1) { @@ -611,7 +611,7 @@ * Expands possible ranges of the form 'a..b' in input charlist, * where a < b in code-point order */ -static int php_expand_u_trim_range(UChar **range, int32_t *range_len TSRMLS_DC) +static int php_expand_u_trim_range(UChar **range, int *range_len TSRMLS_DC) { UChar32 *codepts, *tmp, *input, *end, c; int32_t len, tmp_len, idx; @@ -693,7 +693,7 @@ /* {{{ php_u_trim() * Unicode capable version of php_trim() */ -static UChar *php_u_trim(UChar *c, int32_t len, UChar *what, int32_t what_len, zval *return_value, int mode TSRMLS_DC) +static UChar *php_u_trim(UChar *c, int len, UChar *what, int what_len, zval *return_value, int mode TSRMLS_DC) { int32_t i,j; UChar ch,wh; @@ -1470,7 +1470,7 @@ { unsigned char *c, *e; - c = s; + c = (unsigned char*)s; e = c+len; while (c < e) { @@ -1483,10 +1483,10 @@ /* {{{ php_u_strtoupper */ -PHPAPI UChar* php_u_strtoupper(UChar **s, int32_t *len, const char* locale) +PHPAPI UChar* php_u_strtoupper(UChar **s, int *len, const char* locale) { UChar *dest = NULL; - int32_t dest_len; + int dest_len; UErrorCode status; dest_len = *len; @@ -1536,10 +1536,10 @@ /* {{{ php_u_strtolower */ -PHPAPI UChar *php_u_strtolower(UChar **s, int32_t *len, const char* locale) +PHPAPI UChar *php_u_strtolower(UChar **s, int *len, const char* locale) { UChar *dest = NULL; - int32_t dest_len; + int dest_len; UErrorCode status = U_ZERO_ERROR; dest_len = *len; @@ -1570,7 +1570,7 @@ { unsigned char *c, *e; - c = s; + c = (unsigned char*)s; e = c+len; while (c < e) { @@ -1879,7 +1879,7 @@ /* {{{ php_u_stristr Unicode version of case insensitve strstr */ -PHPAPI UChar *php_u_stristr(UChar *s, UChar *t, int32_t s_len, int32_t t_len) +PHPAPI UChar *php_u_stristr(UChar *s, UChar *t, int s_len, int t_len) { int32_t i,j, last; UChar32 ch1, ch2; @@ -1928,7 +1928,7 @@ /* {{{ php_stristr case insensitve strstr */ -PHPAPI char *php_stristr(unsigned char *s, unsigned char *t, size_t s_len, size_t t_len) +PHPAPI char *php_stristr(char *s, char *t, size_t s_len, size_t t_len) { php_strtolower(s, s_len); php_strtolower(t, t_len); @@ -1938,11 +1938,12 @@ /* {{{ php_u_strspn */ -PHPAPI int32_t php_u_strspn(UChar *s1, UChar *s2, UChar *s1_end, UChar *s2_end) +PHPAPI int php_u_strspn(UChar *s1, UChar *s2, UChar *s1_end, UChar *s2_end) { int32_t len1 = s1_end - s1; int32_t len2 = s2_end - s2; - int32_t i, codepts; + int32_t i; + int codepts; UChar32 ch; for (i = 0, codepts = 0 ; i < len1 ; codepts++) { @@ -1975,11 +1976,12 @@ /* {{{ php_u_strcspn */ -PHPAPI int32_t php_u_strcspn(UChar *s1, UChar *s2, UChar *s1_end, UChar *s2_end) +PHPAPI int php_u_strcspn(UChar *s1, UChar *s2, UChar *s1_end, UChar *s2_end) { int32_t len1 = s1_end - s1; int32_t len2 = s2_end - s2; - int32_t i, codepts; + int32_t i; + int codepts; UChar32 ch; for (i = 0, codepts = 0 ; i < len1 ; codepts++) { @@ -2021,7 +2023,7 @@ zend_uchar str_type; char needle_char[2]; UChar u_needle_char[3]; - int32_t needle_len; + int needle_len; char *haystack_copy; zstr target; void *found = NULL; @@ -2120,7 +2122,7 @@ void *found = NULL; char needle_char[2]; UChar u_needle_char[3]; - int32_t n_len = 0; + int n_len = 0; size_t found_offset; zend_bool part = 0; @@ -2230,7 +2232,7 @@ void *found = NULL; char needle_char[2]; UChar u_needle_char[3]; - int32_t n_len = 0; + int n_len = 0; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "tZ|l", &haystack, &haystack_len, &haystack_type, &needle, &offset) == FAILURE) { @@ -2318,7 +2320,7 @@ { zval *haystack, *needle; long offset = 0; - int32_t haystack_len, needle_len = 0; + int haystack_len, needle_len = 0; zend_uchar str_type; void *haystack_dup, *needle_dup = NULL; char needle_char[2]; @@ -2442,7 +2444,7 @@ { zval *zhaystack, *zneedle; zstr haystack, needle; - int32_t haystack_len, needle_len = 0; + int haystack_len, needle_len = 0; zend_uchar str_type; long offset = 0; char *p, *e, ord_needle[2]; @@ -2647,7 +2649,7 @@ /* {{{ php_u_strrchr */ -UChar *php_u_strrchr(UChar *s, UChar32 ch, int32_t s_len) +UChar *php_u_strrchr(UChar *s, UChar32 ch, int s_len) { UChar32 ch1; int32_t i = s_len; @@ -2670,7 +2672,7 @@ zend_uchar str_type; UChar32 ch; void *found = NULL; - int32_t found_offset; + int found_offset; if (ZEND_NUM_ARGS() != 2 || zend_parse_parameters(2 TSRMLS_CC, "zz", &haystack, &needle) == FAILURE) { WRONG_PARAM_COUNT; @@ -2823,7 +2825,7 @@ { void *str; int str_len; - int32_t cp_len; + int cp_len; zend_uchar str_type; long l = -1; long f; @@ -2885,9 +2887,9 @@ /* {{{ php_adjust_limits */ -PHPAPI void php_adjust_limits(zval **str, int32_t *f, int32_t *l) +PHPAPI void php_adjust_limits(zval **str, int *f, int *l) { - int32_t str_codepts; + int str_codepts; if (Z_TYPE_PP(str) == IS_UNICODE) { str_codepts = u_countChar32(Z_USTRVAL_PP(str), Z_USTRLEN_PP(str)); @@ -2921,7 +2923,7 @@ /* {{{ php_do_substr_replace */ -PHPAPI int32_t php_do_substr_replace(void **result, zval **str, zval **repl, int32_t f, int32_t l TSRMLS_DC) +PHPAPI int php_do_substr_replace(void **result, zval **str, zval **repl, int f, int l TSRMLS_DC) { void *buf; int32_t buf_len, idx; @@ -2981,9 +2983,9 @@ zval **len = NULL; zval **repl; void *result; - int32_t result_len; - int32_t l = 0; - int32_t f; + int result_len; + int l = 0; + int f; int argc = ZEND_NUM_ARGS(); HashPosition pos_str, pos_from, pos_repl, pos_len; @@ -3234,7 +3236,7 @@ if (UG(unicode)) { UChar buf[2]; - int32_t buf_len; + int buf_len; if (Z_LVAL_PP(num) > UCHAR_MAX_VALUE) { php_error(E_WARNING, "Codepoint value cannot be greater than %X", UCHAR_MAX_VALUE); @@ -3637,10 +3639,10 @@ /* {{{ php_u_similar_str */ -static void php_u_similar_str(const UChar *txt1, int32_t len1, - const UChar *txt2, int32_t len2, - int32_t *pos1, int32_t *end1, - int32_t *pos2, int32_t *end2, int *max) +static void php_u_similar_str(const UChar *txt1, int len1, + const UChar *txt2, int len2, + int *pos1, int *end1, + int *pos2, int *end2, int *max) { int32_t i1, i2, j1, j2, l; UChar32 ch1, ch2; @@ -3719,10 +3721,10 @@ /* {{{ php_u_similar_char */ -static int php_u_similar_char(const UChar *txt1, int32_t len1, const UChar *txt2, int32_t len2) +static int php_u_similar_char(const UChar *txt1, int len1, const UChar *txt2, int len2) { int sum, max; - int32_t pos1, pos2, end1, end2; + int pos1, pos2, end1, end2; php_u_similar_str(txt1, len1, txt2, len2, &pos1, &end1, &pos2, &end2, &max); if ((sum = max)) { @@ -3795,26 +3797,26 @@ /* {{{ php_u_stripslashes * * be careful, this edits the string in-place */ -PHPAPI void php_u_stripslashes(UChar *str, int32_t *len TSRMLS_DC) +PHPAPI void php_u_stripslashes(UChar *str, int *len TSRMLS_DC) { - int32_t tmp_len = 0, i = 0; + int32_t tmp_len = 0, i = 0, src_len = *len; UChar32 ch1, ch2; ch1 = -1; ch2 = -1; if (PG(magic_quotes_sybase)) { - while (i < *len) { - U16_NEXT(str, i, *len, ch1); + while (i < src_len) { + U16_NEXT(str, i, src_len, ch1); if (ch1 == '\'') { tmp_len += zend_codepoint_to_uchar(ch1, str+tmp_len); - if (i < *len) { - U16_NEXT(str, i, *len, ch2); + if (i < src_len) { + U16_NEXT(str, i, src_len, ch2); if (ch2 != '\'') { tmp_len += zend_codepoint_to_uchar(ch2, str+tmp_len); } } } else if (ch1 == '\\') { - if (i < *len) { - U16_NEXT(str, i, *len, ch2); + if (i < src_len) { + U16_NEXT(str, i, src_len, ch2); if (ch2 == '0') { tmp_len += zend_codepoint_to_uchar('\0', str+tmp_len); } else { @@ -3829,11 +3831,11 @@ } } } else { - while (i < *len) { - U16_NEXT(str, i, *len, ch1); + while (i < src_len) { + U16_NEXT(str, i, src_len, ch1); if (ch1 == '\\') { - if (i < *len) { - U16_NEXT(str, i, *len, ch2); + if (i < src_len) { + U16_NEXT(str, i, src_len, ch2); if (ch2 == '0') { tmp_len += zend_codepoint_to_uchar('\0', str+tmp_len); } else { @@ -3957,7 +3959,7 @@ { zval **str; void *tmp = NULL; - int32_t tmp_len = 0; + int tmp_len = 0; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) { WRONG_PARAM_COUNT; @@ -4120,7 +4122,7 @@ length = strlen(str); } - php_charmask(what, wlength, flags TSRMLS_CC); + php_charmask((unsigned char*)what, wlength, flags TSRMLS_CC); for (source = str, end = source + length, target = new_str; (c = *source) || (source < end); source++) { if (flags[(unsigned char)c]) { @@ -4159,7 +4161,7 @@ /* {{{ php_u_addslashes */ -PHPAPI UChar *php_u_addslashes(UChar *str, int32_t length, int32_t *new_length, int should_free TSRMLS_DC) +PHPAPI UChar *php_u_addslashes(UChar *str, int length, int *new_length, int should_free TSRMLS_DC) { return php_u_addslashes_ex(str, length, new_length, should_free, 0 TSRMLS_CC); } @@ -4167,7 +4169,7 @@ /* {{{ php_u_addslashes_ex */ -PHPAPI UChar *php_u_addslashes_ex(UChar *str, int32_t length, int32_t *new_length, int should_free, int ignore_sybase TSRMLS_DC) +PHPAPI UChar *php_u_addslashes_ex(UChar *str, int length, int *new_length, int should_free, int ignore_sybase TSRMLS_DC) { UChar *buf; int32_t buf_len = 0, i = 0; @@ -5021,7 +5023,7 @@ int str_len, allow_len = 0; zend_uchar str_type, allow_type; void *buf; - int32_t retval_len; + int retval_len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "T|T", &str, &str_len, &str_type, &allow, &allow_len, &allow_type) == FAILURE) { @@ -5189,7 +5191,7 @@ /* {{{ php_u_tag_find */ -int php_u_tag_find(UChar *tag, int32_t len, UChar *set, int32_t set_len) +int php_u_tag_find(UChar *tag, int len, UChar *set, int set_len) { int32_t idx = 0; UChar32 ch; @@ -5319,7 +5321,7 @@ */ /* {{{ php_u_strip_tags */ -PHPAPI int32_t php_u_strip_tags(UChar *rbuf, int32_t len, int *stateptr, UChar *allow, int32_t allow_len TSRMLS_DC) +PHPAPI int php_u_strip_tags(UChar *rbuf, int len, int *stateptr, UChar *allow, int allow_len TSRMLS_DC) { UChar *tbuf = NULL, *tp = NULL; UChar *buf, *rp; @@ -5539,7 +5541,7 @@ if (stateptr) *stateptr = state; - return (int32_t)(rp-rbuf); + return (int)(rp-rbuf); } /* }}} */ @@ -5768,13 +5770,13 @@ PHP_FUNCTION(str_repeat) { void *input_str; /* Input string */ - int input_str_len; - int32_t input_str_chars; + int input_str_len; + int input_str_chars; zend_uchar input_str_type; long mult; /* Multiplier */ void *result; /* Resulting string */ - int32_t result_len; /* Length of the resulting string, in bytes */ - int32_t result_chars; /* Chars/UChars in resulting string */ + int result_len; /* Length of the resulting string, in bytes */ + int result_chars; /* Chars/UChars in resulting string */ if ( zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "tl", &input_str, &input_str_chars, &input_str_type, &mult) == FAILURE ) { @@ -6155,8 +6157,8 @@ zend_uchar input_type, padstr_type; /* Helper variables */ - int32_t input_codepts; /* Number of codepts in Unicode input */ - int32_t num_pad_chars; /* Number of padding characters (total - input size) */ + int input_codepts; /* Number of codepts in Unicode input */ + int num_pad_chars; /* Number of padding characters (total - input size) */ void *result = NULL; /* Resulting string */ int32_t result_len = 0; /* Length of the resulting string */ int32_t i, j, left_pad=0, right_pad=0; @@ -6399,7 +6401,7 @@ } if (char_list) { - php_charmask(char_list, char_list_len, ch TSRMLS_CC); + php_charmask((unsigned char*)char_list, char_list_len, ch TSRMLS_CC); } p = str; http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/url.c?r1=1.91&r2=1.92&diff_format=u Index: php-src/ext/standard/url.c diff -u php-src/ext/standard/url.c:1.91 php-src/ext/standard/url.c:1.92 --- php-src/ext/standard/url.c:1.91 Sun Feb 12 16:40:34 2006 +++ php-src/ext/standard/url.c Thu Mar 2 13:12:45 2006 @@ -15,7 +15,7 @@ | Author: Jim Winstead <jimw@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: url.c,v 1.91 2006/02/12 16:40:34 iliaa Exp $ */ +/* $Id: url.c,v 1.92 2006/03/02 13:12:45 dmitry Exp $ */ #include <stdlib.h> #include <string.h> @@ -450,8 +450,8 @@ unsigned char *to, *start; unsigned char const *from, *end; - from = s; - end = s + len; + from = (unsigned char*)s; + end = from + len; start = to = (unsigned char *) safe_emalloc(3, len, 1); while (from < end) { http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/user_filters.c?r1=1.35&r2=1.36&diff_format=u Index: php-src/ext/standard/user_filters.c diff -u php-src/ext/standard/user_filters.c:1.35 php-src/ext/standard/user_filters.c:1.36 --- php-src/ext/standard/user_filters.c:1.35 Tue Feb 21 20:12:42 2006 +++ php-src/ext/standard/user_filters.c Thu Mar 2 13:12:45 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: user_filters.c,v 1.35 2006/02/21 20:12:42 dmitry Exp $ */ +/* $Id: user_filters.c,v 1.36 2006/03/02 13:12:45 dmitry Exp $ */ #include "php.h" #include "php_globals.h" @@ -474,7 +474,6 @@ zval *zstream, *zbucket; php_stream *stream; zval *buffer; - char *pbuffer; php_stream_bucket *bucket; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zz", &zstream, &buffer) == FAILURE) { @@ -510,7 +509,7 @@ PHP_FUNCTION(stream_get_filters) { zstr filter_name; - int key_flags, filter_name_len = 0; + uint key_flags, filter_name_len = 0; HashTable *filters_hash; ulong num_key; http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/var.c?r1=1.222&r2=1.223&diff_format=u Index: php-src/ext/standard/var.c diff -u php-src/ext/standard/var.c:1.222 php-src/ext/standard/var.c:1.223 --- php-src/ext/standard/var.c:1.222 Sun Feb 26 11:57:14 2006 +++ php-src/ext/standard/var.c Thu Mar 2 13:12:45 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: var.c,v 1.222 2006/02/26 11:57:14 dmitry Exp $ */ +/* $Id: var.c,v 1.223 2006/03/02 13:12:45 dmitry Exp $ */ @@ -42,7 +42,7 @@ /* {{{ php_var_dump */ /* temporary, for debugging */ -static void php_var_dump_unicode(UChar *ustr, int32_t length, int verbose, char *quote, int escape TSRMLS_DC) +static void php_var_dump_unicode(UChar *ustr, int length, int verbose, char *quote, int escape TSRMLS_DC) { UChar32 c; int32_t i; http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/var_unserializer.c?r1=1.77&r2=1.78&diff_format=u Index: php-src/ext/standard/var_unserializer.c diff -u php-src/ext/standard/var_unserializer.c:1.77 php-src/ext/standard/var_unserializer.c:1.78 --- php-src/ext/standard/var_unserializer.c:1.77 Sun Feb 19 18:19:33 2006 +++ php-src/ext/standard/var_unserializer.c Thu Mar 2 13:12:45 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: var_unserializer.c,v 1.77 2006/02/19 18:19:33 iliaa Exp $ */ +/* $Id: var_unserializer.c,v 1.78 2006/03/02 13:12:45 dmitry Exp $ */ #include "php.h" #include "ext/standard/php_var.h" @@ -907,11 +907,11 @@ *p = YYCURSOR; INIT_PZVAL(*rval); - if (!strncmp(start + 2, "NAN", 3)) { + if (!strncmp((char*)start + 2, "NAN", 3)) { ZVAL_DOUBLE(*rval, php_get_nan()); - } else if (!strncmp(start + 2, "INF", 3)) { + } else if (!strncmp((char*)start + 2, "INF", 3)) { ZVAL_DOUBLE(*rval, php_get_inf()); - } else if (!strncmp(start + 2, "-INF", 4)) { + } else if (!strncmp((char*)start + 2, "-INF", 4)) { ZVAL_DOUBLE(*rval, -php_get_inf()); } http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/var_unserializer.re?r1=1.56&r2=1.57&diff_format=u Index: php-src/ext/standard/var_unserializer.re diff -u php-src/ext/standard/var_unserializer.re:1.56 php-src/ext/standard/var_unserializer.re:1.57 --- php-src/ext/standard/var_unserializer.re:1.56 Tue Jan 17 12:18:53 2006 +++ php-src/ext/standard/var_unserializer.re Thu Mar 2 13:12:45 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: var_unserializer.re,v 1.56 2006/01/17 12:18:53 dmitry Exp $ */ +/* $Id: var_unserializer.re,v 1.57 2006/03/02 13:12:45 dmitry Exp $ */ #include "php.h" #include "ext/standard/php_var.h" @@ -430,11 +430,11 @@ *p = YYCURSOR; INIT_PZVAL(*rval); - if (!strncmp(start + 2, "NAN", 3)) { + if (!strncmp((char*)start + 2, "NAN", 3)) { ZVAL_DOUBLE(*rval, php_get_nan()); - } else if (!strncmp(start + 2, "INF", 3)) { + } else if (!strncmp((char*)start + 2, "INF", 3)) { ZVAL_DOUBLE(*rval, php_get_inf()); - } else if (!strncmp(start + 2, "-INF", 4)) { + } else if (!strncmp((char*)start + 2, "-INF", 4)) { ZVAL_DOUBLE(*rval, -php_get_inf()); } http://cvs.php.net/viewcvs.cgi/php-src/ext/unicode/unicode.c?r1=1.10&r2=1.11&diff_format=u Index: php-src/ext/unicode/unicode.c diff -u php-src/ext/unicode/unicode.c:1.10 php-src/ext/unicode/unicode.c:1.11 --- php-src/ext/unicode/unicode.c:1.10 Mon Feb 13 19:55:17 2006 +++ php-src/ext/unicode/unicode.c Thu Mar 2 13:12:45 2006 @@ -15,7 +15,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: unicode.c,v 1.10 2006/02/13 19:55:17 helly Exp $ */ +/* $Id: unicode.c,v 1.11 2006/03/02 13:12:45 dmitry Exp $ */ #include "php_unicode.h" #if HAVE_UNICODE @@ -38,7 +38,7 @@ UErrorCode status; UConverter *conv = NULL; UChar *target; - int32_t targetlen; + int targetlen; if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ts", &input.vptr, &len, &type, &encoding, &enclen)) { return; @@ -87,7 +87,7 @@ UErrorCode status; UConverter *conv = NULL; char *target; - int32_t targetlen; + int targetlen; if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "us", &uni, &len, &encoding, &enclen)) { return; http://cvs.php.net/viewcvs.cgi/php-src/main/fopen_wrappers.c?r1=1.179&r2=1.180&diff_format=u Index: php-src/main/fopen_wrappers.c diff -u php-src/main/fopen_wrappers.c:1.179 php-src/main/fopen_wrappers.c:1.180 --- php-src/main/fopen_wrappers.c:1.179 Sun Feb 19 01:19:37 2006 +++ php-src/main/fopen_wrappers.c Thu Mar 2 13:12:45 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: fopen_wrappers.c,v 1.179 2006/02/19 01:19:37 andi Exp $ */ +/* $Id: fopen_wrappers.c,v 1.180 2006/03/02 13:12:45 dmitry Exp $ */ /* {{{ includes */ @@ -312,7 +312,6 @@ char *pathbuf, *ptr, *end; char *exec_fname; char trypath[MAXPATHLEN]; - struct stat sb; FILE *fp; int path_length; int filename_length; http://cvs.php.net/viewcvs.cgi/php-src/main/main.c?r1=1.666&r2=1.667&diff_format=u Index: php-src/main/main.c diff -u php-src/main/main.c:1.666 php-src/main/main.c:1.667 --- php-src/main/main.c:1.666 Sun Feb 26 11:57:14 2006 +++ php-src/main/main.c Thu Mar 2 13:12:45 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: main.c,v 1.666 2006/02/26 11:57:14 dmitry Exp $ */ +/* $Id: main.c,v 1.667 2006/03/02 13:12:45 dmitry Exp $ */ /* {{{ includes */ @@ -1926,7 +1926,7 @@ char *pass; char *user; - user = php_base64_decode(auth + 6, strlen(auth) - 6, NULL); + user = (char*)php_base64_decode((unsigned char*)auth + 6, strlen(auth) - 6, NULL); if (user) { pass = strchr(user, ':'); if (pass) { http://cvs.php.net/viewcvs.cgi/php-src/main/output.c?r1=1.175&r2=1.176&diff_format=u Index: php-src/main/output.c diff -u php-src/main/output.c:1.175 php-src/main/output.c:1.176 --- php-src/main/output.c:1.175 Sun Feb 26 11:57:14 2006 +++ php-src/main/output.c Thu Mar 2 13:12:45 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: output.c,v 1.175 2006/02/26 11:57:14 dmitry Exp $ */ +/* $Id: output.c,v 1.176 2006/03/02 13:12:45 dmitry Exp $ */ #include "php.h" #include "ext/standard/head.h" @@ -211,7 +211,7 @@ { FILE *fp; fp = fopen("/tmp/ob_log", "a"); - fprintf(fp, "NestLevel: %d ObStatus: %d HandlerName: %s\n", OG(ob_nesting_level), status, OG(active_ob_buffer).handler_name); + fprintf(fp, "NestLevel: %d ObStatus: %d HandlerName: %s\n", OG(ob_nesting_level), status, OG(active_ob_buffer).handler_name.s); fclose(fp); } #endif @@ -270,7 +270,8 @@ } to_be_destroyed_buffer = OG(active_ob_buffer).buffer; - to_be_destroyed_handler_name = OG(active_ob_buffer).handler_name; + /* FIXME: unicode support??? */ + to_be_destroyed_handler_name = OG(active_ob_buffer).handler_name.s; if (OG(active_ob_buffer).internal_output_handler && (final_buffer != OG(active_ob_buffer).internal_output_handler_buffer) && (final_buffer != OG(active_ob_buffer).buffer)) { @@ -361,17 +362,18 @@ */ PHPAPI void php_ob_set_internal_handler(php_output_handler_func_t internal_output_handler, uint buffer_size, char *handler_name, zend_bool erase TSRMLS_DC) { - if (OG(ob_nesting_level)==0 || OG(active_ob_buffer).internal_output_handler || strcmp(OG(active_ob_buffer).handler_name, OB_DEFAULT_HANDLER_NAME)) { + /* FIXME: Unicode support??? */ + if (OG(ob_nesting_level)==0 || OG(active_ob_buffer).internal_output_handler || strcmp(OG(active_ob_buffer).handler_name.s, OB_DEFAULT_HANDLER_NAME)) { php_start_ob_buffer(NULL, buffer_size, erase TSRMLS_CC); } OG(active_ob_buffer).internal_output_handler = internal_output_handler; OG(active_ob_buffer).internal_output_handler_buffer = (char *) emalloc(buffer_size); OG(active_ob_buffer).internal_output_handler_buffer_size = buffer_size; - if (OG(active_ob_buffer).handler_name) { - efree(OG(active_ob_buffer).handler_name); + if (OG(active_ob_buffer).handler_name.s) { + efree(OG(active_ob_buffer).handler_name.s); } - OG(active_ob_buffer).handler_name = estrdup(handler_name); + OG(active_ob_buffer).handler_name.s = estrdup(handler_name); OG(active_ob_buffer).erase = erase; } /* }}} */ @@ -450,9 +452,9 @@ OG(active_ob_buffer).internal_output_handler = NULL; if (type == IS_UNICODE) { /* FIXME: Unicode support??? */ - OG(active_ob_buffer).handler_name = eustrdup((handler_name.u && handler_name.u[0])?handler_name.u:(UChar*)OB_DEFAULT_HANDLER_NAME); + OG(active_ob_buffer).handler_name.u = eustrdup((handler_name.u && handler_name.u[0])?handler_name.u:(UChar*)OB_DEFAULT_HANDLER_NAME); } else { - OG(active_ob_buffer).handler_name = estrdup((handler_name.s && handler_name.s[0])?handler_name.s:OB_DEFAULT_HANDLER_NAME); + OG(active_ob_buffer).handler_name.s = estrdup((handler_name.s && handler_name.s[0])?handler_name.s:OB_DEFAULT_HANDLER_NAME); } OG(active_ob_buffer).erase = erase; OG(php_body_write) = php_b_body_write; @@ -595,7 +597,9 @@ */ static int php_ob_list_each(php_ob_buffer *ob_buffer, zval *ob_handler_array) { - add_next_index_string(ob_handler_array, ob_buffer->handler_name, 1); + TSRMLS_FETCH(); + + add_next_index_text(ob_handler_array, ob_buffer->handler_name, 1); return 0; } /* }}} */ @@ -625,7 +629,8 @@ */ static int php_ob_handler_used_each(php_ob_buffer *ob_buffer, char **handler_name) { - if (!strcmp(ob_buffer->handler_name, *handler_name)) { + /* FIXME: Unicode support??? */ + if (!strcmp(ob_buffer->handler_name.s, *handler_name)) { *handler_name = NULL; return 1; } @@ -638,10 +643,11 @@ */ PHPAPI int php_ob_handler_used(char *handler_name TSRMLS_DC) { + /* FIXME: Unicode support??? */ char *tmp = handler_name; if (OG(ob_nesting_level)) { - if (!strcmp(OG(active_ob_buffer).handler_name, handler_name)) { + if (!strcmp(OG(active_ob_buffer).handler_name.s, handler_name)) { return 1; } if (OG(ob_nesting_level)>1) { @@ -995,6 +1001,7 @@ static int php_ob_buffer_status(php_ob_buffer *ob_buffer, zval *result) { zval *elem; + TSRMLS_FETCH(); MAKE_STD_ZVAL(elem); array_init(elem); @@ -1012,7 +1019,7 @@ add_assoc_long(elem, "type", PHP_OUTPUT_HANDLER_USER); } add_assoc_long(elem, "status", ob_buffer->status); - add_assoc_string(elem, "name", ob_buffer->handler_name, 1); + add_assoc_text(elem, "name", ob_buffer->handler_name, 1); add_assoc_bool(elem, "del", ob_buffer->erase); add_next_index_zval(result, elem); @@ -1048,7 +1055,7 @@ add_assoc_long(return_value, "type", PHP_OUTPUT_HANDLER_USER); } add_assoc_long(return_value, "status", OG(active_ob_buffer).status); - add_assoc_string(return_value, "name", OG(active_ob_buffer).handler_name, 1); + add_assoc_text(return_value, "name", OG(active_ob_buffer).handler_name, 1); add_assoc_bool(return_value, "del", OG(active_ob_buffer).erase); } } http://cvs.php.net/viewcvs.cgi/php-src/main/php_logos.c?r1=1.20&r2=1.21&diff_format=u Index: php-src/main/php_logos.c diff -u php-src/main/php_logos.c:1.20 php-src/main/php_logos.c:1.21 --- php-src/main/php_logos.c:1.20 Sun Jan 1 13:09:57 2006 +++ php-src/main/php_logos.c Thu Mar 2 13:12:45 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_logos.c,v 1.20 2006/01/01 13:09:57 sniper Exp $ */ +/* $Id: php_logos.c,v 1.21 2006/03/02 13:12:45 dmitry Exp $ */ #include "php.h" #include "logos.h" @@ -86,7 +86,7 @@ sapi_add_header(content_header, len, 1); free(content_header); - PHPWRITE(logo_image->data, logo_image->size); + PHPWRITE((char*)logo_image->data, logo_image->size); return 1; } http://cvs.php.net/viewcvs.cgi/php-src/main/php_output.h?r1=1.54&r2=1.55&diff_format=u Index: php-src/main/php_output.h diff -u php-src/main/php_output.h:1.54 php-src/main/php_output.h:1.55 --- php-src/main/php_output.h:1.54 Sun Jan 1 13:09:57 2006 +++ php-src/main/php_output.h Thu Mar 2 13:12:45 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_output.h,v 1.54 2006/01/01 13:09:57 sniper Exp $ */ +/* $Id: php_output.h,v 1.55 2006/03/02 13:12:45 dmitry Exp $ */ #ifndef PHP_OUTPUT_H #define PHP_OUTPUT_H @@ -75,7 +75,7 @@ php_output_handler_func_t internal_output_handler; char *internal_output_handler_buffer; uint internal_output_handler_buffer_size; - char *handler_name; + zstr handler_name; zend_bool erase; } php_ob_buffer; http://cvs.php.net/viewcvs.cgi/php-src/main/php_variables.c?r1=1.116&r2=1.117&diff_format=u Index: php-src/main/php_variables.c diff -u php-src/main/php_variables.c:1.116 php-src/main/php_variables.c:1.117 --- php-src/main/php_variables.c:1.116 Sun Feb 26 11:57:14 2006 +++ php-src/main/php_variables.c Thu Mar 2 13:12:45 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_variables.c,v 1.116 2006/02/26 11:57:14 dmitry Exp $ */ +/* $Id: php_variables.c,v 1.117 2006/03/02 13:12:45 dmitry Exp $ */ #include <stdio.h> #include "php.h" @@ -57,7 +57,7 @@ php_register_variable_ex(var, &new_entry, track_vars_array TSRMLS_CC); } -PHPAPI void php_u_register_variable_safe(UChar *var, UChar *strval, int32_t str_len, zval *track_vars_array TSRMLS_DC) +PHPAPI void php_u_register_variable_safe(UChar *var, UChar *strval, int str_len, zval *track_vars_array TSRMLS_DC) { zval new_entry; assert(strval != NULL); @@ -244,7 +244,7 @@ UChar *p = NULL; UChar *ip; /* index pointer */ UChar *index; - int32_t var_len, index_len; + int var_len, index_len; zval *gpc_element, **gpc_element_p; zend_bool is_array; HashTable *symtable1=NULL; @@ -298,7 +298,7 @@ if (is_array) { zstr escaped_index = NULL_ZSTR; UChar *index_s; - int32_t new_idx_len = 0; + int new_idx_len = 0; ip++; index_s = ip; @@ -402,9 +402,9 @@ if (val) { /* have a value */ if (UG(unicode)) { UChar *u_var, *u_val; - int32_t u_var_len, u_val_len; - int32_t var_len; - int32_t val_len; + int u_var_len, u_val_len; + int var_len; + int val_len; UErrorCode status1 = U_ZERO_ERROR, status2 = U_ZERO_ERROR; *val++ = '\0'; @@ -534,7 +534,7 @@ var = php_strtok_r(res, separator, &strtok_buf); while (var) { - int32_t var_len; + int var_len; val = strchr(var, '='); if (val) { @@ -545,7 +545,7 @@ if (UG(unicode)) { UChar *u_var, *u_val; - int32_t u_var_len, u_val_len; + int u_var_len, u_val_len; UErrorCode status = U_ZERO_ERROR; zend_convert_to_unicode(input_conv, &u_var, &u_var_len, var, var_len, &status); http://cvs.php.net/viewcvs.cgi/php-src/main/php_variables.h?r1=1.25&r2=1.26&diff_format=u Index: php-src/main/php_variables.h diff -u php-src/main/php_variables.h:1.25 php-src/main/php_variables.h:1.26 --- php-src/main/php_variables.h:1.25 Sun Jan 1 13:09:57 2006 +++ php-src/main/php_variables.h Thu Mar 2 13:12:45 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_variables.h,v 1.25 2006/01/01 13:09:57 sniper Exp $ */ +/* $Id: php_variables.h,v 1.26 2006/03/02 13:12:45 dmitry Exp $ */ #ifndef PHP_VARIABLES_H #define PHP_VARIABLES_H @@ -38,7 +38,7 @@ /* binary-safe version */ PHPAPI void php_register_variable_safe(char *var, char *val, int val_len, zval *track_vars_array TSRMLS_DC); PHPAPI void php_register_variable_ex(char *var, zval *val, zval *track_vars_array TSRMLS_DC); -PHPAPI void php_u_register_variable_safe(UChar *var, UChar *strval, int32_t str_len, zval *track_vars_array TSRMLS_DC); +PHPAPI void php_u_register_variable_safe(UChar *var, UChar *strval, int str_len, zval *track_vars_array TSRMLS_DC); PHPAPI void php_u_register_variable_ex(UChar *var, zval *val, zval *track_vars_array TSRMLS_DC); int php_hash_environment(TSRMLS_D); http://cvs.php.net/viewcvs.cgi/php-src/main/rfc1867.c?r1=1.182&r2=1.183&diff_format=u Index: php-src/main/rfc1867.c diff -u php-src/main/rfc1867.c:1.182 php-src/main/rfc1867.c:1.183 --- php-src/main/rfc1867.c:1.182 Sun Feb 26 11:57:14 2006 +++ php-src/main/rfc1867.c Thu Mar 2 13:12:45 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: rfc1867.c,v 1.182 2006/02/26 11:57:14 dmitry Exp $ */ +/* $Id: rfc1867.c,v 1.183 2006/03/02 13:12:45 dmitry Exp $ */ /* * This product includes software developed by the Apache Group @@ -298,7 +298,7 @@ } -static void safe_u_php_register_variable(UChar *var, UChar *str_val, int32_t str_len, zval *track_vars_array, zend_bool override_protection TSRMLS_DC) +static void safe_u_php_register_variable(UChar *var, UChar *str_val, int str_len, zval *track_vars_array, zend_bool override_protection TSRMLS_DC) { if (override_protection || !is_u_protected_variable(var TSRMLS_CC)) { php_u_register_variable_safe(var, str_val, str_len, track_vars_array TSRMLS_CC); @@ -324,7 +324,7 @@ } -static void register_u_http_post_files_variable(UChar *strvar, UChar *val, int32_t val_len, zval *http_post_files, zend_bool override_protection TSRMLS_DC) +static void register_u_http_post_files_variable(UChar *strvar, UChar *val, int val_len, zval *http_post_files, zend_bool override_protection TSRMLS_DC) { int register_globals = PG(register_globals); @@ -373,7 +373,7 @@ { UErrorCode status = U_ZERO_ERROR; UChar *buf; - int32_t buf_len = 0; + int buf_len = 0; UConverter *input_conv = UG(http_input_encoding_conv); if (!input_conv) { @@ -752,11 +752,11 @@ } -static UChar *substring_u_conf(UChar *start, int32_t len, UChar quote TSRMLS_DC) +static UChar *substring_u_conf(UChar *start, int len, UChar quote TSRMLS_DC) { UChar *result = eumalloc(len + 2); UChar *resp = result; - int32_t i; + int i; for (i = 0; i < len; ++i) { if (start[i] == '\\' && (start[i + 1] == '\\' || (quote && start[i + 1] == quote))) { http://cvs.php.net/viewcvs.cgi/php-src/main/spprintf.c?r1=1.35&r2=1.36&diff_format=u Index: php-src/main/spprintf.c diff -u php-src/main/spprintf.c:1.35 php-src/main/spprintf.c:1.36 --- php-src/main/spprintf.c:1.35 Tue Jan 24 20:57:56 2006 +++ php-src/main/spprintf.c Thu Mar 2 13:12:45 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spprintf.c,v 1.35 2006/01/24 20:57:56 helly Exp $ */ +/* $Id: spprintf.c,v 1.36 2006/03/02 13:12:45 dmitry Exp $ */ /* This is the spprintf implementation. * It has emerged from apache snprintf. See original header: @@ -208,8 +208,7 @@ register char *s = NULL; register UChar *u = NULL; char *q; - int s_len, s_unicode; - int32_t u_len; + int s_len, s_unicode, u_len; register int min_width = 0; int precision = 0; http://cvs.php.net/viewcvs.cgi/php-src/main/streams/plain_wrapper.c?r1=1.62&r2=1.63&diff_format=u Index: php-src/main/streams/plain_wrapper.c diff -u php-src/main/streams/plain_wrapper.c:1.62 php-src/main/streams/plain_wrapper.c:1.63 --- php-src/main/streams/plain_wrapper.c:1.62 Sun Feb 19 03:41:25 2006 +++ php-src/main/streams/plain_wrapper.c Thu Mar 2 13:12:45 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: plain_wrapper.c,v 1.62 2006/02/19 03:41:25 andi Exp $ */ +/* $Id: plain_wrapper.c,v 1.63 2006/03/02 13:12:45 dmitry Exp $ */ #include "php.h" #include "php_globals.h" @@ -1160,7 +1160,6 @@ char *pathbuf, *ptr, *end; char *exec_fname; char trypath[MAXPATHLEN]; - struct stat sb; php_stream *stream; int path_length; int filename_length;
« previous php.cvs (#37075) next »