[PHP-CVS-DAILY] cvs: php-src / ChangeLog
changelog Fri Aug 19 01:36:53 2005 EDT Modified files: /php-srcChangeLog Log: ChangeLog update http://cvs.php.net/diff.php/php-src/ChangeLog?r1=1.2077r2=1.2078ty=u Index: php-src/ChangeLog diff -u php-src/ChangeLog:1.2077 php-src/ChangeLog:1.2078 --- php-src/ChangeLog:1.2077Thu Aug 18 01:49:53 2005 +++ php-src/ChangeLog Fri Aug 19 01:36:50 2005 @@ -1,3 +1,157 @@ +2005-08-18 Andrei Zmievski [EMAIL PROTECTED] + +* ext/standard/array.c: + Rework range() to be able to work on binary strings and also on Unicode + code points. Binary strings are not interpreted as numeric. + +* ext/standard/string.c: + Use u_totitle() instead of u_toupper() in ucwords(). + +* ZendEngine2/zend_API.c + ZendEngine2/zend_API.h + ZendEngine2/zend_operators.h + ZendEngine2/zend_unicode.h: + - Implement zend_codepoint_to_uchar(). + - Rename and fix zend_get_unified_string_type() so that it does not +allow mixing of binary and Unicode types. + +2005-08-18 Edin Kadribasic [EMAIL PROTECTED] + +* (PHP_4_4) + win32/php4dllts.dsp: + Sync with PCRE lib upgrade + +2005-08-18 Pierre-Alain Joye [EMAIL PROTECTED] + +* (PHP_5_1) + pear/PEAR/Remote.php: + - fix bad revert and make the xmlrpc ext detections fallback +forgot that 5.1 still has pear in its branche + +2005-08-18 Wez Furlong [EMAIL PROTECTED] + +* scripts/php-config.in: + mf 5.1 + +* (PHP_5_1) + scripts/php-config.in: + Add ext to the include path. + +2005-08-18 Dmitry Stogov [EMAIL PROTECTED] + +* ZendEngine2/zend_API.c + ZendEngine2/zend_API.h + ZendEngine2/zend_exceptions.c: + Suppoer for unicode exception messages + +2005-08-18 Ilia Alshanetsky [EMAIL PROTECTED] + +* (PHP_4_4) + NEWS + Zend/zend_alloc.c + ZendEngine2/zend_alloc.c: + MFH: Fixed bug #34156 (memory usage remains elevated after memory limit is + reached) + +* (PHP_5_1) + NEWS + ZendEngine2/zend_alloc.c: + MFH: Fixed bug #34156 (memory usage remains elevated after memory limit is + reached); + +2005-08-18 Dmitry Stogov [EMAIL PROTECTED] + +* ZendEngine2/zend_API.h + ext/standard/array.c: + Unicode support for extract() + +2005-08-18 Antony Dovgal [EMAIL PROTECTED] + +* ZendEngine2/zend_builtin_functions.c: + fix memleak + +2005-08-18 Ilia Alshanetsky [EMAIL PROTECTED] + +* ZendEngine2/zend_alloc.c: + Fixed bug #34156 (memory usage remains elevated after memory limit is + reached) + +2005-08-18 Jani Taskinen [EMAIL PROTECTED] + +* ext/oci8/oci8.c + ext/openssl/openssl.c + ext/oracle/oracle.c + ext/pcre/php_pcre.c + ext/session/mod_files.c + ext/simplexml/simplexml.c + ext/snmp/winsnmp.c + ext/standard/assert.c + ext/standard/php_fopen_wrapper.c + ext/sybase_ct/php_sybase_ct.c: + Nuked EOLs from error messages + +* ext/gd/libgd/gd_arc_f_buggy.c + ext/gd/libgd/gd_gd2.c + ext/gd/libgd/gd_gif_in.c + ext/gd/libgd/gd_io.c + ext/gd/libgd/gd_jpeg.c + ext/gd/libgd/gd_png.c + ext/gd/libgd/gd_ss.c + ext/gd/libgd/gd_wbmp.c + ext/gd/libgd/gdxpm.c + ext/gd/libgd/xbm.c: + Nuke EOLs from error messages + +* ext/ftp/ftp.c: + - Removed EOLs from error messages + +* ZendEngine2/zend_vm_def.h + ZendEngine2/zend_vm_execute.h + ZendEngine2/zend_vm_opcodes.h + ext/dom/php_dom.c: + - Removed EOL from error message + +2005-08-18 Dmitry Stogov [EMAIL PROTECTED] + +* ext/standard/var.c: + var_export() should escape \ and ' characters. + +* ZendEngine2/zend_exceptions.c + ext/dom/php_dom.c + ext/dom/tests/dom003.phpt + main/output.c: + Unicode support + +* ZendEngine2/zend.h: + -** empty log message *** + +* ZendEngine2/zend_API.c: + We don't need EMPY_STRING here. This function is execuited in non-unicode + context only. + +* ext/standard/tests/strings/bug29119.phpt + ext/standard/tests/strings/str_word_count.phpt: + Fixed tests + +2005-08-18 Rolland Santimano [EMAIL PROTECTED] + +* ext/standard/string.c: + - Removed 'proto' from description of internal funcns: ucfirst()/ucwords() + +2005-08-18 Ilia Alshanetsky [EMAIL PROTECTED] + +* (PHP_4_4) + NEWS + NEWS + sapi/apache2handler/sapi_apache2.c + sapi/apache2handler/sapi_apache2.c + sapi/apache2handler/sapi_apache2.c: + MFH: Fixed bug #33987 (php script as ErrorDocument causes crash in Apache + 2). + +* sapi/apache2handler/sapi_apache2.c: + Fixed bug #33987 (php script as ErrorDocument causes crash in Apache 2). + 2005-08-17 Greg Beaver [EMAIL PROTECTED] * (PHP_5_1) @@ -10041,7 +10195,7 @@ * (PHP_4_3) ext/standard/url_scanner_ex.re: - Missing $Id: ChangeLog,v 1.2077 2005/08/18 05:49:53 changelog Exp $
[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog
changelog Fri Aug 19 01:37:02 2005 EDT Modified files: /ZendEngine2ChangeLog Log: ChangeLog update http://cvs.php.net/diff.php/ZendEngine2/ChangeLog?r1=1.755r2=1.756ty=u Index: ZendEngine2/ChangeLog diff -u ZendEngine2/ChangeLog:1.755 ZendEngine2/ChangeLog:1.756 --- ZendEngine2/ChangeLog:1.755 Thu Aug 18 01:51:13 2005 +++ ZendEngine2/ChangeLog Fri Aug 19 01:37:01 2005 @@ -1,3 +1,67 @@ +2005-08-18 Andrei Zmievski [EMAIL PROTECTED] + +* zend_API.c + zend_API.h + zend_operators.h + zend_unicode.h: + - Implement zend_codepoint_to_uchar(). + - Rename and fix zend_get_unified_string_type() so that it does not +allow mixing of binary and Unicode types. + +2005-08-18 Dmitry Stogov [EMAIL PROTECTED] + +* zend_API.c + zend_API.h + zend_exceptions.c: + Suppoer for unicode exception messages + +2005-08-18 Ilia Alshanetsky [EMAIL PROTECTED] + +* (PHP_5_0) + zend_alloc.c: + MFH: Fixed bug #34156 (memory usage remains elevated after memory limit is + reached) + +* (PHP_5_1) + zend_alloc.c: + MFH: Fixed bug #34156 (memory usage remains elevated after memory limit is + reached); + +2005-08-18 Dmitry Stogov [EMAIL PROTECTED] + +* zend_API.h: + Unicode support for extract() + +2005-08-18 Antony Dovgal [EMAIL PROTECTED] + +* zend_builtin_functions.c: + fix memleak + +2005-08-18 Ilia Alshanetsky [EMAIL PROTECTED] + +* zend_alloc.c: + Fixed bug #34156 (memory usage remains elevated after memory limit is + reached) + +2005-08-18 Jani Taskinen [EMAIL PROTECTED] + +* zend_vm_def.h + zend_vm_execute.h + zend_vm_opcodes.h: + - Removed EOL from error message + +2005-08-18 Dmitry Stogov [EMAIL PROTECTED] + +* zend_exceptions.c: + Unicode support + +* zend.h: + -** empty log message *** + +* zend_API.c: + We don't need EMPY_STRING here. This function is execuited in non-unicode + context only. + 2005-08-17 Marcus Boerger [EMAIL PROTECTED] * zend_operators.c @@ -9766,7 +9830,7 @@ 2003-06-10 Jani Taskinen [EMAIL PROTECTED] * zend_multiply.h: - - Missing $Id: ChangeLog,v 1.755 2005/08/18 05:51:13 changelog Exp $ tag + - Missing $Id: ChangeLog,v 1.756 2005/08/19 05:37:01 changelog Exp $ tag 2003-06-10 James Cox [EMAIL PROTECTED] @@ -11490,7 +11554,7 @@ zend_types.h zend_variables.c zend_variables.h: - - Added some missing CVS $Id: ChangeLog,v 1.755 2005/08/18 05:51:13 changelog Exp $ tags, headers and footers. + - Added some missing CVS $Id: ChangeLog,v 1.756 2005/08/19 05:37:01 changelog Exp $ tags, headers and footers. 2003-01-30 Ilia Alshanetsky [EMAIL PROTECTED]
[PHP-CVS] cvs: php-src /ext/standard/tests/strings bug29119.phpt str_word_count.phpt
dmitry Thu Aug 18 02:32:40 2005 EDT Modified files: /php-src/ext/standard/tests/strings bug29119.phpt str_word_count.phpt Log: Fixed tests http://cvs.php.net/diff.php/php-src/ext/standard/tests/strings/bug29119.phpt?r1=1.2r2=1.3ty=u Index: php-src/ext/standard/tests/strings/bug29119.phpt diff -u php-src/ext/standard/tests/strings/bug29119.phpt:1.2 php-src/ext/standard/tests/strings/bug29119.phpt:1.3 --- php-src/ext/standard/tests/strings/bug29119.phpt:1.2Mon Jul 19 14:49:20 2004 +++ php-src/ext/standard/tests/strings/bug29119.phptThu Aug 18 02:32:39 2005 @@ -6,3 +6,5 @@ ? --EXPECT-- string(42) e28082e28089e28098e280a0e280b2e28184e282ac +--UEXPECT-- +unicode(42) e28082e28089e28098e280a0e280b2e28184e282ac http://cvs.php.net/diff.php/php-src/ext/standard/tests/strings/str_word_count.phpt?r1=1.4r2=1.5ty=u Index: php-src/ext/standard/tests/strings/str_word_count.phpt diff -u php-src/ext/standard/tests/strings/str_word_count.phpt:1.4 php-src/ext/standard/tests/strings/str_word_count.phpt:1.5 --- php-src/ext/standard/tests/strings/str_word_count.phpt:1.4 Sat Jul 23 15:44:12 2005 +++ php-src/ext/standard/tests/strings/str_word_count.phpt Thu Aug 18 02:32:39 2005 @@ -78,7 +78,7 @@ Warning: Wrong parameter count for str_word_count() in %s on line 13 NULL -Warning: str_word_count() expects parameter 2 to be long, string given in %s on line 14 +Warning: str_word_count() expects parameter 2 to be long, native string given in %s on line 14 Warning: Wrong parameter count for str_word_count() in %s on line 14 NULL @@ -88,12 +88,12 @@ int(6) int(5) -Warning: str_word_count() expects parameter 3 to be string, array given in %s on line 21 +Warning: str_word_count() expects parameter 3 to be native string, array given in %s on line 21 Warning: Wrong parameter count for str_word_count() in %s on line 21 NULL -Warning: str_word_count() expects parameter 3 to be string, object given in %s on line 22 +Warning: str_word_count() expects parameter 3 to be native string, object given in %s on line 22 Warning: Wrong parameter count for str_word_count() in %s on line 22 NULL @@ -137,12 +137,12 @@ string(3) foo } -Warning: str_word_count() expects parameter 3 to be string, array given in %s on line 27 +Warning: str_word_count() expects parameter 3 to be native string, array given in %s on line 27 Warning: Wrong parameter count for str_word_count() in %s on line 27 NULL -Warning: str_word_count() expects parameter 3 to be string, object given in %s on line 28 +Warning: str_word_count() expects parameter 3 to be native string, object given in %s on line 28 Warning: Wrong parameter count for str_word_count() in %s on line 28 NULL @@ -201,12 +201,12 @@ string(3) foo } -Warning: str_word_count() expects parameter 3 to be string, array given in %s on line 33 +Warning: str_word_count() expects parameter 3 to be native string, array given in %s on line 33 Warning: Wrong parameter count for str_word_count() in %s on line 33 NULL -Warning: str_word_count() expects parameter 3 to be string, object given in %s on line 34 +Warning: str_word_count() expects parameter 3 to be native string, object given in %s on line 34 Warning: Wrong parameter count for str_word_count() in %s on line 34 NULL -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/libxml libxml.c
dmitry Thu Aug 18 03:16:53 2005 EDT Modified files: /php-src/ext/libxml libxml.c Log: Unicode support http://cvs.php.net/diff.php/php-src/ext/libxml/libxml.c?r1=1.32r2=1.33ty=u Index: php-src/ext/libxml/libxml.c diff -u php-src/ext/libxml/libxml.c:1.32 php-src/ext/libxml/libxml.c:1.33 --- php-src/ext/libxml/libxml.c:1.32Wed Aug 3 10:07:23 2005 +++ php-src/ext/libxml/libxml.c Thu Aug 18 03:16:52 2005 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: libxml.c,v 1.32 2005/08/03 14:07:23 sniper Exp $ */ +/* $Id: libxml.c,v 1.33 2005/08/18 07:16:52 dmitry Exp $ */ #define IS_EXT_MODULE @@ -797,7 +797,14 @@ php_libxml_initialize(); export_hnd.export_func = export_function; -return zend_hash_add(php_libxml_exports, ce-name, ce-name_length + 1, export_hnd, sizeof(export_hnd), NULL); + if (zend_hash_add(php_libxml_exports, ce-name, ce-name_length + 1, export_hnd, sizeof(export_hnd), NULL) == SUCCESS) { + UChar *uname; + + uname = malloc(UBYTES(ce-name_length+1)); + u_charsToUChars(ce-name, uname, ce-name_length+1); +return zend_u_hash_add(php_libxml_exports, IS_UNICODE, uname, ce-name_length + 1, export_hnd, sizeof(export_hnd), NULL); + } + return FAILURE; } PHP_LIBXML_API xmlNodePtr php_libxml_import_node(zval *object TSRMLS_DC) @@ -811,10 +818,10 @@ while (ce-parent != NULL) { ce = ce-parent; } - if (zend_hash_find(php_libxml_exports, ce-name, ce-name_length + 1, (void **) export_hnd) == SUCCESS) { + if (zend_u_hash_find(php_libxml_exports, UG(unicode)?IS_UNICODE:IS_STRING, ce-name, ce-name_length + 1, (void **) export_hnd) == SUCCESS) { node = export_hnd-export_func(object TSRMLS_CC); } -} + } return node; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /main output.c
dmitry Thu Aug 18 06:18:41 2005 EDT Modified files: /php-src/main output.c Log: Unicode support http://cvs.php.net/diff.php/php-src/main/output.c?r1=1.168r2=1.169ty=u Index: php-src/main/output.c diff -u php-src/main/output.c:1.168 php-src/main/output.c:1.169 --- php-src/main/output.c:1.168 Thu Aug 11 19:36:03 2005 +++ php-src/main/output.c Thu Aug 18 06:18:40 2005 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: output.c,v 1.168 2005/08/11 23:36:03 andrei Exp $ */ +/* $Id: output.c,v 1.169 2005/08/18 10:18:40 dmitry Exp $ */ #include php.h #include ext/standard/head.h @@ -411,14 +411,23 @@ /* {{{ php_ob_init_named */ -static int php_ob_init_named(uint initial_size, uint block_size, char *handler_name, zval *output_handler, uint chunk_size, zend_bool erase TSRMLS_DC) +static int php_ob_init_named(uint initial_size, uint block_size, zend_uchar type, char *handler_name, zval *output_handler, uint chunk_size, zend_bool erase TSRMLS_DC) { + int handler_len; + if (output_handler !zend_is_callable(output_handler, 0, NULL)) { return FAILURE; } + if (type == IS_UNICODE) { + handler_len = u_strlen(handler_name); + } else { + handler_len = strlen(handler_name); + } if (OG(ob_nesting_level)0) { #if HAVE_ZLIB !defined(COMPILE_DL_ZLIB) - if (!strncmp(handler_name, ob_gzhandler, sizeof(ob_gzhandler)) php_ob_gzhandler_check(TSRMLS_C)) { + if ((handler_len == sizeof(ob_gzhandler)-1) + (ZEND_U_EQUAL(type, handler_name, handler_len, ob_gzhandler, sizeof(ob_gzhandler))) + php_ob_gzhandler_check(TSRMLS_C)) { return FAILURE; } #endif @@ -436,7 +445,11 @@ OG(active_ob_buffer).chunk_size = chunk_size; OG(active_ob_buffer).status = 0; OG(active_ob_buffer).internal_output_handler = NULL; - OG(active_ob_buffer).handler_name = estrdup(handler_namehandler_name[0]?handler_name:OB_DEFAULT_HANDLER_NAME); + if (type == IS_UNICODE) { + OG(active_ob_buffer).handler_name = eustrdup(handler_namehandler_name[0]?handler_name:OB_DEFAULT_HANDLER_NAME); + } else { + OG(active_ob_buffer).handler_name = estrdup(handler_namehandler_name[0]?handler_name:OB_DEFAULT_HANDLER_NAME); + } OG(active_ob_buffer).erase = erase; OG(php_body_write) = php_b_body_write; return SUCCESS; @@ -458,18 +471,33 @@ } /* }}} */ +/* {{{ php_ob_handler_from_unicode + * Create zval output handler from unicode + */ +static zval* php_ob_handler_from_unicode(const UChar *handler_name, int len TSRMLS_DC) +{ + zval *output_handler; + + ALLOC_INIT_ZVAL(output_handler); + Z_USTRLEN_P(output_handler) = len; + Z_USTRVAL_P(output_handler) = eustrndup(handler_name, len); + Z_TYPE_P(output_handler) = IS_UNICODE; + return output_handler; +} +/* }}} */ + /* {{{ php_ob_init */ static int php_ob_init(uint initial_size, uint block_size, zval *output_handler, uint chunk_size, zend_bool erase TSRMLS_DC) { int result = FAILURE, handler_len, len; - char *handler_name, *next_handler_name; HashPosition pos; zval **tmp; zval *handler_zval; if (output_handler output_handler-type == IS_STRING) { - handler_name = Z_STRVAL_P(output_handler); + char* next_handler_name; + char* handler_name = Z_STRVAL_P(output_handler); handler_len = Z_STRLEN_P(output_handler); result = SUCCESS; @@ -478,7 +506,7 @@ len = next_handler_name-handler_name; next_handler_name = estrndup(handler_name, len); handler_zval = php_ob_handler_from_string(next_handler_name, len TSRMLS_CC); - result = php_ob_init_named(initial_size, block_size, next_handler_name, handler_zval, chunk_size, erase TSRMLS_CC); + result = php_ob_init_named(initial_size, block_size, IS_STRING, next_handler_name, handler_zval, chunk_size, erase TSRMLS_CC); if (result != SUCCESS) { zval_dtor(handler_zval); FREE_ZVAL(handler_zval); @@ -490,18 +518,49 @@ } if (result == SUCCESS) { handler_zval = php_ob_handler_from_string(handler_name, handler_len TSRMLS_CC); - result = php_ob_init_named(initial_size, block_size, handler_name, handler_zval, chunk_size, erase TSRMLS_CC); + result = php_ob_init_named(initial_size, block_size, IS_STRING, handler_name, handler_zval, chunk_size, erase TSRMLS_CC); +
[PHP-CVS] cvs: php-src /ext/standard var.c
dmitry Thu Aug 18 07:13:53 2005 EDT Modified files: /php-src/ext/standard var.c Log: var_export() should escape \ and ' characters. http://cvs.php.net/diff.php/php-src/ext/standard/var.c?r1=1.211r2=1.212ty=u Index: php-src/ext/standard/var.c diff -u php-src/ext/standard/var.c:1.211 php-src/ext/standard/var.c:1.212 --- php-src/ext/standard/var.c:1.211Wed Aug 17 11:11:41 2005 +++ php-src/ext/standard/var.c Thu Aug 18 07:13:50 2005 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: var.c,v 1.211 2005/08/17 15:11:41 dmitry Exp $ */ +/* $Id: var.c,v 1.212 2005/08/18 11:13:50 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 TSRMLS_DC) +static void php_var_dump_unicode(UChar *ustr, int32_t length, int verbose, char *quote, int escape TSRMLS_DC) { UChar32 c; int32_t i; @@ -72,7 +72,16 @@ } ZEND_PUTS(quote); - PHPWRITE(out, clen); + if (escape) { + char *str; + int str_len; + + str = php_addcslashes(out, clen, str_len, 0, '\\, 2 TSRMLS_CC); + PHPWRITE(str, str_len); + efree(str); + } else { + PHPWRITE(out, clen); + } ZEND_PUTS(quote); if (verbose) { ZEND_PUTS( {); @@ -129,7 +138,7 @@ php_printf(\); } else if (hash_key-type == IS_UNICODE) { php_printf(u); - php_var_dump_unicode(hash_key-u.unicode, hash_key-nKeyLength-1, verbose, \ TSRMLS_CC); + php_var_dump_unicode(hash_key-u.unicode, hash_key-nKeyLength-1, verbose, \, 0 TSRMLS_CC); } php_printf(]=\n); } @@ -207,7 +216,7 @@ break; case IS_UNICODE: php_printf(%sunicode(%d) , COMMON, u_countChar32((*struc)-value.ustr.val, (*struc)-value.ustr.len)); - php_var_dump_unicode((*struc)-value.ustr.val, (*struc)-value.ustr.len, 0, \ TSRMLS_CC); + php_var_dump_unicode((*struc)-value.ustr.val, (*struc)-value.ustr.len, 0, \, 0 TSRMLS_CC); PUTS(\n); break; case IS_ARRAY: @@ -334,7 +343,7 @@ php_printf(\); } else if (hash_key-type == IS_UNICODE) { php_printf(u); - php_var_dump_unicode(hash_key-u.unicode, hash_key-nKeyLength-1, 1, \ TSRMLS_CC); + php_var_dump_unicode(hash_key-u.unicode, hash_key-nKeyLength-1, 1, \, 0 TSRMLS_CC); } php_printf(]=\n); } @@ -378,7 +387,7 @@ break; case IS_UNICODE: php_printf(%sunicode(%d) , COMMON, u_countChar32((*struc)-value.ustr.val, (*struc)-value.ustr.len)); - php_var_dump_unicode((*struc)-value.ustr.val, (*struc)-value.ustr.len, verbose, \ TSRMLS_CC); + php_var_dump_unicode((*struc)-value.ustr.val, (*struc)-value.ustr.len, verbose, \, 0 TSRMLS_CC); php_printf( refcount(%u)\n, Z_REFCOUNT_PP(struc)); break; case IS_ARRAY: @@ -461,7 +470,7 @@ } else { /* string key */ php_printf(%*c', level + 1, ' '); if (hash_key-type == IS_UNICODE) { - php_var_dump_unicode(hash_key-u.unicode, hash_key-nKeyLength-1, 0, TSRMLS_CC); + php_var_dump_unicode(hash_key-u.unicode, hash_key-nKeyLength-1, 0, , 1 TSRMLS_CC); } else { char *key; int key_len; @@ -535,10 +544,7 @@ efree (tmp_str); break; case IS_UNICODE: -/* TODO - tmp_str = php_addcslashes(Z_STRVAL_PP(struc), Z_STRLEN_PP(struc), tmp_len, 0, '\\, 2 TSRMLS_CC); -*/ - php_var_dump_unicode(Z_USTRVAL_PP(struc), Z_USTRLEN_PP(struc), 0, ' TSRMLS_CC); + php_var_dump_unicode(Z_USTRVAL_PP(struc), Z_USTRLEN_PP(struc), 0, ', 1 TSRMLS_CC); break; case IS_ARRAY: myht = Z_ARRVAL_PP(struc); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /tests/unicode/func strpos.phpt strstr.phpt
dmitry Thu Aug 18 06:53:59 2005 EDT Modified files: /php-src/tests/unicode/func strpos.phpt strstr.phpt Log: Fixed tests http://cvs.php.net/diff.php/php-src/tests/unicode/func/strpos.phpt?r1=1.1r2=1.2ty=u Index: php-src/tests/unicode/func/strpos.phpt diff -u php-src/tests/unicode/func/strpos.phpt:1.1 php-src/tests/unicode/func/strpos.phpt:1.2 --- php-src/tests/unicode/func/strpos.phpt:1.1 Thu Aug 11 19:36:07 2005 +++ php-src/tests/unicode/func/strpos.phpt Thu Aug 18 06:53:55 2005 @@ -1,5 +1,7 @@ --TEST-- Unicode: strpos() function test +--INI-- +unicode_semantics=on --FILE-- ?php $a = aâ¢á\U020021z; http://cvs.php.net/diff.php/php-src/tests/unicode/func/strstr.phpt?r1=1.1r2=1.2ty=u Index: php-src/tests/unicode/func/strstr.phpt diff -u php-src/tests/unicode/func/strstr.phpt:1.1 php-src/tests/unicode/func/strstr.phpt:1.2 --- php-src/tests/unicode/func/strstr.phpt:1.1 Thu Aug 11 19:36:07 2005 +++ php-src/tests/unicode/func/strstr.phpt Thu Aug 18 06:53:55 2005 @@ -1,5 +1,7 @@ --TEST-- Unicode: strpos() function test +--INI-- +unicode_semantics=on --FILE-- ?php $a = aâ¢á\U020021z; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/dom php_dom.c /ext/dom/tests dom003.phpt
dmitry Thu Aug 18 07:47:04 2005 EDT Modified files: /php-src/ext/domphp_dom.c /php-src/ext/dom/tests dom003.phpt Log: Unicode support http://cvs.php.net/diff.php/php-src/ext/dom/php_dom.c?r1=1.77r2=1.78ty=u Index: php-src/ext/dom/php_dom.c diff -u php-src/ext/dom/php_dom.c:1.77 php-src/ext/dom/php_dom.c:1.78 --- php-src/ext/dom/php_dom.c:1.77 Fri Aug 12 10:57:58 2005 +++ php-src/ext/dom/php_dom.c Thu Aug 18 07:47:01 2005 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_dom.c,v 1.77 2005/08/12 14:57:58 dmitry Exp $ */ +/* $Id: php_dom.c,v 1.78 2005/08/18 11:47:01 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -72,29 +72,7 @@ zend_object_handlers dom_ze1_object_handlers; static HashTable classes; - -static HashTable dom_domstringlist_prop_handlers; -static HashTable dom_namelist_prop_handlers; -static HashTable dom_domimplementationlist_prop_handlers; -static HashTable dom_document_prop_handlers; -static HashTable dom_node_prop_handlers; -static HashTable dom_nodelist_prop_handlers; -static HashTable dom_namednodemap_prop_handlers; -static HashTable dom_characterdata_prop_handlers; -static HashTable dom_attr_prop_handlers; -static HashTable dom_element_prop_handlers; -static HashTable dom_text_prop_handlers; -static HashTable dom_typeinfo_prop_handlers; -static HashTable dom_domerror_prop_handlers; -static HashTable dom_domlocator_prop_handlers; -static HashTable dom_documenttype_prop_handlers; -static HashTable dom_notation_prop_handlers; -static HashTable dom_entity_prop_handlers; -static HashTable dom_processinginstruction_prop_handlers; -static HashTable dom_namespace_node_prop_handlers; -#if defined(LIBXML_XPATH_ENABLED) -static HashTable dom_xpath_prop_handlers; -#endif +static HashTable u_classes; typedef int (*dom_read_t)(dom_object *obj, zval **retval TSRMLS_DC); typedef int (*dom_write_t)(dom_object *obj, zval *newval TSRMLS_DC); @@ -465,10 +443,49 @@ ZEND_GET_MODULE(dom) #endif +static void dom_prop_handlers_dtor(HashTable *ht) +{ + zend_hash_destroy(ht); +} + +static void dom_prop_handlers_ctor(HashTable *ht) +{ + HashTable tmp = *ht; + + zend_u_hash_init(ht, 0, NULL, NULL, 1, 1); + zend_hash_copy(ht, tmp, NULL, NULL, sizeof(dom_prop_handler)); +} + /* {{{ PHP_MINIT_FUNCTION(dom) */ PHP_MINIT_FUNCTION(dom) { zend_class_entry ce; + HashTable dom_domstringlist_prop_handlers; + HashTable dom_namelist_prop_handlers; + HashTable dom_domimplementationlist_prop_handlers; + HashTable dom_document_prop_handlers; + HashTable dom_node_prop_handlers; + HashTable dom_document_fragment_prop_handlers; + HashTable dom_nodelist_prop_handlers; + HashTable dom_namednodemap_prop_handlers; + HashTable dom_characterdata_prop_handlers; + HashTable dom_attr_prop_handlers; + HashTable dom_element_prop_handlers; + HashTable dom_text_prop_handlers; + HashTable dom_cdata_prop_handlers; + HashTable dom_comment_prop_handlers; + HashTable dom_typeinfo_prop_handlers; + HashTable dom_domerror_prop_handlers; + HashTable dom_domlocator_prop_handlers; + HashTable dom_documenttype_prop_handlers; + HashTable dom_notation_prop_handlers; + HashTable dom_entity_prop_handlers; + HashTable dom_processinginstruction_prop_handlers; + HashTable dom_namespace_node_prop_handlers; + HashTable dom_entity_reference_prop_handlers; +#if defined(LIBXML_XPATH_ENABLED) + HashTable dom_xpath_prop_handlers; +#endif memcpy(dom_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); dom_object_handlers.read_property = dom_read_property; @@ -482,7 +499,7 @@ dom_object_handlers.get_property_ptr_ptr = dom_get_property_ptr_ptr; dom_ze1_object_handlers.clone_obj = dom_objects_ze1_clone_obj; - zend_hash_init(classes, 0, NULL, NULL, 1); + zend_hash_init(classes, 0, NULL, (void (*)(void *))dom_prop_handlers_dtor, 1); INIT_CLASS_ENTRY(ce, DOMException, php_dom_domexception_class_functions); dom_domexception_class_entry = zend_register_internal_class_ex(ce, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC); @@ -545,7 +562,9 @@ zend_hash_add(classes, ce.name, ce.name_length + 1, dom_namespace_node_prop_handlers, sizeof(dom_namespace_node_prop_handlers), NULL); REGISTER_DOM_CLASS(ce, DOMDocumentFragment, dom_node_class_entry, php_dom_documentfragment_class_functions, dom_documentfragment_class_entry); - zend_hash_add(classes, ce.name, ce.name_length + 1, dom_node_prop_handlers, sizeof(dom_node_prop_handlers), NULL); + zend_hash_init(dom_document_fragment_prop_handlers, 0, NULL, NULL, 1); + zend_hash_copy(dom_document_fragment_prop_handlers, dom_node_prop_handlers, NULL, NULL, sizeof(dom_prop_handler)); +
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/ftp ftp.c
sniper Thu Aug 18 08:37:35 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/ftpftp.c Log: MFH http://cvs.php.net/diff.php/php-src/ext/ftp/ftp.c?r1=1.112r2=1.112.2.1ty=u Index: php-src/ext/ftp/ftp.c diff -u php-src/ext/ftp/ftp.c:1.112 php-src/ext/ftp/ftp.c:1.112.2.1 --- php-src/ext/ftp/ftp.c:1.112 Wed Aug 3 10:07:10 2005 +++ php-src/ext/ftp/ftp.c Thu Aug 18 08:37:35 2005 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: ftp.c,v 1.112 2005/08/03 14:07:10 sniper Exp $ */ +/* $Id: ftp.c,v 1.112.2.1 2005/08/18 12:37:35 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -148,7 +148,7 @@ size = sizeof(ftp-localaddr); memset(ftp-localaddr, 0, size); if (getsockname(ftp-fd, (struct sockaddr*) ftp-localaddr, size) == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, getsockname failed: %s (%d)\n, strerror(errno), errno); + php_error_docref(NULL TSRMLS_CC, E_WARNING, getsockname failed: %s (%d), strerror(errno), errno); goto bail; } @@ -808,7 +808,7 @@ if (resumepos 0) { if (resumepos 2147483647) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, PHP cannot handle files greater then 2147483647 bytes.\n); + php_error_docref(NULL TSRMLS_CC, E_WARNING, PHP cannot handle files greater then 2147483647 bytes.); goto bail; } sprintf(arg, %u, resumepos); @@ -905,7 +905,7 @@ if (startpos 0) { if (startpos 2147483647) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, PHP cannot handle files with a size greater then 2147483647 bytes.\n); + php_error_docref(NULL TSRMLS_CC, E_WARNING, PHP cannot handle files with a size greater then 2147483647 bytes.); goto bail; } sprintf(arg, %u, startpos); @@ -1384,7 +1384,7 @@ sa = (struct sockaddr *) ftp-localaddr; /* bind/listen */ if ((fd = socket(sa-sa_family, SOCK_STREAM, 0)) == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, socket() failed: %s (%d)\n, strerror(errno), errno); + php_error_docref(NULL TSRMLS_CC, E_WARNING, socket() failed: %s (%d), strerror(errno), errno); goto bail; } @@ -1399,7 +1399,7 @@ tv.tv_sec = ftp-timeout_sec; tv.tv_usec = 0; if (php_connect_nonb(fd, (struct sockaddr*) ftp-pasvaddr, size, tv) == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, php_connect_nonb() failed: %s (%d)\n, strerror(errno), errno); + php_error_docref(NULL TSRMLS_CC, E_WARNING, php_connect_nonb() failed: %s (%d), strerror(errno), errno); goto bail; } @@ -1417,17 +1417,17 @@ size = php_sockaddr_size(addr); if (bind(fd, (struct sockaddr*) addr, size) == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, bind() failed: %s (%d)\n, strerror(errno), errno); + php_error_docref(NULL TSRMLS_CC, E_WARNING, bind() failed: %s (%d), strerror(errno), errno); goto bail; } if (getsockname(fd, (struct sockaddr*) addr, size) == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, getsockname() failed: %s (%d)\n, strerror(errno), errno); + php_error_docref(NULL TSRMLS_CC, E_WARNING, getsockname() failed: %s (%d), strerror(errno), errno); goto bail; } if (listen(fd, 5) == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, listen() failed: %s (%d)\n, strerror(errno), errno); + php_error_docref(NULL TSRMLS_CC, E_WARNING, listen() failed: %s (%d), strerror(errno), errno); goto bail; } @@ -1702,7 +1702,7 @@ * since php is 32 bit by design, we bail out with warning */ if (resumepos 2147483647) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, PHP cannot handle files greater then 2147483648 bytes.\n); + php_error_docref(NULL TSRMLS_CC, E_WARNING, PHP cannot handle files greater then 2147483648 bytes.); goto bail; } sprintf(arg, %u, resumepos); @@ -1820,7 +1820,7 @@ } if (startpos 0) { if (startpos 2147483647) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, PHP cannot handle files with a size greater then 2147483647 bytes.\n); + php_error_docref(NULL TSRMLS_CC, E_WARNING, PHP cannot handle files with a size greater then 2147483647 bytes.); goto bail; }
[PHP-CVS] cvs: php-src /ext/dom php_dom.c
sniper Thu Aug 18 08:40:18 2005 EDT Modified files: /php-src/ext/domphp_dom.c Log: - Removed EOL from error message http://cvs.php.net/diff.php/php-src/ext/dom/php_dom.c?r1=1.78r2=1.79ty=u Index: php-src/ext/dom/php_dom.c diff -u php-src/ext/dom/php_dom.c:1.78 php-src/ext/dom/php_dom.c:1.79 --- php-src/ext/dom/php_dom.c:1.78 Thu Aug 18 07:47:01 2005 +++ php-src/ext/dom/php_dom.c Thu Aug 18 08:40:17 2005 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_dom.c,v 1.78 2005/08/18 11:47:01 dmitry Exp $ */ +/* $Id: php_dom.c,v 1.79 2005/08/18 12:40:17 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -1206,7 +1206,7 @@ break; } default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unsupported node type: %d\n, Z_TYPE_P(obj)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unsupported node type: %d, Z_TYPE_P(obj)); ZVAL_NULL(wrapper); return wrapper; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/dom php_dom.c
sniper Thu Aug 18 08:40:42 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/domphp_dom.c Log: MFH http://cvs.php.net/diff.php/php-src/ext/dom/php_dom.c?r1=1.73r2=1.73.2.1ty=u Index: php-src/ext/dom/php_dom.c diff -u php-src/ext/dom/php_dom.c:1.73 php-src/ext/dom/php_dom.c:1.73.2.1 --- php-src/ext/dom/php_dom.c:1.73 Wed Aug 3 10:07:05 2005 +++ php-src/ext/dom/php_dom.c Thu Aug 18 08:40:41 2005 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_dom.c,v 1.73 2005/08/03 14:07:05 sniper Exp $ */ +/* $Id: php_dom.c,v 1.73.2.1 2005/08/18 12:40:41 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -1199,7 +1199,7 @@ break; } default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unsupported node type: %d\n, Z_TYPE_P(obj)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unsupported node type: %d, Z_TYPE_P(obj)); ZVAL_NULL(wrapper); return wrapper; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/gd/libgd gd_arc_f_buggy.c gd_gd2.c gd_gif_in.c gd_io.c gd_jpeg.c gd_png.c gd_ss.c gd_wbmp.c gdxpm.c xbm.c
sniper Thu Aug 18 08:54:35 2005 EDT Modified files: /php-src/ext/gd/libgd gd_arc_f_buggy.c gd_gd2.c gd_gif_in.c gd_io.c gd_jpeg.c gd_png.c gd_ss.c gd_wbmp.c gdxpm.c xbm.c Log: Nuke EOLs from error messages http://cvs.php.net/diff.php/php-src/ext/gd/libgd/gd_arc_f_buggy.c?r1=1.3r2=1.4ty=u Index: php-src/ext/gd/libgd/gd_arc_f_buggy.c diff -u php-src/ext/gd/libgd/gd_arc_f_buggy.c:1.3 php-src/ext/gd/libgd/gd_arc_f_buggy.c:1.4 --- php-src/ext/gd/libgd/gd_arc_f_buggy.c:1.3 Sun Dec 28 15:11:08 2003 +++ php-src/ext/gd/libgd/gd_arc_f_buggy.c Thu Aug 18 08:54:29 2005 @@ -726,12 +726,12 @@ out = fopen (test/arctest.png, wb); if (!out) { - php_gd_error(Can't create test/arctest.png\n); + php_gd_error(Can't create test/arctest.png); exit (1); } gdImagePng (im, out); fclose (out); - php_gd_error(Test image written to test/arctest.png\n); + php_gd_error(Test image written to test/arctest.png); /* Destroy it */ gdImageDestroy (im); http://cvs.php.net/diff.php/php-src/ext/gd/libgd/gd_gd2.c?r1=1.16r2=1.17ty=u Index: php-src/ext/gd/libgd/gd_gd2.c diff -u php-src/ext/gd/libgd/gd_gd2.c:1.16 php-src/ext/gd/libgd/gd_gd2.c:1.17 --- php-src/ext/gd/libgd/gd_gd2.c:1.16 Mon Mar 29 13:20:33 2004 +++ php-src/ext/gd/libgd/gd_gd2.c Thu Aug 18 08:54:29 2005 @@ -60,7 +60,7 @@ int sidx; int nc; - GD2_DBG(php_gd_error(Reading gd2 header info\n)); + GD2_DBG(php_gd_error(Reading gd2 header info)); for (i = 0; i 4; i++) { ch = gdGetC(in); @@ -71,11 +71,11 @@ } id[4] = 0; - GD2_DBG(php_gd_error(Got file code: %s\n, id)); + GD2_DBG(php_gd_error(Got file code: %s, id)); /* Equiv. of 'magick'. */ if (strcmp(id, GD2_ID) != 0) { - GD2_DBG(php_gd_error(Not a valid gd2 file\n)); + GD2_DBG(php_gd_error(Not a valid gd2 file)); goto fail1; } @@ -83,32 +83,32 @@ if (gdGetWord(vers, in) != 1) { goto fail1; } - GD2_DBG(php_gd_error(Version: %d\n, *vers)); + GD2_DBG(php_gd_error(Version: %d, *vers)); if ((*vers != 1) (*vers != 2)) { - GD2_DBG(php_gd_error(Bad version: %d\n, *vers)); + GD2_DBG(php_gd_error(Bad version: %d, *vers)); goto fail1; } /* Image Size */ if (!gdGetWord(sx, in)) { - GD2_DBG(php_gd_error(Could not get x-size\n)); + GD2_DBG(php_gd_error(Could not get x-size)); goto fail1; } if (!gdGetWord(sy, in)) { - GD2_DBG(php_gd_error(Could not get y-size\n)); + GD2_DBG(php_gd_error(Could not get y-size)); goto fail1; } - GD2_DBG(php_gd_error(Image is %dx%d\n, *sx, *sy)); + GD2_DBG(php_gd_error(Image is %dx%d, *sx, *sy)); /* Chunk Size (pixels, not bytes!) */ if (gdGetWord(cs, in) != 1) { goto fail1; } - GD2_DBG(php_gd_error(ChunkSize: %d\n, *cs)); + GD2_DBG(php_gd_error(ChunkSize: %d, *cs)); if ((*cs GD2_CHUNKSIZE_MIN) || (*cs GD2_CHUNKSIZE_MAX)) { - GD2_DBG(php_gd_error(Bad chunk size: %d\n, *cs)); + GD2_DBG(php_gd_error(Bad chunk size: %d, *cs)); goto fail1; } @@ -116,10 +116,10 @@ if (gdGetWord(fmt, in) != 1) { goto fail1; } - GD2_DBG(php_gd_error(Format: %d\n, *fmt)); + GD2_DBG(php_gd_error(Format: %d, *fmt)); if ((*fmt != GD2_FMT_RAW) (*fmt != GD2_FMT_COMPRESSED) (*fmt != GD2_FMT_TRUECOLOR_RAW) (*fmt != GD2_FMT_TRUECOLOR_COMPRESSED)) { - GD2_DBG(php_gd_error(Bad data format: %d\n, *fmt)); + GD2_DBG(php_gd_error(Bad data format: %d, *fmt)); goto fail1; } @@ -127,17 +127,17 @@ if (gdGetWord(ncx, in) != 1) { goto fail1; } - GD2_DBG(php_gd_error(%d Chunks Wide\n, *ncx)); + GD2_DBG(php_gd_error(%d Chunks Wide, *ncx)); /* # of chunks high */ if (gdGetWord(ncy, in) != 1) { goto fail1; } - GD2_DBG(php_gd_error(%d Chunks vertically\n, *ncy)); + GD2_DBG(php_gd_error(%d Chunks vertically, *ncy)); if (gd2_compressed(*fmt)) { nc = (*ncx) * (*ncy); - GD2_DBG(php_gd_error(Reading %d chunk index entries\n, nc)); + GD2_DBG(php_gd_error(Reading %d chunk index entries, nc)); sidx = sizeof(t_chunk_info) * nc; if (sidx = 0) { goto fail1; @@ -154,7 +154,7 @@ *chunkIdx = cidx; } - GD2_DBG(php_gd_error(gd2 header complete\n)); + GD2_DBG(php_gd_error(gd2 header complete)); return 1; @@ -167,7 +167,7 @@
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/gd/libgd gd_arc_f_buggy.c gd_gd2.c gd_gif_in.c gd_io.c gd_jpeg.c gd_png.c gd_ss.c gd_wbmp.c gdxpm.c xbm.c
sniper Thu Aug 18 08:54:44 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/gd/libgd gd_arc_f_buggy.c gd_gd2.c gd_gif_in.c gd_io.c gd_jpeg.c gd_png.c gd_ss.c gd_wbmp.c gdxpm.c xbm.c Log: MFH http://cvs.php.net/diff.php/php-src/ext/gd/libgd/gd_arc_f_buggy.c?r1=1.3r2=1.3.4.1ty=u Index: php-src/ext/gd/libgd/gd_arc_f_buggy.c diff -u php-src/ext/gd/libgd/gd_arc_f_buggy.c:1.3 php-src/ext/gd/libgd/gd_arc_f_buggy.c:1.3.4.1 --- php-src/ext/gd/libgd/gd_arc_f_buggy.c:1.3 Sun Dec 28 15:11:08 2003 +++ php-src/ext/gd/libgd/gd_arc_f_buggy.c Thu Aug 18 08:54:43 2005 @@ -726,12 +726,12 @@ out = fopen (test/arctest.png, wb); if (!out) { - php_gd_error(Can't create test/arctest.png\n); + php_gd_error(Can't create test/arctest.png); exit (1); } gdImagePng (im, out); fclose (out); - php_gd_error(Test image written to test/arctest.png\n); + php_gd_error(Test image written to test/arctest.png); /* Destroy it */ gdImageDestroy (im); http://cvs.php.net/diff.php/php-src/ext/gd/libgd/gd_gd2.c?r1=1.16r2=1.16.4.1ty=u Index: php-src/ext/gd/libgd/gd_gd2.c diff -u php-src/ext/gd/libgd/gd_gd2.c:1.16 php-src/ext/gd/libgd/gd_gd2.c:1.16.4.1 --- php-src/ext/gd/libgd/gd_gd2.c:1.16 Mon Mar 29 13:20:33 2004 +++ php-src/ext/gd/libgd/gd_gd2.c Thu Aug 18 08:54:43 2005 @@ -60,7 +60,7 @@ int sidx; int nc; - GD2_DBG(php_gd_error(Reading gd2 header info\n)); + GD2_DBG(php_gd_error(Reading gd2 header info)); for (i = 0; i 4; i++) { ch = gdGetC(in); @@ -71,11 +71,11 @@ } id[4] = 0; - GD2_DBG(php_gd_error(Got file code: %s\n, id)); + GD2_DBG(php_gd_error(Got file code: %s, id)); /* Equiv. of 'magick'. */ if (strcmp(id, GD2_ID) != 0) { - GD2_DBG(php_gd_error(Not a valid gd2 file\n)); + GD2_DBG(php_gd_error(Not a valid gd2 file)); goto fail1; } @@ -83,32 +83,32 @@ if (gdGetWord(vers, in) != 1) { goto fail1; } - GD2_DBG(php_gd_error(Version: %d\n, *vers)); + GD2_DBG(php_gd_error(Version: %d, *vers)); if ((*vers != 1) (*vers != 2)) { - GD2_DBG(php_gd_error(Bad version: %d\n, *vers)); + GD2_DBG(php_gd_error(Bad version: %d, *vers)); goto fail1; } /* Image Size */ if (!gdGetWord(sx, in)) { - GD2_DBG(php_gd_error(Could not get x-size\n)); + GD2_DBG(php_gd_error(Could not get x-size)); goto fail1; } if (!gdGetWord(sy, in)) { - GD2_DBG(php_gd_error(Could not get y-size\n)); + GD2_DBG(php_gd_error(Could not get y-size)); goto fail1; } - GD2_DBG(php_gd_error(Image is %dx%d\n, *sx, *sy)); + GD2_DBG(php_gd_error(Image is %dx%d, *sx, *sy)); /* Chunk Size (pixels, not bytes!) */ if (gdGetWord(cs, in) != 1) { goto fail1; } - GD2_DBG(php_gd_error(ChunkSize: %d\n, *cs)); + GD2_DBG(php_gd_error(ChunkSize: %d, *cs)); if ((*cs GD2_CHUNKSIZE_MIN) || (*cs GD2_CHUNKSIZE_MAX)) { - GD2_DBG(php_gd_error(Bad chunk size: %d\n, *cs)); + GD2_DBG(php_gd_error(Bad chunk size: %d, *cs)); goto fail1; } @@ -116,10 +116,10 @@ if (gdGetWord(fmt, in) != 1) { goto fail1; } - GD2_DBG(php_gd_error(Format: %d\n, *fmt)); + GD2_DBG(php_gd_error(Format: %d, *fmt)); if ((*fmt != GD2_FMT_RAW) (*fmt != GD2_FMT_COMPRESSED) (*fmt != GD2_FMT_TRUECOLOR_RAW) (*fmt != GD2_FMT_TRUECOLOR_COMPRESSED)) { - GD2_DBG(php_gd_error(Bad data format: %d\n, *fmt)); + GD2_DBG(php_gd_error(Bad data format: %d, *fmt)); goto fail1; } @@ -127,17 +127,17 @@ if (gdGetWord(ncx, in) != 1) { goto fail1; } - GD2_DBG(php_gd_error(%d Chunks Wide\n, *ncx)); + GD2_DBG(php_gd_error(%d Chunks Wide, *ncx)); /* # of chunks high */ if (gdGetWord(ncy, in) != 1) { goto fail1; } - GD2_DBG(php_gd_error(%d Chunks vertically\n, *ncy)); + GD2_DBG(php_gd_error(%d Chunks vertically, *ncy)); if (gd2_compressed(*fmt)) { nc = (*ncx) * (*ncy); - GD2_DBG(php_gd_error(Reading %d chunk index entries\n, nc)); + GD2_DBG(php_gd_error(Reading %d chunk index entries, nc)); sidx = sizeof(t_chunk_info) * nc; if (sidx = 0) { goto fail1; @@ -154,7 +154,7 @@ *chunkIdx = cidx; } - GD2_DBG(php_gd_error(gd2 header complete\n)); + GD2_DBG(php_gd_error(gd2 header complete)); return 1; @@ -167,7 +167,7 @@
[PHP-CVS] cvs: php-src /ext/oci8 oci8.c /ext/openssl openssl.c /ext/oracle oracle.c /ext/pcre php_pcre.c /ext/session mod_files.c /ext/simplexml simplexml.c /ext/snmp winsnmp.c /ext/standard as
sniper Thu Aug 18 09:34:09 2005 EDT Modified files: /php-src/ext/oci8 oci8.c /php-src/ext/opensslopenssl.c /php-src/ext/oracle oracle.c /php-src/ext/pcre php_pcre.c /php-src/ext/sessionmod_files.c /php-src/ext/simplexml simplexml.c /php-src/ext/snmp winsnmp.c /php-src/ext/standard assert.c php_fopen_wrapper.c /php-src/ext/sybase_ct php_sybase_ct.c Log: Nuked EOLs from error messages http://cvs.php.net/diff.php/php-src/ext/oci8/oci8.c?r1=1.269r2=1.270ty=u Index: php-src/ext/oci8/oci8.c diff -u php-src/ext/oci8/oci8.c:1.269 php-src/ext/oci8/oci8.c:1.270 --- php-src/ext/oci8/oci8.c:1.269 Wed Aug 3 10:07:32 2005 +++ php-src/ext/oci8/oci8.c Thu Aug 18 09:33:54 2005 @@ -22,7 +22,7 @@ +--+ */ -/* $Id: oci8.c,v 1.269 2005/08/03 14:07:32 sniper Exp $ */ +/* $Id: oci8.c,v 1.270 2005/08/18 13:33:54 sniper Exp $ */ /* TODO list: * @@ -126,7 +126,7 @@ #define CALL_OCI(call) \ { \ if (OCI(in_call)) { \ - php_error_docref(NULL TSRMLS_CC, E_WARNING, OCI8 Recursive call!\n); \ + php_error_docref(NULL TSRMLS_CC, E_WARNING, OCI8 Recursive call!); \ exit(-1); \ } else { \ OCI(in_call)=1; \ @@ -139,7 +139,7 @@ { \ if (OCI(in_call)) { \ retcode=-1; \ - php_error_docref(NULL TSRMLS_CC, E_WARNING, OCI8 Recursive call!\n); \ + php_error_docref(NULL TSRMLS_CC, E_WARNING, OCI8 Recursive call!); \ exit(-1); \ } else { \ OCI(in_call)=1; \ @@ -786,7 +786,7 @@ php_info_print_table_start(); php_info_print_table_row(2, OCI8 Support, enabled); - php_info_print_table_row(2, Revision, $Revision: 1.269 $); + php_info_print_table_row(2, Revision, $Revision: 1.270 $); sprintf(buf, %ld, num_persistent); php_info_print_table_row(2, Active Persistent Links, buf); http://cvs.php.net/diff.php/php-src/ext/openssl/openssl.c?r1=1.98r2=1.99ty=u Index: php-src/ext/openssl/openssl.c diff -u php-src/ext/openssl/openssl.c:1.98 php-src/ext/openssl/openssl.c:1.99 --- php-src/ext/openssl/openssl.c:1.98 Wed Aug 3 10:07:35 2005 +++ php-src/ext/openssl/openssl.c Thu Aug 18 09:33:58 2005 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: openssl.c,v 1.98 2005/08/03 14:07:35 sniper Exp $ */ +/* $Id: openssl.c,v 1.99 2005/08/18 13:33:58 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -3274,7 +3274,7 @@ if (cafile || capath) { if (!SSL_CTX_load_verify_locations(ctx, cafile, capath)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to set verify locations `%s' `%s'\n, cafile, capath); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to set verify locations `%s' `%s', cafile, capath); return NULL; } } http://cvs.php.net/diff.php/php-src/ext/oracle/oracle.c?r1=1.95r2=1.96ty=u Index: php-src/ext/oracle/oracle.c diff -u php-src/ext/oracle/oracle.c:1.95 php-src/ext/oracle/oracle.c:1.96 --- php-src/ext/oracle/oracle.c:1.95Wed Aug 3 10:07:36 2005 +++ php-src/ext/oracle/oracle.c Thu Aug 18 09:33:59 2005 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: oracle.c,v 1.95 2005/08/03 14:07:36 sniper Exp $ */ +/* $Id: oracle.c,v 1.96 2005/08/18 13:33:59 sniper Exp $ */ /* comment out the next line if you're on Oracle 7.x and don't have the olog call. */ @@ -565,7 +565,7 @@ #endif ) { ORA(db_err_conn) = *db_conn; - php_error_docref(NULL TSRMLS_CC, E_WARNING, Oracle: Connection Failed: %s\n,ora_error(db_conn-lda)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Oracle: Connection Failed: %s,ora_error(db_conn-lda)); efree(hashed_details); efree(db_conn); RETURN_FALSE; http://cvs.php.net/diff.php/php-src/ext/pcre/php_pcre.c?r1=1.168r2=1.169ty=u Index: php-src/ext/pcre/php_pcre.c diff -u php-src/ext/pcre/php_pcre.c:1.168 php-src/ext/pcre/php_pcre.c:1.169 --- php-src/ext/pcre/php_pcre.c:1.168 Wed Aug 3 10:07:37 2005 +++ php-src/ext/pcre/php_pcre.c Thu Aug 18 09:34:00 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_pcre.c,v 1.168 2005/08/03 14:07:37 sniper Exp $ */ +/* $Id: php_pcre.c,v 1.169 2005/08/18 13:34:00 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -792,7 +792,7 @@ /* Run the code */ if (zend_eval_string(code.c, retval, compiled_string_description
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/oci8 oci8.c /ext/openssl openssl.c /ext/oracle oracle.c /ext/pcre php_pcre.c /ext/session mod_files.c /ext/simplexml simplexml.c /ext/snmp winsnmp.c /ext/st
sniper Thu Aug 18 09:34:45 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/oci8 oci8.c /php-src/ext/opensslopenssl.c /php-src/ext/oracle oracle.c /php-src/ext/pcre php_pcre.c /php-src/ext/sessionmod_files.c /php-src/ext/simplexml simplexml.c /php-src/ext/snmp winsnmp.c /php-src/ext/standard assert.c php_fopen_wrapper.c /php-src/ext/sybase_ct php_sybase_ct.c Log: MFH: Nuked EOLs from error messages http://cvs.php.net/diff.php/php-src/ext/oci8/oci8.c?r1=1.269r2=1.269.2.1ty=u Index: php-src/ext/oci8/oci8.c diff -u php-src/ext/oci8/oci8.c:1.269 php-src/ext/oci8/oci8.c:1.269.2.1 --- php-src/ext/oci8/oci8.c:1.269 Wed Aug 3 10:07:32 2005 +++ php-src/ext/oci8/oci8.c Thu Aug 18 09:34:36 2005 @@ -22,7 +22,7 @@ +--+ */ -/* $Id: oci8.c,v 1.269 2005/08/03 14:07:32 sniper Exp $ */ +/* $Id: oci8.c,v 1.269.2.1 2005/08/18 13:34:36 sniper Exp $ */ /* TODO list: * @@ -126,7 +126,7 @@ #define CALL_OCI(call) \ { \ if (OCI(in_call)) { \ - php_error_docref(NULL TSRMLS_CC, E_WARNING, OCI8 Recursive call!\n); \ + php_error_docref(NULL TSRMLS_CC, E_WARNING, OCI8 Recursive call!); \ exit(-1); \ } else { \ OCI(in_call)=1; \ @@ -139,7 +139,7 @@ { \ if (OCI(in_call)) { \ retcode=-1; \ - php_error_docref(NULL TSRMLS_CC, E_WARNING, OCI8 Recursive call!\n); \ + php_error_docref(NULL TSRMLS_CC, E_WARNING, OCI8 Recursive call!); \ exit(-1); \ } else { \ OCI(in_call)=1; \ @@ -786,7 +786,7 @@ php_info_print_table_start(); php_info_print_table_row(2, OCI8 Support, enabled); - php_info_print_table_row(2, Revision, $Revision: 1.269 $); + php_info_print_table_row(2, Revision, $Revision: 1.269.2.1 $); sprintf(buf, %ld, num_persistent); php_info_print_table_row(2, Active Persistent Links, buf); http://cvs.php.net/diff.php/php-src/ext/openssl/openssl.c?r1=1.98r2=1.98.2.1ty=u Index: php-src/ext/openssl/openssl.c diff -u php-src/ext/openssl/openssl.c:1.98 php-src/ext/openssl/openssl.c:1.98.2.1 --- php-src/ext/openssl/openssl.c:1.98 Wed Aug 3 10:07:35 2005 +++ php-src/ext/openssl/openssl.c Thu Aug 18 09:34:37 2005 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: openssl.c,v 1.98 2005/08/03 14:07:35 sniper Exp $ */ +/* $Id: openssl.c,v 1.98.2.1 2005/08/18 13:34:37 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -3274,7 +3274,7 @@ if (cafile || capath) { if (!SSL_CTX_load_verify_locations(ctx, cafile, capath)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to set verify locations `%s' `%s'\n, cafile, capath); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to set verify locations `%s' `%s', cafile, capath); return NULL; } } http://cvs.php.net/diff.php/php-src/ext/oracle/oracle.c?r1=1.95r2=1.95.2.1ty=u Index: php-src/ext/oracle/oracle.c diff -u php-src/ext/oracle/oracle.c:1.95 php-src/ext/oracle/oracle.c:1.95.2.1 --- php-src/ext/oracle/oracle.c:1.95Wed Aug 3 10:07:36 2005 +++ php-src/ext/oracle/oracle.c Thu Aug 18 09:34:37 2005 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: oracle.c,v 1.95 2005/08/03 14:07:36 sniper Exp $ */ +/* $Id: oracle.c,v 1.95.2.1 2005/08/18 13:34:37 sniper Exp $ */ /* comment out the next line if you're on Oracle 7.x and don't have the olog call. */ @@ -565,7 +565,7 @@ #endif ) { ORA(db_err_conn) = *db_conn; - php_error_docref(NULL TSRMLS_CC, E_WARNING, Oracle: Connection Failed: %s\n,ora_error(db_conn-lda)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Oracle: Connection Failed: %s,ora_error(db_conn-lda)); efree(hashed_details); efree(db_conn); RETURN_FALSE; http://cvs.php.net/diff.php/php-src/ext/pcre/php_pcre.c?r1=1.168r2=1.168.2.1ty=u Index: php-src/ext/pcre/php_pcre.c diff -u php-src/ext/pcre/php_pcre.c:1.168 php-src/ext/pcre/php_pcre.c:1.168.2.1 --- php-src/ext/pcre/php_pcre.c:1.168 Wed Aug 3 10:07:37 2005 +++ php-src/ext/pcre/php_pcre.c Thu Aug 18 09:34:39 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_pcre.c,v 1.168 2005/08/03 14:07:37 sniper Exp $ */ +/* $Id: php_pcre.c,v 1.168.2.1 2005/08/18 13:34:39 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -792,7 +792,7 @@ /* Run the code */
[PHP-CVS] Not getting mails from list
Hello Last week, I requested subcription to the foll lists via http://www.php.net/mailing-lists.php php-internals, php-i18n, php-announce, zend-engine-cvs I'm not receiving any mails from these lists. I've already sent the confirmation replies, twice. Do I have to do anything else ? I know this is not the right list to raise this, but I didn't know of any other ID to ping. Thanks Rolland -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-CVS] cvs: php-src /ext/standard string.c
--- Dmitry Stogov [EMAIL PROTECTED] wrote: Hi Roland, Please be more carefull with your patches. Compile PHP with --enable-debug and run make test and make utest before and after patch to see that you don't break something. Now I fixed all (I hope) implode() bugs that you introduced. Dmitry. Thanks a lot for the tips, that really helped. One Q: when/how is the memory alloc'ed by a SEPARATE_ZVAL() free'd ? Should I be calling any funcn to do this ? -- Rolland -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/standard array.c /ext/standard/tests/array range.phpt
Ok, I'll fix. -Andrei On Aug 17, 2005, at 2:43 PM, Andrei Zmievski wrote: I think we can provide better Unicode support in range() if we follow a simple rule that the low and high parameters are interpreted as codepoints at the end of the range. It would be nice to be able to do range('\u0200', '\u0500') and get the string of all the chars inbetween. -Andrei On Aug 17, 2005, at 8:12 AM, Dmitry Stogov wrote: dmitryWed Aug 17 11:12:03 2005 EDT Modified files: /php-src/ext/standardarray.c /php-src/ext/standard/tests/arrayrange.phpt Log: Unicode support for range() dmitry-20050817111203.txt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /scripts php-config.in
wez Thu Aug 18 16:17:53 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/scriptsphp-config.in Log: Add ext to the include path. http://cvs.php.net/diff.php/php-src/scripts/php-config.in?r1=1.3r2=1.3.2.1ty=u Index: php-src/scripts/php-config.in diff -u php-src/scripts/php-config.in:1.3 php-src/scripts/php-config.in:1.3.2.1 --- php-src/scripts/php-config.in:1.3 Mon Aug 8 12:06:49 2005 +++ php-src/scripts/php-config.in Thu Aug 18 16:17:50 2005 @@ -4,7 +4,7 @@ exec_prefix=@exec_prefix@ version=@PHP_VERSION@ includedir=@includedir@/php -includes=-I$includedir -I$includedir/main -I$includedir/TSRM -I$includedir/Zend +includes=-I$includedir -I$includedir/main -I$includedir/TSRM -I$includedir/Zend -I$includedir/ext ldflags=@PHP_LDFLAGS@ libs=@EXTRA_LIBS@ extension_dir='@EXTENSION_DIR@' -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /scripts php-config.in
wez Thu Aug 18 16:18:25 2005 EDT Modified files: /php-src/scriptsphp-config.in Log: mf 5.1 http://cvs.php.net/diff.php/php-src/scripts/php-config.in?r1=1.3r2=1.4ty=u Index: php-src/scripts/php-config.in diff -u php-src/scripts/php-config.in:1.3 php-src/scripts/php-config.in:1.4 --- php-src/scripts/php-config.in:1.3 Mon Aug 8 12:06:49 2005 +++ php-src/scripts/php-config.in Thu Aug 18 16:18:25 2005 @@ -4,7 +4,7 @@ exec_prefix=@exec_prefix@ version=@PHP_VERSION@ includedir=@includedir@/php -includes=-I$includedir -I$includedir/main -I$includedir/TSRM -I$includedir/Zend +includes=-I$includedir -I$includedir/main -I$includedir/TSRM -I$includedir/Zend -I$includedir/ext ldflags=@PHP_LDFLAGS@ libs=@EXTRA_LIBS@ extension_dir='@EXTENSION_DIR@' -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /pear/PEAR Remote.php
pajoye Thu Aug 18 17:29:31 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/pear/PEAR Remote.php Log: - fix bad revert and make the xmlrpc ext detections fallback forgot that 5.1 still has pear in its branche http://cvs.php.net/diff.php/php-src/pear/PEAR/Remote.php?r1=1.50.4.2r2=1.50.4.3ty=u Index: php-src/pear/PEAR/Remote.php diff -u php-src/pear/PEAR/Remote.php:1.50.4.2 php-src/pear/PEAR/Remote.php:1.50.4.3 --- php-src/pear/PEAR/Remote.php:1.50.4.2 Wed Aug 17 17:30:45 2005 +++ php-src/pear/PEAR/Remote.phpThu Aug 18 17:29:28 2005 @@ -16,7 +16,7 @@ // | Author: Stig Bakken [EMAIL PROTECTED] | // +--+ // -// $Id: Remote.php,v 1.50.4.2 2005/08/17 21:30:45 cellog Exp $ +// $Id: Remote.php,v 1.50.4.3 2005/08/18 21:29:28 pajoye Exp $ require_once 'PEAR.php'; require_once 'PEAR/Config.php'; @@ -115,9 +115,10 @@ $this-saveCache($_args, $result); }; return $result; +} else { +return $this-raiseError(For this remote PEAR operation you need to load the xmlrpc extension or install XML_RPC); } -if ([EMAIL PROTECTED](XML/RPC.php)) { -return $this-raiseError(For this remote PEAR operation you need to install the XML_RPC package); + array_shift($args); $server_host = $this-config-get('master_server'); $username = $this-config-get('username'); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_4) /win32 php4dllts.dsp
edink Thu Aug 18 17:51:07 2005 EDT Modified files: (Branch: PHP_4_4) /php-src/win32 php4dllts.dsp Log: Sync with PCRE lib upgrade http://cvs.php.net/diff.php/php-src/win32/php4dllts.dsp?r1=1.87.2.9.2.1r2=1.87.2.9.2.2ty=u Index: php-src/win32/php4dllts.dsp diff -u php-src/win32/php4dllts.dsp:1.87.2.9.2.1 php-src/win32/php4dllts.dsp:1.87.2.9.2.2 --- php-src/win32/php4dllts.dsp:1.87.2.9.2.1Mon Jun 6 05:38:53 2005 +++ php-src/win32/php4dllts.dsp Thu Aug 18 17:51:02 2005 @@ -405,132 +405,389 @@ # PROP Default_Filter .c # Begin Source File -SOURCE=..\ext\pcre\pcrelib\chartables.c +SOURCE=..\ext\pcre\pcrelib\pcre_chartables.c !IF $(CFG) == php4dllts - Win32 Debug_TS -# ADD CPP /D STATIC /D SUPPORT_UTF8 /D SUPPORT_UCP /D LINK_SIZE=2 /D POSIX_MALLOC_THRESHOLD=10 /D MATCH_LIMIT=1000 +!ELSEIF $(CFG) == php4dllts - Win32 Release_TS + +# ADD CPP /D NEWLINE=10 /D SUPPORT_UTF8 /D SUPPORT_UCP /D LINK_SIZE=2 /D POSIX_MALLOC_THRESHOLD=10 /D MATCH_LIMIT=1000 /D EXPORT= + +!ELSEIF $(CFG) == php4dllts - Win32 Release_TS_inline + +# ADD CPP /D NEWLINE=10 /D SUPPORT_UTF8 /D SUPPORT_UCP /D LINK_SIZE=2 /D POSIX_MALLOC_THRESHOLD=10 /D MATCH_LIMIT=1000 /D EXPORT= + +!ELSEIF $(CFG) == php4dllts - Win32 Release_TSDbg + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\ext\pcre\pcrelib\pcre_compile.c + +!IF $(CFG) == php4dllts - Win32 Debug_TS !ELSEIF $(CFG) == php4dllts - Win32 Release_TS -# ADD CPP /D STATIC /D SUPPORT_UTF8 /D SUPPORT_UCP /D LINK_SIZE=2 /D POSIX_MALLOC_THRESHOLD=10 /D MATCH_LIMIT=1000 +# ADD CPP /D NEWLINE=10 /D SUPPORT_UTF8 /D SUPPORT_UCP /D LINK_SIZE=2 /D POSIX_MALLOC_THRESHOLD=10 /D MATCH_LIMIT=1000 /D EXPORT= !ELSEIF $(CFG) == php4dllts - Win32 Release_TS_inline -# ADD CPP /D STATIC /D SUPPORT_UTF8 /D SUPPORT_UCP /D LINK_SIZE=2 /D POSIX_MALLOC_THRESHOLD=10 /D MATCH_LIMIT=1000 +# ADD CPP /D NEWLINE=10 /D SUPPORT_UTF8 /D SUPPORT_UCP /D LINK_SIZE=2 /D POSIX_MALLOC_THRESHOLD=10 /D MATCH_LIMIT=1000 /D EXPORT= !ELSEIF $(CFG) == php4dllts - Win32 Release_TSDbg -# ADD CPP /D STATIC /D SUPPORT_UTF8 +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\ext\pcre\pcrelib\pcre_config.c + +!IF $(CFG) == php4dllts - Win32 Debug_TS + +!ELSEIF $(CFG) == php4dllts - Win32 Release_TS + +# ADD CPP /D NEWLINE=10 /D SUPPORT_UTF8 /D SUPPORT_UCP /D LINK_SIZE=2 /D POSIX_MALLOC_THRESHOLD=10 /D MATCH_LIMIT=1000 /D EXPORT= + +!ELSEIF $(CFG) == php4dllts - Win32 Release_TS_inline + +# ADD CPP /D NEWLINE=10 /D SUPPORT_UTF8 /D SUPPORT_UCP /D LINK_SIZE=2 /D POSIX_MALLOC_THRESHOLD=10 /D MATCH_LIMIT=1000 /D EXPORT= + +!ELSEIF $(CFG) == php4dllts - Win32 Release_TSDbg !ENDIF # End Source File # Begin Source File -SOURCE=..\ext\pcre\pcrelib\get.c +SOURCE=..\ext\pcre\pcrelib\pcre_dfa_exec.c !IF $(CFG) == php4dllts - Win32 Debug_TS -# ADD CPP /D LINK_SIZE=2 /D STATIC /D SUPPORT_UTF8 /D SUPPORT_UCP /D POSIX_MALLOC_THRESHOLD=10 /D MATCH_LIMIT=1000 +!ELSEIF $(CFG) == php4dllts - Win32 Release_TS + +# ADD CPP /D NEWLINE=10 /D SUPPORT_UTF8 /D SUPPORT_UCP /D LINK_SIZE=2 /D POSIX_MALLOC_THRESHOLD=10 /D MATCH_LIMIT=1000 /D EXPORT= + +!ELSEIF $(CFG) == php4dllts - Win32 Release_TS_inline + +# ADD CPP /D NEWLINE=10 /D SUPPORT_UTF8 /D SUPPORT_UCP /D LINK_SIZE=2 /D POSIX_MALLOC_THRESHOLD=10 /D MATCH_LIMIT=1000 /D EXPORT= + +!ELSEIF $(CFG) == php4dllts - Win32 Release_TSDbg + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\ext\pcre\pcrelib\pcre_exec.c + +!IF $(CFG) == php4dllts - Win32 Debug_TS !ELSEIF $(CFG) == php4dllts - Win32 Release_TS -# ADD CPP /D LINK_SIZE=2 /D STATIC /D SUPPORT_UTF8 /D SUPPORT_UCP /D POSIX_MALLOC_THRESHOLD=10 /D MATCH_LIMIT=1000 +# ADD CPP /D NEWLINE=10 /D SUPPORT_UTF8 /D SUPPORT_UCP /D LINK_SIZE=2 /D POSIX_MALLOC_THRESHOLD=10 /D MATCH_LIMIT=1000 /D EXPORT= !ELSEIF $(CFG) == php4dllts - Win32 Release_TS_inline -# ADD CPP /D STATIC /D SUPPORT_UTF8 /D SUPPORT_UCP /D LINK_SIZE=2 /D POSIX_MALLOC_THRESHOLD=10 /D MATCH_LIMIT=1000 +# ADD CPP /D NEWLINE=10 /D SUPPORT_UTF8 /D SUPPORT_UCP /D LINK_SIZE=2 /D POSIX_MALLOC_THRESHOLD=10 /D MATCH_LIMIT=1000 /D EXPORT= !ELSEIF $(CFG) == php4dllts - Win32 Release_TSDbg -# ADD CPP /D STATIC /D SUPPORT_UTF8 /D LINK_SIZE=2 +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\ext\pcre\pcrelib\pcre_fullinfo.c + +!IF $(CFG) == php4dllts - Win32 Debug_TS + +!ELSEIF $(CFG) == php4dllts - Win32 Release_TS + +# ADD CPP /D NEWLINE=10 /D SUPPORT_UTF8 /D SUPPORT_UCP /D LINK_SIZE=2 /D POSIX_MALLOC_THRESHOLD=10 /D MATCH_LIMIT=1000 /D EXPORT= + +!ELSEIF $(CFG) == php4dllts - Win32 Release_TS_inline + +# ADD CPP /D NEWLINE=10 /D SUPPORT_UTF8 /D SUPPORT_UCP /D LINK_SIZE=2 /D POSIX_MALLOC_THRESHOLD=10 /D MATCH_LIMIT=1000 /D EXPORT= + +!ELSEIF $(CFG) == php4dllts - Win32 Release_TSDbg !ENDIF # End Source File # Begin Source File
[PHP-CVS] cvs: php-src /ext/standard array.c
andrei Thu Aug 18 18:51:49 2005 EDT Modified files: /php-src/ext/standard array.c Log: Rework range() to be able to work on binary strings and also on Unicode code points. Binary strings are not interpreted as numeric. http://cvs.php.net/diff.php/php-src/ext/standard/array.c?r1=1.317r2=1.318ty=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.317 php-src/ext/standard/array.c:1.318 --- php-src/ext/standard/array.c:1.317 Thu Aug 18 11:14:07 2005 +++ php-src/ext/standard/array.cThu Aug 18 18:51:46 2005 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: array.c,v 1.317 2005/08/18 15:14:07 dmitry Exp $ */ +/* $Id: array.c,v 1.318 2005/08/18 22:51:46 andrei Exp $ */ #include php.h #include php_ini.h @@ -1701,22 +1701,6 @@ } /* }}} */ -static void u_add_next_index_stringl(zval *arg, char *str, uint length, int duplicate TSRMLS_DC) -{ - if (UG(unicode)) { - UErrorCode status = U_ZERO_ERROR; - UChar *u_str; - int32_t u_len; - - zend_convert_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), u_str, u_len, str, length, status); - add_next_index_unicodel(arg, u_str, u_len, 0); - if (!duplicate) { - efree(str); - } - } else { - add_next_index_stringl(arg, str, length, duplicate); - } -} /* {{{ proto array range(mixed low, mixed high[, int step]) Create an array containing the range of integers or characters from low to high (inclusive) */ @@ -1725,6 +1709,7 @@ zval *zlow, *zhigh, *zstep = NULL; int err = 0, is_step_double = 0; double step = 1.0; + zend_uchar str_type; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, z/z/|z/, zlow, zhigh, zstep) == FAILURE) { RETURN_FALSE; @@ -1746,35 +1731,37 @@ } } + /* Unify types */ + str_type = zend_get_unified_string_type(2, Z_TYPE_P(zlow), Z_TYPE_P(zhigh)); + if (str_type == (zend_uchar)-1) { + zend_error(E_WARNING, Cannot mix binary and Unicode parameters); + return; + } + convert_to_explicit_type(zlow, str_type); + convert_to_explicit_type(zhigh, str_type); + /* Initialize the return_value as an array. */ array_init(return_value); - if (Z_TYPE_P(zlow) == IS_UNICODE) { - convert_to_string(zlow); - } - - if (Z_TYPE_P(zhigh) == IS_UNICODE) { - convert_to_string(zhigh); - } - /* If the range is given as strings, generate an array of characters. */ - if (Z_TYPE_P(zlow) == IS_STRING - Z_TYPE_P(zhigh) == IS_STRING - Z_STRLEN_P(zlow) = 1 - Z_STRLEN_P(zhigh) = 1) { - int type1, type2; + if ((Z_TYPE_P(zlow) == IS_STRING || Z_TYPE_P(zlow) == IS_BINARY) + Z_STRLEN_P(zlow) = 1 Z_STRLEN_P(zhigh) = 1) { + zend_uchar type1, type2; unsigned char *low, *high; long lstep = (long) step; - type1 = is_numeric_string(Z_STRVAL_P(zlow), Z_STRLEN_P(zlow), NULL, NULL, 0); - type2 = is_numeric_string(Z_STRVAL_P(zhigh), Z_STRLEN_P(zhigh), NULL, NULL, 0); - - if (type1 == IS_DOUBLE || type2 == IS_DOUBLE || is_step_double) { - goto double_str; - } else if (type1 == IS_LONG || type2 == IS_LONG) { - goto long_str; + if (Z_TYPE_P(zlow) == IS_STRING) { + type1 = is_numeric_string(Z_STRVAL_P(zlow), Z_STRLEN_P(zlow), NULL, NULL, 0); + type2 = is_numeric_string(Z_STRVAL_P(zhigh), Z_STRLEN_P(zhigh), NULL, NULL, 0); + + if (type1 == IS_DOUBLE || type2 == IS_DOUBLE || is_step_double) { + goto double_str; + } else if (type1 == IS_LONG || type2 == IS_LONG) { + goto long_str; + } } + /* safe to use STR versions for binary since they access the same fields */ low = (unsigned char *)Z_STRVAL_P(zlow); high = (unsigned char *)Z_STRVAL_P(zhigh); @@ -1784,7 +1771,11 @@ goto err; } for (; *low = *high; (*low) -= (unsigned int)lstep) { - u_add_next_index_stringl(return_value, low, 1, 1 TSRMLS_CC); + if (Z_TYPE_P(zlow) == IS_STRING) { + add_next_index_stringl(return_value, low, 1, 1 TSRMLS_CC); + } else { +
[PHP-CVS] cvs: php-src /ext/standard string.c
andrei Thu Aug 18 18:37:23 2005 EDT Modified files: /php-src/ext/standard string.c Log: Use u_totitle() instead of u_toupper() in ucwords(). http://cvs.php.net/diff.php/php-src/ext/standard/string.c?r1=1.465r2=1.466ty=u Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.465 php-src/ext/standard/string.c:1.466 --- php-src/ext/standard/string.c:1.465 Thu Aug 18 01:53:46 2005 +++ php-src/ext/standard/string.c Thu Aug 18 18:37:22 2005 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.465 2005/08/18 05:53:46 rolland Exp $ */ +/* $Id: string.c,v 1.466 2005/08/18 22:37:22 andrei Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -2962,7 +2962,7 @@ codepts[0] = u_toupper(codepts[0]); for (i = 1; i len ; i++) { if (u_isWhitespace(codepts[i-1]) == TRUE) { - codepts[i] = u_toupper(codepts[i]); + codepts[i] = u_totitle(codepts[i]); } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php