[GRASS-dev] simplify G_convert_dirseps_to_host(G_tempfile()) ?
Glynn Clements
glynn at gclements.plus.com
Mon Jun 18 15:16:14 EDT 2007
Paul Kelly wrote:
> FWIW I've attached my proposed changes to lib/gis/tempfile.c that I still
> have in my local source tree. They were intended to split the usage of
> G_tempfile() between modules that are genuinely using it as a tempfile for
> creating large temporary maps as was originally intended, and those that
> are just using it as a general small tempfile function. They also make
> some changes to make it more Windows compatible. But we decided they were
> too controversial to commit in case they broke things - maybe in some way
> we can eventually merge them though.
A safe starting point would be to:
1. Rename G__tempfile() to G__tempfile_in_mapset().
2. Add:
char *G__tempfile(int pid)
{
return G__tempfile_in_mapset(pid);
}
3. Change opencell.c (and anything else known to require the existing
behaviour) to use G__tempfile_in_mapset() instead of G__tempfile().
Once that's done, any new G__tempfile() implementation can easily be
reverted if it's found to cause problems.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list