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

Function scanf_unget_char

examples/stdlib.c:4282–4296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4280}
4281
4282static __attribute__((__noinline__)) void scanf_unget_char(char c,
4283 struct scanf_stream_s *in)
4284{
4285 if (c == EOF)
4286 return;
4287 if (in->stream != NULL)
4288 ungetc_unlocked(c, in->stream);
4289 else
4290 {
4291 if (in->pos <= 0)
4292 in->pos = -1;
4293 else
4294 in->pos--;
4295 }
4296}
4297
4298static __attribute__((__noinline__)) char scanf_get_char_n(
4299 struct scanf_stream_s *in, size_t *width)

Callers 2

scanf_unget_char_nFunction · 0.85
scanf_implFunction · 0.85

Calls 1

ungetc_unlockedFunction · 0.85

Tested by

no test coverage detected