confuse-devel
[Top][All Lists]
Advanced

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

[Confuse-devel] multy section manipulation


From: Vasya Novikov
Subject: [Confuse-devel] multy section manipulation
Date: Tue, 27 Dec 2005 10:34:13 +0300
User-agent: Mozilla Thunderbird 1.0.2-6 (X11/20050513)

I think it will be usefull to add functions to manipulate sections with
flag CFGF_MULTI.
I needed function to add such sections and it seems to work.

DLLIMPORT cfg_t * __export cfg_addmultisec(cfg_t *cfg, const char *name,
                                          const char *title)
{
   cfg_opt_t *opt = cfg_getopt(cfg, name);
   cfg_value_t *val = 0;

   assert(opt);
   assert(CFGT_SEC == opt->type);
   assert(is_set(CFGF_MULTI, opt->flags));

   val = cfg_setopt(cfg, opt, title);

   assert(val);

   return val->section;
}

Best regards,
   Vasya Novikov






reply via email to

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