aboutsummaryrefslogtreecommitdiffstats
path: root/src/list.c
diff options
context:
space:
mode:
authorQball Cow <qball@qballcow.nl>2007-08-19 14:46:00 +0000
committerQball Cow <qball@qballcow.nl>2007-08-19 14:46:00 +0000
commit3cee1f6a2ce66f4bb3b04db5ebb00b1dce9d6c25 (patch)
tree0924bc864d2721324abb6dec032ab3a1d9c34cd1 /src/list.c
parent5bd81af3a9abca6b316c5899596ba308287b47a6 (diff)
downloadmpd-3cee1f6a2ce66f4bb3b04db5ebb00b1dce9d6c25.tar.gz
mpd-3cee1f6a2ce66f4bb3b04db5ebb00b1dce9d6c25.tar.xz
mpd-3cee1f6a2ce66f4bb3b04db5ebb00b1dce9d6c25.zip
Queue patch
git-svn-id: https://svn.musicpd.org/mpd/branches/q-mpd@6757 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/list.c')
-rw-r--r--src/list.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/list.c b/src/list.c
index 71c30f7b6..14832adb7 100644
--- a/src/list.c
+++ b/src/list.c
@@ -287,6 +287,21 @@ int findInList(List * list, char *key, void **data)
return 0;
}
+ListNode *getNodeByPosition(List *list, int pos)
+{
+ ListNode *tmpNode;
+
+ assert(list != NULL);
+ if (pos < 0 || pos >= list->numberOfNodes)
+ return NULL;
+
+ tmpNode = list->firstNode;
+ while (pos-- > 0)
+ tmpNode = tmpNode->nextNode;
+
+ return tmpNode;
+}
+
int deleteFromList(List * list, char *key)
{
ListNode *tmpNode;