Ejemplo n.º 1
0
void	search_cmd(t_group *all)
{
	t_list	*tmp;

	tmp = all->l;
	while (tmp)
	{
		if (iscmd(tmp->line))
			treat_cmd(tmp->line, all, tmp->nb_line);
		tmp = tmp->next;
	}
}
Ejemplo n.º 2
0
int	gest_cmd(t_env *envp, t_pwd *my_pwd)
{
  char	*buffer;
  int	end;

  end = 1;
  while (end)
    {
      buffer = show_prompt(envp, my_pwd);
      if (buffer != NULL)
	{
	  end = treat_cmd(buffer, &envp, &my_pwd);
	  if (buffer != NULL)
	    free(buffer);
	}
    }
  quit(envp, my_pwd);
  return (0);
}