/* adlist.h - A generic doubly linked list implementation
*
- * Copyright (c) 2006-2009, Salvatore Sanfilippo <antirez at gmail dot com>
+ * Copyright (c) 2006-2010, Salvatore Sanfilippo <antirez at gmail dot com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
void (*free)(void *ptr);
int (*match)(void *ptr, void *key);
unsigned int len;
- listIter iter;
} list;
/* Functions implemented as macros */
void listRelease(list *list);
list *listAddNodeHead(list *list, void *value);
list *listAddNodeTail(list *list, void *value);
+list *listInsertNode(list *list, listNode *old_node, void *value, int after);
void listDelNode(list *list, listNode *node);
listIter *listGetIterator(list *list, int direction);
listNode *listNext(listIter *iter);
list *listDup(list *orig);
listNode *listSearchKey(list *list, void *key);
listNode *listIndex(list *list, int index);
-void listRewind(list *list);
-void listRewindTail(list *list);
-listNode *listYield(list *list);
+void listRewind(list *list, listIter *li);
+void listRewindTail(list *list, listIter *li);
/* Directions for iterators */
#define AL_START_HEAD 0