Re: cfg.h (config layer 0 discussion)

"Andriy N. Gritsenko" <[email protected]>
Newsgroups gmane.comp.video.mplayer.g2.devel
Message-ID <[email protected]>
    Hi, Arpi!

Sometime (on Monday, May 19 at 16:28) I've received something...
>> >Hmm, so the point is to make it easy to nest groups (as subconfigs)
>> >and add and remove items from them?

>> Yes. For nested groups and separators. :)

>Hmm. Do we really need nested groups??
>It adds extra complexity (recursive parsing instead of for()) to config
>layers, with very small advantage.

    But we have recursive parsing already for CONF_TYPE_SUBCONFIG. Beside
of that, this extra complexity is only one or two lines inside of parser
(depending on implementation), for example (before strcmp, of course):

if (opt->type==CONF_TYPE_GROUP && (err=read_config(....))==ERR_NOT_AN_OPTION)
  continue;

and I don't think if that advantage is too small. It'll allow you don't
create own type of option if you use a GUI and don't add lines above in
the GUI's config parser in that case but use default. :)

    With best wishes.
    Andriy.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.