xref: /csrg-svn/usr.bin/uucp/libuu/lastpart.c (revision 62386)
148652Sbostic /*-
2*62386Sbostic  * Copyright (c) 1985, 1993
3*62386Sbostic  *	The Regents of the University of California.  All rights reserved.
448652Sbostic  *
548652Sbostic  * %sccs.include.proprietary.c%
648652Sbostic  */
748652Sbostic 
813660Ssam #ifndef lint
9*62386Sbostic static char sccsid[] = "@(#)lastpart.c	8.1 (Berkeley) 06/06/93";
1048652Sbostic #endif /* not lint */
1113660Ssam 
1223610Sbloom #include "uucp.h"
1323610Sbloom 
1423610Sbloom /*LINTLIBRARY*/
1523610Sbloom 
1623610Sbloom /*
1723610Sbloom  *	find last part of file name
1813660Ssam  *
1913660Ssam  *	return - pointer to last part
2013660Ssam  */
2113660Ssam 
2213660Ssam char *
lastpart(file)2313660Ssam lastpart(file)
2413660Ssam register char *file;
2513660Ssam {
2613660Ssam 	register char *c;
2713660Ssam 
2817835Sralph 	c = rindex(file, '/');
2923610Sbloom 	if (c++)
3023610Sbloom 		return c;
3117835Sralph 	else
3217835Sralph 		return file;
3313660Ssam }
34