| 3086 | } |
| 3087 | |
| 3088 | static int stdio_stream_read(FILE *stream) |
| 3089 | { |
| 3090 | if (stream->buf == 0) |
| 3091 | return 0; |
| 3092 | stream->read_ptr = stream->buf; |
| 3093 | stream->read_end = stream->buf; |
| 3094 | ssize_t size = stdio_stream_read_buf(stream, stream->buf, |
| 3095 | stream->buf + stream->bufsiz); |
| 3096 | if (size < 0) |
| 3097 | return EOF; |
| 3098 | stream->read_end += size; |
| 3099 | return 0; |
| 3100 | } |
| 3101 | |
| 3102 | static int stdio_write_buf(int fd, const char *start, const char *end) |
| 3103 | { |
no test coverage detected