added dual linked list
This commit is contained in:
21
ft_lst2add.c
Normal file
21
ft_lst2add.c
Normal file
@@ -0,0 +1,21 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_lst2add.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2018/09/30 17:07:48 by tmaze #+# #+# */
|
||||
/* Updated: 2018/09/30 17:15:59 by tmaze ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libft.h"
|
||||
|
||||
void ft_lst2add(t_list2 **alst, t_list2 *new)
|
||||
{
|
||||
new->next = *alst->next;
|
||||
new->prev = *alst;
|
||||
new->next->prev = new;
|
||||
*alst->next = new;
|
||||
}
|
||||
Reference in New Issue
Block a user