[GRASS-dev] [bug #4368] (grass) g.parser: pass through --o
Hamish
hamish_nospam at yahoo.com
Sun May 14 22:44:50 EDT 2006
> When I compiled after longer time GRASS again, I saw, that it was not
> consistent any more. There is new flag, which does something, what was
> solved IMHO better by the environment variable. To me looks new
> "--o" flag strange. It does not fill GRASS's concept.
it is a shortcut for "--overwrite"
> IF so, there should be single "-o" flag for *all* (suggested) modules
> - it would be more work, but it would be IMHO more clean, than this
> workaround.
There is already "-o" in modules that we cannot change (e.g. r.in.gdal).
For us, "-f" is always a module specific flag, "--word" is always a
global module flag.
Flags like -o, -h, -C should be avoided in future, if possible, to avoid
confusion.
Cedric:
> The only recent change was adding --o to the help. It was added to
> module help because it is specifically useful for modules that employ
> a new gisprompt.
is it added to GUIs as well?
It should be listed in the help pages as --overwrite. "--o" is just a
shortcut that works, like,
v.clean in=foo out=foo2*
instead of full input= and output=. Or omitting the first option name.
[*] using the same map name for both in= and out= with --o is bad, yes?
vectors modules do random access?
The lib/gis/parser.c test uses strncmp():
/* Overwrite option */
if ( strncmp(ptr,"--o", 3) == 0 || strncmp(ptr,"--overwrite",11) == 0 )
{
overwrite = 1;
}
The first half of that if(||) always catches the second half (as well as
"--over", etc.); demote the second half to a comment?
Hamish
More information about the grass-dev
mailing list