summaryrefslogtreecommitdiff
path: root/usr.bin/compress/compress.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1997-01-17 07:14:33 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1997-01-17 07:14:33 +0000
commit3e150a880447536a0af58c395e5a857635e985d3 (patch)
tree867c3504f60ee9bfd2fa5db3dd66d5b3a1649ecd /usr.bin/compress/compress.c
parent8e78a24e2e89c03ac53bd758a1781c925fe7ab71 (diff)
r?index -> strr?chr
Diffstat (limited to 'usr.bin/compress/compress.c')
-rw-r--r--usr.bin/compress/compress.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/compress/compress.c b/usr.bin/compress/compress.c
index 565532d286c..0f48dcbaf42 100644
--- a/usr.bin/compress/compress.c
+++ b/usr.bin/compress/compress.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: compress.c,v 1.3 1997/01/15 23:42:22 millert Exp $ */
+/* $OpenBSD: compress.c,v 1.4 1997/01/17 07:12:29 millert Exp $ */
/* $NetBSD: compress.c,v 1.9 1995/03/26 09:44:38 glass Exp $ */
/*-
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)compress.c 8.2 (Berkeley) 1/7/94";
#else
-static char rcsid[] = "$OpenBSD: compress.c,v 1.3 1997/01/15 23:42:22 millert Exp $";
+static char rcsid[] = "$OpenBSD: compress.c,v 1.4 1997/01/17 07:12:29 millert Exp $";
#endif
#endif /* not lint */
@@ -87,7 +87,7 @@ main(argc, argv)
int bits, cat, ch;
char *p, newname[MAXPATHLEN];
- if ((p = rindex(argv[0], '/')) == NULL)
+ if ((p = strrchr(argv[0], '/')) == NULL)
p = argv[0];
else
++p;
@@ -147,7 +147,7 @@ main(argc, argv)
compress(*argv, "/dev/stdout", bits);
break;
}
- if ((p = rindex(*argv, '.')) != NULL &&
+ if ((p = strrchr(*argv, '.')) != NULL &&
!strcmp(p, ".Z")) {
cwarnx("%s: name already has trailing .Z",
*argv);
@@ -166,7 +166,7 @@ main(argc, argv)
break;
case DECOMPRESS:
len = strlen(*argv);
- if ((p = rindex(*argv, '.')) == NULL ||
+ if ((p = strrchr(*argv, '.')) == NULL ||
strcmp(p, ".Z")) {
if (len > sizeof(newname) - 3) {
cwarnx("%s: name too long", *argv);