Push libft
125/100 corrected the 14/11/23
This commit is contained in:
commit
7bd66aee5b
45 changed files with 1462 additions and 0 deletions
24
ft_lstadd_front.c
Normal file
24
ft_lstadd_front.c
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_lstadd_front.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/11/12 11:40:16 by rparodi #+# #+# */
|
||||
/* Updated: 2023/11/12 17:14:33 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libft.h"
|
||||
|
||||
void ft_lstadd_front(t_list **lst, t_list *new)
|
||||
{
|
||||
if (*lst == NULL)
|
||||
{
|
||||
*lst = new;
|
||||
return ;
|
||||
}
|
||||
new->next = *lst;
|
||||
*lst = new;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue