2023-10-25 13:56:45 +02:00
|
|
|
/* ************************************************************************** */
|
|
|
|
/* */
|
|
|
|
/* :::::::: */
|
2023-10-26 19:11:30 +02:00
|
|
|
/* ft_lstadd_front.c :+: :+: */
|
2023-10-25 13:56:45 +02:00
|
|
|
/* +:+ */
|
|
|
|
/* By: djonker <marvin@codam.nl> +#+ */
|
|
|
|
/* +#+ */
|
|
|
|
/* Created: 2020/11/13 04:38:37 by djonker #+# #+# */
|
2023-10-26 19:11:30 +02:00
|
|
|
/* Updated: 2023/10/18 16:59:52 by houtworm ######## odam.nl */
|
2023-10-25 13:56:45 +02:00
|
|
|
/* */
|
|
|
|
/* ************************************************************************** */
|
|
|
|
|
|
|
|
#include "../libft.h"
|
|
|
|
|
|
|
|
void ft_lstadd_front(t_list **lst, t_list *new)
|
|
|
|
{
|
|
|
|
if (lst && new)
|
|
|
|
{
|
|
|
|
if (*lst)
|
|
|
|
new->next = *lst;
|
|
|
|
*lst = new;
|
|
|
|
}
|
|
|
|
}
|