Audit uuencode(1)

Style cleanup, Manpage refactoring.
This commit is contained in:
FRIGN 2015-03-18 00:14:56 +01:00
parent 1b71559431
commit a20a9350db
3 changed files with 12 additions and 5 deletions

2
README
View File

@ -85,7 +85,7 @@ The following tools are implemented ('*' == finished, '#' == UTF-8 support,
=*| uniq yes none
=*| unlink yes none
=*| uudecode yes none
=* uuencode yes none
=*| uuencode yes none
#* wc yes none
= xargs no -I, -L, -p, -s, -t, -x
=*| yes non-posix none

View File

@ -1,4 +1,4 @@
.Dd February 13, 2015
.Dd March 18, 2015
.Dt UUENCODE 1
.Os sbase
.Sh NAME
@ -13,11 +13,16 @@
.Nm
reads
.Ar file
(or by default, the standard input) and writes an encoded version
to the standard output. The encoding uses only printing ASCII characters and
and writes an encoded version to stdout.
The encoding uses only printing ASCII characters and
includes the mode of the file and the operand
.Ar name
for use by uudecode.
If no
.Ar name
is given,
.Nm
reads from stdin.
.Sh OPTIONS
.Bl -tag -width Ds
.It Fl m

View File

@ -18,6 +18,7 @@ b64e(unsigned char b[2])
o = (o << 8) | b64et[p & 0x3f]; p >>= 6;
o = (o << 8) | b64et[p & 0x3f]; p >>= 6;
o = (o << 8) | b64et[p & 0x3f];
return o;
}
@ -110,7 +111,7 @@ main(int argc, char *argv[])
usage();
} ARGEND;
if (argc == 0 || argc > 2)
if (!argc || argc > 2)
usage();
if (argc == 1) {
@ -127,5 +128,6 @@ main(int argc, char *argv[])
uuencode(fp, argv[1], argv[0]);
fclose(fp);
}
return 0;
}