char *ft_utoa(t_ul n, t_ul base) { t_ul nb_nbr; char *toa; nb_nbr = count_nbr(n); toa = ft_strnew(nb_nbr + 1); make_string(toa, n, base); return (toa); }
void stock_fd(t_coor *coor) { int j; int i; i = 0; coor->map = (int **)malloc(sizeof(int *) * coor->nbr_line); coor->len = (int *)malloc(sizeof(int) * coor->nbr_line); while (get_next_line(coor->fd, &(coor->line)) == 1) { j = 0; coor->line = all_to_space(coor->line); coor->split = ft_strsplit(coor->line, ' '); coor->len[i] = count_nbr(coor->line); coor->map[i] = (int *)malloc(sizeof(int) * coor->len[i]); while (j < coor->len[i]) { coor->map[i][j] = ft_getnbr(coor->split[j]); j++; } i++; free(coor->split); } }