version 1.8.4.1, 2013/01/17 13:42:10
|
version 1.10.2.1, 2014/01/30 08:13:09
|
Line 12 terms:
|
Line 12 terms:
|
All of the documentation and software included in the ELWIX and AITNET |
All of the documentation and software included in the ELWIX and AITNET |
Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org> |
Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org> |
|
|
Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 | Copyright 2004 - 2014 |
by Michael Pounov <misho@elwix.org>. All rights reserved. |
by Michael Pounov <misho@elwix.org>. All rights reserved. |
|
|
Redistribution and use in source and binary forms, with or without |
Redistribution and use in source and binary forms, with or without |
Line 51 SUCH DAMAGE.
|
Line 51 SUCH DAMAGE.
|
int cfg_Errno; |
int cfg_Errno; |
char cfg_Error[STRSIZ]; |
char cfg_Error[STRSIZ]; |
|
|
inline int | int |
cfg_Write(FILE *f, char *fmt, ...) |
cfg_Write(FILE *f, char *fmt, ...) |
{ |
{ |
int ret = 0; |
int ret = 0; |
Line 64 cfg_Write(FILE *f, char *fmt, ...)
|
Line 64 cfg_Write(FILE *f, char *fmt, ...)
|
return ret; |
return ret; |
} |
} |
|
|
inline int | int |
cfg_tree_cmp(struct tagCfg *a, struct tagCfg *b) |
cfg_tree_cmp(struct tagCfg *a, struct tagCfg *b) |
{ |
{ |
int ret; |
int ret; |
Line 88 RB_GENERATE(tagRC, tagCfg, cfg_node, cfg_tree_cmp);
|
Line 88 RB_GENERATE(tagRC, tagCfg, cfg_node, cfg_tree_cmp);
|
|
|
|
|
// cfg_GetErrno() Get error code of last operation |
// cfg_GetErrno() Get error code of last operation |
inline int | int |
cfg_GetErrno() |
cfg_GetErrno() |
{ |
{ |
return cfg_Errno; |
return cfg_Errno; |
} |
} |
|
|
// cfg_GetError() Get error text of last operation |
// cfg_GetError() Get error text of last operation |
inline const char * | const char * |
cfg_GetError() |
cfg_GetError() |
{ |
{ |
return cfg_Error; |
return cfg_Error; |
} |
} |
|
|
// cfg_SetErr() Set error to variables for internal use!!! |
// cfg_SetErr() Set error to variables for internal use!!! |
inline void | void |
cfg_SetErr(int eno, char *estr, ...) |
cfg_SetErr(int eno, char *estr, ...) |
{ |
{ |
va_list lst; |
va_list lst; |
Line 129 cfgInitConfig(cfg_root_t * __restrict cfg)
|
Line 129 cfgInitConfig(cfg_root_t * __restrict cfg)
|
|
|
pthread_mutex_init(&cfg->rc_mtx, NULL); |
pthread_mutex_init(&cfg->rc_mtx, NULL); |
|
|
SLIST_INIT(cfg); | TAILQ_INIT(cfg); |
RB_INIT(cfg); |
RB_INIT(cfg); |
return 0; |
return 0; |
} |
} |
Line 180 cfgClearConfig(cfg_root_t * __restrict cfg)
|
Line 180 cfgClearConfig(cfg_root_t * __restrict cfg)
|
return; |
return; |
|
|
CFG_RC_LOCK(cfg); |
CFG_RC_LOCK(cfg); |
while ((av = SLIST_FIRST(cfg))) { | while ((av = TAILQ_FIRST(cfg))) { |
SLIST_REMOVE_HEAD(cfg, cfg_next); | TAILQ_REMOVE(cfg, av, cfg_next); |
|
|
AIT_FREE_VAL(&av->cfg_val); |
AIT_FREE_VAL(&av->cfg_val); |
AIT_FREE_VAL(&av->cfg_attr); |
AIT_FREE_VAL(&av->cfg_attr); |