a64l(3) — Subroutines
NAME
a64l, l64a − converts long integer and base-64 ASCII string
LIBRARY
Standard C Library (libc.a)
SYNOPSIS
#include <stdlib.h>
long a64l (
const char ∗s);
char ∗l64a (
long l);
PARAMETERS
sSpecifies a pointer to a character string that is to be converted to a long integer.
lSpecifies a long integer that is to be converted to a character string.
DESCRIPTION
The a64l function converts a character string to a long integer. The l64a function converts a long integer to a character string. Using these functions provides you the ability to manipulate and store numbers as base-64 ASCII characters.
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 27.
•Lowercase letters a through z represent 38 through 63.
If the string pointed to by the s parameter exceeds six characters, the a64l function uses only the first six. 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 radix-64 number.
If the l parameter is used, the l64a parameter returns a pointer to the corresponding base-64 notation. If the argument is zero (0), the l64 function returns a pointer to a null string.
RETURN VALUES
The a64l function returns a long value on success.
the l64a function returns a pointer to a static buffer whose contents are overwritten with each call. the contents of
ERRORS
No errors are defined for this function.