version 1.6.4.1, 2012/04/02 14:39:02
|
version 1.6.4.2, 2012/04/02 15:12:15
|
Line 168 int MergeConfig(sl_config * __restrict cfg, sl_config
|
Line 168 int MergeConfig(sl_config * __restrict cfg, sl_config
|
* @cfg = Config root |
* @cfg = Config root |
* @csSec = Config section //[{csSec}] |
* @csSec = Config section //[{csSec}] |
* @csAttr = Config attribute //{csAttr} = ... |
* @csAttr = Config attribute //{csAttr} = ... |
* return: 0 not found item; -1 error: null parameters; >0 position in list | * return: 0 not found item, -1 error or >0 position in list |
*/ |
*/ |
inline int cfg_findAttribute(cfg_root_t * __restrict cfg, |
inline int cfg_findAttribute(cfg_root_t * __restrict cfg, |
const char *csSec, const char *csAttr); |
const char *csSec, const char *csAttr); |
Line 178 inline int cfg_findAttribute(cfg_root_t * __restrict c
|
Line 178 inline int cfg_findAttribute(cfg_root_t * __restrict c
|
* @cfg = Config root |
* @cfg = Config root |
* @csSec = Config section //[{csSec}], if NULL unset in *default* section |
* @csSec = Config section //[{csSec}], if NULL unset in *default* section |
* @csAttr = Config attribute //{csAttr} = ..., if NULL unset as *any* attribute |
* @csAttr = Config attribute //{csAttr} = ..., if NULL unset as *any* attribute |
* return: NULL item not found or null parameters; !=NULL value const string | * return: NULL item not found or null parameters, !=NULL value const string |
*/ |
*/ |
inline const char *cfg_getAttribute(cfg_root_t * __restrict cfg, |
inline const char *cfg_getAttribute(cfg_root_t * __restrict cfg, |
const char *csSec, const char *csAttr); |
const char *csSec, const char *csAttr); |
|
|
#if 0 |
|
/* |
/* |
* cfg_SetAttribute() Set item in config list or add new item if not exists | * cfg_setAttribute() - Set item in config or adding new item if not exists |
* @cfg = Head list element | * |
| * @cfg = Config root |
* @csSec = Config section //[{csSec}], if NULL set in *default* section |
* @csSec = Config section //[{csSec}], if NULL set in *default* section |
* @csAttr = Config attribute //{csAttr} = ..., if NULL set as *any* attribute | * @csAttr = Config attribute //{csAttr} = ... |
* @csVal = Config value //... = {csVal} to setup |
* @csVal = Config value //... = {csVal} to setup |
* return: 0 nothing changed, -1 error: not enough memory; 1 find and update item; 2 added new item | * return: 0 nothing changed, -1 error, 1 found and updated item or 2 added new item |
*/ | */ |
int cfg_SetAttribute(sl_config * __restrict cfg, const u_char *csSec, const u_char *csAttr, const u_char *csVal); | int cfg_setAttribute(cfg_root_t * __restrict cfg, const char *csSec, |
| const char *csAttr, const char *csVal); |
| |
| #if 0 |
/* |
/* |
* cfg_UnsetAttribute() Unset item from config list and free resources |
* cfg_UnsetAttribute() Unset item from config list and free resources |
* @cfg = Head list element |
* @cfg = Head list element |
Line 201 int cfg_SetAttribute(sl_config * __restrict cfg, const
|
Line 203 int cfg_SetAttribute(sl_config * __restrict cfg, const
|
* return: 0 item not found, -1 error: null parameters; >0 position in list |
* return: 0 item not found, -1 error: null parameters; >0 position in list |
*/ |
*/ |
int cfg_UnsetAttribute(sl_config * __restrict cfg, const u_char *csSec, const u_char *csAttr); |
int cfg_UnsetAttribute(sl_config * __restrict cfg, const u_char *csSec, const u_char *csAttr); |
/* |
|
* cfg_GetAttribute() Get item from config list and return his value |
|
* @cfg = Head list element |
|
* @csSec = Config section //[{csSec}], if NULL unset in *default* section |
|
* @csAttr = Config attribute //{csAttr} = ..., if NULL unset as *any* attribute |
|
* return: NULL item not found or null parameters; !=NULL value const string |
|
*/ |
|
inline const u_char *cfg_GetAttribute(sl_config * __restrict cfg, const u_char *csSec, const u_char *csAttr); |
|
|
|
/* |
/* |
* cfg_LoadAttribute() Extended get attribute, if not found item return *default value* |
* cfg_LoadAttribute() Extended get attribute, if not found item return *default value* |