# HG changeset patch # User ib # Date 1330000769 0 # Node ID 207272df4aef239d5a99cc97b1787c65a3cf0d0c # Parent 45b2c7bbec604cebaa959823f952741ab8fb9aa3 Cosmetic: Insert some blank lines and remove commented code. diff -r 45b2c7bbec60 -r 207272df4aef gui/util/list.c --- a/gui/util/list.c Thu Feb 23 12:25:57 2012 +0000 +++ b/gui/util/list.c Thu Feb 23 12:39:29 2012 +0000 @@ -76,37 +76,30 @@ return listMgr(PLAYLIST_ITEM_ADD, pdat); case PLAYLIST_ITEM_GET_NEXT: + if (plCurrent && plCurrent->next) { plCurrent = plCurrent->next; -// if (!plCurrent && plList) -// { -// plItem *next = plList; -// -// while (next->next) -// { -// if (!next->next) break; -// next = next->next; -// } -// -// plCurrent = next; -// } return plCurrent; } + return NULL; case PLAYLIST_ITEM_GET_PREV: + if (plCurrent && plCurrent->prev) { plCurrent = plCurrent->prev; -// if ( !plCurrent && plList ) plCurrent=plList; return plCurrent; } + return NULL; case PLAYLIST_ITEM_SET_CURR: + plCurrent = pdat; return plCurrent; case PLAYLIST_ITEM_GET_CURR: + return plCurrent; case PLAYLIST_ITEM_DEL_CURR: @@ -133,6 +126,7 @@ return plCurrent; case PLAYLIST_DELETE: + while (plList) { plItem *item = plList->next; @@ -142,6 +136,7 @@ plList = item; } + plCurrent = NULL; return NULL; @@ -174,6 +169,7 @@ return NULL; case URLLIST_DELETE: + while (urlList) { urlItem *item = urlList->next; @@ -182,6 +178,7 @@ urlList = item; } + return NULL; }