--- libaitio/src/Attic/sarray.c 2011/10/31 13:53:51 1.5 +++ libaitio/src/Attic/sarray.c 2012/03/29 01:31:34 1.6 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: sarray.c,v 1.5 2011/10/31 13:53:51 misho Exp $ +* $Id: sarray.c,v 1.6 2012/03/29 01:31:34 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -12,7 +12,7 @@ terms: All of the documentation and software included in the ELWIX and AITNET Releases is copyrighted by ELWIX - Sofia/Bulgaria -Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 +Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 by Michael Pounov . All rights reserved. Redistribution and use in source and binary forms, with or without @@ -48,6 +48,7 @@ SUCH DAMAGE. /* * io_sarrInit() - Create and initialize dynamic split-order array + * * @numItems = Number of Items * @segLen = Length of segment * return: NULL error, != NULL allocated memory for array @@ -82,6 +83,7 @@ io_sarrInit(int numItems, int segLen) /* * io_sarrDestroy() - Free all data in dynamic split-order array and Destroy array + * * @parr = Array * return: none */ @@ -107,6 +109,7 @@ io_sarrDestroy(sarr_t ** __restrict parr) /* * io_sarrCopy() Copy source split array to destination split array + * * @dest = Destination split array, after use free with io_sarrDestroy() * @src = Source split array * return: -1 error; >0 count of destination split array @@ -129,6 +132,7 @@ io_sarrCopy(sarr_t ** __restrict dest, sarr_t * __rest /* * io_sarrVacuum() - Vacuum dynamic split-order array, empty segments will be freed + * * @arr = Array * return: -1 error, >-1 freed segments */ @@ -159,6 +163,7 @@ io_sarrVacuum(sarr_t * __restrict arr) /* * io_sarrGrow() - Grow/Shrink dynamic split-order array, Use with care when it shrink!!! + * * @arr = Array * @newNumItems = Number of Items * return: -1 error, 0 ok @@ -198,6 +203,7 @@ io_sarrGrow(sarr_t * __restrict arr, int newNumItems) /* * io_sarrGet() - Get element from dynamic split-order array + * * @arr = Array * @idx = Index (warning 1st element is at position 1) * return: NULL not found, !=NULL element @@ -221,6 +227,7 @@ io_sarrGet(sarr_t * __restrict arr, u_int idx) /* * io_sarrGet2() - Always get element from dynamic split-order array * Function automatic grow array. Good use for Hash tables! + * * @arr = Array * @idx = Index (warning 1st element is at position 1) * return: NULL not found, !=NULL element @@ -238,6 +245,7 @@ io_sarrGet2(sarr_t * __restrict arr, u_int idx) /* * io_sarrSet() - Set element to dynamic split-order array + * * @arr = Array * @idx = Index (warning 1st element is at position 1) * @data = Value @@ -273,6 +281,7 @@ io_sarrSet(sarr_t * __restrict arr, u_int idx, void *d /* * io_sarr2array() - Convert from split-order array to dynamic array + * * @sa = split array * @sarrFree = after convert split array !=0 will be destroyed sarray * return: NULL error or != NULL new array @@ -305,6 +314,7 @@ io_sarr2array(sarr_t ** __restrict sa, int sarrFree) /* * io_array2sarr() - Convert from dynamic array to split-order array + * * @a = array * @segLen = Length of segment * @arrFree = after convert array !=0 will be destroyed