X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/e7eb3a2744aa45179daea235800753d3d1955338..8ab2aa9fd51a89e06d92a4f7c3792aaa4a08cc71:/lib/tracksort.c diff --git a/lib/tracksort.c b/lib/tracksort.c index 5ae0d03..b1fcc3a 100644 --- a/lib/tracksort.c +++ b/lib/tracksort.c @@ -15,6 +15,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ +/** @file lib/tracksort.c + * @brief Track ordering + */ #include "common.h" #include "trackname.h" @@ -29,6 +32,16 @@ static int tracksort_compare(const void *a, const void *b) { ea->track, eb->track); } +/** @brief Sort tracks + * @param ntracks Number of tracks to sort + * @param tracks List of tracks + * @param type Comparison type + * @return Sorted track data + * + * Tracks are compared using compare_tracks(), with the sort key and display + * string set according to @p type, which should be "track" if the tracks are + * really tracks and "dir" if they are directories. + */ struct tracksort_data *tracksort_init(int ntracks, char **tracks, const char *type) {