httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@algroup.co.uk>
Subject Re: cvs commit: apache-2.0/src/lib/apr/lib apr_cpystrn.c
Date Thu, 14 Oct 1999 09:29:38 GMT
Brian Havard wrote:
> 
> On 13 Oct 1999 21:31:50 -0400, Ben Hyde wrote:
> 
> >Dean Gaudet <dgaudet@arctic.org> writes:
> >
> >> on win32, both / and \ are path separators... no?  (or is this only used
> >> in situations where we've changed / to \ ?)
> >>
> >> Dean
> >
> >I wrote that...
> >
> >This was distilled out of main, and it's used to get the
> >program name off of what every pathname the user invoked
> >it with.  Of course now that it's in APR it ought to be
> >right.  "Right", presumably meaning, get the last term off
> >of the pathname presuming that the pathname is in the
> >syntax of the current platform.  VMS ports will suffer
> >as they usually do.
> >
> >I don't have, nor did I look at any, doc at hand right now.
> >My memory is that "/" is not a "seperator" on windows.  I
> >do recall that when I once looked very hard for doc on the
> >exact lexical structure of filenames I never did find it.
> >I believe that they put "/" into the set of character that
> >users are advised to avoid, and some UI attempts to enforce
> >that, while the OS API doesn't.
> >
> >Of course many programs and shells are quite - ah - friendly
> >about converting "/" into "\" in their UI.
> 
> Win32, OS/2 and even DOS all accept both / and \ as path separators at the
> API level. It's only the command line interpreter that treats / as a switch
> character.

Depends which API. If you want everything to work, you have to use \.

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
     - Indira Gandhi

Mime
View raw message