suckless unix tools
git clone git://
Log | Files | Refs | README | LICENSE

commit 5a18a1f4b2a5975f81064e3f112f4035baad21e4
parent 2acb2a5e4940bda8a0058bb9e8d354aa02b22cfe
Author: FRIGN <>
Date:   Fri Oct  9 03:09:26 +0200

Update od(1)-documentation

od.1 | 28+++++++++++++++++-----------
od.c | 3++-
2 files changed, 19 insertions(+), 12 deletions(-)
diff --git a/od.1 b/od.1 @@ -1,4 +1,4 @@ -.Dd 2015-10-08 +.Dd 2015-10-09 .Dt OD 1 .Os sbase .Sh NAME @@ -6,28 +6,34 @@ .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... +.Op Ar file ... .Sh DESCRIPTION .Nm 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 diff --git a/od.c b/od.c @@ -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