benilla-re systems structs docs

s_formatClassIndex

global · storm

Address
0x669bd4 · 121 bytes, up to 0x669c4c
Type
uint8_t[121]
Meaning
Maps the bytes 0 to 0x78 to the seven classes of 0x669ab0's switch
Confidence
verified, proof one
Finding
storm/printf#parsing-a-conversion

Finding: Parsing a conversion in storm: printf

ParseFormatSpecifier walks from the byte after the %. Digits build a number, and $ sets the index to it less one, or to 0 for none; any other clears the number and is classed. A digit is what _isdigit says of the byte sign-extended (#bytes-that-count-as-digits). % and NUL end a spec taking no argument, C D U X c d i u x an integer, 8 bytes after ll or I64, E F G e f g a double, P S p s a pointer. Every other byte goes on, so %o runs on to the next ending byte. _snprintf gets the spec with its first $ and the digits before it cut, and an 8-byte integer's ll made I64.

The derivation is in the doc.