#ifndef __TRACK_LIST_H__ #define __TRACK_LIST_H__ typedef struct track_list { int *starts; int *ends; int count; int capacity; } track_list; /** * Initializes a track list to be empty. * * @param l a pointer to an uninitialized track list, non-NULL */ void track_list_init(track_list *l); /** * Adds a track with the given endpoints to this track list. * * @param l a pointer to a track list * @param start an integer not less than the endpoint of the last track * on this list and not greater than end * @param end an integer */ void track_list_add(track_list *l, int start, int end); /** * Frees the memory allocated to this track list and makes it empty. * * @param l a pointer to a track list, non-NULL */ void track_list_destroy(track_list *l); #endif