MCPcopy Create free account
hub / github.com/GJDuck/e9patch / stdio_stream_read_buf

Function stdio_stream_read_buf

examples/stdlib.c:3072–3086  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3070}
3071
3072static ssize_t stdio_stream_read_buf(FILE *stream, char *start, char *end)
3073{
3074 ssize_t size = read(stream->fd, start, end - start);
3075 if (size == 0)
3076 {
3077 stream->flags |= STDIO_FLAG_EOF;
3078 return -1;
3079 }
3080 if (size < 0)
3081 {
3082 stream->flags |= STDIO_FLAG_ERROR;
3083 return -1;
3084 }
3085 return size;
3086}
3087
3088static int stdio_stream_read(FILE *stream)
3089{

Callers 3

stdio_stream_readFunction · 0.85
fgetc_unlockedFunction · 0.85
fread_unlockedFunction · 0.85

Calls 1

readFunction · 0.85

Tested by

no test coverage detected