diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-05-06 03:50:44 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-05-21 22:20:04 -0400 |
commit | 8cfb43de636faa401634340d1a18404844f9ba5a (patch) | |
tree | 9194b67405af46a1800c3a14f294daf7079dd5a7 /libc/sysdeps/linux/i960 | |
parent | f8111809bae5bfe384bbbf59d59eb6ee4b16ec7f (diff) |
stdio: implement assignment-allocation "m" character
The latest POSIX spec introduces a "m" character to allocate buffers for
the user when using scanf type functions. This is like the old glibc "a"
flag, but now standardized. With packages starting to use these, we need
to implement it.
for example:
char *s;
sscanf("foo", "%ms", &s);
printf("%s\n", s);
free(s);
This will automatically allocate storage for "s", read in "foo" to it,
and then display it.
I'm not terribly familiar with the stdio layer, so this could be wrong.
But it seems to work for me.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'libc/sysdeps/linux/i960')
0 files changed, 0 insertions, 0 deletions