]> git.saurik.com Git - apple/libc.git/blob - stdlib/FreeBSD/atol.3.patch
Libc-498.1.5.tar.gz
[apple/libc.git] / stdlib / FreeBSD / atol.3.patch
1 --- atol.3.orig 2007-04-08 18:49:34.000000000 -0700
2 +++ atol.3 2007-04-08 19:21:38.000000000 -0700
3 @@ -40,7 +40,8 @@
4 .Dt ATOL 3
5 .Os
6 .Sh NAME
7 -.Nm atol , atoll
8 +.Nm atol , atoll ,
9 +.Nm atol_l , atoll_l
10 .Nd convert
11 .Tn ASCII
12 string to
13 @@ -53,14 +54,19 @@
14 .Sh SYNOPSIS
15 .In stdlib.h
16 .Ft long
17 -.Fn atol "const char *nptr"
18 +.Fn atol "const char *str"
19 .Ft "long long"
20 -.Fn atoll "const char *nptr"
21 +.Fn atoll "const char *str"
22 +.In xlocale.h
23 +.Ft long
24 +.Fn atol_l "const char *str" "locale_t loc"
25 +.Ft "long long"
26 +.Fn atoll_l "const char *str" "locale_t loc"
27 .Sh DESCRIPTION
28 The
29 .Fn atol
30 function converts the initial portion of the string pointed to by
31 -.Fa nptr
32 +.Fa str
33 to
34 .Vt long
35 integer
36 @@ -68,12 +74,12 @@
37 .Pp
38 It is equivalent to:
39 .Pp
40 -.Dl "strtol(nptr, (char **)NULL, 10);"
41 +.Dl "strtol(str, (char **)NULL, 10);"
42 .Pp
43 The
44 .Fn atoll
45 function converts the initial portion of the string pointed to by
46 -.Fa nptr
47 +.Fa str
48 to
49 .Vt "long long"
50 integer
51 @@ -81,7 +87,19 @@
52 .Pp
53 It is equivalent to:
54 .Pp
55 -.Dl "strtoll(nptr, (char **)NULL, 10);"
56 +.Dl "strtoll(str, (char **)NULL, 10);"
57 +.Pp
58 +While the
59 +.Fn atol
60 +and
61 +.Fn atoll
62 +functions use the current locale, the
63 +.Fn atol_l
64 +and
65 +.Fn atoll_l
66 +functions may be passed locales directly. See
67 +.Xr xlocale 3
68 +for more information.
69 .Sh ERRORS
70 The functions
71 .Fn atol
72 @@ -96,7 +114,8 @@
73 .Xr atoi 3 ,
74 .Xr strtod 3 ,
75 .Xr strtol 3 ,
76 -.Xr strtoul 3
77 +.Xr strtoul 3 ,
78 +.Xr xlocale 3
79 .Sh STANDARDS
80 The
81 .Fn atol