refactor scanf core to use common code path for all string formats
authorRich Felker <dalias@aerifal.cx>
Tue, 4 Jun 2013 20:09:36 +0000 (16:09 -0400)
committerRich Felker <dalias@aerifal.cx>
Tue, 4 Jun 2013 20:09:36 +0000 (16:09 -0400)
commitf18846dd3a048598676e10b2a7b9f931bb3d1d6a
tree55582d95c77451bfdb0a63e936be144109fca256
parenta6d272127bb6a2eb09dc182cc39c49e77310ade4
refactor scanf core to use common code path for all string formats

the concept here is that %s and %c are essentially special-cases of
%[, with some minimal additional special-casing.

aside from simplifying the code and reducing the number of complex
code-paths that would need changing to make optimizations later, the
main purpose of this change is to simplify addition of the 'm'
modifier which causes scanf to allocate storage for the string being
read.
src/stdio/vfscanf.c