<div dir="ltr">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:<div>
<br></div><div><div>This version prints more correct errors because only present options/flags will be displayed in errors, but too much typing.</div><div>    G_option_exclusive(flag.regex, flag.extended, NULL);</div><div>
    G_option_exclusive(flag.pretty, flag.full, NULL);</div><div>    G_option_exclusive(flag.pretty, opt.output, NULL);</div><div>    G_option_exclusive(flag.pretty, flag.mapset, NULL);</div><div>    G_option_exclusive(flag.pretty, flag.type, NULL);</div>
<div>    G_option_exclusive(flag.full, opt.output, NULL);</div><div>    G_option_exclusive(flag.full, flag.mapset, NULL);</div><div>    G_option_exclusive(flag.full, flag.type, NULL);</div><div><br></div><div>This version is shorter, but -p -f will print three errors including options/flags not present.</div>
<div>    G_option_exclusive(flag.regex, flag.extended, NULL);</div><div>    G_option_exclusive(flag.pretty, flag.full, opt.output, NULL);</div><div>    G_option_exclusive(flag.pretty, flag.full, flag.mapset, NULL);</div><div>
    G_option_exclusive(flag.pretty, flag.full, flag.type, NULL);</div></div><div><br></div><div>Can we implement something like G_option_exclusive(pretty, full, G_option_or(output, mapset, type))?</div><div><br></div><div>
pretty, full, and any of output, mapset, and type are mutually exclusive, but output, mapset, and type are not exclusive.</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Thu, Jun 19, 2014 at 1:42 PM, Huidae Cho <span dir="ltr"><<a href="mailto:grass4u@gmail.com" target="_blank">grass4u@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Looks good to me. I'll try it with g.mlist/g.mremove later.</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 19, 2014 at 10:58 AM, Glynn Clements <span dir="ltr"><<a href="mailto:glynn@gclements.plus.com" target="_blank">glynn@gclements.plus.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><br>
Glynn Clements wrote:<br>
<br>
> I'll make a start on this.<br>
<br>
</div>A first draft of the code has been added in r60871. Not tested yet.<br>
<span><font color="#888888"><br>
--<br>
Glynn Clements <<a href="mailto:glynn@gclements.plus.com" target="_blank">glynn@gclements.plus.com</a>><br>
</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br></div>