aboutsummaryrefslogtreecommitdiff
path: root/Semestr 4/sieci/pracownia2/router/linked_list.h
diff options
context:
space:
mode:
Diffstat (limited to 'Semestr 4/sieci/pracownia2/router/linked_list.h')
-rw-r--r--Semestr 4/sieci/pracownia2/router/linked_list.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Semestr 4/sieci/pracownia2/router/linked_list.h b/Semestr 4/sieci/pracownia2/router/linked_list.h
index f662dbe..28e8ef7 100644
--- a/Semestr 4/sieci/pracownia2/router/linked_list.h
+++ b/Semestr 4/sieci/pracownia2/router/linked_list.h
@@ -12,6 +12,7 @@ typedef struct node {
typedef struct list_t {
node_t *head;
node_t *it;
+ node_t *prev_it;
} list_t;
/* Creates an empty list */
@@ -23,6 +24,9 @@ void insert(list_t *list, void *data, size_t data_size);
/* Erases first node from the list. */
void erase(list_t *list);
+/* Erases element under iterator and sets iterator to the next one. */
+void erase_it(list_t *list);
+
/* Moves iterator one step. */
void iterate(list_t *list);