Esempio n. 1
0
int	my_resolve_brute(int **tab, t_variant *alph)
{
  int	i;
  int	dir;

  i = 0;
  dir = 1;
  while (i < alph->size)
    {
      dir = resolve_line(tab, i, dir, alph);
      i = i + dir;
      if (i < 0)
	{
	  fill_minus_one(tab, alph);
	  return (0);
	}
    }
  return (0);
}
Esempio n. 2
0
t_linked_list	*resolve_layer(t_linked_list *abstracted_layer, t_linked_list *splitted_strings)
{
	t_linked_list	*res;
	t_linked_list	*declared_functions;
	t_linked_list	*builtin_keywords;
	int				i;

	declared_functions = get_declared_functions(abstracted_layer, splitted_strings);
	builtin_keywords = get_builtin_keywords();
	add_builtin_functions_to_functions(declared_functions);
	print_declared_functions(declared_functions);
	res = new_list();
	i = 0;
	while (i < abstracted_layer->len)
	{
		add_to_list(res, resolve_line(((t_linked_list*)abstracted_layer->elts[i]), declared_functions,
							((t_linked_list**)splitted_strings->elts + i), builtin_keywords));
		i++;
	}
	res = normalize_indentation(res, &splitted_strings);
	print_resolved_layer(res);
	print_splitted_lines(splitted_strings);
	return (res);
}