summaryrefslogtreecommitdiffstats
path: root/usr.bin/hexdump
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1997-11-04 05:33:15 +0000
committerache <ache@FreeBSD.org>1997-11-04 05:33:15 +0000
commit4f252df3ada32f04597589573c19208aa06a8f39 (patch)
tree4a11caa0a301d1fd6d2b66b6873b978a31e4bdf1 /usr.bin/hexdump
parent2fba0f4632d76a1730c62c2a90fa4328fe1d4103 (diff)
downloadFreeBSD-src-4f252df3ada32f04597589573c19208aa06a8f39.zip
FreeBSD-src-4f252df3ada32f04597589573c19208aa06a8f39.tar.gz
Localize it
Diffstat (limited to 'usr.bin/hexdump')
-rw-r--r--usr.bin/hexdump/hexdump.c6
-rw-r--r--usr.bin/hexdump/odsyntax.c7
-rw-r--r--usr.bin/hexdump/parse.c13
3 files changed, 13 insertions, 13 deletions
diff --git a/usr.bin/hexdump/hexdump.c b/usr.bin/hexdump/hexdump.c
index 36d35a3..8491c42 100644
--- a/usr.bin/hexdump/hexdump.c
+++ b/usr.bin/hexdump/hexdump.c
@@ -42,11 +42,11 @@ static const char copyright[] =
static char sccsid[] = "@(#)hexdump.c 8.1 (Berkeley) 6/6/93";
#endif
static const char rcsid[] =
- "$Id$";
+ "$Id: hexdump.c,v 1.2 1997/07/10 06:48:16 charnier Exp $";
#endif /* not lint */
#include <sys/types.h>
-
+#include <locale.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -65,6 +65,8 @@ main(argc, argv)
register FS *tfs;
char *p;
+ (void)setlocale(LC_CTYPE, "");
+
if (!(p = rindex(argv[0], 'o')) || strcmp(p, "od"))
newsyntax(argc, &argv);
else
diff --git a/usr.bin/hexdump/odsyntax.c b/usr.bin/hexdump/odsyntax.c
index 5c6d3e1..7ad7c37 100644
--- a/usr.bin/hexdump/odsyntax.c
+++ b/usr.bin/hexdump/odsyntax.c
@@ -36,7 +36,7 @@
static char sccsid[] = "@(#)odsyntax.c 8.2 (Berkeley) 5/4/95";
#endif
static const char rcsid[] =
- "$Id$";
+ "$Id: odsyntax.c,v 1.5 1997/07/10 06:48:21 charnier Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -161,9 +161,8 @@ odoffset(argc, argvp)
char ***argvp;
{
extern off_t skip;
- register char *num, *p;
+ unsigned char *p, *num, *end;
int base;
- char *end;
/*
* The offset syntax of od(1) was genuinely bizarre. First, if
@@ -215,7 +214,7 @@ odoffset(argc, argvp)
base = 10;
}
- skip = strtol(num, &end, base ? base : 8);
+ skip = strtol(num, (char **)&end, base ? base : 8);
/* if end isn't the same as p, we got a non-octal digit */
if (end != p) {
diff --git a/usr.bin/hexdump/parse.c b/usr.bin/hexdump/parse.c
index 6fae728..34a2236 100644
--- a/usr.bin/hexdump/parse.c
+++ b/usr.bin/hexdump/parse.c
@@ -36,7 +36,7 @@
static char sccsid[] = "@(#)parse.c 8.1 (Berkeley) 6/6/93";
#endif
static const char rcsid[] =
- "$Id$";
+ "$Id: parse.c,v 1.2 1997/07/10 06:48:24 charnier Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -55,7 +55,7 @@ void
addfile(name)
char *name;
{
- register char *p;
+ register unsigned char *p;
FILE *fp;
int ch;
char buf[2048 + 1];
@@ -81,11 +81,10 @@ void
add(fmt)
char *fmt;
{
- register char *p;
+ unsigned char *p, *savep;
static FS **nextfs;
FS *tfs;
FU *tfu, **nextfu;
- char *savep;
/* start new linked list of format units */
tfs = emalloc(sizeof(FS));
@@ -158,7 +157,7 @@ size(fs)
{
register FU *fu;
register int bcnt, cursize;
- register char *fmt;
+ register unsigned char *fmt;
int prec;
/* figure out the data block size needed for each format unit */
@@ -213,8 +212,8 @@ rewrite(fs)
enum { NOTOKAY, USEBCNT, USEPREC } sokay;
register PR *pr, **nextpr;
register FU *fu;
- register char *p1, *p2;
- char savech, *fmtp, cs[3];
+ unsigned char *p1, *p2, *fmtp;
+ char savech, cs[3];
int nconv, prec;
for (fu = fs->nextfu; fu; fu = fu->nextfu) {
OpenPOWER on IntegriCloud