Re: [AD] SF.net SVN: alleg:[11071] allegro/branches/4.9/src/path.c |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: "Coordination of admins/developers of the game programming library Allegro" <alleg-developers@xxxxxxxxxx>
- Subject: Re: [AD] SF.net SVN: alleg:[11071] allegro/branches/4.9/src/path.c
- From: Thomas Fjellstrom <tfjellstrom@xxxxxxxxxx>
- Date: Sun, 12 Oct 2008 11:46:06 -0600
On Sunday 12 October 2008, Milan Mimica wrote:
> 2008/10/12 Thomas Fjellstrom <tfjellstrom@xxxxxxxxxx>:
> > I want to include the : in the drive name there.
>
> Me too.
>
> > mingw did exactly what I wanted to do, so I don't see how that change
> > "fixes" anything. You did make sure everything does what it did before
> > hand right? On mingw as well as msvc?
>
> Just by looking at the code you can see that it's wrong... You were
> checking if the second character in a path was '/', while a driver
> separator on Window is ':'.
> Anyways, without my changes:
>
> C:\cygwin\usr\src\4.9\examples\Debug>ex_path.exe C:\cygwin\bin\bash
> dyn: drive="(null)", file="bash"
> sta: drive="(null)", file="bash"
> tostring: 'C:/cygwin/bin/bash'
> tostring: drive:'(null)' dirs: 'C:', 'cygwin', 'bin' filename:'bash'
>
> With my changes:
>
> C:\cygwin\usr\src\4.9\examples\Debug>ex_path.exe C:\cygwin\bin\bash
> dyn: drive="C:", file="bash"
> sta: drive="C:", file="bash"
> tostring: 'C://cygwin/bin/bash'
> tostring: drive:'C:' dirs: '', 'cygwin', 'bin' filename:'bash'
>
> And no, I didn't test on mingw. It's just plain C code, shouldn't make
> any difference.
>
Funky. I know it did work...
> --
> Milan Mimica
> http://sparklet.sf.net
>
--
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx