~noskcaj/ubuntu/saucy/xinetd/2.3.15

« back to all changes in this revision

Viewing changes to libs/src/misc/misc.c

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Seyrat
  • Date: 2004-04-18 13:33:57 UTC
  • Revision ID: james.westby@ubuntu.com-20040418133357-czeqeju37433xvdd
Tags: upstream-2.3.13
ImportĀ upstreamĀ versionĀ 2.3.13

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * (c) Copyright 1992 by Panagiotis Tsirigotis
 
3
 * (c) Portions Copyright 1998-2001 by Rob Braun
 
4
 * All rights reserved.  The file named COPYRIGHT specifies the terms 
 
5
 * and conditions for redistribution.
 
6
 */
 
7
 
 
8
#include "config.h"
 
9
#include <stdlib.h>
 
10
#include <string.h>
 
11
 
 
12
/*
 
13
 * MISCELLANEOUS FUNCTIONS
 
14
 */
 
15
 
 
16
#include "misc.h"
 
17
 
 
18
 
 
19
/*
 
20
 * We always return a pointer in pathname
 
21
 */
 
22
#if !defined(linux)
 
23
char *basename( char *pathname )
 
24
{
 
25
   char *s = strrchr( pathname, '/' ) ;
 
26
 
 
27
   if ( s == NULL )
 
28
      return( pathname ) ;
 
29
   else
 
30
      return( s+1 ) ;
 
31
}
 
32
#endif
 
33
 
 
34