[GRASS5] d.legend and d.out.png
Glynn Clements
glynn.clements at virgin.net
Sat Aug 21 17:58:56 EDT 2004
Michael Barton wrote:
> Neither d.erase nor d.redraw are set up to run through g_parser(). AFAICT,
> d.redraw doesn't have any options anyway.
d.erase has one option, color=, but it only calls G_parser() if
argc>1, so running it without any arguments will use the default
setting rather than prompting the user for a value.
A few other commands behave similarly. Specifically:
$ find src -name main.c | xargs fgrep G_parser | grep 'if \?(argc'
src/display/d.erase/main.c: if (argc > 1 && G_parser(argc, argv))
src/display/d.extend/cmd/main.c: if(argc > 1 && G_parser(argc, argv))
src/display/d.measure/cmd/main.c: if (argc > 1 && G_parser(argc,argv))
src/display/d.pan/main.c: if (argc > 1 && G_parser(argc,argv))
src/display/d.where/cmd/main.c: if (argc > 1 && G_parser(argc,argv))
src/display/d.info/main.c: if (argc > 1 && G_parser(argc, argv))
src/general/g.version/main.c: if (argc > 1 && G_parser(argc, argv))
src/paint/Programs/p.chart/main.c: if (argc > 1 && G_parser(argc, argv))
Personally, I think that the user should only be prompted if no
arguments are given but the program can't be run that way, i.e. if it
has at least one non-optional argument.
--
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-dev
mailing list