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

28
od.1
View File

@ -1,4 +1,4 @@
.Dd 2015-10-08 .Dd 2015-10-09
.Dt OD 1 .Dt OD 1
.Os sbase .Os sbase
.Sh NAME .Sh NAME
@ -6,28 +6,34 @@
.Nd octal dump .Nd octal dump
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm .Nm
.Op Fl A Ar d|o|x|n .Op Fl A Ar addrformat
.Op Fl t Ar a|c|d|o|u|x .Op Fl t Ar outputformat...
.Op Fl v .Op Fl v
.Op Ar file... .Op Ar file ...
.Sh DESCRIPTION .Sh DESCRIPTION
.Nm .Nm
writes an octal dump of each writes an octal dump of each
.Ar file .Ar file
to stdout. If no to stdout. If no
.Ar file .Ar file
is given, then is given
.Nm .Nm
reads from stdin. reads from stdin.
.Sh OPTIONS .Sh OPTIONS
.Bl -tag -width Ds .Bl -tag -width Ds
.It Fl A Ar d|o|x|n .It Fl A Ar addressformat
Display the address in base \fId\fRecimal | \fIo\fRctal | .Ar addressformat
he\fIx\fRadecimal | \fIn\fRone. If unspecified, the default is octal. is one of d|o|x|n and sets the address to be
.It Fl t Ar a|c|d|o|u|x either in \fId\fRecimal, \fIo\fRctal, he\fIx\fRadecimal or \fIn\fRot
Display the content as n\fIa\fRmed character, \fIc\fRharacter, signed 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 \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 .It Fl v
Always set. Write all input data, including duplicate lines. Always set. Write all input data, including duplicate lines.
.El .El

3
od.c
View File

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