--- libaitcfg/inc/aitcfg.h 2009/09/23 14:20:53 1.2.2.3 +++ libaitcfg/inc/aitcfg.h 2009/10/20 12:23:46 1.3.2.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitcfg.h,v 1.2.2.3 2009/09/23 14:20:53 misho Exp $ +* $Id: aitcfg.h,v 1.3.2.1 2009/10/20 12:23:46 misho Exp $ * *************************************************************************/ #ifndef __AITCFG_H @@ -25,6 +25,12 @@ typedef struct tagHead sl_config; /* + * Macros for config library. Typecast string to specific config string format. +*/ +#define CFG(x) (unsigned char *)(x) + + +/* * InitConfig() Head initializing function for config * @cfg = New head element for init * return: 0 ok; -1 error:: new head element is null @@ -94,6 +100,14 @@ int cfg_WriteConfig(FILE *f, sl_config * __restrict cf * return: 0 ok; -1 error:: can`t concat lists */ int ConcatConfig(sl_config * __restrict cfg, sl_config * __restrict add_cfg); + +/* + * MergeConfig() Marge two list in one cfg and destroy add_cfg + * @cfg = Head list element of main list + * @add_cfg = Head list element of merged list (destroy after all!) + * return: 0 ok; -1 error:: can`t merge lists +*/ +int MergeConfig(sl_config * __restrict cfg, sl_config * __restrict add_cfg); /*