[GRASS-dev] Verbosity in parser usage message

Paul Kelly paul-grass at stjohnspoint.co.uk
Tue Aug 14 16:55:14 EDT 2007


I committed a change to lib/gis/parser.c to the effect that, if there is 
an error in the user-specified parameters for a module, after that error 
is printed, the Usage message will now not be printed if the verbosity 
level is set to quiet. I hope this is OK - to me it seems to tie in with 
the documentation that only errors and warnings are printed when verbosity 
is set to quiet.

It is of use in GUI dialogs when displaying the error message from a 
module to a user without having all the usage information getting in the 
way. Specifically for some improvements to error reporting when creating a 
new location using gis_set.tcl, which I will commit soon.

I was wondering also why it has to be written like
if(G_verbose() > G_verbose_min())

i.e. why is the minimum verbosity level not just a compile-time constant 
like G_MINIMIUM_VERBOSITY or something like that. Seems like a bit of 
extra overhead to have to call a function. But I suppose not very 
important.

Paul




More information about the grass-dev mailing list