a64l, l64a - Convert long integer and base-64 ASCII string
Standard C Library (libc.so, libc.a)
const char *s);
Interfaces documented on this reference page conform to industry standards as follows:
a64l(), l64a(): XPG4-UNIX
Refer to the standards(5) reference page for more information about industry standards and associated tags.
Specifies a pointer to a character string that is to be converted to a long integer. Specifies a long integer that is to be converted to a character string.
These functions are used to maintain numbers stored in base-64 ASCII characters. The a64l() function converts a character string to a long integer. The l64a() function converts a long integer to a character string.
On Tru64 UNIX systems, for which the data type long contains 64 bits, only the low-order 32 bits are used for these operations.
Each character used to store a long integer represents a numeric value from 0 through 63. Up to six characters may be used to represent a long integer.
The characters are translated as follows: A period (.) represents 0. A slash (/) represents 1. The numbers 0 through 9 represent 2 through 11. Uppercase letters A through Z represent 12 through 37. Lowercase letters a through z represent 38 through 63.
The a64l() function takes a pointer to a base-64 representation, in which the first digit is the least significant, and returns a corresponding long value. If the string pointed to by the s parameter exceeds six characters, a64l() uses only the first six. If the first six characters of the string contain a null terminator, a64l() uses only characters preceding the null terminator. A character string is translated from left to right with the least significant number on the left and each character is translated as a 6-bit base-64 number. The resulting value is sign-extended.
The l64a() function takes a long integer and returns a pointer to a corresponding base-64 notation of the least significant 32 bits.
[Digital] In applications that are compiled in an environment that excludes the _XOPEN_SOURCE_EXTENDED standard definitions, the behavior of the l64a() and a64l() functions differs from that described in this section as follows: Conversion operations use 64 bits. Up to 12 characters may be used to represent a long integer.
The value returned by l64a() is a pointer to a thread-specific buffer whose contents will be overwritten on subsequent calls from the same thread.
[Digital] The a64l() and l64a() functions belong to a small set of libc functions that are handled differently when compiled in the X/Open UNIX environment. In the X/Open UNIX environment, calls to these functions are internally renamed by prepending _E to the function name. The renaming is done only when there is an incompatible conflict between an existing version of the function and the version that conforms to the X/Open UNIX standard. The renaming strategy supports binary compatibility by allowing applications to compile in the X/Open UNIX environment and also link with site-specific and third-party libraries that use the old versions of the same libc interfaces. However, internal renaming of the calls affects how these calls are identified during debugging sessions. Therefore, when you are debugging a module that includes the a64l() and/or l64a() functions and for which _XOPEN_SOURCE_EXTENDED has been defined, use _Ea64l to refer to the a64l() call and _El64a to refer to the l64a call. See standards(5) for information on when the _XOPEN_SOURCE_EXTENDED macro is defined.
On successful completion, the a64l() function returns the long value resulting from conversion of the input string. If a string pointed to by the s parameter is an empty string, a64l() returns zero (0).
The l64a() function returns a pointer to the corresponding base-64 notation. If the l parameter is zero (0), l64a() returns a pointer to an empty string.
No errors are defined for this function.
Standards: standards(5) delim off