[PHP4BETA] CVS update: php4/ext/zlib

From: Date: Fri, 21 May 1999 10:06:25 +0000
Subject: [PHP4BETA] CVS update: php4/ext/zlib
Groups: php.version4 
Request: Send a blank email to php-version4+get-963@lists.php.net to get a copy of this message
Date: Friday May 21, 1999 @ 6:06 Author: sas Update of /repository/php4/ext/zlib In directory php:/tmp/cvs-serv14196/ext/zlib Modified Files: php3_zlib.h zlib.c Log Message: - run ext sources through conv_proto - add necessary phpext_*_ptr Index: php4/ext/zlib/php3_zlib.h diff -u php4/ext/zlib/php3_zlib.h:1.3 php4/ext/zlib/php3_zlib.h:1.4 --- php4/ext/zlib/php3_zlib.h:1.3 Fri May 21 04:20:13 1999 +++ php4/ext/zlib/php3_zlib.h Fri May 21 06:06:25 1999 @@ -23,7 +23,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php3_zlib.h,v 1.3 1999/05/21 08:20:13 sas Exp $ */ +/* $Id: php3_zlib.h,v 1.4 1999/05/21 10:06:25 sas Exp $ */ #ifndef _PHP3_ZLIB_H #define _PHP3_ZLIB_H @@ -40,21 +40,21 @@ extern int php3_minit_zlib(INIT_FUNC_ARGS); extern int php3_mshutdown_zlib(SHUTDOWN_FUNC_ARGS); -extern void php3_info_zlib(ZEND_MODULE_INFO_FUNC_ARGS); -extern void php3_gzopen(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_gzclose(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_gzeof(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_gzread(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_gzgetc(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_gzgets(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_gzgetss(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_gzwrite(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_gzrewind(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_gztell(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_gzseek(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_gzpassthru(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_readgzfile(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_gzfile(INTERNAL_FUNCTION_PARAMETERS); +void php3_info_zlib(ZEND_MODULE_INFO_FUNC_ARGS); +PHP_FUNCTION(gzopen); +PHP_FUNCTION(gzclose); +PHP_FUNCTION(gzeof); +PHP_FUNCTION(gzread); +PHP_FUNCTION(gzgetc); +PHP_FUNCTION(gzgets); +PHP_FUNCTION(gzgetss); +PHP_FUNCTION(gzwrite); +PHP_FUNCTION(gzrewind); +PHP_FUNCTION(gztell); +PHP_FUNCTION(gzseek); +PHP_FUNCTION(gzpassthru); +PHP_FUNCTION(readgzfile); +PHP_FUNCTION(gzfile); #else #define zlib_module_ptr NULL Index: php4/ext/zlib/zlib.c diff -u php4/ext/zlib/zlib.c:1.4 php4/ext/zlib/zlib.c:1.5 --- php4/ext/zlib/zlib.c:1.4 Sun May 9 04:48:05 1999 +++ php4/ext/zlib/zlib.c Fri May 21 06:06:25 1999 @@ -22,7 +22,7 @@ | Stefan Röhrich <sr@linux.de> | +----------------------------------------------------------------------+ */ -/* $Id: zlib.c,v 1.4 1999/05/09 08:48:05 zeev Exp $ */ +/* $Id: zlib.c,v 1.5 1999/05/21 10:06:25 sas Exp $ */ #if !PHP_31 && defined(THREAD_SAFE) #undef THREAD_SAFE #endif @@ -310,7 +310,7 @@ /* {{{ proto array gzfile(string filename) Read und uncompress entire .gz-file into an array */ -void php3_gzfile(INTERNAL_FUNCTION_PARAMETERS) { +PHP_FUNCTION(gzfile) { pval *filename, *arg2; gzFile zp; char *slashed, buf[8192]; @@ -350,7 +350,7 @@ /* Now loop through the file and do the magic quotes thing if needed */ memset(buf,0,8191); - while((int)gzgets(zp, buf, 8191)) { + while(gzgets(zp, buf, 8191) != NULL) { if (PG(magic_quotes_runtime)) { int len; @@ -366,7 +366,7 @@ /* {{{ proto int gzopen(string filename, string mode [, int use_include_path]) Open a .gz-file and return a .gz-file pointer */ -void php3_gzopen(INTERNAL_FUNCTION_PARAMETERS) { +PHP_FUNCTION(gzopen) { pval *arg1, *arg2, *arg3; gzFile *zp; char *p; @@ -414,7 +414,7 @@ /* {{{ proto int gzclose(int zp) Close an open .gz-file pointer */ -void php3_gzclose(INTERNAL_FUNCTION_PARAMETERS) { +PHP_FUNCTION(gzclose) { pval *arg1; int id, type; gzFile *zp; @@ -437,7 +437,7 @@ /* {{{ proto int gzeof(int zp) Test for end-of-file on a .gz-file pointer */ -void php3_gzeof(INTERNAL_FUNCTION_PARAMETERS) { +PHP_FUNCTION(gzeof) { pval *arg1; gzFile *zp; int id, type; @@ -464,7 +464,7 @@ /* {{{ proto string gzgets(int zp, int length) Get a line from .gz-file pointer */ -void php3_gzgets(INTERNAL_FUNCTION_PARAMETERS) { +PHP_FUNCTION(gzgets) { pval *arg1, *arg2; gzFile *zp; int id, len, type; @@ -487,7 +487,7 @@ buf = emalloc(sizeof(char) * (len + 1)); /* needed because recv doesnt put a null at the end*/ memset(buf,0,len+1); - if (!((int)gzgets(zp, buf, len))) { + if (!(gzgets(zp, buf, len) != NULL)) { efree(buf); RETVAL_FALSE; } else { @@ -505,7 +505,7 @@ /* {{{ proto string gzgetc(int zp) Get a character from .gz-file pointer */ -void php3_gzgetc(INTERNAL_FUNCTION_PARAMETERS) { +PHP_FUNCTION(gzgetc) { pval *arg1; gzFile *zp; int id, type, c; @@ -541,7 +541,7 @@ /* Strip any HTML tags while reading */ /* {{{ proto string gzgetss(int zp, int length) Get a line from file pointer and strip HTML tags */ -void php3_gzgetss(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(gzgetss) { pval *fd, *bytes; gzFile *zp; @@ -568,7 +568,7 @@ buf = emalloc(sizeof(char) * (len + 1)); /*needed because recv doesnt set null char at end*/ memset(buf,0,len+1); - if (!((int)gzgets(zp, buf, len))) { + if (!(gzgets(zp, buf, len) != NULL)) { efree(buf); RETURN_FALSE; } @@ -658,7 +658,7 @@ /* {{{ proto int gzwrite(int zp, string str [, int length]) Binary-safe .gz-file write */ -void php3_gzwrite(INTERNAL_FUNCTION_PARAMETERS) { +PHP_FUNCTION(gzwrite) { pval *arg1, *arg2, *arg3=NULL; gzFile *zp; int ret,id,type; @@ -707,7 +707,7 @@ /* {{{ proto int gzrewind(int zp) Rewind the position of a .gz-file pointer */ -void php3_gzrewind(INTERNAL_FUNCTION_PARAMETERS) { +PHP_FUNCTION(gzrewind) { pval *arg1; int id,type; gzFile *zp; @@ -730,7 +730,7 @@ /* {{{ proto int gztell(int zp) Get .gz-file pointer's read/write position */ -void php3_gztell(INTERNAL_FUNCTION_PARAMETERS) { +PHP_FUNCTION(gztell) { pval *arg1; int id, type; long pos; @@ -754,7 +754,7 @@ /* {{{ proto int gzseek(int zp, int offset) Seek on a file pointer */ -void php3_gzseek(INTERNAL_FUNCTION_PARAMETERS) { +PHP_FUNCTION(gzseek) { pval *arg1, *arg2; int ret,id,type; long pos; @@ -783,7 +783,7 @@ */ /* {{{ proto int readgzfile(string filename [, int use_include_path]) Output a .gz-file */ -void php3_readgzfile(INTERNAL_FUNCTION_PARAMETERS) { +PHP_FUNCTION(readgzfile) { pval *arg1, *arg2; char buf[8192]; gzFile *zp; @@ -834,7 +834,7 @@ */ /* {{{ proto int gzpassthru(int zp) Output all remaining data from a .gz-file pointer */ -void php3_gzpassthru(INTERNAL_FUNCTION_PARAMETERS) { +PHP_FUNCTION(gzpassthru) { pval *arg1; gzFile *zp; char buf[8192]; @@ -864,7 +864,7 @@ /* {{{ proto int gzread(int zp, int length) Binary-safe file read */ -void php3_gzread(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(gzread) { pval *arg1, *arg2; gzFile *zp; -- PHP 4 Beta

« previous php.version4 (#963) next »