minishell
ft_lstadd_front.c
Go to the documentation of this file.
1 /* ************************************************************************** */
2 /* */
3 /* ::: :::::::: */
4 /* ft_lstadd_front.c :+: :+: :+: */
5 /* +:+ +:+ +:+ */
6 /* By: kfujita <kfujita@student.42tokyo.jp> +#+ +:+ +#+ */
7 /* +#+#+#+#+#+ +#+ */
8 /* Created: 2022/04/20 00:43:44 by kfujita #+# #+# */
9 /* Updated: 2022/04/25 22:57:14 by kfujita ### ########.fr */
10 /* */
11 /* ************************************************************************** */
12 
13 #include <stddef.h>
14 #include "ft_lst.h"
15 
16 void ft_lstadd_front(t_list **lst, t_list *new)
17 {
18  if (lst == NULL || new == NULL)
19  return ;
20  new->next = *lst;
21  *lst = new;
22 }
void ft_lstadd_front(t_list **lst, t_list *new)
Definition: ft_lst.h:18