Print this page
11620 strtod man page typo equence

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man3c/wcstod.3c
          +++ new/usr/src/man/man3c/wcstod.3c
↓ open down ↓ 35 lines elided ↑ open up ↑
  36   36  .\" When distributing Covered Code, include this CDDL HEADER in each
  37   37  .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  38   38  .\" If applicable, add the following below this CDDL HEADER, with the
  39   39  .\" fields enclosed by brackets "[]" replaced with your own identifying
  40   40  .\" information: Portions Copyright [yyyy] [name of copyright owner]
  41   41  .\"
  42   42  .\"
  43   43  .\" Copyright (c) 1992, X/Open Company Limited.  All Rights Reserved.
  44   44  .\" Portions Copyright (c) 2003, Sun Microsystems, Inc.  All Rights Reserved
  45   45  .\"
  46      -.TH WCSTOD 3C "Mar 31, 2003"
       46 +.TH WCSTOD 3C "Aug 25, 2019"
  47   47  .SH NAME
  48   48  wcstod, wcstof, wcstold, wstod, watof \- convert wide character string to
  49   49  floating-point number
  50   50  .SH SYNOPSIS
  51      -.LP
  52   51  .nf
  53   52  #include <wchar.h>
  54   53  
  55   54  \fBdouble\fR \fBwcstod\fR(\fBconst wchar_t *restrict\fR \fInptr\fR,
  56   55       \fBwchar_t **restrict\fR \fIendptr\fR);
  57   56  .fi
  58   57  
  59   58  .LP
  60   59  .nf
  61   60  \fBfloat\fR \fBwcstof\fR(\fBconst wchar_t *restrict\fR \fInptr\fR,
↓ open down ↓ 10 lines elided ↑ open up ↑
  72   71  .nf
  73   72  \fBdouble\fR \fBwstod\fR(\fBconst wchar_t *\fR\fInptr\fR, \fBwchar_t **\fR\fIendptr\fR);
  74   73  .fi
  75   74  
  76   75  .LP
  77   76  .nf
  78   77  \fBdouble\fR \fBwatof\fR(\fBwchar_t *\fR\fInptr\fR);
  79   78  .fi
  80   79  
  81   80  .SH DESCRIPTION
  82      -.sp
  83      -.LP
  84   81  The \fBwcstod()\fR, \fBwcstof()\fR, and \fBwcstold()\fR functions convert the
  85   82  initial portion of the wide-character string pointed to by \fInptr\fR to
  86   83  \fBdouble\fR, \fBfloat\fR, and \fBlong double\fR representation, respectively.
  87   84  They first decompose the input wide-character string into three parts:
  88   85  .RS +4
  89   86  .TP
  90   87  1.
  91   88  An initial, possibly empty, sequence of white-space wide-character codes (as
  92   89  specified by \fBiswspace\fR(3C))
  93   90  .RE
↓ open down ↓ 52 lines elided ↑ open up ↑
 146  143      nondigit
 147  144      n-wchar-sequence digit
 148  145      n-wchar-sequence nondigit
 149  146  .fi
 150  147  .in -2
 151  148  
 152  149  .RE
 153  150  .sp
 154  151  .LP
 155  152  In default mode for \fBwcstod()\fR, only decimal, INF/INFINITY, and
 156      -NAN/NAN(\fIn-char-sequence\fR) forms are recognized. In C99/SUSv3 mode,
      153 +NAN/NAN(\fIn-wchar-sequence\fR) forms are recognized. In C99/SUSv3 mode,
 157  154  hexadecimal strings are also recognized.
 158  155  .sp
 159  156  .LP
 160      -In default mode for \fBwcstod()\fR, the \fIn-char-sequence\fR in the
 161      -NAN(\fIn-char-equence\fR) form can contain any character except ')' (right
 162      -parenthesis) or '\e0' (null).  In C99/SUSv3 mode, the \fIn-char-sequence\fR can
      157 +In default mode for \fBwcstod()\fR, the \fIn-wchar-sequence\fR in the
      158 +NAN(\fIn-wchar-sequence\fR) form can contain any character except ')' (right
      159 +parenthesis) or '\e0' (null).  In C99/SUSv3 mode, the \fIn-wchar-sequence\fR can
 163  160  contain only upper and lower case letters, digits, and '_' (underscore).
 164  161  .sp
 165  162  .LP
 166  163  The \fBwcstof()\fR and \fBwcstold()\fR functions always function in
 167  164  C99/SUSv3-conformant mode.
 168  165  .sp
 169  166  .LP
 170  167  The subject sequence is defined as the longest initial subsequence of the input
 171  168  wide string, starting with the first non-white-space wide character, that is of
 172  169  the expected form. The subject sequence contains no wide characters if the
↓ open down ↓ 35 lines elided ↑ open up ↑
 208  205  The \fBwcstod()\fR function does not change the setting of \fBerrno\fR if
 209  206  successful.
 210  207  .sp
 211  208  .LP
 212  209  The \fBwstod()\fR function is identical to \fBwcstod()\fR.
 213  210  .sp
 214  211  .LP
 215  212  The \fBwatof\fR(\fIstr\fR) function is equivalent to \fBwstod(\fR\fInptr\fR\fB,
 216  213  (wchar_t **)NULL)\fR.
 217  214  .SH RETURN VALUES
 218      -.sp
 219      -.LP
 220  215  Upon successful completion, these functions return the converted value. If no
 221  216  conversion could be performed, \fB0\fR is returned.
 222  217  .sp
 223  218  .LP
 224  219  If the correct value is outside the range of representable values,
 225  220  \fB\(+-HUGE_VAL\fR, \fB\(+-HUGE_VALF\fR, or \fB\(+-HUGE_VALL\fR is returned
 226  221  (according to the sign of the value), a floating point overflow exception is
 227  222  raised, and \fBerrno\fR is set to \fBERANGE\fR.
 228  223  .sp
 229  224  .LP
 230  225  If the correct value would cause an underflow, the correctly rounded result
 231  226  (which may be normal, subnormal, or zero) is returned, a floating point
 232  227  underflow exception is raised, and \fBerrno\fR is set to \fBERANGE\fR.
 233  228  .SH ERRORS
 234      -.sp
 235      -.LP
 236  229  The \fBwcstod()\fR and \fBwstod()\fR functions will fail if:
 237  230  .sp
 238  231  .ne 2
 239  232  .na
 240      -\fB\fBERANGE\fR\fR
      233 +\fBERANGE\fR
 241  234  .ad
 242  235  .RS 10n
 243  236  The value to be returned would cause overflow or underflow.
 244  237  .RE
 245  238  
 246  239  .sp
 247  240  .LP
 248  241  The \fBwcstod()\fR and \fBwcstod()\fR functions may fail if:
 249  242  .sp
 250  243  .ne 2
 251  244  .na
 252      -\fB\fBEINVAL\fR\fR
      245 +\fBEINVAL\fR
 253  246  .ad
 254  247  .RS 10n
 255  248  No conversion could be performed.
 256  249  .RE
 257  250  
 258  251  .SH USAGE
 259      -.sp
 260      -.LP
 261  252  Because 0 is returned on error and is also a valid return on success, an
 262  253  application wishing to check for error situations should set \fBerrno\fR to 0
 263  254  call \fBwcstod()\fR, \fBwcstof()\fR, \fBwcstold()\fR, or \fBwstod()\fR, then
 264  255  check  \fBerrno\fR and if it is non-zero, assume an error has occurred.
 265  256  .SH ATTRIBUTES
 266      -.sp
 267      -.LP
 268  257  See \fBattributes\fR(5) for descriptions of the following attributes:
 269  258  .sp
 270  259  
 271  260  .sp
 272  261  .TS
 273  262  box;
 274  263  l | l
 275  264  l | l .
 276  265  ATTRIBUTE TYPE  ATTRIBUTE VALUE
 277  266  _
 278  267  Interface Stability     T{
 279  268  \fBwcstod()\fR, \fBwcstof()\fR, and \fBwcstold()\fR are Standard.
 280  269  T}
 281  270  _
 282  271  MT-Level        MT-Safe
 283  272  .TE
 284  273  
 285  274  .SH SEE ALSO
 286      -.sp
 287      -.LP
 288  275  \fBiswspace\fR(3C), \fBlocaleconv\fR(3C), \fBscanf\fR(3C), \fBsetlocale\fR(3C),
 289  276  \fBwcstol\fR(3C), \fBattributes\fR(5), \fBstandards\fR(5)
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX