summaryrefslogtreecommitdiff
path: root/ext/zlib
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>1999-09-21 00:15:21 +0000
committerRasmus Lerdorf <rasmus@php.net>1999-09-21 00:15:21 +0000
commit08389808ee1a6dca90b8ab1c9b0179638e269ae9 (patch)
tree145388f9b93c9ff624a46f665048dfc4c9595e36 /ext/zlib
parent6735ebb27114a4f0795af3de52a2cdd7bc17f61e (diff)
downloadphp-git-08389808ee1a6dca90b8ab1c9b0179638e269ae9.tar.gz
Fix zlib compile problem
Diffstat (limited to 'ext/zlib')
-rw-r--r--ext/zlib/zlib.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index d1ac269b78..7f5a01a075 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -480,14 +480,28 @@ PHP_FUNCTION(gzgetc) {
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 @@ PHP_FUNCTION(gzgetss)
RETURN_FALSE;
}
- _php3_strip_tags(buf, ZLIBG(gzgetss_state));
+ _php3_strip_tags(buf, len, ZLIBG(gzgetss_state), allow);
RETURN_STRING(buf, 0);
}