-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnewstr.c
executable file
·25 lines (22 loc) · 1.05 KB
/
newstr.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* newstr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: luperez <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2014/11/30 02:43:12 by luperez #+# #+# */
/* Updated: 2014/11/30 03:04:33 by luperez ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
t_str *newstr(char *s)
{
t_str *str;
str = (t_str *)malloc(sizeof(t_str));
if (str == NULL)
return (NULL);
str->str = s;
str->next = NULL;
return (str);
}