home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 6 File / 06-File.zip / FILE39.ZIP / _getname.c next >
Encoding:
Text File  |  1993-04-04  |  293 b   |  13 lines

  1. /* EMX/gcc defines _getname() to retrieve a pointer to the filename part
  2.  of the path. Define this for MSC.
  3. */
  4.  
  5. char *_getname(char *path)
  6. {
  7.     int     i;
  8.  
  9.     for (i = strlen(path); i > 0; i--)
  10.         if (path[i-1] == ':' || path[i-1] == '/' || path[i-1] == '\\') break;
  11.     return (path + i);
  12. }
  13.