summaryrefslogtreecommitdiffstats
path: root/contrib/patch/basename.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/patch/basename.c')
-rw-r--r--contrib/patch/basename.c32
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;
-}
OpenPOWER on IntegriCloud