FILE *zlib_fopen_wrapper(const char *path, char *mode, int options, int *issock, int *socketd, char **opened_path TSRMLS_DC);
int php_enable_output_compression(int buffer_size TSRMLS_DC);
-php_stream * php_stream_gzopen(char * path, char * mode, int options, char ** opened_path TSRMLS_DC);
+php_stream *php_stream_gzopen(char *path, char *mode, int options, char **opened_path TSRMLS_DC);
extern php_stream_ops php_stream_gzio_ops;
extern php_stream_wrapper php_stream_gzip_wrapper;
*/
static gzFile php_gzopen_wrapper(char *path, char *mode, int options TSRMLS_DC)
{
- php_stream * stream = NULL;
+ php_stream *stream = NULL;
int fd;
stream = php_stream_open_wrapper(path, mode, options | REPORT_ERRORS, NULL TSRMLS_CC);
char *slashed, buf[8192];
register int i=0;
int use_include_path = 0;
- php_stream * stream;
+ php_stream *stream;
/* check args */
switch (ZEND_NUM_ARGS()) {
struct php_gz_stream_data_t {
gzFile gz_file;
- php_stream * stream;
+ php_stream *stream;
};
-static size_t php_gziop_read(php_stream * stream, char * buf, size_t count)
+static size_t php_gziop_read(php_stream *stream, char *buf, size_t count)
{
- struct php_gz_stream_data_t * self = (struct php_gz_stream_data_t *)stream->abstract;
+ struct php_gz_stream_data_t *self = (struct php_gz_stream_data_t *)stream->abstract;
if (buf == NULL && count == 0) {
if (gzeof(self->gz_file))
return gzread(self->gz_file, buf, count);
}
-static char * php_gziop_gets(php_stream * stream, char * buf, size_t size)
+static char *php_gziop_gets(php_stream *stream, char *buf, size_t size)
{
- struct php_gz_stream_data_t * self = (struct php_gz_stream_data_t *)stream->abstract;
+ struct php_gz_stream_data_t *self = (struct php_gz_stream_data_t *)stream->abstract;
return gzgets(self->gz_file, buf, size);
}
-static size_t php_gziop_write(php_stream * stream, const char * buf, size_t count)
+static size_t php_gziop_write(php_stream *stream, const char *buf, size_t count)
{
- struct php_gz_stream_data_t * self = (struct php_gz_stream_data_t *)stream->abstract;
+ struct php_gz_stream_data_t *self = (struct php_gz_stream_data_t *)stream->abstract;
return gzwrite(self->gz_file, (char*)buf, count);
}
-static int php_gziop_seek(php_stream * stream, off_t offset, int whence)
+static int php_gziop_seek(php_stream *stream, off_t offset, int whence)
{
- struct php_gz_stream_data_t * self = (struct php_gz_stream_data_t *)stream->abstract;
+ struct php_gz_stream_data_t *self = (struct php_gz_stream_data_t *)stream->abstract;
return gzseek(self->gz_file, offset, whence);
}
-static int php_gziop_close(php_stream * stream)
+static int php_gziop_close(php_stream *stream)
{
- struct php_gz_stream_data_t * self = (struct php_gz_stream_data_t *)stream->abstract;
+ struct php_gz_stream_data_t *self = (struct php_gz_stream_data_t *)stream->abstract;
int ret;
ret = gzclose(self->gz_file);
NULL, "ZLIB"
};
-php_stream * php_stream_gzopen(char * path, char * mode, int options, char ** opened_path TSRMLS_DC)
+php_stream *php_stream_gzopen(char *path, char *mode, int options, char **opened_path TSRMLS_DC)
{
- struct php_gz_stream_data_t * self;
- php_stream * stream = NULL;
+ struct php_gz_stream_data_t *self;
+ php_stream *stream = NULL;
self = emalloc(sizeof(*self));