void l_print(void *data) { int i; char *tmp; if ((*DATA->max)->display_total == 0) ft_print_total(data); ft_buf_print(DATA->perms); ft_print_lks(data); ft_print_user(data); ft_print_gpe(data); if (DATA->perms[0] == 'c' || DATA->perms[0] == 'b') ft_print_dev_one(data); else if (ft_strstr(DATA->path, "/dev") && (*DATA->max)->m_maj > 1) ft_print_dev_two(data); else { i = (*DATA->max)->m_size - ft_intlength(DATA->size); while (i-- > 0) ft_buf_print(" "); ft_buf_print((tmp = ft_ltoa(DATA->size))); ft_strdel(&tmp); } ft_buf_print(" "); ft_buf_print(DATA->motime); ft_buf_print(" "); ft_print_name(data); }
void ft_list_and_print_folder(t_args *ls) { if (ls->l) ft_print_total(ls->all_files, ls); ft_print_list(ls->all_files, ls); if (ls->rmaj) ft_use_recursive(ls); }