benilla-re systems structs docs

__input

function · crt · primitive

Address
0x744e21 · 2597 bytes, up to 0x745845
Signature
int32_t __cdecl (void *stream, const uint8_t *format, void *args)
Meaning
Walks a scanf format over a stream, stores each conversion through the argument list and returns their count or -1
Confidence
verified, proof one
Name from
the community database (idb)
Finding
crt/scanf#the-format-walk
Test
crt::crt_sscanf_fixed_difftest, crt::crt_sscanf_random_difftest

Finding: The format walk in crt: formatted input

__input keeps n, the conversions stored, matched, a byte counting those that matched even when suppressed or %n, and charcount, the bytes read. A space in the format (9 to 13 or 0x20) reads while the byte is a space, pushes back the first that is not and skips the format's next spaces; a byte other than % must equal the next input byte, else it is pushed back and the scan ends; % starts a conversion. The scan ends at the format's end, and when the last byte read was EOF unless %n follows. It answers n, or −1 when that byte was EOF with n and matched 0. A format ending in a space reads one more byte.

The derivation is in the doc.

Callers 1

Callees 10

Calls and jumps by a bare address, from tables/calls.tsv.