lem_in/srcs/lm_graph_utils.c
Tanguy MAZE 3b893147e5 IT WORKS !
functionning ./lem_in that can read maps and display ants path
still need to clean leaks
still need remove debug info
2019-04-09 19:09:29 +02:00

34 lines
1.2 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* lm_graph_utils.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mndhlovu <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/03/29 07:17:06 by mndhlovu #+# #+# */
/* Updated: 2019/04/09 18:18:59 by tmaze ### ########.fr */
/* */
/* ************************************************************************** */
#include "lem_in.h"
int lm_adj_parser(t_lmdata *lmdata, t_holder *holder)
{
t_temp *data;
if (holder != NULL)
{
data = holder->data;
if (data != NULL)
{
while (data)
{
lst_indadd_link(lmdata, data->src_ind, data->dest_ind);
data = data->next;
}
return (1);
}
}
return (0);
}