Re: [PHP-CVS] cvs: php4 / configure.in /sapi/cgi README.FastCGI cgi_main.c config9.m4 /sapi/cgi/libfcgi fcgiapp.c os_unix.c /sapi/cgi/libfcgi/include fcgi_config.h fcgi_config_win32.h fcgios.h
> Another thing i saw in cgi: > len = snprintf(buf, SAPI_CGI_MAX_HEADER_LENGTH, > "%s\r\n", > SG(sapi_headers).http_status_line); > > if (len > SAPI_CGI_MAX_HEADER_LENGTH) { > len = SAPI_CGI_MAX_HEADER_LENGTH; > } > > The problem here is that the headers could be cut of so that "\r\n" is lost. > As this is needed i suggest the following patch. Please check it since i am > not sure if it is really correct (the question is length calculation/and sorry > for not having the time to check myself). Hi Marcus, I did this last week and I dont think there is need to fix it. It only applies to HTTP/1.x response code headers and those can hardly be 1K in length. I only put the check to prevent intentional misuse (buffer overflow) which cannot happen in noram use situatuion. Edin -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / configure.in
helly Tue Nov 26 06:30:11 2002 EDT Modified files: /php4 configure.in Log: Highlight "Thank you" Index: php4/configure.in diff -u php4/configure.in:1.402 php4/configure.in:1.403 --- php4/configure.in:1.402 Tue Nov 26 00:51:15 2002 +++ php4/configure.in Tue Nov 26 06:30:08 2002 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.402 2002/11/26 05:51:15 shane Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.403 2002/11/26 11:30:08 helly Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -1311,8 +1311,10 @@ | avoid using it if possible.| ++ +X +PHP_CONFIGURE_PART(Thank you for using PHP.) +cat
[PHP-CVS] cvs: php4 /ext/dba config.m4
helly Tue Nov 26 07:00:26 2002 EDT Modified files: /php4/ext/dba config.m4 Log: -Disallow combining db2 with db3 which are conflicting. -Stop searching for headers and libraries when found. -Check version for Berkeley DB library headers. Index: php4/ext/dba/config.m4 diff -u php4/ext/dba/config.m4:1.30 php4/ext/dba/config.m4:1.31 --- php4/ext/dba/config.m4:1.30 Fri Nov 15 16:28:42 2002 +++ php4/ext/dba/config.m4 Tue Nov 26 07:00:25 2002 @@ -1,8 +1,12 @@ dnl -dnl $Id: config.m4,v 1.30 2002/11/15 21:28:42 helly Exp $ +dnl $Id: config.m4,v 1.31 2002/11/26 12:00:25 helly Exp $ dnl -dnl Suppose we need FlatFile if no or only CDB is used. +dnl Suppose we need FlatFile if no support or only CDB is used. + +AC_DEFUN(PHP_DBA_STD_BEGIN,[ + unset THIS_INCLUDE THIS_INC_DIR THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT +]) AC_DEFUN(PHP_TEMP_LDFLAGS,[ old_LDFLAGS=$LDFLAGS @@ -14,7 +18,6 @@ dnl Assign INCLUDE/LFLAGS from PREFIX AC_DEFUN(PHP_DBA_STD_ASSIGN,[ if test -n "$THIS_PREFIX" && test "$THIS_PREFIX" != "/usr"; then -THIS_INCLUDE=$THIS_PREFIX/include THIS_LFLAGS=$THIS_PREFIX/lib fi ]) @@ -22,30 +25,44 @@ dnl Standard check AC_DEFUN(PHP_DBA_STD_CHECK,[ THIS_RESULT="yes" - if test "$THIS_PREFIX" != "/usr" -a "$THIS_INCLUDE" = ""; then + if test -z "$THIS_INCLUDE"; then AC_MSG_ERROR(cannot find necessary header file(s)) fi - if test "$THIS_LIBS" = "" ; then + if test -z "$THIS_LIBS"; then AC_MSG_ERROR(cannot find necessary library) fi ]) dnl Attach THIS_x to DBA_x AC_DEFUN(PHP_DBA_STD_ATTACH,[ - PHP_ADD_INCLUDE($THIS_INCLUDE) + if test -n "$THIS_INC_DIR" -a "$THIS_PREFIX" != "/usr"; then +PHP_ADD_INCLUDE($THIS_INC_DIR) + fi PHP_ADD_LIBRARY_WITH_PATH($THIS_LIBS, $THIS_LFLAGS, DBA_SHARED_LIBADD) - unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX + unset THIS_INCLUDE THIS_INC_DIR THIS_LIBS THIS_LFLAGS THIS_PREFIX ]) dnl Print the result message +dnl parameters(name [, full name [, empty or error message]]) AC_DEFUN(AC_DBA_STD_RESULT,[ + THIS_NAME=[]translit($1,a-z0-9-,A-Z0-9_) + if test -n "$2"; then +THIS_FULL_NAME="$2" + else +THIS_FULL_NAME="$THIS_NAME" + fi + AC_MSG_CHECKING(for $THIS_FULL_NAME support) + if test -n "$3"; then +AC_MSG_ERROR($3) + fi if test "$THIS_RESULT" = "yes" -o "$THIS_RESULT" = "builtin"; then HAVE_DBA=1 +eval HAVE_$THIS_NAME=1 AC_MSG_RESULT($THIS_RESULT) else AC_MSG_RESULT(no) fi - unset THIS_RESULT + unset THIS_RESULT THIS_NAME THIS_FULL_NAME ]) PHP_ARG_ENABLE(dba,whether to enable DBA, @@ -54,163 +71,200 @@ AC_ARG_WITH(gdbm, [ --with-gdbm[=DIR] Include GDBM support],[ if test "$withval" != "no"; then -for i in /usr/local /usr $withval; do +PHP_DBA_STD_BEGIN +for i in $withval /usr/local /usr; do if test -f "$i/include/gdbm.h"; then -THIS_PREFIX="$i" +THIS_PREFIX=$i +THIS_INCLUDE=$i/include/gdbm.h +THIS_INC_DIR=$i/include +break fi done -unset ac_cv_lib_gdbm_gdbm_open -PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib,[ -AC_CHECK_LIB(gdbm, gdbm_open, [AC_DEFINE(DBA_GDBM, 1, [ ]) THIS_LIBS=gdbm]) -]) +if test -n "$THIS_INCLUDE"; then + unset ac_cv_lib_gdbm_gdbm_open + PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib,[ +AC_CHECK_LIB(gdbm, gdbm_open, [ + AC_DEFINE(DBA_GDBM, 1, [ ]) + THIS_LIBS=gdbm + break +]) + ]) +fi PHP_DBA_STD_ASSIGN PHP_DBA_STD_CHECK PHP_DBA_STD_ATTACH fi ]) -AC_MSG_CHECKING(for GDBM support) -AC_DBA_STD_RESULT +AC_DBA_STD_RESULT(gdbm) AC_ARG_WITH(ndbm, [ --with-ndbm[=DIR] Include NDBM support],[ if test "$withval" != "no"; then -for i in /usr/local /usr $withval; do - if test -f "$i/include/db1/ndbm.h" ; then -THIS_PREFIX=$i -NDBM_EXTRA=db1/ndbm.h - elif test -f "$i/include/ndbm.h" ; then +PHP_DBA_STD_BEGIN +for i in $withval /usr/local /usr; do + if test -f "$i/include/ndbm.h"; then +THIS_PREFIX=$i +THIS_INCLUDE=$i/include/ndbm.h +break + elif test -f "$i/include/db1/ndbm.h"; then THIS_PREFIX=$i -NDBM_EXTRA=ndbm.h +THIS_INCLUDE=$i/include/db1/ndbm.h +break fi - done +done -if test "$NDBM_EXTRA" != ""; then - AC_DEFINE_UNQUOTED(NDBM_INCLUDE_FILE, "$NDBM_EXTRA", [ ]) +if test -n "$THIS_INCLUDE"; then + AC_DEFINE_UNQUOTED(NDBM_INCLUDE_FILE, "$THIS_INCLUDE", [ ]) + for LIB in ndbm db1 c; do +PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib,[ + AC_CHECK_LIB($LIB, dbm_open, [ +AC_DEFINE(DBA_NDBM,1, [ ]) +THIS_LIBS=$LIB +break + ]) +]) + done fi -for LIB in db1 ndbm c; do - PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib,[ - AC_CHECK_LIB($LIB, dbm_open, [AC_DEFINE(DBA_NDBM,1, [ ]) THIS_LIBS=$LIB]) -
[PHP-CVS] cvs: php4 /ext/dba config.m4 dba.c dba_db4.c php_db4.h
helly Tue Nov 26 07:05:59 2002 EDT Added files: /php4/ext/dba dba_db4.c php_db4.h Modified files: /php4/ext/dba config.m4 dba.c Log: Add Berkeley db4 support Index: php4/ext/dba/config.m4 diff -u php4/ext/dba/config.m4:1.31 php4/ext/dba/config.m4:1.32 --- php4/ext/dba/config.m4:1.31 Tue Nov 26 07:00:25 2002 +++ php4/ext/dba/config.m4 Tue Nov 26 07:05:59 2002 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.31 2002/11/26 12:00:25 helly Exp $ +dnl $Id: config.m4,v 1.32 2002/11/26 12:05:59 helly Exp $ dnl dnl Suppose we need FlatFile if no support or only CDB is used. @@ -167,10 +167,45 @@ PHP_DBA_STD_ATTACH ]) +AC_ARG_WITH(db4, +[ --with-db4[=DIR]Include Berkeley DB4 support],[ + if test "$withval" != "no"; then +PHP_DBA_STD_BEGIN +for i in $withval /usr/local/BerkeleyDB.4.1 /usr/local/BerkeleyDB.4.0 /usr/local +/usr; do + if test -f "$i/db4/db.h"; then +THIS_PREFIX=$i +THIS_INCLUDE=$i/db4/db.h +break + elif test -f "$i/include/db4/db.h"; then +THIS_PREFIX=$i +THIS_INCLUDE=$i/include/db4/db.h +break + elif test -f "$i/include/db/db4.h"; then +THIS_PREFIX=$i +THIS_INCLUDE=$i/include/db/db4.h +break + elif test -f "$i/include/db4.h"; then +THIS_PREFIX=$i +THIS_INCLUDE=$i/include/db4.h +break + elif test -f "$i/include/db.h"; then +THIS_PREFIX=$i +THIS_INCLUDE=$i/include/db.h +break + fi +done +PHP_DBA_DB_CHECK(4, db-4.1 db-4 db4 db, db_create) + fi +]) +AC_DBA_STD_RESULT(db4,Berkeley DB4) + AC_ARG_WITH(db3, [ --with-db3[=DIR]Include Berkeley DB3 support],[ if test "$withval" != "no"; then PHP_DBA_STD_BEGIN +if test "$HAVE_DB4" = "1"; then + AC_DBA_STD_RESULT(db3,Berkeley DB3,You cannot combine --with-db3 with +--with-db4) +fi for i in $withval /usr/local/BerkeleyDB.3.3 /usr/local/BerkeleyDB.3.2 /usr/local/BerkeleyDB.3.1 /usr/local/BerkeleyDB.3.0 /usr/local /usr; do if test -f "$i/db3/db.h"; then THIS_PREFIX=$i @@ -203,8 +238,8 @@ [ --with-db2[=DIR]Include Berkeley DB2 support],[ if test "$withval" != "no"; then PHP_DBA_STD_BEGIN -if test "$HAVE_DB3" = "1"; then - AC_DBA_STD_RESULT(db2,Berkeley DB2,You cannot combine --with-db2 with --with-db3) +if test "$HAVE_DB3" = "1" -o "$HAVE_DB4" = "1"; then + AC_DBA_STD_RESULT(db2,Berkeley DB2,You cannot combine --with-db2 with +--with-db3 or --with-db4) fi for i in $withval $withval/BerkeleyDB /usr/BerkeleyDB /usr/local /usr; do if test -f "$i/db2/db.h"; then @@ -339,7 +374,7 @@ if test "$HAVE_DBA" = "1"; then AC_MSG_RESULT(yes) AC_DEFINE(HAVE_DBA, 1, [ ]) - PHP_NEW_EXTENSION(dba, dba.c dba_cdb.c dba_db2.c dba_dbm.c dba_gdbm.c dba_ndbm.c dba_db3.c $cdb_sources $flat_sources, $ext_shared) + PHP_NEW_EXTENSION(dba, dba.c dba_cdb.c dba_db2.c dba_dbm.c dba_gdbm.c dba_ndbm.c +dba_db3.c dba_db4.c $cdb_sources $flat_sources, $ext_shared) PHP_SUBST(DBA_SHARED_LIBADD) else AC_MSG_RESULT(no) Index: php4/ext/dba/dba.c diff -u php4/ext/dba/dba.c:1.64 php4/ext/dba/dba.c:1.65 --- php4/ext/dba/dba.c:1.64 Fri Nov 22 10:47:47 2002 +++ php4/ext/dba/dba.c Tue Nov 26 07:05:59 2002 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: dba.c,v 1.64 2002/11/22 15:47:47 helly Exp $ */ +/* $Id: dba.c,v 1.65 2002/11/26 12:05:59 helly Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -44,6 +44,7 @@ #include "php_cdb.h" #include "php_db2.h" #include "php_db3.h" +#include "php_db4.h" #include "php_flatfile.h" /* {{{ dba_functions[] @@ -195,6 +196,9 @@ #endif #if DBA_DB3 DBA_HND(db3, DBA_LOCK_ALL) /* No lock in lib */ +#endif +#if DBA_DB4 + DBA_HND(db4, DBA_LOCK_ALL) /* No lock in lib */ #endif #if DBA_FLATFILE DBA_HND(flatfile, DBA_STREAM_OPEN|DBA_LOCK_ALL) /* No lock in lib */ Index: php4/ext/dba/dba_db4.c +++ php4/ext/dba/dba_db4.c /* +--+ | PHP Version 4| +--+ | Copyright (c) 1997-2002 The PHP Group| +--+ | This source file is subject to version 2.02 of the PHP license, | | that is bundled with this package in the file LICENSE, and is| | available at through the world-wide-web at | | http://www.php.net/license/2_02.txt. | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | [EMAIL PROTECTED] so we can mail you a copy immed
[PHP-CVS] cvs: php4 /ext/calendar calendar.c
wez Tue Nov 26 09:52:01 2002 EDT Modified files: /php4/ext/calendar calendar.c Log: Update to use new parameter parsing API. Updates to Jewish/Hebrew calendar code. Patch from Moshe Doron, amended by Tal Peer, reviewed by me. # Maybe Tal and/or Moshe could comment on whether this should # also be commited to the 4_3 branch (it completes some earlier work # started prior to the branch). Index: php4/ext/calendar/calendar.c diff -u php4/ext/calendar/calendar.c:1.31 php4/ext/calendar/calendar.c:1.32 --- php4/ext/calendar/calendar.c:1.31 Mon Nov 25 07:30:22 2002 +++ php4/ext/calendar/calendar.cTue Nov 26 09:52:00 2002 @@ -18,7 +18,7 @@ | Wez Furlong <[EMAIL PROTECTED]>| +--+ */ -/* $Id: calendar.c,v 1.31 2002/11/25 12:30:22 hholzgra Exp $ */ +/* $Id: calendar.c,v 1.32 2002/11/26 14:52:00 wez Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -34,7 +34,7 @@ #include "sdncal.h" #include - + function_entry calendar_functions[] = { PHP_FE(jdtogregorian, NULL) PHP_FE(gregoriantojd, NULL) @@ -48,10 +48,10 @@ PHP_FE(jdmonthname, NULL) PHP_FE(easter_date, NULL) PHP_FE(easter_days, NULL) - PHP_FE(unixtojd,NULL) - PHP_FE(jdtounix,NULL) - PHP_FE(cal_to_jd, NULL) - PHP_FE(cal_from_jd, NULL) + PHP_FE(unixtojd, NULL) + PHP_FE(jdtounix, NULL) + PHP_FE(cal_to_jd, NULL) + PHP_FE(cal_from_jd, NULL) PHP_FE(cal_days_in_month, NULL) PHP_FE(cal_info, NULL) {NULL, NULL, NULL} @@ -60,8 +60,8 @@ zend_module_entry calendar_module_entry = { STANDARD_MODULE_HEADER, - "calendar", - calendar_functions, + "calendar", + calendar_functions, PHP_MINIT(calendar), NULL, NULL, @@ -74,7 +74,6 @@ #ifdef COMPILE_DL_CALENDAR ZEND_GET_MODULE(calendar) #endif - /* this order must match the conversion table below */ enum cal_name_type_t { CAL_GREGORIAN = 0, @@ -83,60 +82,73 @@ CAL_FRENCH, CAL_NUM_CALS }; -typedef long int (*cal_to_jd_func_t)(int month, int day, int year); -typedef void (*cal_from_jd_func_t)(long int jd, int* year, int* month, int* day); -typedef char* (*cal_as_string_func_t)(int year, int month, int day); +typedef long int (*cal_to_jd_func_t) (int month, int day, int year); +typedef void (*cal_from_jd_func_t) (long int jd, int *year, int *month, int *day); +typedef char *(*cal_as_string_func_t) (int year, int month, int day); struct cal_entry_t { - char*name; - char*symbol; - cal_to_jd_func_tto_jd; - cal_from_jd_func_t from_jd; - int num_months; - int max_days_in_month; - char**month_name_short; - char**month_name_long; + char *name; + char *symbol; + cal_to_jd_func_t to_jd; + cal_from_jd_func_t from_jd; + int num_months; + int max_days_in_month; + char **month_name_short; + char **month_name_long; }; static struct cal_entry_t cal_conversion_table[CAL_NUM_CALS] = { - { "Gregorian", "CAL_GREGORIAN", GregorianToSdn, SdnToGregorian, 12, 31, MonthNameShort, MonthNameLong }, - { "Julian", "CAL_JULIAN", JulianToSdn, SdnToJulian, 12, 31, MonthNameShort, MonthNameLong }, - { "Jewish", "CAL_JEWISH", JewishToSdn, SdnToJewish, 13, 30, JewishMonthName, JewishMonthName }, - { "French", "CAL_FRENCH", FrenchToSdn, SdnToFrench, 13, 30, FrenchMonthName, FrenchMonthName } + {"Gregorian", "CAL_GREGORIAN", GregorianToSdn, SdnToGregorian, 12, 31, +MonthNameShort, MonthNameLong}, + {"Julian", "CAL_JULIAN", JulianToSdn, SdnToJulian, 12, 31, +MonthNameShort, MonthNameLong}, + {"Jewish", "CAL_JEWISH", JewishToSdn, SdnToJewish, 13, 30, +JewishMonthName, JewishMonthName}, + {"French", "CAL_FRENCH", FrenchToSdn, SdnToFrench, 13, 30, +FrenchMonthName, FrenchMonthName} }; /* For jddayofweek */ -enum { CAL_DOW_DAYNO, CAL_DOW_SHORT, CAL_DOW_LONG }; +enum { CAL_DOW_DAYNO, CAL_DOW_SHORT, CAL_DOW_LONG }; /* For jdmonthname */ -enum { CAL_MONTH_GREGORIAN_SHORT, CAL_MONTH_GREGORIAN_LONG, +enum { CAL_MONTH_GREGORIAN_SHORT, CAL_MONTH_GREGORIAN_LONG, CAL_MONTH_JULIAN_SHORT, CAL_MONTH_JULIAN_LONG, CAL_MONTH_JEWISH, - CAL_MONTH_FRENCH }; + CAL_MONTH_FRENCH +}; /* for heb_number_to_chars */ static char alef_bet[25] = "0àáâãäåæçèéëìîðñòôö÷øùú"; - + +#define CAL_JEWISH_ADD_ALAFIM_GERESH 0x2 +#define CAL_JEWISH_ADD_ALAFIM 0x4 +#define CAL_JEWISH_ADD_GERESHAYIM 0x8 + PHP_MINIT_FUNCTION(calendar) { - REGISTER_
[PHP-CVS] cvs: php4 /ext/domxml php_domxml.c
chregu Tue Nov 26 10:37:55 2002 EDT Modified files: /php4/ext/domxmlphp_domxml.c Log: Fix for Bug #20639 DomElement->get_elements_by_tagname() doesn't work Index: php4/ext/domxml/php_domxml.c diff -u php4/ext/domxml/php_domxml.c:1.219 php4/ext/domxml/php_domxml.c:1.220 --- php4/ext/domxml/php_domxml.c:1.219 Fri Nov 15 06:06:13 2002 +++ php4/ext/domxml/php_domxml.cTue Nov 26 10:37:54 2002 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_domxml.c,v 1.219 2002/11/15 11:06:13 helly Exp $ */ +/* $Id: php_domxml.c,v 1.220 2002/11/26 15:37:54 chregu Exp $ */ /* TODO * - Support Notation Nodes @@ -616,11 +616,12 @@ } } -static xmlNodeSetPtr php_get_elements_by_tagname(xmlNodePtr n, xmlChar* name) +static xmlNodeSetPtr php_get_elements_by_tagname(xmlNodePtr n, xmlChar* name, +xmlNodeSet *rv ) { - xmlNodeSetPtr rv = NULL; xmlNodePtr cld = NULL; - + /* TODO + Namespace support +*/ if ( n != NULL && name != NULL ) { cld = n->children; while ( cld != NULL ) { @@ -632,6 +633,7 @@ xmlXPathNodeSetAdd( rv, cld ); } } + rv = php_get_elements_by_tagname(cld, name, rv); cld = cld->next; } } @@ -3042,7 +3044,7 @@ xmlNode *nodep; int name_len,i; char *name; - xmlNodeSet *nodesetp; + xmlNodeSet *nodesetp = NULL; DOMXML_PARAM_TWO(nodep, id, le_domxmlelementp, "s", &name, &name_len); @@ -3053,7 +3055,7 @@ RETURN_FALSE; } - nodesetp = php_get_elements_by_tagname(nodep,name); + nodesetp = php_get_elements_by_tagname(nodep, name, NULL); if(nodesetp) { for (i = 0; i < nodesetp->nodeNr; i++) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/domxml php_domxml.c
chregu Tue Nov 26 10:39:15 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/domxmlphp_domxml.c Log: MFH (Fix for Bug #20639 DomElement->get_elements_by_tagname() doesn't work) Index: php4/ext/domxml/php_domxml.c diff -u php4/ext/domxml/php_domxml.c:1.218.2.1 php4/ext/domxml/php_domxml.c:1.218.2.2 --- php4/ext/domxml/php_domxml.c:1.218.2.1 Fri Nov 15 06:07:34 2002 +++ php4/ext/domxml/php_domxml.cTue Nov 26 10:39:13 2002 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_domxml.c,v 1.218.2.1 2002/11/15 11:07:34 helly Exp $ */ +/* $Id: php_domxml.c,v 1.218.2.2 2002/11/26 15:39:13 chregu Exp $ */ /* TODO * - Support Notation Nodes @@ -616,11 +616,12 @@ } } -static xmlNodeSetPtr php_get_elements_by_tagname(xmlNodePtr n, xmlChar* name) +static xmlNodeSetPtr php_get_elements_by_tagname(xmlNodePtr n, xmlChar* name, +xmlNodeSet *rv ) { - xmlNodeSetPtr rv = NULL; xmlNodePtr cld = NULL; - + /* TODO + Namespace support +*/ if ( n != NULL && name != NULL ) { cld = n->children; while ( cld != NULL ) { @@ -632,6 +633,7 @@ xmlXPathNodeSetAdd( rv, cld ); } } + rv = php_get_elements_by_tagname(cld, name, rv); cld = cld->next; } } @@ -3042,7 +3044,7 @@ xmlNode *nodep; int name_len,i; char *name; - xmlNodeSet *nodesetp; + xmlNodeSet *nodesetp = NULL; DOMXML_PARAM_TWO(nodep, id, le_domxmlelementp, "s", &name, &name_len); @@ -3053,7 +3055,7 @@ RETURN_FALSE; } - nodesetp = php_get_elements_by_tagname(nodep,name); + nodesetp = php_get_elements_by_tagname(nodep, name, NULL); if(nodesetp) { for (i = 0; i < nodesetp->nodeNr; i++) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard array.c
moriyoshi Tue Nov 26 16:21:33 2002 EDT Modified files: /php4/ext/standard array.c Log: Fixed incorrect error messages of array_walk() in case the callback is specified in an array form Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.202 php4/ext/standard/array.c:1.203 --- php4/ext/standard/array.c:1.202 Sat Nov 23 06:27:56 2002 +++ php4/ext/standard/array.c Tue Nov 26 16:21:32 2002 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: array.c,v 1.202 2002/11/23 11:27:56 moriyoshi Exp $ */ +/* $Id: array.c,v 1.203 2002/11/26 21:21:32 moriyoshi Exp $ */ #include "php.h" #include "php_ini.h" @@ -980,8 +980,37 @@ zval_ptr_dtor(&retval_ptr); } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call %s() - function does not exist", + if (Z_TYPE_PP(BG(array_walk_func_name)) == IS_STRING) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to +call %s() - function does not exist", (*BG(array_walk_func_name))->value.str.val); + } else if (Z_TYPE_PP(BG(array_walk_func_name)) == IS_ARRAY) { + char *obj_name = NULL; + zval **obj; + zval **mt_name; + + if +(zend_hash_index_find(Z_ARRVAL_PP(BG(array_walk_func_name)), + 0, (void **)&obj) == SUCCESS + && +zend_hash_index_find(Z_ARRVAL_PP(BG(array_walk_func_name)), + 1, (void **)&mt_name) == SUCCESS + && Z_TYPE_PP(mt_name) == IS_STRING) { + switch (Z_TYPE_PP(obj)) { + case IS_OBJECT: + obj_name = +Z_OBJ_PP(obj)->ce->name; + break; + + case IS_STRING: + obj_name = Z_STRVAL_PP(obj); + break; + } + } + + if (obj_name != NULL) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, +"Unable to call %s::%s() - function does not exist", + obj_name, Z_STRVAL_PP(mt_name)); + } else { + php_error_docref(NULL TSRMLS_CC, E_WARNING, +"Invalid function name"); + } + } } zend_hash_move_forward_ex(target_hash, &pos); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/standard array.c
moriyoshi Tue Nov 26 16:35:52 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard array.c Log: MFH: Fixed incorrect error messages of array_walk() Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.199.2.1 php4/ext/standard/array.c:1.199.2.2 --- php4/ext/standard/array.c:1.199.2.1 Thu Nov 14 21:18:12 2002 +++ php4/ext/standard/array.c Tue Nov 26 16:35:52 2002 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: array.c,v 1.199.2.1 2002/11/15 02:18:12 moriyoshi Exp $ */ +/* $Id: array.c,v 1.199.2.2 2002/11/26 21:35:52 moriyoshi Exp $ */ #include "php.h" #include "php_ini.h" @@ -980,8 +980,37 @@ zval_ptr_dtor(&retval_ptr); } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call %s() - function does not exist", + if (Z_TYPE_PP(BG(array_walk_func_name)) == IS_STRING) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to +call %s() - function does not exist", (*BG(array_walk_func_name))->value.str.val); + } else if (Z_TYPE_PP(BG(array_walk_func_name)) == IS_ARRAY) { + char *obj_name = NULL; + zval **obj; + zval **mt_name; + + if +(zend_hash_index_find(Z_ARRVAL_PP(BG(array_walk_func_name)), + 0, (void **)&obj) == SUCCESS + && +zend_hash_index_find(Z_ARRVAL_PP(BG(array_walk_func_name)), + 1, (void **)&mt_name) == SUCCESS + && Z_TYPE_PP(mt_name) == IS_STRING) { + switch (Z_TYPE_PP(obj)) { + case IS_OBJECT: + obj_name = +Z_OBJ_PP(obj)->ce->name; + break; + + case IS_STRING: + obj_name = Z_STRVAL_PP(obj); + break; + } + } + + if (obj_name != NULL) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, +"Unable to call %s::%s() - function does not exist", + obj_name, Z_STRVAL_PP(mt_name)); + } else { + php_error_docref(NULL TSRMLS_CC, E_WARNING, +"Invalid function name"); + } + } } zend_hash_move_forward_ex(target_hash, &pos); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard array.c
moriyoshi Tue Nov 26 16:51:37 2002 EDT Modified files: /php4/ext/standard array.c Log: Prevent too many error reports from being displayed Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.203 php4/ext/standard/array.c:1.204 --- php4/ext/standard/array.c:1.203 Tue Nov 26 16:21:32 2002 +++ php4/ext/standard/array.c Tue Nov 26 16:51:37 2002 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: array.c,v 1.203 2002/11/26 21:21:32 moriyoshi Exp $ */ +/* $Id: array.c,v 1.204 2002/11/26 21:51:37 moriyoshi Exp $ */ #include "php.h" #include "php_ini.h" @@ -1011,6 +1011,7 @@ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid function name"); } } + break; } zend_hash_move_forward_ex(target_hash, &pos); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/standard array.c
moriyoshi Tue Nov 26 16:54:33 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard array.c Log: MFH: prevent too many error reports from being displayed Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.199.2.2 php4/ext/standard/array.c:1.199.2.3 --- php4/ext/standard/array.c:1.199.2.2 Tue Nov 26 16:35:52 2002 +++ php4/ext/standard/array.c Tue Nov 26 16:54:33 2002 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: array.c,v 1.199.2.2 2002/11/26 21:35:52 moriyoshi Exp $ */ +/* $Id: array.c,v 1.199.2.3 2002/11/26 21:54:33 moriyoshi Exp $ */ #include "php.h" #include "php_ini.h" @@ -1010,6 +1010,7 @@ } else { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid function name"); } + break; } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard array.c
moriyoshi Tue Nov 26 17:12:40 2002 EDT Modified files: /php4/ext/standard array.c Log: Improved the error reporting portion of array_walk() as suggested by Markus Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.204 php4/ext/standard/array.c:1.205 --- php4/ext/standard/array.c:1.204 Tue Nov 26 16:51:37 2002 +++ php4/ext/standard/array.c Tue Nov 26 17:12:40 2002 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: array.c,v 1.204 2002/11/26 21:51:37 moriyoshi Exp $ */ +/* $Id: array.c,v 1.205 2002/11/26 22:12:40 moriyoshi Exp $ */ #include "php.h" #include "php_ini.h" @@ -980,37 +980,15 @@ zval_ptr_dtor(&retval_ptr); } else { - if (Z_TYPE_PP(BG(array_walk_func_name)) == IS_STRING) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call %s() - function does not exist", - (*BG(array_walk_func_name))->value.str.val); - } else if (Z_TYPE_PP(BG(array_walk_func_name)) == IS_ARRAY) { - char *obj_name = NULL; - zval **obj; - zval **mt_name; - - if (zend_hash_index_find(Z_ARRVAL_PP(BG(array_walk_func_name)), - 0, (void **)&obj) == SUCCESS - && zend_hash_index_find(Z_ARRVAL_PP(BG(array_walk_func_name)), - 1, (void **)&mt_name) == SUCCESS - && Z_TYPE_PP(mt_name) == IS_STRING) { - switch (Z_TYPE_PP(obj)) { - case IS_OBJECT: - obj_name = Z_OBJ_PP(obj)->ce->name; - break; - - case IS_STRING: - obj_name = Z_STRVAL_PP(obj); - break; - } - } - - if (obj_name != NULL) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call %s::%s() - function does not exist", - obj_name, Z_STRVAL_PP(mt_name)); - } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid function name"); - } + char *func_name; + + if (zend_is_callable(*BG(array_walk_func_name), 0, +&func_name)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to +call %s()", func_name); + } else { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to +call %s() - function does not exist", func_name); } + + efree(func_name); break; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/standard array.c
moriyoshi Tue Nov 26 17:14:12 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard array.c Log: MFH: improved the error reporting portion of array_walk() Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.199.2.3 php4/ext/standard/array.c:1.199.2.4 --- php4/ext/standard/array.c:1.199.2.3 Tue Nov 26 16:54:33 2002 +++ php4/ext/standard/array.c Tue Nov 26 17:14:11 2002 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: array.c,v 1.199.2.3 2002/11/26 21:54:33 moriyoshi Exp $ */ +/* $Id: array.c,v 1.199.2.4 2002/11/26 22:14:11 moriyoshi Exp $ */ #include "php.h" #include "php_ini.h" @@ -980,38 +980,16 @@ zval_ptr_dtor(&retval_ptr); } else { - if (Z_TYPE_PP(BG(array_walk_func_name)) == IS_STRING) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call %s() - function does not exist", - (*BG(array_walk_func_name))->value.str.val); - } else if (Z_TYPE_PP(BG(array_walk_func_name)) == IS_ARRAY) { - char *obj_name = NULL; - zval **obj; - zval **mt_name; - - if (zend_hash_index_find(Z_ARRVAL_PP(BG(array_walk_func_name)), - 0, (void **)&obj) == SUCCESS - && zend_hash_index_find(Z_ARRVAL_PP(BG(array_walk_func_name)), - 1, (void **)&mt_name) == SUCCESS - && Z_TYPE_PP(mt_name) == IS_STRING) { - switch (Z_TYPE_PP(obj)) { - case IS_OBJECT: - obj_name = Z_OBJ_PP(obj)->ce->name; - break; - - case IS_STRING: - obj_name = Z_STRVAL_PP(obj); - break; - } - } - - if (obj_name != NULL) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call %s::%s() - function does not exist", - obj_name, Z_STRVAL_PP(mt_name)); - } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid function name"); - } - break; + char *func_name; + + if (zend_is_callable(*BG(array_walk_func_name), 0, +&func_name)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to +call %s()", func_name); + } else { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to +call %s() - function does not exist", func_name); } + + efree(func_name); + break; } zend_hash_move_forward_ex(target_hash, &pos); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/w32api w32api_function_definition_parser.y
fmk Tue Nov 26 17:44:15 2002 EDT Modified files: /php4/ext/w32apiw32api_function_definition_parser.y Log: Adding missing ; Index: php4/ext/w32api/w32api_function_definition_parser.y diff -u php4/ext/w32api/w32api_function_definition_parser.y:1.2 php4/ext/w32api/w32api_function_definition_parser.y:1.3 --- php4/ext/w32api/w32api_function_definition_parser.y:1.2 Wed Nov 20 13:39:38 2002 +++ php4/ext/w32api/w32api_function_definition_parser.y Tue Nov 26 17:44:15 2002 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: w32api_function_definition_parser.y,v 1.2 2002/11/20 18:39:38 fmk Exp $ */ +/* $Id: w32api_function_definition_parser.y,v 1.3 2002/11/26 22:44:15 fmk Exp $ */ #include #include @@ -59,7 +59,7 @@ argument_list: argument ',' argument_list { $$ = w32api_parser_join_arguments($1, $3);} | argument {$$ = $1;} - | {$$ = NULL} + | {$$ = NULL;} ; argument: tIDENTIFIER tIDENTIFIER { $$ = w32api_parser_make_argument_byval($1, $2); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/xmlrpc/libxmlrpc base64.c xml_element.c
fmk Tue Nov 26 18:01:17 2002 EDT Modified files: /php4/ext/xmlrpc/libxmlrpc base64.c xml_element.c Log: removing unused variables Index: php4/ext/xmlrpc/libxmlrpc/base64.c diff -u php4/ext/xmlrpc/libxmlrpc/base64.c:1.2 php4/ext/xmlrpc/libxmlrpc/base64.c:1.3 --- php4/ext/xmlrpc/libxmlrpc/base64.c:1.2 Fri Oct 26 08:54:54 2001 +++ php4/ext/xmlrpc/libxmlrpc/base64.c Tue Nov 26 18:01:15 2002 @@ -1,4 +1,4 @@ -static const char rcsid[] = "#(@) $Id: base64.c,v 1.2 2001/10/26 12:54:54 thies Exp $"; +static const char rcsid[] = "#(@) $Id: base64.c,v 1.3 2002/11/26 23:01:15 fmk Exp $"; /* @@ -54,7 +54,6 @@ int i, hiteof = 0; int offset = 0; int olen; - char *dest; olen = 0; Index: php4/ext/xmlrpc/libxmlrpc/xml_element.c diff -u php4/ext/xmlrpc/libxmlrpc/xml_element.c:1.3 php4/ext/xmlrpc/libxmlrpc/xml_element.c:1.4 --- php4/ext/xmlrpc/libxmlrpc/xml_element.c:1.3 Fri Jul 5 00:43:53 2002 +++ php4/ext/xmlrpc/libxmlrpc/xml_element.c Tue Nov 26 18:01:16 2002 @@ -31,7 +31,7 @@ */ -static const char rcsid[] = "#(@) $Id: xml_element.c,v 1.3 2002/07/05 04:43:53 danda Exp $"; +static const char rcsid[] = "#(@) $Id: xml_element.c,v 1.4 2002/11/26 23:01:16 fmk +Exp $"; @@ -44,6 +44,9 @@ * 06/2000 * HISTORY * $Log: xml_element.c,v $ + * Revision 1.4 2002/11/26 23:01:16 fmk + * removing unused variables + * * Revision 1.3 2002/07/05 04:43:53 danda * merged in updates from SF project. bring php repository up to date with xmlrpc-epi version 0.51 * @@ -561,7 +564,6 @@ /* expat start of element handler */ static void startElement(void *userData, const char *name, const char **attrs) { - int i; xml_element *c; xml_elem_data* mydata = (xml_elem_data*)userData; const char** p = attrs; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/xmlrpc/libxmlrpc encodings.c
fmk Tue Nov 26 18:02:08 2002 EDT Modified files: /php4/ext/xmlrpc/libxmlrpc encodings.c Log: Adding missing header file on Win32 Index: php4/ext/xmlrpc/libxmlrpc/encodings.c diff -u php4/ext/xmlrpc/libxmlrpc/encodings.c:1.4 php4/ext/xmlrpc/libxmlrpc/encodings.c:1.5 --- php4/ext/xmlrpc/libxmlrpc/encodings.c:1.4 Wed Jul 3 06:54:41 2002 +++ php4/ext/xmlrpc/libxmlrpc/encodings.c Tue Nov 26 18:02:08 2002 @@ -38,9 +38,10 @@ #include #else #include +#include #endif -static const char rcsid[] = "#(@) $Id: encodings.c,v 1.4 2002/07/03 10:54:41 edink Exp $"; +static const char rcsid[] = "#(@) $Id: encodings.c,v 1.5 2002/11/26 23:02:08 fmk Exp +$"; #include -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/xmlrpc xmlrpc-epi-php.c
fmk Tue Nov 26 18:03:08 2002 EDT Modified files: /php4/ext/xmlrpcxmlrpc-epi-php.c Log: time is a function. Use the name of the variable 'timestamp' Index: php4/ext/xmlrpc/xmlrpc-epi-php.c diff -u php4/ext/xmlrpc/xmlrpc-epi-php.c:1.24 php4/ext/xmlrpc/xmlrpc-epi-php.c:1.25 --- php4/ext/xmlrpc/xmlrpc-epi-php.c:1.24 Thu Aug 29 22:57:12 2002 +++ php4/ext/xmlrpc/xmlrpc-epi-php.cTue Nov 26 18:03:06 2002 @@ -1336,7 +1336,7 @@ XMLRPC_VALUE v = XMLRPC_CreateValueDateTime_ISO8601(NULL, value->value.str.val); if(v) { time_t timestamp = XMLRPC_GetValueDateTime(v); - if(time) { + if(timestamp) { pval* ztimestamp; MAKE_STD_ZVAL(ztimestamp); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/w32api w32api_function_definition_parser.y
Does this fix the win32 build. If so could you plase merge it into PHP_4_3 branch. Maybe some of your other fixes as well. Edin - Original Message - From: "Frank M. Kromann" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, November 26, 2002 11:44 PM Subject: [PHP-CVS] cvs: php4 /ext/w32api w32api_function_definition_parser.y > fmk Tue Nov 26 17:44:15 2002 EDT > > Modified files: > /php4/ext/w32api w32api_function_definition_parser.y > Log: > Adding missing ; > > > Index: php4/ext/w32api/w32api_function_definition_parser.y > diff -u php4/ext/w32api/w32api_function_definition_parser.y:1.2 php4/ext/w32api/w32api_function_definition_parser.y:1.3 > --- php4/ext/w32api/w32api_function_definition_parser.y:1.2 Wed Nov 20 13:39:38 2002 > +++ php4/ext/w32api/w32api_function_definition_parser.y Tue Nov 26 17:44:15 2002 > @@ -17,7 +17,7 @@ > +--+ > */ > > -/* $Id: w32api_function_definition_parser.y,v 1.2 2002/11/20 18:39:38 fmk Exp $ */ > +/* $Id: w32api_function_definition_parser.y,v 1.3 2002/11/26 22:44:15 fmk Exp $ */ > > #include > #include > @@ -59,7 +59,7 @@ > > argument_list: argument ',' argument_list { $$ = w32api_parser_join_arguments($1, $3);} > | argument {$$ = $1;} > - | {$$ = NULL} > + | {$$ = NULL;} > ; > > argument: tIDENTIFIER tIDENTIFIER { $$ = w32api_parser_make_argument_byval($1, $2); } > > > > -- > 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(PHP_4_3) /ext/w32api w32api_function_definition_parser.y
fmk Tue Nov 26 19:36:13 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/w32apiw32api_function_definition_parser.y Log: MFH Index: php4/ext/w32api/w32api_function_definition_parser.y diff -u php4/ext/w32api/w32api_function_definition_parser.y:1.1 php4/ext/w32api/w32api_function_definition_parser.y:1.1.2.1 --- php4/ext/w32api/w32api_function_definition_parser.y:1.1 Tue Nov 12 09:31:33 2002 +++ php4/ext/w32api/w32api_function_definition_parser.y Tue Nov 26 19:36:13 2002 @@ -1,67 +1,67 @@ -%{ -/* - +--+ - | PHP version 4.0 | - +--+ - | Copyright (c) 1997-2001 The PHP Group| - +--+ - | This source file is subject to version 2.02 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is| - | available at through the world-wide-web at | - | http://www.php.net/license/2_02.txt. | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | [EMAIL PROTECTED] so we can mail you a copy immediately. | - +--+ - | Authors: James Moore <[EMAIL PROTECTED]>| - +--+ - */ - -/* $Id: w32api_function_definition_parser.y,v 1.1 2002/11/12 14:31:33 jmoore Exp $ */ - -#include -#include -#define WIN32_LEAN_AND_MEAN -#include -#include - -#include "php.h" -#include "php_ini.h" -#include "ext/standard/info.h" -#include "ext/standard/php_string.h" -#include "php_w32api.h" - - -#define YYSTYPE w32api_parser_function_definition_union -#define YYPARSE_PARAM fh - -int w32api_function_definition_lex(w32api_parser_function_definition_union *funcdef_lval); - -%} - -%pure_parser - -%token tFROM -%token tBYREF -%token tALIAS -%token tIDENTIFIER -%token tFILENAME - -%type argument argument_list - -%start funcdef - -%% - -funcdef: tIDENTIFIER tIDENTIFIER tALIAS tIDENTIFIER'(' argument_list ')' tFROM tFILENAME {((w32api_func_handle_ptr *)fh)->hnd = w32api_parser_load_alias_function($1, $2, $4, $6, $9);} - | tIDENTIFIER tIDENTIFIER '(' argument_list ')' tFROM tFILENAME {((w32api_func_handle_ptr *)fh)->hnd = w32api_parser_load_function($1, $2, $4, $7);} -; - -argument_list: argument ',' argument_list { $$ = w32api_parser_join_arguments($1, $3);} - | argument {$$ = $1;} - | {$$ = NULL} -; - -argument: tIDENTIFIER tIDENTIFIER { $$ = w32api_parser_make_argument_byval($1, $2); } - | tIDENTIFIER tBYREF tIDENTIFIER { $$ = w32api_parser_make_argument_byref($1, $3); } -; +%{ +/* + +--+ + | PHP version 4.0 | + +--+ + | Copyright (c) 1997-2001 The PHP Group| + +--+ + | This source file is subject to version 2.02 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is| + | available at through the world-wide-web at | + | http://www.php.net/license/2_02.txt. | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | [EMAIL PROTECTED] so we can mail you a copy immediately. | + +--+ + | Authors: James Moore <[EMAIL PROTECTED]>| + +--+ + */ + +/* $Id: w32api_function_definition_parser.y,v 1.1.2.1 2002/11/27 00:36:13 fmk Exp $ */ + +#include +#include +#define WIN32_LEAN_AND_MEAN +#include +#include + +#include "php.h" +#include "php_ini.h" +#include "ext/standard/info.h" +#include "ext/standard/php_string.h" +#include "php_w32api.h" + + +#define YYSTYPE w32api_parser_function_definition_union +#define YYPARSE_PARAM fh + +int w32api_function_definition_lex(w32api_parser_function_definition_union +*funcdef_lval); + +%} + +%pure_parser + +%token tFROM +%token tBYREF +%token tALIAS +%token tIDENTIFIER +%token tFILEN
[PHP-CVS] cvs: php4 /ext/w32api w32api_function_definition_scanner.l w32api_type_definition_scanner.l
fmk Tue Nov 26 19:49:24 2002 EDT Modified files: /php4/ext/w32apiw32api_function_definition_scanner.l w32api_type_definition_scanner.l Log: Convert 0D 0D 0A line breaks to 0D 0A Index: php4/ext/w32api/w32api_function_definition_scanner.l diff -u php4/ext/w32api/w32api_function_definition_scanner.l:1.1 php4/ext/w32api/w32api_function_definition_scanner.l:1.2 --- php4/ext/w32api/w32api_function_definition_scanner.l:1.1Tue Nov 12 09:31:34 2002 +++ php4/ext/w32api/w32api_function_definition_scanner.lTue Nov 26 19:49:23 +2002 @@ -1,63 +1,63 @@ -%{ -/* - +--+ - | PHP version 4.0 | - +--+ - | Copyright (c) 1997-2001 The PHP Group| - +--+ - | This source file is subject to version 2.02 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is| - | available at through the world-wide-web at | - | http://www.php.net/license/2_02.txt. | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | [EMAIL PROTECTED] so we can mail you a copy immediately. | - +--+ - | Authors: James Moore <[EMAIL PROTECTED]>| - +--+ - */ - -/* $Id: w32api_function_definition_scanner.l,v 1.1 2002/11/12 14:31:34 jmoore Exp $ */ - - -#include -#include -#define WIN32_LEAN_AND_MEAN -#include -#include - -#include "php.h" -#include "php_ini.h" -#include "ext/standard/info.h" -#include "ext/standard/php_string.h" -#include "php_w32api.h" -#include "w32api_function_definition_parser.h" - -#ifdef YYSTYPE -#undef YYSTYPE -#endif - -#define YYSTYPE w32api_parser_function_definition_union - -#define YY_DECL int w32api_function_definition_lex(w32api_parser_function_definition_union *funcdef_lval) - - -%} - -ID [A-Za-z][A-Za-z0-9_]* -FILENAME {ID}\.{ID} - -%option noyywrap - -%% - -"from" {return tFROM;} -"alias"{return tALIAS;} -"&" {return tBYREF;} -{FILENAME} {funcdef_lval->s = estrdup(yytext); return tFILENAME;} -{ID}{funcdef_lval->s = estrdup(yytext); return tIDENTIFIER;} -[ \r\t\n] /* Ignore Whitespace */ -. {return *yytext;} - -%% - +%{ +/* + +--+ + | PHP version 4.0 | + +--+ + | Copyright (c) 1997-2001 The PHP Group| + +--+ + | This source file is subject to version 2.02 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is| + | available at through the world-wide-web at | + | http://www.php.net/license/2_02.txt. | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | [EMAIL PROTECTED] so we can mail you a copy immediately. | + +--+ + | Authors: James Moore <[EMAIL PROTECTED]>| + +--+ + */ + +/* $Id: w32api_function_definition_scanner.l,v 1.2 2002/11/27 00:49:23 fmk Exp $ */ + + +#include +#include +#define WIN32_LEAN_AND_MEAN +#include +#include + +#include "php.h" +#include "php_ini.h" +#include "ext/standard/info.h" +#include "ext/standard/php_string.h" +#include "php_w32api.h" +#include "w32api_function_definition_parser.h" + +#ifdef YYSTYPE +#undef YYSTYPE +#endif + +#define YYSTYPE w32api_parser_function_definition_union + +#define YY_DECL int +w32api_function_definition_lex(w32api_parser_function_definition_union *funcdef_lval) + + +%} + +ID [A-Za-z][A-Za-z0-9_]* +FILENAME {ID}\.{ID} + +%option noyywrap + +%% + +"from" {return tFROM;} +"alias"{return tALIAS;} +"&" {return tBYREF;} +{FILENAME} {funcdef_lval->s = estrdup(yytext); return tFILENAME;} +{ID}{funcdef_lval->s = estrdup(yytext); return tIDENTIFIER;} +[ \r\t\n] /* Ignore Whitespace */ +. {return *yytext;} + +%% + Index: php4/ext/w32api/w32api_type_definition_scanner.l diff -u php4/ext/w32api/w32api_type_d
[PHP-CVS] cvs: php4 /ext/exif exif.c
helly Tue Nov 26 20:46:37 2002 EDT Modified files: /php4/ext/exif exif.c Log: -Add magic_quotes_runtime support -Fix Canon Markernote Index: php4/ext/exif/exif.c diff -u php4/ext/exif/exif.c:1.120 php4/ext/exif/exif.c:1.121 --- php4/ext/exif/exif.c:1.120 Fri Nov 22 16:51:38 2002 +++ php4/ext/exif/exif.cTue Nov 26 20:46:36 2002 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.120 2002/11/22 21:51:38 iliaa Exp $ */ +/* $Id: exif.c,v 1.121 2002/11/27 01:46:36 helly Exp $ */ /* ToDos * @@ -109,7 +109,7 @@ }; /* }}} */ -#define EXIF_VERSION "1.4 $Id: exif.c,v 1.120 2002/11/22 21:51:38 iliaa Exp $" +#define EXIF_VERSION "1.4 $Id: exif.c,v 1.121 2002/11/27 01:46:36 helly Exp $" /* {{{ PHP_MINFO_FUNCTION */ @@ -924,7 +924,8 @@ typedef enum mn_offset_mode_t { MN_OFFSET_NORMAL, - MN_OFFSET_MARKER + MN_OFFSET_MARKER, + MN_OFFSET_GUESS } mn_offset_mode_t; typedef struct { @@ -939,7 +940,8 @@ } marker_note_type; static const marker_note_type marker_note_array[] = { - { tag_table_VND_CANON, "Canon", NULL, NULL, 0, 0, MN_ORDER_NORMAL, MN_OFFSET_NORMAL}, + { tag_table_VND_CANON, "Canon", NULL, NULL, + 0, 0, MN_ORDER_INTEL,MN_OFFSET_GUESS}, +/* { tag_table_VND_CANON, "Canon", NULL, NULL, + 0, 0, MN_ORDER_NORMAL, MN_OFFSET_NORMAL},*/ { tag_table_VND_CASIO, "CASIO", NULL, NULL, 0, 0, MN_ORDER_MOTOROLA, MN_OFFSET_NORMAL}, { tag_table_VND_FUJI, "FUJIFILM",NULL, "FUJIFILM\x0C\x00\x00\x00", 12, 12, MN_ORDER_INTEL,MN_OFFSET_MARKER}, { tag_table_VND_NIKON, "NIKON", NULL, "Nikon\x00\x01\x00", 8, 8, MN_ORDER_NORMAL, MN_OFFSET_NORMAL}, @@ -991,27 +993,35 @@ /* {{{ exif_char_dump * Do not use! This is a debug function... */ #ifdef EXIF_DEBUG -static unsigned char* exif_char_dump(unsigned char * addr, int len, int hex) +static unsigned char* exif_char_dump(unsigned char * addr, int len, int offset) { - static unsigned char buf[1024+1]; - int c, i, p=0, n = hex ? 5 : 3; - - for(i=0; i=32) { - buf[p++] = c; + static unsigned char buf[4096+1]; + static unsigned char tmp[20]; + int c, i, p=0, n = 5+31; + + p += sprintf(buf+p, "\nDump Len: %08X (%d)", len, len); + if (len) { + for(i=0; i=32 ? c : '.'; + tmp[(i%16)+1] = '\0'; } else { - buf[p++] = '?'; + p += sprintf(buf+p, " "); + } + if (i%16==15) { + p += sprintf(buf+p, "%s", tmp); + if (i>=len) { + break; + } } } } - buf[sizeof(buf)-1]=0; + buf[sizeof(buf)-1] = '\0'; return buf; } #endif @@ -1556,8 +1566,12 @@ case TAG_FMT_STRING: if (value) { length = php_strnlen(value, length); + if (PG(magic_quotes_runtime)) { + info_data->value.s = php_addslashes(value, +length, &length, 0 TSRMLS_CC); + } else { + info_value->s = estrndup(value, length); + } info_data->length = length; - info_value->s = estrndup(value, length); } else { info_data->length = 0; info_value->s = estrdup(""); @@ -1565,7 +1579,7 @@ if (!info_value->s) { EXIF_ERRLOG_EALLOC info_data->length = 0; - break; /* better return with "" instead of possible casing problems */ + break; /* better return with "" instead of possible +causing problems */ } break; @@ -1583,7 +1597,13 @@ break; case TAG_FMT_UNDEFINED: if (value) { - info_value->s = estrndup(value, length); + /* do not recompute length here */ + if (PG(magic_quotes_runtime)) { + info_data->value.s = php_addslashes(value, +length, &length, 0 TSRMLS_CC); + } else { +
[PHP-CVS] cvs: php4 /ext/exif exif.c
helly Tue Nov 26 21:28:29 2002 EDT Modified files: /php4/ext/exif exif.c Log: -Forgot to correct length Index: php4/ext/exif/exif.c diff -u php4/ext/exif/exif.c:1.121 php4/ext/exif/exif.c:1.122 --- php4/ext/exif/exif.c:1.121 Tue Nov 26 20:46:36 2002 +++ php4/ext/exif/exif.cTue Nov 26 21:28:29 2002 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.121 2002/11/27 01:46:36 helly Exp $ */ +/* $Id: exif.c,v 1.122 2002/11/27 02:28:29 helly Exp $ */ /* ToDos * @@ -109,7 +109,7 @@ }; /* }}} */ -#define EXIF_VERSION "1.4 $Id: exif.c,v 1.121 2002/11/27 01:46:36 helly Exp $" +#define EXIF_VERSION "1.4 $Id: exif.c,v 1.122 2002/11/27 02:28:29 helly Exp $" /* {{{ PHP_MINFO_FUNCTION */ @@ -1806,6 +1806,7 @@ exif_error_docref(NULL TSRMLS_CC, image_info, E_NOTICE, "Adding %s as buffer%s", name, exif_char_dump(value, length, 0)); #endif info_data->value.s = php_addslashes(value, length, &length, 0 TSRMLS_CC); + info_data->length = length; } else { info_data->value.s = emalloc(length+1); if (!info_data->value.s) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/exif/tests exif006.phpt test6.jpg
helly Tue Nov 26 21:31:26 2002 EDT Added files: /php4/ext/exif/testsexif006.phpt test6.jpg Log: -Add test for exif_read_data and magic_quotes_runtime Index: php4/ext/exif/tests/exif006.phpt +++ php4/ext/exif/tests/exif006.phpt --TEST-- Check for exif_read_data, magic_quotes_runtime --SKIPIF-- --INI-- output_handler= zlib.output_compression=0 magic_quotes_runtime=1 --FILE-- --EXPECTF-- array(5) { ["FILE"]=> array(6) { ["FileName"]=> string(9) "test6.jpg" ["FileDateTime"]=> int(%d) ["FileSize"]=> int(1240) ["FileType"]=> int(2) ["MimeType"]=> string(10) "image/jpeg" ["SectionsFound"]=> string(33) "ANY_TAG, IFD0, THUMBNAIL, COMMENT" } ["COMPUTED"]=> array(12) { ["html"]=> string(24) "width=\"1\" height=\"1\"" ["Height"]=> int(1) ["Width"]=> int(1) ["IsColor"]=> int(1) ["ByteOrderMotorola"]=> int(1) ["UserComment"]=> string(16) "Hallo \'Du\'+da!" ["UserCommentEncoding"]=> string(5) "ASCII" ["Copyright"]=> string(45) "Photo \"M. Boerger\"., Edited \'M. Boerger\'." ["Copyright.Photographer"]=> string(21) "Photo \"M. Boerger\"." ["Copyright.Editor"]=> string(22) "Edited \'M. Boerger\'." ["Thumbnail.FileType"]=> int(2) ["Thumbnail.MimeType"]=> string(10) "image/jpeg" } ["IFD0"]=> array(2) { ["Copyright"]=> string(21) "Photo \"M. Boerger\"." ["UserComment"]=> string(5) "ASCII" } ["THUMBNAIL"]=> array(2) { ["JPEGInterchangeFormat"]=> int(134) ["JPEGInterchangeFormatLength"]=> int(523) } ["COMMENT"]=> array(3) { [0]=> string(13) "Comment \"1\"" [1]=> string(13) "Comment \'2\'" [2]=> string(13) "Comment #3end" } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/exif exif.c
helly Tue Nov 26 21:38:37 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/exif exif.c Log: MFH: Canon fix Index: php4/ext/exif/exif.c diff -u php4/ext/exif/exif.c:1.118.2.1 php4/ext/exif/exif.c:1.118.2.2 --- php4/ext/exif/exif.c:1.118.2.1 Fri Nov 22 16:52:59 2002 +++ php4/ext/exif/exif.cTue Nov 26 21:38:37 2002 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.118.2.1 2002/11/22 21:52:59 iliaa Exp $ */ +/* $Id: exif.c,v 1.118.2.2 2002/11/27 02:38:37 helly Exp $ */ /* ToDos * @@ -109,7 +109,7 @@ }; /* }}} */ -#define EXIF_VERSION "1.4 $Id: exif.c,v 1.118.2.1 2002/11/22 21:52:59 iliaa Exp $" +#define EXIF_VERSION "1.4 $Id: exif.c,v 1.118.2.2 2002/11/27 02:38:37 helly Exp $" /* {{{ PHP_MINFO_FUNCTION */ @@ -924,7 +924,8 @@ typedef enum mn_offset_mode_t { MN_OFFSET_NORMAL, - MN_OFFSET_MARKER + MN_OFFSET_MARKER, + MN_OFFSET_GUESS } mn_offset_mode_t; typedef struct { @@ -939,7 +940,8 @@ } marker_note_type; static const marker_note_type marker_note_array[] = { - { tag_table_VND_CANON, "Canon", NULL, NULL, 0, 0, MN_ORDER_NORMAL, MN_OFFSET_NORMAL}, + { tag_table_VND_CANON, "Canon", NULL, NULL, + 0, 0, MN_ORDER_INTEL,MN_OFFSET_GUESS}, +/* { tag_table_VND_CANON, "Canon", NULL, NULL, + 0, 0, MN_ORDER_NORMAL, MN_OFFSET_NORMAL},*/ { tag_table_VND_CASIO, "CASIO", NULL, NULL, 0, 0, MN_ORDER_MOTOROLA, MN_OFFSET_NORMAL}, { tag_table_VND_FUJI, "FUJIFILM",NULL, "FUJIFILM\x0C\x00\x00\x00", 12, 12, MN_ORDER_INTEL,MN_OFFSET_MARKER}, { tag_table_VND_NIKON, "NIKON", NULL, "Nikon\x00\x01\x00", 8, 8, MN_ORDER_NORMAL, MN_OFFSET_NORMAL}, @@ -991,27 +993,35 @@ /* {{{ exif_char_dump * Do not use! This is a debug function... */ #ifdef EXIF_DEBUG -static unsigned char* exif_char_dump(unsigned char * addr, int len, int hex) +static unsigned char* exif_char_dump(unsigned char * addr, int len, int offset) { - static unsigned char buf[1024+1]; - int c, i, p=0, n = hex ? 5 : 3; - - for(i=0; i=32 ? c : '.'; + tmp[(i%16)+1] = '\0'; } else { - if (c>=32) { - buf[p++] = c; - } else { - buf[p++] = '?'; + p += sprintf(buf+p, " "); + } + if (i%16==15) { + p += sprintf(buf+p, "%s", tmp); + if (i>=len) { + break; + } } } } - buf[sizeof(buf)-1]=0; + buf[sizeof(buf)-1] = '\0'; return buf; } #endif @@ -2642,7 +2652,7 @@ static int exif_process_IFD_in_MARKERNOTE(image_info_type *ImageInfo, char * value_ptr, int value_len, char *offset_base, size_t IFDlength, size_t displacement TSRMLS_DC) { int de, i=0, section_index = SECTION_MARKERNOTE; - int NumDirEntries, old_motorola_intel; + int NumDirEntries, old_motorola_intel, offset_diff; const marker_note_type *marker_note; char *dir_start; @@ -2664,7 +2674,7 @@ dir_start = value_ptr + marker_note->offset; #ifdef EXIF_DEBUG - exif_error_docref(NULL TSRMLS_CC, ImageInfo, E_NOTICE, "process %s @x%04X + 0x%04X=%d: %s", exif_get_sectionname(section_index), (int)dir_start-(int)offset_base+marker_note->offset+displacement, value_len, value_len, exif_char_dump(value_ptr, value_len, 1)); + exif_error_docref(NULL TSRMLS_CC, ImageInfo, E_NOTICE, "process %s @x%04X + +0x%04X=%d: %s", exif_get_sectionname(section_index), +(int)dir_start-(int)offset_base+marker_note->offset+displacement, value_len, +value_len, exif_char_dump(value_ptr, value_len, +(int)dir_start-(int)offset_base+marker_note->offset+displacement)); #endif ImageInfo->sections_found |= FOUND_MARKERNOTE; @@ -2681,17 +2691,25 @@ case MN_ORDER_NORMAL: break; } + + NumDirEntries = php_ifd_get16u(dir_start, ImageInfo->motorola_intel); + switch (marker_note->offset_mode) { case MN_OFFSET_MARKER: offset_base = value_ptr; break; + case MN_OFFSET_GUESS: + offset_diff = 2 + NumDirEntries*12 + 4 - +php_ifd_get32u(dir_start+10, ImageInfo->motorola_intel); +#ifdef EXIF_DEBUG + exif_error_docref(NULL TSRMLS_CC, ImageInfo, E_NOTICE, "Using +automatic offset correction: 0x%04X", +((int)dir_start-(int)offset_base+marker
[PHP-CVS] cvs: php4 /ext/exif exif.c
helly Tue Nov 26 21:42:41 2002 EDT Modified files: /php4/ext/exif exif.c Log: -Code completley rewritten Index: php4/ext/exif/exif.c diff -u php4/ext/exif/exif.c:1.122 php4/ext/exif/exif.c:1.123 --- php4/ext/exif/exif.c:1.122 Tue Nov 26 21:28:29 2002 +++ php4/ext/exif/exif.cTue Nov 26 21:42:41 2002 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.122 2002/11/27 02:28:29 helly Exp $ */ +/* $Id: exif.c,v 1.123 2002/11/27 02:42:41 helly Exp $ */ /* ToDos * @@ -33,26 +33,6 @@ * attacker could generate an image with recursive ifd pointers...(Marcus) */ -/* Fragments of the code in this module were borrowed from the public domain - * jhead.c package with the author's consent. - * - * The original header from the jhead.c file was: - * - * -- - * Program to pull the information out of various types of EFIF digital - * camera files and show it in a reasonably consistent way - * - * Version 0.9 - * - * Compiles with MSVC on Windows, or with GCC on Linux - * - * Compileing under linux: Must include math library. - * Use: cc -lm -O3 -o jhead jhead.c - * - * Matthias Wandel, Dec 1999 - April 2000 - * -- - */ - #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -109,7 +89,7 @@ }; /* }}} */ -#define EXIF_VERSION "1.4 $Id: exif.c,v 1.122 2002/11/27 02:28:29 helly Exp $" +#define EXIF_VERSION "1.4 $Id: exif.c,v 1.123 2002/11/27 02:42:41 helly Exp $" /* {{{ PHP_MINFO_FUNCTION */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/exif exif.c
helly Tue Nov 26 21:43:21 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/exif exif.c Log: MFH: remove comment Index: php4/ext/exif/exif.c diff -u php4/ext/exif/exif.c:1.118.2.2 php4/ext/exif/exif.c:1.118.2.3 --- php4/ext/exif/exif.c:1.118.2.2 Tue Nov 26 21:38:37 2002 +++ php4/ext/exif/exif.cTue Nov 26 21:43:21 2002 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.118.2.2 2002/11/27 02:38:37 helly Exp $ */ +/* $Id: exif.c,v 1.118.2.3 2002/11/27 02:43:21 helly Exp $ */ /* ToDos * @@ -33,26 +33,6 @@ * attacker could generate an image with recursive ifd pointers...(Marcus) */ -/* Fragments of the code in this module were borrowed from the public domain - * jhead.c package with the author's consent. - * - * The original header from the jhead.c file was: - * - * -- - * Program to pull the information out of various types of EFIF digital - * camera files and show it in a reasonably consistent way - * - * Version 0.9 - * - * Compiles with MSVC on Windows, or with GCC on Linux - * - * Compileing under linux: Must include math library. - * Use: cc -lm -O3 -o jhead jhead.c - * - * Matthias Wandel, Dec 1999 - April 2000 - * -- - */ - #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -109,7 +89,7 @@ }; /* }}} */ -#define EXIF_VERSION "1.4 $Id: exif.c,v 1.118.2.2 2002/11/27 02:38:37 helly Exp $" +#define EXIF_VERSION "1.4 $Id: exif.c,v 1.118.2.3 2002/11/27 02:43:21 helly Exp $" /* {{{ PHP_MINFO_FUNCTION */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/xmlrpc/libxmlrpc base64.c xml_element.c
MFH? On Tue, 26 Nov 2002, Frank M. Kromann wrote: >fmkTue Nov 26 18:01:17 2002 EDT > > Modified files: >/php4/ext/xmlrpc/libxmlrpc base64.c xml_element.c > Log: > removing unused variables > > >Index: php4/ext/xmlrpc/libxmlrpc/base64.c >diff -u php4/ext/xmlrpc/libxmlrpc/base64.c:1.2 php4/ext/xmlrpc/libxmlrpc/base64.c:1.3 >--- php4/ext/xmlrpc/libxmlrpc/base64.c:1.2 Fri Oct 26 08:54:54 2001 >+++ php4/ext/xmlrpc/libxmlrpc/base64.c Tue Nov 26 18:01:15 2002 >@@ -1,4 +1,4 @@ >-static const char rcsid[] = "#(@) $Id: base64.c,v 1.2 2001/10/26 12:54:54 thies Exp >$"; >+static const char rcsid[] = "#(@) $Id: base64.c,v 1.3 2002/11/26 23:01:15 fmk Exp $"; > > /* > >@@ -54,7 +54,6 @@ > int i, hiteof = 0; > int offset = 0; > int olen; >- char *dest; > > olen = 0; > >Index: php4/ext/xmlrpc/libxmlrpc/xml_element.c >diff -u php4/ext/xmlrpc/libxmlrpc/xml_element.c:1.3 >php4/ext/xmlrpc/libxmlrpc/xml_element.c:1.4 >--- php4/ext/xmlrpc/libxmlrpc/xml_element.c:1.3Fri Jul 5 00:43:53 2002 >+++ php4/ext/xmlrpc/libxmlrpc/xml_element.cTue Nov 26 18:01:16 2002 >@@ -31,7 +31,7 @@ > */ > > >-static const char rcsid[] = "#(@) $Id: xml_element.c,v 1.3 2002/07/05 04:43:53 danda >Exp $"; >+static const char rcsid[] = "#(@) $Id: xml_element.c,v 1.4 2002/11/26 23:01:16 fmk >Exp $"; > > > >@@ -44,6 +44,9 @@ > * 06/2000 > * HISTORY > * $Log: xml_element.c,v $ >+ * Revision 1.4 2002/11/26 23:01:16 fmk >+ * removing unused variables >+ * > * Revision 1.3 2002/07/05 04:43:53 danda > * merged in updates from SF project. bring php repository up to date with >xmlrpc-epi version 0.51 > * >@@ -561,7 +564,6 @@ > /* expat start of element handler */ > static void startElement(void *userData, const char *name, const char **attrs) > { >- int i; >xml_element *c; >xml_elem_data* mydata = (xml_elem_data*)userData; >const char** p = attrs; > > > > -- <- For Sale! -> -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/xmlrpc/libxmlrpc encodings.c
MFH? On Tue, 26 Nov 2002, Frank M. Kromann wrote: >fmkTue Nov 26 18:02:08 2002 EDT > > Modified files: >/php4/ext/xmlrpc/libxmlrpc encodings.c > Log: > Adding missing header file on Win32 > > >Index: php4/ext/xmlrpc/libxmlrpc/encodings.c >diff -u php4/ext/xmlrpc/libxmlrpc/encodings.c:1.4 >php4/ext/xmlrpc/libxmlrpc/encodings.c:1.5 >--- php4/ext/xmlrpc/libxmlrpc/encodings.c:1.4 Wed Jul 3 06:54:41 2002 >+++ php4/ext/xmlrpc/libxmlrpc/encodings.c Tue Nov 26 18:02:08 2002 >@@ -38,9 +38,10 @@ > #include > #else > #include >+#include > #endif > >-static const char rcsid[] = "#(@) $Id: encodings.c,v 1.4 2002/07/03 10:54:41 edink >Exp $"; >+static const char rcsid[] = "#(@) $Id: encodings.c,v 1.5 2002/11/26 23:02:08 fmk Exp >$"; > > #include > > > > > -- <- For Sale! -> -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/xmlrpc xmlrpc-epi-php.c
MFH ? On Tue, 26 Nov 2002, Frank M. Kromann wrote: >fmkTue Nov 26 18:03:08 2002 EDT > > Modified files: >/php4/ext/xmlrpc xmlrpc-epi-php.c > Log: > time is a function. Use the name of the variable 'timestamp' > > >Index: php4/ext/xmlrpc/xmlrpc-epi-php.c >diff -u php4/ext/xmlrpc/xmlrpc-epi-php.c:1.24 php4/ext/xmlrpc/xmlrpc-epi-php.c:1.25 >--- php4/ext/xmlrpc/xmlrpc-epi-php.c:1.24 Thu Aug 29 22:57:12 2002 >+++ php4/ext/xmlrpc/xmlrpc-epi-php.c Tue Nov 26 18:03:06 2002 >@@ -1336,7 +1336,7 @@ > XMLRPC_VALUE v = XMLRPC_CreateValueDateTime_ISO8601(NULL, >value->value.str.val); > if(v) { >time_t timestamp = XMLRPC_GetValueDateTime(v); >- if(time) { >+ if(timestamp) { > pval* ztimestamp; > > MAKE_STD_ZVAL(ztimestamp); > > > > -- <- For Sale! -> -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/imap php_imap.c
MFH? On Tue, 26 Nov 2002, Frank M. Kromann wrote: >fmkTue Nov 26 02:04:33 2002 EDT > > Modified files: >/php4/ext/imap php_imap.c > Log: > Avoid , at the end of each string (to, cc and bcc) > > >Index: php4/ext/imap/php_imap.c >diff -u php4/ext/imap/php_imap.c:1.143 php4/ext/imap/php_imap.c:1.144 >--- php4/ext/imap/php_imap.c:1.143 Mon Nov 25 07:30:23 2002 >+++ php4/ext/imap/php_imap.c Tue Nov 26 02:04:31 2002 >@@ -26,7 +26,7 @@ >| PHP 4.0 updates: Zeev Suraski <[EMAIL PROTECTED]> | >+--+ > */ >-/* $Id: php_imap.c,v 1.143 2002/11/25 12:30:23 hholzgra Exp $ */ >+/* $Id: php_imap.c,v 1.144 2002/11/26 07:04:31 fmk Exp $ */ > > #define IMAP41 > >@@ -3162,7 +3162,7 @@ > addr = addr->next; > } > efree(tempMailTo); >- bufferTo[offset] = 0; >+ if (offset>0) bufferTo[offset-1] = 0; > } > > if (cc && *cc) { >@@ -3180,7 +3180,7 @@ > addr = addr->next; > } > efree(tempMailTo); >- bufferCc[offset] = 0; >+ if (offset>0) bufferCc[offset-1] = 0; > } > > if (bcc && *bcc) { >@@ -3198,7 +3198,7 @@ > addr = addr->next; > } > efree(tempMailTo); >- bufferBcc[offset] = 0; >+ if (offset>0) bufferBcc[offset-1] = 0; > } > > > > > > -- <- For Sale! -> -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/exif exif.c
Would you agree adding magic_quotes_runtime support is new functionality or commit that also? marcus AAt 02:46 27.11.2002, Marcus Boerger wrote: helly Tue Nov 26 20:46:37 2002 EDT Modified files: /php4/ext/exif exif.c Log: -Add magic_quotes_runtime support -Fix Canon Markernote -- 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
Re: [PHP-CVS] cvs: php4 /ext/exif exif.c
Any added code that does not fix any bugs are not supposed to be MFH'd. --Jani On Wed, 27 Nov 2002, Marcus Börger wrote: >Would you agree adding magic_quotes_runtime support is >new functionality or commit that also? > >marcus > >AAt 02:46 27.11.2002, Marcus Boerger wrote: >>helly Tue Nov 26 20:46:37 2002 EDT >> >> Modified files: >> /php4/ext/exif exif.c >> Log: >> -Add magic_quotes_runtime support >> -Fix Canon Markernote >> >> >>-- >>PHP CVS Mailing List (http://www.php.net/) >>To unsubscribe, visit: http://www.php.net/unsub.php > -- <- For Sale! -> -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/exif exif.c
Thats waht i thought, too. At 04:03 27.11.2002, Jani Taskinen wrote: Any added code that does not fix any bugs are not supposed to be MFH'd. --Jani On Wed, 27 Nov 2002, Marcus Börger wrote: >Would you agree adding magic_quotes_runtime support is >new functionality or commit that also? > >marcus > >AAt 02:46 27.11.2002, Marcus Boerger wrote: >>helly Tue Nov 26 20:46:37 2002 EDT >> >> Modified files: >> /php4/ext/exif exif.c >> Log: >> -Add magic_quotes_runtime support >> -Fix Canon Markernote >> >> >>-- >>PHP CVS Mailing List (http://www.php.net/) >>To unsubscribe, visit: http://www.php.net/unsub.php > -- <- For Sale! -> -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/xmlrpc xmlrpc-epi-php.c
fmk Tue Nov 26 23:02:52 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/xmlrpcxmlrpc-epi-php.c Log: MFH Index: php4/ext/xmlrpc/xmlrpc-epi-php.c diff -u php4/ext/xmlrpc/xmlrpc-epi-php.c:1.24 php4/ext/xmlrpc/xmlrpc-epi-php.c:1.24.2.1 --- php4/ext/xmlrpc/xmlrpc-epi-php.c:1.24 Thu Aug 29 22:57:12 2002 +++ php4/ext/xmlrpc/xmlrpc-epi-php.cTue Nov 26 23:02:51 2002 @@ -1336,7 +1336,7 @@ XMLRPC_VALUE v = XMLRPC_CreateValueDateTime_ISO8601(NULL, value->value.str.val); if(v) { time_t timestamp = XMLRPC_GetValueDateTime(v); - if(time) { + if(timestamp) { pval* ztimestamp; MAKE_STD_ZVAL(ztimestamp); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/xmlrpc/libxmlrpc base64.c encodings.c xml_element.c
fmk Tue Nov 26 23:07:01 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/xmlrpc/libxmlrpc base64.c encodings.c xml_element.c Log: MFH Index: php4/ext/xmlrpc/libxmlrpc/base64.c diff -u php4/ext/xmlrpc/libxmlrpc/base64.c:1.2 php4/ext/xmlrpc/libxmlrpc/base64.c:1.2.8.1 --- php4/ext/xmlrpc/libxmlrpc/base64.c:1.2 Fri Oct 26 08:54:54 2001 +++ php4/ext/xmlrpc/libxmlrpc/base64.c Tue Nov 26 23:07:00 2002 @@ -1,4 +1,4 @@ -static const char rcsid[] = "#(@) $Id: base64.c,v 1.2 2001/10/26 12:54:54 thies Exp $"; +static const char rcsid[] = "#(@) $Id: base64.c,v 1.2.8.1 2002/11/27 04:07:00 fmk Exp +$"; /* @@ -54,7 +54,6 @@ int i, hiteof = 0; int offset = 0; int olen; - char *dest; olen = 0; Index: php4/ext/xmlrpc/libxmlrpc/encodings.c diff -u php4/ext/xmlrpc/libxmlrpc/encodings.c:1.4 php4/ext/xmlrpc/libxmlrpc/encodings.c:1.4.4.1 --- php4/ext/xmlrpc/libxmlrpc/encodings.c:1.4 Wed Jul 3 06:54:41 2002 +++ php4/ext/xmlrpc/libxmlrpc/encodings.c Tue Nov 26 23:07:00 2002 @@ -38,9 +38,10 @@ #include #else #include +#include #endif -static const char rcsid[] = "#(@) $Id: encodings.c,v 1.4 2002/07/03 10:54:41 edink Exp $"; +static const char rcsid[] = "#(@) $Id: encodings.c,v 1.4.4.1 2002/11/27 04:07:00 fmk +Exp $"; #include Index: php4/ext/xmlrpc/libxmlrpc/xml_element.c diff -u php4/ext/xmlrpc/libxmlrpc/xml_element.c:1.3 php4/ext/xmlrpc/libxmlrpc/xml_element.c:1.3.4.1 --- php4/ext/xmlrpc/libxmlrpc/xml_element.c:1.3 Fri Jul 5 00:43:53 2002 +++ php4/ext/xmlrpc/libxmlrpc/xml_element.c Tue Nov 26 23:07:00 2002 @@ -31,7 +31,7 @@ */ -static const char rcsid[] = "#(@) $Id: xml_element.c,v 1.3 2002/07/05 04:43:53 danda Exp $"; +static const char rcsid[] = "#(@) $Id: xml_element.c,v 1.3.4.1 2002/11/27 04:07:00 +fmk Exp $"; @@ -44,6 +44,9 @@ * 06/2000 * HISTORY * $Log: xml_element.c,v $ + * Revision 1.3.4.1 2002/11/27 04:07:00 fmk + * MFH + * * Revision 1.3 2002/07/05 04:43:53 danda * merged in updates from SF project. bring php repository up to date with xmlrpc-epi version 0.51 * @@ -561,7 +564,6 @@ /* expat start of element handler */ static void startElement(void *userData, const char *name, const char **attrs) { - int i; xml_element *c; xml_elem_data* mydata = (xml_elem_data*)userData; const char** p = attrs; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard string.c /ext/standard/tests/strings strip_tags.phpt
iliaa Wed Nov 27 01:20:20 2002 EDT Modified files: /php4/ext/standard/tests/stringsstrip_tags.phpt /php4/ext/standard string.c Log: Fixed bug #20664. Index: php4/ext/standard/tests/strings/strip_tags.phpt diff -u php4/ext/standard/tests/strings/strip_tags.phpt:1.1 php4/ext/standard/tests/strings/strip_tags.phpt:1.2 --- php4/ext/standard/tests/strings/strip_tags.phpt:1.1 Sat Sep 21 13:34:45 2002 +++ php4/ext/standard/tests/strings/strip_tags.phpt Wed Nov 27 01:20:19 2002 @@ -16,6 +16,8 @@ echo "\n"; echo strip_tags('NEAT STUFF'); echo "\n"; + echo strip_tags('TESTS ?!!?!?!!!?!!'); + echo "\n"; ?> --EXPECT-- NEAT STUFF @@ -24,3 +26,4 @@ NEAT STUFF NEAT STUFF NEAT STUFF +TESTS ?!!?!?!!!?!! Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.333 php4/ext/standard/string.c:1.334 --- php4/ext/standard/string.c:1.333Tue Nov 5 08:52:11 2002 +++ php4/ext/standard/string.c Wed Nov 27 01:20:19 2002 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.333 2002/11/05 13:52:11 moriyoshi Exp $ */ +/* $Id: string.c,v 1.334 2002/11/27 06:20:19 iliaa Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -3496,6 +3496,8 @@ /* JavaScript & Other HTML scripting languages */ if (state == 1 && *(p-1) == '<') { state = 3; + } else { + *(rp++) = c; } break; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/standard string.c /ext/standard/tests/strings strip_tags.phpt
iliaa Wed Nov 27 01:20:37 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard string.c /php4/ext/standard/tests/stringsstrip_tags.phpt Log: MFH Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.333 php4/ext/standard/string.c:1.333.2.1 --- php4/ext/standard/string.c:1.333Tue Nov 5 08:52:11 2002 +++ php4/ext/standard/string.c Wed Nov 27 01:20:37 2002 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.333 2002/11/05 13:52:11 moriyoshi Exp $ */ +/* $Id: string.c,v 1.333.2.1 2002/11/27 06:20:37 iliaa Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -3496,6 +3496,8 @@ /* JavaScript & Other HTML scripting languages */ if (state == 1 && *(p-1) == '<') { state = 3; + } else { + *(rp++) = c; } break; Index: php4/ext/standard/tests/strings/strip_tags.phpt diff -u php4/ext/standard/tests/strings/strip_tags.phpt:1.1 php4/ext/standard/tests/strings/strip_tags.phpt:1.1.2.1 --- php4/ext/standard/tests/strings/strip_tags.phpt:1.1 Sat Sep 21 13:34:45 2002 +++ php4/ext/standard/tests/strings/strip_tags.phpt Wed Nov 27 01:20:37 2002 @@ -16,6 +16,8 @@ echo "\n"; echo strip_tags('NEAT STUFF'); echo "\n"; + echo strip_tags('TESTS ?!!?!?!!!?!!'); + echo "\n"; ?> --EXPECT-- NEAT STUFF @@ -24,3 +26,4 @@ NEAT STUFF NEAT STUFF NEAT STUFF +TESTS ?!!?!?!!!?!! -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php