nightly: remove unused BINARCHIVE
[unleashed.git] / share / man / man3c / a64l.3c
blob7cf18d0f6c5dca3c00c050354e4ae6f4c63d9fe4
1 '\" te
2 .\" Copyright (c) 2007, Sun Microsystems, Inc.  All Rights Reserved
3 .\" Copyright 1989 AT&T
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH A64L 3C "Jul 24, 2002"
8 .SH NAME
9 a64l, l64a \- convert between long integer and base-64 ASCII string
10 .SH SYNOPSIS
11 .LP
12 .nf
13 #include <stdlib.h>
15 \fBlong\fR \fBa64l\fR(\fBconst char *\fR\fIs\fR);
16 .fi
18 .LP
19 .nf
20 \fBchar *\fR\fBl64a\fR(\fBlong\fR \fIl\fR);
21 .fi
23 .SH DESCRIPTION
24 .sp
25 .LP
26 These functions maintain numbers stored in base-64 \fBASCII\fR characters that
27 define a notation by which long integers can be represented by up to six
28 characters. Each character represents a "digit" in a radix-64 notation.
29 .sp
30 .LP
31 The characters used to represent "digits" are as follows:
32 .sp
34 .sp
35 .TS
36 box;
37 l | l
38 l | l .
39 Character       Digit
41 \fB\&.\fR       \fB0\fR
42 \fB/\fR \fB1\fR 
43 \fB0-9\fR       \fB2-11\fR      
44 \fBA-Z\fR       \fB12-37\fR
45 \fBa-z\fR       \fB38-63\fR
46 .TE
48 .sp
49 .LP
50 The \fBa64l()\fR function takes a pointer to a null-terminated base-64
51 representation and returns a corresponding \fBlong\fR value.  If the string
52 pointed to by \fIs\fR contains more than six characters, \fBa64l()\fR uses the
53 first six.
54 .sp
55 .LP
56 The \fBa64l()\fR function scans the character string from left to right with
57 the least significant digit on the left, decoding each character as a 6-bit
58 radix-64 number.
59 .sp
60 .LP
61 The \fBl64a()\fR function takes a \fBlong\fR argument and returns a pointer to
62 the corresponding base-64 representation. If the argument is 0, \fBl64a()\fR
63 returns a pointer to a null string.
64 .sp
65 .LP
66 The value returned by \fBl64a()\fR is a pointer into a static buffer, the
67 contents of which are overwritten by each call.  In the case of multithreaded
68 applications, the return value is a pointer to thread specific data.
69 .SH ATTRIBUTES
70 .sp
71 .LP
72 See \fBattributes\fR(5) for descriptions of the following attributes:
73 .sp
75 .sp
76 .TS
77 box;
78 c | c
79 l | l .
80 ATTRIBUTE TYPE  ATTRIBUTE VALUE
82 Interface Stability     Standard
84 MT-Level        MT-Safe
85 .TE
87 .SH SEE ALSO
88 .sp
89 .LP
90 \fBattributes\fR(5), \fBstandards\fR(5)