/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_print_strings.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: narnaud +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2021/10/27 08:09:49 by narnaud #+# #+# */ /* Updated: 2021/11/17 09:40:16 by narnaud ### ########.fr */ /* */ /* ************************************************************************** */ #include "ft_printf.h" static t_dlist *list = NULL; void add_string(char *str, size_t size) { list = ft_dlst_add(list, str); list->size = size; } t_dlist *get_last(void) { return list; } t_dlist *get_first(void) { t_dlist *tmp = list; while (tmp->previous) tmp = tmp->previous; return tmp; } void clean_list(void) { while (list) { free(list->content); free(list); list = list->previous; } list = NULL; }