fix pb sur le tri completion

This commit is contained in:
gwojda 2017-03-23 15:43:54 +01:00
parent 6935bc80db
commit 809791f46e
6 changed files with 10 additions and 8 deletions

View file

@ -6,7 +6,7 @@
/* By: alao <alao@student.42.fr> +#+ +:+ +#+ */ /* By: alao <alao@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2016/02/18 11:13:04 by alao #+# #+# */ /* Created: 2016/02/18 11:13:04 by alao #+# #+# */
/* Updated: 2017/03/22 18:19:43 by alao ### ########.fr */ /* Updated: 2017/03/23 15:41:32 by gwojda ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -186,5 +186,6 @@ int c_exclusion_folder(t_comp *c);
int ft_sstrlen(char **s); int ft_sstrlen(char **s);
char *ft_sstrtostr(char **s, char *sep); char *ft_sstrtostr(char **s, char *sep);
char *ft_add_escape(char *str, char to_escape); char *ft_add_escape(char *str, char to_escape);
void c_lst_id(t_comp *c);
#endif #endif

View file

@ -6,7 +6,7 @@
/* By: gwojda <gwojda@student.42.fr> +#+ +:+ +#+ */ /* By: gwojda <gwojda@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/09 16:54:59 by gwojda #+# #+# */ /* Created: 2017/03/09 16:54:59 by gwojda #+# #+# */
/* Updated: 2017/03/22 20:25:19 by alao ### ########.fr */ /* Updated: 2017/03/23 15:42:37 by gwojda ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -37,4 +37,5 @@ void c_seek_abs_path(t_comp *c, char *current_word)
c_parser(c, c->cpath, c->match); c_parser(c, c->cpath, c->match);
if (c->lst == NULL || c->lst == c->lst->prev) if (c->lst == NULL || c->lst == c->lst->prev)
c_exclusion_folder(c); c_exclusion_folder(c);
c_lst_id(c);
} }

View file

@ -6,7 +6,7 @@
/* By: alao <alao@student.42.fr> +#+ +:+ +#+ */ /* By: alao <alao@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2017/01/09 13:30:57 by alao #+# #+# */ /* Created: 2017/01/09 13:30:57 by alao #+# #+# */
/* Updated: 2017/03/16 08:28:03 by alao ### ########.fr */ /* Updated: 2017/03/23 15:41:12 by gwojda ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -35,5 +35,6 @@ int c_seek_binary(t_data *s, t_comp *c)
c_parser(c, paths[i++], c->rcmd); c_parser(c, paths[i++], c->rcmd);
tmp ? ft_memdel((void *)&tmp) : (0); tmp ? ft_memdel((void *)&tmp) : (0);
paths ? ft_sstrfree(paths) : (0); paths ? ft_sstrfree(paths) : (0);
c_lst_id(c);
return (0); return (0);
} }

View file

@ -6,13 +6,12 @@
/* By: gwojda <gwojda@student.42.fr> +#+ +:+ +#+ */ /* By: gwojda <gwojda@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/09 15:50:24 by gwojda #+# #+# */ /* Created: 2017/03/09 15:50:24 by gwojda #+# #+# */
/* Updated: 2017/03/23 15:35:59 by gwojda ### ########.fr */ /* Updated: 2017/03/23 15:41:19 by gwojda ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "completion.h" #include "completion.h"
void c_lst_id(t_comp *c);
/* /*
** Create a new list node and add it by calling c_add_to_lst. ** Create a new list node and add it by calling c_add_to_lst.
*/ */

View file

@ -6,7 +6,7 @@
/* By: alao <alao@student.42.fr> +#+ +:+ +#+ */ /* By: alao <alao@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2017/01/09 13:31:21 by alao #+# #+# */ /* Created: 2017/01/09 13:31:21 by alao #+# #+# */
/* Updated: 2017/03/22 16:02:18 by gwojda ### ########.fr */ /* Updated: 2017/03/23 15:42:46 by gwojda ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -105,5 +105,6 @@ int c_seek_files(t_data *s, t_comp *c, char *current_word)
if (c->match && ft_strequ(c->match, c->lst->name)) if (c->match && ft_strequ(c->match, c->lst->name))
c_exclusion_folder(c); c_exclusion_folder(c);
} }
c_lst_id(c);
return (0); return (0);
} }

View file

@ -6,7 +6,7 @@
/* By: alao <alao@student.42.fr> +#+ +:+ +#+ */ /* By: alao <alao@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2017/01/09 13:52:07 by alao #+# #+# */ /* Created: 2017/01/09 13:52:07 by alao #+# #+# */
/* Updated: 2017/03/23 15:34:53 by gwojda ### ########.fr */ /* Updated: 2017/03/23 15:42:30 by gwojda ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -106,6 +106,5 @@ int c_parser(t_comp *c, char *path, char *name)
while ((dirc = readdir(rep))) while ((dirc = readdir(rep)))
c_storing(c, dirc->d_name, dirc->d_type); c_storing(c, dirc->d_name, dirc->d_type);
closedir(rep); closedir(rep);
c_lst_id(c);
return (0); return (0);
} }