Exemple #1
0
int		echo(t_plist *plist, char **tab, char **env)
{
  int		j;
  int		i;
  t_list	*list;

  list = plist->begin;
  i = 1;
  j = 0;
  if (tab[i] && ((my_strcmp("-n", tab[i])) == 0))
    echo_n(tab);
  else if (tab[i] && (tab[i][0] == '$'))
    echo_valuenv(tab, list);
  else
    {
      while (tab[i])
	{
	  if (check_quote(tab, env) == -1)
	    return (error_quote());
	  custom_putstr(tab, i, j);
	  i++;
	  j = 0;
	}
      my_putchar('\n');
    }
  return (0);
}
Exemple #2
0
t_list	*sa(t_list *list, int space)
{
	int	num;

	num = list->next->num;
	list->next->num = list->num;
	list->num = num;
	custom_putstr("sa", space);
	return (list);
}
Exemple #3
0
t_list	*pb(t_list *list, t_list *begin, int space)
{
	list = del_list(list, begin);
	custom_putstr("pb", space);
	return (list);
}
Exemple #4
0
void	pa(void)
{
	custom_putstr("pa", 1);
}
Exemple #5
0
t_list	*rra(t_list *list, int space)
{
	list = list->prev;
	custom_putstr("rra", space);
	return (list);
}
Exemple #6
0
t_list	*ra(t_list *list, int space)
{
	list = list->next;
	custom_putstr("ra", space);
	return (list);
}