home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magazyn Exec 5
/
CD_Magazyn_EXEC_nr_5.iso
/
Recent
/
comm
/
mail
/
YAM23src.lha
/
Source
/
extrasrc
/
stcgfn.c
< prev
next >
Wrap
C/C++ Source or Header
|
2000-12-15
|
353b
|
20 lines
#include <string.h>
#include "extra.h"
/* Get the base name. */
int stcgfn(char *node, const char *name)
{
const char *p = name + strlen(name);
const char *q = p;
while (p > name && p[-1] != '/' && p[-1] != ':')
--p;
if (q - p < FNSIZE)
{
memcpy(node, p, q - p + 1);
return q - p;
}
*node = '\0';
return 0;
}