This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 5/6] float128: Add strfromf128, strtof128, and wcstof128 to the manual
On Fri, 26 May 2017, Gabriel F. T. Gomes wrote:
> 2016-11-14 Gabriel F. T. Gomes <gftg@linux.vnet.ibm.com>
>
> * manual/arith.texi: Add descriptions for strfromf128, strtof128,
> and wcstof128.
The documentation needs to be clear about what systems the functions are
supported on.
Rather than repeating that for every _Float128 function, I think an
appropriate structure would be to have a section of arith.texi that
discusses the C floating-point types, including explaining _Float@var{n}
and _Float@var{n}x and that such types are supported by glibc on only some
systems (currently the empty set, powerpc64le patch would change that
section to say that _Float128 is supported on powerpc64le). Then the
documentation of each function would be written in a type-generic way, say
documenting
@deftypefun _Float@var{n} strtof@var{n} (const char *@var{string}, char **@var{tailptr})
@deftypefunx _Float@var{n}x strtof@var{n}x (const char *@var{string}, char **@var{tailptr})
(documenting the _FloatNx functions optional since your patches aren't
adding any such functions), so that it would apply automatically to all
_FloatN types for which support is added to glibc (likewise, use @var{n}
instead of literal 128 in the documentation text, ideally avoiding text
that would need additional duplication when there are _FloatNx functions
as well). (I'm assuming here that such uses of @var in function names and
return / argument types work properly.)
E.g. the text might say simply:
These functions are like @code{strtod}, except for the return type.
They were introduced in @w{ISO/IEC TS 18661-3}.
which avoids the text needing changing when more such types are supported.
--
Joseph S. Myers
joseph@codesourcery.com