This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] manual: Document the standardized scanf flag, "m". [BZ #16376]


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]