a64l(), l64a()

maintain numbers stored in radix-64 ASCII characters 

Function


SYNOPSIS

#include <stdlib.h>

long a64l(const char *s);

char *l64a(long value);


DESCRIPTION

The a64l() and l64a() functions are used to 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. The characters used to represent digits are '.' for 0, '/' for 1, '0' through '9' for 2-11, 'A' through 'Z' for 12-37, and 'a' through 'z' for 38-63.

The a64l() function takes a pointer to a radix-64 representation, in which the first digit is the least significant, and returns a corresponding long value. If the string contains more than six characters, a64l() uses the first six. If the first six characters of the string contain a null terminator, a64l() uses only characters preceding the null terminator. The a64l() function scans 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. The behavior of a64l() is unspecified if the specified pointer is null or the string was not generated by a previous call to l64a().

The l64a() function takes a long argument and returns a pointer to the corresponding radix-64 representation. The behavior of l64a() is unspecified if the specified value is negative.


PARAMETERS

s 

Points to a string containing an encoded radix-64 number.

value 

A number to be encoded into radix-64.


RETURN VALUES

On success, a64l() returns the long value resulting from conversion of the input string. If the string is an empty string, a64l() returns 0.

On success, l64a() returns a pointer to the radix-64 representation. If value is 0, l64a() returns a pointer to an empty string. The pointer returned by l64a() refers to a static buffer. Subsequent calls to l64a() overwrite this buffer.


CONFORMANCE

UNIX 98.


MULTITHREAD SAFETY LEVEL

a64l(): MT-Safe.

l64a(): Unsafe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


PTC MKS Toolkit 10.3 Documentation Build 39.