Re: [AD] Forced absolute grabber/dat object origin paths

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 2004-05-03, Hajie <hajie@xxxxxxxxxx> wrote:
> Version 3.1.2 is smart enough to keep relative paths, but I still have 
> problems, since it translates '/' into '\' and the 4.0.3 unix version 
> of dat can't find (say) "..\mybmp.bmp".

The following test case with the latest WIP:

#include <allegro.h>

int main(void)
{
    char path[256] = "..\\bitmap.bmp";
    allegro_init();
    allegro_message("Before %s\n", path);
    allegro_message("After %s\n", fix_filename_slashes(path));    
}
END_OF_MAIN();

...produces the output:

Before ..\bitmap.bmp
After ../bitmap.bmp




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