From 8cfb43de636faa401634340d1a18404844f9ba5a Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 6 May 2012 03:50:44 -0400 Subject: 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 --- extra/Configs/Config.in | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'extra') diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in index 10607293c..c2f2fc723 100644 --- a/extra/Configs/Config.in +++ b/extra/Configs/Config.in @@ -1590,19 +1590,6 @@ config UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS Most people will answer 9. - -config UCLIBC_HAS_SCANF_GLIBC_A_FLAG - bool "Support glibc's 'a' flag for scanf string conversions (not implemented)" - help - NOTE!!! Currently Not Implemented!!! Just A Place Holder!! NOTE!!! - NOTE!!! Conflicts with an ANSI/ISO C99 scanf flag!! NOTE!!! - - Answer Y to enable support for glibc's 'a' flag for the scanf string - conversions '%s', '%[', '%ls', '%l[', and '%S'. This is used to - auto-allocate sufficient memory to hold the data retrieved. - - Most people will answer N. - choice prompt "Stdio buffer size" default UCLIBC_HAS_STDIO_BUFSIZ_4096 -- cgit v1.2.3