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

Function stdio_stream_write

examples/stdlib.c:3125–3142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3123}
3124
3125static int stdio_stream_write(FILE *stream)
3126{
3127 if (stream->buf == NULL)
3128 return 0;
3129 if (stream->write_ptr == NULL)
3130 {
3131 stream->write_ptr = stream->buf;
3132 stream->write_end = stream->buf + stream->bufsiz;
3133 return 0;
3134 }
3135 if (stdio_stream_write_buf(stream, stream->buf, stream->write_ptr) < 0)
3136 {
3137 stream->flags |= STDIO_FLAG_ERROR;
3138 return EOF;
3139 }
3140 stream->write_ptr = stream->buf;
3141 return 0;
3142}
3143
3144static int fflush_unlocked(FILE *stream)
3145{

Callers 5

fflush_unlockedFunction · 0.85
stdio_stream_write_initFunction · 0.85
fputc_unlockedFunction · 0.85
fputs_unlockedFunction · 0.85
fwrite_unlockedFunction · 0.85

Calls 1

stdio_stream_write_bufFunction · 0.85

Tested by

no test coverage detected