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