[PHP-CVS] cvs: php-src /ext/standard basic_functions.c
wez Sun Jul 18 05:55:47 2004 EDT Modified files: /php-src/ext/standard basic_functions.c Log: don't allocate 0 bytes here either http://cvs.php.net/diff.php/php-src/ext/standard/basic_functions.c?r1=1.673r2=1.674ty=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.673 php-src/ext/standard/basic_functions.c:1.674 --- php-src/ext/standard/basic_functions.c:1.673Sun Jun 27 17:49:47 2004 +++ php-src/ext/standard/basic_functions.c Sun Jul 18 05:55:46 2004 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.673 2004/06/27 21:49:47 iliaa Exp $ */ +/* $Id: basic_functions.c,v 1.674 2004/07/18 09:55:46 wez Exp $ */ #include php.h #include php_streams.h @@ -1956,13 +1956,17 @@ func_params_ht = Z_ARRVAL_PP(params); count = zend_hash_num_elements(func_params_ht); - func_params = safe_emalloc(sizeof(zval **), count, 0); + if (count) { + func_params = safe_emalloc(sizeof(zval **), count, 0); - for (zend_hash_internal_pointer_reset(func_params_ht); -zend_hash_get_current_data(func_params_ht, (void **) func_params[current]) == SUCCESS; -zend_hash_move_forward(func_params_ht) - ) { - current++; + for (zend_hash_internal_pointer_reset(func_params_ht); + zend_hash_get_current_data(func_params_ht, (void **) func_params[current]) == SUCCESS; + zend_hash_move_forward(func_params_ht) + ) { + current++; + } + } else { + func_params = NULL; } if (call_user_function_ex(EG(function_table), NULL, *func, retval_ptr, count, func_params, 0, NULL TSRMLS_CC) == SUCCESS retval_ptr) { @@ -1972,7 +1976,9 @@ } efree(name); - efree(func_params); + if (func_params) { + efree(func_params); + } } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mnogosearch php_mnogo.c
gluke Sun Jul 18 07:18:04 2004 EDT Modified files: /php-src/ext/mnogosearchphp_mnogo.c Log: - A Bug #29147 was fixed. Thanks to Antony Dovgal tony2001 at phpclub.net for his patch. http://cvs.php.net/diff.php/php-src/ext/mnogosearch/php_mnogo.c?r1=1.90r2=1.91ty=u Index: php-src/ext/mnogosearch/php_mnogo.c diff -u php-src/ext/mnogosearch/php_mnogo.c:1.90 php-src/ext/mnogosearch/php_mnogo.c:1.91 --- php-src/ext/mnogosearch/php_mnogo.c:1.90Thu Jul 8 01:22:10 2004 +++ php-src/ext/mnogosearch/php_mnogo.c Sun Jul 18 07:18:03 2004 @@ -1,5 +1,5 @@ /* $Source: /usr/repository/php-src/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.90 2004/07/08 05:22:10 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.91 2004/07/18 11:18:03 gluke Exp $ */ /* +--+ @@ -430,7 +430,7 @@ static char* MyRemoveHiLightDup(const char *s){ size_t len=strlen(s)+1; - char *d, *res = (char*)UdmMalloc(len); + char *d, *res = (char*)emalloc(len); for(d=res; s[0]; s++) { @@ -1625,7 +1625,7 @@ al = (char *)MyRemoveHiLightDup((const char *)(UdmVarListFindStr((Res-Doc[row].Sections), URL, ))); UdmVarListReplaceInt((Res-Doc[row].Sections), STORED_ID, UdmCRC32(al, strlen(al))); - free(al); + efree(al); #if UDM_VERSION_ID = 30216 Excerpt = UdmExcerptDoc(Agent, Res, (Res-Doc[row]), ExcerptSize, ExcerptPadding); @@ -1777,7 +1777,7 @@ char*al; al = (char *)MyRemoveHiLightDup((const char *)(UdmVarListFindStr((Res-Doc[row].Sections), field, ))); UdmVarListReplaceStr(Res-Doc[row].Sections,field,al); - free(al); + efree(al); } RETURN_STRING((char *)UdmVarListFindStr(Res-Doc[row].Sections,field,),1); } else { @@ -1839,12 +1839,11 @@ if(!Doc-Buf.content) { UdmResultFree(Res); UdmDocFree(Doc); - UDM_FREE(HDoc); RETURN_FALSE; } - HEnd=HDoc = (char*)UdmMalloc(UDM_MAXDOCSIZE + 32); + HEnd=HDoc = (char*)emalloc(UDM_MAXDOCSIZE + 32); *HEnd='\0'; if (strncasecmp(content_type, text/plain, 10) == 0) { @@ -1885,7 +1884,7 @@ UdmResultFree(Res); UdmDocFree(Doc); - UDM_FREE(HDoc); + efree(HDoc); RETURN_TRUE; } @@ -2066,7 +2065,7 @@ char*al; al = (char *)MyRemoveHiLightDup((const char *)(UdmVarListFindStr((Res-Doc[row].Sections), URL, ))); UdmVarListReplaceStr(Res-Doc[row].Sections,URL,al); - free(al); + efree(al); RETURN_STRING((char *)UdmVarListFindStr((Res-Doc[row].Sections),URL,),1); } @@ -2256,7 +2255,7 @@ len += Res-WWList.Word[i].len + 64; { size_t wsize=(1+len)*sizeof(char); - char *wordinfo = (char*) malloc(wsize); + char *wordinfo = (char*) emalloc(wsize); *wordinfo = '\0'; @@ -2270,7 +2269,7 @@ sprintf(UDM_STREND(wordinfo), %s : stopword, Res-WWList.Word[i].word); } } - RETURN_STRING(wordinfo,1); + RETURN_STRING(wordinfo,0); } } #else @@ -2286,7 +2285,7 @@ len += Res-WWList.Word[i].len + 64; { size_t wsize=(1+len)*sizeof(char); - char *wordinfo = (char*) malloc(wsize); + char *wordinfo = (char*) emalloc(wsize); int corder = (size_t)-1, ccount = 0; *wordinfo = '\0'; @@ -2305,7 +2304,7 @@ sprintf(UDM_STREND(wordinfo),%s%s : %d / %d, (*wordinfo) ? , : , Res-WWList.Word[i].word, Res-WWList.Word[i].count, ccount); } else continue; } - RETURN_STRING(wordinfo,1); + RETURN_STRING(wordinfo,0); } } break; @@ -2489,7 +2488,7 @@ #endif array_init(return_value); - if (!(buf=calloc(1,UDMSTRSIZ+1))) { + if
[PHP-CVS] cvs: php-src(PHP_5_0) /ext/libxml libxml.c
rrichards Sun Jul 18 07:44:26 2004 EDT Modified files: (Branch: PHP_5_0) /php-src/ext/libxml libxml.c Log: Fixed bug #29221 (Segfault using DOM ownerDocument in a PHP object) http://cvs.php.net/diff.php/php-src/ext/libxml/libxml.c?r1=1.18r2=1.18.2.1ty=u Index: php-src/ext/libxml/libxml.c diff -u php-src/ext/libxml/libxml.c:1.18 php-src/ext/libxml/libxml.c:1.18.2.1 --- php-src/ext/libxml/libxml.c:1.18Mon May 31 07:20:46 2004 +++ php-src/ext/libxml/libxml.c Sun Jul 18 07:44:25 2004 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: libxml.c,v 1.18 2004/05/31 11:20:46 rrichards Exp $ */ +/* $Id: libxml.c,v 1.18.2.1 2004/07/18 11:44:25 rrichards Exp $ */ #define IS_EXT_MODULE @@ -568,7 +568,7 @@ obj_node = (php_libxml_node_ptr *) object-node; ret_refcount = --obj_node-refcount; if (ret_refcount == 0) { - if (obj_node-node != NULL obj_node-node-type != XML_DOCUMENT_NODE) { + if (obj_node-node != NULL) { obj_node-node-_private = NULL; } efree(obj_node); -- 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
rrichards Sun Jul 18 07:45:12 2004 EDT Modified files: /php-src/ext/libxml libxml.c Log: MFB: Fixed bug #29221 (Segfault using DOM ownerDocument in a PHP object) http://cvs.php.net/diff.php/php-src/ext/libxml/libxml.c?r1=1.18r2=1.19ty=u Index: php-src/ext/libxml/libxml.c diff -u php-src/ext/libxml/libxml.c:1.18 php-src/ext/libxml/libxml.c:1.19 --- php-src/ext/libxml/libxml.c:1.18Mon May 31 07:20:46 2004 +++ php-src/ext/libxml/libxml.c Sun Jul 18 07:45:12 2004 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: libxml.c,v 1.18 2004/05/31 11:20:46 rrichards Exp $ */ +/* $Id: libxml.c,v 1.19 2004/07/18 11:45:12 rrichards Exp $ */ #define IS_EXT_MODULE @@ -568,7 +568,7 @@ obj_node = (php_libxml_node_ptr *) object-node; ret_refcount = --obj_node-refcount; if (ret_refcount == 0) { - if (obj_node-node != NULL obj_node-node-type != XML_DOCUMENT_NODE) { + if (obj_node-node != NULL) { obj_node-node-_private = NULL; } efree(obj_node); -- 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 /ext/standard/tests/strings explode.phpt
andrey Sun Jul 18 07:34:28 2004 EDT Modified files: /php-src/ext/standard string.c /php-src/ext/standard/tests/strings explode.phpt Log: Add support for negative values of limit of explode(). If limit is negative then all components are returned except the last abs(limit) ones. http://cvs.php.net/diff.php/php-src/ext/standard/string.c?r1=1.420r2=1.421ty=u Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.420 php-src/ext/standard/string.c:1.421 --- php-src/ext/standard/string.c:1.420 Sun Jul 11 17:15:04 2004 +++ php-src/ext/standard/string.c Sun Jul 18 07:34:28 2004 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.420 2004/07/11 21:15:04 andrey Exp $ */ +/* $Id: string.c,v 1.421 2004/07/18 11:34:28 andrey Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -784,8 +784,52 @@ } /* }}} */ +/* {{{ php_explode_negative_limit + */ +PHPAPI void php_explode_negative_limit(zval *delim, zval *str, zval *return_value, int limit) +{ +#define EXPLODE_ALLOC_STEP 50 + char *p1, *p2, *endp; + int allocated = EXPLODE_ALLOC_STEP, found = 0, i = 0, to_return = 0; + char **positions = safe_emalloc(allocated, sizeof(char *), 0); + + endp = Z_STRVAL_P(str) + Z_STRLEN_P(str); + + p1 = Z_STRVAL_P(str); + p2 = php_memnstr(Z_STRVAL_P(str), Z_STRVAL_P(delim), Z_STRLEN_P(delim), endp); + + if (p2 == NULL) { + /* + do nothing since limit = -1, thus if only one chunk - 1 + (limit) = 0 + by doing nothing we return empty array + */ + } else { + positions[found++] = p1; + do { + if (found = allocated) { + allocated = found + EXPLODE_ALLOC_STEP;/* make sure we have enough memory */ + positions = erealloc(positions, allocated*sizeof(char *)); + } + positions[found++] = p1 = p2 + Z_STRLEN_P(delim); + } while ((p2 = php_memnstr(p1, Z_STRVAL_P(delim), Z_STRLEN_P(delim), endp)) != NULL); + + to_return = limit + found; + /* limit is at least -1 therefore no need of bounds checking : i will be always less than found */ + for (i = 0;i to_return;i++) { /* this checks also for to_return 0 */ + add_next_index_stringl(return_value, positions[i], + (positions[i+1] - Z_STRLEN_P(delim)) - positions[i], + 1 + ); + } + } + efree(positions); +#undef EXPLODE_ALLOC_STEP +} +/* }}} */ + + /* {{{ proto array explode(string separator, string str [, int limit]) - Splits a string on string separator and return array of components */ + Splits a string on string separator and return array of components. If limit is positive only limit number of components is returned. If limit is negative all components except the last abs(limit) are returned. */ PHP_FUNCTION(explode) { zval **str, **delim, **zlimit = NULL; @@ -810,8 +854,16 @@ array_init(return_value); + if (! Z_STRLEN_PP(str)) { + add_next_index_stringl(return_value, , sizeof() - 1, 1); + return; + } + + if (limit == 0 || limit == 1) { add_index_stringl(return_value, 0, Z_STRVAL_PP(str), Z_STRLEN_PP(str), 1); + } else if (limit 0 argc == 3) { + php_explode_negative_limit(*delim, *str, return_value, limit); } else { php_explode(*delim, *str, return_value, limit); } http://cvs.php.net/diff.php/php-src/ext/standard/tests/strings/explode.phpt?r1=1.3r2=1.4ty=u Index: php-src/ext/standard/tests/strings/explode.phpt diff -u php-src/ext/standard/tests/strings/explode.phpt:1.3 php-src/ext/standard/tests/strings/explode.phpt:1.4 --- php-src/ext/standard/tests/strings/explode.phpt:1.3 Wed May 19 04:45:23 2004 +++ php-src/ext/standard/tests/strings/explode.phpt Sun Jul 18 07:34:28 2004 @@ -19,6 +19,14 @@ var_dump(@explode(a, aa)); var_dump(@explode(==, str_repeat(-=.ord(0).=-, 10))); var_dump(@explode(=, str_repeat(-=.ord(0).=-, 10))); +// +var_dump(explode(:,a lazy dog:jumps:over:,-1)); +var_dump(explode(:,a lazy dog:jumps:over, -1)); +var_dump(explode(:,a lazy dog:jumps:over, -2)); +var_dump(explode(:,a lazy dog:jumps:over:,-4)); +var_dump(explode(:,a lazy dog:jumps:over:,-40)); +var_dump(explode(:^:,a lazy dog:^:jumps::over:^:,-1)); +var_dump(explode(:^:,a lazy dog:^:jumps::over:^:,-2)); ? --EXPECTF-- 26d4e18734cb2582df5055e2175223df @@ -111,4 +119,36 @@ string(2) 48 [20]= string(1) - +} +array(3) { + [0]= + string(10) a lazy
[PHP-CVS] cvs: php-src / acinclude.m4 configure.in /build genif.sh order_by_dep.awk /ext/dom config.m4 /ext/simplexml config.m4 /ext/spl config.m4 /ext/xml config.m4 /ext/xsl config.m4
wez Sun Jul 18 08:03:51 2004 EDT Added files: /php-src/build order_by_dep.awk Modified files: /php-srcacinclude.m4 configure.in /php-src/build genif.sh /php-src/ext/domconfig.m4 /php-src/ext/simplexml config.m4 /php-src/ext/splconfig.m4 /php-src/ext/xmlconfig.m4 /php-src/ext/xslconfig.m4 Log: Implement extension load-order deps. http://cvs.php.net/diff.php/php-src/acinclude.m4?r1=1.271r2=1.272ty=u Index: php-src/acinclude.m4 diff -u php-src/acinclude.m4:1.271 php-src/acinclude.m4:1.272 --- php-src/acinclude.m4:1.271 Fri Mar 26 21:03:44 2004 +++ php-src/acinclude.m4Sun Jul 18 08:03:51 2004 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.271 2004/03/27 02:03:44 abies Exp $ +dnl $Id: acinclude.m4,v 1.272 2004/07/18 12:03:51 wez Exp $ dnl dnl This file contains local autoconf functions. @@ -1920,3 +1920,14 @@ LIBS=$old_LIBS ]) ]) + +dnl This macro is currently a placeholder in the config.m4 file +dnl it is scanned by genif.sh when it builds the internal functions +dnl list, so that modules can be init'd in the correct order +dnl $1 = name of extension, $2 = extension upon which it depends +dnl $3 = optional: if true, it's ok for $2 to have not been configured +dnl default is false and should halt the build. +dnl See ADD_EXTENSION_DEP in win32 build +AC_DEFUN(PHP_ADD_EXTENSION_DEP, []) + + http://cvs.php.net/diff.php/php-src/configure.in?r1=1.514r2=1.515ty=u Index: php-src/configure.in diff -u php-src/configure.in:1.514 php-src/configure.in:1.515 --- php-src/configure.in:1.514 Tue Jul 13 15:56:48 2004 +++ php-src/configure.inSun Jul 18 08:03:51 2004 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.514 2004/07/13 19:56:48 andi Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.515 2004/07/18 12:03:51 wez Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -130,7 +130,31 @@ PHP_PROG_RE2C AC_PROG_RANLIB AC_PROG_LN_S -AC_PROG_AWK + +dnl Some vendors force mawk before gawk; mawk is broken so we don't like that, +dnl and check manually +dnl AC_PROG_AWK +AC_CHECK_PROGS(AWK, gawk nawk awk mawk, bork, /usr/xpg4/bin/:$PATH) +case $AWK in + *mawk) + AC_MSG_WARN([mawk is known to have problems on some systems. You should install GNU awk]) + ;; + *gawk) + ;; + bork) + AC_MSG_ERROR([Could not find awk; Install GNU awk]) + ;; + *) + AC_MSG_CHECKING([if $AWK is broken]) + if ! $AWK 'function foo() {}' /dev/null 21 ; then + AC_MSG_RESULT([yes]) + AC_MSG_ERROR([You should install GNU awk]) + else + AC_MSG_RESULT([no - good!]) + fi + ;; +esac + AC_PROG_YACC if test $YACC != bison -y; then AC_MSG_WARN([You will need bison if you want to regenerate the PHP parsers.]) http://cvs.php.net/diff.php/php-src/build/genif.sh?r1=1.3r2=1.4ty=u Index: php-src/build/genif.sh diff -u php-src/build/genif.sh:1.3 php-src/build/genif.sh:1.4 --- php-src/build/genif.sh:1.3 Fri Mar 22 05:22:41 2002 +++ php-src/build/genif.sh Sun Jul 18 08:03:51 2004 @@ -1,6 +1,6 @@ #! /bin/sh -# $Id: genif.sh,v 1.3 2002/03/22 10:22:41 sas Exp $ +# $Id: genif.sh,v 1.4 2004/07/18 12:03:51 wez Exp $ # replacement for genif.pl infile=$1 @@ -17,13 +17,13 @@ exit 1 fi -module_ptrs=$extra_module_ptrs header_list= olddir=`pwd` cd $srcdir +module_ptrs=$extra_module_ptrs`echo $@ | $awk -f ./build/order_by_dep.awk` + for ext in ${1+$@} ; do - module_ptrs= phpext_${ext}_ptr,@[EMAIL PROTECTED] header_list=$header_list ext/$ext/*.h done http://cvs.php.net/diff.php/php-src/ext/dom/config.m4?r1=1.15r2=1.16ty=u Index: php-src/ext/dom/config.m4 diff -u php-src/ext/dom/config.m4:1.15 php-src/ext/dom/config.m4:1.16 --- php-src/ext/dom/config.m4:1.15 Sun Dec 7 10:37:30 2003 +++ php-src/ext/dom/config.m4 Sun Jul 18 08:03:51 2004 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.15 2003/12/07 15:37:30 sniper Exp $ +dnl $Id: config.m4,v 1.16 2004/07/18 12:03:51 wez Exp $ dnl PHP_ARG_ENABLE(dom, whether to enable DOM support, @@ -26,6 +26,7 @@ typeinfo.c domerror.c domlocator.c namednodemap.c userdatahandler.c], $ext_shared) PHP_SUBST(DOM_SHARED_LIBADD) + PHP_ADD_EXTENSION_DEP(dom, libxml) ], [ AC_MSG_ERROR([xml2-config not found. Please check your libxml2 installation.]) ]) http://cvs.php.net/diff.php/php-src/ext/simplexml/config.m4?r1=1.7r2=1.8ty=u Index: php-src/ext/simplexml/config.m4 diff -u php-src/ext/simplexml/config.m4:1.7 php-src/ext/simplexml/config.m4:1.8 --- php-src/ext/simplexml/config.m4:1.7 Wed Nov 12 18:42:35 2003 +++ php-src/ext/simplexml/config.m4 Sun Jul 18 08:03:51 2004 @@ -1,4 +1,4 @@ -dnl
[PHP-CVS] cvs: php-src / TODO-5.1
helly Sun Jul 18 08:08:36 2004 EDT Modified files: /php-srcTODO-5.1 Log: remove this entry http://cvs.php.net/diff.php/php-src/TODO-5.1?r1=1.5r2=1.6ty=u Index: php-src/TODO-5.1 diff -u php-src/TODO-5.1:1.5 php-src/TODO-5.1:1.6 --- php-src/TODO-5.1:1.5Fri Jul 16 03:16:53 2004 +++ php-src/TODO-5.1Sun Jul 18 08:08:35 2004 @@ -6,10 +6,6 @@ - Implement typehinting for arrays (apply the patch). (Andi, Marcus) - Find a keyword for the if-set-or operator (apply the patch). (Marcus, all) -Build System - - - Implement load order of built-in extensions (apply the patch). (Wez) - Standard Library - Implement new time/date parsing and handling functions. (Derick) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_0) /ext/dom document.c
rrichards Sun Jul 18 09:15:51 2004 EDT Modified files: (Branch: PHP_5_0) /php-src/ext/domdocument.c Log: add missing optional value param to createElementNS (chregu) http://cvs.php.net/diff.php/php-src/ext/dom/document.c?r1=1.55r2=1.55.2.1ty=u Index: php-src/ext/dom/document.c diff -u php-src/ext/dom/document.c:1.55 php-src/ext/dom/document.c:1.55.2.1 --- php-src/ext/dom/document.c:1.55 Mon May 31 08:50:28 2004 +++ php-src/ext/dom/document.c Sun Jul 18 09:15:50 2004 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: document.c,v 1.55 2004/05/31 12:50:28 rrichards Exp $ */ +/* $Id: document.c,v 1.55.2.1 2004/07/18 13:15:50 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -1063,7 +1063,7 @@ /* }}} end dom_document_import_node */ -/* {{{ proto DOMElement dom_document_create_element_ns(string namespaceURI, string qualifiedName); +/* {{{ proto DOMElement dom_document_create_element_ns(string namespaceURI, string qualifiedName [,string value]); URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-DocCrElNS Since: DOM Level 2 */ @@ -1073,13 +1073,13 @@ xmlDocPtr docp; xmlNodePtr nodep = NULL; xmlNsPtr nsptr = NULL; - int ret, uri_len = 0, name_len = 0; - char *uri, *name; + int ret, uri_len = 0, name_len = 0, value_len = 0; + char *uri, *name, *value = NULL; char *localname = NULL, *prefix = NULL; int errorcode; dom_object *intern; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), Os!s, id, dom_document_class_entry, uri, uri_len, name, name_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), Os!s|s, id, dom_document_class_entry, uri, uri_len, name, name_len, value, value_len) == FAILURE) { return; } @@ -1089,7 +1089,7 @@ if (errorcode == 0) { if (xmlValidateName((xmlChar *) localname, 0) == 0) { - nodep = xmlNewDocNode (docp, NULL, localname, NULL); + nodep = xmlNewDocNode (docp, NULL, localname, value); if (nodep != NULL uri != NULL) { nsptr = xmlSearchNsByHref (nodep-doc, nodep, uri); if (nsptr == NULL) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/xsl config.w32 /ext/xsl/tests exslt.xml exslt.xsl
rrichards Sun Jul 18 09:23:33 2004 EDT Modified files: /php-src/ext/xslconfig.w32 /php-src/ext/xsl/tests exslt.xml exslt.xsl Log: MFB: enable exslt support for win32 builds WS fixes for exslt tests http://cvs.php.net/diff.php/php-src/ext/xsl/config.w32?r1=1.8r2=1.9ty=u Index: php-src/ext/xsl/config.w32 diff -u php-src/ext/xsl/config.w32:1.8 php-src/ext/xsl/config.w32:1.9 --- php-src/ext/xsl/config.w32:1.8 Mon Dec 22 08:16:43 2003 +++ php-src/ext/xsl/config.w32 Sun Jul 18 09:23:33 2004 @@ -1,4 +1,4 @@ -// $Id: config.w32,v 1.8 2003/12/22 13:16:43 wez Exp $ +// $Id: config.w32,v 1.9 2004/07/18 13:23:33 rrichards Exp $ // vim: ft=javascript ARG_WITH(xsl, xsl support, no); @@ -6,16 +6,28 @@ if (PHP_XSL != no) { if (PHP_DOM == yes PHP_LIBXML == yes) { var ext_xsl_lib_found = false; + var ext_exslt_lib_found = false; if (CHECK_LIB(libxslt_a.lib, xsl, PHP_XSL)) { - ADD_FLAG(CFLAGS_XSL, /D LIBXSLT_STATIC ); ext_xsl_lib_found = true; + ADD_FLAG(CFLAGS_XSL, /D LIBXSLT_STATIC ); + if (CHECK_LIB(libexslt_a.lib, xsl, PHP_XSL)) { + ADD_FLAG(CFLAGS_XSL, /D LIBEXSLT_STATIC ); + ext_exslt_lib_found = true; + } } else if (CHECK_LIB(libxslt.lib, xsl, PHP_XSL)) { ext_xsl_lib_found = true; + if (CHECK_LIB(libexslt.lib, xsl, PHP_XSL)) { + ext_exslt_lib_found = true; + } } if (ext_xsl_lib_found CHECK_HEADER_ADD_INCLUDE(libxslt\\xslt.h, CFLAGS_XSL)) { - + if (ext_exslt_lib_found) { + if (CHECK_HEADER_ADD_INCLUDE(libexslt\\exslt.h, CFLAGS_XSL)) { + AC_DEFINE(HAVE_XSL_EXSLT, 1, ); + } + } EXTENSION(xsl, php_xsl.c xsltprocessor.c, PHP_XSL_SHARED); AC_DEFINE(HAVE_XSL, 1, Define if xsl extension is enabled); if (! PHP_XSL_SHARED) { http://cvs.php.net/diff.php/php-src/ext/xsl/tests/exslt.xml?r1=1.1r2=1.2ty=u Index: php-src/ext/xsl/tests/exslt.xml diff -u php-src/ext/xsl/tests/exslt.xml:1.1 php-src/ext/xsl/tests/exslt.xml:1.2 --- php-src/ext/xsl/tests/exslt.xml:1.1 Fri Nov 21 07:22:48 2003 +++ php-src/ext/xsl/tests/exslt.xml Sun Jul 18 09:23:33 2004 @@ -1,10 +1,9 @@ -?xml version=1.0? -page - !-- valid xs:date -- - date date=0001-12-31Z/ - date date=3000-01-31/ - date date=2000-02-29/ - date date=9990001-12-31Z/ - date date=-0004-02-29/ -/page - +?xml version=1.0? +page + !-- valid xs:date -- + date date=0001-12-31Z/ + date date=3000-01-31/ + date date=2000-02-29/ + date date=9990001-12-31Z/ + date date=-0004-02-29/ +/page http://cvs.php.net/diff.php/php-src/ext/xsl/tests/exslt.xsl?r1=1.1r2=1.2ty=u Index: php-src/ext/xsl/tests/exslt.xsl diff -u php-src/ext/xsl/tests/exslt.xsl:1.1 php-src/ext/xsl/tests/exslt.xsl:1.2 --- php-src/ext/xsl/tests/exslt.xsl:1.1 Fri Nov 21 07:22:48 2003 +++ php-src/ext/xsl/tests/exslt.xsl Sun Jul 18 09:23:33 2004 @@ -1,46 +1,45 @@ -?xml version=1.0 encoding=ISO-8859-1? -xsl:stylesheet version=1.0 -xmlns:xsl=http://www.w3.org/1999/XSL/Transform; -xmlns:date=http://exslt.org/dates-and-times; -extension-element-prefixes=date - -xsl:output method=text/ - -xsl:template match=date - Test Date : xsl:value-of select=@date/ -!-- dateTime, date, gYearMonth or gYear; else NaN -- -year : xsl:value-of select=date:year(@date)/ -!-- dateTime, date, gYearMonth or gYear; else NaN -- -leap-year: xsl:value-of select=date:leap-year(@date)/ -!-- dateTime, date, gYearMonth, gMonth or gMonthDay; else NaN -- -month-in-year: xsl:value-of select=date:month-in-year(@date)/ -!-- dateTime, date, gYearMonth or gMonth; else '' -- -month-name : xsl:value-of select=date:month-name(@date)/ -!-- dateTime, date, gYearMonth or gMonth; else '' -- -month-abbreviation : xsl:value-of select=date:month-abbreviation(@date)/ -!-- dateTime or date; else NaN -- -week-in-year : xsl:value-of select=date:week-in-year(@date)/ -!-- dateTime, date; else NaN -- -day-in-year : xsl:value-of select=date:day-in-year(@date)/ -!-- dateTime, date, gMonthDay or gDay; else NaN -- -day-in-month : xsl:value-of select=date:day-in-month(@date)/ -!-- dateTime, date; else NaN -- -day-of-week-in-month : xsl:value-of select=date:day-of-week-in-month(@date)/ -!-- dateTime, date; else NaN -- -day-in-week : xsl:value-of select=date:day-in-week(@date)/ -!-- dateTime or date; else NaN -- -day-name
[PHP-CVS] cvs: php-src /ext/dom documentfragment.c dom_fe.h
rrichards Sun Jul 18 09:47:44 2004 EDT Modified files: /php-src/ext/domdocumentfragment.c dom_fe.h Log: add appendXML() to DOMFragment (chregu) http://cvs.php.net/diff.php/php-src/ext/dom/documentfragment.c?r1=1.11r2=1.12ty=u Index: php-src/ext/dom/documentfragment.c diff -u php-src/ext/dom/documentfragment.c:1.11 php-src/ext/dom/documentfragment.c:1.12 --- php-src/ext/dom/documentfragment.c:1.11 Mon May 31 08:50:28 2004 +++ php-src/ext/dom/documentfragment.c Sun Jul 18 09:47:44 2004 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: documentfragment.c,v 1.11 2004/05/31 12:50:28 rrichards Exp $ */ +/* $Id: documentfragment.c,v 1.12 2004/07/18 13:47:44 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -37,6 +37,7 @@ zend_function_entry php_dom_documentfragment_class_functions[] = { PHP_ME(domdocumentfragment, __construct, NULL, ZEND_ACC_PUBLIC) + PHP_ME(domdocumentfragment, appendXML, NULL, ZEND_ACC_PUBLIC) {NULL, NULL, NULL} }; @@ -73,4 +74,32 @@ } } /* }}} end DOMDocumentFragment::__construct */ + +/* {{{ proto void DOMDocumentFragment::appendXML(string data); */ +PHP_METHOD(domdocumentfragment, appendXML) { + zval *id; + xmlNode *nodep; + dom_object *intern; + char *data = NULL; + int data_len = 0; + int err; + xmlNodePtr lst; + + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), Os, id, dom_documentfragment_class_entry, data, data_len) == FAILURE) { + return; + } + + DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); + + if (data) { + err = xmlParseBalancedChunkMemory(nodep-doc, NULL, NULL, 0, data, lst); + if (err != 0) { + RETURN_FALSE; + } + xmlAddChildList(nodep,lst); + } + + RETURN_TRUE; +} + #endif http://cvs.php.net/diff.php/php-src/ext/dom/dom_fe.h?r1=1.11r2=1.12ty=u Index: php-src/ext/dom/dom_fe.h diff -u php-src/ext/dom/dom_fe.h:1.11 php-src/ext/dom/dom_fe.h:1.12 --- php-src/ext/dom/dom_fe.h:1.11 Sun May 16 06:30:16 2004 +++ php-src/ext/dom/dom_fe.hSun Jul 18 09:47:44 2004 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: dom_fe.h,v 1.11 2004/05/16 10:30:16 rrichards Exp $ */ +/* $Id: dom_fe.h,v 1.12 2004/07/18 13:47:44 rrichards Exp $ */ #ifndef DOM_FE_H #define DOM_FE_H @@ -102,6 +102,7 @@ /* domdocumentfragment methods */ PHP_METHOD(domdocumentfragment, __construct); +PHP_METHOD(domdocumentfragment, appendXML); /* domdocument methods */ PHP_FUNCTION(dom_document_create_element); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard credits_ext.h
helly Sun Jul 18 10:04:36 2004 EDT Modified files: /php-src/ext/standard credits_ext.h Log: Update http://cvs.php.net/diff.php/php-src/ext/standard/credits_ext.h?r1=1.24r2=1.25ty=u Index: php-src/ext/standard/credits_ext.h diff -u php-src/ext/standard/credits_ext.h:1.24 php-src/ext/standard/credits_ext.h:1.25 --- php-src/ext/standard/credits_ext.h:1.24 Sun Mar 28 15:27:18 2004 +++ php-src/ext/standard/credits_ext.h Sun Jul 18 10:04:36 2004 @@ -71,9 +71,10 @@ CREDIT_LINE(Shared Memory Operations, Slava Poliakov, Ilia Alshanetsky); CREDIT_LINE(SimpleXML, Sterling Hughes, Marcus Boerger, Rob Richards); CREDIT_LINE(SNMP, Rasmus Lerdorf, Harrie Hazewinkel, Mike Jackson, Steven Lawrance, Johann Hanne); +CREDIT_LINE(SOAP, Brad Lafountain, Shane Caraveo, Dmitry Stogov); CREDIT_LINE(Sockets, Chris Vandomelen, Sterling Hughes, Daniel Beulshausen, Jason Greene); CREDIT_LINE(SPL, Marcus Boerger); -CREDIT_LINE(SQLite, Wez Furlong, Tal Peer, Marcus Börger, Ilia Alshanetsky); +CREDIT_LINE(SQLite, Wez Furlong, Tal Peer, Marcus Boerger, Ilia Alshanetsky); CREDIT_LINE(Sybase-CT, Zeev Suraski, Tom May, Timm Friebe); CREDIT_LINE(Sybase-DB, Zeev Suraski); CREDIT_LINE(System V Message based IPC, Wez Furlong); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard formatted_print.c /ext/standard/tests/strings bug22207.phpt bug28633.phpt
iliaa Sun Jul 18 13:27:49 2004 EDT Added files: /php-src/ext/standard/tests/strings bug28633.phpt Modified files: /php-src/ext/standard formatted_print.c /php-src/ext/standard/tests/strings bug22207.phpt Log: Fixed bug #28633 (sprintf incorrectly adding padding to floats). http://cvs.php.net/diff.php/php-src/ext/standard/formatted_print.c?r1=1.77r2=1.78ty=u Index: php-src/ext/standard/formatted_print.c diff -u php-src/ext/standard/formatted_print.c:1.77 php-src/ext/standard/formatted_print.c:1.78 --- php-src/ext/standard/formatted_print.c:1.77 Wed May 19 12:46:29 2004 +++ php-src/ext/standard/formatted_print.c Sun Jul 18 13:27:49 2004 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: formatted_print.c,v 1.77 2004/05/19 16:46:29 abies Exp $ */ +/* $Id: formatted_print.c,v 1.78 2004/07/18 17:27:49 iliaa Exp $ */ #include math.h /* modf() */ #include php.h @@ -398,9 +398,6 @@ numbuf[i] = '\0'; - if (precision 0) { - width += (precision + 1); - } php_sprintf_appendstring(buffer, pos, size, numbuf, width, 0, padding, alignment, i, sign, 0, always_sign); } http://cvs.php.net/diff.php/php-src/ext/standard/tests/strings/bug22207.phpt?r1=1.1r2=1.2ty=u Index: php-src/ext/standard/tests/strings/bug22207.phpt diff -u php-src/ext/standard/tests/strings/bug22207.phpt:1.1 php-src/ext/standard/tests/strings/bug22207.phpt:1.2 --- php-src/ext/standard/tests/strings/bug22207.phpt:1.1Thu Feb 13 12:25:31 2003 +++ php-src/ext/standard/tests/strings/bug22207.phptSun Jul 18 13:27:49 2004 @@ -7,5 +7,5 @@ ? --EXPECT-- 1.1000e+0 -string(17)1.1000e+0 +string(11) 1.1000e+0 http://cvs.php.net/co.php/php-src/ext/standard/tests/strings/bug28633.phpt?r=1.1p=1 Index: php-src/ext/standard/tests/strings/bug28633.phpt +++ php-src/ext/standard/tests/strings/bug28633.phpt --TEST-- Bug #28633 (sprintf incorrectly adding padding to floats) --FILE-- ?php echo sprintf(%05.2f, 0.02) . \n; echo sprintf(%05.2f, 2.02) . \n; ? --EXPECT-- 00.02 02.02 -- 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 formatted_print.c /ext/standard/tests/strings bug22207.phpt bug28633.phpt
iliaa Sun Jul 18 13:29:46 2004 EDT Added files: (Branch: PHP_4_3) /php-src/ext/standard/tests/strings bug28633.phpt Modified files: /php-src/ext/standard formatted_print.c /php-src/ext/standard/tests/strings bug22207.phpt /php-srcNEWS Log: MFH: Fixed bug #28633 (sprintf incorrectly adding padding to floats). http://cvs.php.net/diff.php/php-src/ext/standard/formatted_print.c?r1=1.59.2.10r2=1.59.2.11ty=u Index: php-src/ext/standard/formatted_print.c diff -u php-src/ext/standard/formatted_print.c:1.59.2.10 php-src/ext/standard/formatted_print.c:1.59.2.11 --- php-src/ext/standard/formatted_print.c:1.59.2.10Sun May 16 17:20:30 2004 +++ php-src/ext/standard/formatted_print.c Sun Jul 18 13:29:45 2004 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: formatted_print.c,v 1.59.2.10 2004/05/16 21:20:30 helly Exp $ */ +/* $Id: formatted_print.c,v 1.59.2.11 2004/07/18 17:29:45 iliaa Exp $ */ #include math.h /* modf() */ #include php.h @@ -398,9 +398,6 @@ numbuf[i] = '\0'; - if (precision 0) { - width += (precision + 1); - } php_sprintf_appendstring(buffer, pos, size, numbuf, width, 0, padding, alignment, i, sign, 0, always_sign); } http://cvs.php.net/diff.php/php-src/ext/standard/tests/strings/bug22207.phpt?r1=1.1.2.1r2=1.1.2.2ty=u Index: php-src/ext/standard/tests/strings/bug22207.phpt diff -u php-src/ext/standard/tests/strings/bug22207.phpt:1.1.2.1 php-src/ext/standard/tests/strings/bug22207.phpt:1.1.2.2 --- php-src/ext/standard/tests/strings/bug22207.phpt:1.1.2.1Thu Feb 13 12:26:02 2003 +++ php-src/ext/standard/tests/strings/bug22207.phptSun Jul 18 13:29:45 2004 @@ -7,5 +7,5 @@ ? --EXPECT-- 1.1000e+0 -string(17)1.1000e+0 +string(11) 1.1000e+0 http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.703r2=1.1247.2.704ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.703 php-src/NEWS:1.1247.2.704 --- php-src/NEWS:1.1247.2.703 Fri Jul 16 01:08:15 2004 +++ php-src/NEWSSun Jul 18 13:29:45 2004 @@ -33,6 +33,7 @@ (Ilia) - Fixed bug #28649 (Proper glob() return value on Linux when there are no matches). (Ilia) +- Fixed bug #28633 (sprintf incorrectly adding padding to floats). (Ilia) - Fixed bug #28627 (When multiple MySQL links are used default link is leaked). (gavin at ipalsoftware dot com, Ilia) - Fixed bug #28525 (gmp_powm() does not work with hexadecimal string modulo http://cvs.php.net/co.php/php-src/ext/standard/tests/strings/bug28633.phpt?r=1.1p=1 Index: php-src/ext/standard/tests/strings/bug28633.phpt +++ php-src/ext/standard/tests/strings/bug28633.phpt --TEST-- Bug #28633 (sprintf incorrectly adding padding to floats) --FILE-- ?php echo sprintf(%05.2f, 0.02) . \n; echo sprintf(%05.2f, 2.02) . \n; ? --EXPECT-- 00.02 02.02 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mbstring/oniguruma oniguruma.h php_compat.h php_onig_compat.h
moriyoshi Mon Jul 19 01:04:33 2004 EDT Added files: /php-src/ext/mbstring/oniguruma php_onig_compat.h Removed files: /php-src/ext/mbstring/oniguruma php_compat.h Modified files: /php-src/ext/mbstring/oniguruma oniguruma.h Log: - Rename php_compat.h to php_onig_compat.h to avoid name conflict. (reported by Joe Orton, thanks.) http://cvs.php.net/diff.php/php-src/ext/mbstring/oniguruma/oniguruma.h?r1=1.3r2=1.4ty=u Index: php-src/ext/mbstring/oniguruma/oniguruma.h diff -u php-src/ext/mbstring/oniguruma/oniguruma.h:1.3 php-src/ext/mbstring/oniguruma/oniguruma.h:1.4 --- php-src/ext/mbstring/oniguruma/oniguruma.h:1.3 Thu Mar 4 16:50:20 2004 +++ php-src/ext/mbstring/oniguruma/oniguruma.h Mon Jul 19 01:04:33 2004 @@ -8,7 +8,7 @@ #ifndef ONIGURUMA_H #define ONIGURUMA_H -#include php_compat.h +#include php_onig_compat.h #define ONIGURUMA #define ONIGURUMA_VERSION_MAJOR 2 http://cvs.php.net/co.php/php-src/ext/mbstring/oniguruma/php_onig_compat.h?r=1.1p=1 Index: php-src/ext/mbstring/oniguruma/php_onig_compat.h +++ php-src/ext/mbstring/oniguruma/php_onig_compat.h #ifndef _PHP_MBREGEX_COMPAT_H #define _PHP_MBREGEX_COMPAT_H #define re_pattern_buffer php_mb_re_pattern_buffer #define regex_t php_mb_regex_t #endif /* _PHP_MBREGEX_COMPAT_H */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_0) /ext/mbstring/oniguruma oniguruma.h php_compat.h php_onig_compat.h
moriyoshi Mon Jul 19 01:06:02 2004 EDT Added files: (Branch: PHP_5_0) /php-src/ext/mbstring/oniguruma php_onig_compat.h Removed files: /php-src/ext/mbstring/oniguruma php_compat.h Modified files: /php-src/ext/mbstring/oniguruma oniguruma.h Log: - MFH: rename php_compat.h to php_onig_compat.h to avoid name conflict. (reported by Joe Orton, thanks.) http://cvs.php.net/diff.php/php-src/ext/mbstring/oniguruma/oniguruma.h?r1=1.3r2=1.3.2.1ty=u Index: php-src/ext/mbstring/oniguruma/oniguruma.h diff -u php-src/ext/mbstring/oniguruma/oniguruma.h:1.3 php-src/ext/mbstring/oniguruma/oniguruma.h:1.3.2.1 --- php-src/ext/mbstring/oniguruma/oniguruma.h:1.3 Thu Mar 4 16:50:20 2004 +++ php-src/ext/mbstring/oniguruma/oniguruma.h Mon Jul 19 01:06:01 2004 @@ -8,7 +8,7 @@ #ifndef ONIGURUMA_H #define ONIGURUMA_H -#include php_compat.h +#include php_onig_compat.h #define ONIGURUMA #define ONIGURUMA_VERSION_MAJOR 2 http://cvs.php.net/co.php/php-src/ext/mbstring/oniguruma/php_onig_compat.h?r=1.1p=1 Index: php-src/ext/mbstring/oniguruma/php_onig_compat.h +++ php-src/ext/mbstring/oniguruma/php_onig_compat.h #ifndef _PHP_MBREGEX_COMPAT_H #define _PHP_MBREGEX_COMPAT_H #define re_pattern_buffer php_mb_re_pattern_buffer #define regex_t php_mb_regex_t #endif /* _PHP_MBREGEX_COMPAT_H */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_0) /ext/mbstring config.m4
moriyoshi Mon Jul 19 01:09:47 2004 EDT Modified files: (Branch: PHP_5_0) /php-src/ext/mbstring config.m4 Log: - MFH (config.m4: 1.52): Fix VPATH build. (patch by Joe Orton) http://cvs.php.net/diff.php/php-src/ext/mbstring/config.m4?r1=1.51r2=1.51.2.1ty=u Index: php-src/ext/mbstring/config.m4 diff -u php-src/ext/mbstring/config.m4:1.51 php-src/ext/mbstring/config.m4:1.51.2.1 --- php-src/ext/mbstring/config.m4:1.51 Thu Jun 10 10:06:17 2004 +++ php-src/ext/mbstring/config.m4 Mon Jul 19 01:09:46 2004 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.51 2004/06/10 14:06:17 iliaa Exp $ +dnl $Id: config.m4,v 1.51.2.1 2004/07/19 05:09:46 moriyoshi Exp $ dnl AC_DEFUN([PHP_MBSTRING_ADD_SOURCES], [ @@ -84,6 +84,7 @@ PHP_MBSTRING_ADD_CFLAG([-DNOT_RUBY]) PHP_MBSTRING_ADD_BUILD_DIR([oniguruma]) +PHP_MBSTRING_ADD_BUILD_DIR([oniguruma/enc]) PHP_MBSTRING_ADD_INCLUDE([oniguruma]) PHP_MBSTRING_ADD_CONFIG_HEADER([oniguruma/config.h]) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php