]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/a64l.3
Added/updated glibc feature test macro requirements
[thirdparty/man-pages.git] / man3 / a64l.3
CommitLineData
fea681da
MK
1.\" Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de)
2.\" Distributed under GPL
3.\"
4.\" Corrected, aeb, 2002-05-30
5.\"
cc4615cc 6.TH A64L 3 2007-07-26 "" "Linux Programmer's Manual"
fea681da 7.SH NAME
c13182ef 8a64l, l64a \- convert between long and base-64
fea681da
MK
9.SH SYNOPSIS
10.B #include <stdlib.h>
11.sp
12.BI "long a64l(char *" str64 );
13.sp
14.BI "char *l64a(long " value );
cc4615cc
MK
15.sp
16.in -4n
17Feature Test Macro Requirements for glibc (see
18.BR feature_test_macros (7)):
19.in
20.sp
21.BR a64l (),
22.BR l64a ():
23_SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500
fea681da
MK
24.SH DESCRIPTION
25These functions provide a conversion between 32-bit long integers
26and little-endian base-64 ASCII strings (of length zero to six).
27If the string used as argument for
28.BR a64l ()
29has length greater than six, only the first six bytes are used.
e3e25559
MK
30If the type
31.I long
32has more than 32 bits, then
fea681da
MK
33.BR l64a ()
34uses only the low order 32 bits of
35.IR value ,
36and
37.BR a64l ()
38sign-extends its 32-bit result.
39.LP
40The 64 digits in the base 64 system are:
41.RS
42.nf
cf0a9ace 43
fea681da
MK
44\&'.' represents a 0
45\&'/' represents a 1
460-9 represent 2-11
47A-Z represent 12-37
48a-z represent 38-63
cf0a9ace 49
fea681da
MK
50.fi
51.RE
fea681da 52So 123 = 59*64^0 + 1*64^1 = "v/".
2b2581ee
MK
53.SH "CONFORMING TO"
54POSIX.1-2001.
fea681da
MK
55.SH NOTES
56The value returned by
57.BR a64l ()
58may be a pointer to a static buffer, possibly overwritten
59by later calls.
60.LP
d9bfdb9c 61The behavior of
fea681da
MK
62.BR l64a ()
63is undefined when
64.I value
c13182ef
MK
65is negative.
66If
fea681da
MK
67.I value
68is zero, it returns an empty string.
69.LP
70These functions are broken in glibc before 2.2.5
71(puts most significant digit first).
72.LP
73This is not the encoding used by
74.BR uuencode (1).
fea681da
MK
75.SH "SEE ALSO"
76.BR uuencode (1),
a91665ff 77.\" .BR itoa (3),
fea681da 78.BR strtoul (3)