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 ]


On Sunday 12 October 2008, mmimica@xxxxxxxxxx wrote:
> Revision: 11071
>           http://alleg.svn.sourceforge.net/alleg/?rev=11071&view=rev
> Author:   mmimica
> Date:     2008-10-12 10:41:58 +0000 (Sun, 12 Oct 2008)
>
> Log Message:
> -----------
> Fixed parsing a drive path component on Windows.
>
> Modified Paths:
> --------------
>     allegro/branches/4.9/src/path.c
>
> Modified: allegro/branches/4.9/src/path.c
> ===================================================================
> --- allegro/branches/4.9/src/path.c	2008-10-12 10:39:31 UTC (rev 11070)
> +++ allegro/branches/4.9/src/path.c	2008-10-12 10:41:58 UTC (rev 11071)
> @@ -67,6 +67,7 @@
>     char *path_info = NULL, *path_info_end = NULL;
>     int32_t path_info_len = 0;
>     const char dirsep = '/';
> +   const char drivesep = ':';
>
>  #ifdef ALLEGRO_WINDOWS
>     // UNC \\server\share name
> @@ -101,7 +102,7 @@
>        *drive = uncdrive;
>     }
>     // drive name
> -   else if (ugetc(ptr) != dirsep && ugetat(ptr, 1) == dirsep) {
> +   else if (ugetc(ptr) != dirsep && ugetat(ptr, 1) == drivesep) {
>        char *tmp = NULL;
>
>        tmp = _ustrduprange(ptr, ptr+uoffset(ptr, 2));
>

Believe it or not, that was intentional. I want to include the : in the drive 
name there. Makes the rest of the code simpler. 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?

-- 
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/