/PHP-7.4/sapi/fpm/fpm/ |
H A D | zlog.c | 356 stream->len = zlog_stream_prefix_ex(stream, stream->function, stream->line); in zlog_stream_unbuffered_write() 435 stream->buf.data[stream->len++] = c; in zlog_stream_buf_copy_char() 455 stream->buf.data + stream->prefix_len, stream->len - stream->prefix_len); in zlog_stream_buf_flush() 472 stream->len = zlog_stream_prefix_ex(stream, stream->function, stream->line); in zlog_stream_buf_append() 501 zlog_stream_prefix_ex(stream, stream->function, stream->line); in zlog_stream_buf_append() 506 stream->len = zlog_truncate_buf(stream->buf.data, stream->len, 0); in zlog_stream_buf_append() 531 (stream->use_fd || stream->use_stderr || stream->use_syslog); in zlog_stream_init_internal() 686 stream->buf.data, stream->buf.size, stream->use_syslog); in zlog_stream_prefix_ex() 702 stream, stream->msg_prefix, stream->msg_prefix_len); in zlog_stream_prefix_ex() 776 zlog_stream_prefix_ex(stream, stream->function, stream->line); in zlog_stream_finish_buffer_suffix() [all …]
|
H A D | zlog.h | 93 void zlog_stream_init(struct zlog_stream *stream, int flags); 94 void zlog_stream_init_ex(struct zlog_stream *stream, int flags, int fd); 96 void zlog_stream_set_wrapping(struct zlog_stream *stream, zlog_bool wrap); 98 void zlog_stream_set_child_pid(struct zlog_stream *stream, int child_pid); 103 struct zlog_stream *stream, const char *suffix, const char *final_suffix); 104 #define zlog_stream_prefix(stream) \ argument 105 zlog_stream_prefix_ex(stream, __func__, __LINE__) 107 ssize_t zlog_stream_format(struct zlog_stream *stream, const char *fmt, ...) 111 zlog_bool zlog_stream_finish(struct zlog_stream *stream); 112 void zlog_stream_destroy(struct zlog_stream *stream); [all …]
|
/PHP-7.4/ext/standard/tests/file/ |
H A D | bug79099.phpt | 6 fputs($stream, "<?\n\"\n"); 7 rewind($stream); 8 var_dump(@fgetss($stream)); 9 var_dump(@fgetss($stream)); 10 fclose($stream); 13 fputs($stream, "<\0\n!\n"); 14 rewind($stream); 15 var_dump(@fgetss($stream)); 17 fclose($stream); 21 rewind($stream); [all …]
|
H A D | fgetc_basic.phpt | 72 resource(%d) of type (stream) 76 resource(%d) of type (stream) 80 resource(%d) of type (stream) 84 resource(%d) of type (stream) 88 resource(%d) of type (stream) 92 resource(%d) of type (stream) 98 resource(%d) of type (stream) 102 resource(%d) of type (stream) 106 resource(%d) of type (stream) 110 resource(%d) of type (stream) [all …]
|
H A D | 007_basic.phpt | 95 resource(%d) of type (stream) 108 resource(%d) of type (stream) 121 resource(%d) of type (stream) 134 resource(%d) of type (stream) 147 resource(%d) of type (stream) 160 resource(%d) of type (stream) 173 resource(%d) of type (stream) 186 resource(%d) of type (stream) 199 resource(%d) of type (stream) 212 resource(%d) of type (stream) [all …]
|
/PHP-7.4/main/streams/ |
H A D | streams.c | 503 stream->wrapper->wops->stream_closer(stream->wrapper, stream); in _php_stream_free() 561 justread = stream->ops->read(stream, chunk_buf, stream->chunk_size); in _php_stream_fill_read_buffer() 603 … memmove(stream->readbuf, stream->readbuf + stream->readpos, stream->writepos - stream->readpos); in _php_stream_fill_read_buffer() 611 stream->readbuf = perealloc(stream->readbuf, stream->readbuflen, in _php_stream_fill_read_buffer() 652 if (stream->readbuf && stream->readbuflen - stream->writepos < stream->chunk_size) { in _php_stream_fill_read_buffer() 654 … memmove(stream->readbuf, stream->readbuf + stream->readpos, stream->writepos - stream->readpos); in _php_stream_fill_read_buffer() 662 if (stream->readbuflen - stream->writepos < stream->chunk_size) { in _php_stream_fill_read_buffer() 664 stream->readbuf = perealloc(stream->readbuf, stream->readbuflen, in _php_stream_fill_read_buffer() 668 justread = stream->ops->read(stream, (char*)stream->readbuf + stream->writepos, in _php_stream_fill_read_buffer() 1132 stream->ops->seek(stream, stream->position, SEEK_SET, &stream->position); in _php_stream_write_buffer() [all …]
|
H A D | cast.c | 199 if (stream->ops->seek && (stream->flags & PHP_STREAM_FLAG_NO_SEEK) == 0) { in _php_stream_cast() 202 stream->ops->seek(stream, stream->position, SEEK_SET, &dummy); in _php_stream_cast() 203 stream->readpos = stream->writepos = 0; in _php_stream_cast() 210 if (stream->stdiocast) { in _php_stream_cast() 220 stream->ops->cast && in _php_stream_cast() 222 stream->ops->cast(stream, castas, ret) == SUCCESS in _php_stream_cast() 263 …if (!php_stream_is_filtered(stream) && stream->ops->cast && stream->ops->cast(stream, castas, NULL… in _php_stream_cast() 264 if (FAILURE == stream->ops->cast(stream, castas, ret)) { in _php_stream_cast() 302 } else if (stream->ops->cast && stream->ops->cast(stream, castas, ret) == SUCCESS) { in _php_stream_cast() 322 if ((stream->writepos - stream->readpos) > 0 && in _php_stream_cast() [all …]
|
H A D | php_stream_mmap.h | 63 #define php_stream_mmap_supported(stream) (_php_stream_set_option((stream), PHP_STREAM_OPTION_MMAP_… argument 67 #define php_stream_mmap_possible(stream) (!php_stream_is_filtered((stream)) && php_stream_mmap_su… argument 70 PHPAPI char *_php_stream_mmap_range(php_stream *stream, size_t offset, size_t length, php_stream_mm… 71 #define php_stream_mmap_range(stream, offset, length, mode, mapped_len) _php_stream_mmap_range((str… argument 74 PHPAPI int _php_stream_mmap_unmap(php_stream *stream); 75 #define php_stream_mmap_unmap(stream) _php_stream_mmap_unmap((stream)) argument 77 PHPAPI int _php_stream_mmap_unmap_ex(php_stream *stream, zend_off_t readden); 78 #define php_stream_mmap_unmap_ex(stream, readden) _php_stream_mmap_unmap_ex((stream), (readden)) argument
|
H A D | php_stream_glob_wrapper.h | 24 PHPAPI char* _php_glob_stream_get_path(php_stream *stream, size_t *plen STREAMS_DC); 25 #define php_glob_stream_get_path(stream, plen) _php_glob_stream_get_path((stream), (plen) STREAMS_C… argument 27 PHPAPI char* _php_glob_stream_get_pattern(php_stream *stream, size_t *plen STREAMS_DC); 28 #define php_glob_stream_get_pattern(stream, plen) _php_glob_stream_get_pattern((stream), (plen) STR… argument 30 PHPAPI int _php_glob_stream_get_count(php_stream *stream, int *pflags STREAMS_DC); 31 #define php_glob_stream_get_count(stream, pflags) _php_glob_stream_get_count((stream), (pflags) STR… argument
|
H A D | filter.c | 310 php_stream *stream = chain->stream; in php_stream_filter_append_ex() local 322 if (&(stream->readfilters) == chain && (stream->writepos - stream->readpos) > 0) { in php_stream_filter_append_ex() 330 …bucket = php_stream_bucket_new(stream, (char*) stream->readbuf + stream->readpos, stream->writepos… in php_stream_filter_append_ex() 334 if (stream->readpos + consumed > (uint32_t)stream->writepos) { in php_stream_filter_append_ex() 370 if (stream->readbuflen - stream->writepos < bucket->buflen) { in php_stream_filter_append_ex() 372 stream->readbuf = perealloc(stream->readbuf, stream->readbuflen, stream->is_persistent); in php_stream_filter_append_ex() 416 stream = chain->stream; in _php_stream_filter_flush() 456 memcpy(stream->readbuf, stream->readbuf + stream->readpos, stream->writepos - stream->readpos); in _php_stream_filter_flush() 458 stream->writepos -= stream->readpos; in _php_stream_filter_flush() 460 if (flushed_size > (stream->readbuflen - stream->writepos)) { in _php_stream_filter_flush() [all …]
|
H A D | memory.c | 86 stream->eof = 1; in php_stream_memory_read() 144 stream->eof = 0; in php_stream_memory_seek() 155 stream->eof = 0; in php_stream_memory_seek() 167 stream->eof = 0; in php_stream_memory_seek() 182 stream->eof = 0; in php_stream_memory_seek() 303 php_stream *stream; in _php_stream_memory_create() local 314 return stream; in _php_stream_memory_create() 339 return stream; in _php_stream_memory_open() 591 return stream; in _php_stream_temp_create_ex() 619 return stream; in _php_stream_temp_open() [all …]
|
H A D | transports.c | 62 php_stream *stream = NULL; in _php_stream_xport_create() local 83 return stream; in _php_stream_xport_create() 86 php_stream_pclose(stream); in _php_stream_xport_create() 87 stream = NULL; in _php_stream_xport_create() 132 stream = (factory)(protocol, n, in _php_stream_xport_create() 136 if (stream) { in _php_stream_xport_create() 179 php_stream_pclose(stream); in _php_stream_xport_create() 181 php_stream_close(stream); in _php_stream_xport_create() 183 stream = NULL; in _php_stream_xport_create() 186 return stream; in _php_stream_xport_create() [all …]
|
/PHP-7.4/main/ |
H A D | php_streams.h | 238 ((php_stream_context*) ((stream)->ctx ? ((stream)->ctx->ptr) : NULL)) 254 #define php_stream_auto_cleanup(stream) { (stream)->__exposed = 1; } argument 258 #define php_stream_to_zval(stream, zval) { ZVAL_RES(zval, (stream)->res); (stream)->__exposed = 1; } argument 306 #define php_stream_tell(stream) _php_stream_tell((stream)) argument 326 #define php_stream_eof(stream) _php_stream_eof((stream)) argument 329 #define php_stream_getc(stream) _php_stream_getc((stream)) argument 332 #define php_stream_putc(stream, c) _php_stream_putc((stream), (c)) argument 335 #define php_stream_flush(stream) _php_stream_flush((stream), 0) argument 345 #define php_stream_puts(stream, buf) _php_stream_puts((stream), (buf)) argument 501 #define php_stream_is(stream, anops) ((stream)->ops == anops) argument [all …]
|
/PHP-7.4/ext/standard/ |
H A D | ftp_fopen_wrapper.c | 305 return stream; in php_ftp_fopen_connect() 312 if (stream) { in php_ftp_fopen_connect() 467 if (!stream) { in php_stream_url_wrap_ftp() 599 if (stream) { in php_stream_url_wrap_ftp() 707 if (!stream) { in php_stream_ftp_opendir() 773 if (stream) { in php_stream_ftp_opendir() 900 if (stream) { in php_stream_ftp_url_stat() 950 if (stream) { in php_stream_ftp_unlink() 1029 if (stream) { in php_stream_ftp_rename() 1122 if (stream) { in php_stream_ftp_mkdir() [all …]
|
H A D | image.c | 446 length = php_read2(stream); in php_read_APP() 627 php_read2(stream); /* Lsiz */ in php_handle_jpc() 628 php_read2(stream); /* Rsiz */ in php_handle_jpc() 957 i = php_stream_getc(stream); in php_get_wbmp() 965 i = php_stream_getc(stream); in php_get_wbmp() 978 i = php_stream_getc(stream); in php_get_wbmp() 1082 php_get_xbm(stream, &result); in php_handle_xbm() 1399 if (!stream) { in php_getimagesize_from_stream() 1494 php_stream *stream = NULL; in php_getimagesize_from_any() local 1523 if (!stream) { in php_getimagesize_from_any() [all …]
|
H A D | streamsfuncs.c | 145 if (stream == NULL) { in PHP_FUNCTION() 303 php_stream *stream; in PHP_FUNCTION() local 335 php_stream *stream; in PHP_FUNCTION() local 368 php_stream *stream; in PHP_FUNCTION() local 419 php_stream *stream; in PHP_FUNCTION() local 507 php_stream *stream; in PHP_FUNCTION() local 610 php_stream *stream; in stream_array_to_fd_set() local 715 if ((stream->writepos - stream->readpos) > 0) { in stream_array_emulate_read_fd_set() 949 if (stream) { in decode_context_param() 1183 if (strchr(stream->mode, 'r') || strchr(stream->mode, '+')) { in apply_filter_to_stream() [all …]
|
H A D | php_fopen_wrapper.c | 43 stream->eof = 1; in php_stream_output_read() 101 stream->eof = 1; in php_stream_input_read() 112 efree(stream->abstract); in php_stream_input_close() 113 stream->abstract = NULL; in php_stream_input_close() 183 php_stream * stream = NULL; in php_stream_url_wrap_php() local 378 php_stream_close(stream); in php_stream_url_wrap_php() 382 return stream; in php_stream_url_wrap_php() 401 if (stream) { in php_stream_url_wrap_php() 403 return stream; in php_stream_url_wrap_php() 413 if (stream == NULL) { in php_stream_url_wrap_php() [all …]
|
/PHP-7.4/ext/standard/tests/streams/ |
H A D | bug68948.phpt | 8 $stream = fopen("php://memory", "r+"); 9 fwrite($stream, $testString); 10 rewind($stream); 12 var_dump(fread($stream, 10)); 13 var_dump(ftell($stream)); 14 var_dump(feof($stream)); 16 rewind($stream); 18 var_dump(fread($stream, 11)); 19 var_dump(ftell($stream)); 20 var_dump(feof($stream));
|
H A D | bug54946.phpt | 6 $stream = fopen($filename, "w"); // w or a 7 $retval = stream_get_contents($stream, 1, 1); 8 fclose($stream); 16 $stream = fopen($filename, "a"); 17 $retval = stream_get_contents($stream, 1, 1); 19 fclose($stream); 26 $stream = fopen($filename, "a"); 27 fseek($stream, 1); 28 $retval = stream_get_contents($stream, 1); 30 fclose($stream);
|
/PHP-7.4/ext/sodium/tests/ |
H A D | crypto_secretstream.phpt | 18 $stream = $res[0]; 21 $c1 = sodium_crypto_secretstream_xchacha20poly1305_push($stream, $msg1, $ad); 26 $r1 = sodium_crypto_secretstream_xchacha20poly1305_pull($stream, $c1, $ad); 27 $r2 = sodium_crypto_secretstream_xchacha20poly1305_pull($stream, $c2); 34 var_dump(sodium_crypto_secretstream_xchacha20poly1305_pull($stream, $c2)); 35 var_dump(sodium_crypto_secretstream_xchacha20poly1305_pull($stream, 'x')); 38 $r1 = sodium_crypto_secretstream_xchacha20poly1305_pull($stream, $c1); 40 $r1 = sodium_crypto_secretstream_xchacha20poly1305_pull($stream, $c1, $ad); 44 sodium_crypto_secretstream_xchacha20poly1305_rekey($stream); 45 $r1 = sodium_crypto_secretstream_xchacha20poly1305_pull($stream, $c1, $ad); [all …]
|
/PHP-7.4/ext/zlib/ |
H A D | zlib_fopen_wrapper.c | 30 php_stream *stream; member 42 stream->eof = 1; in php_gziop_read() 81 if (self->stream) { in php_gziop_close() 82 php_stream_close(self->stream); in php_gziop_close() 83 self->stream = NULL; in php_gziop_close() 91 static int php_gziop_flush(php_stream *stream) in php_gziop_flush() argument 112 php_stream *stream = NULL, *innerstream = NULL; in php_stream_gzopen() local 135 self->stream = innerstream; in php_stream_gzopen() 145 if (stream) { in php_stream_gzopen() 146 stream->flags |= PHP_STREAM_FLAG_NO_BUFFER; in php_stream_gzopen() [all …]
|
/PHP-7.4/ext/standard/tests/filters/ |
H A D | filter_errors.inc | 18 $stream = fopen('php://memory', 'wb+'); 20 fwrite($stream, ".\r\n$data"); 21 fseek($stream, 0, SEEK_SET); 22 stream_get_line($stream, 8192, "\r\n"); 24 $f = stream_filter_append($stream, $filter); 28 $stream = fopen('php://memory', 'wb+'); 30 fwrite($stream, "$data"); 31 fseek($stream, 0, SEEK_SET); 33 stream_filter_append($stream, $filter); 34 stream_get_contents($stream);
|
/PHP-7.4/ext/sqlite3/tests/ |
H A D | sqlite3_30_blobopen.phpt | 2 SQLite3::blobOpen stream test 25 var_dump($stream); 29 var_dump(fwrite($stream, 'ABCD')); 31 var_dump(fclose($stream)); 34 var_dump($stream); 38 fseek($stream, 0); 43 var_dump(fclose($stream)); 57 resource(%d) of type (stream) 60 Writing to read-only stream 66 Opening stream in write mode [all …]
|
/PHP-7.4/ext/bz2/ |
H A D | bz2.c | 131 php_stream *stream; member 150 stream->eof = 1; in php_bz2iop_read() 203 if (self->stream) { in php_bz2iop_close() 292 if (stream) { in _php_stream_bz2open() 316 if (stream) { in _php_stream_bz2open() 317 php_stream_close(stream); in _php_stream_bz2open() 378 php_stream *stream; in PHP_FUNCTION() local 443 … else if (stream_mode_len == 1 && stream->mode[0] != 'r' && stream->mode[0] != 'w' && stream->mode… in PHP_FUNCTION() 476 stream = php_stream_bz2open_from_BZFILE(bz, mode, stream); in PHP_FUNCTION() 482 if (stream) { in PHP_FUNCTION() [all …]
|
/PHP-7.4/ext/zlib/tests/ |
H A D | bug75273.phpt | 30 $stream = fopen('php://memory', 'rb+'); 35 …$deflate_filter = stream_filter_append($stream, 'zlib.deflate', STREAM_FILTER_WRITE, ['window' =>… 36 rewind($stream); 37 fwrite($stream, $in_data); 40 rewind($stream); 41 $out_data = stream_get_contents($stream); 44 …$inflate_filter = stream_filter_prepend($stream, 'zlib.inflate', STREAM_FILTER_WRITE, ['window' =… 45 rewind($stream); 46 $fwrite_len = fwrite($stream, $out_data); 54 fclose($stream);
|