fix .Os and history
[unix-history] / usr / src / usr.bin / uuencode / uuencode.format.5
CommitLineData
e46e0a76 1.\" Copyright (c) 1989, 1991 The Regents of the University of California.
334a2eb3
KB
2.\" All rights reserved.
3.\"
e46e0a76 4.\" %sccs.include.redist.roff%
334a2eb3 5.\"
7e81a7c6 6.\" @(#)uuencode.format.5 6.5 (Berkeley) %G%
7e547544 7.\"
e46e0a76
CL
8.Dd
9.Dt UUENCODE 5
7e81a7c6 10.Os BSD 4
e46e0a76
CL
11.Sh NAME
12.Nm uuencode
13.Nd format of an encoded uuencode file
14.Sh DESCRIPTION
7e547544 15Files output by
e46e0a76 16.Xr uuencode 1
7e547544
KM
17consist of a header line,
18followed by a number of body lines,
19and a trailer line.
e46e0a76
CL
20The
21.Xr uudecode 1
22command
7e547544
KM
23will ignore any lines preceding the header or
24following the trailer.
25Lines preceding a header must not, of course,
26look like a header.
e46e0a76 27.Pp
7e547544 28The header line is distinguished by having the first
e46e0a76
CL
296 characters
30.Dq begin\ \&
7e547544 31The word
e46e0a76 32.Em begin
7e547544
KM
33is followed by a mode (in octal),
34and a string which names the remote file.
35A space separates the three items in the header line.
e46e0a76 36.Pp
7e547544
KM
37The body consists of a number of lines, each at most 62 characters
38long (including the trailing newline).
39These consist of a character count,
40followed by encoded characters,
41followed by a newline.
42The character count is a single printing character,
43and represents an integer, the number of bytes
44the rest of the line represents.
45Such integers are always in the range from 0 to 63 and can
46be determined by subtracting the character space (octal 40)
47from the character.
e46e0a76 48.Pp
7e547544
KM
49Groups of 3 bytes are stored in 4 characters, 6 bits per character.
50All are offset by a space to make the characters printing.
51The last line may be shorter than the normal 45 bytes.
52If the size is not a multiple of 3, this fact can be determined
53by the value of the count on the last line.
54Extra garbage will be included to make the character count a multiple
55of 4.
56The body is terminated by a line with a count of zero.
e46e0a76
CL
57This line consists of one
58.Tn ASCII
59space.
60.Pp
61The trailer line consists of
62.Dq end
63on a line by itself.
64.Sh SEE ALSO
65.Xr uuencode 1 ,
66.Xr uudecode 1 ,
67.Xr uusend 1 ,
68.Xr uucp 1 ,
69.Xr mail 1
70.Sh HISTORY
71The
7e81a7c6 72.Nm uuencode
e46e0a76
CL
73file format appeared in
74.Bx 4.0 .
75.\" It was named uuencode.5 prior to 4.3