[GRASS5] g.region G_usage() commented out?

Glynn Clements glynn.clements at virgin.net
Wed May 15 11:17:50 EDT 2002


Russell Nelson wrote:

>  > However, the mechanism which is used involves calling library
>  > functions before G_parser() has returned, which would stop working if
>  > we were implement "standard" options such as "location=".
> 
> So, you're saying that the entire die() function is not wisely implemented?

No, I'm saying that the way in which the "description" fields are
initialised isn't a good idea.

Basically, I'm opposed to main() calling anything other than a few
specific functions[1] before G_parser() has returned.

The main reason is to allow the parser to support some "built in"
options (e.g. location=, mapset=, monitor=), in the same way that all
Xt-based programs support -display, -bg, -fg, -font etc.

A secondary reason is that, when the "help" or "--interface-description"
switches are used, the output depends upon the context (current
location, mapset, region, monitor etc), but with no indication that this
is the case.

[1] G_gisinit, G_define_module, G_define_{option,flag}.

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



More information about the grass-dev mailing list