summaryrefslogtreecommitdiffstats
path: root/usr.bin/hexdump/hexsyntax.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/hexdump/hexsyntax.c')
-rw-r--r--usr.bin/hexdump/hexsyntax.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/usr.bin/hexdump/hexsyntax.c b/usr.bin/hexdump/hexsyntax.c
index 279a68c..ae21411 100644
--- a/usr.bin/hexdump/hexsyntax.c
+++ b/usr.bin/hexdump/hexsyntax.c
@@ -32,11 +32,16 @@
*/
#ifndef lint
+#if 0
static char sccsid[] = "@(#)hexsyntax.c 8.2 (Berkeley) 5/4/95";
+#endif
+static const char rcsid[] =
+ "$Id$";
#endif /* not lint */
#include <sys/types.h>
+#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -92,7 +97,7 @@ newsyntax(argc, argvp)
break;
case 'n':
if ((length = atoi(optarg)) < 0)
- err("%s: bad length value", optarg);
+ errx(1, "%s: bad length value", optarg);
break;
case 'o':
add("\"%07.7_Ax\n\"");
@@ -100,7 +105,7 @@ newsyntax(argc, argvp)
break;
case 's':
if ((skip = strtol(optarg, &p, 0)) < 0)
- err("%s: bad skip value", optarg);
+ errx(1, "%s: bad skip value", optarg);
switch(*p) {
case 'b':
skip *= 512;
@@ -135,7 +140,10 @@ newsyntax(argc, argvp)
void
usage()
{
- (void)fprintf(stderr,
-"hexdump: [-bcCdovx] [-e fmt] [-f fmt_file] [-n length] [-s skip] [file ...]\n");
+ (void)fprintf(stderr, "%s\n%s\n%s\n%s\n",
+"usage: hexdump [-bcCdovx] [-e fmt] [-f fmt_file] [-n length]",
+" [-s skip] [file ...]",
+" hd [-bcdovx] [-e fmt] [-f fmt_file] [-n length]",
+" [-s skip] [file ...]");
exit(1);
}
OpenPOWER on IntegriCloud