diff options
author | marius <marius@FreeBSD.org> | 2004-04-30 20:33:08 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2004-04-30 20:33:08 +0000 |
commit | 9fc948cd79a9d70e00c23f1b95ec9da3dc4f7852 (patch) | |
tree | 03e30298ca0e732e53f45971a881ba527ebfad7b /contrib/patch/basename.c | |
parent | 54564c74e31dd64140489ef3c4c566d7b7385011 (diff) | |
download | FreeBSD-src-9fc948cd79a9d70e00c23f1b95ec9da3dc4f7852.zip FreeBSD-src-9fc948cd79a9d70e00c23f1b95ec9da3dc4f7852.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r128777,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/patch/basename.c')
-rw-r--r-- | contrib/patch/basename.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/contrib/patch/basename.c b/contrib/patch/basename.c deleted file mode 100644 index 8d18a8f..0000000 --- a/contrib/patch/basename.c +++ /dev/null @@ -1,32 +0,0 @@ -/* basename.c -- return the last element in a path */ - -#if HAVE_CONFIG_H -# include <config.h> -#endif - -#include <backupfile.h> - -#ifndef FILESYSTEM_PREFIX_LEN -#define FILESYSTEM_PREFIX_LEN(f) 0 -#endif - -#ifndef ISSLASH -#define ISSLASH(c) ((c) == '/') -#endif - -/* In general, we can't use the builtin `basename' function if available, - since it has different meanings in different environments. - In some environments the builtin `basename' modifies its argument. */ - -char * -base_name (name) - char const *name; -{ - char const *base = name += FILESYSTEM_PREFIX_LEN (name); - - for (; *name; name++) - if (ISSLASH (*name)) - base = name + 1; - - return (char *) base; -} |