2 |
This file is in the public domain. */ |
This file is in the public domain. */ |
3 |
|
|
4 |
/* |
/* |
|
NAME |
|
|
basename -- return pointer to last component of a pathname |
|
5 |
|
|
6 |
SYNOPSIS |
@deftypefn Supplemental char* basename (const char *@var{name}) |
7 |
char *basename (const char *name) |
|
8 |
|
Returns a pointer to the last component of pathname @var{name}. |
9 |
|
Behavior is undefined if the pathname ends in a directory separator. |
10 |
|
|
11 |
|
@end deftypefn |
12 |
|
|
|
DESCRIPTION |
|
|
Given a pointer to a string containing a typical pathname |
|
|
(/usr/src/cmd/ls/ls.c for example), returns a pointer to the |
|
|
last component of the pathname ("ls.c" in this case). |
|
|
|
|
|
BUGS |
|
|
Presumes a UNIX or DOS/Windows style path with UNIX or DOS/Windows |
|
|
style separators. |
|
13 |
*/ |
*/ |
14 |
|
|
15 |
#include "ansidecl.h" |
#include "ansidecl.h" |