Lines Matching refs:stream

271 +	php_stream *stream;
278 + stream = php_stream_open_wrapper((char *)fn, "rb", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
280 + stream = php_stream_open_wrapper((char *)fn, "rb", REPORT_ERRORS, NULL);
283 + if (stream == NULL) {
296 + for (ms->line = 1; (line = php_stream_get_line(stream, buffer , BUFSIZ, &len)) != NULL; ms->line+…
298 + for (ms->line = 1; (line = php_stream_get_line(stream, ZSTR(buffer), BUFSIZ, &len)) != NULL; ms->…
309 + php_stream_close(stream);
544 + php_stream *stream = NULL;
572 + stream = php_stream_open_wrapper((char *)fn, "rb", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
574 + stream = php_stream_open_wrapper((char *)fn, "rb", REPORT_ERRORS, NULL);
577 + if (!stream) {
582 + if (php_stream_stat(stream, &st) < 0) {
607 + if (php_stream_read(stream, mm, (size_t)st.sb.st_size) != (size_t)st.sb.st_size) {
619 + php_stream_close(stream);
620 + stream = NULL;
681 + if (stream) {
682 + php_stream_close(stream);
706 + php_stream *stream;
719 + stream = php_stream_open_wrapper((char *)fn, "wb+", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
721 + stream = php_stream_open_wrapper((char *)fn, "wb+", REPORT_ERRORS, NULL);
724 + if (!stream) {
730 + if (php_stream_write(stream, (char *)ar, sizeof(ar)) != (ssize_t)sizeof(ar)) {
737 + if (php_stream_seek(stream,(off_t)sizeof(struct magic), SEEK_SET) != sizeof(struct magic)) {
744 + if (php_stream_write(stream, (char *)*magicp, (sizeof(struct magic) * *nmagicp) != (ssize_t)(size…
751 + php_stream_close(stream);
868 "user stream", "lockbytes", "property", "root storage" };
1237 …tected int file_fsmagic(struct magic_set *ms, const char *fn, struct stat *sb, php_stream *stream);
1375 +file_fsmagic(struct magic_set *ms, const char *fn, struct stat *sb, php_stream *stream)
1390 + if (!fn && !stream) {
1409 + if (stream) {
1411 + if (php_stream_stat(stream, &ssb) < 0) {
1770 +file_buffer(struct magic_set *ms, php_stream *stream, const char *inname, const void *buf,
1794 + if ((m = file_zmagic(ms, stream, inname, ubuf, nb)) != 0) {
1810 + if (stream && SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD, (void **)&fd, 0)) {
2174 +magic_stream(struct magic_set *ms, php_stream *stream)
2176 + return file_or_stream(ms, NULL, stream);
2181 +file_or_stream(struct magic_set *ms, const char *inname, php_stream *stream)
2191 + if (!inname && !stream) {
2208 + switch (file_fsmagic(ms, inname, &sb, stream)) {
2226 + if (!stream && inname) {
2229 + stream = php_stream_open_wrapper((char *)inname, "rb", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
2231 + stream = php_stream_open_wrapper((char *)inname, "rb", REPORT_ERRORS, NULL);
2242 + if (!stream) {
2284 + if ((nbytes = php_stream_read(stream, (char *)buf, HOWMANY)) < 0) {
2291 + if (file_buffer(ms, stream, inname, buf, (size_t)nbytes) == -1)
2299 + if (no_in_stream && stream) {
2300 + php_stream_close(stream);