home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_progs / prog_c / edlib.lzh / EDLIB / BASENAME.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-16  |  314 b   |  15 lines

  1. /*
  2.  * edlib v1.1 Copyright 1989 Edwin Hoogerbeets
  3.  * This code is freely redistributable as long as no charge other than
  4.  * reasonable copying fees are levied for it.
  5.  */
  6. #include "edlib.h"
  7.  
  8. char *basename(buf)
  9. register char *buf;
  10. {
  11.   register char *foo = strrpbrk(buf,":/");
  12.  
  13.   return( foo ? (foo + 1) : buf );
  14. }
  15.