tgrekov-libft
HIVE libft Oct 2023
Loading...
Searching...
No Matches
ft_lstadd_front_bonus.c
Go to the documentation of this file.
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* ft_lstadd_front_bonus.c :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: tgrekov <tgrekov@student.hive.fi> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2023/10/28 01:09:57 by tgrekov #+# #+# */
9/* Updated: 2023/11/04 22:24:35 by tgrekov ### ########.fr */
10/* */
11/* ************************************************************************** */
12
20#include "libft.h"
21
34void ft_lstadd_front(t_list **lst, t_list *new)
35{
36 if (!lst || !new)
37 return ;
38 new->next = *lst;
39 *lst = new;
40}
void ft_lstadd_front(t_list **lst, t_list *new)
Insert node new into the start of the list pointed to by the pointer at lst.
Linked list node.
Definition libft.h:44