-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_print_list_cir.c
31 lines (28 loc) · 1.16 KB
/
ft_print_list_cir.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_print_list_cir.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: lbopp <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/02/15 11:23:19 by lbopp #+# #+# */
/* Updated: 2017/02/15 11:23:31 by lbopp ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_print_list_cir(t_list_cir *list_cir)
{
t_list_cir *tmp;
if (list_cir == NULL)
ft_putstr_fd("List is empty", 2);
else
{
ft_putendl(list_cir->content);
tmp = list_cir->prev;
while (tmp != list_cir)
{
ft_putendl(tmp->content);
tmp = tmp->prev;
}
}
}