confuse-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Confuse-devel] Section nesting (depth limit?)


From: Josh Kropf
Subject: [Confuse-devel] Section nesting (depth limit?)
Date: Fri, 21 Sep 2007 03:27:53 -0400
User-agent: RoundCube Webmail/0.1b

Hi all,

I have a config file something like this:

root "root" {
  menu "menu 1" {
    game { rom = "abc" title = "123" }
    ...
  }
  ...
}

Is there any limit to the depth of sections one can define?
I find that this causes an error in cfg_init, actually an
assertion failure at confuse.c:570.  If I ommit the code
that describes the root section, everything works fine.

Of cource, there is a strong possibility I am doing something
incorrect.  Here is my code, I am using libConfuse 2.5.

cfg_opt_t game_opts[] = {
   CFG_STR("rom", 0, CFGF_NODEFAULT),
   CFG_STR("title", 0, CFGF_NODEFAULT),
   CFG_STR("params", "", CFGF_NONE),
   CFG_END()
};

cfg_opt_t menu_opts[] = {
   CFG_SEC("game", game_opts, CFGF_MULTI),
   CFG_END()
};

cfg_opt_t root_opts[] = {
   CFG_SEC("menu", menu_opts, CFGF_TITLE | CFGF_MULTI),
   CFG_END()
};

cfg_opt_t opts[] = {
   CFG_SEC("root", root_opts, CFGF_TITLE),
   CFG_END()
};

cfg_t* cfg = cfg_init(opts, CFGF_NONE);






reply via email to

[Prev in Thread] Current Thread [Next in Thread]