X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=score.c;h=23c1276d01b09add834201699460e5b4d00bf67b;hp=3557b042a31e5d84df636062cb54c15cd04ebe3c;hb=65b6448b8eb6f7442ba64affff58c388306a9159;hpb=03d45daad787b8f2ced3070e80c4550bf4b02931 diff --git a/score.c b/score.c index 3557b042..23c1276d 100644 --- a/score.c +++ b/score.c @@ -1,11 +1,13 @@ /* - * Copyright (C) 2007-2009 Andre Noll + * Copyright (C) 2007-2012 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ /** \file score.c Scoring functions to determine the audio file streaming order. */ +#include #include + #include "para.h" #include "error.h" #include "string.h" @@ -36,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) @@ -139,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));