--- libelwix/inc/elwix/avar.h 2013/01/17 10:05:35 1.1 +++ libelwix/inc/elwix/avar.h 2013/05/30 09:07:33 1.2 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: avar.h,v 1.1 2013/01/17 10:05:35 misho Exp $ +* $Id: avar.h,v 1.2 2013/05/30 09:07:33 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -340,7 +340,7 @@ typedef struct { * @vars = Variable array * return: -1 error, 0 nothing done or >0 size of marshaled data */ -inline int ait_vars2buffer(unsigned char * __restrict buf, int buflen, +int ait_vars2buffer(unsigned char * __restrict buf, int buflen, array_t * __restrict vars); /* * ait_buffer2vars() - De-marshaling data from buffer to array with variables @@ -352,7 +352,7 @@ inline int ait_vars2buffer(unsigned char * __restrict *DON'T MODIFY OR DESTROY BUFFER*. =0 call array_Free() before array_Destroy() * return: =NULL error, !=NULL allocated variable array, after use must free with array_Destroy() */ -inline array_t *ait_buffer2vars(unsigned char * __restrict buf, int buflen, int vnum, int zcpy); +array_t *ait_buffer2vars(unsigned char * __restrict buf, int buflen, int vnum, int zcpy); /* * ait_vars2map() - Marshaling data from array with variables to memory map * @@ -361,7 +361,7 @@ inline array_t *ait_buffer2vars(unsigned char * __rest * @vars = Variable array * return: -1 error, 0 nothing done or >0 size of marshaled data */ -inline int ait_vars2map(unsigned char * __restrict buf, int buflen, array_t * __restrict vars); +int ait_vars2map(unsigned char * __restrict buf, int buflen, array_t * __restrict vars); /* * ait_map2vars() - De-marshaling data from memory map to array with variables * @@ -372,7 +372,7 @@ inline int ait_vars2map(unsigned char * __restrict buf *DON'T MODIFY OR DESTROY BUFFER*. =0 call array_Free() before array_Destroy() * return: =NULL error, !=NULL allocated variable array, after use must free with array_Destroy() */ -inline array_t *ait_map2vars(unsigned char * __restrict buf, int buflen, int vnum, int zcpy); +array_t *ait_map2vars(unsigned char * __restrict buf, int buflen, int vnum, int zcpy); /* @@ -380,14 +380,14 @@ inline array_t *ait_map2vars(unsigned char * __restric * * return: NULL error or new variable, after use free variable with ait_freeVar() */ -inline ait_val_t *ait_allocVar(void); +ait_val_t *ait_allocVar(void); /* * ait_freeVar() - Free allocated memory for variable * * @val = Variable * return: none */ -inline void ait_freeVar(ait_val_t ** __restrict val); +void ait_freeVar(ait_val_t ** __restrict val); /* * ait_makeVar() - Allocate memory and fill variable * @@ -403,7 +403,7 @@ ait_val_t *ait_makeVar(ait_type_t type, ...); * @v = variable * return: return raw data */ -inline uint64_t ait_getlikeVar(ait_val_t * __restrict v); +uint64_t ait_getlikeVar(ait_val_t * __restrict v); /* * ait_setlikeVar() - Set variable like ... * @@ -413,7 +413,7 @@ inline uint64_t ait_getlikeVar(ait_val_t * __restrict * @... = data * return: -1 error or 0 ok */ -inline int ait_setlikeVar(ait_val_t * __restrict v, ait_type_t t, unsigned int l, ...); +int ait_setlikeVar(ait_val_t * __restrict v, ait_type_t t, unsigned int l, ...); /* * ait_sprintfVar() - Builtin string variable from formatted input * @@ -430,7 +430,7 @@ int ait_sprintfVar(ait_val_t * __restrict v, const cha * @b = 2nd variable * return: 0 is equal or !=0 is different */ -inline int ait_cmpVar(ait_val_t * __restrict a, ait_val_t * __restrict b); +int ait_cmpVar(ait_val_t * __restrict a, ait_val_t * __restrict b); /* * ait_hashVar() - Generate hash key for variable from string or value * @@ -447,21 +447,21 @@ unsigned short ait_hashVar(ait_val_t * __restrict v, c * @varnum = Number of variables * return: =NULL error or !=NULL allocated array */ -inline array_t *ait_allocVars(int varnum); +array_t *ait_allocVars(int varnum); /* * ait_clrVars() - Clear ait_val_t elements from array * * @vars = Variable array * return: -1 error or size of array */ -inline int ait_clrVars(array_t * __restrict vars); +int ait_clrVars(array_t * __restrict vars); /* * ait_freeVars() - Free ait_val_t array * * @vars = Variable array * return: none */ -inline void ait_freeVars(array_t ** __restrict vars); +void ait_freeVars(array_t ** __restrict vars); /* * ait_getVars() - Get ait_val_t element from array and if not exists allocate it * @@ -469,7 +469,7 @@ inline void ait_freeVars(array_t ** __restrict vars); * @n = index of variable into array * return: NULL error or !=NULL ait_val_t element */ -inline ait_val_t *ait_getVars(array_t ** __restrict vars, int n); +ait_val_t *ait_getVars(array_t ** __restrict vars, int n); /* * ait_sortVarsByKey() - Sorting array with variables by key * @@ -477,7 +477,7 @@ inline ait_val_t *ait_getVars(array_t ** __restrict va * @order = Sort order. If =0 ascend or !=0 descend * return: none */ -inline void ait_sortVarsByKey(array_t * __restrict vars, int order); +void ait_sortVarsByKey(array_t * __restrict vars, int order); /* * ait_sortVarsByVal() - Sorting array with variables by value * @@ -486,7 +486,7 @@ inline void ait_sortVarsByKey(array_t * __restrict var * @cmp = Custom compare function for sorting. If =NULL compare by value * return: none */ -inline void ait_sortVarsByVal(array_t * __restrict vars, int order, +void ait_sortVarsByVal(array_t * __restrict vars, int order, int (*cmp)(const void*, const void*)); /* * ait_findKeyVars() - Find variable by key from array @@ -503,14 +503,14 @@ ait_val_t *ait_findKeyVars(array_t * __restrict vars, * @key = Search string * return: NULL error or not found, !=NULL valid element */ -inline ait_val_t *ait_findKeyHash(array_t * __restrict vars, const char * __restrict key); +ait_val_t *ait_findKeyHash(array_t * __restrict vars, const char * __restrict key); /* * ait_hashKeyVars() - Generate hash keys for variables * * @vars = Variables * return -1 error or 0 ok */ -inline int ait_hashKeyVars(array_t * __restrict vars); +int ait_hashKeyVars(array_t * __restrict vars); #endif