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