-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlist_utils_reset.c
More file actions
40 lines (35 loc) · 1.24 KB
/
list_utils_reset.c
File metadata and controls
40 lines (35 loc) · 1.24 KB
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
32
33
34
35
36
37
38
39
40
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* list_utils_reset.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rbeaufre <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/11/24 17:56:54 by rbeaufre #+# #+# */
/* Updated: 2019/11/27 18:34:53 by rbeaufre ### ########.fr */
/* */
/* ************************************************************************** */
#include "lem_in.h"
static void ft_reset_arcw(t_node *node)
{
t_list *tmp;
tmp = node->next;
while (tmp)
{
tmp->arcw = 0;
tmp = tmp->next;
}
}
void ft_reset_passed_flags(t_list **list)
{
t_list *tmp;
t_node *node;
tmp = *list;
while (tmp && tmp->next)
{
node = (t_node *)tmp->content;
node->passed_flag = 0;
ft_reset_arcw(node);
tmp = tmp->next;
}
}