This is the mail archive of the glibc-linux@ricardo.ecn.wfu.edu mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Broken basename()


On Tue, Jun 01, 1999 at 06:46:01PM -0700, Felix Morley Finch elucidated:
> 
> > If you are just stripping the path, you could just do something like:
> 
> > progname = (tmpptr = strrchr(argv[0],'/')) ? tmpptr + 1 : argv[0];
> 
> No, please no.  I have trouble right now with sources like that which
> have to be ported to NT.  Every single occurrence has one forward
> version and one backward version (pun intended!).  That's the reason
> for using well-defined functions, to avoid that kind of system
> dependency.
> 

Actually I'm kind of surprised that wouldn't work on NT, but then again,
maybe I ain't.  Oh, right NT uses \ instead of /, forgot, sorry.  Otherwise
I would think it would still work.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dale Harris  <rodmur@maybe.org>   GPG key: 372FBD57    http://www.maybe.org/
"I'd rather have this bottle in front of me, than a frontal lobotomy."

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]