diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1997-01-17 07:14:33 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1997-01-17 07:14:33 +0000 |
commit | 3e150a880447536a0af58c395e5a857635e985d3 (patch) | |
tree | 867c3504f60ee9bfd2fa5db3dd66d5b3a1649ecd /usr.bin/hexdump/parse.c | |
parent | 8e78a24e2e89c03ac53bd758a1781c925fe7ab71 (diff) |
r?index -> strr?chr
Diffstat (limited to 'usr.bin/hexdump/parse.c')
-rw-r--r-- | usr.bin/hexdump/parse.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/hexdump/parse.c b/usr.bin/hexdump/parse.c index 10281f47d65..18d11309caa 100644 --- a/usr.bin/hexdump/parse.c +++ b/usr.bin/hexdump/parse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.c,v 1.2 1996/06/26 05:34:21 deraadt Exp $ */ +/* $OpenBSD: parse.c,v 1.3 1997/01/17 07:12:39 millert Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. @@ -35,7 +35,7 @@ #ifndef lint /*static char sccsid[] = "from: @(#)parse.c 5.6 (Berkeley) 3/9/91";*/ -static char rcsid[] = "$OpenBSD: parse.c,v 1.2 1996/06/26 05:34:21 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: parse.c,v 1.3 1997/01/17 07:12:39 millert Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -61,7 +61,7 @@ addfile(name) exit(1); } while (fgets(buf, sizeof(buf), fp)) { - if (!(p = index(buf, '\n'))) { + if (!(p = strchr(buf, '\n'))) { (void)fprintf(stderr, "hexdump: line too long.\n"); while ((ch = getchar()) != '\n' && ch != EOF); continue; @@ -171,7 +171,7 @@ size(fs) * skip any special chars -- save precision in * case it's a %s format. */ - while (index(spec + 1, *++fmt)); + while (strchr(spec + 1, *++fmt)); if (*fmt == '.' && isdigit(*++fmt)) { prec = atoi(fmt); while (isdigit(*++fmt)); @@ -243,10 +243,10 @@ rewrite(fs) if (fu->bcnt) { sokay = USEBCNT; /* skip to conversion character */ - for (++p1; index(spec, *p1); ++p1); + for (++p1; strchr(spec, *p1); ++p1); } else { /* skip any special chars, field width */ - while (index(spec + 1, *++p1)); + while (strchr(spec + 1, *++p1)); if (*p1 == '.' && isdigit(*++p1)) { sokay = USEPREC; prec = atoi(p1); |