]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
strfromd.3: Minor tweaks to Wainer dos Santos Moschetta's page
authorMichael Kerrisk <mtk.manpages@gmail.com>
Wed, 7 Dec 2016 15:36:22 +0000 (16:36 +0100)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Wed, 7 Dec 2016 15:37:57 +0000 (16:37 +0100)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man3/strfromd.3

index ea3b1401e7989c2ee4a52194762dccee56b4d2f5..877abea5629d22bd7fadf0b438ce0ab08b18339f 100644 (file)
 .\"   ISO/IEC TS 18661-1 technical specification.
 .\"   snprintf and other man.3 pages.
 .\"
-.TH STRFROMD 3 2016-12-02 "GNU C Library"
+.TH STRFROMD 3 2016-12-02 "GNU" "Linux Programmer's Manual"
 .SH NAME
 strfromd, strfromf, strfroml \- convert a floating-point value into
-a string.
+a string
 .SH SYNOPSIS
+.nf
 .B #include <stdlib.h>
-.sp
-.BI "int strfromd (char *restrict " str ", size_t " n ",
-.br
-.BI "              const char *restrict " format ", double " fp ");"
-.br
-.BI "int strfromf (char *restrict " str ", size_t " n ",
-.br
-.BI "              const char *restrict " format ", float "fp ");"
-.br
-.BI "int strfroml (char *restrict " str ", size_t " n ",
-.br
-.BI "              const char *restrict " format ", long double " fp ");"
-.sp
+
+.BI "int strfromd(char *restrict " str ", size_t " n ",
+.BI "             const char *restrict " format ", double " fp ");"
+.BI "int strfromf(char *restrict " str ", size_t " n ",
+.BI "             const char *restrict " format ", float "fp ");"
+.BI "int strfroml(char *restrict " str ", size_t " n ",
+.BI "             const char *restrict " format ", long double " fp ");"
+.fi
+
 .in -4
 Feature Test Macro Requirements for glibc (see
 .BR feature_test_macros (7)):
@@ -62,11 +59,9 @@ __STDC_WANT_IEC_60559_BFP_EXT__
 .RE
 .ad b
 .SH DESCRIPTION
-The
-.BR strfrom ()
-class of functions converts a floating-point value
-.I fp
-into a string of characters
+These functions convert a floating-point value,
+.IR fp ,
+into a string of characters,
 .IR str ,
 with a configurable
 .IR format
@@ -88,23 +83,21 @@ The
 and
 .BR strfroml ()
 functions are equivalent to
-.sp
-.in +4
-.BI "snprintf (str,  n, format, fp)"
-.in
-.sp
+
+    snprintf(str, n, format, fp);
+
 except for the
 .I format
 string.
 .SS Format of the format string
 The
 .I format
-string must start with the character %.
-This is followed by an optional precision which starts with period
+string must start with the character \(aq%\(aq.
+This is followed by an optional precision which starts with the period
 character (.), followed by an optional decimal integer.
-If no integer is specified after the period character, the precision used
-is zero.
-Finally, it should have one of the conversion specifiers
+If no integer is specified after the period character,
+a precision of zero is used.
+Finally, the format string should have one of the conversion specifiers
 .BR a ,
 .BR A ,
 .BR e ,
@@ -126,8 +119,8 @@ for a detailed description of these conversion specifiers.
 .sp
 The implementation conforms to the C99 standard on conversion of NaN and
 infinity values:
-.sp
-.in +4
+
+.RS
 If
 .I fp
 is a NaN, +NaN, or -NaN, and
@@ -149,8 +142,8 @@ is the conversion specifier, the conversion is to "NAN" or "-NAN".
 Likewise if
 .I fp
 is infinity, it is converted to [-]inf or [-]INF.
-.in
-.sp
+.RE
+
 A malformed
 .I format
 string results in undefined behavior.
@@ -185,7 +178,7 @@ section in GNU C Library manual.
 .sp
 .TS
 allbox;
-lb lb lb
+lbw11 lb lb
 l l l.
 Interface      Attribute       Value
 T{
@@ -201,7 +194,7 @@ Note: these attributes are preliminary.
 .SH CONFORMING TO
 C99, ISO/IEC TS 18661-1.
 .SH NOTES
-The behavior of
+The
 .BR strfromd (),
 .BR strfromf (),
 and
@@ -209,7 +202,6 @@ and
 functions take account of the
 .B LC_NUMERIC
 category of the current locale.
-
 .SH EXAMPLES
 To convert the value 12.1 as a float type to a string using decimal
 notation, resulting in "12.100000":