diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2008-01-04 16:44:11 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2008-01-04 16:44:11 +0000 |
commit | dc107e3fcf35b375918ee86a3f05dd64d60bc6a1 (patch) | |
tree | 23afb787f1a7aec704d3b0726942d08c6a53f87e /usr.bin/ranlib/misc.c | |
parent | 22345244be16249388747853ed44ed93072d506a (diff) |
Revert r1.9, a.out toolchain needs this not-so-unused-after-all function.
Diffstat (limited to 'usr.bin/ranlib/misc.c')
-rw-r--r-- | usr.bin/ranlib/misc.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/usr.bin/ranlib/misc.c b/usr.bin/ranlib/misc.c index f9a72d0daf4..e6dbdb33ba8 100644 --- a/usr.bin/ranlib/misc.c +++ b/usr.bin/ranlib/misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.9 2008/01/02 16:35:22 chl Exp $ */ +/* $OpenBSD: misc.c,v 1.10 2008/01/04 16:44:10 miod Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -34,7 +34,7 @@ #ifndef lint /*static char sccsid[] = "from: @(#)misc.c 5.2 (Berkeley) 2/26/91";*/ -static char rcsid[] = "$OpenBSD: misc.c,v 1.9 2008/01/02 16:35:22 chl Exp $"; +static char rcsid[] = "$OpenBSD: misc.c,v 1.10 2008/01/04 16:44:10 miod Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -92,6 +92,14 @@ emalloc(size_t len) return(p); } +const char * +rname(const char *path) +{ + const char *ind; + + return((ind = strrchr(path, '/')) ? ind + 1 : path); +} + void badfmt(void) { |