On Sat, 2010-09-04 at 12:54 +0200, Julien Cristau wrote:
> + * Use %ms rather than %as in scanf to get dynamic allocation of
> + input strings. See man scanf.
>
> what is this referring to? my scanf manual says
>
> · An optional 'a' character. This is used with string conver‐
> sions, and relieves the caller of the need to allocate a corre‐
> sponding buffer to hold the input: [...] This is a
> GNU extension; C99 employs the 'a' character as a conversion
> specifier (and it can also be used as such in the GNU implemen‐
> tation).
>
> and I can't see anything about 'm'.
The "notes" section of scanf(3) says:
Since version 2.7, glibc also provides the m modifier for the same
purpose as
the a modifier. The m modifier has the following advantages:
* It may also be applied to %c conversion specifiers (e.g., %3mc).
* It avoids ambiguity with respect to the %a floating-point conversion
specifier (and is unaffected by gcc -std=c99 etc.)
* It is specified in the upcoming revision of the POSIX.1 standard.
Regards,
Adam
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive:
http://lists.debian.org/1283604471.30579.6511.ca...@kaa.jungle.aubergine.my-net-space.net