Esempio n. 1
0
void	ft_loop_bsq(int ac, char **av)
{
	unsigned long long	ret2;
	char				*buf;
	t_bsq_data			data;
	char				**bsq;
	int					i;

	i = 1;
	while (i < ac)
	{
		ret2 = ft_get_swap(i, av);
		buf = ft_read(ret2);
		data = ft_get_infos(buf, ret2);
		bsq = ft_get_bsq(data, buf);
		if ((ft_check_map(bsq, data) == FALSE))
			write(2, "map error\n", 10);
		else
		{
			bsq = ft_fill_square(bsq, data, ft_check_tab(bsq, data));
			ft_print_bsq(bsq, data);
		}
		ft_free_bsq(bsq, data);
		i++;
	}
}
Esempio n. 2
0
void	ft_print_and_resolve(int **tab, t_map *map)
{
	t_tab place;

	tab = ft_adding(map->nb_columns, map->nb_lines, tab);
	place = ft_check_tab(tab, map->nb_columns, map->nb_lines);
	exec(tab, place, map);
}