42_cube3D/libftx/libft/ft_lstsize.c

27 lines
1.0 KiB
C
Raw Permalink Normal View History

2023-04-26 07:02:44 -04:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstsize.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/09/30 01:18:08 by cchauvet #+# #+# */
/* Updated: 2022/09/30 01:18:15 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_lstsize(t_list *lst)
{
int count;
count = 0;
while (lst != NULL)
{
count++;
lst = lst->next;
}
return (count);
}