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

Function fputc_unlocked

examples/stdlib.c:3459–3474  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3457}
3458
3459static int fputc_unlocked(int c, FILE *stream)
3460{
3461 if (stdio_stream_write_init(stream) < 0)
3462 return EOF;
3463 char d = (char)c;
3464 if (stream->write_ptr == NULL)
3465 {
3466 if (stdio_stream_write_buf(stream, &d, &d + sizeof(d)) < 0)
3467 return EOF;
3468 return (int)d;
3469 }
3470 *stream->write_ptr++ = d;
3471 if ((int)(unsigned char)d == stream->eol && stdio_stream_write(stream) < 0)
3472 return EOF;
3473 return (int)d;
3474}
3475
3476static int fputc(int c, FILE *stream)
3477{

Callers 5

entryFunction · 0.85
fputcFunction · 0.85
putc_unlockedFunction · 0.85
putchar_unlockedFunction · 0.85
puts_unlockedFunction · 0.85

Calls 3

stdio_stream_write_initFunction · 0.85
stdio_stream_write_bufFunction · 0.85
stdio_stream_writeFunction · 0.85

Tested by

no test coverage detected