-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_lstadd.c
26 lines (22 loc) · 1.05 KB
/
ft_lstadd.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstadd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mgiraldo <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/03/03 20:54:21 by mgiraldo #+# #+# */
/* Updated: 2020/03/03 20:54:30 by mgiraldo ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/*
** Adds the element new at the beginn of a list.
*/
void ft_lstadd(t_list **alst, t_list *new)
{
t_list *elem;
elem = new;
elem->next = *alst;
*alst = elem;
}