text: /* ************************************************************************** */
  /*                                                                            */
  /*                                                        :::      ::::::::   */
  /*   ft_lstnew.c                                        :+:      :+:    :+:   */
  /*                                                    +:+ +:+         +:+     */
  /*   By: amoinier <marvin@42.fr>                    +#+  +:+       +#+        */
  /*                                                +#+#+#+#+#+   +#+           */
  /*   Created: 2015/11/28 20:13:27 by amoinier          #+#    #+#             */
  /*   Updated: 2015/11/29 13:10:08 by amoinier         ###   ########.fr       */
  /*                                                                            */
  /* ************************************************************************** */
  
  #include "libft.h"
  
  t_list	*ft_lstnew(void const *content, size_t content_size)
  {
  	t_list	*tmp;
  
  	tmp = (t_list *)malloc(sizeof(*tmp) * content_size);
  	if (!tmp)
  		return (NULL);
  	if (!content)
  	{
  		tmp->content = NULL;
  		tmp->content_size = 0;
  	}
  	else
  	{
  		tmp->content = malloc(sizeof(content) * content_size);
  		if (!tmp->content)
  			return (NULL);
  		ft_memcpy(tmp->content, content, content_size);
  		tmp->content_size = content_size;
  	}
  	tmp->next = NULL;
  	return (tmp);
  }
  