From: sobrado Date: Sat, 19 Apr 2014 09:28:20 +0000 (+0000) Subject: use an appropriate name for this variable. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8cfaf1947d55b30764a046a2da267e25617930a9;p=openbsd use an appropriate name for this variable. ok millert@ --- diff --git a/usr.bin/hexdump/conv.c b/usr.bin/hexdump/conv.c index 6f27c229673..a0532af3968 100644 --- a/usr.bin/hexdump/conv.c +++ b/usr.bin/hexdump/conv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conv.c,v 1.9 2013/02/09 02:46:03 krw Exp $ */ +/* $OpenBSD: conv.c,v 1.10 2014/04/19 09:28:20 sobrado Exp $ */ /* $NetBSD: conv.c,v 1.7 2001/12/07 15:14:29 bjh21 Exp $ */ /* @@ -49,7 +49,7 @@ conv_c(PR *pr, u_char *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; @@ -69,7 +69,7 @@ conv_c(PR *pr, u_char *p) str = "\\t"; goto strpr; case '\v': - if (deprecated) + if (odmode) break; str = "\\v"; goto strpr; @@ -100,14 +100,14 @@ conv_u(PR *pr, u_char *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 6d8f4a558c6..85244c32429 100644 --- a/usr.bin/hexdump/hexdump.h +++ b/usr.bin/hexdump/hexdump.h @@ -1,4 +1,4 @@ -/* $OpenBSD: hexdump.h,v 1.9 2010/10/12 17:23:21 millert Exp $ */ +/* $OpenBSD: hexdump.h,v 1.10 2014/04/19 09:28:20 sobrado Exp $ */ /* $NetBSD: hexdump.h,v 1.7 2001/12/07 15:14:29 bjh21 Exp $ */ /* @@ -72,7 +72,7 @@ typedef struct _fs { /* format strings */ enum _vflag { ALL, DUP, FIRST, WAIT }; /* -v values */ extern int blocksize; /* data block size */ -extern int deprecated; /* od compatibility */ +extern int odmode; /* od compatibility */ extern FU *endfu; /* format at end-of-data */ extern int exitval; /* final exit value */ extern FS *fshead; /* head of format strings list */ diff --git a/usr.bin/hexdump/odsyntax.c b/usr.bin/hexdump/odsyntax.c index 701b96be16b..2854bf00e99 100644 --- a/usr.bin/hexdump/odsyntax.c +++ b/usr.bin/hexdump/odsyntax.c @@ -1,4 +1,4 @@ -/* $OpenBSD: odsyntax.c,v 1.24 2014/04/15 15:35:24 sobrado Exp $ */ +/* $OpenBSD: odsyntax.c,v 1.25 2014/04/19 09:28:20 sobrado Exp $ */ /* $NetBSD: odsyntax.c,v 1.15 2001/12/07 15:14:29 bjh21 Exp $ */ /*- @@ -42,7 +42,7 @@ #define PADDING " " -int deprecated; +int odmode; static void odoffset(int, char ***); static void posixtypes(char *); @@ -87,7 +87,7 @@ oldsyntax(int argc, char ***argvp) add("\"%07.7_Ao\n\""); add("\"%07.7_ao \""); - deprecated = 1; + odmode = 1; argv = *argvp; while ((ch = getopt(argc, argv, "A:aBbcDdeFfHhIij:LlN:Oost:vXx")) != -1)