1*13660Ssam #ifndef lint 2*13660Ssam static char sccsid[] = "@(#)lastpart.c 5.1 (Berkeley) 07/02/83"; 3*13660Ssam #endif 4*13660Ssam 5*13660Ssam /******* 6*13660Ssam * char * 7*13660Ssam * lastpart(file) find last part of file name 8*13660Ssam * char *file; 9*13660Ssam * 10*13660Ssam * return - pointer to last part 11*13660Ssam */ 12*13660Ssam 13*13660Ssam char * 14*13660Ssam lastpart(file) 15*13660Ssam register char *file; 16*13660Ssam { 17*13660Ssam register char *c; 18*13660Ssam 19*13660Ssam c = file + strlen(file); 20*13660Ssam while (c >= file) 21*13660Ssam if (*(--c) == '/') 22*13660Ssam break; 23*13660Ssam return(++c); 24*13660Ssam } 25