deps/kb_meme/meme-5.0.1/src/array-list.c
/*
 * arraylst_swap
 * The items at the passed indexes are swapped
 */
arraylst_swap
The items at the passed indexes are swapped
arraylst_swap The items at the passed indexes are swapped
void arraylst_swap(int index1, int index2, ARRAYLST_T *arraylst) {
  void *temp;
  if (arraylst == NULL)                       die("arraylst_set: arraylst is NULL!\n");
  if (index1 < 0 || index1 >= arraylst->size) die("arraylst_set: index1 must be within bounds.\n");
  if (index2 < 0 || index2 >= arraylst->size) die("arraylst_set: index2 must be within bounds.\n");
  temp = arraylst->array[index1];
  arraylst->array[index1] = arraylst->array[index2];
  arraylst->array[index2] = temp;
}
void arraylst_swap ( int index1 , int index2 , ARRAYLST_T * arraylst ) { void * temp ; if ( arraylst == NULL ) die ( " \n " ) ; if ( index1 < 0 || index1 >= arraylst -> size ) die ( " \n " ) ; if ( index2 < 0 || index2 >= arraylst -> size ) die ( " \n " ) ; temp = arraylst -> array [ index1 ] ; arraylst -> array [ index1 ] = arraylst -> array [ index2 ] ; arraylst -> array [ index2 ] = temp ; }
arraylst_swap
 The items at the passed indexes are swapped
arraylst_swap The items at the passed indexes are swapped
// test parameters