-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstrpush.c
executable file
·26 lines (23 loc) · 1.08 KB
/
strpush.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* strpush.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: luperez <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2014/11/16 06:36:51 by luperez #+# #+# */
/* Updated: 2014/12/02 07:39:06 by luperez ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
t_str *strpush(t_str **alst, t_str *new)
{
t_str *tmp;
if (!alst || !new)
return (*alst);
tmp = *alst;
while (tmp->next != NULL)
tmp = tmp->next;
tmp->next = new;
return (new);
}