forked from nicolas-arnaud/Minishell
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
1.1 KiB
27 lines
1.1 KiB
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_add.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: narnaud <narnaud@student.42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2022/03/24 10:46:25 by narnaud #+# #+# */
|
|
/* Updated: 2022/03/25 14:15:13 by narnaud ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "../libft.h"
|
|
|
|
t_dlist *ft_dlst_add(t_dlist *prev, void *content)
|
|
{
|
|
t_dlist *new;
|
|
|
|
if (!content)
|
|
return (prev);
|
|
new = ft_calloc(1, sizeof(t_dlist));
|
|
if (prev)
|
|
prev->next = new;
|
|
new->previous = prev;
|
|
new->content = content;
|
|
return (new);
|
|
}
|
|
|