X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=score.c;h=ddd3c7a25057998c0328893553b6b246cebcda64;hp=37f4c55072d920bcef85ec622f6568c91b0ed11e;hb=ce9e297eb91a932a11f81890c800d0380b5bc9c9;hpb=db3534991b7c1d72f9ceed435ecbcba39660a758 diff --git a/score.c b/score.c index 37f4c550..ddd3c7a2 100644 --- a/score.c +++ b/score.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2013 Andre Noll + * Copyright (C) 2007 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -7,6 +7,7 @@ /** \file score.c Scoring functions to determine the audio file streaming order. */ #include #include +#include #include "para.h" #include "error.h" @@ -71,7 +72,7 @@ static struct osl_column_description score_cols[] = { }, [SCORECOL_SCORE] = { .storage_type = OSL_NO_STORAGE, - .storage_flags = OSL_RBTREE | OSL_FIXED_SIZE, + .storage_flags = OSL_RBTREE | OSL_FIXED_SIZE | OSL_UNIQUE, .name = "score", .compare_function = score_compare, .data_size = sizeof(long) @@ -245,29 +246,12 @@ static int get_score_row_from_aft_row(const struct osl_row *aft_row, * * This is used for the ls command. The \a data parameter is passed as the * second argument to \a func. - * - * \sa admissible_file_loop_reverse(). */ int admissible_file_loop(void *data, osl_rbtree_loop_func *func) { return osl(osl_rbtree_loop(score_table, SCORECOL_SCORE, data, func)); } -/** - * Loop over all files in the score table in reverse order. - * - * \param data As in admissible_file_loop(). - * \param func As in admissible_file_loop(). - * - * \return Same return value as admissible_file_loop(). - * - * \sa admissible_file_loop(), osl_rbtree_loop_reverse(). - */ -int admissible_file_loop_reverse(void *data, osl_rbtree_loop_func *func) -{ - return osl(osl_rbtree_loop_reverse(score_table, SCORECOL_SCORE, data, func)); -} - /** * Get the admissible audio file with highest score. *