Returns last component of a pathname. More...
Go to the source code of this file.
Functions | |
char * | basename (CONST char *path) |
Return the last component from a given pathname. |
Returns last component of a pathname.
* * $Log$ * Revision 1.2 2009/02/13 14:52:05 haraldkipp * Include memdebug.h for heap management debugging support. * * Revision 1.1 2006/08/01 07:42:56 haraldkipp * New functions extract last component and parent directory from pathnames. * * *
Definition in file basename.c.
char* basename | ( | CONST char * | path | ) |
Return the last component from a given pathname.
Trailing slashes are removed.
path | Pointer to the pathname. |
Definition at line 71 of file basename.c.
References CONST, ENAMETOOLONG, errno, malloc, strcpy(), and strlen().