Re: [AD] dat/grabber and pack_fopen_chunk

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


On Sunday, January 22, 2006, at 01:13  pm, Peter Wang wrote:

Apart from my above question, what would the proper fix be? I guess writing to the temp directory would be ok ($TEMP or $TMP should work for that in Windows as well as *NIX, right?), or writing to the same directory as the
PACKFILE.

Yes, it should probably try both.
You could use tmpfile (http://www.die.net/doc/linux/man/man3/tmpfile.3.html) for this on Linux and OSX. The 'same directory as the packfile' should be read-only on both these platforms (inside the App bundle for OSX and somewhere in /usr/local/share for a properly installed Linux app)

On Windows, Microsoft offer the strangely useless GetTempFileName function (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ fileio/fs/gettempfilename.asp) along with GetTempPath.

Pete





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