diff options
| author | Tim J. Robbins <tjr@FreeBSD.org> | 2002-05-17 05:20:30 +0000 |
|---|---|---|
| committer | Tim J. Robbins <tjr@FreeBSD.org> | 2002-05-17 05:20:30 +0000 |
| commit | ca9cbcece07db63635cc88205d166ea289ca7beb (patch) | |
| tree | 482a4f6e12c3f6e59774450b5d63e98b80d80388 /usr.bin | |
| parent | 27c9ea57e8acca137190535286752f5631be012b (diff) | |
Notes
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/hexdump/conv.c | 10 | ||||
| -rw-r--r-- | usr.bin/hexdump/hexdump.h | 1 | ||||
| -rw-r--r-- | usr.bin/hexdump/od.1 | 5 | ||||
| -rw-r--r-- | usr.bin/hexdump/odsyntax.c | 5 |
4 files changed, 7 insertions, 14 deletions
diff --git a/usr.bin/hexdump/conv.c b/usr.bin/hexdump/conv.c index 5f50917c25659..9cf3e87273cd5 100644 --- a/usr.bin/hexdump/conv.c +++ b/usr.bin/hexdump/conv.c @@ -48,7 +48,6 @@ conv_c(pr, p) PR *pr; u_char *p; { - extern int deprecated; char buf[10]; char const *str; @@ -58,7 +57,7 @@ conv_c(pr, p) goto strpr; /* case '\a': */ case '\007': - if (deprecated) /* od didn't know about \a */ + if (odmode) /* od didn't know about \a */ break; str = "\\a"; goto strpr; @@ -78,7 +77,7 @@ conv_c(pr, p) str = "\\t"; goto strpr; case '\v': - if (deprecated) + if (odmode) break; str = "\\v"; goto strpr; @@ -101,7 +100,6 @@ conv_u(pr, p) PR *pr; u_char *p; { - extern int deprecated; static char const * list[] = { "nul", "soh", "stx", "etx", "eot", "enq", "ack", "bel", "bs", "ht", "lf", "vt", "ff", "cr", "so", "si", @@ -112,14 +110,14 @@ conv_u(pr, p) /* od used nl, not lf */ if (*p <= 0x1f) { *pr->cchar = 's'; - if (deprecated && *p == 0x0a) + if (odmode && *p == 0x0a) (void)printf(pr->fmt, "nl"); else (void)printf(pr->fmt, list[*p]); } else if (*p == 0x7f) { *pr->cchar = 's'; (void)printf(pr->fmt, "del"); - } else if (deprecated && *p == 0x20) { /* od replaced space with sp */ + } else if (odmode && *p == 0x20) { /* od replaced space with sp */ *pr->cchar = 's'; (void)printf(pr->fmt, " sp"); } else if (isprint(*p)) { diff --git a/usr.bin/hexdump/hexdump.h b/usr.bin/hexdump/hexdump.h index 181581981fb6b..70cad3e78a547 100644 --- a/usr.bin/hexdump/hexdump.h +++ b/usr.bin/hexdump/hexdump.h @@ -73,6 +73,7 @@ typedef struct _fs { /* format strings */ extern FS *fshead; /* head of format strings list */ extern int blocksize; /* data block size */ +extern int odmode; /* are we acting as od(1)? */ enum _vflag { ALL, DUP, FIRST, WAIT }; /* -v values */ void add(const char *); diff --git a/usr.bin/hexdump/od.1 b/usr.bin/hexdump/od.1 index ebbb9da6962ef..ac46aabe83c84 100644 --- a/usr.bin/hexdump/od.1 +++ b/usr.bin/hexdump/od.1 @@ -52,11 +52,6 @@ .Ar file .Sh DESCRIPTION The -.Nm -utility has been deprecated in favor of -.Xr hexdump 1 . -.Pp -The .Nm hexdump utility, if called as .Nm , diff --git a/usr.bin/hexdump/odsyntax.c b/usr.bin/hexdump/odsyntax.c index 35cd04e9c6563..2f378882dfd5b 100644 --- a/usr.bin/hexdump/odsyntax.c +++ b/usr.bin/hexdump/odsyntax.c @@ -49,7 +49,7 @@ static const char rcsid[] = #include "hexdump.h" -int deprecated; +int odmode; static void odoffset(int, char ***); static void odprecede(void); @@ -64,7 +64,7 @@ oldsyntax(argc, argvp) int ch; char **argv; - deprecated = 1; + odmode = 1; argv = *argvp; while ((ch = getopt(argc, argv, "aBbcDdeFfHhIiLlOoPpswvXx")) != -1) switch (ch) { @@ -136,7 +136,6 @@ oldsyntax(argc, argvp) case 'w': case '?': default: - warnx("od(1) has been deprecated for hexdump(1)"); if (ch != '?') warnx("hexdump(1) compatibility doesn't support the -%c option%s", ch, ch == 's' ? "; see strings(1)" : ""); |
