3 ms·
How much "state" would sscanf really need? From memory (and with an extra peek at the man page) each directive is in sequence of the "format" specifier is seque
by whizzter 4y ago
How much "state" would sscanf really need? From memory (and with an extra peek at the man page) each directive is in sequence of the "format" specifier is sequential (it's not nearly as flexible as a Regexp) so you really only need:
A: a processing state (int/enum).
B: a current fmt str pointer.
C: va_list struct to keep track of destinations.
D: a source string pointer.
Now if what I saw mentioned in another comment is true that there is some insane conversion to a FILE* stream to do this, then yes I can see why it happens but it's not really NEEDED to implement the function as specified.