1A64L(3P)                   POSIX Programmer's Manual                  A64L(3P)
2
3
4

PROLOG

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

NAME

12       a64l, l64a — convert between a 32-bit  integer  and  a  radix-64  ASCII
13       string
14

SYNOPSIS

16       #include <stdlib.h>
17
18       long a64l(const char *s);
19       char *l64a(long value);
20

DESCRIPTION

22       These  functions  maintain numbers stored in radix-64 ASCII characters.
23       This is a notation by which 32-bit integers can be represented by up to
24       six characters; each character represents a digit in radix-64 notation.
25       If the type long contains more than 32 bits, only the low-order 32 bits
26       shall be used for these operations.
27
28       The  characters  used to represent digits are '.'  (dot) for 0, '/' for
29       1, '0' through '9' for [2,11], 'A' through 'Z'  for  [12,37],  and  'a'
30       through 'z' for [38,63].
31
32       The  a64l() function shall take a pointer to a radix-64 representation,
33       in which the first digit is the least significant, and return the  cor‐
34       responding long value. If the string pointed to by s contains more than
35       six characters, a64l() shall use the first six. If the first six  char‐
36       acters  of  the string contain a null terminator, a64l() shall use only
37       characters preceding the null terminator.  The  a64l()  function  shall
38       scan the character string from left to right with the least significant
39       digit on the left, decoding each character as a 6-bit radix-64  number.
40       If  the  type  long  contains more than 32 bits, the resulting value is
41       sign-extended. The behavior of a64l() is unspecified if  s  is  a  null
42       pointer  or  the string pointed to by s was not generated by a previous
43       call to l64a().
44
45       The l64a() function shall take a long argument and return a pointer  to
46       the  corresponding  radix-64  representation. The behavior of l64a() is
47       unspecified if value is negative.
48
49       The value returned by l64a() may be a pointer  into  a  static  buffer.
50       Subsequent calls to l64a() may overwrite the buffer.
51
52       The l64a() function need not be thread-safe.
53

RETURN VALUE

55       Upon  successful completion, a64l() shall return the long value result‐
56       ing from conversion of the input string. If a string pointed to by s is
57       an empty string, a64l() shall return 0L.
58
59       The  l64a() function shall return a pointer to the radix-64 representa‐
60       tion. If value is 0L, l64a() shall return a pointer to an empty string.
61

ERRORS

63       No errors are defined.
64
65       The following sections are informative.
66

EXAMPLES

68       None.
69

APPLICATION USAGE

71       If  the  type  long  contains  more  than  32  bits,  the   result   of
72       a64l(l64a(x)) is x in the low-order 32 bits.
73

RATIONALE

75       This is not the same encoding as used by either encoding variant of the
76       uuencode utility.
77

FUTURE DIRECTIONS

79       None.
80

SEE ALSO

82       strtoul()
83
84       The Base Definitions volume of POSIX.1‐2017, <stdlib.h>
85
86       The Shell and Utilities volume of POSIX.1‐2017, uuencode
87
89       Portions of this text are reprinted and reproduced in  electronic  form
90       from  IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
91       table Operating System Interface (POSIX), The Open Group Base  Specifi‐
92       cations  Issue  7, 2018 Edition, Copyright (C) 2018 by the Institute of
93       Electrical and Electronics Engineers, Inc and The Open Group.   In  the
94       event of any discrepancy between this version and the original IEEE and
95       The Open Group Standard, the original IEEE and The Open Group  Standard
96       is  the  referee document. The original Standard can be obtained online
97       at http://www.opengroup.org/unix/online.html .
98
99       Any typographical or formatting errors that appear  in  this  page  are
100       most likely to have been introduced during the conversion of the source
101       files to man page format. To report such errors,  see  https://www.ker
102       nel.org/doc/man-pages/reporting_bugs.html .
103
104
105
106IEEE/The Open Group                  2017                             A64L(3P)
Impressum