summaryrefslogtreecommitdiffstats
path: root/gnu/libexec/uucp/libunix/basnam.c
blob: c61fcaa8de61ca769ca34f3445931fd13a458c2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* basnam.c
   Get the base name of a file.  */

#include "uucp.h"

#include "uudefs.h"
#include "sysdep.h"
#include "system.h"

/* Get the base name of a file name.  */

char *
zsysdep_base_name (zfile)
     const char *zfile;
{
  const char *z;

  z = strrchr (zfile, '/');
  if (z != NULL)
    return zbufcpy (z + 1);
  return zbufcpy (zfile);
}
OpenPOWER on IntegriCloud