33 lines
1.1 KiB
C
33 lines
1.1 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_list_push_params.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2016/08/14 13:16:50 by jhalford #+# #+# */
|
|
/* Updated: 2016/08/18 14:49:18 by jhalford ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include <stdlib.h>
|
|
#include "ft_list.h"
|
|
|
|
t_list *ft_list_push_params(int ac, char **av)
|
|
{
|
|
t_list *list;
|
|
t_list *tmp;
|
|
int i;
|
|
|
|
tmp = NULL;
|
|
list = NULL;
|
|
i = 0;
|
|
while (i < ac)
|
|
{
|
|
list = ft_create_elem(av[i]);
|
|
list->next = tmp;
|
|
tmp = list;
|
|
i++;
|
|
}
|
|
return (list);
|
|
}
|