[PHP-CVS] cvs: php4 /ext/mysql/libmysql libmysql.c
georg Wed Dec 11 03:28:42 2002 EDT Modified files: /php4/ext/mysql/libmysqllibmysql.c Log: Security fix (merged from 3.23.54) Index: php4/ext/mysql/libmysql/libmysql.c diff -u php4/ext/mysql/libmysql/libmysql.c:1.11 php4/ext/mysql/libmysql/libmysql.c:1.12 --- php4/ext/mysql/libmysql/libmysql.c:1.11 Tue Nov 12 18:34:06 2002 +++ php4/ext/mysql/libmysql/libmysql.c Wed Dec 11 03:28:41 2002 @@ -872,7 +872,7 @@ uint field,pkt_len; ulong len; uchar *cp; - char *to; + char *to, *end_to; MYSQL_DATA *result; MYSQL_ROWS **prev_ptr,*cur; NET *net = mysql-net; @@ -910,6 +910,7 @@ *prev_ptr=cur; prev_ptr= cur-next; to= (char*) (cur-data+fields+1); +end_to = to + pkt_len - 1; for (field=0 ; field fields ; field++) { if ((len=(ulong) net_field_length(cp)) == NULL_LENGTH) @@ -919,6 +920,13 @@ else { cur-data[field] = to; + if (len end_to - to) + { + free_rows(result); + net-last_errno = CR_UNKNOWN_ERROR; + strmov(net-last_error, ER(net-last_errno)); + DBUG_RETURN(0); + } memcpy(to,(char*) cp,len); to[len]=0; to+=len+1; cp+=len; @@ -953,7 +961,7 @@ { uint field; ulong pkt_len,len; - uchar *pos,*prev_pos; + uchar *pos,*prev_pos,*end_pos; if ((pkt_len=(uint) net_safe_read(mysql)) == packet_error) return -1; @@ -961,6 +969,7 @@ return 1; /* End of data */ prev_pos= 0; /* allowed to write at packet[-1] */ pos=mysql-net.read_pos; + end_pos=pos+pkt_len; for (field=0 ; field fields ; field++) { if ((len=(ulong) net_field_length(pos)) == NULL_LENGTH) @@ -970,6 +979,12 @@ } else { + if (len end_pos - pos) + { + mysql-net.last_errno=CR_UNKNOWN_ERROR; + strmov(mysql-net.last_error, ER(mysql-net.last_errno)); + return -1; + } row[field] = (char*) pos; pos+=len; *lengths++=len; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) / configure.in /sapi/apache libphp4.module.in
sniper Wed Dec 11 03:42:07 2002 EDT Modified files: (Branch: PHP_4_3) /php4 configure.in /php4/sapi/apache libphp4.module.in Log: MFH: Fix for bug #20928 Index: php4/configure.in diff -u php4/configure.in:1.396.2.11 php4/configure.in:1.396.2.12 --- php4/configure.in:1.396.2.11Mon Dec 9 13:28:03 2002 +++ php4/configure.in Wed Dec 11 03:42:07 2002 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.396.2.11 2002/12/09 18:28:03 wez Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.396.2.12 2002/12/11 08:42:07 sniper Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -1008,7 +1008,7 @@ PHP_SUBST_OLD(DEBUG_CFLAGS) PHP_SUBST(DEFS) PHP_SUBST_OLD(EXTENSION_DIR) -PHP_SUBST(EXTRA_LDFLAGS) +PHP_SUBST_OLD(EXTRA_LDFLAGS) PHP_SUBST_OLD(EXTRA_LIBS) PHP_SUBST_OLD(ZEND_EXTRA_LIBS) PHP_SUBST_OLD(INCLUDES) Index: php4/sapi/apache/libphp4.module.in diff -u php4/sapi/apache/libphp4.module.in:1.13 php4/sapi/apache/libphp4.module.in:1.13.4.1 --- php4/sapi/apache/libphp4.module.in:1.13 Sun Apr 28 00:53:40 2002 +++ php4/sapi/apache/libphp4.module.in Wed Dec 11 03:42:07 2002 @@ -2,7 +2,7 @@ ConfigStart RULE_WANTHSREGEX=no RULE_HIDE=yes - PHP_LIBS=@NATIVE_RPATHS@ @PHP_LDFLAGS@ @PHP_LIBS@ @EXTRA_LIBS@ $LIBS + PHP_LIBS=@NATIVE_RPATHS@ @PHP_LDFLAGS@ @PHP_LIBS@ @EXTRA_LDFLAGS@ +@EXTRA_LIBS@ $LIBS PHP_CFLAGS=$CFLAGS @OPENSSL_INCDIR_OPT@ -I@php_abs_top_builddir@/main -I@php_abs_top_builddir@/Zend -I@php_abs_top_builddir@/TSRM -I@php_abs_top_srcdir@ -I@php_abs_top_srcdir@/sapi/apache -I@php_abs_top_srcdir@/main -I@php_abs_top_srcdir@/Zend -I@php_abs_top_srcdir@/TSRM my_outfile=Makefile.config echo PHP_CFLAGS=$PHP_CFLAGS $my_outfile -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / NEWS
sniper Wed Dec 11 03:54:04 2002 EDT Modified files: /php4 NEWS Log: snow..not again.. Index: php4/NEWS diff -u php4/NEWS:1.1273 php4/NEWS:1.1274 --- php4/NEWS:1.1273Wed Dec 11 03:31:56 2002 +++ php4/NEWS Wed Dec 11 03:54:04 2002 @@ -6,7 +6,7 @@ This function is only available with bundled GD. (Pierre-Alain Joye, Ilia) ? ? ??? 2002, Version 4.3.0 -- Fixed a security bug in the embedded mysql library (Georg,Stefan) +- Fixed a security bug in the bundled MySQL library. (Georg, Stefan) - ATTENTION! make install will *by default* install the CLI SAPI binary in {PREFIX}/bin/php. If you don't disable the CGI binary, it will be installed as {PREFIX}/bin/php-cgi. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) / NEWS
sniper Wed Dec 11 03:54:23 2002 EDT Modified files: (Branch: PHP_4_3) /php4 NEWS Log: MFH Index: php4/NEWS diff -u php4/NEWS:1.1247.2.21 php4/NEWS:1.1247.2.22 --- php4/NEWS:1.1247.2.21 Sat Dec 7 11:16:09 2002 +++ php4/NEWS Wed Dec 11 03:54:22 2002 @@ -1,6 +1,7 @@ PHP 4 NEWS ||| ? ? ??? 2002, Version 4.3.0 +- Fixed a security bug in the bundled MySQL library. (Georg, Stefan) - ATTENTION! make install will *by default* install the CLI SAPI binary in {PREFIX}/bin/php. If you don't disable the CGI binary, it will be installed as {PREFIX}/bin/php-cgi. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /sapi/cli php_cli.c
edink Wed Dec 11 05:24:03 2002 EDT Modified files: /php4/sapi/cli php_cli.c Log: Fix for #20539 (patch by Moriyoshi Koizumi). Index: php4/sapi/cli/php_cli.c diff -u php4/sapi/cli/php_cli.c:1.55 php4/sapi/cli/php_cli.c:1.56 --- php4/sapi/cli/php_cli.c:1.55Mon Dec 9 06:45:46 2002 +++ php4/sapi/cli/php_cli.c Wed Dec 11 05:24:02 2002 @@ -375,19 +375,19 @@ php_stream_to_zval(s_err, zerr); ic.value = *zin; - ic.flags = CONST_CS | CONST_PERSISTENT; + ic.flags = CONST_CS; ic.name = zend_strndup(STDIN, 6); ic.name_len = 6; zend_register_constant(ic TSRMLS_CC); oc.value = *zout; - oc.flags = CONST_CS | CONST_PERSISTENT; + oc.flags = CONST_CS; oc.name = zend_strndup(STDOUT, 7); oc.name_len = 7; zend_register_constant(oc TSRMLS_CC); ec.value = *zerr; - ec.flags = CONST_CS | CONST_PERSISTENT; + ec.flags = CONST_CS; ec.name = zend_strndup(STDERR, 7); ec.name_len = 7; zend_register_constant(ec TSRMLS_CC); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/dba dba.c
helly Wed Dec 11 05:37:39 2002 EDT Modified files: /php4/ext/dba dba.c Log: Warnings and Notices when lock modifiers for dba_(p)open are used wrong. This finally closes bug #20828 (and i hope it must not be reopened) Index: php4/ext/dba/dba.c diff -u php4/ext/dba/dba.c:1.70 php4/ext/dba/dba.c:1.71 --- php4/ext/dba/dba.c:1.70 Tue Dec 10 17:51:09 2002 +++ php4/ext/dba/dba.c Wed Dec 11 05:37:38 2002 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: dba.c,v 1.70 2002/12/10 22:51:09 helly Exp $ */ +/* $Id: dba.c,v 1.71 2002/12/11 10:37:38 helly Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -430,16 +430,21 @@ if (pmode[0] (pmode[1]=='d' || pmode[1]=='l' || pmode[1]=='-')) { /* force lock on db file or lck file or disable locking */ switch (pmode[1]) { case 'd': - if ((hptr-flags DBA_LOCK_ALL) == 0) { - php_error_docref2(NULL TSRMLS_CC, Z_STRVAL_PP(args[0]), Z_STRVAL_PP(args[1]), E_NOTICE, Handler %s does locking internally, hptr-name); - } lock_dbf = 1; /* no break */ case 'l': lock_flag = DBA_LOCK_ALL; + if ((hptr-flags DBA_LOCK_ALL) == 0) { + php_error_docref2(NULL TSRMLS_CC, +Z_STRVAL_PP(args[0]), Z_STRVAL_PP(args[1]), E_NOTICE, Handler %s does locking +internally, hptr-name); + } break; default: case '-': + if ((hptr-flags DBA_LOCK_ALL) == 0) { + php_error_docref2(NULL TSRMLS_CC, +Z_STRVAL_PP(args[0]), Z_STRVAL_PP(args[1]), E_WARNING, Locking cannot be disabled +for handler %s, hptr-name); + FREENOW; + RETURN_FALSE; + } lock_flag = 0; break; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/cpdf config.m4
Once again i ask before commiting this to the branch. This and the last patch for cpdf add the necessary checks for the required libraries to avoid missleading error messages from configure in other modules. For me i search some time for configure problems in dba until noticing it was actually a problem with libraries needed by cpdf. marcus At 22:53 10.12.2002, Marcus Boerger wrote: helly Tue Dec 10 16:53:03 2002 EDT Modified files: /php4/ext/cpdf config.m4 Log: stick to check what result scheme, do not repeat messages and align messages correctly. Index: php4/ext/cpdf/config.m4 diff -u php4/ext/cpdf/config.m4:1.11 php4/ext/cpdf/config.m4:1.12 --- php4/ext/cpdf/config.m4:1.11Tue Dec 10 09:31:00 2002 +++ php4/ext/cpdf/config.m4 Tue Dec 10 16:53:02 2002 @@ -1,54 +1,58 @@ -dnl $Id: config.m4,v 1.11 2002/12/10 14:31:00 helly Exp $ +dnl $Id: config.m4,v 1.12 2002/12/10 21:53:02 helly Exp $ AC_DEFUN(CPDF_TEMP_SUBST,[ old_LIBS=$LIBS - old_withval=$withval $1 LIBS=$old_LIBS - withval=$old_withval ]) -AC_DEFUN(CPDF_LIB_TEST,[ +AC_DEFUN(CPDF_JPEG_TEST,[ CPDF_TEMP_SUBST([ -AC_MSG_CHECKING([for libjpeg (needed by cpdflib 2.x)]) AC_ARG_WITH(jpeg-dir, -[ --with-jpeg-dir[=DIR] jpeg dir for cpdflib 2.x],[ +[ --with-jpeg-dir[=DIR] CPDF: Set the path to libjpeg install prefix.],[ for i in $withval /usr/local /usr; do if test -f $i/lib/libjpeg.$SHLIB_SUFFIX_NAME -o -f $i/lib/libjpeg.a; then - CPDF_JPEG_DIR=$i + CPDF_JPEG_DIR=$i + break; fi done if test -z $CPDF_JPEG_DIR; then +AC_MSG_CHECKING([for libjpeg (needed by cpdflib 2.x)]) AC_MSG_ERROR([libjpeg.(a|so) not found.]) fi LIBS=$LIBS -L$CPDF_JPEG_DIR/lib - AC_CHECK_LIB(jpeg,jpeg_read_header, ,[AC_MSG_ERROR(Problem with libjpeg.(a|so). Please check config.log for more information.)],) - PHP_ADD_LIBRARY_WITH_PATH(jpeg, $CPDF_JPEG_DIR/lib) -],[ - AC_CHECK_LIB(jpeg,jpeg_read_header, ,[AC_MSG_ERROR(Problem with libjpeg.(a|so). Please check config.log for more information.)],) +],) +AC_CHECK_LIB(jpeg,jpeg_read_header, ,[AC_MSG_ERROR(Problem with libjpeg.(a|so). Please check config.log for more information.)],) +if test -z $CPDF_JPEG_DIR; then PHP_ADD_LIBRARY(jpeg) -]) +else + PHP_ADD_LIBRARY_WITH_PATH(jpeg, $CPDF_JPEG_DIR/lib) +fi ]) +]) +AC_DEFUN(CPDF_TIFF_TEST,[ CPDF_TEMP_SUBST([ -AC_MSG_CHECKING([for libtiff (needed by cpdflib 2.x)]) AC_ARG_WITH(tiff-dir, -[ --with-tiff-dir[=DIR] tiff dir for cpdflib 2.x],[ +[ --with-tiff-dir[=DIR] CPDF: Set the path to libtiff install prefix.],[ for i in $withval /usr/local /usr; do if test -f $i/lib/libtiff.$SHLIB_SUFFIX_NAME -o -f $i/lib/libtiff.a; then - CPDF_TIFF_DIR=$i + CPDF_TIFF_DIR=$i + break; fi done if test -z $CPDF_TIFF_DIR; then +AC_MSG_CHECKING([for libtiff (needed by cpdflib 2.x)]) AC_MSG_ERROR([libtiff.(a|so) not found.]) fi LIBS=$LIBS -L$CPDF_TIFF_DIR/lib - AC_CHECK_LIB(tiff,TIFFOpen, ,[AC_MSG_ERROR(Problem with libtiff.(a|so). Please check config.log for more information.)],) - PHP_ADD_LIBRARY_WITH_PATH(tiff, $CPDF_TIFF_DIR/lib) -],[ - AC_CHECK_LIB(tiff,TIFFOpen, ,[AC_MSG_ERROR(Problem with libtiff.(a|so). Please check config.log for more information.)],) +],) +AC_CHECK_LIB(tiff,TIFFOpen, ,[AC_MSG_ERROR(Problem with libtiff.(a|so). Please check config.log for more information.)],) +if test -z $CPDF_TIFF_DIR; then PHP_ADD_LIBRARY(tiff) -]) +else + PHP_ADD_LIBRARY_WITH_PATH(tiff, $CPDF_TIFF_DIR/lib) +fi ]) ]) @@ -56,34 +60,37 @@ AC_ARG_WITH(cpdflib, [ --with-cpdflib[=DIR]Include cpdflib support (requires cpdflib = 2).], [ - case $withval in -no) - AC_MSG_RESULT(no) ;; -yes) - AC_MSG_RESULT(yes) - PHP_NEW_EXTENSION(cpdf, cpdf.c) - CPDF_LIB_TEST - AC_CHECK_LIB(cpdf, cpdf_open, [AC_DEFINE(HAVE_CPDFLIB,1,[Whether you have cpdflib])], -[AC_MSG_ERROR([Cpdf module requires cpdflib = 2.])]) - PHP_ADD_LIBRARY(cpdf) - ;; -*) - test -f $withval/include/cpdflib.h CPDFLIB_INCLUDE=$withval/include - if test -n $CPDFLIB_INCLUDE ; then -AC_MSG_RESULT(yes) -PHP_NEW_EXTENSION(cpdf, cpdf.c) -CPDF_LIB_TEST -old_LIBS=$LIBS -LIBS=$LIBS -L$withval/lib -AC_CHECK_LIB(cpdf, cpdf_open, [AC_DEFINE(HAVE_CPDFLIB,1,[Whether you have cpdflib])], - [AC_MSG_ERROR([Cpdflib module requires cpdflib = 2.])]) -LIBS=$old_LIBS -PHP_ADD_LIBRARY_WITH_PATH(cpdf, $withval/lib) -PHP_ADD_INCLUDE($CPDFLIB_INCLUDE) - else -AC_MSG_ERROR([required haeder not found]) - fi ;; - esac + if test $withval = no; then +AC_MSG_RESULT(no) + else +AC_MSG_RESULT(yes) +
Re: [PHP-CVS] cvs: php4 /ext/cpdf config.m4
On Wed, 11 Dec 2002, Marcus Börger wrote: Once again i ask before commiting this to the branch. This and the last patch for cpdf add the necessary checks for the required libraries to avoid missleading error messages from configure in other modules. For me i search some time for configure problems in dba until noticing it was actually a problem with libraries needed by cpdf. This late in the release cycle I'm hesitant to include non-essential patches. What kind of misleading error messages are you referring to? -Andrei http://www.gravitonic.com/ * I am a legend in my spare time. * -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/oci8 oci8.c
abonamous Wed Dec 11 09:18:45 2002 EDT Modified files: /php4/ext/oci8 oci8.c Log: fixed string comparison which brought up a gcc warning. Index: php4/ext/oci8/oci8.c diff -u php4/ext/oci8/oci8.c:1.194 php4/ext/oci8/oci8.c:1.195 --- php4/ext/oci8/oci8.c:1.194 Fri Dec 6 08:44:35 2002 +++ php4/ext/oci8/oci8.cWed Dec 11 09:18:40 2002 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: oci8.c,v 1.194 2002/12/06 13:44:35 abonamous Exp $ */ +/* $Id: oci8.c,v 1.195 2002/12/11 14:18:40 abonamous Exp $ */ /* TODO list: * @@ -628,7 +628,7 @@ php_info_print_table_start(); php_info_print_table_row(2, OCI8 Support, enabled); - php_info_print_table_row(2, Revision, $Revision: 1.194 $); + php_info_print_table_row(2, Revision, $Revision: 1.195 $); #ifndef PHP_WIN32 php_info_print_table_row(2, Oracle Version, PHP_OCI8_VERSION ); php_info_print_table_row(2, Compile-time ORACLE_HOME, PHP_OCI8_DIR ); @@ -2179,7 +2179,7 @@ #ifdef HAVE_OCI9 //following chunk is Oracle 9i+ ONLY - if (charset[0] != \0) { + if (*charset) { //get ub2 charset id based on charset //this is pretty secure, since if we don't have a valid character set name, //0 comes back and we can still use the 0 in all further statements - OCI uses NLS_LANG -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/mbstring mbfilter_kr.c
hirokawaWed Dec 11 09:39:37 2002 EDT Modified files: /php4/ext/mbstring mbfilter_kr.c Log: fixed lack of variable initialization bug. Index: php4/ext/mbstring/mbfilter_kr.c diff -u php4/ext/mbstring/mbfilter_kr.c:1.7 php4/ext/mbstring/mbfilter_kr.c:1.8 --- php4/ext/mbstring/mbfilter_kr.c:1.7 Mon Nov 25 10:21:03 2002 +++ php4/ext/mbstring/mbfilter_kr.c Wed Dec 11 09:39:37 2002 @@ -20,7 +20,7 @@ * streamable korean code filter and converter */ -/* $Id: mbfilter_kr.c,v 1.7 2002/11/25 15:21:03 hirokawa Exp $ */ +/* $Id: mbfilter_kr.c,v 1.8 2002/12/11 14:39:37 hirokawa Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -373,7 +373,7 @@ int mbfl_filt_conv_uhc_wchar(int c, mbfl_convert_filter *filter TSRMLS_DC) { - int c1, w, flag; + int c1, w = 0, flag = 0; switch (filter-status) { case 0: @@ -392,10 +392,10 @@ case 1: /* dbcs second byte */ filter-status = 0; c1 = filter-cache; - if ( c1 = 0x81 c1 = 0xa0){ w = (c1 - 0x81)*190 + (c - 0x41); if (w = 0 w uhc1_ucs_table_size) { + flag = 1; w = uhc1_ucs_table[w]; } else { w = 0; @@ -403,6 +403,7 @@ } else if ( c1 = 0xa1 c1 = 0xc6){ w = (c1 - 0xa1)*190 + (c - 0x41); if (w = 0 w uhc2_ucs_table_size) { + flag = 2; w = uhc2_ucs_table[w]; } else { w = 0; @@ -410,6 +411,7 @@ } else if ( c1 = 0xc7 c1 = 0xfe){ w = (c1 - 0xc7)*94 + (c - 0xa1); if (w = 0 w uhc3_ucs_table_size) { + flag = 3; w = uhc3_ucs_table[w]; } else { w = 0; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/bcmath/tests .cvsignore
sniper Wed Dec 11 09:43:33 2002 EDT Modified files: /php4/ext/bcmath/tests .cvsignore Log: missing file Index: php4/ext/bcmath/tests/.cvsignore diff -u /dev/null php4/ext/bcmath/tests/.cvsignore:1.2 --- /dev/null Wed Dec 11 09:43:33 2002 +++ php4/ext/bcmath/tests/.cvsignoreWed Dec 11 09:43:33 2002 @@ -0,0 +1,6 @@ +phpt.* +*.diff +*.log +*.exp +*.out +*.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/calendar/tests .cvsignore /ext/standard/tests/image .cvsignore /ext/sysvsem/tests .cvsignore /pear/Console/tests .cvsignore /tests/run-test .cvsignore
sniper Wed Dec 11 10:16:06 2002 EDT Added files: /php4/ext/calendar/tests.cvsignore /php4/ext/standard/tests/image .cvsignore /php4/ext/sysvsem/tests .cvsignore /php4/tests/run-test.cvsignore Modified files: /php4/pear/Console/tests.cvsignore Log: - Some more missing .cvsignore files. Index: php4/pear/Console/tests/.cvsignore diff -u php4/pear/Console/tests/.cvsignore:1.3 php4/pear/Console/tests/.cvsignore:1.4 --- php4/pear/Console/tests/.cvsignore:1.3 Mon Oct 7 23:01:10 2002 +++ php4/pear/Console/tests/.cvsignore Wed Dec 11 10:16:05 2002 @@ -3,3 +3,4 @@ *.log *.exp *.out +*.php Index: php4/ext/calendar/tests/.cvsignore +++ php4/ext/calendar/tests/.cvsignore phpt.* *.diff *.log *.exp *.out *.php Index: php4/ext/standard/tests/image/.cvsignore +++ php4/ext/standard/tests/image/.cvsignore phpt.* *.diff *.log *.exp *.out *.php Index: php4/ext/sysvsem/tests/.cvsignore +++ php4/ext/sysvsem/tests/.cvsignore phpt.* *.diff *.log *.exp *.out *.php Index: php4/tests/run-test/.cvsignore +++ php4/tests/run-test/.cvsignore phpt.* *.diff *.log *.exp *.out -- 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/tests/image .cvsignore /ext/sysvsem/tests .cvsignore /pear/Console/tests .cvsignore /tests/run-test .cvsignore
sniper Wed Dec 11 10:16:29 2002 EDT Added files: (Branch: PHP_4_3) /php4/ext/standard/tests/image .cvsignore /php4/ext/sysvsem/tests .cvsignore /php4/tests/run-test.cvsignore Modified files: /php4/pear/Console/tests.cvsignore Log: MFH Index: php4/pear/Console/tests/.cvsignore diff -u php4/pear/Console/tests/.cvsignore:1.3 php4/pear/Console/tests/.cvsignore:1.3.2.1 --- php4/pear/Console/tests/.cvsignore:1.3 Mon Oct 7 23:01:10 2002 +++ php4/pear/Console/tests/.cvsignore Wed Dec 11 10:16:27 2002 @@ -3,3 +3,4 @@ *.log *.exp *.out +*.php Index: php4/ext/standard/tests/image/.cvsignore +++ php4/ext/standard/tests/image/.cvsignore phpt.* *.diff *.log *.exp *.out *.php Index: php4/ext/sysvsem/tests/.cvsignore +++ php4/ext/sysvsem/tests/.cvsignore phpt.* *.diff *.log *.exp *.out *.php Index: php4/tests/run-test/.cvsignore +++ php4/tests/run-test/.cvsignore phpt.* *.diff *.log *.exp *.out -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/oci8 oci8.c
sniper Wed Dec 11 10:25:40 2002 EDT Modified files: /php4/ext/oci8 oci8.c Log: - ws fixes - // - /* */ (No C++ comments in c code!) - #if / #else / etc. have to start from first column. Index: php4/ext/oci8/oci8.c diff -u php4/ext/oci8/oci8.c:1.195 php4/ext/oci8/oci8.c:1.196 --- php4/ext/oci8/oci8.c:1.195 Wed Dec 11 09:18:40 2002 +++ php4/ext/oci8/oci8.cWed Dec 11 10:25:39 2002 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: oci8.c,v 1.195 2002/12/11 14:18:40 abonamous Exp $ */ +/* $Id: oci8.c,v 1.196 2002/12/11 15:25:39 sniper Exp $ */ /* TODO list: * @@ -628,7 +628,7 @@ php_info_print_table_start(); php_info_print_table_row(2, OCI8 Support, enabled); - php_info_print_table_row(2, Revision, $Revision: 1.195 $); + php_info_print_table_row(2, Revision, $Revision: 1.196 $); #ifndef PHP_WIN32 php_info_print_table_row(2, Oracle Version, PHP_OCI8_VERSION ); php_info_print_table_row(2, Compile-time ORACLE_HOME, PHP_OCI8_DIR ); @@ -2177,13 +2177,16 @@ session-server = server; session-exclusive = exclusive; - #ifdef HAVE_OCI9 - //following chunk is Oracle 9i+ ONLY +#ifdef HAVE_OCI9 + + /* following chunk is Oracle 9i+ ONLY */ if (*charset) { - //get ub2 charset id based on charset - //this is pretty secure, since if we don't have a valid character set name, - //0 comes back and we can still use the 0 in all further statements - OCI uses NLS_LANG - //setting in that case + /* + get ub2 charset id based on charset + this is pretty secure, since if we don't have a valid character set +name, + 0 comes back and we can still use the 0 in all further statements +- OCI uses NLS_LANG + setting in that case + */ CALL_OCI_RETURN(charsetid, OCINlsCharSetNameToId( OCI(pEnv), charset)); @@ -2192,7 +2195,7 @@ oci_debug(oci_do_connect: using charset id=%d,charsetid); } - //create an environment using the character set id, Oracle 9i+ ONLY + /* create an environment using the character set id, Oracle 9i+ ONLY */ CALL_OCI(OCIEnvNlsCreate( session-pEnv, OCI_DEFAULT, @@ -2205,12 +2208,13 @@ charsetid, charsetid)); - #else - //fallback solution (simply use global env and charset, same behaviour as always been) +#else + + /* fallback solution (simply use global env and charset, same behaviour as +always been) */ session-pEnv = OCI(pEnv); session-charsetId = 0; - #endif /*HAVE_OCI9*/ +#endif /* HAVE_OCI9 */ /* allocate temporary Service Context */ CALL_OCI_RETURN(OCI(error), OCIHandleAlloc( @@ -2597,8 +2601,8 @@ oci_session *session = 0; oci_connection *connection = 0; -//if a forth parameter is handed over, it is the charset identifier (but is only used in Oracle 9i+) -if (zend_get_parameters_ex(4, userParam, passParam, dbParam, charParam) == SUCCESS) { + /* if a forth parameter is handed over, it is the charset identifier (but is +only used in Oracle 9i+) */ + if (zend_get_parameters_ex(4, userParam, passParam, dbParam, charParam) == +SUCCESS) { convert_to_string_ex(userParam); convert_to_string_ex(passParam); convert_to_string_ex(dbParam); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/fdf fdf.c
iliaa Wed Dec 11 10:32:35 2002 EDT Modified files: /php4/ext/fdf fdf.c Log: Added missing variable to parameter retrieval. Index: php4/ext/fdf/fdf.c diff -u php4/ext/fdf/fdf.c:1.67 php4/ext/fdf/fdf.c:1.68 --- php4/ext/fdf/fdf.c:1.67 Mon Nov 25 07:30:22 2002 +++ php4/ext/fdf/fdf.c Wed Dec 11 10:32:35 2002 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: fdf.c,v 1.67 2002/11/25 12:30:22 hholzgra Exp $ */ +/* $Id: fdf.c,v 1.68 2002/12/11 15:32:35 iliaa Exp $ */ /* FdfTk lib 2.0 is a Complete C/C++ FDF Toolkit available from http://beta1.adobe.com/ada/acrosdk/forms.html. */ @@ -1416,7 +1416,8 @@ FDFErc err; if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rsl, r_fdf, -fieldname, fieldname_len +fieldname, fieldname_len, +item ) == FAILURE) { return; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/cpdf config.m4
On Wed, 11 Dec 2002, Andrei Zmievski wrote: On Wed, 11 Dec 2002, Marcus Börger wrote: First this is not essential. So we'll leave it for 4.3.1 then. That would be my choice too. Derick -- - Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ - -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / run-tests.php
iliaa Wed Dec 11 11:49:00 2002 EDT Modified files: /php4 run-tests.php Log: Ask the user for their e-mail address so that we can contact them if need be. Index: php4/run-tests.php diff -u php4/run-tests.php:1.130 php4/run-tests.php:1.131 --- php4/run-tests.php:1.130Sat Nov 23 11:57:25 2002 +++ php4/run-tests.php Wed Dec 11 11:49:00 2002 @@ -335,6 +335,15 @@ * Send an email */ + /* Ask the user to provide an email address, so that QA team can +contact the user */ + if (!strncasecmp($user_input, 'y', 1)) { + echo Please enter your email address: ; + flush(); + $fp = fopen(php://stdin, r+); + $user_email = trim(fgets($fp, 1024)); + $user_email = str_replace(@, at , str_replace(., dot +, $user_email)); + } + $failed_tests_data = ''; $sep = \n . str_repeat('=', 80) . \n; @@ -370,7 +379,9 @@ $failed_tests_data .= Libtool:\n$libtool\n; $failed_tests_data .= Compiler:\n$compiler\n; $failed_tests_data .= Bison:\n. @shell_exec('bison --version'). \n; - $failed_tests_data .= \n\n; + $failed_tests_data .= \n; + + $failed_tests_data .= User's E-mail: .$user_email.\n\n; $failed_tests_data .= $sep . PHPINFO . $sep; $failed_tests_data .= shell_exec($php.' -dhtml_errors=0 -i'); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard/tests/general_functions getopt.phpt
iliaa Wed Dec 11 12:38:29 2002 EDT Added files: /php4/ext/standard/tests/general_functions getopt.phpt Log: Added getopt() test. Index: php4/ext/standard/tests/general_functions/getopt.phpt +++ php4/ext/standard/tests/general_functions/getopt.phpt --TEST-- getopt --ARGS-- -v -h -d test -m 1234 -t -j --SKIPIF-- ?php if (!ini_get('register_argc_argv')) { die(skip this test needs register_argc_argv to be enabled); } ? --FILE-- ?php var_dump(getopt(d:m:j:vht)); ? --EXPECT-- array(5) { [v]= bool(false) [h]= bool(false) [d]= string(4) test [m]= string(4) 1234 [t]= bool(false) } -- 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/tests/general_functions getopt.phpt
iliaa Wed Dec 11 12:39:43 2002 EDT Added files: (Branch: PHP_4_3) /php4/ext/standard/tests/general_functions getopt.phpt Log: MFH Index: php4/ext/standard/tests/general_functions/getopt.phpt +++ php4/ext/standard/tests/general_functions/getopt.phpt --TEST-- getopt --ARGS-- -v -h -d test -m 1234 -t -j --SKIPIF-- ?php if (!ini_get('register_argc_argv')) { die(skip this test needs register_argc_argv to be enabled); } ? --FILE-- ?php var_dump(getopt(d:m:j:vht)); ? --EXPECT-- array(5) { [v]= bool(false) [h]= bool(false) [d]= string(4) test [m]= string(4) 1234 [t]= bool(false) } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) / configure.in /main php_version.h
andrei Wed Dec 11 13:57:25 2002 EDT Modified files: (Branch: PHP_4_3) /php4 configure.in /php4/main php_version.h Log: Back to -dev. Index: php4/configure.in diff -u php4/configure.in:1.396.2.13 php4/configure.in:1.396.2.14 --- php4/configure.in:1.396.2.13Wed Dec 11 13:52:19 2002 +++ php4/configure.in Wed Dec 11 13:57:24 2002 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.396.2.13 2002/12/11 18:52:19 andrei Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.396.2.14 2002/12/11 18:57:24 andrei Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -44,7 +44,7 @@ MAJOR_VERSION=4 MINOR_VERSION=3 RELEASE_VERSION=0 -EXTRA_VERSION=RC3 +EXTRA_VERSION=-dev VERSION=$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION dnl Define where extension directories are located in the configure context Index: php4/main/php_version.h diff -u php4/main/php_version.h:1.66.2.5 php4/main/php_version.h:1.66.2.6 --- php4/main/php_version.h:1.66.2.5Wed Dec 11 13:52:20 2002 +++ php4/main/php_version.h Wed Dec 11 13:57:24 2002 @@ -3,5 +3,5 @@ #define PHP_MAJOR_VERSION 4 #define PHP_MINOR_VERSION 3 #define PHP_RELEASE_VERSION 0 -#define PHP_EXTRA_VERSION RC3 -#define PHP_VERSION 4.3.0RC3 +#define PHP_EXTRA_VERSION -dev +#define PHP_VERSION 4.3.0-dev -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/fdf fdf.c
iliaa Wed Dec 11 15:04:24 2002 EDT Modified files: /php4/ext/fdf fdf.c Log: Added missing . Index: php4/ext/fdf/fdf.c diff -u php4/ext/fdf/fdf.c:1.68 php4/ext/fdf/fdf.c:1.69 --- php4/ext/fdf/fdf.c:1.68 Wed Dec 11 10:32:35 2002 +++ php4/ext/fdf/fdf.c Wed Dec 11 15:04:23 2002 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: fdf.c,v 1.68 2002/12/11 15:32:35 iliaa Exp $ */ +/* $Id: fdf.c,v 1.69 2002/12/11 20:04:23 iliaa Exp $ */ /* FdfTk lib 2.0 is a Complete C/C++ FDF Toolkit available from http://beta1.adobe.com/ada/acrosdk/forms.html. */ @@ -1417,7 +1417,7 @@ if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rsl, r_fdf, fieldname, fieldname_len, -item +item ) == FAILURE) { return; -- 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/fdf fdf.c
iliaa Wed Dec 11 15:08:06 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/fdf fdf.c Log: MFH Index: php4/ext/fdf/fdf.c diff -u php4/ext/fdf/fdf.c:1.66 php4/ext/fdf/fdf.c:1.66.2.1 --- php4/ext/fdf/fdf.c:1.66 Tue Oct 22 21:11:06 2002 +++ php4/ext/fdf/fdf.c Wed Dec 11 15:08:02 2002 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: fdf.c,v 1.66 2002/10/23 01:11:06 hholzgra Exp $ */ +/* $Id: fdf.c,v 1.66.2.1 2002/12/11 20:08:02 iliaa Exp $ */ /* FdfTk lib 2.0 is a Complete C/C++ FDF Toolkit available from http://beta1.adobe.com/ada/acrosdk/forms.html. */ @@ -1416,7 +1416,8 @@ FDFErc err; if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rsl, r_fdf, -fieldname, fieldname_len +fieldname, fieldname_len, +item ) == FAILURE) { return; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) / run-tests.php
derick Wed Dec 11 15:10:59 2002 EDT Modified files: (Branch: PHP_4_3) /php4 run-tests.php Log: - Make it also work when you press enter instead of typing 'y' Index: php4/run-tests.php diff -u php4/run-tests.php:1.119.2.11 php4/run-tests.php:1.119.2.12 --- php4/run-tests.php:1.119.2.11 Wed Dec 11 11:49:27 2002 +++ php4/run-tests.php Wed Dec 11 15:10:57 2002 @@ -335,7 +335,7 @@ */ /* Ask the user to provide an email address, so that QA team can contact the user */ - if (!strncasecmp($user_input, 'y', 1)) { + if (!strncasecmp($user_input, 'y', 1) || strlen(trim($user_input)) == +0) { echo Please enter your email address: ; flush(); $fp = fopen(php://stdin, r+); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / run-tests.php
derick Wed Dec 11 15:13:43 2002 EDT Modified files: /php4 run-tests.php Log: - MFB Index: php4/run-tests.php diff -u php4/run-tests.php:1.131 php4/run-tests.php:1.132 --- php4/run-tests.php:1.131Wed Dec 11 11:49:00 2002 +++ php4/run-tests.php Wed Dec 11 15:13:43 2002 @@ -336,7 +336,7 @@ */ /* Ask the user to provide an email address, so that QA team can contact the user */ - if (!strncasecmp($user_input, 'y', 1)) { + if (!strncasecmp($user_input, 'y', 1) || strlen(trim($user_input)) == +0) { echo Please enter your email address: ; flush(); $fp = fopen(php://stdin, r+); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/gd php_gd.h
pajoye Wed Dec 11 15:45:48 2002 EDT Modified files: /php4/ext/gdphp_gd.h Log: Remove double definition of imagesettile Add imageantiallias Index: php4/ext/gd/php_gd.h diff -u php4/ext/gd/php_gd.h:1.47 php4/ext/gd/php_gd.h:1.48 --- php4/ext/gd/php_gd.h:1.47 Thu Dec 5 21:16:06 2002 +++ php4/ext/gd/php_gd.hWed Dec 11 15:45:47 2002 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php_gd.h,v 1.47 2002/12/06 02:16:06 pajoye Exp $ */ +/* $Id: php_gd.h,v 1.48 2002/12/11 20:45:47 pajoye Exp $ */ #ifndef PHP_GD_H #define PHP_GD_H @@ -99,10 +99,10 @@ #ifdef HAVE_GD_BUNDLED PHP_FUNCTION(imagerotate); +PHP_FUNCTION(imageantialias); #endif PHP_FUNCTION(imagesetthickness); -PHP_FUNCTION(imagesettile); PHP_FUNCTION(imagecopymergegray); PHP_FUNCTION(imagesetbrush); PHP_FUNCTION(imagesettile); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/gd/libgd gd.c
pajoye Wed Dec 11 15:46:52 2002 EDT Modified files: /php4/ext/gd/libgd gd.c Log: Add gdImageAAline (antialiased line) Add AA support for gdImagePolygon Index: php4/ext/gd/libgd/gd.c diff -u php4/ext/gd/libgd/gd.c:1.32 php4/ext/gd/libgd/gd.c:1.33 --- php4/ext/gd/libgd/gd.c:1.32 Sun Dec 8 16:07:13 2002 +++ php4/ext/gd/libgd/gd.c Wed Dec 11 15:46:52 2002 @@ -1037,6 +1037,134 @@ } } } + + +#define BLEND_COLOR(a, nc, c, cc) \ +nc = (cc) + (c) - (cc)) * (a)) + c) - (cc)) * (a)) 8) + 0x80) 8); + +inline static void gdImageSetAAPixelColor(gdImagePtr im, int x, int y, int color, int +t) +{ + int dr,dg,db,p,r,g,b; + dr = gdTrueColorGetRed(color); + dg = gdTrueColorGetGreen(color); + db = gdTrueColorGetBlue(color); + + p = gdImageGetPixel(im,x,y); + r = gdTrueColorGetRed(p); + g = gdTrueColorGetGreen(p); + b = gdTrueColorGetBlue(p); + + BLEND_COLOR(t, dr, r, dr); + BLEND_COLOR(t, dg, g, dg); + BLEND_COLOR(t, db, b, db); + im-tpixels[y][x]=gdTrueColorAlpha(dr, dg, db, gdAlphaOpaque); +} + +void gdImageAALine (gdImagePtr im, int x1, int y1, int x2, int y2, int col) +{ +/* keep them as 32bits */ +long x, y, inc; + long dx, dy,tmp; + + if (y1 0 y2 0) { + return; + } + if (y1 0) { + x1 += (y1 * (x1 - x2)) / (y2 - y1); + y1 = 0; + } + if (y2 0) { + x2 += (y2 * (x1 - x2)) / (y2 - y1); + y2 = 0; + } + + /* bottom edge */ + if (y1 = im-sy y2 = im-sy) { + return; + } + if (y1 = im-sy) { + x1 -= ((im-sy - y1) * (x1 - x2)) / (y2 - y1); + y1 = im-sy - 1; + } + if (y2 = im-sy) { + x2 -= ((im-sy - y2) * (x1 - x2)) / (y2 - y1); + y2 = im-sy - 1; + } + + /* left edge */ + if (x1 0 x2 0) { + return; + } + if (x1 0) { + y1 += (x1 * (y1 - y2)) / (x2 - x1); + x1 = 0; + } + if (x2 0) { + y2 += (x2 * (y1 - y2)) / (x2 - x1); + x2 = 0; + } + /* right edge */ + if (x1 = im-sx x2 = im-sx) { + return; + } + if (x1 = im-sx) { + y1 -= ((im-sx - x1) * (y1 - y2)) / (x2 - x1); + x1 = im-sx - 1; + } + if (x2 = im-sx) { + y2 -= ((im-sx - x2) * (y1 - y2)) / (x2 - x1); + x2 = im-sx - 1; + } + + dx = x2 - x1; + dy = y2 - y1; + + if (dx == 0 dy == 0) { + return; + } + if (abs(dx) abs(dy)) { + if (dx 0) { + tmp = x1; + x1 = x2; + x2 = tmp; + tmp = y1; + y1 = y2; + y2 = tmp; + dx = x2 - x1; + dy = y2 - y1; + } + x = x1 16; + y = y1 16; + inc = (dy * 65536) / dx; + while ((x 16) x2) { + gdImageSetAAPixelColor(im, x 16, y 16, col, (y 8) +0xFF); + gdImageSetAAPixelColor(im, x 16, (y 16) + 1,col, (~y +8) 0xFF); + x += (1 16); + y += inc; + } + } else { + if (dy 0) { + tmp = x1; + x1 = x2; + x2 = tmp; + tmp = y1; + y1 = y2; + y2 = tmp; + dx = x2 - x1; + dy = y2 - y1; + } + x = x1 16; + y = y1 16; + inc = (dx * 65536) / dy; + while ((y16) y2) { + gdImageSetAAPixelColor(im, x 16, y 16, col, (x 8) +0xFF); + gdImageSetAAPixelColor(im, (x 16) + 1, (y 16),col, (~x + 8) 0xFF); + x += inc; + y += (116); + } + } +} + static void dashedSet (gdImagePtr im, int x, int y, int color, int *onP, int *dashStepP, int wid, int vert); @@ -2776,22 +2904,28 @@ void gdImagePolygon (gdImagePtr im, gdPointPtr p, int n, int c) { - int i; - int lx, ly; - if (!n) -{ - return; -} - lx = p-x; - ly = p-y; - gdImageLine (im, lx, ly, p[n - 1].x, p[n - 1].y, c); - for (i = 1; (i n); i++) -{ - p++; - gdImageLine (im, lx, ly, p-x, p-y, c); - lx = p-x; - ly = p-y; -} + int i; + int lx, ly; + typedef void (*image_line)(gdImagePtr im, int x1, int y1, int x2, int y2, int +color); + image_line draw_line; + + if (!n) { + return; + } + if ( im-antialias) { + draw_line =
[PHP-CVS] cvs: php4 /ext/gd/libgd gd.c
iliaa Wed Dec 11 16:52:30 2002 EDT Modified files: /php4/ext/gd/libgd gd.c Log: Syncronize bundled gd sources with that of gd 2.0.9, affected functions are: gdImageBrushApply() gdImageCopyResized(). Index: php4/ext/gd/libgd/gd.c diff -u php4/ext/gd/libgd/gd.c:1.33 php4/ext/gd/libgd/gd.c:1.34 --- php4/ext/gd/libgd/gd.c:1.33 Wed Dec 11 15:46:52 2002 +++ php4/ext/gd/libgd/gd.c Wed Dec 11 16:52:29 2002 @@ -750,74 +750,60 @@ static void gdImageBrushApply (gdImagePtr im, int x, int y) { - int lx, ly; - int hy; - int hx; - int x1, y1, x2, y2; - int srcx, srcy; - if (!im-brush) -{ - return; -} - hy = gdImageSY (im-brush) / 2; - y1 = y - hy; - y2 = y1 + gdImageSY (im-brush); - hx = gdImageSX (im-brush) / 2; - x1 = x - hx; - x2 = x1 + gdImageSX (im-brush); - srcy = 0; - if (im-trueColor) -{ - for (ly = y1; (ly y2); ly++) - { - srcx = 0; - for (lx = x1; (lx x2); lx++) - { - int p; - p = gdImageGetTrueColorPixel ( -im-brush, srcx, srcy); - gdImageSetPixel (im, lx, ly, - p); - srcx++; - } - srcy++; + int lx, ly; + int hy, hx; + int x1, y1, x2, y2; + int srcx, srcy; + + if (!im-brush) { + return; } -} - else -{ - for (ly = y1; (ly y2); ly++) - { - srcx = 0; - for (lx = x1; (lx x2); lx++) - { - int p; - p = gdImageGetPixel (im-brush, srcx, srcy); - /* Allow for non-square brushes! */ - if (p != gdImageGetTransparent (im-brush)) - { - /* Truecolor brush. Very slow -on a palette destination. */ - if (im-brush-trueColor) - { - gdImageSetPixel (im, lx, ly, - gdImageColorResolveAlpha ( - im, - gdTrueColorGetRed (p), - gdTrueColorGetGreen (p), -gdTrueColorGetBlue (p), - gdTrueColorGetAlpha (p))); - } - else - { - gdImageSetPixel (im, lx, ly, - im-brushColorMap[p]); - } + + hy = gdImageSY (im-brush) / 2; + y1 = y - hy; + y2 = y1 + gdImageSY (im-brush); + hx = gdImageSX (im-brush) / 2; + x1 = x - hx; + x2 = x1 + gdImageSX (im-brush); + srcy = 0; + + if (im-trueColor) { + for (ly = y1; (ly y2); ly++) { + srcx = 0; + for (lx = x1; (lx x2); lx++) { + int p; + p = gdImageGetTrueColorPixel (im-brush, srcx, srcy); + /* 2.0.9, Thomas Winzig: apply simple full +transparency */ + if (p != gdImageGetTransparent (im-brush)) { + gdImageSetPixel (im, lx, ly, p); + } + srcx++; + } + srcy++; + } + } else { + for (ly = y1; (ly y2); ly++) { + srcx = 0; + for (lx = x1; (lx x2); lx++) { + int p; + p = gdImageGetPixel (im-brush, srcx, srcy); + /* Allow for non-square brushes! */ + if (p != gdImageGetTransparent (im-brush)) { + /* Truecolor brush. Very slow on a palette +destination. */ + if (im-brush-trueColor) { + gdImageSetPixel(im, lx, ly, +gdImageColorResolveAlpha(im, gdTrueColorGetRed(p), + + gdTrueColorGetGreen(p), + + gdTrueColorGetBlue(p), + + gdTrueColorGetAlpha(p))); + } else { + gdImageSetPixel(im, lx, ly, +im-brushColorMap[p]); + } + } + srcx++; + } + srcy++; } -
[PHP-CVS] cvs: php4 /ext/gd/libgd gd.c
iliaa Wed Dec 11 16:55:45 2002 EDT Modified files: /php4/ext/gd/libgd gd.c Log: White space fixes. Index: php4/ext/gd/libgd/gd.c diff -u php4/ext/gd/libgd/gd.c:1.34 php4/ext/gd/libgd/gd.c:1.35 --- php4/ext/gd/libgd/gd.c:1.34 Wed Dec 11 16:52:29 2002 +++ php4/ext/gd/libgd/gd.c Wed Dec 11 16:55:45 2002 @@ -1048,20 +1048,20 @@ void gdImageAALine (gdImagePtr im, int x1, int y1, int x2, int y2, int col) { -/* keep them as 32bits */ -long x, y, inc; + /* keep them as 32bits */ + long x, y, inc; long dx, dy,tmp; if (y1 0 y2 0) { return; } if (y1 0) { - x1 += (y1 * (x1 - x2)) / (y2 - y1); + x1 += (y1 * (x1 - x2)) / (y2 - y1); y1 = 0; } if (y2 0) { x2 += (y2 * (x1 - x2)) / (y2 - y1); - y2 = 0; + y2 = 0; } /* bottom edge */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/gd/libgd gd.c
pajoye Wed Dec 11 17:23:51 2002 EDT Modified files: /php4/ext/gd/libgd gd.c Log: Fix brightness filter (argument ingnored) Index: php4/ext/gd/libgd/gd.c diff -u php4/ext/gd/libgd/gd.c:1.35 php4/ext/gd/libgd/gd.c:1.36 --- php4/ext/gd/libgd/gd.c:1.35 Wed Dec 11 16:55:45 2002 +++ php4/ext/gd/libgd/gd.c Wed Dec 11 17:23:51 2002 @@ -3410,7 +3410,7 @@ return 0; } - contrast = (double)(100.0-80.0)/100.0; + contrast = (double)(100.0-contrast)/100.0; contrast = contrast*contrast; for (y=0; ysrc-sy; ++y) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/gd/tests jpeg2png.phpt
iliaa Wed Dec 11 17:37:05 2002 EDT Modified files: /php4/ext/gd/tests jpeg2png.phpt Log: Added check for availability of jpeg support. Index: php4/ext/gd/tests/jpeg2png.phpt diff -u php4/ext/gd/tests/jpeg2png.phpt:1.1 php4/ext/gd/tests/jpeg2png.phpt:1.2 --- php4/ext/gd/tests/jpeg2png.phpt:1.1 Wed Dec 4 16:04:07 2002 +++ php4/ext/gd/tests/jpeg2png.phpt Wed Dec 11 17:37:05 2002 @@ -11,6 +11,9 @@ if (!function_exists(imagecreatefrompng) || !function_exists(imagepng)) { die(skip png support unavailable); } + if (!function_exists(imagecreatefromjpeg) || !function_exists(imagejpeg)) { + die(skip jpeg support unavailable); + } ? --FILE-- ?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/gd/tests jpeg2png.phpt
iliaa Wed Dec 11 17:37:35 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/gd/tests jpeg2png.phpt Log: MFH Index: php4/ext/gd/tests/jpeg2png.phpt diff -u php4/ext/gd/tests/jpeg2png.phpt:1.1.2.1 php4/ext/gd/tests/jpeg2png.phpt:1.1.2.2 --- php4/ext/gd/tests/jpeg2png.phpt:1.1.2.1 Wed Dec 4 16:07:10 2002 +++ php4/ext/gd/tests/jpeg2png.phpt Wed Dec 11 17:37:35 2002 @@ -11,6 +11,9 @@ if (!function_exists(imagecreatefrompng) || !function_exists(imagepng)) { die(skip png support unavailable); } + if (!function_exists(imagecreatefromjpeg) || !function_exists(imagejpeg)) { + die(skip jpeg support unavailable); + } ? --FILE-- ?php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / NEWS
iliaa Wed Dec 11 18:11:32 2002 EDT Modified files: /php4 NEWS Log: GD library news. Index: php4/NEWS diff -u php4/NEWS:1.1274 php4/NEWS:1.1275 --- php4/NEWS:1.1274Wed Dec 11 03:54:04 2002 +++ php4/NEWS Wed Dec 11 18:11:31 2002 @@ -1,9 +1,16 @@ PHP 4 NEWS ||| ? ? ??? 200?, Version 4.4.0 -- Fixed bug #20442 (upgraded bunbled expat to 1.95.5). (Ilia) +- Fixed bug #20442 (upgraded bundled expat to 1.95.5). (Ilia) - Added imagefilter() function which allows application of various filters. - This function is only available with bundled GD. (Pierre-Alain Joye, Ilia) + This function is only available with bundled GD. (Pierre-Alain Joye, Ilia) +- Added imageistruecolor(), only available with GD2+(Pierre-Alain Joye) +- Added antialiased drawing support (Pierre-Alain Joye, Ilia), available only + with bundled GD: + . imageantialias($im, $flag) to (de)active antialias + . imageline antialias support + . imagepolygon antialias support + ? ? ??? 2002, Version 4.3.0 - Fixed a security bug in the bundled MySQL library. (Georg, Stefan) -- 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/gd gd.c php_gd.h
iliaa Wed Dec 11 18:30:24 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/gdgd.c php_gd.h Log: MFH (make imagecreatefromxpm() unavailable when bundled GD is used) Index: php4/ext/gd/gd.c diff -u php4/ext/gd/gd.c:1.221.2.6 php4/ext/gd/gd.c:1.221.2.7 --- php4/ext/gd/gd.c:1.221.2.6 Tue Dec 10 12:57:54 2002 +++ php4/ext/gd/gd.cWed Dec 11 18:30:23 2002 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: gd.c,v 1.221.2.6 2002/12/10 17:57:54 iliaa Exp $ */ +/* $Id: gd.c,v 1.221.2.7 2002/12/11 23:30:23 iliaa Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -188,7 +188,7 @@ #ifdef HAVE_GD_XBM PHP_FE(imagecreatefromxbm, NULL) #endif -#ifdef HAVE_GD_XPM +#if defined(HAVE_GD_XPM) defined(HAVE_GD_BUNDLED) PHP_FE(imagecreatefromxpm, NULL) #endif PHP_FE(imagecreatefromgd, NULL) @@ -1358,7 +1358,7 @@ case PHP_GDIMG_TYPE_GD2PART: im = (*func_p)(fp, Z_LVAL_PP(srcx), Z_LVAL_PP(srcy), Z_LVAL_PP(width), Z_LVAL_PP(height)); break; -#ifdef HAVE_GD_XPM +#if defined(HAVE_GD_XPM) defined(HAVE_GD_BUNDLED) case PHP_GDIMG_TYPE_XPM: im = gdImageCreateFromXpm(fn); break; @@ -1425,7 +1425,7 @@ /* }}} */ #endif /* HAVE_GD_XBM */ -#ifdef HAVE_GD_XPM +#if defined(HAVE_GD_XPM) defined(HAVE_GD_BUNDLED) /* {{{ proto int imagecreatefromxpm(string filename) Create a new image from XPM file or URL */ PHP_FUNCTION(imagecreatefromxpm) Index: php4/ext/gd/php_gd.h diff -u php4/ext/gd/php_gd.h:1.44 php4/ext/gd/php_gd.h:1.44.2.1 --- php4/ext/gd/php_gd.h:1.44 Tue Nov 12 06:49:11 2002 +++ php4/ext/gd/php_gd.hWed Dec 11 18:30:23 2002 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php_gd.h,v 1.44 2002/11/12 11:49:11 helly Exp $ */ +/* $Id: php_gd.h,v 1.44.2.1 2002/12/11 23:30:23 iliaa Exp $ */ #ifndef PHP_GD_H #define PHP_GD_H @@ -110,12 +110,14 @@ PHP_FUNCTION(imagecreatefromgif); PHP_FUNCTION(imagecreatefromjpeg); PHP_FUNCTION(imagecreatefromxbm); -PHP_FUNCTION(imagecreatefromxpm); PHP_FUNCTION(imagecreatefrompng); PHP_FUNCTION(imagecreatefromwbmp); PHP_FUNCTION(imagecreatefromgd); PHP_FUNCTION(imagecreatefromgd2); PHP_FUNCTION(imagecreatefromgd2part); +#if defined(HAVE_GD_XPM) defined(HAVE_GD_BUNDLED) +PHP_FUNCTION(imagecreatefromxpm); +#endif PHP_FUNCTION(imagegammacorrect); PHP_FUNCTION(imagedestroy); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4(PHP_4_3) /ext/gd gd.c php_gd.h
Small correction, it actually should say non-bundled. On December 11, 2002 06:30 pm, Ilia Alshanetsky wrote: iliaa Wed Dec 11 18:30:24 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/gd gd.c php_gd.h Log: MFH (make imagecreatefromxpm() unavailable when bundled GD is used) Index: php4/ext/gd/gd.c diff -u php4/ext/gd/gd.c:1.221.2.6 php4/ext/gd/gd.c:1.221.2.7 --- php4/ext/gd/gd.c:1.221.2.6Tue Dec 10 12:57:54 2002 +++ php4/ext/gd/gd.c Wed Dec 11 18:30:23 2002 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: gd.c,v 1.221.2.6 2002/12/10 17:57:54 iliaa Exp $ */ +/* $Id: gd.c,v 1.221.2.7 2002/12/11 23:30:23 iliaa Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -188,7 +188,7 @@ #ifdef HAVE_GD_XBM PHP_FE(imagecreatefromxbm, NULL) #endif -#ifdef HAVE_GD_XPM +#if defined(HAVE_GD_XPM) defined(HAVE_GD_BUNDLED) PHP_FE(imagecreatefromxpm, NULL) #endif PHP_FE(imagecreatefromgd, NULL) @@ -1358,7 +1358,7 @@ case PHP_GDIMG_TYPE_GD2PART: im = (*func_p)(fp, Z_LVAL_PP(srcx), Z_LVAL_PP(srcy), Z_LVAL_PP(width), Z_LVAL_PP(height)); break; -#ifdef HAVE_GD_XPM +#if defined(HAVE_GD_XPM) defined(HAVE_GD_BUNDLED) case PHP_GDIMG_TYPE_XPM: im = gdImageCreateFromXpm(fn); break; @@ -1425,7 +1425,7 @@ /* }}} */ #endif /* HAVE_GD_XBM */ -#ifdef HAVE_GD_XPM +#if defined(HAVE_GD_XPM) defined(HAVE_GD_BUNDLED) /* {{{ proto int imagecreatefromxpm(string filename) Create a new image from XPM file or URL */ PHP_FUNCTION(imagecreatefromxpm) Index: php4/ext/gd/php_gd.h diff -u php4/ext/gd/php_gd.h:1.44 php4/ext/gd/php_gd.h:1.44.2.1 --- php4/ext/gd/php_gd.h:1.44 Tue Nov 12 06:49:11 2002 +++ php4/ext/gd/php_gd.h Wed Dec 11 18:30:23 2002 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php_gd.h,v 1.44 2002/11/12 11:49:11 helly Exp $ */ +/* $Id: php_gd.h,v 1.44.2.1 2002/12/11 23:30:23 iliaa Exp $ */ #ifndef PHP_GD_H #define PHP_GD_H @@ -110,12 +110,14 @@ PHP_FUNCTION(imagecreatefromgif); PHP_FUNCTION(imagecreatefromjpeg); PHP_FUNCTION(imagecreatefromxbm); -PHP_FUNCTION(imagecreatefromxpm); PHP_FUNCTION(imagecreatefrompng); PHP_FUNCTION(imagecreatefromwbmp); PHP_FUNCTION(imagecreatefromgd); PHP_FUNCTION(imagecreatefromgd2); PHP_FUNCTION(imagecreatefromgd2part); +#if defined(HAVE_GD_XPM) defined(HAVE_GD_BUNDLED) +PHP_FUNCTION(imagecreatefromxpm); +#endif PHP_FUNCTION(imagegammacorrect); PHP_FUNCTION(imagedestroy); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/gd gd.c php_gd.h
This patch, or at least this part: -#ifdef HAVE_GD_XPM +#if defined(HAVE_GD_XPM) defined(HAVE_GD_BUNDLED) Needs to be merged into the 4.3.0. Something in the build broke my GD support between RC2 and RC3. This fixes it. -adam On Wed, 11 Dec 2002, Ilia Alshanetsky wrote: iliaa Wed Dec 11 17:25:24 2002 EDT Modified files: /php4/ext/gd gd.c php_gd.h Log: Fixed build with non-bundled GD. Hidden the anti-alias functions when non-bundled GD is used and made imagecreatefromxpm() unavailable because of a bug in the external GD library. Index: php4/ext/gd/gd.c diff -u php4/ext/gd/gd.c:1.238 php4/ext/gd/gd.c:1.239 --- php4/ext/gd/gd.c:1.238Wed Dec 11 15:44:44 2002 +++ php4/ext/gd/gd.c Wed Dec 11 17:25:22 2002 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: gd.c,v 1.238 2002/12/11 20:44:44 pajoye Exp $ */ +/* $Id: gd.c,v 1.239 2002/12/11 22:25:22 iliaa Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -224,7 +224,7 @@ #ifdef HAVE_GD_XBM PHP_FE(imagecreatefromxbm, NULL) #endif -#ifdef HAVE_GD_XPM +#if defined(HAVE_GD_XPM) defined(HAVE_GD_BUNDLED) PHP_FE(imagecreatefromxpm, NULL) #endif PHP_FE(imagecreatefromgd, NULL) @@ -1441,7 +1441,7 @@ case PHP_GDIMG_TYPE_GD2PART: im = (*func_p)(fp, Z_LVAL_PP(srcx), Z_LVAL_PP(srcy), Z_LVAL_PP(width), Z_LVAL_PP(height)); break; -#ifdef HAVE_GD_XPM +#if defined(HAVE_GD_XPM) defined(HAVE_GD_BUNDLED) case PHP_GDIMG_TYPE_XPM: im = gdImageCreateFromXpm(fn); break; @@ -1508,7 +1508,7 @@ /* }}} */ #endif /* HAVE_GD_XBM */ -#ifdef HAVE_GD_XPM +#if defined(HAVE_GD_XPM) defined(HAVE_GD_BUNDLED) /* {{{ proto int imagecreatefromxpm(string filename) Create a new image from XPM file or URL */ PHP_FUNCTION(imagecreatefromxpm) @@ -2130,7 +2130,6 @@ { zval **IM, **x1, **y1, **x2, **y2, **col; gdImagePtr im; - int antialias=0; if (ZEND_NUM_ARGS() != 6 || zend_get_parameters_ex(6, IM, x1, y1, x2, y2, col) == FAILURE) { ZEND_WRONG_PARAM_COUNT(); @@ -2145,14 +2144,11 @@ convert_to_long_ex(col); #ifdef HAVE_GD_BUNDLED - antialias = im-antialias; -#endif - if (antialias) { + if (im-antialias) gdImageAALine(im, Z_LVAL_PP(x1), Z_LVAL_PP(y1), Z_LVAL_PP(x2), Z_LVAL_PP(y2), Z_LVAL_PP(col)); - } else { + else +#endif gdImageLine(im, Z_LVAL_PP(x1), Z_LVAL_PP(y1), Z_LVAL_PP(x2), Z_LVAL_PP(y2), Z_LVAL_PP(col)); - } - gdImageLine(im, Z_LVAL_PP(x1), Z_LVAL_PP(y1), Z_LVAL_PP(x2), Z_LVAL_PP(y2), Z_LVAL_PP(col)); RETURN_TRUE; @@ -4074,7 +4070,7 @@ } } /* }}} */ -#endif +/* End section: Filters */ /* {{{ proto imagesetantialias(int im, bool on) Should antialiased functions used or not*/ @@ -4092,8 +4088,7 @@ RETURN_TRUE; } /* }}} */ - -/* End section: Filters */ +#endif /* * Local variables: Index: php4/ext/gd/php_gd.h diff -u php4/ext/gd/php_gd.h:1.48 php4/ext/gd/php_gd.h:1.49 --- php4/ext/gd/php_gd.h:1.48 Wed Dec 11 15:45:47 2002 +++ php4/ext/gd/php_gd.h Wed Dec 11 17:25:23 2002 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php_gd.h,v 1.48 2002/12/11 20:45:47 pajoye Exp $ */ +/* $Id: php_gd.h,v 1.49 2002/12/11 22:25:23 iliaa Exp $ */ #ifndef PHP_GD_H #define PHP_GD_H @@ -112,12 +112,14 @@ PHP_FUNCTION(imagecreatefromgif); PHP_FUNCTION(imagecreatefromjpeg); PHP_FUNCTION(imagecreatefromxbm); -PHP_FUNCTION(imagecreatefromxpm); PHP_FUNCTION(imagecreatefrompng); PHP_FUNCTION(imagecreatefromwbmp); PHP_FUNCTION(imagecreatefromgd); PHP_FUNCTION(imagecreatefromgd2); PHP_FUNCTION(imagecreatefromgd2part); +#if defined(HAVE_GD_XPM) defined(HAVE_GD_BUNDLED) +PHP_FUNCTION(imagecreatefromxpm); +#endif PHP_FUNCTION(imagegammacorrect); PHP_FUNCTION(imagedestroy); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php