X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/2fadbbc60560fe8562d7b6e652f8788c1d084d5f..02e6eb5f2edea91b7512f4969ac7d4c4f3a6251d:/lib/tracksort.c diff --git a/lib/tracksort.c b/lib/tracksort.c index ded4c84..b1fcc3a 100644 --- a/lib/tracksort.c +++ b/lib/tracksort.c @@ -2,20 +2,21 @@ * This file is part of DisOrder * Copyright (C) 2008 Richard Kettlewell * - * This program is free software; you can redistribute it and/or modify + * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA + * along with this program. If not, see . + */ +/** @file lib/tracksort.c + * @brief Track ordering */ #include "common.h" @@ -31,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) {