diff options
author | tjr <tjr@FreeBSD.org> | 2002-05-17 05:20:30 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2002-05-17 05:20:30 +0000 |
commit | ed1adbad3e9ffee245c5a657be186109a6f68b8d (patch) | |
tree | 482a4f6e12c3f6e59774450b5d63e98b80d80388 /usr.bin/hexdump/conv.c | |
parent | 952f608b76fa7f19cd13da697eb4a9d35b531537 (diff) | |
download | FreeBSD-src-ed1adbad3e9ffee245c5a657be186109a6f68b8d.zip FreeBSD-src-ed1adbad3e9ffee245c5a657be186109a6f68b8d.tar.gz |
Un-deprecate od(1): rename the `deprecated' variable to `odmode', remove the
deprecation warning from the utility and manual page. Since this utility
is required by POSIX, it's not likely to be removed any time soon.
This is leading up to the addition of the P1003.1-2001 -s -A -j -N -t options.
PR: 36783
Diffstat (limited to 'usr.bin/hexdump/conv.c')
-rw-r--r-- | usr.bin/hexdump/conv.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/usr.bin/hexdump/conv.c b/usr.bin/hexdump/conv.c index 5f50917..9cf3e87 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)) { |