pos-list.c
/***************************************************************************
 *  Library:
 *      #include <biolibc/pos-list.h>
 *      -lbiolibc -lxtend
 *
 *  Description:
 *      Free the array of positions in position list and reset array_size
 *      and position count to 0.
 *
 *  Arguments:
 *      pos_list    Pointer to the position_list_t structure to reset
 *
 *  See also:
 *      bl_pos_list_allocate(3), bl_pos_list_add_position(3), bl_pos_list_from_csv(3),
 *      bl_pos_list_sort(3)
 *
 *  History: 
 *  Date        Name        Modification
 *  2021-04-17  Jason Bacon Begin
 ***************************************************************************/
#include 
-lbiolibc -lxtend

Free the array of positions in position list and reset array_size
and position count to 0.

pos_list    Pointer to the position_list_t structure to reset



Date        Name        Modification
2021-04-17  Jason Bacon Begin
#include - lbiolibc - lxtend Free the array of positions in position list and reset array_size and position count to 0 . pos_list Pointer to the position_list_t structure to reset Date Name Modification 2021 - 04 - 17 Jason Bacon Begin
void    bl_pos_list_free(bl_pos_list_t *pos_list)
{
    if ( pos_list->positions == NULL )
    {
	fputs("bl_pos_list_free(): List pointer is NULL.\n", stderr);
	fputs("Was it previously allocated?\n", stderr);
	exit(EX_SOFTWARE);
    }
    pos_list->count = 0;
    pos_list->array_size = 0;
    free(pos_list->positions);
    pos_list->positions = NULL;
}
void bl_pos_list_free ( bl_pos_list_t * pos_list ) { if ( pos_list -> positions == NULL ) { fputs ( " \n " , stderr ) ; fputs ( " \n " , stderr ) ; exit ( EX_SOFTWARE ) ; } pos_list -> count = 0 ; pos_list -> array_size = 0 ; free ( pos_list -> positions ) ; pos_list -> positions = NULL ; }
Library:
      #include <biolibc/pos-list.h>
      -lbiolibc -lxtend
Library : #include <biolibc / pos - list . h > - lbiolibc - lxtend