chiark / gitweb /
More sensible ordering of search results in web interface.
[disorder] / lib / tracksort.c
index 2f81739098583802ff2f382ebfa6e57470c64531..b1fcc3af87d01f0134613e4fa2b19455d7a2cac9 100644 (file)
@@ -32,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) {