Diff for /libaitio/src/Attic/sarray.c between versions 1.5 and 1.6

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

Removed from v.1.5  
changed lines
  Added in v.1.6


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>