diff options
-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) { |