OSDN Git Service

(split) LDP man-pages の original/ を v3.29 に更新。
[linuxjm/LDP_man-pages.git] / original / man3 / a64l.3
1 .\" Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" Distributed under GPL
3 .\"
4 .\" Corrected, aeb, 2002-05-30
5 .\"
6 .TH A64L 3 2010-09-20 "" "Linux Programmer's Manual"
7 .SH NAME
8 a64l, l64a \- convert between long and base-64
9 .SH SYNOPSIS
10 .B #include <stdlib.h>
11 .sp
12 .BI "long a64l(char *" str64 );
13 .sp
14 .BI "char *l64a(long " value );
15 .sp
16 .in -4n
17 Feature Test Macro Requirements for glibc (see
18 .BR feature_test_macros (7)):
19 .in
20 .sp
21 .BR a64l (),
22 .BR l64a ():
23 .br
24 .RS 4
25 .ad l
26 _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500 ||
27 _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
28 .RE
29 .ad
30 .SH DESCRIPTION
31 These functions provide a conversion between 32-bit long integers
32 and little-endian base-64 ASCII strings (of length zero to six).
33 If the string used as argument for
34 .BR a64l ()
35 has length greater than six, only the first six bytes are used.
36 If the type
37 .I long
38 has more than 32 bits, then
39 .BR l64a ()
40 uses only the low order 32 bits of
41 .IR value ,
42 and
43 .BR a64l ()
44 sign-extends its 32-bit result.
45 .LP
46 The 64 digits in the base-64 system are:
47 .RS
48 .nf
49
50 \&\(aq.\(aq     represents a 0
51 \&\(aq/\(aq     represents a 1
52 0-9     represent  2-11
53 A-Z     represent 12-37
54 a-z     represent 38-63
55
56 .fi
57 .RE
58 So 123 = 59*64^0 + 1*64^1 = "v/".
59 .SH "CONFORMING TO"
60 POSIX.1-2001.
61 .SH NOTES
62 The value returned by
63 .BR l64a ()
64 may be a pointer to a static buffer, possibly overwritten
65 by later calls.
66 .LP
67 The behavior of
68 .BR l64a ()
69 is undefined when
70 .I value
71 is negative.
72 If
73 .I value
74 is zero, it returns an empty string.
75 .LP
76 These functions are broken in glibc before 2.2.5
77 (puts most significant digit first).
78 .LP
79 This is not the encoding used by
80 .BR uuencode (1).
81 .SH "SEE ALSO"
82 .BR uuencode (1),
83 .\" .BR itoa (3),
84 .BR strtoul (3)