void print_rep(t_op options) { t_files *tmp; int len; t_op o; tmp = options.files; len = 0; while (tmp != NULL) { if ((tmp->type == 0 || (tmp->type == 3 && options.flag == 0)) && (ft_strcmp(tmp->file_name, ".") != 0 || options.flag == 0) && ft_strcmp(tmp->file_name, "..") != 0) { copy_options(&o, options, tmp->file_name); if (options.flag == 1 || count_files2(options) > 1) ft_printf("\n%s:\n", o.path); get_rep_files(o.path, &o); if (options.maj_r == 1) { print_rep(o); free_options(&o); } } tmp = tmp->next; } }
void putmyenv(t_dlist *newlst, t_opt *opt, t_env *env) { if (opt->rec && newlst) { env->start = 0; env->flag = 1; print_rep(newlst, opt, env); } if (newlst) { ft_dlstdel(&newlst->head, del2); free(newlst); } }