xref: /original-bsd/usr.bin/uucp/libuu/lastpart.c (revision c3e32dec)
1 /*-
2  * Copyright (c) 1985, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * %sccs.include.proprietary.c%
6  */
7 
8 #ifndef lint
9 static char sccsid[] = "@(#)lastpart.c	8.1 (Berkeley) 06/06/93";
10 #endif /* not lint */
11 
12 #include "uucp.h"
13 
14 /*LINTLIBRARY*/
15 
16 /*
17  *	find last part of file name
18  *
19  *	return - pointer to last part
20  */
21 
22 char *
23 lastpart(file)
24 register char *file;
25 {
26 	register char *c;
27 
28 	c = rindex(file, '/');
29 	if (c++)
30 		return c;
31 	else
32 		return file;
33 }
34