Searched defs:stream (Results 1 - 25 of 88) sorted by relevance

1234

/PHP_TRUNK/ext/fileinfo/libmagic/
H A Dfsmagic.c93 file_fsmagic(struct magic_set *ms, const char *fn, zend_stat_t *sb, php_stream *stream) argument
102 if (fn == NULL && !stream) {
108 if (stream) {
110 if (php_stream_stat(stream, &ssb) < 0) {
H A Dmagic.c341 magic_stream(struct magic_set *ms, php_stream *stream) argument
345 return file_or_stream(ms, NULL, stream);
349 file_or_stream(struct magic_set *ms, const char *inname, php_stream *stream) argument
358 if (!inname && !stream) {
372 switch (file_fsmagic(ms, inname, &sb, stream)) {
384 if (!stream && inname) {
386 stream = php_stream_open_wrapper((char *)inname, "rb", REPORT_ERRORS, NULL);
389 if (!stream) {
403 if ((nbytes = php_stream_read(stream, (char *)buf, HOWMANY)) < 0) {
409 if (file_buffer(ms, stream, innam
[all...]
H A Dfuncs.c164 file_buffer(struct magic_set *ms, php_stream *stream, const char *inname, const void *buf, argument
174 const char *type = "application/octet-stream";
207 if ((m = file_zmagic(ms, stream, inname, ubuf, nb)) != 0) {
225 if (stream && SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD, (void **)&fd, 0)) {
/PHP_TRUNK/ext/phar/
H A Ddirstream.c3 | phar:// stream wrapper support |
43 static int phar_dir_close(php_stream *stream, int close_handle TSRMLS_DC) /* {{{ */ argument
45 HashTable *data = (HashTable *)stream->abstract;
51 stream->abstract = NULL;
61 static int phar_dir_seek(php_stream *stream, zend_off_t offset, int whence, zend_off_t *newoffset TSRMLS_DC) /* {{{ */ argument
63 HashTable *data = (HashTable *)stream->abstract;
93 static size_t phar_dir_read(php_stream *stream, char *buf, size_t count TSRMLS_DC) /* {{{ */ argument
96 HashTable *data = (HashTable *)stream->abstract;
122 static size_t phar_dir_write(php_stream *stream, const char *buf, size_t count TSRMLS_DC) /* {{{ */ argument
131 static int phar_dir_flush(php_stream *stream TSRMLS_D
[all...]
/PHP_TRUNK/Zend/
H A Dzend_stream.h30 /* Lightweight stream implementation for the ZE scanners.
69 zend_stream stream; member in union:_zend_file_handle::__anon2
/PHP_TRUNK/TSRM/
H A Dtsrm_nw.c60 FILE *stream = NULL; local
202 stream = fdopen(pipe_handle, type);
223 return stream;
226 TSRM_API int pclose(FILE* stream) argument
232 fd = fileno(stream);
235 err = fclose(stream);
H A Dtsrm_win32.h49 FILE *stream; member in struct:__anon1
100 TSRM_API int pclose(FILE *stream);
/PHP_TRUNK/ext/bz2/
H A Dbz2.c133 php_stream *stream; local
136 /* {{{ BZip2 stream implementation */
138 static size_t php_bz2iop_read(php_stream *stream, char *buf, size_t count TSRMLS_DC) argument
140 struct php_bz2_stream_data_t *self = (struct php_bz2_stream_data_t *)stream->abstract;
146 stream->eof = 1;
152 static size_t php_bz2iop_write(php_stream *stream, const char *buf, size_t count TSRMLS_DC) argument
154 struct php_bz2_stream_data_t *self = (struct php_bz2_stream_data_t *)stream->abstract;
159 static int php_bz2iop_close(php_stream *stream, int close_handle TSRMLS_DC) argument
161 struct php_bz2_stream_data_t *self = (struct php_bz2_stream_data_t *)stream->abstract;
168 if (self->stream) {
215 php_stream *retstream = NULL, *stream = NULL; local
347 php_stream *stream; local
377 php_stream *stream = NULL; local
596 php_stream *stream; local
[all...]
H A Dbz2_filter.c68 php_stream *stream,
142 out_bucket = php_stream_bucket_new(stream, estrndup(data->outbuf, bucketlen), bucketlen, 1, 0 TSRMLS_CC);
165 bucket = php_stream_bucket_new(stream, estrndup(data->outbuf, bucketlen), bucketlen, 1, 0 TSRMLS_CC);
206 php_stream *stream,
256 out_bucket = php_stream_bucket_new(stream, estrndup(data->outbuf, bucketlen), bucketlen, 1, 0 TSRMLS_CC);
274 bucket = php_stream_bucket_new(stream, estrndup(data->outbuf, bucketlen), bucketlen, 1, 0 TSRMLS_CC);
414 /* Unspecified (probably strm) error, let stream-filter error do its own whining */
67 php_bz2_decompress_filter( php_stream *stream, php_stream_filter *thisfilter, php_stream_bucket_brigade *buckets_in, php_stream_bucket_brigade *buckets_out, size_t *bytes_consumed, int flags TSRMLS_DC) argument
205 php_bz2_compress_filter( php_stream *stream, php_stream_filter *thisfilter, php_stream_bucket_brigade *buckets_in, php_stream_bucket_brigade *buckets_out, size_t *bytes_consumed, int flags TSRMLS_DC) argument
/PHP_TRUNK/ext/fileinfo/
H A Dfileinfo.c445 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Can only process string or stream arguments");
482 php_stream *stream; local
485 php_stream_from_zval_no_verify(stream, what);
486 if (!stream) {
490 streampos = php_stream_tell(stream); /* remember stream position for restoration */
491 php_stream_seek(stream, 0, SEEK_SET);
493 ret_val = (char *) magic_stream(magic, stream);
495 php_stream_seek(stream, streampos, SEEK_SET);
515 php_stream *stream; local
[all...]
/PHP_TRUNK/ext/ftp/
H A Dftp.h77 php_stream *stream; /* output stream for "nonblocking" transfers */ member in struct:ftpbuf
80 int closestream;/* close or not close stream */
H A Dphp_ftp.c341 Opens a FTP stream */
377 Opens a FTP-SSL stream */
410 /* {{{ proto bool ftp_login(resource stream, string username, string password)
435 /* {{{ proto string ftp_pwd(resource stream)
458 /* {{{ proto bool ftp_cdup(resource stream)
480 /* {{{ proto bool ftp_chdir(resource stream, string directory)
505 /* {{{ proto bool ftp_exec(resource stream, string command)
530 /* {{{ proto array ftp_raw(resource stream, string command)
550 /* {{{ proto string ftp_mkdir(resource stream, string directory)
576 /* {{{ proto bool ftp_rmdir(resource stream, strin
742 php_stream *stream; local
786 php_stream *stream; local
1030 php_stream *stream; local
1078 php_stream *stream; local
[all...]
/PHP_TRUNK/ext/gd/
H A Dgd_ctx.c51 php_stream * stream = (php_stream *)ctx->data; local
53 php_stream_write(stream, &ch, 1);
58 php_stream * stream = (php_stream *)ctx->data; local
60 return php_stream_write(stream, (void *)buf, l);
89 php_stream *stream; local
122 php_stream_from_zval_no_verify(stream, to_zval);
123 if (stream == NULL) {
132 stream = php_stream_open_wrapper(Z_STRVAL_P(to_zval), "wb", REPORT_ERRORS|IGNORE_PATH|IGNORE_URL_WIN, NULL);
133 if (stream == NULL) {
137 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid 2nd parameter, it must a filename or a stream");
[all...]
/PHP_TRUNK/ext/interbase/
H A Dibase_blobs.c92 int bl_stream; /* blob is stream ? */
473 add_assoc_bool(return_value, "stream", bl_info.bl_stream);
554 php_stream *stream; local
566 php_stream_from_zval(stream, file);
574 for (size = 0; (b = php_stream_read(stream, bl_data, sizeof(bl_data))); size += b) {
/PHP_TRUNK/ext/mcrypt/
H A Dmcrypt_filter.c37 php_stream *stream,
83 newbucket = php_stream_bucket_new(stream, outchunk, n, 1, data->persistent TSRMLS_CC);
114 newbucket = php_stream_bucket_new(stream, data->block_buffer, data->blocksize, 0, data->persistent TSRMLS_CC);
36 php_mcrypt_filter( php_stream *stream, php_stream_filter *thisfilter, php_stream_bucket_brigade *buckets_in, php_stream_bucket_brigade *buckets_out, size_t *bytes_consumed, int flags TSRMLS_DC) argument
/PHP_TRUNK/ext/standard/
H A Dexec.c66 php_stream *stream; local
86 stream = php_stream_fopen_from_pipe(fp, "rb");
94 while (php_stream_get_line(stream, b, EXEC_INPUT_BUF, &bufl)) {
96 if (b[bufl - 1] != '\n' && !php_stream_eof(stream)) {
147 while((bufl = php_stream_read(stream, buf, EXEC_INPUT_BUF)) > 0) {
152 pclose_return = php_stream_close(stream);
441 php_stream *stream; local
456 stream = php_stream_fopen_from_pipe(in, "rb");
457 ret = php_stream_copy_to_mem(stream, PHP_STREAM_COPY_ALL, 0);
458 php_stream_close(stream);
[all...]
H A Dfsock.c42 php_stream *stream = NULL; local
79 stream = php_stream_xport_create(hostname, hostname_len, REPORT_ERRORS,
85 if (stream == NULL) {
93 if (stream == NULL) {
113 php_stream_to_zval(stream, return_value);
H A Dmail.c219 php_stream *stream = php_stream_open_wrapper(filename, "a", flags, NULL); local
220 if (stream) {
221 php_stream_write(stream, message, message_size);
222 php_stream_close(stream);
H A Dmd5.c85 php_stream *stream; local
91 stream = php_stream_open_wrapper(arg, "rb", REPORT_ERRORS, NULL);
92 if (!stream) {
98 while ((n = php_stream_read(stream, (char*)buf, sizeof(buf))) > 0) {
103 if (!php_stream_eof(stream)) {
104 php_stream_close(stream);
110 php_stream_close(stream);
H A Dphp_fopen_wrapper.c34 static size_t php_stream_output_write(php_stream *stream, const char *buf, size_t count TSRMLS_DC) /* {{{ */ argument
41 static size_t php_stream_output_read(php_stream *stream, char *buf, size_t count TSRMLS_DC) /* {{{ */ argument
43 stream->eof = 1;
48 static int php_stream_output_close(php_stream *stream, int close_handle TSRMLS_DC) /* {{{ */ argument
72 static size_t php_stream_input_write(php_stream *stream, const char *buf, size_t count TSRMLS_DC) /* {{{ */ argument
78 static size_t php_stream_input_read(php_stream *stream, char *buf, size_t count TSRMLS_DC) /* {{{ */ argument
80 php_stream_input_t *input = stream->abstract;
97 stream->eof = 1;
106 static int php_stream_input_close(php_stream *stream, int close_handle TSRMLS_DC) /* {{{ */ argument
108 efree(stream
121 php_stream_input_seek(php_stream *stream, zend_off_t offset, int whence, zend_off_t *newoffset TSRMLS_DC) argument
147 php_stream_apply_filter_list(php_stream *stream, char *filterlist, int read_chain, int write_chain TSRMLS_DC) argument
179 php_stream * stream = NULL; local
[all...]
/PHP_TRUNK/ext/zip/
H A Dzip_stream.c39 php_stream *stream; member in struct:php_zip_stream_data_t
43 struct php_zip_stream_data_t *self = (struct php_zip_stream_data_t *) stream->abstract;
47 static size_t php_zip_ops_read(php_stream *stream, char *buf, size_t count TSRMLS_DC) argument
57 stream->eof = 1;
58 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Zip stream error: %s", zip_file_strerror(self->zf));
64 stream->eof = 1;
74 static size_t php_zip_ops_write(php_stream *stream, const char *buf, size_t count TSRMLS_DC) argument
76 if (!stream) {
85 static int php_zip_ops_close(php_stream *stream, int close_handle TSRMLS_DC) argument
100 stream
116 php_zip_ops_stat(php_stream *stream, php_stream_statbuf *ssb TSRMLS_DC) argument
208 php_stream *stream = NULL; local
270 php_stream *stream = NULL; local
[all...]
/PHP_TRUNK/ext/zlib/
H A Dzlib_fopen_wrapper.c32 php_stream *stream; member in struct:php_gz_stream_data_t
35 static size_t php_gziop_read(php_stream *stream, char *buf, size_t count TSRMLS_DC) argument
37 struct php_gz_stream_data_t *self = (struct php_gz_stream_data_t *) stream->abstract;
44 stream->eof = 1;
50 static size_t php_gziop_write(php_stream *stream, const char *buf, size_t count TSRMLS_DC) argument
52 struct php_gz_stream_data_t *self = (struct php_gz_stream_data_t *) stream->abstract;
61 static int php_gziop_seek(php_stream *stream, zend_off_t offset, int whence, zend_off_t *newoffs TSRMLS_DC) argument
63 struct php_gz_stream_data_t *self = (struct php_gz_stream_data_t *) stream->abstract;
76 static int php_gziop_close(php_stream *stream, int close_handle TSRMLS_DC) argument
78 struct php_gz_stream_data_t *self = (struct php_gz_stream_data_t *) stream
117 php_stream *stream = NULL, *innerstream = NULL; local
[all...]
/PHP_TRUNK/main/streams/
H A Dglob_wrapper.c50 PHPAPI char* _php_glob_stream_get_path(php_stream *stream, int copy, size_t *plen STREAMS_DC TSRMLS_DC) /* {{{ */ argument
52 glob_s_t *pglob = (glob_s_t *)stream->abstract;
72 PHPAPI char* _php_glob_stream_get_pattern(php_stream *stream, int copy, size_t *plen STREAMS_DC TSRMLS_DC) /* {{{ */ argument
74 glob_s_t *pglob = (glob_s_t *)stream->abstract;
94 PHPAPI int _php_glob_stream_get_count(php_stream *stream, int *pflags STREAMS_DC TSRMLS_DC) /* {{{ */ argument
96 glob_s_t *pglob = (glob_s_t *)stream->abstract;
140 static size_t php_glob_stream_read(php_stream *stream, char *buf, size_t count TSRMLS_DC) /* {{{ */ argument
142 glob_s_t *pglob = (glob_s_t *)stream->abstract;
146 /* avoid problems if someone mis-uses the stream */
164 static int php_glob_stream_close(php_stream *stream, in argument
183 php_glob_stream_rewind(php_stream *stream, zend_off_t offset, int whence, zend_off_t *newoffs TSRMLS_DC) argument
[all...]
H A Dmmap.c25 PHPAPI char *_php_stream_mmap_range(php_stream *stream, size_t offset, size_t length, php_stream_mmap_operation_t mode, size_t *mapped_len TSRMLS_DC) argument
40 if (PHP_STREAM_OPTION_RETURN_OK == php_stream_set_option(stream, PHP_STREAM_OPTION_MMAP_API, PHP_STREAM_MMAP_MAP_RANGE, &range)) {
49 PHPAPI int _php_stream_mmap_unmap(php_stream *stream TSRMLS_DC)
51 return php_stream_set_option(stream, PHP_STREAM_OPTION_MMAP_API, PHP_STREAM_MMAP_UNMAP, NULL) == PHP_STREAM_OPTION_RETURN_OK ? 1 : 0;
54 PHPAPI int _php_stream_mmap_unmap_ex(php_stream *stream, zend_off_t readden TSRMLS_DC) argument
58 if (php_stream_seek(stream, readden, SEEK_CUR) != 0) {
61 if (php_stream_mmap_unmap(stream) == 0) {
/PHP_TRUNK/sapi/phpdbg/
H A Dphpdbg_list.c134 php_stream *stream = NULL; local
141 stream = php_stream_open_wrapper(filename, "rb", USE_PATH, &opened);
143 if (!stream) {
153 while (php_stream_gets(stream, buffer, sizeof(buffer)) != NULL) {
179 php_stream_close(stream);

Completed in 45 milliseconds

1234