]> git.saurik.com Git - apple/libc.git/blob - stdlib/FreeBSD/strtoul.3.patch
Libc-763.13.tar.gz
[apple/libc.git] / stdlib / FreeBSD / strtoul.3.patch
1 --- strtoul.3.bsdnew 2009-11-13 14:11:51.000000000 -0800
2 +++ strtoul.3 2009-11-13 14:40:07.000000000 -0800
3 @@ -36,7 +36,10 @@
4 .Dt STRTOUL 3
5 .Os
6 .Sh NAME
7 -.Nm strtoul , strtoull , strtoumax , strtouq
8 +.Nm strtoul ,
9 +.Nm strtoull ,
10 +.Nm strtoumax ,
11 +.Nm strtouq
12 .Nd "convert a string to an"
13 .Vt "unsigned long" , "unsigned long long" , uintmax_t ,
14 or
15 @@ -46,25 +49,40 @@ integer
16 .Lb libc
17 .Sh SYNOPSIS
18 .In stdlib.h
19 -.In limits.h
20 .Ft "unsigned long"
21 -.Fn strtoul "const char * restrict nptr" "char ** restrict endptr" "int base"
22 +.Fo strtoul
23 +.Fa "const char *restrict str"
24 +.Fa "char **restrict endptr"
25 +.Fa "int base"
26 +.Fc
27 .Ft "unsigned long long"
28 -.Fn strtoull "const char * restrict nptr" "char ** restrict endptr" "int base"
29 +.Fo strtoull
30 +.Fa "const char *restrict str"
31 +.Fa "char **restrict endptr"
32 +.Fa "int base"
33 +.Fc
34 .In inttypes.h
35 .Ft uintmax_t
36 -.Fn strtoumax "const char * restrict nptr" "char ** restrict endptr" "int base"
37 +.Fo strtoumax
38 +.Fa "const char *restrict str"
39 +.Fa "char **restrict endptr"
40 +.Fa "int base"
41 +.Fc
42 .In sys/types.h
43 .In stdlib.h
44 .In limits.h
45 .Ft u_quad_t
46 -.Fn strtouq "const char *nptr" "char **endptr" "int base"
47 +.Fo strtouq
48 +.Fa "const char *str"
49 +.Fa "char **endptr"
50 +.Fa "int base"
51 +.Fc
52 .Sh DESCRIPTION
53 The
54 .Fn strtoul
55 function
56 converts the string in
57 -.Fa nptr
58 +.Fa str
59 to an
60 .Vt "unsigned long"
61 value.
62 @@ -72,7 +90,7 @@ The
63 .Fn strtoull
64 function
65 converts the string in
66 -.Fa nptr
67 +.Fa str
68 to an
69 .Vt "unsigned long long"
70 value.
71 @@ -80,7 +98,7 @@ The
72 .Fn strtoumax
73 function
74 converts the string in
75 -.Fa nptr
76 +.Fa str
77 to an
78 .Vt uintmax_t
79 value.
80 @@ -88,7 +106,7 @@ The
81 .Fn strtouq
82 function
83 converts the string in
84 -.Fa nptr
85 +.Fa str
86 to a
87 .Vt u_quad_t
88 value.
89 @@ -142,11 +160,11 @@ stores the address of the first invalid
90 If there were no digits at all, however,
91 .Fn strtoul
92 stores the original value of
93 -.Fa nptr
94 +.Fa str
95 in
96 .Fa *endptr .
97 (Thus, if
98 -.Fa *nptr
99 +.Fa *str
100 is not
101 .Ql \e0
102 but
103 @@ -201,10 +219,22 @@ no conversion could be performed
104 .It Bq Er ERANGE
105 The given string was out of range; the value converted has been clamped.
106 .El
107 +.Sh LEGACY SYNOPSIS
108 +.Fd #include <stdlib.h>
109 +.Fd #include <limits.h>
110 +.Pp
111 +.In limits.h
112 +is necessary for the
113 +.Fn strtoul
114 +and
115 +.Fn strtoull
116 +functions.
117 .Sh SEE ALSO
118 .Xr strtol 3 ,
119 +.Xr strtol_l 3 ,
120 .Xr strtonum 3 ,
121 -.Xr wcstoul 3
122 +.Xr wcstoul 3 ,
123 +.Xr compat 5
124 .Sh STANDARDS
125 The
126 .Fn strtoul