Re: [PHP-CVS] cvs: php-src /ext/standard string.c
"Sara Golemon" <[EMAIL PROTECTED]> wrote: > - result = *subject_entry; > + MAKE_STD_ZVAL(result); > + SEPARATE_ZVAL(subject_entry); > + *result = **subject_entry; > + zval_copy_ctor(result); Couldn't this be more simpler with a single SEPARATE_ZVAL()? like result = *subject_entry; SEPARATE_ZVAL(result); Moriyoshi -- 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 basic_functions.c php_array.h
I will work on the documentation next week and will add a news entry soon. Andrey Jani Taskinen wrote: Still waiting for the documentation for these..and also where are the NEWS entries? --Jani On Tue, 23 Sep 2003, Andrey Hristov wrote: andrey Tue Sep 23 13:37:29 2003 EDT Modified files: /php-src/ext/standard array.c basic_functions.c php_array.h Log: 4 new functions : array_udiff() array_udiff_assoc() array_diff_uassoc() array_udiff_uassoc() They work like array_diff() or array_diff_assoc() but callback function(s) can be used to perform the comparisons. For example array_udiff_uassoc() expects 2 callbacks are last 2 parameters one is used to compare the values of the entries in the arrays the second to compare the keys. Class methods are also valid callbacks. Even when the data that should be used in the comparison is private or protected then a static method of a class should be used (this behaviour can be seen in the regression test - 007.phpt). -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /ext/standard string.c
pollita Fri Sep 26 14:00:01 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/standard string.c /php-srcNEWS Log: MFH BugFix# 25671 subarray corruption in str_replace Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.333.2.34 php-src/ext/standard/string.c:1.333.2.35 --- php-src/ext/standard/string.c:1.333.2.34Sat Sep 20 12:09:41 2003 +++ php-src/ext/standard/string.c Fri Sep 26 13:59:59 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.333.2.34 2003/09/20 16:09:41 sas Exp $ */ +/* $Id: string.c,v 1.333.2.35 2003/09/26 17:59:59 pollita Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -2746,7 +2746,10 @@ SEPARATE_ZVAL(subject_entry); php_str_replace_in_subject(*search, *replace, subject_entry, result); } else { - result = *subject_entry; + MAKE_STD_ZVAL(result); + SEPARATE_ZVAL(subject_entry); + *result = **subject_entry; + zval_copy_ctor(result); } /* Add to return array */ switch (zend_hash_get_current_key_ex(Z_ARRVAL_PP(subject), &string_key, Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.409 php-src/NEWS:1.1247.2.410 --- php-src/NEWS:1.1247.2.409 Wed Sep 24 19:39:22 2003 +++ php-src/NEWSFri Sep 26 14:00:00 2003 @@ -7,6 +7,7 @@ - Fixed crash bug when non-existing save/serializer handler was used. (Jani) - Fixed memory leak in gethostbynamel() if an error occurs. (Sara) - Fixed FastCGI being unable to bind to a specific IP. (Sascha) +- Fixed bug #25671 (str_replace corrupting subarrays). (Sara) - Fixed bug #25648 (xslt_set_encoding() being not detected correctly). (Jani) - Fixed bug #25636 (SNMP Session not closed on success). (Ilia, nesslage[at]mwsc[dot]edu) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard string.c
pollita Fri Sep 26 13:57:13 2003 EDT Modified files: /php-src/ext/standard string.c Log: Bug Fix#25671 Corruption in subarrays in subject when using str_replace Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.397 php-src/ext/standard/string.c:1.398 --- php-src/ext/standard/string.c:1.397 Sat Sep 20 12:10:49 2003 +++ php-src/ext/standard/string.c Fri Sep 26 13:57:13 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.397 2003/09/20 16:10:49 sas Exp $ */ +/* $Id: string.c,v 1.398 2003/09/26 17:57:13 pollita Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -3192,7 +3192,10 @@ SEPARATE_ZVAL(subject_entry); php_str_replace_in_subject(*search, *replace, subject_entry, result, case_sensitivity, (argc > 3) ? &count : NULL); } else { - result = *subject_entry; + MAKE_STD_ZVAL(result); + SEPARATE_ZVAL(subject_entry); + *result = **subject_entry; + zval_copy_ctor(result); } /* Add to return array */ switch (zend_hash_get_current_key_ex(Z_ARRVAL_PP(subject), &string_key, -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mbstring php_mbregex.c
moriyoshi Fri Sep 26 13:47:11 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mbstring php_mbregex.c Log: MFH(r-1.45): repatch fixes for the problem that was reported at [EMAIL PROTECTED] (#884) Index: php-src/ext/mbstring/php_mbregex.c diff -u php-src/ext/mbstring/php_mbregex.c:1.18.2.9 php-src/ext/mbstring/php_mbregex.c:1.18.2.10 --- php-src/ext/mbstring/php_mbregex.c:1.18.2.9 Mon Sep 22 22:54:28 2003 +++ php-src/ext/mbstring/php_mbregex.c Fri Sep 26 13:47:10 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_mbregex.c,v 1.18.2.9 2003/09/23 02:54:28 hirokawa Exp $ */ +/* $Id: php_mbregex.c,v 1.18.2.10 2003/09/26 17:47:10 moriyoshi Exp $ */ #ifdef HAVE_CONFIG_H @@ -507,7 +507,7 @@ } if (err >= 0) { #if moriyoshi_0 - if ( regs.beg[0] == regs.end[0] ) { + if (regs.beg[0] == regs.end[0]) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty regular expression"); break; } @@ -552,16 +552,15 @@ if (pos < n) { pos = n; } else { - _php_mb_regex_strbuf_ncat(&outdev, (const unsigned char *)&string[pos], 1 ); + if (pos < string_len) { + _php_mb_regex_strbuf_ncat(&outdev, (const unsigned char *)&string[pos], 1); + } pos++; } } else { /* nomatch */ /* stick that last bit of string on our output */ - int l = string_len - pos; - if (l > 0) { - _php_mb_regex_strbuf_ncat(&outdev, (const unsigned char *)&string[pos], l); - } else { - outdev.pos += l; + if (pos < string_len) { + _php_mb_regex_strbuf_ncat(&outdev, (const unsigned char *)&string[pos], string_len - pos); } } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mbstring/tests php_gr_jp_dev_884-1.phpt php_gr_jp_dev_884-2.phpt
moriyoshi Fri Sep 26 13:44:07 2003 EDT Added files: /php-src/ext/mbstring/tests php_gr_jp_dev_884-1.phpt php_gr_jp_dev_884-2.phpt Log: Add test cases for the regex probles Index: php-src/ext/mbstring/tests/php_gr_jp_dev_884-1.phpt +++ php-src/ext/mbstring/tests/php_gr_jp_dev_884-1.phpt --TEST-- [EMAIL PROTECTED] #884 (1) --FILE-- --EXPECT-- string(2) "bb" string(2) "bb" string(2) "bb" Index: php-src/ext/mbstring/tests/php_gr_jp_dev_884-2.phpt +++ php-src/ext/mbstring/tests/php_gr_jp_dev_884-2.phpt --TEST-- [EMAIL PROTECTED] #884 (2) --FILE-- --EXPECT-- string(4) "ABZZ" string(4) "ABZZ" string(4) "ABZZ" string(4) "ABZZ" -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mbstring php_mbregex.c
moriyoshi Fri Sep 26 13:43:39 2003 EDT Modified files: /php-src/ext/mbstring php_mbregex.c Log: Repatch fixes for the problem that was reported at [EMAIL PROTECTED] (#884) Index: php-src/ext/mbstring/php_mbregex.c diff -u php-src/ext/mbstring/php_mbregex.c:1.44 php-src/ext/mbstring/php_mbregex.c:1.45 --- php-src/ext/mbstring/php_mbregex.c:1.44 Tue Sep 23 16:11:05 2003 +++ php-src/ext/mbstring/php_mbregex.c Fri Sep 26 13:43:39 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_mbregex.c,v 1.44 2003/09/23 20:11:05 moriyoshi Exp $ */ +/* $Id: php_mbregex.c,v 1.45 2003/09/26 17:43:39 moriyoshi Exp $ */ #ifdef HAVE_CONFIG_H @@ -516,6 +516,7 @@ smart_str *pbuf; int i, err, eval, n; UChar *pos; + UChar *string_lim; char *description = NULL; char pat_buf[2]; @@ -579,9 +580,10 @@ /* do the actual work */ err = 0; pos = string; + string_lim = (UChar*)(string + string_len); regs = php_mb_regex_region_new(); while (err >= 0) { - err = php_mb_regex_search(re, (UChar *)string, (UChar *)(string + string_len), pos, (UChar *)(string + string_len), regs, 0); + err = php_mb_regex_search(re, (UChar *)string, (UChar *)string_lim, pos, (UChar *)string_lim, regs, 0); if (err <= -2) { UChar err_str[REG_MAX_ERROR_MESSAGE_LEN]; php_mb_regex_error_code_to_str(err_str, err); @@ -636,16 +638,15 @@ if ((size_t)(pos - (UChar *)string) < n) { pos = string + n; } else { - smart_str_appendl(&out_buf, pos, 1); + if (pos < string_lim) { + smart_str_appendl(&out_buf, pos, 1); + } pos++; } } else { /* nomatch */ /* stick that last bit of string on our output */ - int l = (UChar *)(string + string_len) - pos; - if (l > 0) { - smart_str_appendl(&out_buf, pos, l); - } else { - out_buf.len += l; + if (string_lim - pos > 0) { + smart_str_appendl(&out_buf, pos, string_lim - pos); } } php_mb_regex_region_free(regs, 0); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mbstring mbstring.h
moriyoshi Fri Sep 26 13:41:52 2003 EDT Modified files: /php-src/ext/mbstring mbstring.h Log: Forgot to commit this one. Index: php-src/ext/mbstring/mbstring.h diff -u php-src/ext/mbstring/mbstring.h:1.59 php-src/ext/mbstring/mbstring.h:1.60 --- php-src/ext/mbstring/mbstring.h:1.59Mon Aug 25 17:54:26 2003 +++ php-src/ext/mbstring/mbstring.h Fri Sep 26 13:41:52 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: mbstring.h,v 1.59 2003/08/25 21:54:26 helly Exp $ */ +/* $Id: mbstring.h,v 1.60 2003/09/26 17:41:52 moriyoshi Exp $ */ /* * PHP4 Multibyte String module "mbstring" (currently only for Japanese) @@ -169,6 +169,8 @@ int detect_order_list_size; enum mbfl_no_encoding *current_detect_order_list; int current_detect_order_list_size; + enum mbfl_no_encoding *default_detect_order_list; + int default_detect_order_list_size; int filter_illegal_mode; int filter_illegal_substchar; int current_filter_illegal_mode; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/domxml php_domxml.h
moriyoshi Fri Sep 26 12:33:59 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/domxml php_domxml.h Log: Fix typo Index: php-src/ext/domxml/php_domxml.h diff -u php-src/ext/domxml/php_domxml.h:1.72.4.4 php-src/ext/domxml/php_domxml.h:1.72.4.5 --- php-src/ext/domxml/php_domxml.h:1.72.4.4Fri Aug 29 16:50:52 2003 +++ php-src/ext/domxml/php_domxml.h Fri Sep 26 12:33:58 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_domxml.h,v 1.72.4.4 2003/08/29 20:50:52 rrichards Exp $ */ +/* $Id: php_domxml.h,v 1.72.4.5 2003/09/26 16:33:58 moriyoshi Exp $ */ #ifndef PHP_DOMXML_H #define PHP_DOMXML_H @@ -246,4 +246,4 @@ #endif /* HAVE_DOMXML */ #define phpext_domxml_ptr domxml_module_ptr -#endif /* _PHP_DIR_H */ +#endif /* _PHP_DOMXML_H */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mbstring/tests mb_convert_encoding.phpt mb_convert_variables.phpt mb_detect_encoding.phpt mb_detect_order.phpt
moriyoshi Fri Sep 26 10:42:37 2003 EDT Modified files: /php-src/ext/mbstring/tests mb_convert_encoding.phpt mb_convert_variables.phpt mb_detect_encoding.phpt mb_detect_order.phpt Log: Explicitly specify mbstring.language. Index: php-src/ext/mbstring/tests/mb_convert_encoding.phpt diff -u php-src/ext/mbstring/tests/mb_convert_encoding.phpt:1.3 php-src/ext/mbstring/tests/mb_convert_encoding.phpt:1.4 --- php-src/ext/mbstring/tests/mb_convert_encoding.phpt:1.3 Sun Nov 3 03:37:59 2002 +++ php-src/ext/mbstring/tests/mb_convert_encoding.phpt Fri Sep 26 10:42:37 2003 @@ -4,6 +4,7 @@ --INI-- output_handler= +mbstring.language=Japanese --FILE-- --INI-- output_handler= +mbstring.language=Japanese --FILE-- +--INI-- +mbstring.language=Japanese --FILE-- +--INI-- +mbstring.language=Japanese --FILE-- http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mbstring mbstring.c
moriyoshi Fri Sep 26 10:42:15 2003 EDT Modified files: /php-src/ext/mbstring mbstring.c Log: Fix some incompatibilities with the pre-libmbfl behaviour regarding encoding detection. Index: php-src/ext/mbstring/mbstring.c diff -u php-src/ext/mbstring/mbstring.c:1.198 php-src/ext/mbstring/mbstring.c:1.199 --- php-src/ext/mbstring/mbstring.c:1.198 Tue Sep 23 09:23:30 2003 +++ php-src/ext/mbstring/mbstring.c Fri Sep 26 10:42:14 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mbstring.c,v 1.198 2003/09/23 13:23:30 moriyoshi Exp $ */ +/* $Id: mbstring.c,v 1.199 2003/09/26 14:42:14 moriyoshi Exp $ */ /* * PHP4 Multibyte String module "mbstring" @@ -84,62 +84,65 @@ static void _php_mb_globals_dtor(zend_mbstring_globals *pglobals TSRMLS_DC); /* }}} */ -/* {{{ php_mb_default_identify_list[] */ -#if defined(HAVE_MBSTR_JA) -static const enum mbfl_no_encoding php_mb_default_identify_list[] = { +/* {{{ php_mb_default_identify_list */ +typedef struct _php_mb_nls_ident_list { + enum mbfl_no_language lang; + enum mbfl_no_encoding* list; + int list_size; +} php_mb_nls_ident_list; + +static const enum mbfl_no_encoding php_mb_default_identify_list_ja[] = { mbfl_no_encoding_ascii, mbfl_no_encoding_jis, mbfl_no_encoding_utf8, mbfl_no_encoding_euc_jp, mbfl_no_encoding_sjis }; -#endif -#if defined(HAVE_MBSTR_CN) && !defined(HAVE_MBSTR_JA) -static const enum mbfl_no_encoding php_mb_default_identify_list[] = { +static const enum mbfl_no_encoding php_mb_default_identify_list_cn[] = { mbfl_no_encoding_ascii, mbfl_no_encoding_utf8, mbfl_no_encoding_euc_cn, mbfl_no_encoding_cp936 }; -#endif -#if defined(HAVE_MBSTR_TW) && !defined(HAVE_MBSTR_CN) && !defined(HAVE_MBSTR_JA) -static const enum mbfl_no_encoding php_mb_default_identify_list[] = { +static const enum mbfl_no_encoding php_mb_default_identify_list_tw_hk[] = { mbfl_no_encoding_ascii, mbfl_no_encoding_utf8, mbfl_no_encoding_euc_tw, mbfl_no_encoding_big5 }; -#endif -#if defined(HAVE_MBSTR_KR) && !defined(HAVE_MBSTR_TW) && !defined(HAVE_MBSTR_CN) && !defined(HAVE_MBSTR_JA) -static const enum mbfl_no_encoding php_mb_default_identify_list[] = { +static const enum mbfl_no_encoding php_mb_default_identify_list_kr[] = { mbfl_no_encoding_ascii, mbfl_no_encoding_utf8, mbfl_no_encoding_euc_kr, mbfl_no_encoding_uhc }; -#endif -#if defined(HAVE_MBSTR_RU) && !defined(HAVE_MBSTR_KR) && !defined(HAVE_MBSTR_TW) && !defined(HAVE_MBSTR_CN) && !defined(HAVE_MBSTR_JA) -static const enum mbfl_no_encoding php_mb_default_identify_list[] = { +static const enum mbfl_no_encoding php_mb_default_identify_list_ru[] = { mbfl_no_encoding_ascii, mbfl_no_encoding_utf8, mbfl_no_encoding_koi8r, mbfl_no_encoding_cp1251, mbfl_no_encoding_cp866 }; -#endif -#if !defined(HAVE_MBSTR_RU) && !defined(HAVE_MBSTR_KR) && !defined(HAVE_MBSTR_TW) && !defined(HAVE_MBSTR_CN) && !defined(HAVE_MBSTR_JA) -static const enum mbfl_no_encoding php_mb_default_identify_list[] = { +static const enum mbfl_no_encoding php_mb_default_identify_list_neut[] = { mbfl_no_encoding_ascii, mbfl_no_encoding_utf8 }; -#endif -static const int php_mb_default_identify_list_size = sizeof(php_mb_default_identify_list)/sizeof(enum mbfl_no_encoding); + +php_mb_nls_ident_list php_mb_default_identify_list[] = { + { mbfl_no_language_japanese, php_mb_default_identify_list_ja, sizeof(php_mb_default_identify_list_ja) / sizeof(php_mb_default_identify_list_ja[0]) }, + { mbfl_no_language_korean, php_mb_default_identify_list_kr, sizeof(php_mb_default_identify_list_kr) / sizeof(php_mb_default_identify_list_kr[0]) }, + { mbfl_no_language_traditional_chinese, php_mb_default_identify_list_tw_hk, sizeof(php_mb_default_identify_list_tw_hk) / sizeof(php_mb_default_identify_list_tw_hk[0]) }, + { mbfl_no_language_simplified_chinese, php_mb_default_identify_list_cn, sizeof(php_mb_default_identify_list_cn) / sizeof(php_mb_default_identify_list_cn[0]) }, + { mbfl_no_language_russian, php_mb_default_identify_list_ru, sizeof(php_mb_default_identify_list_ru) / sizeof(php_mb_default_identify_list_ru[0]) }, + { mbfl_no_language_neutral, php_mb_default_identify_list_neut, sizeof(php_mb_default_identify_list_neut) / sizeof(php_mb_default_identify_list_neut[0]) } +}; + /* }}} */ static @@ -285,11 +288,12 @@ * of parsed encodings. */ static int -php_mb_parse_encoding_list(const char *value, int value_length, int **return_list, int *return_size, int persistent) +php_mb_parse_encoding_list(const char *value, int value_length, enum mbfl_no_encoding **return_list, int *return_size, int persistent TSRMLS_DC) { - int n, l, size, bauto, *src, *list, *entry, ret = 1; +
[PHP-CVS] cvs: php-src /ext/mbstring/tests mb_send_mail01.phpt mb_send_mail05.phpt mb_send_mail06.phpt mb_send_mail07.phpt
moriyoshi Fri Sep 26 07:09:06 2003 EDT Modified files: /php-src/ext/mbstring/tests mb_send_mail01.phpt mb_send_mail05.phpt mb_send_mail06.phpt mb_send_mail07.phpt Log: Specify full path to cat for mb_send_mail() tests Index: php-src/ext/mbstring/tests/mb_send_mail01.phpt diff -u php-src/ext/mbstring/tests/mb_send_mail01.phpt:1.5 php-src/ext/mbstring/tests/mb_send_mail01.phpt:1.6 --- php-src/ext/mbstring/tests/mb_send_mail01.phpt:1.5 Tue Sep 23 22:27:43 2003 +++ php-src/ext/mbstring/tests/mb_send_mail01.phpt Fri Sep 26 07:08:54 2003 @@ -7,7 +7,7 @@ } ?> --INI-- -sendmail_path=/usr/cat +sendmail_path=/bin/cat --FILE-- --INI-- -sendmail_path=cat +sendmail_path=/bin/cat --FILE-- --INI-- -sendmail_path=cat +sendmail_path=/bin/cat --FILE-- --INI-- -sendmail_path=cat +sendmail_path=/bin/cat --FILE-- http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mbstring/tests mb_send_mail01.phpt
moriyoshi Fri Sep 26 07:06:40 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mbstring/tests mb_send_mail01.phpt Log: Fix typo Index: php-src/ext/mbstring/tests/mb_send_mail01.phpt diff -u php-src/ext/mbstring/tests/mb_send_mail01.phpt:1.1.2.4 php-src/ext/mbstring/tests/mb_send_mail01.phpt:1.1.2.5 --- php-src/ext/mbstring/tests/mb_send_mail01.phpt:1.1.2.4 Tue Sep 23 22:29:14 2003 +++ php-src/ext/mbstring/tests/mb_send_mail01.phpt Fri Sep 26 07:06:39 2003 @@ -7,7 +7,7 @@ } ?> --INI-- -sendmail_path=/usr/cat +sendmail_path=/bin/cat --FILE-- http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/yp yp.c
Derick Rethans wrote: Huh? Shouldn't that parameter be INSIDE the function call, and not after it? didn't i fix that half an hour ago? ;) that's what you get when you type on a train and don't disable your touchpad .o0(funny that i still managed to create valid C ;) -- Hartmut Holzgraefe <[EMAIL PROTECTED]> -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/yp yp.c
On Fri, 26 Sep 2003, Hartmut Holzgraefe wrote: > @@ -302,7 +302,7 @@ > add_assoc_stringl_ex((zval *) indata, key, inkeylen+1, > inval, invallen, 1); > efree(key); > } else { > - php_error(E_WARNING, "Can't allocate %d bytes for key > buffer in yp_cat()"); > + php_error(E_WARNING, "Can't allocate %d bytes for key > buffer in yp_cat()"), inkeylen+1; Huh? Shouldn't that parameter be INSIDE the function call, and not after it? Derick -- "Interpreting what the GPL actually means is a job best left to those that read the future by examining animal entrails." - Derick Rethans http://derickrethans.nl/ International PHP Magazine http://php-mag.net/ - -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/yp yp.c
hholzgraFri Sep 26 06:13:31 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/yp yp.c Log: MFH Index: php-src/ext/yp/yp.c diff -u php-src/ext/yp/yp.c:1.31.8.3 php-src/ext/yp/yp.c:1.31.8.4 --- php-src/ext/yp/yp.c:1.31.8.3Fri Feb 28 01:51:16 2003 +++ php-src/ext/yp/yp.c Fri Sep 26 06:13:30 2003 @@ -16,7 +16,7 @@ | Fredrik Ohrn| +--+ */ -/* $Id: yp.c,v 1.31.8.3 2003/02/28 06:51:16 hholzgra Exp $ */ +/* $Id: yp.c,v 1.31.8.4 2003/09/26 10:13:30 hholzgra Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -298,7 +298,7 @@ add_assoc_stringl_ex((zval *) indata, key, inkeylen+1, inval, invallen, 1); efree(key); } else { - php_error(E_WARNING, "Can't allocate %d bytes for key buffer in yp_cat()"); + php_error(E_WARNING, "Can't allocate %d bytes for key buffer in yp_cat()", inkeylen+1); } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/interbase interbase.c php_interbase.h
abies Fri Sep 26 06:06:23 2003 EDT Modified files: /php-src/ext/interbase interbase.c php_interbase.h Log: Let client library pick its own transaction param defaults Index: php-src/ext/interbase/interbase.c diff -u php-src/ext/interbase/interbase.c:1.188 php-src/ext/interbase/interbase.c:1.189 --- php-src/ext/interbase/interbase.c:1.188 Tue Sep 23 19:08:59 2003 +++ php-src/ext/interbase/interbase.c Fri Sep 26 06:06:22 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: interbase.c,v 1.188 2003/09/23 23:08:59 abies Exp $ */ +/* $Id: interbase.c,v 1.189 2003/09/26 10:06:22 abies Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -26,7 +26,7 @@ #include "php.h" -#define FILE_REVISION "$Revision: 1.188 $" +#define FILE_REVISION "$Revision: 1.189 $" #if HAVE_IBASE @@ -2068,7 +2068,7 @@ convert_to_long_ex(args[i]); trans_argl = Z_LVAL_PP(args[i]); - if (trans_argl) { + if (trans_argl != PHP_IBASE_DEFAULT) { last_tpb[tpb_len++] = isc_tpb_version3; /* access mode */ Index: php-src/ext/interbase/php_interbase.h diff -u php-src/ext/interbase/php_interbase.h:1.62 php-src/ext/interbase/php_interbase.h:1.63 --- php-src/ext/interbase/php_interbase.h:1.62 Tue Sep 23 16:58:14 2003 +++ php-src/ext/interbase/php_interbase.h Fri Sep 26 06:06:22 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_interbase.h,v 1.62 2003/09/23 20:58:14 abies Exp $ */ +/* $Id: php_interbase.h,v 1.63 2003/09/26 10:06:22 abies Exp $ */ #ifndef PHP_INTERBASE_H #define PHP_INTERBASE_H @@ -186,17 +186,17 @@ PHP_IBASE_DATE = 2, PHP_IBASE_TIME = 4, /* transaction access mode */ - PHP_IBASE_WRITE = 0, /* default */ - PHP_IBASE_READ = 1, + PHP_IBASE_WRITE = 1, + PHP_IBASE_READ = 2, /* transaction isolation level */ - PHP_IBASE_CONCURRENCY = 0, /* default */ - PHP_IBASE_COMMITTED = 2, - PHP_IBASE_REC_NO_VERSION = 0, /* default */ - PHP_IBASE_REC_VERSION = 4, - PHP_IBASE_CONSISTENCY = 8, + PHP_IBASE_CONCURRENCY = 4, + PHP_IBASE_COMMITTED = 8, + PHP_IBASE_REC_NO_VERSION = 32, + PHP_IBASE_REC_VERSION = 64, + PHP_IBASE_CONSISTENCY = 16, /* transaction lock resolution */ - PHP_IBASE_WAIT = 0, /* default */ - PHP_IBASE_NOWAIT= 16 + PHP_IBASE_WAIT = 128, + PHP_IBASE_NOWAIT= 256 }; #ifdef ZTS -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/yp yp.c
hholzgraFri Sep 26 06:02:04 2003 EDT Modified files: /php-src/ext/yp yp.c Log: stupid typo fix Index: php-src/ext/yp/yp.c diff -u php-src/ext/yp/yp.c:1.40 php-src/ext/yp/yp.c:1.41 --- php-src/ext/yp/yp.c:1.40Fri Sep 26 03:50:01 2003 +++ php-src/ext/yp/yp.c Fri Sep 26 06:02:03 2003 @@ -16,7 +16,7 @@ | Fredrik Ohrn| +--+ */ -/* $Id: yp.c,v 1.40 2003/09/26 07:50:01 hholzgra Exp $ */ +/* $Id: yp.c,v 1.41 2003/09/26 10:02:03 hholzgra Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -302,7 +302,7 @@ add_assoc_stringl_ex((zval *) indata, key, inkeylen+1, inval, invallen, 1); efree(key); } else { - php_error(E_WARNING, "Can't allocate %d bytes for key buffer in yp_cat()"), inkeylen+1; + php_error(E_WARNING, "Can't allocate %d bytes for key buffer in yp_cat()", inkeylen+1); } } -- 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 parsedate.y
MFH! --Jani On Fri, 26 Sep 2003, Hartmut Holzgraefe wrote: >hholzgra Fri Sep 26 03:51:52 2003 EDT > > Modified files: >/php-src/ext/standard parsedate.y > Log: > silenced a compiler warning > > >Index: php-src/ext/standard/parsedate.y >diff -u php-src/ext/standard/parsedate.y:1.41 php-src/ext/standard/parsedate.y:1.42 >--- php-src/ext/standard/parsedate.y:1.41 Tue Aug 19 02:34:46 2003 >+++ php-src/ext/standard/parsedate.y Fri Sep 26 03:51:52 2003 >@@ -8,7 +8,7 @@ > ** This code is in the public domain and has no copyright. > */ > >-/* $Id: parsedate.y,v 1.41 2003/08/19 06:34:46 derick Exp $ */ >+/* $Id: parsedate.y,v 1.42 2003/09/26 07:51:52 hholzgra Exp $ */ > > #include "php.h" > >@@ -840,7 +840,7 @@ > return tID; > } > >-yylex (YYSTYPE *lvalp, void *parm) >+int yylex (YYSTYPE *lvalp, void *parm) > { > register unsigned char c; > register char *p; > > -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/yp yp.c
MFH! --Jani On Fri, 26 Sep 2003, Hartmut Holzgraefe wrote: >hholzgra Fri Sep 26 03:50:02 2003 EDT > > Modified files: >/php-src/ext/ypyp.c > Log: > error message was missing an argument > >Index: php-src/ext/yp/yp.c >diff -u php-src/ext/yp/yp.c:1.39 php-src/ext/yp/yp.c:1.40 >--- php-src/ext/yp/yp.c:1.39 Sat Jul 19 15:23:33 2003 >+++ php-src/ext/yp/yp.cFri Sep 26 03:50:01 2003 >@@ -16,7 +16,7 @@ >| Fredrik Ohrn| >+--+ > */ >-/* $Id: yp.c,v 1.39 2003/07/19 19:23:33 andrey Exp $ */ >+/* $Id: yp.c,v 1.40 2003/09/26 07:50:01 hholzgra Exp $ */ > > #ifdef HAVE_CONFIG_H > #include "config.h" >@@ -302,7 +302,7 @@ > add_assoc_stringl_ex((zval *) indata, key, inkeylen+1, > inval, invallen, 1); > efree(key); > } else { >- php_error(E_WARNING, "Can't allocate %d bytes for key >buffer in yp_cat()"); >+ php_error(E_WARNING, "Can't allocate %d bytes for key >buffer in yp_cat()"), inkeylen+1; > } > } > > > -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/mime_magic mime_magic.c
MFH! --Jani On Fri, 26 Sep 2003, Hartmut Holzgraefe wrote: >hholzgra Fri Sep 26 03:47:01 2003 EDT > > Modified files: >/php-src/ext/mime_magicmime_magic.c > Log: > compiler warning fixes, one of them a potential crash bug > >Index: php-src/ext/mime_magic/mime_magic.c >diff -u php-src/ext/mime_magic/mime_magic.c:1.31 >php-src/ext/mime_magic/mime_magic.c:1.32 >--- php-src/ext/mime_magic/mime_magic.c:1.31 Tue Aug 19 18:13:01 2003 >+++ php-src/ext/mime_magic/mime_magic.cFri Sep 26 03:47:01 2003 >@@ -15,7 +15,7 @@ > | Author: Hartmut Holzgraefe <[EMAIL PROTECTED]> | > +--+ > >- $Id: mime_magic.c,v 1.31 2003/08/19 22:13:01 iliaa Exp $ >+ $Id: mime_magic.c,v 1.32 2003/09/26 07:47:01 hholzgra Exp $ > > This module contains a lot of stuff taken from Apache mod_mime_magic, > so the license section is a little bit longer than usual: >@@ -182,7 +182,7 @@ > > static int apprentice(void); > static int ascmagic(unsigned char *, int); >-static int is_tar(unsigned char *, int); >+static int is_tar(unsigned char *, unsigned int); > static int softmagic(unsigned char *, int); > static void tryit(unsigned char *, int, int); > >@@ -576,7 +576,7 @@ > t = l; > if (*t++ != ')') { > if(MIME_MAGIC_G(debug)) >- php_error_docref("http://www.php.net/mime_magic"; >TSRMLS_CC, E_WARNING, ": (%s:%s) missing ')' in indirect offset", >MIME_MAGIC_G(magicfile), lineno); >+ php_error_docref("http://www.php.net/mime_magic"; >TSRMLS_CC, E_WARNING, ": (%s:%d) missing ')' in indirect offset", >MIME_MAGIC_G(magicfile), lineno); > } > l = t; > } >@@ -1460,7 +1460,7 @@ > * old UNIX tar file, 2 for Unix Std (POSIX) tar file. > */ > >-static int is_tar(unsigned char *buf, int nbytes) >+static int is_tar(unsigned char *buf, unsigned int nbytes) > { > register union record *header = (union record *) buf; > register int i; > > -- https://www.paypal.com/xclick/[EMAIL PROTECTED]&no_note=1&tax=0¤cy_code=EUR -- 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 basic_functions.c php_array.h
Still waiting for the documentation for these..and also where are the NEWS entries? --Jani On Tue, 23 Sep 2003, Andrey Hristov wrote: >andrey Tue Sep 23 13:37:29 2003 EDT > > Modified files: >/php-src/ext/standard array.c basic_functions.c php_array.h > Log: > 4 new functions : > array_udiff() > array_udiff_assoc() > array_diff_uassoc() > array_udiff_uassoc() > They work like array_diff() or array_diff_assoc() but callback function(s) > can be used to perform the comparisons. For example array_udiff_uassoc() > expects 2 callbacks are last 2 parameters one is used to compare the values > of the entries in the arrays the second to compare the keys. > Class methods are also valid callbacks. Even when the data that should be > used in the comparison is private or protected then a static method of a > class should be used (this behaviour can be seen in the regression test - > 007.phpt). > > -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/standard/tests/math bug25665.phpt
sniper Fri Sep 26 05:56:57 2003 EDT Added files: (Branch: PHP_4_3) /php-src/ext/standard/tests/mathbug25665.phpt Log: MFH Index: php-src/ext/standard/tests/math/bug25665.phpt +++ php-src/ext/standard/tests/math/bug25665.phpt --TEST-- Bug #25565 (var_dump () hangs on Nan and INF) --FILE-- --EXPECT-- float(NAN) float(-INF) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/math bug25665.phpt
sniper Fri Sep 26 05:56:25 2003 EDT Modified files: /php-src/ext/standard/tests/mathbug25665.phpt Log: typo Index: php-src/ext/standard/tests/math/bug25665.phpt diff -u php-src/ext/standard/tests/math/bug25665.phpt:1.1 php-src/ext/standard/tests/math/bug25665.phpt:1.2 --- php-src/ext/standard/tests/math/bug25665.phpt:1.1 Fri Sep 26 05:55:56 2003 +++ php-src/ext/standard/tests/math/bug25665.phpt Fri Sep 26 05:56:24 2003 @@ -1,5 +1,5 @@ --TEST-- -Bug #25565 (var_dump () hangs on Nan and INF) +Bug #25665 (var_dump () hangs on Nan and INF) --FILE-- http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/math bug25665.phpt
sniper Fri Sep 26 05:55:57 2003 EDT Added files: /php-src/ext/standard/tests/mathbug25665.phpt Log: Test case for bug #25665 Index: php-src/ext/standard/tests/math/bug25665.phpt +++ php-src/ext/standard/tests/math/bug25665.phpt --TEST-- Bug #25565 (var_dump () hangs on Nan and INF) --FILE-- --EXPECT-- float(NAN) float(-INF) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard parsedate.y
hholzgraFri Sep 26 03:51:52 2003 EDT Modified files: /php-src/ext/standard parsedate.y Log: silenced a compiler warning Index: php-src/ext/standard/parsedate.y diff -u php-src/ext/standard/parsedate.y:1.41 php-src/ext/standard/parsedate.y:1.42 --- php-src/ext/standard/parsedate.y:1.41 Tue Aug 19 02:34:46 2003 +++ php-src/ext/standard/parsedate.yFri Sep 26 03:51:52 2003 @@ -8,7 +8,7 @@ ** This code is in the public domain and has no copyright. */ -/* $Id: parsedate.y,v 1.41 2003/08/19 06:34:46 derick Exp $ */ +/* $Id: parsedate.y,v 1.42 2003/09/26 07:51:52 hholzgra Exp $ */ #include "php.h" @@ -840,7 +840,7 @@ return tID; } -yylex (YYSTYPE *lvalp, void *parm) +int yylex (YYSTYPE *lvalp, void *parm) { register unsigned char c; register char *p; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/yp yp.c
hholzgraFri Sep 26 03:50:02 2003 EDT Modified files: /php-src/ext/yp yp.c Log: error message was missing an argument Index: php-src/ext/yp/yp.c diff -u php-src/ext/yp/yp.c:1.39 php-src/ext/yp/yp.c:1.40 --- php-src/ext/yp/yp.c:1.39Sat Jul 19 15:23:33 2003 +++ php-src/ext/yp/yp.c Fri Sep 26 03:50:01 2003 @@ -16,7 +16,7 @@ | Fredrik Ohrn| +--+ */ -/* $Id: yp.c,v 1.39 2003/07/19 19:23:33 andrey Exp $ */ +/* $Id: yp.c,v 1.40 2003/09/26 07:50:01 hholzgra Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -302,7 +302,7 @@ add_assoc_stringl_ex((zval *) indata, key, inkeylen+1, inval, invallen, 1); efree(key); } else { - php_error(E_WARNING, "Can't allocate %d bytes for key buffer in yp_cat()"); + php_error(E_WARNING, "Can't allocate %d bytes for key buffer in yp_cat()"), inkeylen+1; } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mime_magic mime_magic.c
hholzgraFri Sep 26 03:47:01 2003 EDT Modified files: /php-src/ext/mime_magic mime_magic.c Log: compiler warning fixes, one of them a potential crash bug Index: php-src/ext/mime_magic/mime_magic.c diff -u php-src/ext/mime_magic/mime_magic.c:1.31 php-src/ext/mime_magic/mime_magic.c:1.32 --- php-src/ext/mime_magic/mime_magic.c:1.31Tue Aug 19 18:13:01 2003 +++ php-src/ext/mime_magic/mime_magic.c Fri Sep 26 03:47:01 2003 @@ -15,7 +15,7 @@ | Author: Hartmut Holzgraefe <[EMAIL PROTECTED]> | +--+ - $Id: mime_magic.c,v 1.31 2003/08/19 22:13:01 iliaa Exp $ + $Id: mime_magic.c,v 1.32 2003/09/26 07:47:01 hholzgra Exp $ This module contains a lot of stuff taken from Apache mod_mime_magic, so the license section is a little bit longer than usual: @@ -182,7 +182,7 @@ static int apprentice(void); static int ascmagic(unsigned char *, int); -static int is_tar(unsigned char *, int); +static int is_tar(unsigned char *, unsigned int); static int softmagic(unsigned char *, int); static void tryit(unsigned char *, int, int); @@ -576,7 +576,7 @@ t = l; if (*t++ != ')') { if(MIME_MAGIC_G(debug)) - php_error_docref("http://www.php.net/mime_magic"; TSRMLS_CC, E_WARNING, ": (%s:%s) missing ')' in indirect offset", MIME_MAGIC_G(magicfile), lineno); + php_error_docref("http://www.php.net/mime_magic"; TSRMLS_CC, E_WARNING, ": (%s:%d) missing ')' in indirect offset", MIME_MAGIC_G(magicfile), lineno); } l = t; } @@ -1460,7 +1460,7 @@ * old UNIX tar file, 2 for Unix Std (POSIX) tar file. */ -static int is_tar(unsigned char *buf, int nbytes) +static int is_tar(unsigned char *buf, unsigned int nbytes) { register union record *header = (union record *) buf; register int i; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php