[PHP-CVS] cvs: php4 /ext/iconv/tests translit-failure.phpt
moriyoshi Fri Oct 11 03:38:18 2002 EDT Modified files: /php4/ext/iconv/tests translit-failure.phpt Log: Added set_time_limit(); We should stop it in some time. See the comment in the script for detail. Index: php4/ext/iconv/tests/translit-failure.phpt diff -u php4/ext/iconv/tests/translit-failure.phpt:1.1 php4/ext/iconv/tests/translit-failure.phpt:1.2 --- php4/ext/iconv/tests/translit-failure.phpt:1.1 Thu Oct 10 15:06:00 2002 +++ php4/ext/iconv/tests/translit-failure.phpt Fri Oct 11 03:38:18 2002 -10,6 +10,13 // if at some point internal encoding changes, set correct one // in INI section or use file 'TranslitFail1.ISO-8859-1'. +set_time_limit(5); +/* + * The bug (fixed in libiconv 1.8) was confirmed that iconv goes into a + * infinite loop when ASCII//TRANSLIT is performed. We should stop it in + * some time. + */ + $test = 'Écrit par %s.'; if (!iconv(ISO-8859-1, ASCII//TRANSLIT, $test)) echo 'wrong is right'; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/iconv config.m4 iconv.c
moriyoshi Fri Oct 11 03:50:47 2002 EDT Modified files: /php4/ext/iconv config.m4 iconv.c Log: Added ICONV_IMPL and ICONV_VERSION constants. - Added ICONV_IMPL and ICONV_VERSION constants to iconv extension to indicate which iconv implementation is used. (Moriyoshi) Index: php4/ext/iconv/config.m4 diff -u php4/ext/iconv/config.m4:1.14 php4/ext/iconv/config.m4:1.15 --- php4/ext/iconv/config.m4:1.14 Wed Sep 4 01:17:16 2002 +++ php4/ext/iconv/config.m4Fri Oct 11 03:50:47 2002 -1,5 +1,5 dnl -dnl $Id: config.m4,v 1.14 2002/09/04 05:17:16 yohgaki Exp $ +dnl $Id: config.m4,v 1.15 2002/10/11 07:50:47 moriyoshi Exp $ dnl PHP_ARG_WITH(iconv, for iconv support, -8,8 +8,15 if test $PHP_ICONV != no; then PHP_SETUP_ICONV(ICONV_SHARED_LIBADD, [ - AC_MSG_CHECKING([if iconv supports errno]) - AC_TRY_RUN([ +iconv_avail=yes; + ],[ +iconv_avail=no; + ]) + + if test $iconv_avail != no; then + +AC_MSG_CHECKING([if iconv supports errno]) +AC_TRY_RUN([ #define LIBICONV_PLUG #include iconv.h #include errno.h -39,17 +46,37 ],[ AC_MSG_RESULT(yes) PHP_DEFINE([ICONV_SUPPORTS_ERRNO],1) -AC_DEFINE(ICONV_SUPPORTS_ERRNO,1,[Whether iconv supports error no or not]) +AC_DEFINE([ICONV_SUPPORTS_ERRNO],1,[Whether iconv supports error no or not]) ],[ PHP_DEFINE([ICONV_SUPPORTS_ERRNO],0) -AC_DEFINE(ICONV_SUPPORTS_ERRNO,0,[Whether iconv supports error no or not]) +AC_DEFINE([ICONV_SUPPORTS_ERRNO],0,[Whether iconv supports error no or not]) AC_MSG_RESULT(no) ]) +if test -z $iconv_lib_name; then + AC_MSG_CHECKING([if iconv is glibc's]) + AC_TRY_COMPILE([#include iconv.h],[void __gconv(); int main() { __gconv(); } +],[ + AC_MSG_RESULT(yes) + PHP_DEFINE([ICONV_IMPL],[glibc]) + AC_DEFINE([ICONV_IMPL],[glibc],[Which iconv implementation to use]) +],[ + AC_MSG_RESULT(no) +]) +else + case $iconv_lib_name in +iconv [)] + PHP_DEFINE([ICONV_IMPL],[libiconv]) + AC_DEFINE([ICONV_IMPL],[libiconv],[Which iconv implementation to use]) + ;; +giconv [)] + PHP_DEFINE([ICONV_IMPL],[giconv]) + AC_DEFINE([ICONV_IMPL],[giconv],[Which iconv implementation to use]) + ;; + esac +fi PHP_NEW_EXTENSION(iconv, iconv.c, $ext_shared) PHP_SUBST(ICONV_SHARED_LIBADD) - ], [ + else AC_MSG_ERROR(Please reinstall the iconv library.) - ]) - + fi fi Index: php4/ext/iconv/iconv.c diff -u php4/ext/iconv/iconv.c:1.48 php4/ext/iconv/iconv.c:1.49 --- php4/ext/iconv/iconv.c:1.48 Sat Sep 7 17:08:47 2002 +++ php4/ext/iconv/iconv.c Fri Oct 11 03:50:47 2002 -17,7 +17,7 +--+ */ -/* $Id: iconv.c,v 1.48 2002/09/07 21:08:47 yohgaki Exp $ */ +/* $Id: iconv.c,v 1.49 2002/10/11 07:50:47 moriyoshi Exp $ */ #ifdef HAVE_CONFIG_H #include config.h -106,8 +106,25 PHP_MINIT_FUNCTION(miconv) { + char *impl_name = unknown; + char *version = ; + ZEND_INIT_MODULE_GLOBALS(iconv, php_iconv_init_globals, NULL); REGISTER_INI_ENTRIES(); + +#if HAVE_LIBICONV + { + static char buf[16]; + impl_name = libiconv; + snprintf( buf, sizeof(buf), %d.%d, ((_libiconv_version 8) 0x0f), +(_libiconv_version 0x0f) ); + version = buf; + } +#endif + + REGISTER_STRING_CONSTANT( ICONV_IMPL, ICONV_IMPL, CONST_CS | +CONST_PERSISTENT ); + REGISTER_STRING_CONSTANT( ICONV_VERSION, version, CONST_CS | +CONST_PERSISTENT ); + return SUCCESS; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/iconv config.m4 iconv.c
On Fri, 11 Oct 2002, Moriyoshi Koizumi wrote: moriyoshi Fri Oct 11 03:50:47 2002 EDT Modified files: /php4/ext/iconv config.m4 iconv.c Log: Added ICONV_IMPL and ICONV_VERSION constants. - Added ICONV_IMPL and ICONV_VERSION constants to iconv extension to indicate which iconv implementation is used. (Moriyoshi) [...] + REGISTER_STRING_CONSTANT( ICONV_IMPL, ICONV_IMPL, CONST_CS | CONST_PERSISTENT ); Can you please format the code like this? REGISTER_STRING_CONSTANT (ICONV_IMPL, ICONV_IMPL, CONST_CS | CONST_PERSISTENT); Derick -- --- Derick Rethans http://derickrethans.nl/ JDI Media Solutions --[ if you hold a unix shell to your ear, do you hear the c? ]- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/iconv config.m4 iconv.c
OK, I'll reformat it soon. You seem to want to say I have to read CODING_STANDARDS thoroughly again :) Derick Rethans [EMAIL PROTECTED] wrote: On Fri, 11 Oct 2002, Moriyoshi Koizumi wrote: moriyoshi Fri Oct 11 03:50:47 2002 EDT Modified files: /php4/ext/iconv config.m4 iconv.c Log: Added ICONV_IMPL and ICONV_VERSION constants. @- Added ICONV_IMPL and ICONV_VERSION constants to iconv extension to @ indicate which iconv implementation is used. (Moriyoshi) [...] + REGISTER_STRING_CONSTANT( ICONV_IMPL, ICONV_IMPL, CONST_CS | CONST_PERSISTENT ); Can you please format the code like this? REGISTER_STRING_CONSTANT (ICONV_IMPL, ICONV_IMPL, CONST_CS | CONST_PERSISTENT); Derick -- --- Derick Rethans http://derickrethans.nl/ JDI Media Solutions --[ if you hold a unix shell to your ear, do you hear the c? ]- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/iconv iconv.c
moriyoshi Fri Oct 11 04:01:19 2002 EDT Modified files: /php4/ext/iconv iconv.c Log: Reformatted. # Still bad? Index: php4/ext/iconv/iconv.c diff -u php4/ext/iconv/iconv.c:1.49 php4/ext/iconv/iconv.c:1.50 --- php4/ext/iconv/iconv.c:1.49 Fri Oct 11 03:50:47 2002 +++ php4/ext/iconv/iconv.c Fri Oct 11 04:01:18 2002 -17,7 +17,7 +--+ */ -/* $Id: iconv.c,v 1.49 2002/10/11 07:50:47 moriyoshi Exp $ */ +/* $Id: iconv.c,v 1.50 2002/10/11 08:01:18 moriyoshi Exp $ */ #ifdef HAVE_CONFIG_H #include config.h -122,8 +122,10 } #endif - REGISTER_STRING_CONSTANT( ICONV_IMPL, ICONV_IMPL, CONST_CS | CONST_PERSISTENT ); - REGISTER_STRING_CONSTANT( ICONV_VERSION, version, CONST_CS | CONST_PERSISTENT ); + REGISTER_STRING_CONSTANT( ICONV_IMPL, ICONV_IMPL, CONST_CS + | CONST_PERSISTENT ); + REGISTER_STRING_CONSTANT( ICONV_VERSION, version, CONST_CS + | CONST_PERSISTENT ); return SUCCESS; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/gd gd.c
derick Fri Oct 11 05:49:38 2002 EDT Modified files: /php4/ext/gdgd.c Log: - Add indetified for bundled GD Index: php4/ext/gd/gd.c diff -u php4/ext/gd/gd.c:1.214 php4/ext/gd/gd.c:1.215 --- php4/ext/gd/gd.c:1.214 Thu Sep 19 21:25:55 2002 +++ php4/ext/gd/gd.cFri Oct 11 05:49:38 2002 -18,7 +18,7 +--+ */ -/* $Id: gd.c,v 1.214 2002/09/20 01:25:55 iliaa Exp $ */ +/* $Id: gd.c,v 1.215 2002/10/11 09:49:38 derick Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ -346,6 +346,9 REGISTER_LONG_CONSTANT(IMG_EFFECT_ALPHABLEND, gdEffectAlphaBlend, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(IMG_EFFECT_NORMAL, gdEffectNormal, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(IMG_EFFECT_OVERLAY, gdEffectOverlay, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(HAVE_BUNDLED_GD, 1, CONST_CS | CONST_PERSISTENT); +#else + REGISTER_LONG_CONSTANT(HAVE_BUNDLED_GD, 0, CONST_CS | CONST_PERSISTENT); #endif return SUCCESS; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard var.c /ext/standard/tests/array var_export.phpt
derick Fri Oct 11 09:49:20 2002 EDT Added files: /php4/ext/standard/tests/array var_export.phpt Modified files: /php4/ext/standard var.c Log: - Fix problem with var_export when objects with numeric indexes were exported. We now skip those, as there is no way to export valid code for it. Index: php4/ext/standard/var.c diff -u php4/ext/standard/var.c:1.149 php4/ext/standard/var.c:1.150 --- php4/ext/standard/var.c:1.149 Sun Oct 6 08:02:52 2002 +++ php4/ext/standard/var.c Fri Oct 11 09:49:20 2002 -272,9 +272,9 if (hash_key-nKeyLength != 0) { php_printf(%*cvar $%s = , level + 1, ' ', hash_key-arKey); + php_var_export(zv, level + 2 TSRMLS_CC); + PUTS (;\n); } - php_var_export(zv, level + 2 TSRMLS_CC); - PUTS (;\n); return 0; } Index: php4/ext/standard/tests/array/var_export.phpt +++ php4/ext/standard/tests/array/var_export.phpt --TEST-- var_export() and objects with numeric indexes properties --POST-- --GET-- --INI-- --FILE-- ?php $a = (object) array (1, 3, foo = bar); var_export($a); ? --EXPECT-- class stdClass { var $foo = 'bar'; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/domxml php_domxml.c
chregu Fri Oct 11 10:00:12 2002 EDT Modified files: /php4/ext/domxmlphp_domxml.c Log: node-attributes returns null, if there are no attributes. Index: php4/ext/domxml/php_domxml.c diff -u php4/ext/domxml/php_domxml.c:1.211 php4/ext/domxml/php_domxml.c:1.212 --- php4/ext/domxml/php_domxml.c:1.211 Mon Sep 9 16:32:49 2002 +++ php4/ext/domxml/php_domxml.cFri Oct 11 10:00:12 2002 -16,7 +16,7 +--+ */ -/* $Id: php_domxml.c,v 1.211 2002/09/09 20:32:49 chregu Exp $ */ +/* $Id: php_domxml.c,v 1.212 2002/10/11 14:00:12 chregu Exp $ */ /* TODO * - Support Notation Nodes -2576,37 +2576,17 zval *id, *attrs; xmlNode *nodep; int ret; -#ifdef oldstyle_for_libxml_1_8_7 - xmlAttr *attr; -#endif DOMXML_PARAM_NONE(nodep, id, le_domxmlnodep); ret = node_attributes(attrs, nodep TSRMLS_CC); if ( ret == -1) { - RETURN_FALSE; + return NULL; } if ( ret -1) { *return_value = *attrs; FREE_ZVAL(attrs); } - - -#ifdef oldstyle_for_libxml_1_8_7 - attr = nodep-properties; - if (!attr) { - RETURN_FALSE; - } - - if (array_init(return_value) == FAILURE) { - RETURN_FALSE; - } - - while (attr) { - add_assoc_string(return_value, (char *) attr-name, xmlNodeGetContent(attr), 1); - attr = attr-next; - } -#endif } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/gd/tests bug19266.phpt
On Fri, 11 Oct 2002, Andi Gutmans wrote: At 02:52 PM 10/11/2002 +0200, Derick Rethans wrote: On Fri, 11 Oct 2002, Andi Gutmans wrote: We really shouldn't change PHP just so that tests end up being better ;) We're trying to the point that there may be no failed tests when we release, and this is needed to make this test pass. The non-bundled GD crashes when this test is run. You shouldn't clutter PHP just so that the make test prints out a nice passed. If the non-bundled GD crashes there's no reason the test shouldn't crash IMO. I agree. The test harness is not just for our own QA. It is also a series of tests for people to run on their systems to see what works and what doesn't. If they are using the non-bundled GD then this function is broken and we shouldn't hide this fact from them. -Rasmus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/domxml/tests 001.phpt
chregu Fri Oct 11 10:03:00 2002 EDT Modified files: /php4/ext/domxml/tests 001.phpt Log: text and comment nodes do not have children... test was wrong, implementation is right :) Index: php4/ext/domxml/tests/001.phpt diff -u php4/ext/domxml/tests/001.phpt:1.2 php4/ext/domxml/tests/001.phpt:1.3 --- php4/ext/domxml/tests/001.phpt:1.2 Thu Apr 11 13:20:47 2002 +++ php4/ext/domxml/tests/001.phpt Fri Oct 11 10:02:59 2002 -106,7 +106,7 Node Name: #comment Node Type: 8 -Num Children: 1 +Num Children: 0 Node Content: lsfj Node Name: chapter -126,7 +126,7 Node Name: #text Node Type: 3 -Num Children: 1 +Num Children: 0 Node Content: -136,14 +136,14 Node Name: #text Node Type: 3 -Num Children: 1 +Num Children: 0 Node Content: - last Node Name: #text Node Type: 3 -Num Children: 1 +Num Children: 0 Node Content: -160,7 +160,7 Node Name: #text Node Type: 3 -Num Children: 1 +Num Children: 0 Node Content: -170,7 +170,7 Node Name: #text Node Type: 3 -Num Children: 1 +Num Children: 0 Node Content: -193,7 +193,7 - children of an attribute Node Name: #text Node Type: 3 -Num Children: 1 +Num Children: 0 Node Content: en - Add child to root -249,7 +249,7 Node Name: #text Node Type: 3 -Num Children: 1 +Num Children: 0 Node Content: -259,7 +259,7 Node Name: #text Node Type: 3 -Num Children: 1 +Num Children: 0 Node Content: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/gd gd.c
I don't think this is a good idea. I'd definitely change the name to GD_something but it still doesn't make so much sense to me. When would people use this and not function_exists()? Andi At 09:49 AM 10/11/2002 +, Derick Rethans wrote: derick Fri Oct 11 05:49:38 2002 EDT Modified files: /php4/ext/gdgd.c Log: - Add indetified for bundled GD Index: php4/ext/gd/gd.c diff -u php4/ext/gd/gd.c:1.214 php4/ext/gd/gd.c:1.215 --- php4/ext/gd/gd.c:1.214 Thu Sep 19 21:25:55 2002 +++ php4/ext/gd/gd.cFri Oct 11 05:49:38 2002 -18,7 +18,7 +--+ */ -/* $Id: gd.c,v 1.214 2002/09/20 01:25:55 iliaa Exp $ */ +/* $Id: gd.c,v 1.215 2002/10/11 09:49:38 derick Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ -346,6 +346,9 REGISTER_LONG_CONSTANT(IMG_EFFECT_ALPHABLEND, gdEffectAlphaBlend, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(IMG_EFFECT_NORMAL, gdEffectNormal, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(IMG_EFFECT_OVERLAY, gdEffectOverlay, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(HAVE_BUNDLED_GD, 1, CONST_CS | CONST_PERSISTENT); +#else + REGISTER_LONG_CONSTANT(HAVE_BUNDLED_GD, 0, CONST_CS | CONST_PERSISTENT); #endif return SUCCESS; } -- 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: php4 /ext/iconv/tests translit-failure.phpt
sniper Fri Oct 11 09:43:24 2002 EDT Modified files: /php4/ext/iconv/tests translit-failure.phpt Log: fix typo. Index: php4/ext/iconv/tests/translit-failure.phpt diff -u php4/ext/iconv/tests/translit-failure.phpt:1.2 php4/ext/iconv/tests/translit-failure.phpt:1.3 --- php4/ext/iconv/tests/translit-failure.phpt:1.2 Fri Oct 11 03:38:18 2002 +++ php4/ext/iconv/tests/translit-failure.phpt Fri Oct 11 09:43:24 2002 -1,5 +1,5 --TEST-- -Translit failture +Translit failure --SKIPIF-- ?php include('skipif.inc'); ? --FILE-- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/gd gd.c
On Fri, 11 Oct 2002, Pierre-Alain Joye wrote: On Fri, 11 Oct 2002 05:53:18 -0700 (PDT) Rasmus Lerdorf [EMAIL PROTECTED] wrote: I don't think we can do that. Like someone said, they have to use GIF in order to generate images for a mobile device. That means they either need to use GD-1.3 or a hacked up later version. Is only the compression system licenced ? Anyway, that is not too difficult to add GIF support to the bundled (maybe not in the upcoming release), regardless to the licence, which I did not take about it as far as I do not use gif anymore. I see very little point in adding non-compressed GIF write support. The people who need it are going to need compressed GIF. You are not going to want to use uncompressed GIF images on a small mobile device, for example. I'll put compressed GIF write in the next version as the LZW patent should be expired by then. -Rasmus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/gd gd.c
On Fri, 11 Oct 2002 05:53:18 -0700 (PDT) Rasmus Lerdorf [EMAIL PROTECTED] wrote: I don't think we can do that. Like someone said, they have to use GIF in order to generate images for a mobile device. That means they either need to use GD-1.3 or a hacked up later version. Is only the compression system licenced ? Anyway, that is not too difficult to add GIF support to the bundled (maybe not in the upcoming release), regardless to the licence, which I did not take about it as far as I do not use gif anymore. pa -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/gd gd.c
At 02:50 PM 10/11/2002 +0200, Derick Rethans wrote: On Fri, 11 Oct 2002, Andi Gutmans wrote: I don't think this is a good idea. I'd definitely change the name to GD_something but it still doesn't make so much sense to me. When would people use this and not function_exists()? Because some functions behave different in the bundled and non-bundled versions of GD. This will only become more of a problem as we're fixing more in the bundled library. In that case we should maybe consider to only allow the bundled one. Anyway, although I am -1 for this constant if it is decided to keep it it should be GD_*. Andi Derick At 09:49 AM 10/11/2002 +, Derick Rethans wrote: derick Fri Oct 11 05:49:38 2002 EDT Modified files: /php4/ext/gdgd.c Log: - Add indetified for bundled GD Index: php4/ext/gd/gd.c diff -u php4/ext/gd/gd.c:1.214 php4/ext/gd/gd.c:1.215 --- php4/ext/gd/gd.c:1.214 Thu Sep 19 21:25:55 2002 +++ php4/ext/gd/gd.cFri Oct 11 05:49:38 2002 -18,7 +18,7 +--+ */ -/* $Id: gd.c,v 1.214 2002/09/20 01:25:55 iliaa Exp $ */ +/* $Id: gd.c,v 1.215 2002/10/11 09:49:38 derick Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ -346,6 +346,9 REGISTER_LONG_CONSTANT(IMG_EFFECT_ALPHABLEND, gdEffectAlphaBlend, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(IMG_EFFECT_NORMAL, gdEffectNormal, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(IMG_EFFECT_OVERLAY, gdEffectOverlay, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(HAVE_BUNDLED_GD, 1, CONST_CS | CONST_PERSISTENT); +#else + REGISTER_LONG_CONSTANT(HAVE_BUNDLED_GD, 0, CONST_CS | CONST_PERSISTENT); #endif return SUCCESS; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- --- Derick Rethans http://derickrethans.nl/ JDI Media Solutions --[ if you hold a unix shell to your ear, do you hear the c? ]- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/gd gd.c
On Fri, 11 Oct 2002, Andi Gutmans wrote: I don't think this is a good idea. I'd definitely change the name to GD_something but it still doesn't make so much sense to me. When would people use this and not function_exists()? Because some functions behave different in the bundled and non-bundled versions of GD. This will only become more of a problem as we're fixing more in the bundled library. Derick At 09:49 AM 10/11/2002 +, Derick Rethans wrote: derick Fri Oct 11 05:49:38 2002 EDT Modified files: /php4/ext/gdgd.c Log: - Add indetified for bundled GD Index: php4/ext/gd/gd.c diff -u php4/ext/gd/gd.c:1.214 php4/ext/gd/gd.c:1.215 --- php4/ext/gd/gd.c:1.214 Thu Sep 19 21:25:55 2002 +++ php4/ext/gd/gd.cFri Oct 11 05:49:38 2002 -18,7 +18,7 +--+ */ -/* $Id: gd.c,v 1.214 2002/09/20 01:25:55 iliaa Exp $ */ +/* $Id: gd.c,v 1.215 2002/10/11 09:49:38 derick Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ -346,6 +346,9 REGISTER_LONG_CONSTANT(IMG_EFFECT_ALPHABLEND, gdEffectAlphaBlend, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(IMG_EFFECT_NORMAL, gdEffectNormal, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(IMG_EFFECT_OVERLAY, gdEffectOverlay, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(HAVE_BUNDLED_GD, 1, CONST_CS | CONST_PERSISTENT); +#else + REGISTER_LONG_CONSTANT(HAVE_BUNDLED_GD, 0, CONST_CS | CONST_PERSISTENT); #endif return SUCCESS; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- --- Derick Rethans http://derickrethans.nl/ JDI Media Solutions --[ if you hold a unix shell to your ear, do you hear the c? ]- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard/tests/strings nl2br.phpt
derick Fri Oct 11 07:03:36 2002 EDT Modified files: /php4/ext/standard/tests/stringsnl2br.phpt Log: - Add case for bug 19858 Index: php4/ext/standard/tests/strings/nl2br.phpt diff -u php4/ext/standard/tests/strings/nl2br.phpt:1.1 php4/ext/standard/tests/strings/nl2br.phpt:1.2 --- php4/ext/standard/tests/strings/nl2br.phpt:1.1 Tue Oct 8 19:46:02 2002 +++ php4/ext/standard/tests/strings/nl2br.phpt Fri Oct 11 07:03:36 2002 -4,6 +4,7 --GET-- --FILE-- ?php + var_dump(nl2br(test)); var_dump(nl2br()); var_dump(nl2br(NULL)); var_dump(nl2br(\r\n)); -17,6 +18,7 ? --EXPECT-- +string(4) test string(0) string(0) string(8) br / -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard php_string.h
iliaa Fri Oct 11 10:48:25 2002 EDT Modified files: /php4/ext/standard php_string.h Log: Fixed bug #19865 Index: php4/ext/standard/php_string.h diff -u php4/ext/standard/php_string.h:1.62 php4/ext/standard/php_string.h:1.63 --- php4/ext/standard/php_string.h:1.62 Wed Oct 9 09:37:02 2002 +++ php4/ext/standard/php_string.h Fri Oct 11 10:48:25 2002 -17,7 +17,7 +--+ */ -/* $Id: php_string.h,v 1.62 2002/10/09 13:37:02 iliaa Exp $ */ +/* $Id: php_string.h,v 1.63 2002/10/11 14:48:25 iliaa Exp $ */ /* Synced with php 3.0 revision 1.43 1999-06-16 [ssb] */ -138,7 +138,7 end -= needle_len; while (p = end) { - if ((p = strchr(p, *needle)) ne == p[needle_len-1]) { + if ((p = memchr(p, *needle, (end-p+1))) ne == p[needle_len-1]) { if (!memcmp(needle, p, needle_len-1)) { return p; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/gd/tests bug19266.phpt
derick Fri Oct 11 06:08:42 2002 EDT Modified files: /php4/ext/gd/tests bug19266.phpt Log: - Skip if an external lib gd is used (which always has this crash-bug) Index: php4/ext/gd/tests/bug19266.phpt diff -u php4/ext/gd/tests/bug19266.phpt:1.2 php4/ext/gd/tests/bug19266.phpt:1.3 --- php4/ext/gd/tests/bug19266.phpt:1.2 Wed Oct 9 09:54:21 2002 +++ php4/ext/gd/tests/bug19266.phpt Fri Oct 11 06:08:42 2002 -1,7 +1,7 --TEST-- gdimagefill() function (Bug #19366 (in bundled libgd)) --SKIPIF-- -?php if (!extension_loaded('gd')) die(skip\n); ? +?php if (!extension_loaded('gd') || !HAVE_BUNDLED_GD) die(skip\n); ? --POST-- --GET-- --INI-- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard/tests/strings explode.phpt
iliaa Fri Oct 11 11:19:57 2002 EDT Added files: /php4/ext/standard/tests/stringsexplode.phpt Log: Added test for explode() function. Index: php4/ext/standard/tests/strings/explode.phpt +++ php4/ext/standard/tests/strings/explode.phpt --TEST-- explode() function --POST-- --GET-- --INI-- error_reporting=2047 --FILE-- ?php echo md5(var_export(explode(\1, a. chr(1). b. chr(0). d . chr(1) . f . chr(1). 1 . chr(1) . d), TRUE)); echo \n; var_dump(explode(, )); var_dump(explode(, NULL)); var_dump(explode(NULL, )); var_dump(explode(a, )); var_dump(explode(a, a)); var_dump(explode(a, NULL)); var_dump(explode(NULL, a)); var_dump(explode(abc, acb)); var_dump(explode(somestring, otherstring)); var_dump(explode(a, aa)); var_dump(explode(==, str_repeat(-=.ord(0).=-, 10))); var_dump(explode(=, str_repeat(-=.ord(0).=-, 10))); ? --EXPECTF-- 26d4e18734cb2582df5055e2175223df bool(false) bool(false) bool(false) array(1) { [0]= string(0) } array(2) { [0]= string(0) [1]= string(0) } array(1) { [0]= string(0) } bool(false) array(1) { [0]= string(3) acb } array(1) { [0]= string(11) otherstring } array(7) { [0]= string(0) [1]= string(0) [2]= string(0) [3]= string(0) [4]= string(0) [5]= string(0) [6]= string(0) } array(1) { [0]= string(60) -=48=--=48=--=48=--=48=--=48=--=48=--=48=--=48=--=48=--=48=- } array(21) { [0]= string(1) - [1]= string(2) 48 [2]= string(2) -- [3]= string(2) 48 [4]= string(2) -- [5]= string(2) 48 [6]= string(2) -- [7]= string(2) 48 [8]= string(2) -- [9]= string(2) 48 [10]= string(2) -- [11]= string(2) 48 [12]= string(2) -- [13]= string(2) 48 [14]= string(2) -- [15]= string(2) 48 [16]= string(2) -- [17]= string(2) 48 [18]= string(2) -- [19]= string(2) 48 [20]= string(1) - } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/iconv config.m4
sniper Fri Oct 11 11:25:36 2002 EDT Modified files: /php4/ext/iconv config.m4 Log: ws fix Index: php4/ext/iconv/config.m4 diff -u php4/ext/iconv/config.m4:1.15 php4/ext/iconv/config.m4:1.16 --- php4/ext/iconv/config.m4:1.15 Fri Oct 11 03:50:47 2002 +++ php4/ext/iconv/config.m4Fri Oct 11 11:25:36 2002 -1,5 +1,5 dnl -dnl $Id: config.m4,v 1.15 2002/10/11 07:50:47 moriyoshi Exp $ +dnl $Id: config.m4,v 1.16 2002/10/11 15:25:36 sniper Exp $ dnl PHP_ARG_WITH(iconv, for iconv support, -43,24 +43,26 icv_close( cd ); return 2; } -],[ - AC_MSG_RESULT(yes) -PHP_DEFINE([ICONV_SUPPORTS_ERRNO],1) -AC_DEFINE([ICONV_SUPPORTS_ERRNO],1,[Whether iconv supports error no or not]) -],[ -PHP_DEFINE([ICONV_SUPPORTS_ERRNO],0) -AC_DEFINE([ICONV_SUPPORTS_ERRNO],0,[Whether iconv supports error no or not]) - AC_MSG_RESULT(no) -]) -if test -z $iconv_lib_name; then - AC_MSG_CHECKING([if iconv is glibc's]) - AC_TRY_COMPILE([#include iconv.h],[void __gconv(); int main() { __gconv(); } ],[ +],[ AC_MSG_RESULT(yes) - PHP_DEFINE([ICONV_IMPL],[glibc]) - AC_DEFINE([ICONV_IMPL],[glibc],[Which iconv implementation to use]) -],[ + PHP_DEFINE([ICONV_SUPPORTS_ERRNO],1) + AC_DEFINE([ICONV_SUPPORTS_ERRNO],1,[Whether iconv supports error no or not]) +],[ AC_MSG_RESULT(no) -]) + PHP_DEFINE([ICONV_SUPPORTS_ERRNO],0) + AC_DEFINE([ICONV_SUPPORTS_ERRNO],0,[Whether iconv supports error no or not]) +]) + +if test -z $iconv_lib_name; then + AC_MSG_CHECKING([if iconv is glibc's]) + AC_TRY_COMPILE([#include iconv.h],[void __gconv(); int main() { __gconv(); }], + [ +AC_MSG_RESULT(yes) +PHP_DEFINE([ICONV_IMPL],[glibc]) +AC_DEFINE([ICONV_IMPL],[glibc],[Which iconv implementation to use]) + ],[ +AC_MSG_RESULT(no) + ]) else case $iconv_lib_name in iconv [)] -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/gd/tests bug19266.phpt bug19366.phpt
sniper Fri Oct 11 11:50:37 2002 EDT Added files: /php4/ext/gd/tests bug19366.phpt Removed files: /php4/ext/gd/tests bug19266.phpt Log: Renamed and fixed constant Index: php4/ext/gd/tests/bug19366.phpt +++ php4/ext/gd/tests/bug19366.phpt --TEST-- gdimagefill() function (Bug #19366 (fixed in bundled libgd)) --SKIPIF-- ?php if (!extension_loaded('gd') || !GD_BUNDLED) die(skip\n); ? --POST-- --GET-- --INI-- --FILE-- ?php echo Alive\n; $width = 50; $height = 100; $ImHandle = imagecreate($width,$height); echo Alive\n; //Define colors $MyBlue = imagecolorAllocate($ImHandle, 0, 0, 255); $MyRed = imagecolorAllocate($ImHandle, 255, 0, 0); $MyWhite = imagecolorAllocate($ImHandle, 255, 255, 255); $MyBlack = imagecolorAllocate($ImHandle, 0, 0, 0); echo Alive\n; //Draw ImageFill($ImHandle,0,0,$MyBlack); ImageLine($ImHandle,20,20,180,20,$MyWhite); ImageLine($ImHandle,20,20,20,70,$MyBlue); ImageLine($ImHandle,20,70,180,70,$MyRed); ImageLine($ImHandle,180,20,180,45,$MyWhite); ImageLine($ImHandle,180,70,180,45,$MyRed); ImageLine($ImHandle,20,20,100,45,$MyBlue); ImageLine($ImHandle,20,70,100,45,$MyBlue); ImageLine($ImHandle,100,45,180,45,$MyRed); ImageFill($ImHandle,21,45,$MyBlue); ImageFill($ImHandle,100,69,$MyRed); ImageFill($ImHandle,100,21,$MyWhite); ImageString($ImHandle,4,40,75,Czech Republic,$MyWhite); echo Alive\n; // Send to browser Header(Content-type: image/PNG); //ImagePNG($ImHandle); echo Alive\n; //Free resources imagedestroy($ImHandle); echo Alive\n; ? --EXPECT-- Alive Alive Alive Alive Alive Alive -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/icap .cvsignore CREDITS config.m4 php_icap.cphp_icap.h
Jani Taskinen wrote: sniper Fri Oct 11 11:30:44 2002 EDT Removed files: /php4/ext/icap .cvsignore CREDITS config.m4 php_icap.c php_icap.h Log: - Removed ext/icap (ext/mcal is the one to be used) What about NEWS entry? Tal -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/icap .cvsignore CREDITS config.m4php_icap.c php_icap.h
On Fri, 11 Oct 2002, Tal Peer wrote: Jani Taskinen wrote: sniperFri Oct 11 11:30:44 2002 EDT Removed files: /php4/ext/icap.cvsignore CREDITS config.m4 php_icap.c php_icap.h Log: - Removed ext/icap (ext/mcal is the one to be used) What about NEWS entry? I'm gonna add one for all the removed exts. --Jani -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/iconv iconv.c
moriyoshi Fri Oct 11 13:01:35 2002 EDT Modified files: /php4/ext/iconv iconv.c Log: Fixed possible compile-time failure Index: php4/ext/iconv/iconv.c diff -u php4/ext/iconv/iconv.c:1.51 php4/ext/iconv/iconv.c:1.52 --- php4/ext/iconv/iconv.c:1.51 Fri Oct 11 04:15:05 2002 +++ php4/ext/iconv/iconv.c Fri Oct 11 13:01:34 2002 -17,7 +17,7 +--+ */ -/* $Id: iconv.c,v 1.51 2002/10/11 08:15:05 derick Exp $ */ +/* $Id: iconv.c,v 1.52 2002/10/11 17:01:34 moriyoshi Exp $ */ #ifdef HAVE_CONFIG_H #include config.h -106,7 +106,6 PHP_MINIT_FUNCTION(miconv) { - char *impl_name = unknown; char *version = ; ZEND_INIT_MODULE_GLOBALS(iconv, php_iconv_init_globals, NULL); -115,14 +114,16 #if HAVE_LIBICONV { static char buf[16]; - impl_name = libiconv; snprintf(buf, sizeof(buf), %d.%d, ((_libiconv_version 8) 0x0f), (_libiconv_version 0x0f)); version = buf; } #endif - +#ifdef ICONV_IMPL REGISTER_STRING_CONSTANT(ICONV_IMPL, ICONV_IMPL, CONST_CS | CONST_PERSISTENT); +#else + REGISTER_STRING_CONSTANT(ICONV_IMPL, unknown, CONST_CS | CONST_PERSISTENT); +#endif REGISTER_STRING_CONSTANT(ICONV_VERSION, version, CONST_CS | CONST_PERSISTENT); return SUCCESS; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/iconv iconv.c
Why did you do this? the define is always set through the config.m4 file... I suppose there might be some platforms out there whose libc offers iconv functions but it is not gnu one. Moriyoshi -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/iconv config.m4 iconv.c
moriyoshi Fri Oct 11 13:48:39 2002 EDT Modified files: /php4/ext/iconv config.m4 iconv.c Log: Index: php4/ext/iconv/config.m4 diff -u php4/ext/iconv/config.m4:1.16 php4/ext/iconv/config.m4:1.17 --- php4/ext/iconv/config.m4:1.16 Fri Oct 11 11:25:36 2002 +++ php4/ext/iconv/config.m4Fri Oct 11 13:48:39 2002 -1,5 +1,5 dnl -dnl $Id: config.m4,v 1.16 2002/10/11 15:25:36 sniper Exp $ +dnl $Id: config.m4,v 1.17 2002/10/11 17:48:39 moriyoshi Exp $ dnl PHP_ARG_WITH(iconv, for iconv support, -58,20 +58,22 AC_TRY_COMPILE([#include iconv.h],[void __gconv(); int main() { __gconv(); }], [ AC_MSG_RESULT(yes) -PHP_DEFINE([ICONV_IMPL],[glibc]) -AC_DEFINE([ICONV_IMPL],[glibc],[Which iconv implementation to use]) +PHP_DEFINE([HAVE_GLIBC_ICONV],1) +AC_DEFINE([HAVE_GLIBC_ICONV],1,[glibc's iconv implementation]) +PHP_DEFINE([PHP_ICONV_IMPL],[\glibc\]) +AC_DEFINE([PHP_ICONV_IMPL],[glibc],[Which iconv implementation to use]) ],[ AC_MSG_RESULT(no) ]) else case $iconv_lib_name in iconv [)] - PHP_DEFINE([ICONV_IMPL],[libiconv]) - AC_DEFINE([ICONV_IMPL],[libiconv],[Which iconv implementation to use]) + PHP_DEFINE([PHP_ICONV_IMPL],[\libiconv\]) + AC_DEFINE([PHP_ICONV_IMPL],[libiconv],[Which iconv implementation to use]) ;; giconv [)] - PHP_DEFINE([ICONV_IMPL],[giconv]) - AC_DEFINE([ICONV_IMPL],[giconv],[Which iconv implementation to use]) + PHP_DEFINE([PHP_ICONV_IMPL],[\giconv\]) + AC_DEFINE([PHP_ICONV_IMPL],[giconv],[Which iconv implementation to use]) ;; esac fi Index: php4/ext/iconv/iconv.c diff -u php4/ext/iconv/iconv.c:1.52 php4/ext/iconv/iconv.c:1.53 --- php4/ext/iconv/iconv.c:1.52 Fri Oct 11 13:01:34 2002 +++ php4/ext/iconv/iconv.c Fri Oct 11 13:48:39 2002 -17,7 +17,7 +--+ */ -/* $Id: iconv.c,v 1.52 2002/10/11 17:01:34 moriyoshi Exp $ */ +/* $Id: iconv.c,v 1.53 2002/10/11 17:48:39 moriyoshi Exp $ */ #ifdef HAVE_CONFIG_H #include config.h -42,6 +42,10 #include iconv.h #endif +#ifdef HAVE_GLIBC_ICONV +#include gnu/libc-version.h +#endif + #ifdef HAVE_LIBICONV #define LIBICONV_PLUG #define icv_open(a, b) libiconv_open(a, b) -118,9 +122,12 ((_libiconv_version 8) 0x0f), (_libiconv_version 0x0f)); version = buf; } +#elif HAVE_GLIBC_ICONV + version = (char *)gnu_get_libc_version(); #endif -#ifdef ICONV_IMPL - REGISTER_STRING_CONSTANT(ICONV_IMPL, ICONV_IMPL, CONST_CS | CONST_PERSISTENT); + +#ifdef PHP_ICONV_IMPL + REGISTER_STRING_CONSTANT(ICONV_IMPL, PHP_ICONV_IMPL, CONST_CS | +CONST_PERSISTENT); #else REGISTER_STRING_CONSTANT(ICONV_IMPL, unknown, CONST_CS | CONST_PERSISTENT); #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/iconv config.m4 iconv.c
Oops, I've committed with empty log. Sorry! The log message should go --- Made ICONV_VERSION more informative --- Should I fix ChangeLog by hand? Moriyoshi Moriyoshi Koizumi [EMAIL PROTECTED] wrote: moriyoshi Fri Oct 11 13:48:39 2002 EDT Modified files: /php4/ext/iconv config.m4 iconv.c Log: Index: php4/ext/iconv/config.m4 diff -u php4/ext/iconv/config.m4:1.16 php4/ext/iconv/config.m4:1.17 --- php4/ext/iconv/config.m4:1.16 Fri Oct 11 11:25:36 2002 +++ php4/ext/iconv/config.m4 Fri Oct 11 13:48:39 2002 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.16 2002/10/11 15:25:36 sniper Exp $ +dnl $Id: config.m4,v 1.17 2002/10/11 17:48:39 moriyoshi Exp $ dnl PHP_ARG_WITH(iconv, for iconv support, @@ -58,20 +58,22 @@ AC_TRY_COMPILE([#include iconv.h],[void __gconv(); int main() { __gconv(); }], [ AC_MSG_RESULT(yes) -PHP_DEFINE([ICONV_IMPL],[glibc]) -AC_DEFINE([ICONV_IMPL],[glibc],[Which iconv implementation to use]) +PHP_DEFINE([HAVE_GLIBC_ICONV],1) +AC_DEFINE([HAVE_GLIBC_ICONV],1,[glibc's iconv implementation]) +PHP_DEFINE([PHP_ICONV_IMPL],[\glibc\]) +AC_DEFINE([PHP_ICONV_IMPL],[glibc],[Which iconv implementation to use]) ],[ AC_MSG_RESULT(no) ]) else case $iconv_lib_name in iconv [)] - PHP_DEFINE([ICONV_IMPL],[libiconv]) - AC_DEFINE([ICONV_IMPL],[libiconv],[Which iconv implementation to use]) + PHP_DEFINE([PHP_ICONV_IMPL],[\libiconv\]) + AC_DEFINE([PHP_ICONV_IMPL],[libiconv],[Which iconv implementation to use]) ;; giconv [)] - PHP_DEFINE([ICONV_IMPL],[giconv]) - AC_DEFINE([ICONV_IMPL],[giconv],[Which iconv implementation to use]) + PHP_DEFINE([PHP_ICONV_IMPL],[\giconv\]) + AC_DEFINE([PHP_ICONV_IMPL],[giconv],[Which iconv implementation to use]) ;; esac fi Index: php4/ext/iconv/iconv.c diff -u php4/ext/iconv/iconv.c:1.52 php4/ext/iconv/iconv.c:1.53 --- php4/ext/iconv/iconv.c:1.52 Fri Oct 11 13:01:34 2002 +++ php4/ext/iconv/iconv.cFri Oct 11 13:48:39 2002 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: iconv.c,v 1.52 2002/10/11 17:01:34 moriyoshi Exp $ */ +/* $Id: iconv.c,v 1.53 2002/10/11 17:48:39 moriyoshi Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -42,6 +42,10 @@ #include iconv.h #endif +#ifdef HAVE_GLIBC_ICONV +#include gnu/libc-version.h +#endif + #ifdef HAVE_LIBICONV #define LIBICONV_PLUG #define icv_open(a, b) libiconv_open(a, b) @@ -118,9 +122,12 @@ ((_libiconv_version 8) 0x0f), (_libiconv_version 0x0f)); version = buf; } +#elif HAVE_GLIBC_ICONV + version = (char *)gnu_get_libc_version(); #endif -#ifdef ICONV_IMPL - REGISTER_STRING_CONSTANT(ICONV_IMPL, ICONV_IMPL, CONST_CS | CONST_PERSISTENT); + +#ifdef PHP_ICONV_IMPL + REGISTER_STRING_CONSTANT(ICONV_IMPL, PHP_ICONV_IMPL, CONST_CS | CONST_PERSISTENT); #else REGISTER_STRING_CONSTANT(ICONV_IMPL, unknown, CONST_CS | CONST_PERSISTENT); #endif -- 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: php4 /ext/standard/tests/strings explode.phpt
mfischerFri Oct 11 14:06:15 2002 EDT Modified files: /php4/ext/standard/tests/stringsexplode.phpt Log: - Document were the first test came from. Index: php4/ext/standard/tests/strings/explode.phpt diff -u php4/ext/standard/tests/strings/explode.phpt:1.1 php4/ext/standard/tests/strings/explode.phpt:1.2 --- php4/ext/standard/tests/strings/explode.phpt:1.1Fri Oct 11 11:19:57 2002 +++ php4/ext/standard/tests/strings/explode.phptFri Oct 11 14:06:15 2002 -6,6 +6,7 error_reporting=2047 --FILE-- ?php +/* From http://bugs.php.net/19865 */ echo md5(var_export(explode(\1, a. chr(1). b. chr(0). d . chr(1) . f . chr(1). 1 . chr(1) . d), TRUE)); echo \n; var_dump(explode(, )); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/iconv/tests translit-failure.phpt translit-utf8.phpt
moriyoshi Fri Oct 11 14:07:47 2002 EDT Modified files: /php4/ext/iconv/tests translit-failure.phpt translit-utf8.phpt Log: Improved the test cases so that they will be skipped rather than failed, if libiconv is not used. Index: php4/ext/iconv/tests/translit-failure.phpt diff -u php4/ext/iconv/tests/translit-failure.phpt:1.3 php4/ext/iconv/tests/translit-failure.phpt:1.4 --- php4/ext/iconv/tests/translit-failure.phpt:1.3 Fri Oct 11 09:43:24 2002 +++ php4/ext/iconv/tests/translit-failure.phpt Fri Oct 11 14:07:47 2002 -1,7 +1,10 --TEST-- Translit failure --SKIPIF-- -?php include('skipif.inc'); ? +?php +include('skipif.inc'); +( ICONV_IMPL != libiconv ) and die(skip); +? --FILE-- ?php // Should be ok. Index: php4/ext/iconv/tests/translit-utf8.phpt diff -u php4/ext/iconv/tests/translit-utf8.phpt:1.2 php4/ext/iconv/tests/translit-utf8.phpt:1.3 --- php4/ext/iconv/tests/translit-utf8.phpt:1.2 Thu Oct 10 12:49:33 2002 +++ php4/ext/iconv/tests/translit-utf8.phpt Fri Oct 11 14:07:47 2002 -1,7 +1,10 --TEST-- Translit UTF-8 quotes --SKIPIF-- -?php include('skipif.inc'); ? +?php +include('skipif.inc'); +( ICONV_IMPL != libiconv ) and die(skip); +? --FILE-- ?php include('translit-utf8.inc'); ? --EXPECT-- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/fribidi/tests 001.phpt
tal Fri Oct 11 16:20:51 2002 EDT Modified files: /php4/ext/fribidi/tests 001.phpt Log: Use var_dump instaed of plain echo Index: php4/ext/fribidi/tests/001.phpt diff -u php4/ext/fribidi/tests/001.phpt:1.2 php4/ext/fribidi/tests/001.phpt:1.3 --- php4/ext/fribidi/tests/001.phpt:1.2 Tue Oct 8 10:08:15 2002 +++ php4/ext/fribidi/tests/001.phpt Fri Oct 11 16:20:51 2002 -7,11 +7,19 --FILE-- ?php error_reporting (E_ALL ^ E_NOTICE); - echo fribidi_log2vis(THE dog 123 IS THE biggest, FRIBIDI_AUTO, FRIBIDI_CHARSET_CAP_RTL).\n; - echo fribidi_log2vis(áìä 198 foo áìä BAR 12, FRIBIDI_RTL, FRIBIDI_CHARSET_8859_8).\n; - echo fribidi_log2vis(Fri áéãé éààà bla 12% bla, FRIBIDI_AUTO, FRIBIDI_CHARSET_CP1255); + $a = fribidi_log2vis(THE dog 123 IS THE biggest, FRIBIDI_AUTO, +FRIBIDI_CHARSET_CAP_RTL); + $b = fribidi_log2vis(áìä 198 foo áìä BAR 12, FRIBIDI_RTL, +FRIBIDI_CHARSET_8859_8); + $c = fribidi_log2vis(Fri áéãé éààà bla 12% bla, FRIBIDI_AUTO, +FRIBIDI_CHARSET_CP1255); + + $d = array($a, $b, $c); + var_dump($d); ? --EXPECT-- -biggest EHT SI dog 123 EHT -BAR 12 äìá foo 198 äìá -Fri àààé éãéá bla 12% bla +array(3) { + [0]= + string(26) biggest EHT SI dog 123 EHT + [1]= + string(22) BAR 12 äìá foo 198 äìá + [2]= + string(25) Fri àààé éãéá bla 12% bla +} -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php