Re: [AD] [4.2] allegro and mkstemp

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


On Thursday 07 December 2006 2:42 am, Peter Wang wrote:
> On 2006-12-07, Thomas Fjellstrom <tfjellstrom@xxxxxxxxxx> wrote:
> > On Thursday 07 December 2006 1:19 am, Peter Wang wrote:
> > > On 2006-12-07, Thomas Fjellstrom <tfjellstrom@xxxxxxxxxx> wrote:
> > > > On Thursday 07 December 2006 12:52 am, Peter Wang wrote:
> > > > > trying to fix pack_fopen_chunk(), and you're wanting to find the
> > > > > directory holding a file that a PACKFILE handle refers to.
> > > >
> > > > Nope. Its for an issue with Window's not implementing a useable
> > > > tmpnam or similar function.
> > >
> > > That's not our problem.
> >
> > Nor is many of the problems that allegro solves :P Allegro is here to
> > make the programmer's life easier. There is no platform independent way
> > of getting these folder's locations. It's yet another job allegro aught
> > to be doing.
>
> Maybe, maybe not.  You have to draw the line somewhere, and we are
> trying to stop enhancing the 4.2 series.

Yes, we can draw the line at most of what Qt includes ;) Allegro already has, 
and needs its own platform independant file io api, and a single extra 
function to grab a few specific directories is hardly a problem.

> > > > http://www.allegro.cc/forums/thread/588910/633332#target
> > >
> > > Yes, I read that, but I got the impression that the problem was due to
> > > Allegro's use of a temporary files in writing (reading?) datafiles that
> > > was the problem.
> >
> > I wasn't aware that was the real problem, but no, just using the
> > datafile's dir is NOT an option. Allegro itself then needs a platform
> > independent method of getting the "temp" dir's path.
>
> We can use the method of getting the temp directory which is already
> implemented in pack_fopen_chunk, then fallback to the datafile's
> directory.

Which is basically what I've done, but without so many _evil_ preprocessor 
hacks.

<Evert> Better, though I don't like ignoring the location for temporary files 
like that. Seems like TF's solution would be good.

> Peter
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

-- 
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx




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