[GRASS5] filenames in GRASS database/r.mask

Glynn Clements glynn.clements at virgin.net
Fri May 11 11:08:04 EDT 2001


Markus Neteler wrote:

> > > Or, perhaps, we should disallow hyphens in GRASS database files?
> > 
> > Probably the best solution... in ascii, there is no difference
> > between hyphen and minus.  Grass has a function for verifying
> > the validity of database's file names G_legal_filename() which
> > may be updated.  It looks actually :

[snip]

> An addition: I feel that "=" is even no allowed character. It can
> be specified (on command line), later you run into troubles when
> trying to use the map (on command line).

Given the frequent usage of system(), I suspect that many of the
non-alphanumeric characters will cause problems with many commands.

For 5.1, we should seriously consider eradicating the use of system()
altogether.

Even for 5.0, it might be worth systematically inserting quotes into
command strings, e.g. changing

	sprintf(buf, "r.foo %s", filename);
to
	sprintf(buf, "r.foo '%s'", filename);

This should handle any filename which doesn't contain a single quote
character.

-- 
Glynn Clements <glynn.clements at virgin.net>

---------------------------------------- 
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'



More information about the grass-dev mailing list