]>
Commit | Line | Data |
---|---|---|
a73e75e2 | 1 | \t |
fea681da | 2 | .\" Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de) |
2297bf0e | 3 | .\" |
38f20bb9 | 4 | .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE) |
fea681da | 5 | .\" Distributed under GPL |
38f20bb9 | 6 | .\" %%%LICENSE_END |
fea681da MK |
7 | .\" |
8 | .\" Corrected, aeb, 2002-05-30 | |
9 | .\" | |
97986708 | 10 | .TH A64L 3 2016-03-15 "" "Linux Programmer's Manual" |
fea681da | 11 | .SH NAME |
c13182ef | 12 | a64l, l64a \- convert between long and base-64 |
fea681da MK |
13 | .SH SYNOPSIS |
14 | .B #include <stdlib.h> | |
68e4db0a | 15 | .PP |
06024da0 | 16 | .BI "long a64l(const char *" str64 ); |
68e4db0a | 17 | .PP |
fea681da | 18 | .BI "char *l64a(long " value ); |
68e4db0a | 19 | .PP |
cc4615cc MK |
20 | .in -4n |
21 | Feature Test Macro Requirements for glibc (see | |
22 | .BR feature_test_macros (7)): | |
23 | .in | |
68e4db0a | 24 | .PP |
cc4615cc MK |
25 | .BR a64l (), |
26 | .BR l64a (): | |
48ceacc2 MK |
27 | .br |
28 | .RS 4 | |
29 | .ad l | |
2b1b0424 | 30 | _XOPEN_SOURCE\ >=\ 500 |
cf7fa0a1 | 31 | .\" || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED |
2b1b0424 MK |
32 | || /* Glibc since 2.19: */ _DEFAULT_SOURCE |
33 | || /* Glibc versions <= 2.19: */ _SVID_SOURCE | |
48ceacc2 MK |
34 | .RE |
35 | .ad | |
fea681da MK |
36 | .SH DESCRIPTION |
37 | These functions provide a conversion between 32-bit long integers | |
38 | and little-endian base-64 ASCII strings (of length zero to six). | |
39 | If the string used as argument for | |
40 | .BR a64l () | |
41 | has length greater than six, only the first six bytes are used. | |
e3e25559 MK |
42 | If the type |
43 | .I long | |
44 | has more than 32 bits, then | |
fea681da MK |
45 | .BR l64a () |
46 | uses only the low order 32 bits of | |
47 | .IR value , | |
48 | and | |
49 | .BR a64l () | |
50 | sign-extends its 32-bit result. | |
dd3568a1 | 51 | .PP |
f00d425b | 52 | The 64 digits in the base-64 system are: |
207050fa | 53 | .PP |
fea681da MK |
54 | .RS |
55 | .nf | |
f81fb444 MK |
56 | \&\(aq.\(aq represents a 0 |
57 | \&\(aq/\(aq represents a 1 | |
fea681da MK |
58 | 0-9 represent 2-11 |
59 | A-Z represent 12-37 | |
60 | a-z represent 38-63 | |
61 | .fi | |
62 | .RE | |
207050fa | 63 | .PP |
fea681da | 64 | So 123 = 59*64^0 + 1*64^1 = "v/". |
20d546ab | 65 | .SH ATTRIBUTES |
a73e75e2 MK |
66 | For an explanation of the terms used in this section, see |
67 | .BR attributes (7). | |
68 | .TS | |
69 | allbox; | |
70 | lb lb lb | |
71 | l l l. | |
72 | Interface Attribute Value | |
73 | T{ | |
20d546ab | 74 | .BR l64a () |
9d9d2572 | 75 | T} Thread safety MT-Unsafe race:l64a |
a73e75e2 | 76 | T{ |
20d546ab | 77 | .BR a64l () |
a73e75e2 MK |
78 | T} Thread safety MT-Safe |
79 | .TE | |
47297adb | 80 | .SH CONFORMING TO |
6a5e713d | 81 | POSIX.1-2001, POSIX.1-2008. |
fea681da MK |
82 | .SH NOTES |
83 | The value returned by | |
4c626751 | 84 | .BR l64a () |
fea681da MK |
85 | may be a pointer to a static buffer, possibly overwritten |
86 | by later calls. | |
dd3568a1 | 87 | .PP |
d9bfdb9c | 88 | The behavior of |
fea681da MK |
89 | .BR l64a () |
90 | is undefined when | |
91 | .I value | |
c13182ef MK |
92 | is negative. |
93 | If | |
fea681da MK |
94 | .I value |
95 | is zero, it returns an empty string. | |
dd3568a1 | 96 | .PP |
fea681da MK |
97 | These functions are broken in glibc before 2.2.5 |
98 | (puts most significant digit first). | |
dd3568a1 | 99 | .PP |
fea681da MK |
100 | This is not the encoding used by |
101 | .BR uuencode (1). | |
47297adb | 102 | .SH SEE ALSO |
fea681da | 103 | .BR uuencode (1), |
a91665ff | 104 | .\" .BR itoa (3), |
fea681da | 105 | .BR strtoul (3) |