mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
21 lines
1.1 KiB
C
21 lines
1.1 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_lstadd_front_bonus.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: jguelen <marvin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2024/10/21 13:14:18 by jguelen #+# #+# */
|
|
/* Updated: 2024/10/23 16:33:32 by jguelen ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "libft.h"
|
|
|
|
/*Can create circular chain list -> be careful of the dangling part then
|
|
and new not to be NULL*/
|
|
void ft_lstadd_front(t_list **lst, t_list *new)
|
|
{
|
|
new->next = *lst;
|
|
*lst = new;
|
|
}
|