Joseph Martin wrote:
> Hello,
>       I used DJGPP for DOS a while back which is a port of GCC to DOS.
> Since it was a port I assumed all functions would be common between GCC
> and DJGPP. However, I used a function in DOS called fnsplit, defined in
> dir.h, that would take a string and parse it into drive, path, and
> filename. I looked, but can't find it under GCC. Does anyone know of an
> equivalent function or algorithm I can use?
> 
> Thanks,
> 

Have a look at the source code for 'basename(1)' on linux or any
bsd system.  There are some subtleties not covered by the
strrchr('/') approach. (Which is adequate for most uses, though).

Dave
-- 
        Is the true purpose of Unix its use, or its administration?

Reply via email to