ft_lstdel.c 1.1 KB

1234567891011121314151617181920212223
  1. /* ************************************************************************** */
  2. /* */
  3. /* ::: :::::::: */
  4. /* ft_lstdel.c :+: :+: :+: */
  5. /* +:+ +:+ +:+ */
  6. /* By: mazimi <mazimi@student.42.fr> +#+ +:+ +#+ */
  7. /* +#+#+#+#+#+ +#+ */
  8. /* Created: 2014/12/09 20:33:56 by mazimi #+# #+# */
  9. /* Updated: 2014/12/10 20:19:17 by mazimi ### ########.fr */
  10. /* */
  11. /* ************************************************************************** */
  12. #include "../libft.h"
  13. void ft_lstdel(t_list **alst, void (*del)(void *, size_t))
  14. {
  15. if (alst)
  16. {
  17. if ((*alst)->next)
  18. ft_lstdel(&(*alst)->next, del);
  19. ft_lstdelone(alst, del);
  20. }
  21. }