]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/a64l.3
fanotify_init.2, fanotify.7: Document FAN_REPORT_TID
[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.\"
97986708 10.TH A64L 3 2016-03-15 "" "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>
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
21Feature 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
37These functions provide a conversion between 32-bit long integers
38and little-endian base-64 ASCII strings (of length zero to six).
39If the string used as argument for
40.BR a64l ()
41has length greater than six, only the first six bytes are used.
e3e25559
MK
42If the type
43.I long
44has more than 32 bits, then
fea681da
MK
45.BR l64a ()
46uses only the low order 32 bits of
47.IR value ,
48and
49.BR a64l ()
50sign-extends its 32-bit result.
dd3568a1 51.PP
f00d425b 52The 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
580-9 represent 2-11
59A-Z represent 12-37
60a-z represent 38-63
61.fi
62.RE
207050fa 63.PP
fea681da 64So 123 = 59*64^0 + 1*64^1 = "v/".
20d546ab 65.SH ATTRIBUTES
a73e75e2
MK
66For an explanation of the terms used in this section, see
67.BR attributes (7).
68.TS
69allbox;
70lb lb lb
71l l l.
72Interface Attribute Value
73T{
20d546ab 74.BR l64a ()
9d9d2572 75T} Thread safety MT-Unsafe race:l64a
a73e75e2 76T{
20d546ab 77.BR a64l ()
a73e75e2
MK
78T} Thread safety MT-Safe
79.TE
47297adb 80.SH CONFORMING TO
6a5e713d 81POSIX.1-2001, POSIX.1-2008.
fea681da
MK
82.SH NOTES
83The value returned by
4c626751 84.BR l64a ()
fea681da
MK
85may be a pointer to a static buffer, possibly overwritten
86by later calls.
dd3568a1 87.PP
d9bfdb9c 88The behavior of
fea681da
MK
89.BR l64a ()
90is undefined when
91.I value
c13182ef
MK
92is negative.
93If
fea681da
MK
94.I value
95is zero, it returns an empty string.
dd3568a1 96.PP
fea681da
MK
97These functions are broken in glibc before 2.2.5
98(puts most significant digit first).
dd3568a1 99.PP
fea681da
MK
100This 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)