A64L(3)                    POSIX Programmer's Manual                   A64L(3)



PPRROOLLOOGG
       This manual page is part of the POSIX Programmer's Manual.  The OS
       implementation of this interface may differ (consult the corresponding
       OS manual page for details of OS behavior), or the interface may not be
       implemented on OS.

NNAAMMEE
       a64l, l64a -- convert between a 32-bit integer and a radix-64 ASCII
       string

SSYYNNOOPPSSIISS
       #include <stdlib.h>

       long a64l(const char *_s);
       char *l64a(long _v_a_l_u_e);

DDEESSCCRRIIPPTTIIOONN
       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 lloonngg contains more than 32 bits, only the low-order 32 bits
       shall be used for these operations.

       The characters used to represent digits are ''..''  (dot) for 0, ''//'' for
       1, ''00'' through ''99'' for [2,11], ''AA'' through ''ZZ'' for [12,37], and ''aa''
       through ''zz'' for [38,63].

       The _a_6_4_l() function shall take a pointer to a radix-64 representation,
       in which the first digit is the least significant, and return the
       corresponding lloonngg value. If the string pointed to by _s contains more
       than six characters, _a_6_4_l() shall use the first six. If the first six
       characters of the string contain a null terminator, _a_6_4_l() shall use
       only characters preceding the null terminator. The _a_6_4_l() 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 lloonngg contains more than 32 bits, the
       resulting value is sign-extended. The behavior of _a_6_4_l() is unspecified
       if _s is a null pointer or the string pointed to by _s was not generated
       by a previous call to _l_6_4_a().

       The _l_6_4_a() function shall take a lloonngg argument and return a pointer to
       the corresponding radix-64 representation. The behavior of _l_6_4_a() is
       unspecified if _v_a_l_u_e is negative.

       The value returned by _l_6_4_a() may be a pointer into a static buffer.
       Subsequent calls to _l_6_4_a() may overwrite the buffer.

       The _l_6_4_a() function need not be thread-safe.

RREETTUURRNN VVAALLUUEE
       Upon successful completion, _a_6_4_l() shall return the lloonngg value
       resulting from conversion of the input string. If a string pointed to
       by _s is an empty string, _a_6_4_l() shall return 0L.

       The _l_6_4_a() function shall return a pointer to the radix-64
       representation. If _v_a_l_u_e is 0L, _l_6_4_a() shall return a pointer to an
       empty string.

EERRRROORRSS
       No errors are defined.

       _T_h_e _f_o_l_l_o_w_i_n_g _s_e_c_t_i_o_n_s _a_r_e _i_n_f_o_r_m_a_t_i_v_e_.

EEXXAAMMPPLLEESS
       None.

AAPPPPLLIICCAATTIIOONN UUSSAAGGEE
       If the type lloonngg contains more than 32 bits, the result of
       _a_6_4_l(_l_6_4_a(_x)) is _x in the low-order 32 bits.

RRAATTIIOONNAALLEE
       This is not the same encoding as used by either encoding variant of the
       _u_u_e_n_c_o_d_e utility.

FFUUTTUURREE DDIIRREECCTTIIOONNSS
       None.

SSEEEE AALLSSOO
       _s_t_r_t_o_u_l()

       The Base Definitions volume of POSIX.1-2017, <<ssttddlliibb..hh>>

       The Shell and Utilities volume of POSIX.1-2017, _u_u_e_n_c_o_d_e

CCOOPPYYRRIIGGHHTT
       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 http://www.opengroup.org/unix/online.html .

       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
       https://www.kernel.org/doc/man-pages/reporting_bugs.html .



IEEE/The Open Group                  2017                              A64L(3)
