Update od(1)-documentation

This commit is contained in:
FRIGN 2015-10-09 03:09:26 +02:00 committed by sin
parent 092c95b66c
commit c619e168c9
2 changed files with 19 additions and 12 deletions

26
od.1
View File

@ -1,4 +1,4 @@
.Dd 2015-10-08
.Dd 2015-10-09
.Dt OD 1
.Os sbase
.Sh NAME
@ -6,8 +6,8 @@
.Nd octal dump
.Sh SYNOPSIS
.Nm
.Op Fl A Ar d|o|x|n
.Op Fl t Ar a|c|d|o|u|x
.Op Fl A Ar addrformat
.Op Fl t Ar outputformat...
.Op Fl v
.Op Ar file ...
.Sh DESCRIPTION
@ -16,18 +16,24 @@ writes an octal dump of each
.Ar file
to stdout. If no
.Ar file
is given, then
is given
.Nm
reads from stdin.
.Sh OPTIONS
.Bl -tag -width Ds
.It Fl A Ar d|o|x|n
Display the address in base \fId\fRecimal | \fIo\fRctal |
he\fIx\fRadecimal | \fIn\fRone. If unspecified, the default is octal.
.It Fl t Ar a|c|d|o|u|x
Display the content as n\fIa\fRmed character, \fIc\fRharacter, signed
.It Fl A Ar addressformat
.Ar addressformat
is one of d|o|x|n and sets the address to be
either in \fId\fRecimal, \fIo\fRctal, he\fIx\fRadecimal or \fIn\fRot
printed at all. The default is octal.
.It Fl t Ar outputformat
.Ar outputformat
is a list of a|c|d|o|u|x followed by a digit or C|S|I|L and sets
the content to be in n\fIa\fRmed character, \fIc\fRharacter, signed
\fId\fRecimal, \fIo\fRctal, \fIu\fRnsigned decimal, or
he\fIx\fRadecimal. If unspecified, the default is octal.
he\fIx\fRadecimal format, processing the given amount of bytes or the length
of \fIC\fRhar, \fIS\fRhort, \fII\fRnteger or \fIL\fRong.
The default is octal with 4 bytes.
.It Fl v
Always set. Write all input data, including duplicate lines.
.El

3
od.c
View File

@ -165,7 +165,8 @@ lcm(unsigned int a, unsigned int b)
static void
usage(void)
{
eprintf("usage: %s", argv0);
eprintf("usage: %s [-A addressformat] [-t outputformat] "
"[-v] [file ...]\n", argv0);
}
int