aboutsummaryrefslogtreecommitdiff
path: root/Semestr 4/sieci/pracownia2/router/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'Semestr 4/sieci/pracownia2/router/test.c')
-rw-r--r--Semestr 4/sieci/pracownia2/router/test.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/Semestr 4/sieci/pracownia2/router/test.c b/Semestr 4/sieci/pracownia2/router/test.c
index ebc6df1..e086e55 100644
--- a/Semestr 4/sieci/pracownia2/router/test.c
+++ b/Semestr 4/sieci/pracownia2/router/test.c
@@ -27,11 +27,18 @@ int main() {
int val = 0;
scanf("%d", &val);
insert(&list, &val, sizeof(int));
+ reset(&list);
}
if (t == 1) {
- erase(&list);
+ iterate(&list);
+ if (list.it != NULL)
+ printf("it: %d\n", *(int *)list.it->data);
+ else printf("End of list.\n");
}
if (t == 2) {
+ erase_it(&list);
+ }
+ if (t == 3) {
print_list(list);
}
}