So far this is how I'm treating the modifiers in my custom implementation:
Code:
/* Defaults used if %> is not used to switch to another set
*
* In all cases these modifiers are read directly instead of via callbacks:
*
* + Same as standard printf definition, forces a sign for numbers
* - Same as standard printf definition, left justifies output
* # Same as standard printf definition, applies prefix, for numbers it's the
* usual 0x0, 0b0, 00 etc, for strings it's instead L", u8" etc, similar for
* characters: L', u', U' etc
* ! Applies suffix, for numbers this means ULL etc, for strings it's just ",
* for characters it's just '
* ? Where conversions of character encoding need to be done, if a character
* that cannot be converted appears, this character is substituted, expects
* a pawd (int) which is then stored in a pawc (char, PAWVA_DATA->sub)
* . Indicates precision is to be read in from that point onwards
* * Prior to the . character indicates minimum characters to output, after the
* . character indicates the number of digits after the decimal . to output
* */
>, ! and ? are my own additions obviously, the only one I'm feel is wrong is the * modifier