deps/kb_meme/meme-5.0.1/src/array-list.c
/*
 * arraylst_create_sized
 * Creates an array list with an initial allocated
 * size as passed.
 */
arraylst_create_sized
Creates an array list with an initial allocated
size as passed.
arraylst_create_sized Creates an array list with an initial allocated size as passed .
ARRAYLST_T *arraylst_create_sized(int size) 
{
  if (size < 0) die("arraylst_create_sized: size must be zero or larger.\n");
  ARRAYLST_T *arraylst = (ARRAYLST_T*)mm_malloc(sizeof(ARRAYLST_T));
  if (size > 0) arraylst->array = (void**)mm_malloc(sizeof(void*)*size);
  arraylst->cur_alloc = size;
  arraylst->min_alloc = size;
  arraylst->size = 0;
  return arraylst;
}
ARRAYLST_T * arraylst_create_sized ( int size ) { if ( size < 0 ) die ( " \n " ) ; ARRAYLST_T * arraylst = ( ARRAYLST_T * ) mm_malloc ( sizeof ( ARRAYLST_T ) ) ; if ( size > 0 ) arraylst -> array = ( void * * ) mm_malloc ( sizeof ( void * ) * size ) ; arraylst -> cur_alloc = size ; arraylst -> min_alloc = size ; arraylst -> size = 0 ; return arraylst ; }
arraylst_create_sized
 Creates an array list with an initial allocated
 size as passed.
arraylst_create_sized Creates an array list with an initial allocated size as passed .
//test parameters