cvs: php4 /ext/bz2 bz2.c /ext/curl curl.c /ext/gd gd.c /ext/pdf pdf.c /ext/pgsql pgsql.c /ext/recode recode.c /main streams.c

From: Date: Thu, 21 Mar 2002 22:35:02 +0000
Subject: cvs: php4 /ext/bz2 bz2.c /ext/curl curl.c /ext/gd gd.c /ext/pdf pdf.c /ext/pgsql pgsql.c /ext/recode recode.c /main streams.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-10561@lists.php.net to get a copy of this message
mfischer Thu Mar 21 17:35:02 2002 EDT Modified files: /php4/ext/bz2 bz2.c /php4/ext/curl curl.c /php4/ext/gd gd.c /php4/ext/pdf pdf.c /php4/ext/pgsql pgsql.c /php4/ext/recode recode.c /php4/main streams.c Log: Index: php4/ext/bz2/bz2.c diff -u php4/ext/bz2/bz2.c:1.42 php4/ext/bz2/bz2.c:1.43 --- php4/ext/bz2/bz2.c:1.42 Thu Mar 21 12:02:44 2002 +++ php4/ext/bz2/bz2.c Thu Mar 21 17:34:54 2002 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: bz2.c,v 1.42 2002/03/21 17:02:44 wez Exp $ */ +/* $Id: bz2.c,v 1.43 2002/03/21 22:34:54 mfischer Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -276,7 +276,7 @@ 1, php_file_le_stream()); ZEND_VERIFY_RESOURCE(stream); - if (!php_stream_cast(stream, PHP_STREAM_AS_FD, (void*)&fd, REPORT_ERRORS)) + if (FAILURE == php_stream_cast(stream, PHP_STREAM_AS_FD, (void*)&fd, REPORT_ERRORS)) RETURN_FALSE; bz = BZ2_bzdopen(fd, Z_STRVAL_PP(mode)); Index: php4/ext/curl/curl.c diff -u php4/ext/curl/curl.c:1.107 php4/ext/curl/curl.c:1.108 --- php4/ext/curl/curl.c:1.107 Mon Mar 18 13:00:24 2002 +++ php4/ext/curl/curl.c Thu Mar 21 17:34:54 2002 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: curl.c,v 1.107 2002/03/18 18:00:24 hholzgra Exp $ */ +/* $Id: curl.c,v 1.108 2002/03/21 22:34:54 mfischer Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -705,7 +705,7 @@ what = zend_fetch_resource(zvalue TSRMLS_CC, -1, "File-Handle", &type, 1, php_file_le_stream()); ZEND_VERIFY_RESOURCE(what); - if (!php_stream_cast((php_stream*)what, PHP_STREAM_AS_STDIO, (void*)&fp, REPORT_ERRORS)) + if (FAILURE == php_stream_cast((php_stream*)what, PHP_STREAM_AS_STDIO, (void*)&fp, REPORT_ERRORS)) RETURN_FALSE; if (!fp) { RETURN_FALSE; Index: php4/ext/gd/gd.c diff -u php4/ext/gd/gd.c:1.183 php4/ext/gd/gd.c:1.184 --- php4/ext/gd/gd.c:1.183 Sun Mar 17 17:50:55 2002 +++ php4/ext/gd/gd.c Thu Mar 21 17:34:55 2002 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: gd.c,v 1.183 2002/03/17 22:50:55 wez Exp $ */ +/* $Id: gd.c,v 1.184 2002/03/21 22:34:55 mfischer Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -1161,7 +1161,9 @@ /* try and avoid allocating a FILE* if the stream is not naturally a FILE* */ if (php_stream_is(stream, PHP_STREAM_IS_STDIO)) { - php_stream_cast(stream, PHP_STREAM_AS_STDIO, (void**)&fp, REPORT_ERRORS); + if (FAILURE == php_stream_cast(stream, PHP_STREAM_AS_STDIO, (void**)&fp, REPORT_ERRORS)) { + goto out_err; + } } else if (ioctx_func_p) { #ifdef USE_GD_IOCTX Index: php4/ext/pdf/pdf.c diff -u php4/ext/pdf/pdf.c:1.108 php4/ext/pdf/pdf.c:1.109 --- php4/ext/pdf/pdf.c:1.108 Fri Mar 15 20:27:13 2002 +++ php4/ext/pdf/pdf.c Thu Mar 21 17:34:56 2002 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdf.c,v 1.108 2002/03/16 01:27:13 wez Exp $ */ +/* $Id: pdf.c,v 1.109 2002/03/21 22:34:56 mfischer Exp $ */ /* pdflib 2.02 ... 3.0x is subject to the ALADDIN FREE PUBLIC LICENSE. Copyright (C) 1997-1999 Thomas Merz. 2000-2001 PDFlib GmbH */ @@ -348,7 +348,7 @@ #else php_info_print_table_row(2, "PDFlib GmbH Version", tmp ); #endif - php_info_print_table_row(2, "Revision", "$Revision: 1.108 $" ); + php_info_print_table_row(2, "Revision", "$Revision: 1.109 $" ); php_info_print_table_end(); } @@ -479,7 +479,7 @@ what = zend_fetch_resource(file TSRMLS_CC, -1, "File-Handle", &type, 1, php_file_le_stream()); ZEND_VERIFY_RESOURCE(what); - if (!php_stream_cast((php_stream*)what, PHP_STREAM_AS_STDIO, (void*)&fp, 1) == FAILURE) { + if (php_stream_cast((php_stream*)what, PHP_STREAM_AS_STDIO, (void*)&fp, 1) == FAILURE) { RETURN_FALSE; } /* XXX should do a zend_list_addref for <fp> here! */ Index: php4/ext/pgsql/pgsql.c diff -u php4/ext/pgsql/pgsql.c:1.160 php4/ext/pgsql/pgsql.c:1.161 --- php4/ext/pgsql/pgsql.c:1.160 Wed Mar 20 19:06:45 2002 +++ php4/ext/pgsql/pgsql.c Thu Mar 21 17:34:57 2002 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pgsql.c,v 1.160 2002/03/21 00:06:45 yohgaki Exp $ */ +/* $Id: pgsql.c,v 1.161 2002/03/21 22:34:57 mfischer Exp $ */ #include <stdlib.h> @@ -1478,7 +1478,7 @@ RETURN_FALSE; } - if (!php_stream_cast(stream, PHP_STREAM_AS_STDIO, (void**)fp, REPORT_ERRORS)) { + if (FAILURE == php_stream_cast(stream, PHP_STREAM_AS_STDIO, (void**)fp, REPORT_ERRORS)) { php_stream_close(stream); RETURN_FALSE; } Index: php4/ext/recode/recode.c diff -u php4/ext/recode/recode.c:1.24 php4/ext/recode/recode.c:1.25 --- php4/ext/recode/recode.c:1.24 Mon Mar 18 06:46:00 2002 +++ php4/ext/recode/recode.c Thu Mar 21 17:35:00 2002 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: recode.c,v 1.24 2002/03/18 11:46:00 wez Exp $ */ +/* $Id: recode.c,v 1.25 2002/03/21 22:35:00 mfischer Exp $ */ /* {{{ includes & prototypes */ @@ -98,7 +98,7 @@ { php_info_print_table_start(); php_info_print_table_row(2, "Recode Support", "enabled"); - php_info_print_table_row(2, "Revision", "$Revision: 1.24 $"); + php_info_print_table_row(2, "Revision", "$Revision: 1.25 $"); php_info_print_table_end(); } @@ -181,7 +181,7 @@ RETURN_FALSE; } - if (!php_stream_cast(instream, PHP_STREAM_AS_STDIO, (void**)&in_fp, REPORT_ERRORS)) { + if (FAILURE == php_stream_cast(instream, PHP_STREAM_AS_STDIO, (void**)&in_fp, REPORT_ERRORS)) { RETURN_FALSE; } @@ -191,7 +191,7 @@ php_error(E_WARNING,"Unable to find output file identifier"); RETURN_FALSE; } - if (!php_stream_cast(outstream, PHP_STREAM_AS_STDIO, (void**)&out_fp, REPORT_ERRORS)) { + if (FAILURE == php_stream_cast(outstream, PHP_STREAM_AS_STDIO, (void**)&out_fp, REPORT_ERRORS)) { RETURN_FALSE; } Index: php4/main/streams.c diff -u php4/main/streams.c:1.40 php4/main/streams.c:1.41 --- php4/main/streams.c:1.40 Thu Mar 21 12:02:48 2002 +++ php4/main/streams.c Thu Mar 21 17:35:02 2002 @@ -297,7 +297,7 @@ #ifdef HAVE_MMAP if (!php_stream_is(stream, PHP_STREAM_IS_SOCKET) - && php_stream_cast(stream, PHP_STREAM_AS_FD, (void*)&fd, 0)) + && SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD, (void*)&fd, 0)) { struct stat sbuf; off_t off;

« previous php.cvs (#10561) next »