[MPlayer-G2-dev] Re: cfg.h (config layer 0 discussion)

Andriy N. Gritsenko andrej at lucky.net
Mon May 19 15:45:23 CEST 2003


    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.



More information about the MPlayer-G2-dev mailing list