Merge branch 't/test_man'
[paraslash.git] / score.c
diff --git a/score.c b/score.c
index bc40668f6fd59605b5d4df0de12b113d69b23075..f1afd22be7bc5c580312ca8eca3d128d1044dee0 100644 (file)
--- a/score.c
+++ b/score.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2009 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2007-2014 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -38,8 +38,8 @@ static int ptr_compare(const struct osl_object *obj1, const struct osl_object *o
  */
 static int score_compare(const struct osl_object *obj1, const struct osl_object *obj2)
 {
-       int d1 = *(int*)obj1->data;
-       int d2 = *(int*)obj2->data;
+       long d1 = *(long *)obj1->data;
+       long d2 = *(long *)obj2->data;
        int ret = NUM_COMPARE(d2, d1);
 
        if (ret)
@@ -141,7 +141,7 @@ int score_add(const struct osl_row *aft_row, long score)
        size = score_table_desc.column_descriptions[SCORECOL_SCORE].data_size;
        score_objs[SCORECOL_SCORE].data = para_malloc(size);
        score_objs[SCORECOL_SCORE].size = size;
-       *(int *)(score_objs[SCORECOL_SCORE].data) = score;
+       *(long *)(score_objs[SCORECOL_SCORE].data) = score;
 
 //     PARA_DEBUG_LOG("adding %p\n", *(void **) (score_objs[SCORECOL_AFT_ROW].data));
        ret = osl(osl_add_row(score_table, score_objs));
@@ -168,13 +168,11 @@ static int get_nth_score(unsigned n, long *score)
  * \param aft_row Determines the audio file to change.
  * \param percent The position to re-insert the audio file.
  *
- * The percent parameter must be between \p 0 and 100 and. A value of zero
- * means to re-insert the audio file into the score table with a score lower
- * than any other admissible file.
+ * The percent parameter must be between 0 and 100. A value of zero means to
+ * re-insert the audio file into the score table with a score lower than any
+ * other admissible file.
  *
- * \return Positive on success, negative on errors. Possible errors: Errors
- * returned by osl_get_row(), get_num_admissible_files(), osl_get_nth_row(),
- * osl_get_object(), osl_update_object().
+ * \return Positive on success, negative on errors.
  */
 int score_update(const struct osl_row *aft_row, long percent)
 {