diff options
Diffstat (limited to 'src/lib/libc/stdlib/strtod.3')
| -rw-r--r-- | src/lib/libc/stdlib/strtod.3 | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/src/lib/libc/stdlib/strtod.3 b/src/lib/libc/stdlib/strtod.3 index 0b7f973857..e25b0a5511 100644 --- a/src/lib/libc/stdlib/strtod.3 +++ b/src/lib/libc/stdlib/strtod.3 | |||
| @@ -13,11 +13,7 @@ | |||
| 13 | .\" 2. Redistributions in binary form must reproduce the above copyright | 13 | .\" 2. Redistributions in binary form must reproduce the above copyright |
| 14 | .\" notice, this list of conditions and the following disclaimer in the | 14 | .\" notice, this list of conditions and the following disclaimer in the |
| 15 | .\" documentation and/or other materials provided with the distribution. | 15 | .\" documentation and/or other materials provided with the distribution. |
| 16 | .\" 3. All advertising materials mentioning features or use of this software | 16 | .\" 3. Neither the name of the University nor the names of its contributors |
| 17 | .\" must display the following acknowledgement: | ||
| 18 | .\" This product includes software developed by the University of | ||
| 19 | .\" California, Berkeley and its contributors. | ||
| 20 | .\" 4. Neither the name of the University nor the names of its contributors | ||
| 21 | .\" may be used to endorse or promote products derived from this software | 17 | .\" may be used to endorse or promote products derived from this software |
| 22 | .\" without specific prior written permission. | 18 | .\" without specific prior written permission. |
| 23 | .\" | 19 | .\" |
| @@ -33,8 +29,7 @@ | |||
| 33 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 34 | .\" SUCH DAMAGE. | 30 | .\" SUCH DAMAGE. |
| 35 | .\" | 31 | .\" |
| 36 | .\" from: @(#)strtod.3 5.3 (Berkeley) 6/29/91 | 32 | .\" $OpenBSD: strtod.3,v 1.8 2003/06/02 20:18:38 millert Exp $ |
| 37 | .\" $Id: strtod.3,v 1.1.1.1 1995/10/18 08:42:19 deraadt Exp $ | ||
| 38 | .\" | 33 | .\" |
| 39 | .Dd June 29, 1991 | 34 | .Dd June 29, 1991 |
| 40 | .Dt STRTOD 3 | 35 | .Dt STRTOD 3 |
| @@ -51,20 +46,25 @@ string to double | |||
| 51 | .Sh DESCRIPTION | 46 | .Sh DESCRIPTION |
| 52 | The | 47 | The |
| 53 | .Fn strtod | 48 | .Fn strtod |
| 54 | function converts the initial portion of the string | 49 | function converts the initial portion of the string pointed to by |
| 55 | pointed to by | ||
| 56 | .Fa nptr | 50 | .Fa nptr |
| 57 | to | 51 | to |
| 58 | .Em double | 52 | .Li double |
| 59 | representation. | 53 | representation. |
| 60 | .Pp | 54 | .Pp |
| 61 | The expected form of the string is an optional plus (``+'') or minus | 55 | The expected form of the string is an optional plus |
| 62 | sign (``-'') followed by a sequence of digits optionally containing | 56 | .Pq Ql + |
| 57 | or minus sign | ||
| 58 | .Pq Ql - | ||
| 59 | followed by a sequence of digits optionally containing | ||
| 63 | a decimal-point character, optionally followed by an exponent. | 60 | a decimal-point character, optionally followed by an exponent. |
| 64 | An exponent consists of an ``E'' or ``e'', followed by an optional plus | 61 | An exponent consists of an |
| 65 | or minus sign, followed by a sequence of digits. | 62 | .Sq E |
| 63 | or | ||
| 64 | .Sq e , | ||
| 65 | followed by an optional plus or minus sign, followed by a sequence of digits. | ||
| 66 | .Pp | 66 | .Pp |
| 67 | Leading white-space characters in the string (as defined by the | 67 | Leading whitespace characters in the string (as defined by the |
| 68 | .Xr isspace 3 | 68 | .Xr isspace 3 |
| 69 | function) are skipped. | 69 | function) are skipped. |
| 70 | .Sh RETURN VALUES | 70 | .Sh RETURN VALUES |
| @@ -88,18 +88,18 @@ is stored in the location referenced by | |||
| 88 | If the correct value would cause overflow, plus or minus | 88 | If the correct value would cause overflow, plus or minus |
| 89 | .Dv HUGE_VAL | 89 | .Dv HUGE_VAL |
| 90 | is returned (according to the sign of the value), and | 90 | is returned (according to the sign of the value), and |
| 91 | .Dv ERANGE | 91 | .Er ERANGE |
| 92 | is stored in | 92 | is stored in |
| 93 | .Va errno . | 93 | .Va errno . |
| 94 | If the correct value would cause underflow, zero is | 94 | If the correct value would cause underflow, zero is returned and |
| 95 | returned and | 95 | .Er ERANGE |
| 96 | .Dv ERANGE | 96 | is stored in |
| 97 | is stored in | ||
| 98 | .Va errno . | 97 | .Va errno . |
| 99 | .Sh ERRORS | 98 | .Sh ERRORS |
| 100 | .Bl -tag -width Er | 99 | .Bl -tag -width Er |
| 101 | .It Bq Er ERANGE | 100 | .It Bq Er ERANGE |
| 102 | Overflow or underflow occurred. | 101 | Overflow or underflow occurred. |
| 102 | .El | ||
| 103 | .Sh SEE ALSO | 103 | .Sh SEE ALSO |
| 104 | .Xr atof 3 , | 104 | .Xr atof 3 , |
| 105 | .Xr atoi 3 , | 105 | .Xr atoi 3 , |
| @@ -109,6 +109,5 @@ Overflow or underflow occurred. | |||
| 109 | .Sh STANDARDS | 109 | .Sh STANDARDS |
| 110 | The | 110 | The |
| 111 | .Fn strtod | 111 | .Fn strtod |
| 112 | function | 112 | function conforms to |
| 113 | conforms to | ||
| 114 | .St -ansiC . | 113 | .St -ansiC . |
