From ee2e73cd7b5a1de68c8316e916c4ef3a88302bed Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sun, 4 Aug 2013 18:53:43 +0200 Subject: piano: Generic linked lists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduces generic linked list structure and functions (like append, delete, …). Removes a lot of copy&pasted code and improves code readability/reusability. Heads up: This change breaks libpiano’s ABI. --- src/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 9232f9e..4cca654 100644 --- a/src/main.c +++ b/src/main.c @@ -1,5 +1,5 @@ /* -Copyright (c) 2008-2012 +Copyright (c) 2008-2013 Lars-Dominik Braun Permission is hereby granted, free of charge, to any person obtaining a copy @@ -372,8 +372,8 @@ static void BarMainLoop (BarApp_t *app) { /* what's next? */ if (app->playlist != NULL) { PianoSong_t *histsong = app->playlist; - app->playlist = app->playlist->next; - histsong->next = NULL; + app->playlist = PianoListNextP (app->playlist); + histsong->head.next = NULL; BarUiHistoryPrepend (app, histsong); } if (app->playlist == NULL) { -- cgit v1.2.3