]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - score.c
Rename mood_switch(), mood_close(), playlist_{open/close}.
[paraslash.git] / score.c
diff --git a/score.c b/score.c
index c7a2411b4282e5c224b8692ab7428f7fff75f3b4..10cd254a8dba2926614d0a76ffa29cad90e74792 100644 (file)
--- a/score.c
+++ b/score.c
@@ -279,28 +279,21 @@ static void score_close(void)
 
 static int score_open(__a_unused const char *dir)
 {
-       return osl(osl_open_table(&score_table_desc, &score_table));
+       assert(osl_open_table(&score_table_desc, &score_table) >= 0);
+       return 1;
 }
 
 /**
  * Remove all entries from the score table, but keep the table open.
- *
- * \return Standard.
  */
-int clear_score_table(void)
+void score_clear(void)
 {
        score_close();
-       return score_open(NULL);
+       score_open(NULL);
 }
 
-/**
- * Initialize the scoring subsystem.
- *
- * \param t The members of \a t are filled in by the function.
- */
-void score_init(struct afs_table *t)
-{
-       t->name = score_table_desc.name;
-       t->open = score_open;
-       t->close = score_close;
-}
+/** The score table stores (aft row, score) pairs in memory. */
+const struct afs_table_operations score_ops = {
+       .open = score_open,
+       .close = score_close,
+};