From 73c2b00a10c5786ddeeacc915e233fd4df1c9321 Mon Sep 17 00:00:00 2001 From: Martial Simon Date: Sat, 11 Oct 2025 22:19:00 +0200 Subject: fix: evalexpr & tinyprintf contenaient toute la piscine --- rushs/tinyprintf/dlist/dlist-3.c | 83 ---------------------------------------- 1 file changed, 83 deletions(-) delete mode 100644 rushs/tinyprintf/dlist/dlist-3.c (limited to 'rushs/tinyprintf/dlist/dlist-3.c') diff --git a/rushs/tinyprintf/dlist/dlist-3.c b/rushs/tinyprintf/dlist/dlist-3.c deleted file mode 100644 index 22b4b52..0000000 --- a/rushs/tinyprintf/dlist/dlist-3.c +++ /dev/null @@ -1,83 +0,0 @@ -#include -#include - -#include "dlist.h" - -void dlist_map_square(struct dlist *list) -{ - for (struct dlist_item *i = list->head; i; i = i->next) - { - i->data *= i->data; - } -} - -void dlist_reverse(struct dlist *list) -{ - struct dlist_item *tmp; - for (struct dlist_item *i = list->head; i; i = i->prev) - { - tmp = i->next; - i->next = i->prev; - i->prev = tmp; - } - tmp = list->tail; - list->tail = list->head; - list->head = tmp; -} - -struct dlist *dlist_split_at(struct dlist *list, size_t index) -{ - if (list->size == 0) - return dlist_init(); - if (index >= list->size) - { - return NULL; - } - - struct dlist *new = dlist_init(); - if (new == NULL) - return NULL; - new->size = list->size - index; - list->size = index; - - struct dlist_item *i; - for (i = list->head; index; index--, i = i->next) - { - continue; - } - - new->head = i; - new->tail = list->tail; - list->tail = i->prev; - if (i->prev) - { - i->prev->next = NULL; - } - else - { - list->head = NULL; - } - i->prev = NULL; - return new; -} - -void dlist_concat(struct dlist *list1, struct dlist *list2) -{ - if (list2->head == NULL) - return; - if (list1->tail == NULL) - { - list1->head = list2->head; - list1->tail = list2->tail; - list1->size = list2->size; - return; - } - - list1->tail->next = list2->head; - list2->head->prev = list1->tail; - list1->tail = list2->tail; - list1->size += list2->size; - list2->size = 0; - list2->head = NULL; - list2->tail = NULL; -} -- cgit v1.2.3