diff options
author | aaron <> | 2000-04-20 13:50:03 +0000 |
---|---|---|
committer | aaron <> | 2000-04-20 13:50:03 +0000 |
commit | a4336f357f9e30dffdfad4909b24bd2e82c096a2 (patch) | |
tree | c79a224a41eb2c48668c4b4eda84163d7daadf64 /src/lib/libc/stdlib/strtoul.3 | |
parent | 92b3e44bedaf5a5f85880565a47206cdbf9bfa2a (diff) | |
download | openbsd-a4336f357f9e30dffdfad4909b24bd2e82c096a2.tar.gz openbsd-a4336f357f9e30dffdfad4909b24bd2e82c096a2.tar.bz2 openbsd-a4336f357f9e30dffdfad4909b24bd2e82c096a2.zip |
Flesh out stdlib function man pages.
Diffstat (limited to 'src/lib/libc/stdlib/strtoul.3')
-rw-r--r-- | src/lib/libc/stdlib/strtoul.3 | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/src/lib/libc/stdlib/strtoul.3 b/src/lib/libc/stdlib/strtoul.3 index 572658bf7f..e090253566 100644 --- a/src/lib/libc/stdlib/strtoul.3 +++ b/src/lib/libc/stdlib/strtoul.3 | |||
@@ -33,7 +33,7 @@ | |||
33 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 33 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
34 | .\" SUCH DAMAGE. | 34 | .\" SUCH DAMAGE. |
35 | .\" | 35 | .\" |
36 | .\" $OpenBSD: strtoul.3,v 1.6 2000/03/04 22:19:31 aaron Exp $ | 36 | .\" $OpenBSD: strtoul.3,v 1.7 2000/04/20 13:50:03 aaron Exp $ |
37 | .\" | 37 | .\" |
38 | .Dd June 25, 1992 | 38 | .Dd June 25, 1992 |
39 | .Dt STRTOUL 3 | 39 | .Dt STRTOUL 3 |
@@ -55,16 +55,14 @@ | |||
55 | .Sh DESCRIPTION | 55 | .Sh DESCRIPTION |
56 | The | 56 | The |
57 | .Fn strtoul | 57 | .Fn strtoul |
58 | function | 58 | function converts the string in |
59 | converts the string in | ||
60 | .Fa nptr | 59 | .Fa nptr |
61 | to an | 60 | to an |
62 | .Li unsigned long | 61 | .Li unsigned long |
63 | value. | 62 | value. |
64 | The | 63 | The |
65 | .Fn strtouq | 64 | .Fn strtouq |
66 | function | 65 | function converts the string in |
67 | converts the string in | ||
68 | .Fa nptr | 66 | .Fa nptr |
69 | to a | 67 | to a |
70 | .Li u_quad_t | 68 | .Li u_quad_t |
@@ -84,11 +82,9 @@ or | |||
84 | sign. | 82 | sign. |
85 | If | 83 | If |
86 | .Fa base | 84 | .Fa base |
87 | is zero or 16, | 85 | is zero or 16, the string may then include a |
88 | the string may then include a | ||
89 | .Ql 0x | 86 | .Ql 0x |
90 | prefix, | 87 | prefix, and the number will be read in base 16; otherwise, a zero |
91 | and the number will be read in base 16; otherwise, a zero | ||
92 | .Fa base | 88 | .Fa base |
93 | is taken as 10 (decimal) unless the next character is | 89 | is taken as 10 (decimal) unless the next character is |
94 | .Ql 0 , | 90 | .Ql 0 , |
@@ -96,14 +92,12 @@ in which case it is taken as 8 (octal). | |||
96 | .Pp | 92 | .Pp |
97 | The remainder of the string is converted to an | 93 | The remainder of the string is converted to an |
98 | .Li unsigned long | 94 | .Li unsigned long |
99 | value in the obvious manner, | 95 | value in the obvious manner, stopping at the end of the string |
100 | stopping at the end of the string | ||
101 | or at the first character that does not produce a valid digit | 96 | or at the first character that does not produce a valid digit |
102 | in the given base. | 97 | in the given base. |
103 | (In bases above 10, the letter | 98 | (In bases above 10, the letter |
104 | .Ql A | 99 | .Ql A |
105 | in either upper or lower case | 100 | in either upper or lower case represents 10, |
106 | represents 10, | ||
107 | .Ql B | 101 | .Ql B |
108 | represents 11, and so forth, with | 102 | represents 11, and so forth, with |
109 | .Ql Z | 103 | .Ql Z |
@@ -111,7 +105,7 @@ representing 35.) | |||
111 | .Pp | 105 | .Pp |
112 | If | 106 | If |
113 | .Fa endptr | 107 | .Fa endptr |
114 | is non nil, | 108 | is non-null, |
115 | .Fn strtoul | 109 | .Fn strtoul |
116 | stores the address of the first invalid character in | 110 | stores the address of the first invalid character in |
117 | .Fa *endptr . | 111 | .Fa *endptr . |
@@ -133,8 +127,7 @@ on return, the entire string was valid.) | |||
133 | .Sh RETURN VALUES | 127 | .Sh RETURN VALUES |
134 | The | 128 | The |
135 | .Fn strtoul | 129 | .Fn strtoul |
136 | function | 130 | function returns the result of the conversion, |
137 | returns the result of the conversion, | ||
138 | unless the value would overflow, in which case | 131 | unless the value would overflow, in which case |
139 | .Dv ULONG_MAX | 132 | .Dv ULONG_MAX |
140 | is returned and | 133 | is returned and |
@@ -206,8 +199,7 @@ The given string was out of range; the value converted has been clamped. | |||
206 | .Sh STANDARDS | 199 | .Sh STANDARDS |
207 | The | 200 | The |
208 | .Fn strtoul | 201 | .Fn strtoul |
209 | function | 202 | function conforms to |
210 | conforms to | ||
211 | .St -ansiC . | 203 | .St -ansiC . |
212 | .Sh BUGS | 204 | .Sh BUGS |
213 | Ignores the current locale. | 205 | Ignores the current locale. |