]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - usr.bin/uuencode/uuencode.format.5
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / usr.bin / uuencode / uuencode.format.5
1 .\" Copyright (c) 1989, 1991, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by the University of
15 .\"     California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     @(#)uuencode.format.5   8.2 (Berkeley) 1/12/94
33 .\" $FreeBSD$
34 .\"
35 .Dd January 12, 1994
36 .Dt UUENCODE 5
37 .Os
38 .Sh NAME
39 .Nm uuencode
40 .Nd format of an encoded uuencode file
41 .Sh DESCRIPTION
42 Files output by
43 .Xr uuencode 1
44 consist of a header line,
45 followed by a number of body lines,
46 and a trailer line.
47 The
48 .Xr uudecode 1
49 command
50 will ignore any lines preceding the header or
51 following the trailer.
52 Lines preceding a header must not, of course,
53 look like a header.
54 .Pp
55 The header line is distinguished by having the first
56 6 characters
57 .Dq begin\ \&
58 (note the trailing space).
59 The word
60 .Em begin
61 is followed by a mode (in octal),
62 and a string which names the remote file.
63 A space separates the three items in the header line.
64 .Pp
65 The body consists of a number of lines, each at most 62 characters
66 long (including the trailing newline).
67 These consist of a character count,
68 followed by encoded characters,
69 followed by a newline.
70 The character count is a single printing character,
71 and represents an integer, the number of bytes
72 the rest of the line represents.
73 Such integers are always in the range from 1 to 45 or 64 and can
74 be determined by subtracting the character space (octal 40)
75 from the character.
76 Character 64 represents a count of zero.
77 .Pp
78 Groups of 3 bytes are stored in 4 characters, 6 bits per character.
79 All characters are always in range from 1 to 64 and are offset by a
80 space (octal 40) to make the characters printing.
81 Character
82 64 represents a count of zero.
83 The last line may be shorter than the normal 45 bytes.
84 If the size is not a multiple of 3, this fact can be determined
85 by the value of the count on the last line.
86 Extra null characters will be included to make the character count a multiple
87 of 4.
88 The body is terminated by a line with a count of zero.
89 This line consists of one
90 .Tn ASCII
91 backquote (octal 140) character.
92 .Pp
93 The trailer line consists of
94 .Dq end
95 on a line by itself.
96 .Sh SEE ALSO
97 .Xr mail 1 ,
98 .Xr uucp 1 ,
99 .Xr uudecode 1 ,
100 .Xr uuencode 1
101 .Sh HISTORY
102 The
103 .Nm
104 file format appeared in
105 .Bx 4.0 .
106 .\" It was named uuencode.5 prior to 4.3