diff options
Diffstat (limited to 'usr.sbin/pkg_install/lib')
-rw-r--r-- | usr.sbin/pkg_install/lib/file.c | 8 | ||||
-rw-r--r-- | usr.sbin/pkg_install/lib/plist.c | 6 | ||||
-rw-r--r-- | usr.sbin/pkg_install/lib/str.c | 8 |
3 files changed, 11 insertions, 11 deletions
diff --git a/usr.sbin/pkg_install/lib/file.c b/usr.sbin/pkg_install/lib/file.c index 1434d6feb4b..219dc8aed70 100644 --- a/usr.sbin/pkg_install/lib/file.c +++ b/usr.sbin/pkg_install/lib/file.c @@ -1,7 +1,7 @@ -/* $OpenBSD: file.c,v 1.3 1996/12/29 12:19:08 graichen Exp $ */ +/* $OpenBSD: file.c,v 1.4 1997/01/17 07:14:15 millert Exp $ */ #ifndef lint -static const char *rcsid = "$OpenBSD: file.c,v 1.3 1996/12/29 12:19:08 graichen Exp $"; +static const char *rcsid = "$OpenBSD: file.c,v 1.4 1997/01/17 07:14:15 millert Exp $"; #endif /* @@ -440,10 +440,10 @@ unpack(char *pkg, char *flist) * compressed. */ if (strcmp(pkg, "-")) { - cp = rindex(pkg, '.'); + cp = strrchr(pkg, '.'); if (cp) { strcpy(suffix, cp + 1); - if (index(suffix, 'z') || index(suffix, 'Z')) + if (strchr(suffix, 'z') || strchr(suffix, 'Z')) strcpy(args, "-z"); } } diff --git a/usr.sbin/pkg_install/lib/plist.c b/usr.sbin/pkg_install/lib/plist.c index 5cbc7aa25d7..b901fc28cdf 100644 --- a/usr.sbin/pkg_install/lib/plist.c +++ b/usr.sbin/pkg_install/lib/plist.c @@ -1,6 +1,6 @@ -/* $OpenBSD: plist.c,v 1.2 1996/06/04 08:43:45 niklas Exp $ */ +/* $OpenBSD: plist.c,v 1.3 1997/01/17 07:14:16 millert Exp $ */ #ifndef lint -static const char *rcsid = "$OpenBSD: plist.c,v 1.2 1996/06/04 08:43:45 niklas Exp $"; +static const char *rcsid = "$OpenBSD: plist.c,v 1.3 1997/01/17 07:14:16 millert Exp $"; #endif /* @@ -430,7 +430,7 @@ delete_hierarchy(char *dir, Boolean ign_err, Boolean nukedirs) if (!nukedirs) return 0; while (cp2) { - if ((cp2 = rindex(cp1, '/')) != NULL) + if ((cp2 = strrchr(cp1, '/')) != NULL) *cp2 = '\0'; if (!isemptydir(dir)) return 0; diff --git a/usr.sbin/pkg_install/lib/str.c b/usr.sbin/pkg_install/lib/str.c index faaf3ba7579..899fa6003cf 100644 --- a/usr.sbin/pkg_install/lib/str.c +++ b/usr.sbin/pkg_install/lib/str.c @@ -1,7 +1,7 @@ -/* $OpenBSD: str.c,v 1.2 1996/06/04 08:43:46 niklas Exp $ */ +/* $OpenBSD: str.c,v 1.3 1997/01/17 07:14:17 millert Exp $ */ #ifndef lint -static const char *rcsid = "$OpenBSD: str.c,v 1.2 1996/06/04 08:43:46 niklas Exp $"; +static const char *rcsid = "$OpenBSD: str.c,v 1.3 1997/01/17 07:14:17 millert Exp $"; #endif /* @@ -84,7 +84,7 @@ suffix(char *str, char *suff) char *idx; Boolean ret = FALSE; - idx = rindex(str, '.'); + idx = strrchr(str, '.'); if (idx && !strcmp(idx + 1, suff)) ret = TRUE; return ret; @@ -96,7 +96,7 @@ nuke_suffix(char *str) { char *idx; - idx = rindex(str, '.'); + idx = strrchr(str, '.'); if (idx) *idx = '\0'; /* Yow! Don't try this on a const! */ } |