-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_lstnew.c
30 lines (27 loc) · 1.13 KB
/
ft_lstnew.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
29
30
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstnew.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: kakiba <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/07/12 00:03:34 by kakiba #+# #+# */
/* Updated: 2022/12/22 21:33:59 by kakiba ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
t_list *ft_lstnew(double r, double i, void *content)
{
t_list *ndptr;
(void)content;
ndptr = malloc(sizeof(t_list));
if (ndptr == NULL)
return (NULL);
else
{
ndptr -> r = r;
ndptr -> i = i;
ndptr -> next = NULL;
return (ndptr);
}
}