From 6b9cc76d0a27631fbab19a31ab8bd46e143b7580 Mon Sep 17 00:00:00 2001 From: Ton Voon Date: Thu, 13 Jul 2006 08:54:57 +0000 Subject: Using coreutils' base_name function because of portability issues with Tru64 git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1450 f882894a-f735-0410-b71e-b25c423dba1c --- plugins/utils.c | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'plugins/utils.c') diff --git a/plugins/utils.c b/plugins/utils.c index a455f225..cb013412 100644 --- a/plugins/utils.c +++ b/plugins/utils.c @@ -640,33 +640,6 @@ strpcat (char *dest, const char *src, const char *str) return dest; } -#ifndef HAVE_BASENAME -/* function modified from coreutils base_name function - see ACKNOWLEDGEMENTS */ -char *basename(const char *path) { - char const *base = path; - char const *p; - for (p = base; *p; p++) { - if (*p == '/') { - /* Treat multiple adjacent slashes like single slash */ - do p++; - while (*p == '/'); - - /* If filename ends in slash, use trailing slash - as basename if no non-slashes found */ - if (! *p) { - if (*base == '/') - base = p - 1; - break; - } - - /* *p is non-slash preceded by slash */ - base = p; - } - } - return (char *) base; -} -#endif - /****************************************************************************** * * Print perfdata in a standard format -- cgit v1.2.3