[PHP-CVS] cvs: php-src / NEWS
johnSun May 9 10:00:30 2004 EDT Modified files: /php-srcNEWS Log: Tell ppl about it. http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1705r2=1.1706ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1705 php-src/NEWS:1.1706 --- php-src/NEWS:1.1705 Thu May 6 10:29:33 2004 +++ php-src/NEWSSun May 9 10:00:30 2004 @@ -25,6 +25,7 @@ in using reflection API. (Marcus) - Changed tidy error handling to no longer use exceptions and renamed the error_buf property to errorBuffer. (John) +- Changed tidy_node to tidyNode and removed tidy_exception (John) - Changed class and method names to use studlyCaps convention. (Marcus) - Changed language parser to throw errors when a non-empty signature is used in a destructor definition. (Marcus) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src / NEWS
John Coggeshall wrote: john Sun May 9 10:00:30 2004 EDT Modified files: /php-src NEWS Log: Tell ppl about it. http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1705r2=1.1706ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1705 php-src/NEWS:1.1706 --- php-src/NEWS:1.1705 Thu May 6 10:29:33 2004 +++ php-src/NEWS Sun May 9 10:00:30 2004 @@ -25,6 +25,7 @@ in using reflection API. (Marcus) - Changed tidy error handling to no longer use exceptions and renamed the error_buf property to errorBuffer. (John) +- Changed tidy_node to tidyNode and removed tidy_exception (John) - Changed class and method names to use studlyCaps convention. (Marcus) - Changed language parser to throw errors when a non-empty signature is used in a destructor definition. (Marcus) John, why in the section with news about RC2 while it's already in the wild ? Cheers, Andrey -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / NEWS
derick Sun May 9 10:22:02 2004 EDT Modified files: /php-srcNEWS Log: - Fixed news http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1706r2=1.1707ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1706 php-src/NEWS:1.1707 --- php-src/NEWS:1.1706 Sun May 9 10:00:30 2004 +++ php-src/NEWSSun May 9 10:22:02 2004 @@ -1,7 +1,8 @@ PHPNEWS ||| ?? ??? 2004, PHP 5 Release Candidate 3 -- You may now use count() on COM arrays. (Wez) +- Added count() support for COM arrays. (Wez) +- Changed tidy_node to tidyNode and removed tidy_exception. (John) - Fixed bug #28300 (Userspace stream/filter names forced to lowercase). (Sara) - Fixed bug #28287 (stream_*_register() not calling __autoload()). (Sara) - Fixed bug #28161 (COM: Array style properties could not be accessed). (Wez) @@ -25,7 +26,6 @@ in using reflection API. (Marcus) - Changed tidy error handling to no longer use exceptions and renamed the error_buf property to errorBuffer. (John) -- Changed tidy_node to tidyNode and removed tidy_exception (John) - Changed class and method names to use studlyCaps convention. (Marcus) - Changed language parser to throw errors when a non-empty signature is used in a destructor definition. (Marcus) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/com_dotnet com_misc.c
wez Sun May 9 10:28:19 2004 EDT Modified files: /php-src/ext/com_dotnet com_misc.c Log: Urgh! Use the correct function to free messages from php_win_err(), otherwise we say hello to Mr. S. Fault. http://cvs.php.net/diff.php/php-src/ext/com_dotnet/com_misc.c?r1=1.6r2=1.7ty=u Index: php-src/ext/com_dotnet/com_misc.c diff -u php-src/ext/com_dotnet/com_misc.c:1.6 php-src/ext/com_dotnet/com_misc.c:1.7 --- php-src/ext/com_dotnet/com_misc.c:1.6 Mon May 3 16:10:57 2004 +++ php-src/ext/com_dotnet/com_misc.c Sun May 9 10:28:19 2004 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: com_misc.c,v 1.6 2004/05/03 20:10:57 wez Exp $ */ +/* $Id: com_misc.c,v 1.7 2004/05/09 14:28:19 wez Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -38,7 +38,7 @@ } zend_throw_exception(php_com_exception_class_entry, message, (long)code TSRMLS_CC); if (free_msg) { - efree(message); + LocalFree(message); } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/com_dotnet com_com.c com_extension.c com_persist.c config.w32 php_com_dotnet_internal.h
wez Sun May 9 11:21:29 2004 EDT Added files: /php-src/ext/com_dotnet com_persist.c Modified files: /php-src/ext/com_dotnet com_com.c com_extension.c config.w32 php_com_dotnet_internal.h Log: Implement com_get_active_object() and a helper object for working with persistent COM objects. (That's the last of the stuff I want to sneak in before 5.0 is released). http://cvs.php.net/diff.php/php-src/ext/com_dotnet/com_com.c?r1=1.12r2=1.13ty=u Index: php-src/ext/com_dotnet/com_com.c diff -u php-src/ext/com_dotnet/com_com.c:1.12 php-src/ext/com_dotnet/com_com.c:1.13 --- php-src/ext/com_dotnet/com_com.c:1.12 Wed Apr 28 04:23:22 2004 +++ php-src/ext/com_dotnet/com_com.cSun May 9 11:21:29 2004 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: com_com.c,v 1.12 2004/04/28 08:23:22 wez Exp $ */ +/* $Id: com_com.c,v 1.13 2004/05/09 15:21:29 wez Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -281,6 +281,58 @@ } /* }}} */ +/* {{{ proto object com_get_active_object(string progid [, int code_page ]) + Returns a handle to an already running instance of a COM object */ +PHP_FUNCTION(com_get_active_object) +{ + CLSID clsid; + char *module_name; + long module_name_len; + long code_page = COMG(code_page); + IUnknown *unk = NULL; + IDispatch *obj = NULL; + HRESULT res; + OLECHAR *module = NULL; + + if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|l, + module_name, module_name_len, code_page)) { + php_com_throw_exception(E_INVALIDARG, Invalid arguments! TSRMLS_CC); + return; + } + + module = php_com_string_to_olestring(module_name, module_name_len, code_page TSRMLS_CC); + + res = CLSIDFromString(module, clsid); + + if (FAILED(res)) { + php_com_throw_exception(res, NULL TSRMLS_CC); + } else { + res = GetActiveObject(clsid, NULL, unk); + + if (FAILED(res)) { + php_com_throw_exception(res, NULL TSRMLS_CC); + } else { + res = IUnknown_QueryInterface(unk, IID_IDispatch, obj); + + if (FAILED(res)) { + php_com_throw_exception(res, NULL TSRMLS_CC); + } else if (obj) { + /* we got our dispatchable object */ + php_com_wrap_dispatch(return_value, obj, code_page TSRMLS_CC); + } + } + } + + if (obj) { + IDispatch_Release(obj); + } + if (unk) { + IUnknown_Release(obj); + } + efree(module); +} +/* }}} */ + /* Performs an Invoke on the given com object. * returns a failure code and creates an exception if there was an error */ HRESULT php_com_invoke_helper(php_com_dotnet_object *obj, DISPID id_member, http://cvs.php.net/diff.php/php-src/ext/com_dotnet/com_extension.c?r1=1.13r2=1.14ty=u Index: php-src/ext/com_dotnet/com_extension.c diff -u php-src/ext/com_dotnet/com_extension.c:1.13 php-src/ext/com_dotnet/com_extension.c:1.14 --- php-src/ext/com_dotnet/com_extension.c:1.13 Mon May 3 16:10:57 2004 +++ php-src/ext/com_dotnet/com_extension.c Sun May 9 11:21:29 2004 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: com_extension.c,v 1.13 2004/05/03 20:10:57 wez Exp $ */ +/* $Id: com_extension.c,v 1.14 2004/05/09 15:21:29 wez Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -70,6 +70,7 @@ PHP_FE(com_print_typeinfo, NULL) PHP_FE(com_message_pump, NULL) PHP_FE(com_load_typelib, NULL) + PHP_FE(com_get_active_object, NULL) { NULL, NULL, NULL } }; @@ -187,7 +188,8 @@ ZEND_INIT_MODULE_GLOBALS(com_dotnet, php_com_dotnet_init_globals, NULL); REGISTER_INI_ENTRIES(); - php_com_wrapper_minit(INIT_FUNC_ARGS_PASSTHRU); + php_com_wrapper_minit(INIT_FUNC_ARGS_PASSTHRU); + php_com_persist_minit(INIT_FUNC_ARGS_PASSTHRU); INIT_CLASS_ENTRY(ce, com_exception, NULL); php_com_exception_class_entry = zend_register_internal_class_ex(ce, zend_exception_get_default(), NULL TSRMLS_CC); @@ -282,6 +284,7 @@ COM_CONST(DISP_E_DIVBYZERO); COM_CONST(DISP_E_OVERFLOW); COM_CONST(DISP_E_BADINDEX); + COM_CONST(MK_E_UNAVAILABLE); return SUCCESS; } http://cvs.php.net/diff.php/php-src/ext/com_dotnet/config.w32?r1=1.5r2=1.6ty=u Index: php-src/ext/com_dotnet/config.w32 diff -u php-src/ext/com_dotnet/config.w32:1.5 php-src/ext/com_dotnet/config.w32:1.6 --- php-src/ext/com_dotnet/config.w32:1.5 Wed Jan 7 16:00:07 2004 +++ php-src/ext/com_dotnet/config.w32 Sun May 9 11:21:29 2004 @@ -1,4 +1,4
[PHP-CVS] cvs: php-src /ext/gd gd.c /ext/gd/libgd gdft.c
iliaa Sun May 9 13:33:50 2004 EDT Modified files: /php-src/ext/gd gd.c /php-src/ext/gd/libgd gdft.c Log: Upgrade bundled GD library to 2.0.23. Fixed bug #28175 (build problem for people using FreeType 2.1.0-2.1.2). http://cvs.php.net/diff.php/php-src/ext/gd/gd.c?r1=1.291r2=1.292ty=u Index: php-src/ext/gd/gd.c diff -u php-src/ext/gd/gd.c:1.291 php-src/ext/gd/gd.c:1.292 --- php-src/ext/gd/gd.c:1.291 Wed Apr 7 18:27:32 2004 +++ php-src/ext/gd/gd.c Sun May 9 13:33:50 2004 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: gd.c,v 1.291 2004/04/07 22:27:32 edink Exp $ */ +/* $Id: gd.c,v 1.292 2004/05/09 17:33:50 iliaa Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -453,7 +453,7 @@ /* }}} */ #if HAVE_GD_BUNDLED -#define PHP_GD_VERSION_STRING bundled (2.0.22 compatible) +#define PHP_GD_VERSION_STRING bundled (2.0.23 compatible) #elif HAVE_LIBGD20 #define PHP_GD_VERSION_STRING 2.0 or higher #elif HAVE_GDIMAGECOLORRESOLVE http://cvs.php.net/diff.php/php-src/ext/gd/libgd/gdft.c?r1=1.33r2=1.34ty=u Index: php-src/ext/gd/libgd/gdft.c diff -u php-src/ext/gd/libgd/gdft.c:1.33 php-src/ext/gd/libgd/gdft.c:1.34 --- php-src/ext/gd/libgd/gdft.c:1.33Mon Mar 29 13:20:33 2004 +++ php-src/ext/gd/libgd/gdft.c Sun May 9 13:33:50 2004 @@ -434,7 +434,7 @@ encoding = charmap-encoding_id; /* EAM DEBUG - Newer versions of libfree2 make it easier by defining encodings */ -#if (defined(FREETYPE_MAJOR) (FREETYPE_MAJOR =2 ) (FREETYPE_MINOR = 1)) +#if (defined(FREETYPE_MAJOR) ((FREETYPE_MAJOR == 2 ((FREETYPE_MINOR == 1 FREETYPE_PATCH = 3) || FREETYPE_MINOR 1) || FREETYPE_MAJOR 2))) if (charmap-encoding == FT_ENCODING_MS_SYMBOL || charmap-encoding == FT_ENCODING_ADOBE_CUSTOM || charmap-encoding == FT_ENCODING_ADOBE_STANDARD) { @@ -443,7 +443,7 @@ a-face-charmap = charmap; return (void *)a; } -#endif /* Freetype 2.1 or better */ +#endif /* Freetype 2.1.3 or better */ /* EAM DEBUG */ if ((platform == 3 encoding == 1)/* Windows Unicode */ @@ -773,6 +773,8 @@ * colorindexes. -- 27.06.2001 [EMAIL PROTECTED] */ gdCache_head_t *tc_cache; + /* Tuneable horizontal and vertical resolution in dots per inch */ + int hdpi, vdpi; if (strex ((strex-flags gdFTEX_LINESPACE) == gdFTEX_LINESPACE)) { linespace = strex-linespacing; @@ -802,7 +804,19 @@ face = font-face; /* shortcut */ slot = face-glyph; /* shortcut */ - if (FT_Set_Char_Size (face, 0, (FT_F26Dot6) (ptsize * 64), GD_RESOLUTION, GD_RESOLUTION)) { + /* +* Added hdpi and vdpi to support images at non-screen resolutions, i.e. 300 dpi TIFF, +* or 100h x 50v dpi FAX format. 2.0.23. +* 2004/02/27 Mark Shackelford, [EMAIL PROTECTED] +*/ + hdpi = GD_RESOLUTION; + vdpi = GD_RESOLUTION; + if (strex (strex-flags gdFTEX_RESOLUTION)) { + hdpi = strex-hdpi; + vdpi = strex-vdpi; + } + + if (FT_Set_Char_Size(face, 0, (FT_F26Dot6) (ptsize * 64), hdpi, vdpi)) { gdCacheDelete(tc_cache); gdMutexUnlock(gdFontCacheMutex); return Could not set character size; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /ext/gd gd.c /ext/gd/libgd gdft.c
iliaa Sun May 9 13:34:02 2004 EDT Modified files: (Branch: PHP_4_3) /php-srcNEWS /php-src/ext/gd gd.c /php-src/ext/gd/libgd gdft.c Log: MFH: Upgrade bundled GD library to 2.0.23. Fixed bug #28175 (build problem for people using FreeType 2.1.0-2.1.2). http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.654r2=1.1247.2.655ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.654 php-src/NEWS:1.1247.2.655 --- php-src/NEWS:1.1247.2.654 Sat May 8 02:01:11 2004 +++ php-src/NEWSSun May 9 13:34:01 2004 @@ -1,6 +1,7 @@ PHP 4 NEWS ||| ?? ??? 2004, Version 4.3.7 +- Upgraded bundled GD library to 2.0.23. (Ilia) - Fixed possible crash inside pg_copy_(to|from) function if delimiter is more then 1 character long. (Ilia) - Fixed handling of return values from storred procedures in mssql_execute() @@ -12,6 +13,8 @@ (Ilia) - Fixed bug #28196 (missing error constants in cURL extension). (Ilia) - Fixed bug #28187 (parse_url() not handling embedded IPv6 in URLs). (Sara) +- Fixed bug #28175 (build problem for people using FreeType 2.1.0-2.1.2). + (Ilia) - Fixed bug #28147 (Crash with drawing anti-aliased lines). (Derick) - Fixed bug #28112 (sqlite_query() crashing apache on malformed query). (Ilia, Marcus) http://cvs.php.net/diff.php/php-src/ext/gd/gd.c?r1=1.221.2.40r2=1.221.2.41ty=u Index: php-src/ext/gd/gd.c diff -u php-src/ext/gd/gd.c:1.221.2.40 php-src/ext/gd/gd.c:1.221.2.41 --- php-src/ext/gd/gd.c:1.221.2.40 Wed Apr 7 18:31:29 2004 +++ php-src/ext/gd/gd.c Sun May 9 13:34:01 2004 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: gd.c,v 1.221.2.40 2004/04/07 22:31:29 edink Exp $ */ +/* $Id: gd.c,v 1.221.2.41 2004/05/09 17:34:01 iliaa Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -390,7 +390,7 @@ /* }}} */ #if HAVE_GD_BUNDLED -#define PHP_GD_VERSION_STRING bundled (2.0.22 compatible) +#define PHP_GD_VERSION_STRING bundled (2.0.23 compatible) #elif HAVE_LIBGD20 #define PHP_GD_VERSION_STRING 2.0 or higher #elif HAVE_GDIMAGECOLORRESOLVE http://cvs.php.net/diff.php/php-src/ext/gd/libgd/gdft.c?r1=1.11.2.16r2=1.11.2.17ty=u Index: php-src/ext/gd/libgd/gdft.c diff -u php-src/ext/gd/libgd/gdft.c:1.11.2.16 php-src/ext/gd/libgd/gdft.c:1.11.2.17 --- php-src/ext/gd/libgd/gdft.c:1.11.2.16 Mon Mar 29 13:21:00 2004 +++ php-src/ext/gd/libgd/gdft.c Sun May 9 13:34:02 2004 @@ -473,7 +473,7 @@ encoding = charmap-encoding_id; /* EAM DEBUG - Newer versions of libfree2 make it easier by defining encodings */ -#if (defined(FREETYPE_MAJOR) (FREETYPE_MAJOR =2 ) (FREETYPE_MINOR = 1)) +#if (defined(FREETYPE_MAJOR) ((FREETYPE_MAJOR == 2 ((FREETYPE_MINOR == 1 FREETYPE_PATCH = 3) || FREETYPE_MINOR 1) || FREETYPE_MAJOR 2))) if (charmap-encoding == FT_ENCODING_MS_SYMBOL || charmap-encoding == FT_ENCODING_ADOBE_CUSTOM || charmap-encoding == FT_ENCODING_ADOBE_STANDARD) { @@ -482,7 +482,7 @@ a-face-charmap = charmap; return (void *)a; } -#endif /* Freetype 2.1 or better */ +#endif /* Freetype 2.1.3 or better */ /* EAM DEBUG */ if ((platform == 3 encoding == 1)/* Windows Unicode */ @@ -843,6 +843,8 @@ * colorindexes. -- 27.06.2001 [EMAIL PROTECTED] */ gdCache_head_t *tc_cache; + /* Tuneable horizontal and vertical resolution in dots per inch */ + int hdpi, vdpi; if (strex ((strex-flags gdFTEX_LINESPACE) == gdFTEX_LINESPACE)) { linespace = strex-linespacing; @@ -872,7 +874,19 @@ face = font-face; /* shortcut */ slot = face-glyph; /* shortcut */ - if (FT_Set_Char_Size (face, 0, (FT_F26Dot6) (ptsize * 64), GD_RESOLUTION, GD_RESOLUTION)) { + /* +* Added hdpi and vdpi to support images at non-screen resolutions, i.e. 300 dpi TIFF, +* or 100h x 50v dpi FAX format. 2.0.23. +* 2004/02/27 Mark Shackelford, [EMAIL PROTECTED] +*/ + hdpi = GD_RESOLUTION; + vdpi = GD_RESOLUTION; + if (strex (strex-flags gdFTEX_RESOLUTION)) { + hdpi = strex-hdpi; + vdpi = strex-vdpi; + } + + if (FT_Set_Char_Size(face, 0, (FT_F26Dot6) (ptsize * 64), hdpi, vdpi)) { gdCacheDelete(tc_cache); gdMutexUnlock(gdFontCacheMutex); return Could not set character size; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/gd gd.c
iliaa Sun May 9 13:39:20 2004 EDT Modified files: /php-src/ext/gd gd.c Log: Fixed bug #28267 (php_image_filter_contrast calls gdImageBrightness). http://cvs.php.net/diff.php/php-src/ext/gd/gd.c?r1=1.292r2=1.293ty=u Index: php-src/ext/gd/gd.c diff -u php-src/ext/gd/gd.c:1.292 php-src/ext/gd/gd.c:1.293 --- php-src/ext/gd/gd.c:1.292 Sun May 9 13:33:50 2004 +++ php-src/ext/gd/gd.c Sun May 9 13:39:20 2004 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: gd.c,v 1.292 2004/05/09 17:33:50 iliaa Exp $ */ +/* $Id: gd.c,v 1.293 2004/05/09 17:39:20 iliaa Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -3978,20 +3978,20 @@ /* Section Filters */ #ifdef HAVE_GD_BUNDLED -static void php_image_filter_negate(INTERNAL_FUNCTION_PARAMETERS) -{ - zval **SIM; - gdImagePtr im_src; - - if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(1, SIM) == FAILURE) { - ZEND_WRONG_PARAM_COUNT(); +#define PHP_GD_SINGLE_RES \ + zval **SIM; \ + gdImagePtr im_src; \ + if (zend_get_parameters_ex(1, SIM) == FAILURE) { \ + RETURN_FALSE; \ + } \ + ZEND_FETCH_RESOURCE(im_src, gdImagePtr, SIM, -1, Image, le_gd); \ + if (im_src == NULL) { \ + RETURN_FALSE; \ } - ZEND_FETCH_RESOURCE(im_src, gdImagePtr, SIM, -1, Image, le_gd); - - if (im_src == NULL) { - RETURN_FALSE; - } +static void php_image_filter_negate(INTERNAL_FUNCTION_PARAMETERS) +{ + PHP_GD_SINGLE_RES if (gdImageNegate(im_src) == 1) { RETURN_TRUE; @@ -4002,18 +4002,7 @@ static void php_image_filter_grayscale(INTERNAL_FUNCTION_PARAMETERS) { - zval **SIM; - gdImagePtr im_src; - - if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(1, SIM) == FAILURE) { - ZEND_WRONG_PARAM_COUNT(); - } - - ZEND_FETCH_RESOURCE(im_src, gdImagePtr, SIM, -1, Image, le_gd); - - if (im_src == NULL) { - RETURN_FALSE; - } + PHP_GD_SINGLE_RES if (gdImageGrayScale(im_src) == 1) { RETURN_TRUE; @@ -4028,8 +4017,8 @@ gdImagePtr im_src; long brightness, tmp; - if (ZEND_NUM_ARGS() != 3 || zend_parse_parameters(3 TSRMLS_CC, zll, SIM, tmp, brightness) == FAILURE) { - ZEND_WRONG_PARAM_COUNT(); + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, zll, SIM, tmp, brightness) == FAILURE) { + RETURN_FALSE; } ZEND_FETCH_RESOURCE(im_src, gdImagePtr, SIM, -1, Image, le_gd); @@ -4051,8 +4040,8 @@ gdImagePtr im_src; long contrast, tmp; - if (ZEND_NUM_ARGS() != 3 || zend_parse_parameters(3 TSRMLS_CC, rll, SIM, tmp, contrast) == FAILURE) { - ZEND_WRONG_PARAM_COUNT(); + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rll, SIM, tmp, contrast) == FAILURE) { + RETURN_FALSE; } ZEND_FETCH_RESOURCE(im_src, gdImagePtr, SIM, -1, Image, le_gd); @@ -4061,7 +4050,7 @@ RETURN_FALSE; } - if (gdImageBrightness(im_src, (int)contrast) == 1) { + if (gdImageContrast(im_src, (int)contrast) == 1) { RETURN_TRUE; } @@ -4074,8 +4063,8 @@ gdImagePtr im_src; long r,g,b,tmp; - if (ZEND_NUM_ARGS() != 5 || zend_parse_parameters(5 TSRMLS_CC, r, SIM, tmp, r, g, b) == FAILURE) { - ZEND_WRONG_PARAM_COUNT(); + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r, SIM, tmp, r, g, b) == FAILURE) { + RETURN_FALSE; } ZEND_FETCH_RESOURCE(im_src, gdImagePtr, SIM, -1, Image, le_gd); @@ -4093,18 +4082,7 @@ static void php_image_filter_edgedetect(INTERNAL_FUNCTION_PARAMETERS) { - zval **SIM; - gdImagePtr im_src; - - if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(1, SIM) == FAILURE) { - ZEND_WRONG_PARAM_COUNT(); - } - - ZEND_FETCH_RESOURCE(im_src, gdImagePtr, SIM, -1, Image, le_gd); - - if (im_src == NULL) { - RETURN_FALSE; - } + PHP_GD_SINGLE_RES if (gdImageEdgeDetectQuick(im_src) == 1) { RETURN_TRUE; @@ -4115,18 +4093,7 @@ static void php_image_filter_emboss(INTERNAL_FUNCTION_PARAMETERS) { - zval **SIM; - gdImagePtr im_src; - - if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(1, SIM) == FAILURE) { - ZEND_WRONG_PARAM_COUNT(); - } - - ZEND_FETCH_RESOURCE(im_src, gdImagePtr, SIM, -1, Image, le_gd); - - if (im_src == NULL) { - RETURN_FALSE; - } + PHP_GD_SINGLE_RES if (gdImageEmboss(im_src) == 1) { RETURN_TRUE; @@ -4137,18 +4104,7 @@ static void
[PHP-CVS] cvs: php-src /ext/gd/libgd gd_topal.c
iliaa Sun May 9 13:47:32 2004 EDT Modified files: /php-src/ext/gd/libgd gd_topal.c Log: Fixed bug #28311 (Transparency detection code is off by 1). http://cvs.php.net/diff.php/php-src/ext/gd/libgd/gd_topal.c?r1=1.14r2=1.15ty=u Index: php-src/ext/gd/libgd/gd_topal.c diff -u php-src/ext/gd/libgd/gd_topal.c:1.14 php-src/ext/gd/libgd/gd_topal.c:1.15 --- php-src/ext/gd/libgd/gd_topal.c:1.14Tue Dec 30 20:01:44 2003 +++ php-src/ext/gd/libgd/gd_topal.c Sun May 9 13:47:31 2004 @@ -1260,7 +1260,7 @@ * will later be added at the end of the palette as the transparent * index. */ - if ((im-transparent = 0) (im-transparent == *inptr)) { + if ((im-transparent = 0) (im-transparent == *(inptr - 1))) { *outptr++ = im-colorsTotal; continue; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/gd/libgd gd.c
iliaa Sun May 9 14:25:33 2004 EDT Modified files: /php-src/ext/gd/libgd gd.c Log: Fixed bug #28304 (Missing bounds check inside imagefilter()). http://cvs.php.net/diff.php/php-src/ext/gd/libgd/gd.c?r1=1.79r2=1.80ty=u Index: php-src/ext/gd/libgd/gd.c diff -u php-src/ext/gd/libgd/gd.c:1.79 php-src/ext/gd/libgd/gd.c:1.80 --- php-src/ext/gd/libgd/gd.c:1.79 Tue Apr 27 10:59:07 2004 +++ php-src/ext/gd/libgd/gd.c Sun May 9 14:25:33 2004 @@ -3607,8 +3607,9 @@ new_a = gdImageAlpha(srcback, pxl); for (j=0; j3; j++) { + int yv = MIN(MAX(y - 1 + j, 0), src-sy - 1); for (i=0; i3; i++) { - pxl = f(srcback, x-(31)+i, y-(31)+j); + pxl = f(srcback, MIN(MAX(x - 1 + i, 0), src-sx - 1), yv); new_r += (float)gdImageRed(srcback, pxl) * filter[j][i]; new_g += (float)gdImageGreen(srcback, pxl) * filter[j][i]; new_b += (float)gdImageBlue(srcback, pxl) * filter[j][i]; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / NEWS
iliaa Sun May 9 14:26:40 2004 EDT Modified files: /php-srcNEWS Log: GD bug fixing news. http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1707r2=1.1708ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1707 php-src/NEWS:1.1708 --- php-src/NEWS:1.1707 Sun May 9 10:22:02 2004 +++ php-src/NEWSSun May 9 14:26:40 2004 @@ -3,8 +3,12 @@ ?? ??? 2004, PHP 5 Release Candidate 3 - Added count() support for COM arrays. (Wez) - Changed tidy_node to tidyNode and removed tidy_exception. (John) +- Fixed bug #28311 (Transparency detection code is off by 1). + (Ilia, pikeman at pikeman dot sytes dot net) +- Fixed bug #28304 (Missing bounds check inside imagefilter()). (Ilia) - Fixed bug #28300 (Userspace stream/filter names forced to lowercase). (Sara) - Fixed bug #28287 (stream_*_register() not calling __autoload()). (Sara) +- Fixed bug #28267 (php_image_filter_contrast calls gdImageBrightness). (Ilia) - Fixed bug #28161 (COM: Array style properties could not be accessed). (Wez) - Fixed bug #28125 (ArrayObject leaks when accessing elements). (Marcus) - Fixed bug #28099 (ArrayObject doesn't implement ArrayAccess). (Marcus) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard dir.c
iliaa Sun May 9 15:01:14 2004 EDT Modified files: /php-src/ext/standard dir.c Log: Fixed bug #28289 (incorrect resolving of relative paths by glob() in windows). http://cvs.php.net/diff.php/php-src/ext/standard/dir.c?r1=1.136r2=1.137ty=u Index: php-src/ext/standard/dir.c diff -u php-src/ext/standard/dir.c:1.136 php-src/ext/standard/dir.c:1.137 --- php-src/ext/standard/dir.c:1.136Tue Mar 16 18:23:17 2004 +++ php-src/ext/standard/dir.c Sun May 9 15:01:13 2004 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: dir.c,v 1.136 2004/03/16 23:23:17 iliaa Exp $ */ +/* $Id: dir.c,v 1.137 2004/05/09 19:01:13 iliaa Exp $ */ /* {{{ includes/startup/misc */ @@ -379,11 +379,13 @@ if (!result) { cwd[0] = '\0'; } - cwd_skip = strlen(cwd)+1; #ifdef PHP_WIN32 - if (IS_SLASH(cwd[0]) !IS_UNC_PATH(pattern, pattern_len)) { + if (!IS_SLASH(cwd[0])) { cwd[2] = '\0'; + cwd_skip = 3; } +#else + cwd_skip = strlen(cwd)+1; #endif snprintf(work_pattern, MAXPATHLEN, %s%c%s, cwd, DEFAULT_SLASH, pattern); pattern = work_pattern; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /ext/standard dir.c
iliaa Sun May 9 15:01:28 2004 EDT Modified files: (Branch: PHP_4_3) /php-srcNEWS /php-src/ext/standard dir.c Log: MFH: Fixed bug #28289 (incorrect resolving of relative paths by glob() in windows). http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.655r2=1.1247.2.656ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.655 php-src/NEWS:1.1247.2.656 --- php-src/NEWS:1.1247.2.655 Sun May 9 13:34:01 2004 +++ php-src/NEWSSun May 9 15:01:26 2004 @@ -8,6 +8,8 @@ with multiple result sets returned. (Frank) - Fixed logic bug in session_register() which allowed registering _SESSION and/or HTTP_SESSION_VARS. (Sara) +- Fixed bug #28289 (incorrect resolving of relative paths by glob() in + windows). (Ilia) - Fixed bug #28229 (run-tests tripped up by spaces in names). (Marcus) - Fixed bug #28228 (number_format() does not allow empty decimal separator). (Ilia) http://cvs.php.net/diff.php/php-src/ext/standard/dir.c?r1=1.109.2.14r2=1.109.2.15ty=u Index: php-src/ext/standard/dir.c diff -u php-src/ext/standard/dir.c:1.109.2.14 php-src/ext/standard/dir.c:1.109.2.15 --- php-src/ext/standard/dir.c:1.109.2.14 Tue Mar 16 18:23:26 2004 +++ php-src/ext/standard/dir.c Sun May 9 15:01:27 2004 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: dir.c,v 1.109.2.14 2004/03/16 23:23:26 iliaa Exp $ */ +/* $Id: dir.c,v 1.109.2.15 2004/05/09 19:01:27 iliaa Exp $ */ /* {{{ includes/startup/misc */ @@ -370,11 +370,13 @@ if (!result) { cwd[0] = '\0'; } - cwd_skip = strlen(cwd)+1; #ifdef PHP_WIN32 - if (IS_SLASH(cwd[0]) !IS_UNC_PATH(pattern, pattern_len)) { + if (!IS_SLASH(cwd[0])) { cwd[2] = '\0'; + cwd_skip = 3; } +#else + cwd_skip = strlen(cwd)+1; #endif snprintf(work_pattern, MAXPATHLEN, %s%c%s, cwd, DEFAULT_SLASH, pattern); pattern = work_pattern; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/dba dba_db2.c dba_db3.c dba_db4.c
helly Sun May 9 21:42:43 2004 EDT Modified files: /php-src/ext/dbadba_db2.c dba_db3.c dba_db4.c Log: - Fix problems with c mode http://cvs.php.net/diff.php/php-src/ext/dba/dba_db2.c?r1=1.37r2=1.38ty=u Index: php-src/ext/dba/dba_db2.c diff -u php-src/ext/dba/dba_db2.c:1.37 php-src/ext/dba/dba_db2.c:1.38 --- php-src/ext/dba/dba_db2.c:1.37 Thu Jan 8 03:14:39 2004 +++ php-src/ext/dba/dba_db2.c Sun May 9 21:42:43 2004 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: dba_db2.c,v 1.37 2004/01/08 08:14:39 andi Exp $ */ +/* $Id: dba_db2.c,v 1.38 2004/05/10 01:42:43 helly Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -53,6 +53,10 @@ struct stat check_stat; int s = VCWD_STAT(info-path, check_stat); + if (!s !check_stat.st_size) { + info-mode = DBA_TRUNC; /* force truncate */ + } + type = info-mode == DBA_READER ? DB_UNKNOWN : info-mode == DBA_TRUNC ? DB_BTREE : s ? DB_BTREE : DB_UNKNOWN; http://cvs.php.net/diff.php/php-src/ext/dba/dba_db3.c?r1=1.31r2=1.32ty=u Index: php-src/ext/dba/dba_db3.c diff -u php-src/ext/dba/dba_db3.c:1.31 php-src/ext/dba/dba_db3.c:1.32 --- php-src/ext/dba/dba_db3.c:1.31 Thu Jan 8 03:14:39 2004 +++ php-src/ext/dba/dba_db3.c Sun May 9 21:42:43 2004 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: dba_db3.c,v 1.31 2004/01/08 08:14:39 andi Exp $ */ +/* $Id: dba_db3.c,v 1.32 2004/05/10 01:42:43 helly Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -62,9 +62,13 @@ struct stat check_stat; int s = VCWD_STAT(info-path, check_stat); - type = info-mode == DBA_READER ? DB_UNKNOWN : + if (!s !check_stat.st_size) { + info-mode = DBA_TRUNC; /* force truncate */ + } + + type = info-mode == DBA_READER ? DB_UNKNOWN : info-mode == DBA_TRUNC ? DB_BTREE : - s? DB_BTREE : DB_UNKNOWN; + s ? DB_BTREE : DB_UNKNOWN; gmode = info-mode == DBA_READER ? DB_RDONLY : (info-mode == DBA_CREAT s) ? DB_CREATE : http://cvs.php.net/diff.php/php-src/ext/dba/dba_db4.c?r1=1.13r2=1.14ty=u Index: php-src/ext/dba/dba_db4.c diff -u php-src/ext/dba/dba_db4.c:1.13 php-src/ext/dba/dba_db4.c:1.14 --- php-src/ext/dba/dba_db4.c:1.13 Thu Jan 8 03:14:39 2004 +++ php-src/ext/dba/dba_db4.c Sun May 9 21:42:43 2004 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: dba_db4.c,v 1.13 2004/01/08 08:14:39 andi Exp $ */ +/* $Id: dba_db4.c,v 1.14 2004/05/10 01:42:43 helly Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -63,9 +63,13 @@ struct stat check_stat; int s = VCWD_STAT(info-path, check_stat); - type = info-mode == DBA_READER ? DB_UNKNOWN : + if (!s !check_stat.st_size) { + info-mode = DBA_TRUNC; /* force truncate */ + } + + type = info-mode == DBA_READER ? DB_UNKNOWN : info-mode == DBA_TRUNC ? DB_BTREE : - s? DB_BTREE : DB_UNKNOWN; + s ? DB_BTREE : DB_UNKNOWN; gmode = info-mode == DBA_READER ? DB_RDONLY : (info-mode == DBA_CREAT s) ? DB_CREATE : -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/dba dba_db2.c dba_db3.c dba_db4.c
helly Sun May 9 21:47:51 2004 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/dbadba_db2.c dba_db3.c dba_db4.c Log: MFH Fix problems with c mode http://cvs.php.net/diff.php/php-src/ext/dba/dba_db2.c?r1=1.30.2.5r2=1.30.2.6ty=u Index: php-src/ext/dba/dba_db2.c diff -u php-src/ext/dba/dba_db2.c:1.30.2.5 php-src/ext/dba/dba_db2.c:1.30.2.6 --- php-src/ext/dba/dba_db2.c:1.30.2.5 Thu Nov 13 03:59:16 2003 +++ php-src/ext/dba/dba_db2.c Sun May 9 21:47:51 2004 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: dba_db2.c,v 1.30.2.5 2003/11/13 08:59:16 helly Exp $ */ +/* $Id: dba_db2.c,v 1.30.2.6 2004/05/10 01:47:51 helly Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -53,6 +53,10 @@ struct stat check_stat; int s = VCWD_STAT(info-path, check_stat); + if (!s !check_stat.st_size) { + info-mode = DBA_TRUNC; /* force truncate */ + } + type = info-mode == DBA_READER ? DB_UNKNOWN : info-mode == DBA_TRUNC ? DB_BTREE : s ? DB_BTREE : DB_UNKNOWN; http://cvs.php.net/diff.php/php-src/ext/dba/dba_db3.c?r1=1.21.2.7r2=1.21.2.8ty=u Index: php-src/ext/dba/dba_db3.c diff -u php-src/ext/dba/dba_db3.c:1.21.2.7 php-src/ext/dba/dba_db3.c:1.21.2.8 --- php-src/ext/dba/dba_db3.c:1.21.2.7 Thu Nov 13 03:59:16 2003 +++ php-src/ext/dba/dba_db3.c Sun May 9 21:47:51 2004 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: dba_db3.c,v 1.21.2.7 2003/11/13 08:59:16 helly Exp $ */ +/* $Id: dba_db3.c,v 1.21.2.8 2004/05/10 01:47:51 helly Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -62,9 +62,13 @@ struct stat check_stat; int s = VCWD_STAT(info-path, check_stat); - type = info-mode == DBA_READER ? DB_UNKNOWN : + if (!s !check_stat.st_size) { + info-mode = DBA_TRUNC; /* force truncate */ + } + + type = info-mode == DBA_READER ? DB_UNKNOWN : info-mode == DBA_TRUNC ? DB_BTREE : - s? DB_BTREE : DB_UNKNOWN; + s ? DB_BTREE : DB_UNKNOWN; gmode = info-mode == DBA_READER ? DB_RDONLY : (info-mode == DBA_CREAT s) ? DB_CREATE : http://cvs.php.net/diff.php/php-src/ext/dba/dba_db4.c?r1=1.6.2.5r2=1.6.2.6ty=u Index: php-src/ext/dba/dba_db4.c diff -u php-src/ext/dba/dba_db4.c:1.6.2.5 php-src/ext/dba/dba_db4.c:1.6.2.6 --- php-src/ext/dba/dba_db4.c:1.6.2.5 Thu Nov 13 03:59:16 2003 +++ php-src/ext/dba/dba_db4.c Sun May 9 21:47:51 2004 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: dba_db4.c,v 1.6.2.5 2003/11/13 08:59:16 helly Exp $ */ +/* $Id: dba_db4.c,v 1.6.2.6 2004/05/10 01:47:51 helly Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -62,9 +62,13 @@ struct stat check_stat; int s = VCWD_STAT(info-path, check_stat); - type = info-mode == DBA_READER ? DB_UNKNOWN : + if (!s !check_stat.st_size) { + info-mode = DBA_TRUNC; /* force truncate */ + } + + type = info-mode == DBA_READER ? DB_UNKNOWN : info-mode == DBA_TRUNC ? DB_BTREE : - s? DB_BTREE : DB_UNKNOWN; + s ? DB_BTREE : DB_UNKNOWN; gmode = info-mode == DBA_READER ? DB_RDONLY : (info-mode == DBA_CREAT s) ? DB_CREATE : -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/gd/libgd gd.h
iliaa Sun May 9 22:18:49 2004 EDT Modified files: /php-src/ext/gd/libgd gd.h Log: Missing part of the upgrade patch. http://cvs.php.net/diff.php/php-src/ext/gd/libgd/gd.h?r1=1.22r2=1.23ty=u Index: php-src/ext/gd/libgd/gd.h diff -u php-src/ext/gd/libgd/gd.h:1.22 php-src/ext/gd/libgd/gd.h:1.23 --- php-src/ext/gd/libgd/gd.h:1.22 Mon Apr 12 17:42:42 2004 +++ php-src/ext/gd/libgd/gd.h Sun May 9 22:18:49 2004 @@ -321,11 +321,14 @@ gdFTEX_Shift_JIS, or gdFTEX_Big5; when not specified, maps are searched for in the above order. */ + int hdpi; + int vdpi; } gdFTStringExtra, *gdFTStringExtraPtr; #define gdFTEX_LINESPACE 1 #define gdFTEX_CHARMAP 2 +#define gdFTEX_RESOLUTION 4 /* These are NOT flags; set one in 'charmap' if you set the gdFTEX_CHARMAP bit in 'flags'. */ #define gdFTEX_Unicode 0 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/gd/libgd gd.h
iliaa Sun May 9 22:19:22 2004 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/gd/libgd gd.h Log: Added missing upgrade bit. http://cvs.php.net/diff.php/php-src/ext/gd/libgd/gd.h?r1=1.7.2.9r2=1.7.2.10ty=u Index: php-src/ext/gd/libgd/gd.h diff -u php-src/ext/gd/libgd/gd.h:1.7.2.9 php-src/ext/gd/libgd/gd.h:1.7.2.10 --- php-src/ext/gd/libgd/gd.h:1.7.2.9 Mon Apr 12 17:43:19 2004 +++ php-src/ext/gd/libgd/gd.h Sun May 9 22:19:22 2004 @@ -320,11 +320,14 @@ gdFTEX_Shift_JIS, or gdFTEX_Big5; when not specified, maps are searched for in the above order. */ + int hdpi; + int vdpi; } gdFTStringExtra, *gdFTStringExtraPtr; #define gdFTEX_LINESPACE 1 #define gdFTEX_CHARMAP 2 +#define gdFTEX_RESOLUTION 4 /* These are NOT flags; set one in 'charmap' if you set the gdFTEX_CHARMAP bit in 'flags'. */ #define gdFTEX_Unicode 0 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php