Libft
42 Libft library documentation
Loading...
Searching...
No Matches
ft_lstadd_front.c
Go to the documentation of this file.
1
/* ************************************************************************** */
2
/* */
3
/* ::: :::::::: */
4
/* ft_lstadd_front.c :+: :+: :+: */
5
/* +:+ +:+ +:+ */
6
/* By: raphalme <raphalme@student.42.fr> +#+ +:+ +#+ */
7
/* +#+#+#+#+#+ +#+ */
8
/* Created: 2025/12/29 19:16:00 by raphalme #+# #+# */
9
/* Updated: 2026/04/14 10:36:21 by raphalme ### ########.fr */
10
/* */
11
/* ************************************************************************** */
12
13
#include "../includes/types.h"
14
24
void
ft_lstadd_front
(
t_list
**lst,
t_list
*
new
)
25
{
26
if
(!lst || !
new
)
27
return ;
28
new
->next = *lst;
29
*lst =
new
;
30
}
ft_lstadd_front
void ft_lstadd_front(t_list **lst, t_list *new)
Adds a new element to the front of a linked list. This function takes a pointer to the first element ...
Definition
ft_lstadd_front.c:24
s_list
Definition
types.h:4
src
ft_lstadd_front.c
Generated by
1.9.8