]> git.saurik.com Git - apple/libc.git/blame - stdlib/FreeBSD/strtoul.3.patch
Libc-498.tar.gz
[apple/libc.git] / stdlib / FreeBSD / strtoul.3.patch
CommitLineData
224c7076
A
1--- strtoul.3 2003-05-20 15:23:25.000000000 -0700
2+++ strtoul.3.edit 2006-08-09 13:43:16.000000000 -0700
3@@ -40,7 +40,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@@ -50,25 +53,40 @@
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@@ -76,7 +94,7 @@
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@@ -84,7 +102,7 @@
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@@ -92,7 +110,7 @@
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@@ -146,11 +164,11 @@
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@@ -203,9 +221,21 @@
104 .It Bq Er ERANGE
105 The given string was out of range; the value converted has been clamped.
3d9156a7 106 .El
224c7076
A
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.
3d9156a7
A
117 .Sh SEE ALSO
118 .Xr strtol 3 ,
119-.Xr wcstoul 3
224c7076 120+.Xr strtol_l 3 ,
3d9156a7 121+.Xr wcstoul 3 ,
224c7076 122+.Xr compat 5
3d9156a7
A
123 .Sh STANDARDS
124 The
125 .Fn strtoul