This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] manual: Document the standardized scanf flag, "m". [BZ #16376]
- From: Zack Weinberg <zackw at panix dot com>
- To: Rical Jasan <ricaljasan at pacific dot net>
- Cc: libc-alpha <libc-alpha at sourceware dot org>, Andreas Schwab <schwab at suse dot de>, Paul Eggert <eggert at cs dot ucla dot edu>
- Date: Fri, 9 Feb 2018 10:06:19 -0500
- Subject: Re: [PATCH] manual: Document the standardized scanf flag, "m". [BZ #16376]
- Authentication-results: sourceware.org; auth=none
- References: <7c42f58d-d076-aeb3-a229-2581aa03af94@pacific.net> <20180209130754.16006-1-ricaljasan@pacific.net>
On Fri, Feb 9, 2018 at 8:07 AM, Rical Jasan <ricaljasan@pacific.net> wrote:
> POSIX.1-2008 introduced the optional assignment-allocation modifier,
> "m", whose functionality was previously provided by the GNU extension
> "a".
OK with just one tweak...
> +You should free the buffer with @code{free} when you no longer need it.
> +
> +As a GNU extension predating @samp{m}, @samp{a} is also available, but
> +its use is considered deprecated.
let's be a little more specific here:
+As a GNU extension, the modifier @samp{a} has the same effect as @samp{m}.
+This extension predates POSIX.1-2008 and is now deprecated. Other C libraries
+may interpret e.g.@: @samp{%as} as the @samp{%a} format for reading
+floating-point numbers, followed by a literal @samp{s}.
zw