cvs: /php4/ext/zlib zlib.c

From: Date: Tue, 21 Sep 1999 00:15:21 +0000
Subject: cvs: /php4/ext/zlib zlib.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-4716@lists.php.net to get a copy of this message
rasmus Mon Sep 20 20:15:21 1999 EDT Modified files: /php4/ext/zlib zlib.c Log: Fix zlib compile problem Index: php4/ext/zlib/zlib.c diff -u php4/ext/zlib/zlib.c:1.16 php4/ext/zlib/zlib.c:1.17 --- php4/ext/zlib/zlib.c:1.16 Sat Sep 18 15:03:35 1999 +++ php4/ext/zlib/zlib.c Mon Sep 20 20:15:21 1999 @@ -16,7 +16,7 @@ | Stefan Röhrich <sr@linux.de> | +----------------------------------------------------------------------+ */ -/* $Id: zlib.c,v 1.16 1999/09/18 19:03:35 sr Exp $ */ +/* $Id: zlib.c,v 1.17 1999/09/21 00:15:21 rasmus Exp $ */ #define IS_EXT_MODULE #include "php.h" @@ -480,14 +480,28 @@ Get a line from file pointer and strip HTML tags */ PHP_FUNCTION(gzgetss) { - pval *fd, *bytes; + pval *fd, *bytes, *allow=NULL; gzFile *zp; int len; char *buf; ZLIBLS_FETCH(); - if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &fd, &bytes) == FAILURE) { - WRONG_PARAM_COUNT; + switch(ARG_COUNT(ht)) { + case 2: + if(getParameters(ht, 2, &fd, &bytes) == FAILURE) { + RETURN_FALSE; + } + break; + case 3: + if(getParameters(ht, 3, &fd, &bytes, &allow) == FAILURE) { + RETURN_FALSE; + } + convert_to_string(allow); + break; + default: + WRONG_PARAM_COUNT; + /* NOTREACHED */ + break; } convert_to_long(bytes); @@ -504,7 +518,7 @@ RETURN_FALSE; } - _php3_strip_tags(buf, ZLIBG(gzgetss_state)); + _php3_strip_tags(buf, len, ZLIBG(gzgetss_state), allow); RETURN_STRING(buf, 0); }

« previous php.version4 (#4716) next »