xref: /csrg-svn/usr.bin/uucp/libuu/lastpart.c (revision 17835)
1 #ifndef lint
2 static char sccsid[] = "@(#)lastpart.c	5.2 (Berkeley) 01/22/85";
3 #endif
4 
5 /*******
6  *	char *
7  *	lastpart(file)	find last part of file name
8  *	char *file;
9  *
10  *	return - pointer to last part
11  */
12 
13 char *
14 lastpart(file)
15 register char *file;
16 {
17 	register char *c;
18 	char *rindex();
19 
20 	c = rindex(file, '/');
21 	if (c)
22 		return c;
23 	else
24 		return file;
25 }
26