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