[GRASS-dev] [GRASS-SVN] r60703 - in grass/trunk: display/d.vect general/g.gisenv gui/wxpython/animation lib/python/temporal raster/r.colors raster/r.external raster/r.in.bin raster/r.mapcalc raster/r.neighbors raster/r.out.bin raster/r.quant raster/r.resamp.filter raster/r.series raster/r.series.accumulate raster/r.series.interp raster/r.stats.quantile vector/v.colors vector/v.external.out
Huidae Cho
grass4u at gmail.com
Thu Jun 19 16:02:46 PDT 2014
I assume G__check_option_rules() is supposed to be called by G_parser().
Then, instead of calling G_fatal_error, it should append errors to
st->errors. If so... for g.mlist we can define two different versions of
rules:
This version prints more correct errors because only present options/flags
will be displayed in errors, but too much typing.
G_option_exclusive(flag.regex, flag.extended, NULL);
G_option_exclusive(flag.pretty, flag.full, NULL);
G_option_exclusive(flag.pretty, opt.output, NULL);
G_option_exclusive(flag.pretty, flag.mapset, NULL);
G_option_exclusive(flag.pretty, flag.type, NULL);
G_option_exclusive(flag.full, opt.output, NULL);
G_option_exclusive(flag.full, flag.mapset, NULL);
G_option_exclusive(flag.full, flag.type, NULL);
This version is shorter, but -p -f will print three errors including
options/flags not present.
G_option_exclusive(flag.regex, flag.extended, NULL);
G_option_exclusive(flag.pretty, flag.full, opt.output, NULL);
G_option_exclusive(flag.pretty, flag.full, flag.mapset, NULL);
G_option_exclusive(flag.pretty, flag.full, flag.type, NULL);
Can we implement something like G_option_exclusive(pretty, full,
G_option_or(output, mapset, type))?
pretty, full, and any of output, mapset, and type are mutually exclusive,
but output, mapset, and type are not exclusive.
On Thu, Jun 19, 2014 at 1:42 PM, Huidae Cho <grass4u at gmail.com> wrote:
> Looks good to me. I'll try it with g.mlist/g.mremove later.
>
>
> On Thu, Jun 19, 2014 at 10:58 AM, Glynn Clements <glynn at gclements.plus.com
> > wrote:
>
>>
>> Glynn Clements wrote:
>>
>> > I'll make a start on this.
>>
>> A first draft of the code has been added in r60871. Not tested yet.
>>
>> --
>> Glynn Clements <glynn at gclements.plus.com>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20140619/be98d71a/attachment.html>
More information about the grass-dev
mailing list