예제 #1
0
파일: main.c 프로젝트: mlevieux/Save
static void	treatment(t_ant **ants, t_room **rooms)
{
    int		num_ants;
    int		num_rooms;

    num_ants = 0;
    num_rooms = 0;
    ft_read(&rooms, &ants, &num_rooms, &num_ants);
    if (!num_rooms)
        ft_block("There is no room, where do you want the ants to go?\n");
    write(1, "\n", 1);
    ft_core(rooms, ants, num_ants);
}
예제 #2
0
파일: ullitoa.c 프로젝트: zombie555/ft_ls
char							*ft_ullitoa(unsigned long long nb)
{
	char						*str;
	unsigned long long			i;
	unsigned long long			n;

	if ((str = (char *)malloc(ft_intlen(nb) + 1 * (sizeof(char)))) == NULL)
		return (NULL);
	i = 0;
	n = nb;
	if (n == 0)
	{
		str[0] = '0';
		str[1] = '\0';
		return (str);
	}
	return (ft_core(n, str));
}