[GRASS-dev] g.rename consolidation

Glynn Clements glynn at gclements.plus.com
Wed Feb 21 12:35:33 EST 2007


Martin Landa wrote:

> I have tried to consolidate g.rename module with g.copy/g.remove
> modules. I hope I did it in the right way. The messages like
> 
> raster: renamed
> header: renamed
> category: renamed
> color: renamed
> history: renamed
> misc: renamed
> fcell: missing
> g3dcell: missing
> colr2/martin: missing
> 
> are printed out only in maximum level of verbosity.
> 
> The message
> 
> Rename <el> to <el1>
> 
> is now also printed when GRASS_VERBOSITY is "1". I vote for using
> *G_message*, not fprintf() for this puspose. The verbosity level "1"
> should be used only for G_percent(), not for "standard" messages at
> all.

There needs to be a new function for messages which allows specifying
the verbosity level.

Rather than individual modules having to do:

	if (G_verbose() >= level)
		G_message(...);

they would do e.g.:

	G_message_ex(level, ...);

The new function would check the verbosity level.

The current mechanism is just making the code messy.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list