+\t
.\" Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
.\" Distributed under GPL
+.\" %%%LICENSE_END
.\"
.\" Corrected, aeb, 2002-05-30
.\"
-.TH A64L 3 2002-02-15 "" "Linux Programmer's Manual"
+.TH A64L 3 2016-03-15 "" "Linux Programmer's Manual"
.SH NAME
-a64l, l64a \- convert between long and base-64
+a64l, l64a \- convert between long and base-64
.SH SYNOPSIS
.B #include <stdlib.h>
.sp
-.BI "long a64l(char *" str64 );
+.BI "long a64l(const char *" str64 );
.sp
.BI "char *l64a(long " value );
.sp
+.in -4n
+Feature Test Macro Requirements for glibc (see
+.BR feature_test_macros (7)):
+.in
+.sp
+.BR a64l (),
+.BR l64a ():
+.br
+.RS 4
+.ad l
+_XOPEN_SOURCE\ >=\ 500
+.\" || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
+ || /* Glibc since 2.19: */ _DEFAULT_SOURCE
+ || /* Glibc versions <= 2.19: */ _SVID_SOURCE
+.RE
+.ad
.SH DESCRIPTION
These functions provide a conversion between 32-bit long integers
and little-endian base-64 ASCII strings (of length zero to six).
If the string used as argument for
.BR a64l ()
has length greater than six, only the first six bytes are used.
-If longs have more than 32 bits, then
+If the type
+.I long
+has more than 32 bits, then
.BR l64a ()
uses only the low order 32 bits of
.IR value ,
.BR a64l ()
sign-extends its 32-bit result.
.LP
-The 64 digits in the base 64 system are:
+The 64 digits in the base-64 system are:
.RS
.nf
-\&'.' represents a 0
-\&'/' represents a 1
+
+\&\(aq.\(aq represents a 0
+\&\(aq/\(aq represents a 1
0-9 represent 2-11
A-Z represent 12-37
a-z represent 38-63
+
.fi
.RE
-.br
So 123 = 59*64^0 + 1*64^1 = "v/".
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lb lb lb
+l l l.
+Interface Attribute Value
+T{
+.BR l64a ()
+T} Thread safety MT-Unsafe race:l64a
+T{
+.BR a64l ()
+T} Thread safety MT-Safe
+.TE
+.SH CONFORMING TO
+POSIX.1-2001, POSIX.1-2008.
.SH NOTES
The value returned by
-.BR a64l ()
+.BR l64a ()
may be a pointer to a static buffer, possibly overwritten
by later calls.
.LP
-The behaviour of
+The behavior of
.BR l64a ()
is undefined when
.I value
-is negative. If
+is negative.
+If
.I value
is zero, it returns an empty string.
.LP
.LP
This is not the encoding used by
.BR uuencode (1).
-.SH "CONFORMING TO"
-XPG 4.2, POSIX 1003.1-2001.
-.SH "SEE ALSO"
+.SH SEE ALSO
.BR uuencode (1),
-.BR itoa (3),
+.\" .BR itoa (3),
.BR strtoul (3)