Ejemplo n.º 1
0
int	ft_printf(char *str, ...)
{
	va_list	ap;
	t_numb	*e;
	int		cnt;

	va_start(ap, str);
	cnt = 0;
	e = (t_numb*)malloc(sizeof(t_numb));
	ft_p3(str, e);
	if (e->ind1 % 2 == 0)
	{
		while (*str != 0)
		{
			cnt = cnt + ft_p1(&str, e, ap);
			ft_p2(&str, e);
		}
	}
	else if (e->ind1 % 2 == 1)
		cnt = cnt + ft_p4(str, e);
	va_end(ap);
	free(e);
	e = NULL;
	return (cnt);
}
Ejemplo n.º 2
0
void	*ft_wolf(void *tab)
{
	t_indication id;

	id = *(t_indication *)tab;
	while (id.x < id.x_next)
	{
		ft_p1(&id);
		ft_p2(&id);
		ft_p3(&id);
		ft_p4(&id);
		ft_show(&id);
		ft_show_other(&id);
		id.x++;
	}
	return (0);
}