Re: [AD] Relative paths in the grabber

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


On Sun, May 11, 2003 at 02:20:36PM +0200, Eric Botcazou wrote:
> Thanks for the patience.

Sure :)

> > There are also two new options in the item options box: one to convert
> > paths to relative and one to convert to absolute. These work on mutiple
> > selections as well.
> 
> Two minor nits: the first letter of each word must be capitalized in the new 
> sub-menu. And you didn't provice shortcuts for "relative" and "absolute". 
> See for example "Change type".

Ok. I didn't capitalize those because in my mind, the sentence after Change type
continues: Change type (to relative) or Change type (to absolute). Will fix.
 
> The algorithm looks ok. I think we can apply some local optimizations though: 

Ok. I'm not very familiar with Allegro's unicode functions, so I probably missed
some other optimizations aw well.

> >  - because the point (for me) of adding relative paths is easy
> > compatibility between DOS/Windows and Linux, absolute paths use the / path
> > seperator consistently. This is conterary to the standard Allegro
> > practice, where \ is used by default on DOS/Windows.
> 
> This will break non-GNU ports on DOS/Windows.

Are you sure? I thought DOS and Windows recognized / regardless (I sometimes
type / accidentally instead of \ and it usually works anyway). Anyway, it's
ugly and we can't, of course, break non-GNU ports if that is rge consequence.

> > I've had to introduce a char *fix_filename_forward_slashes(char *filename)
> > that converts all \ path seperators to /. I don't think it's particularly
> > elegant and I feel it's out of place in the grabber. I'm not sure where
> > else to put it, though... (or maybe there is already an Allegro internal
> > symbol that does something similar? Are internal functions documented
> > anywhere beside the source?)
> 
> We don't need it at all.

I vaguely recall having some sort of trouble without it, but I don't remember
what it was. I'll see about reworking the code.

Evert




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