summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason McIntyre <jmc@cvs.openbsd.org>2007-02-06 20:22:20 +0000
committerJason McIntyre <jmc@cvs.openbsd.org>2007-02-06 20:22:20 +0000
commit84cf31e0331cbe8c3f353381baef5f7613812f91 (patch)
tree317da912f07cfcbd2400d387d1209b30162e44ef
parent660c8ac406187535772ed92745698397de17541e (diff)
sort options and sync usage();
-rw-r--r--usr.bin/hexdump/hexdump.124
-rw-r--r--usr.bin/hexdump/hexsyntax.c9
2 files changed, 14 insertions, 19 deletions
diff --git a/usr.bin/hexdump/hexdump.1 b/usr.bin/hexdump/hexdump.1
index e1f253dc773..33697535ec0 100644
--- a/usr.bin/hexdump/hexdump.1
+++ b/usr.bin/hexdump/hexdump.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: hexdump.1,v 1.17 2007/02/06 20:13:00 jmc Exp $
+.\" $OpenBSD: hexdump.1,v 1.18 2007/02/06 20:22:19 jmc Exp $
.\" $NetBSD: hexdump.1,v 1.14 2001/12/07 14:46:24 bjh21 Exp $
.\"
.\" Copyright (c) 1989, 1990, 1993
@@ -38,20 +38,14 @@
.Nd ascii, decimal, hexadecimal, octal dump
.Sh SYNOPSIS
.Nm hexdump
-.Op Fl bcCdovx
.Bk -words
+.Op Fl bCcdovx
.Op Fl e Ar format_string
-.Ek
-.Bk -words
.Op Fl f Ar format_file
-.Ek
-.Bk -words
.Op Fl n Ar length
+.Op Fl s Ar offset
+.Op Ar
.Ek
-.Bk -words
-.Op Fl s Ar skip
-.Ek
-.Ar file ...
.Sh DESCRIPTION
The
.Nm
@@ -66,16 +60,16 @@ The options are as follows:
Display the input offset in hexadecimal, followed by sixteen
space-separated, three column, zero-filled, bytes of input data,
in octal, per line.
-.It Fl c
-.Em One-byte character display .
-Display the input offset in hexadecimal, followed by sixteen
-space-separated, three column, space-filled, characters of input
-data per line.
.It Fl C
.Em Canonical hex+ASCII display .
Display the input offset in hexadecimal, followed by sixteen
space-separated, two column, hexadecimal bytes, followed by the
same sixteen bytes in %_p format enclosed in ``|'' characters.
+.It Fl c
+.Em One-byte character display .
+Display the input offset in hexadecimal, followed by sixteen
+space-separated, three column, space-filled, characters of input
+data per line.
.It Fl d
.Em Two-byte decimal display .
Display the input offset in hexadecimal, followed by eight
diff --git a/usr.bin/hexdump/hexsyntax.c b/usr.bin/hexdump/hexsyntax.c
index 46aaf7032aa..fd92be118f6 100644
--- a/usr.bin/hexdump/hexsyntax.c
+++ b/usr.bin/hexdump/hexsyntax.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hexsyntax.c,v 1.9 2007/01/28 16:37:09 miod Exp $ */
+/* $OpenBSD: hexsyntax.c,v 1.10 2007/02/06 20:22:19 jmc Exp $ */
/* $NetBSD: hexsyntax.c,v 1.8 1998/04/08 23:48:57 jeremy Exp $ */
/*-
@@ -32,7 +32,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)hexsyntax.c 5.2 (Berkeley) 5/8/90";*/
-static char rcsid[] = "$OpenBSD: hexsyntax.c,v 1.9 2007/01/28 16:37:09 miod Exp $";
+static char rcsid[] = "$OpenBSD: hexsyntax.c,v 1.10 2007/02/06 20:22:19 jmc Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -130,7 +130,8 @@ void
usage(void)
{
extern char *__progname;
- fprintf(stderr, "usage: %s [-bcCdovx] [-e fmt] [-f fmt_file] "
- "[-n length] [-s skip] [file ...]\n", __progname);
+ fprintf(stderr, "usage: %s [-bCcdovx] [-e format_string] "
+ "[-f format_file] [-n length]\n"
+ "\t[-s offset] [file ...]\n", __progname);
exit(1);
}