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