summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Tribble <peter.tribble@gmail.com>2019-08-26 12:07:23 +0100
committerPeter Tribble <peter.tribble@gmail.com>2019-08-27 20:58:44 +0100
commit6ae02400ec7326832d2e19e92b4174ec778b2b9f (patch)
treea936f8cfa81025763c33285744030e64c235d6be
parent0463c8009260e445fd1885cfaf98e04a586d495b (diff)
downloadillumos-joyent-6ae02400ec7326832d2e19e92b4174ec778b2b9f.tar.gz
11620 strtod man page typo equence
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Gordon Ross <gwr@nexenta.com>
-rw-r--r--usr/src/man/man3c/strtod.3c23
-rw-r--r--usr/src/man/man3c/wcstod.3c27
2 files changed, 11 insertions, 39 deletions
diff --git a/usr/src/man/man3c/strtod.3c b/usr/src/man/man3c/strtod.3c
index 8969faef41..2c79bb7373 100644
--- a/usr/src/man/man3c/strtod.3c
+++ b/usr/src/man/man3c/strtod.3c
@@ -44,11 +44,10 @@
.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved.
.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved.
.\"
-.TH STRTOD 3C "Nov 1, 2003"
+.TH STRTOD 3C "Aug 25, 2019"
.SH NAME
strtod, strtof, strtold, atof \- convert string to floating-point number
.SH SYNOPSIS
-.LP
.nf
#include <stdlib.h>
@@ -71,8 +70,6 @@ strtod, strtof, strtold, atof \- convert string to floating-point number
.fi
.SH DESCRIPTION
-.sp
-.LP
The \fBstrtod()\fR, \fBstrtof()\fR, and \fBstrtold()\fR functions convert the
initial portion of the string pointed to by \fInptr\fR to \fBdouble\fR,
\fBfloat\fR, and \fBlong double\fR representation, respectively. First they
@@ -149,7 +146,7 @@ hexadecimal strings are also recognized.
.sp
.LP
In default mode for \fBstrtod()\fR, the \fIn-char-sequence\fR in the
-NAN(\fIn-char-equence\fR) form can contain any character except ')' (right
+NAN(\fIn-char-sequence\fR) form can contain any character except ')' (right
parenthesis) or '\e0' (null). In C99/SUSv3 mode, the \fIn-char-sequence\fR can
contain only upper and lower case letters, digits, and '_' (underscore).
.sp
@@ -202,8 +199,6 @@ successful.
The \fBatof(\fR\fIstr\fR\fB)\fR function call is equivalent to
\fBstrtod(\fR\fInptr\fR\fB, (char **)NULL)\fR.
.SH RETURN VALUES
-.sp
-.LP
Upon successful completion, these functions return the converted value. If no
conversion could be performed, \fB0\fR is returned.
.sp
@@ -218,13 +213,11 @@ If the correct value would cause an underflow, the correctly rounded result
(which may be normal, subnormal, or zero) is returned, a floating point
underflow exception is raised, and \fBerrno\fR is set to \fBERANGE\fR.
.SH ERRORS
-.sp
-.LP
These functions will fail if:
.sp
.ne 2
.na
-\fB\fBERANGE\fR\fR
+\fBERANGE\fR
.ad
.RS 10n
The value to be returned would cause overflow or underflow
@@ -236,15 +229,13 @@ These functions may fail if:
.sp
.ne 2
.na
-\fB\fBEINVAL\fR\fR
+\fBEINVAL\fR
.ad
.RS 10n
No conversion could be performed.
.RE
.SH USAGE
-.sp
-.LP
Since 0 is returned on error and is also a valid return on success, an
application wishing to check for error situations should set \fBerrno\fR to 0,
then call \fBstrtod()\fR, \fBstrtof()\fR, or \fBstrtold()\fR, then check
@@ -317,8 +308,6 @@ The change in behavior is due to the inclusion of floating-point numbers in
hexadecimal notation without requiring that either a decimal point or the
binary exponent be present.
.SH ATTRIBUTES
-.sp
-.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
@@ -337,13 +326,9 @@ MT-Level MT-Safe with exceptions
.TE
.SH SEE ALSO
-.sp
-.LP
\fBisspace\fR(3C), \fBlocaleconv\fR(3C), \fBscanf\fR(3C), \fBsetlocale\fR(3C),
\fBstrtol\fR(3C), \fBattributes\fR(5), \fBstandards\fR(5)
.SH NOTES
-.sp
-.LP
The \fBstrtod()\fR and \fBatof()\fR functions can be used safely in
multithreaded applications, as long as \fBsetlocale\fR(3C) is not called to
change the locale.
diff --git a/usr/src/man/man3c/wcstod.3c b/usr/src/man/man3c/wcstod.3c
index 155d9a103b..e052148c30 100644
--- a/usr/src/man/man3c/wcstod.3c
+++ b/usr/src/man/man3c/wcstod.3c
@@ -43,12 +43,11 @@
.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved.
.\" Portions Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved
.\"
-.TH WCSTOD 3C "Mar 31, 2003"
+.TH WCSTOD 3C "Aug 25, 2019"
.SH NAME
wcstod, wcstof, wcstold, wstod, watof \- convert wide character string to
floating-point number
.SH SYNOPSIS
-.LP
.nf
#include <wchar.h>
@@ -79,8 +78,6 @@ floating-point number
.fi
.SH DESCRIPTION
-.sp
-.LP
The \fBwcstod()\fR, \fBwcstof()\fR, and \fBwcstold()\fR functions convert the
initial portion of the wide-character string pointed to by \fInptr\fR to
\fBdouble\fR, \fBfloat\fR, and \fBlong double\fR representation, respectively.
@@ -153,13 +150,13 @@ n-wchar-sequence:
.sp
.LP
In default mode for \fBwcstod()\fR, only decimal, INF/INFINITY, and
-NAN/NAN(\fIn-char-sequence\fR) forms are recognized. In C99/SUSv3 mode,
+NAN/NAN(\fIn-wchar-sequence\fR) forms are recognized. In C99/SUSv3 mode,
hexadecimal strings are also recognized.
.sp
.LP
-In default mode for \fBwcstod()\fR, the \fIn-char-sequence\fR in the
-NAN(\fIn-char-equence\fR) form can contain any character except ')' (right
-parenthesis) or '\e0' (null). In C99/SUSv3 mode, the \fIn-char-sequence\fR can
+In default mode for \fBwcstod()\fR, the \fIn-wchar-sequence\fR in the
+NAN(\fIn-wchar-sequence\fR) form can contain any character except ')' (right
+parenthesis) or '\e0' (null). In C99/SUSv3 mode, the \fIn-wchar-sequence\fR can
contain only upper and lower case letters, digits, and '_' (underscore).
.sp
.LP
@@ -215,8 +212,6 @@ The \fBwstod()\fR function is identical to \fBwcstod()\fR.
The \fBwatof\fR(\fIstr\fR) function is equivalent to \fBwstod(\fR\fInptr\fR\fB,
(wchar_t **)NULL)\fR.
.SH RETURN VALUES
-.sp
-.LP
Upon successful completion, these functions return the converted value. If no
conversion could be performed, \fB0\fR is returned.
.sp
@@ -231,13 +226,11 @@ If the correct value would cause an underflow, the correctly rounded result
(which may be normal, subnormal, or zero) is returned, a floating point
underflow exception is raised, and \fBerrno\fR is set to \fBERANGE\fR.
.SH ERRORS
-.sp
-.LP
The \fBwcstod()\fR and \fBwstod()\fR functions will fail if:
.sp
.ne 2
.na
-\fB\fBERANGE\fR\fR
+\fBERANGE\fR
.ad
.RS 10n
The value to be returned would cause overflow or underflow.
@@ -249,22 +242,18 @@ The \fBwcstod()\fR and \fBwcstod()\fR functions may fail if:
.sp
.ne 2
.na
-\fB\fBEINVAL\fR\fR
+\fBEINVAL\fR
.ad
.RS 10n
No conversion could be performed.
.RE
.SH USAGE
-.sp
-.LP
Because 0 is returned on error and is also a valid return on success, an
application wishing to check for error situations should set \fBerrno\fR to 0
call \fBwcstod()\fR, \fBwcstof()\fR, \fBwcstold()\fR, or \fBwstod()\fR, then
check \fBerrno\fR and if it is non-zero, assume an error has occurred.
.SH ATTRIBUTES
-.sp
-.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
@@ -283,7 +272,5 @@ MT-Level MT-Safe
.TE
.SH SEE ALSO
-.sp
-.LP
\fBiswspace\fR(3C), \fBlocaleconv\fR(3C), \fBscanf\fR(3C), \fBsetlocale\fR(3C),
\fBwcstol\fR(3C), \fBattributes\fR(5), \fBstandards\fR(5)