diff options
| author | svn2git <svn2git@FreeBSD.org> | 1994-05-01 08:00:00 +0000 |
|---|---|---|
| committer | svn2git <svn2git@FreeBSD.org> | 1994-05-01 08:00:00 +0000 |
| commit | a16f65c7d117419bd266c28a1901ef129a337569 (patch) | |
| tree | 2626602f66dc3551e7a7c7bc9ad763c3bc7ab40a /gnu/libexec/uucp/libunix/basnam.c | |
| parent | 8503f4f13f77abf7adc8f7e329c6f9c1d52b6a20 (diff) | |
Diffstat (limited to 'gnu/libexec/uucp/libunix/basnam.c')
| -rw-r--r-- | gnu/libexec/uucp/libunix/basnam.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gnu/libexec/uucp/libunix/basnam.c b/gnu/libexec/uucp/libunix/basnam.c new file mode 100644 index 000000000000..c61fcaa8de61 --- /dev/null +++ b/gnu/libexec/uucp/libunix/basnam.c @@ -0,0 +1,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); +} |
