ft_lstadd.c 1022 B

12345678910111213141516171819202122
  1. /* ************************************************************************** */
  2. /* */
  3. /* ::: :::::::: */
  4. /* ft_lstadd.c :+: :+: :+: */
  5. /* +:+ +:+ +:+ */
  6. /* By: mazimi <mazimi@student.42.fr> +#+ +:+ +#+ */
  7. /* +#+#+#+#+#+ +#+ */
  8. /* Created: 2014/12/09 21:04:20 by mazimi #+# #+# */
  9. /* Updated: 2014/12/10 14:17:25 by mazimi ### ########.fr */
  10. /* */
  11. /* ************************************************************************** */
  12. #include "../libft.h"
  13. void ft_lstadd(t_list **alst, t_list *new)
  14. {
  15. if (new != NULL)
  16. {
  17. new->next = *alst;
  18. *alst = new;
  19. }
  20. }