--- libaitio/inc/aitio.h 2011/12/12 12:42:27 1.12.2.8 +++ 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.8 2011/12/12 12:42:27 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 @@ -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