--- libaitio/inc/aitio.h 2011/11/03 14:56:48 1.12.2.7 +++ 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.7 2011/11/03 14:56:48 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 @@ -320,7 +320,7 @@ inline array_t *io_allocVars(u_int varnum); /* * io_clrVars() Clear ait_val_t elements from array * @vars = Variable array - * return: none + * return: size of array */ inline int io_clrVars(array_t * __restrict vars); /* @@ -521,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