1a64l(3C)                 Standard C Library Functions                 a64l(3C)
2
3
4

NAME

6       a64l, l64a - convert between long integer and base-64 ASCII string
7

SYNOPSIS

9       #include <stdlib.h>
10
11       long a64l(const char *s);
12
13
14       char *l64a(long l);
15
16

DESCRIPTION

18       These  functions  maintain  numbers  stored in base-64 ASCII characters
19       that define a notation by which long integers can be represented by  up
20       to  six  characters.  Each character represents a "digit" in a radix-64
21       notation.
22
23
24       The characters used to represent "digits" are as follows:
25
26
27
28
29       ┌─────────────────────────────┬─────────────────────────────┐
30       │Character                    │ Digit                       │
31       ├─────────────────────────────┼─────────────────────────────┤
32.                            0                           
33/                            1                           
340-9                          2-11                        
35A-Z                          12-37                       
36a-z                          38-63                       
37       └─────────────────────────────┴─────────────────────────────┘
38
39
40       The a64l() function takes a pointer to a null-terminated base-64 repre‐
41       sentation  and  returns  a  corresponding  long  value.   If the string
42       pointed to by s contains more than  six  characters,  a64l()  uses  the
43       first six.
44
45
46       The  a64l() function scans the character string from left to right with
47       the least significant digit on the left, decoding each character  as  a
48       6-bit radix-64 number.
49
50
51       The  l64a() function takes a long argument and returns a pointer to the
52       corresponding base-64 representation. If  the  argument  is  0,  l64a()
53       returns a pointer to a null string.
54
55
56       The  value  returned  by  l64a() is a pointer into a static buffer, the
57       contents of which are overwritten by each call.  In the case of  multi‐
58       threaded applications, the return value is a pointer to thread specific
59       data.
60

ATTRIBUTES

62       See attributes(5) for descriptions of the following attributes:
63
64
65
66
67       ┌─────────────────────────────┬─────────────────────────────┐
68ATTRIBUTE TYPE         ATTRIBUTE VALUE        
69       ├─────────────────────────────┼─────────────────────────────┤
70       │Interface Stability          │Standard                     │
71       ├─────────────────────────────┼─────────────────────────────┤
72       │MT-Level                     │MT-Safe                      │
73       └─────────────────────────────┴─────────────────────────────┘
74

SEE ALSO

76       attributes(5), standards(5)
77
78
79
80SunOS 5.11                        24 Jul 2002                         a64l(3C)
Impressum