-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_list_push_back.c
executable file
·28 lines (25 loc) · 1.16 KB
/
ft_list_push_back.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
27
28
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_list_push_back.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jraymond <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/11/16 19:31:56 by jraymond #+# #+# */
/* Updated: 2018/03/28 09:41:21 by jraymond ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_list_push_back(t_b_list *begin_list, void *data)
{
t_bis_list *list;
list = begin_list->first_element;
if (list)
{
while (list && list->next)
list = list->next;
list->next = ft_creat_elem(data);
}
else
begin_list->first_element = ft_creat_elem(data);
}