Section: POSIX Programmer's Manual (3P)
This manual page is part of the POSIX Programmer's Manual.
The Linux implementation of this interface may differ (consult
the corresponding Linux manual page for details of Linux behavior),
or the interface may not be implemented on Linux.
--- convert between a 32-bit integer and a radix-64 ASCII string
long a64l(const char *s);
char *l64a(long value);
These functions maintain numbers stored in radix-64 ASCII
characters. This is a notation by which 32-bit integers can be
represented by up to six characters; each character represents a digit
in radix-64 notation. If the type
contains more than 32 bits, only the low-order 32 bits shall be used for
The characters used to represent digits are
(dot) for 0,
for [12,37], and
function shall take a pointer to a radix-64 representation, in which
the first digit is the least significant, and return the corresponding
value. If the string pointed to by
contains more than six characters,
shall use the first six. If the first six characters of the string
contain a null terminator,
shall use only characters preceding the null terminator. The
function shall scan the character string from left to right with the
least significant digit on the left, decoding each character as a 6-bit
radix-64 number. If the type
contains more than 32 bits, the resulting value is sign-extended. The
is unspecified if
is a null pointer or the string pointed to by
was not generated by a previous call to
function shall take a
argument and return a pointer to the corresponding radix-64
representation. The behavior of
is unspecified if
The value returned by
may be a pointer into a static buffer. Subsequent calls to
may overwrite the buffer.
function need not be thread-safe.
Upon successful completion,
shall return the
value resulting from conversion of the input string. If a string
pointed to by
is an empty string,
shall return 0L.
function shall return a pointer to the radix-64 representation. If
shall return a pointer to an empty string.
No errors are defined.
The following sections are informative.
If the type
contains more than 32 bits, the result of
in the low-order 32 bits.
This is not the same encoding as used by either encoding variant
The Base Definitions volume of POSIX.1-2017,
The Shell and Utilities volume of POSIX.1-2017,
Portions of this text are reprinted and reproduced in electronic form
from IEEE Std 1003.1-2017, Standard for Information Technology
-- Portable Operating System Interface (POSIX), The Open Group Base
Specifications Issue 7, 2018 Edition,
Copyright (C) 2018 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group.
In the event of any discrepancy between this version and the original IEEE and
The Open Group Standard, the original IEEE and The Open Group Standard
is the referee document. The original Standard can be obtained online at
Any typographical or formatting errors that appear
in this page are most likely
to have been introduced during the conversion of the source files to
man page format. To report such errors, see