--- libaitio/inc/aitio.h 2011/11/03 14:22:03 1.12.2.6 +++ libaitio/inc/aitio.h 2011/12/12 14:45:19 1.12.2.9 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitio.h,v 1.12.2.6 2011/11/03 14:22:03 misho Exp $ +* $Id: aitio.h,v 1.12.2.9 2011/12/12 14:45:19 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -318,6 +318,12 @@ array_t *io_map2vars(u_char *buf, int buflen, int vnum */ inline array_t *io_allocVars(u_int varnum); /* + * io_clrVars() Clear ait_val_t elements from array + * @vars = Variable array + * return: size of array + */ +inline int io_clrVars(array_t * __restrict vars); +/* * io_freeVars() Free ait_val_t array * @vars = Variable array * return: none @@ -515,6 +521,14 @@ int io_arrayVacuum(array_t * __restrict arr, int fromW *((_arr)->arr_data + _d) = NULL; \ } while (0) +/* + * io_arrayElem() - Always GET/PUT element into dynamic array, if not enough elements grow array + * @arr = Array + * @n = Position + * @data = Element, if set NULL GET element at position or !=NULL PUT element at position + * return: -1 error or !=-1 return element at position + */ +inline void *io_arrayElem(array_t * __restrict arr, int n, void **data); /* * io_arrayPush() - Push element into dynamic array like stack manner, place at first empty position * @arr = Array