184 lines
3.9 KiB
HTML
184 lines
3.9 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of A64L</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>A64L</H1>
|
|
Section: Linux Programmer's Manual (3)<BR>Updated: 2016-03-15<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
a64l, l64a - convert between long and base-64
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>#include <<A HREF="file:///usr/include/stdlib.h">stdlib.h</A>></B>
|
|
|
|
<P>
|
|
|
|
<B>long a64l(const char *</B><I>str64</I><B>);</B>
|
|
|
|
<P>
|
|
|
|
<B>char *l64a(long </B><I>value</I><B>);</B>
|
|
|
|
<P>
|
|
|
|
|
|
Feature Test Macro Requirements for glibc (see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+feature_test_macros">feature_test_macros</A></B>(7)):
|
|
|
|
|
|
<P>
|
|
|
|
<B>a64l</B>(),
|
|
|
|
<B>l64a</B>():
|
|
|
|
<BR>
|
|
|
|
<DL COMPACT><DT id="1"><DD>
|
|
|
|
_XOPEN_SOURCE >= 500
|
|
|
|
<BR> || /* Glibc since 2.19: */ _DEFAULT_SOURCE
|
|
<BR> || /* Glibc versions <= 2.19: */ _SVID_SOURCE
|
|
</DL>
|
|
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
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
|
|
<B>a64l</B>()
|
|
|
|
has length greater than six, only the first six bytes are used.
|
|
If the type
|
|
<I>long</I>
|
|
|
|
has more than 32 bits, then
|
|
<B>l64a</B>()
|
|
|
|
uses only the low order 32 bits of
|
|
<I>value</I>,
|
|
|
|
and
|
|
<B>a64l</B>()
|
|
|
|
sign-extends its 32-bit result.
|
|
<P>
|
|
|
|
The 64 digits in the base-64 system are:
|
|
<P>
|
|
|
|
<DL COMPACT><DT id="2"><DD>
|
|
<PRE>
|
|
'.' represents a 0
|
|
'/' represents a 1
|
|
0-9 represent 2-11
|
|
A-Z represent 12-37
|
|
a-z represent 38-63
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
So 123 = 59*64^0 + 1*64^1 = "v/".
|
|
<A NAME="lbAE"> </A>
|
|
<H2>ATTRIBUTES</H2>
|
|
|
|
For an explanation of the terms used in this section, see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+attributes">attributes</A></B>(7).
|
|
|
|
<TABLE BORDER>
|
|
<TR VALIGN=top><TD><B>Interface</B></TD><TD><B>Attribute</B></TD><TD><B>Value</B><BR></TD></TR>
|
|
<TR VALIGN=top><TD>
|
|
<B>l64a</B>()
|
|
|
|
</TD><TD>Thread safety</TD><TD>MT-Unsafe race:l64a<BR></TD></TR>
|
|
<TR VALIGN=top><TD>
|
|
<B>a64l</B>()
|
|
|
|
</TD><TD>Thread safety</TD><TD>MT-Safe<BR></TD></TR>
|
|
</TABLE>
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H2>CONFORMING TO</H2>
|
|
|
|
POSIX.1-2001, POSIX.1-2008.
|
|
<A NAME="lbAG"> </A>
|
|
<H2>NOTES</H2>
|
|
|
|
The value returned by
|
|
<B>l64a</B>()
|
|
|
|
may be a pointer to a static buffer, possibly overwritten
|
|
by later calls.
|
|
<P>
|
|
|
|
The behavior of
|
|
<B>l64a</B>()
|
|
|
|
is undefined when
|
|
<I>value</I>
|
|
|
|
is negative.
|
|
If
|
|
<I>value</I>
|
|
|
|
is zero, it returns an empty string.
|
|
<P>
|
|
|
|
These functions are broken in glibc before 2.2.5
|
|
(puts most significant digit first).
|
|
<P>
|
|
|
|
This is not the encoding used by
|
|
<B><A HREF="/cgi-bin/man/man2html?1+uuencode">uuencode</A></B>(1).
|
|
|
|
<A NAME="lbAH"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+uuencode">uuencode</A></B>(1),
|
|
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?3+strtoul">strtoul</A></B>(3)
|
|
|
|
<A NAME="lbAI"> </A>
|
|
<H2>COLOPHON</H2>
|
|
|
|
This page is part of release 5.05 of the Linux
|
|
<I>man-pages</I>
|
|
|
|
project.
|
|
A description of the project,
|
|
information about reporting bugs,
|
|
and the latest version of this page,
|
|
can be found at
|
|
<A HREF="https://www.kernel.org/doc/man-pages/.">https://www.kernel.org/doc/man-pages/.</A>
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="3"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="4"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="5"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="6"><A HREF="#lbAE">ATTRIBUTES</A><DD>
|
|
<DT id="7"><A HREF="#lbAF">CONFORMING TO</A><DD>
|
|
<DT id="8"><A HREF="#lbAG">NOTES</A><DD>
|
|
<DT id="9"><A HREF="#lbAH">SEE ALSO</A><DD>
|
|
<DT id="10"><A HREF="#lbAI">COLOPHON</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:35 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|