]>
Commit | Line | Data |
---|---|---|
224c7076 A |
1 | --- atof.3.orig 2007-04-08 18:49:34.000000000 -0700 |
2 | +++ atof.3 2007-04-08 19:18:24.000000000 -0700 | |
3d9156a7 A |
3 | @@ -40,7 +40,8 @@ |
4 | .Dt ATOF 3 | |
5 | .Os | |
6 | .Sh NAME | |
7 | -.Nm atof | |
8 | +.Nm atof , | |
9 | +.Nm atof_l | |
10 | .Nd convert | |
11 | .Tn ASCII | |
12 | string to double | |
224c7076 A |
13 | @@ -49,24 +50,35 @@ |
14 | .Sh SYNOPSIS | |
3d9156a7 A |
15 | .In stdlib.h |
16 | .Ft double | |
224c7076 A |
17 | -.Fn atof "const char *nptr" |
18 | +.Fn atof "const char *str" | |
3d9156a7 A |
19 | +.In xlocale.h |
20 | +.Ft double | |
224c7076 | 21 | +.Fn atof_l "const char *str" "locale_t loc" |
3d9156a7 A |
22 | .Sh DESCRIPTION |
23 | The | |
24 | .Fn atof | |
224c7076 A |
25 | function converts the initial portion of the string pointed to by |
26 | -.Fa nptr | |
27 | +.Fa str | |
28 | to | |
29 | .Vt double | |
30 | representation. | |
31 | .Pp | |
32 | It is equivalent to: | |
33 | .Bd -literal -offset indent | |
34 | -strtod(nptr, (char **)NULL); | |
35 | +strtod(str, (char **)NULL); | |
36 | .Ed | |
37 | .Pp | |
3d9156a7 A |
38 | The decimal point |
39 | character is defined in the program's locale (category | |
40 | .Dv LC_NUMERIC ) . | |
41 | +.Pp | |
42 | +While the | |
43 | +.Fn atof | |
44 | +function uses the current locale, the | |
45 | +.Fn atof_l | |
46 | +function may be passed a locale directly. See | |
47 | +.Xr xlocale 3 | |
48 | +for more information. | |
49 | .Sh IMPLEMENTATION NOTES | |
50 | The | |
51 | .Fn atof | |
52 | @@ -88,7 +100,8 @@ | |
53 | .Xr atol 3 , | |
54 | .Xr strtod 3 , | |
55 | .Xr strtol 3 , | |
56 | -.Xr strtoul 3 | |
57 | +.Xr strtoul 3 , | |
58 | +.Xr xlocale 3 | |
59 | .Sh STANDARDS | |
60 | The | |
61 | .Fn atof |