diff options
author | aaron <> | 1999-06-29 18:36:24 +0000 |
---|---|---|
committer | aaron <> | 1999-06-29 18:36:24 +0000 |
commit | 5771e6280ed94b6457e5db9facb5899254e4fb7f (patch) | |
tree | 95397a7ed19a0cddf5a2ebb73dee20cf20fe2c29 /src/lib/libc/stdlib/a64l.3 | |
parent | 403f5844d16c63a63b8ce33a354e4871cb93df4c (diff) | |
download | openbsd-5771e6280ed94b6457e5db9facb5899254e4fb7f.tar.gz openbsd-5771e6280ed94b6457e5db9facb5899254e4fb7f.tar.bz2 openbsd-5771e6280ed94b6457e5db9facb5899254e4fb7f.zip |
first round of repairs on stdlib
Diffstat (limited to 'src/lib/libc/stdlib/a64l.3')
-rw-r--r-- | src/lib/libc/stdlib/a64l.3 | 59 |
1 files changed, 40 insertions, 19 deletions
diff --git a/src/lib/libc/stdlib/a64l.3 b/src/lib/libc/stdlib/a64l.3 index 0607338cba..1074dbff2e 100644 --- a/src/lib/libc/stdlib/a64l.3 +++ b/src/lib/libc/stdlib/a64l.3 | |||
@@ -24,7 +24,7 @@ | |||
24 | .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | 24 | .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF |
25 | .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | .\" | 26 | .\" |
27 | .\" $OpenBSD: a64l.3,v 1.3 1999/02/27 21:55:53 deraadt Exp $ | 27 | .\" $OpenBSD: a64l.3,v 1.4 1999/06/29 18:36:15 aaron Exp $ |
28 | .\" | 28 | .\" |
29 | .Dd August 17, 1997 | 29 | .Dd August 17, 1997 |
30 | .Dt A64L 3 | 30 | .Dt A64L 3 |
@@ -45,19 +45,36 @@ The | |||
45 | and | 45 | and |
46 | .Fn l64a | 46 | .Fn l64a |
47 | functions are used to maintain numbers stored in radix-64 | 47 | functions are used to maintain numbers stored in radix-64 |
48 | ASCII characters. This is a notation by which 32-bit integers | 48 | .Tn ASCII |
49 | characters. This is a notation by which 32-bit integers | ||
49 | can be represented by up to six characters; each character | 50 | can be represented by up to six characters; each character |
50 | represents a "digit" in a radix-64 notation. | 51 | represents a |
52 | .Dq digit | ||
53 | in a radix-64 notation. | ||
51 | .Pp | 54 | .Pp |
52 | The characters used to represent "digits" are '.' for 0, '/' for 1, | 55 | The characters used to represent digits are |
53 | '0' through '9' for 2-11, 'A' through 'Z' for 12-37, and 'a' through | 56 | .Ql \&. |
54 | 'z' for 38-63. | 57 | for 0, |
58 | .Ql / | ||
59 | for 1, | ||
60 | .Ql 0 | ||
61 | through | ||
62 | .Ql 9 | ||
63 | for 2-11, | ||
64 | .Ql A | ||
65 | through | ||
66 | .Ql Z | ||
67 | for 12-37, and | ||
68 | .Ql a | ||
69 | through | ||
70 | .Ql z | ||
71 | for 38-63. | ||
55 | .Pp | 72 | .Pp |
56 | The | 73 | The |
57 | .Fn a64l | 74 | .Fn a64l |
58 | function takes a pointer to a null-terminated radix-64 representation | 75 | function takes a pointer to a null-terminated radix-64 representation |
59 | and returns a corresponding 32-bit value. If the string pointed to by | 76 | and returns a corresponding 32-bit value. If the string pointed to by |
60 | .Ar s | 77 | .Fa s |
61 | contains more than six characters, | 78 | contains more than six characters, |
62 | .Fn a64l | 79 | .Fn a64l |
63 | will use the first six. | 80 | will use the first six. |
@@ -68,35 +85,39 @@ larger than 32 bits, the return value will be sign-extended. | |||
68 | .Pp | 85 | .Pp |
69 | .Fn l64a | 86 | .Fn l64a |
70 | takes a long integer argument | 87 | takes a long integer argument |
71 | .Ar l | 88 | .Fa l |
72 | and returns a pointer to the corresponding radix-64 representation. | 89 | and returns a pointer to the corresponding radix-64 representation. |
73 | .Sh RETURN VALUES | 90 | .Sh RETURN VALUES |
74 | On success, | 91 | On success, |
75 | .Fn a64l | 92 | .Fn a64l |
76 | returns a 32-bit representation of | 93 | returns a 32-bit representation of |
77 | .Ar s . | 94 | .Fa s . |
78 | If | 95 | If |
79 | .Ar s | 96 | .Fa s |
80 | is a NULL pointer or if it contains "digits" other than those described above, | 97 | is a null pointer or if it contains digits other than those described above. |
81 | .Fn a64l | 98 | .Fn a64l |
82 | returns -1L and sets the global variable errno to | 99 | returns \-1 and sets the global variable |
83 | .Va EINVAL . | 100 | .Va errno |
101 | to | ||
102 | .Er EINVAL . | ||
84 | .Pp | 103 | .Pp |
85 | On success, | 104 | On success, |
86 | .Fn l64a | 105 | .Fn l64a |
87 | returns a pointer to a string containing the radix-64 representation of | 106 | returns a pointer to a string containing the radix-64 representation of |
88 | .Ar l . | 107 | .Fa l . |
89 | If | 108 | If |
90 | .Ar l | 109 | .Fa l |
91 | is 0, | 110 | is 0, |
92 | .Fn l64a | 111 | .Fn l64a |
93 | returns a pointer to the empty string. | 112 | returns a pointer to the empty string. |
94 | If | 113 | If |
95 | .Ar l | 114 | .Fa l |
96 | is negative, | 115 | is negative, |
97 | .Fn l64a | 116 | .Fn l64a |
98 | returns a NULL pointer and sets the global variable errno to | 117 | returns a null pointer and sets the global variable |
99 | .Va EINVAL . | 118 | .Va errno |
119 | to | ||
120 | .Er EINVAL . | ||
100 | .Sh WARNINGS | 121 | .Sh WARNINGS |
101 | The value returned by | 122 | The value returned by |
102 | .Fn l64a | 123 | .Fn l64a |
@@ -115,7 +136,7 @@ If a long integer is larger than 32 bits, only the low-order | |||
115 | 32 bits are used. | 136 | 32 bits are used. |
116 | .Sh STANDARDS | 137 | .Sh STANDARDS |
117 | The | 138 | The |
118 | .Fn a64l | 139 | .Fn a64l |
119 | and | 140 | and |
120 | .Fn l64a | 141 | .Fn l64a |
121 | functions conform to | 142 | functions conform to |