completion a partir de la racine ok (sauf si jai fait des betises)

This commit is contained in:
gwojda 2017-03-08 13:39:41 +01:00
parent c1b3704cab
commit 4d805a1c74
5 changed files with 15 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/02/18 14:35:10 by alao ### ########.fr */ /* Updated: 2017/03/08 13:34:05 by gwojda ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -162,4 +162,10 @@ int c_spacing_clear(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);
/*
** yolo je mets ca au pif - gwojda
*/
int c_exclusion_folder(t_comp *c);
#endif #endif

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/02/17 15:34:30 by alao ### ########.fr */ /* Updated: 2017/03/08 13:33:13 by gwojda ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -20,7 +20,7 @@
** Returning 1 if success (trigger an update) or 0. ** Returning 1 if success (trigger an update) or 0.
*/ */
static int c_exclusion_folder(t_comp *c) int c_exclusion_folder(t_comp *c)
{ {
DIR *rep; DIR *rep;
char *tmp; char *tmp;

View file

@ -6,7 +6,7 @@
/* By: alao <alao@student.42.fr> +#+ +:+ +#+ */ /* By: alao <alao@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2017/01/09 11:21:16 by alao #+# #+# */ /* Created: 2017/01/09 11:21:16 by alao #+# #+# */
/* Updated: 2017/02/17 13:44:39 by alao ### ########.fr */ /* Updated: 2017/03/08 12:18:07 by gwojda ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */

View file

@ -6,7 +6,7 @@
/* By: alao <alao@student.42.fr> +#+ +:+ +#+ */ /* By: alao <alao@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2016/10/15 13:27:14 by alao #+# #+# */ /* Created: 2016/10/15 13:27:14 by alao #+# #+# */
/* Updated: 2017/02/17 12:29:20 by alao ### ########.fr */ /* Updated: 2017/03/08 13:33:10 by gwojda ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -29,9 +29,10 @@ int c_matching(t_data *s, t_comp *c)
{ {
if (c->rcmd[0] == '.' || c->rcmd[0] == '/') if (c->rcmd[0] == '.' || c->rcmd[0] == '/')
{ {
c->rcmd[0] == '.' ? c->cpath = path_solver(c, "./", NULL) : 0; c->cpath = ft_strndup(c->rcmd, ft_strrchr(c->rcmd, '/') - c->rcmd + 1);
c->rcmd[0] == '/' ? c->cpath = path_solver(c, "/", NULL) : 0; !c->match ? c->match = ft_strdupi_w(ft_strrchr(c->rcmd, '/') + 1) : 0;
c_parser(c, c->cpath, c->match); c_parser(c, c->cpath, c->match);
c_exclusion_folder(c);
} }
else if (!(ft_strchr(c->rcmd, ' '))) else if (!(ft_strchr(c->rcmd, ' ')))
c_seek_binary(s, c); c_seek_binary(s, c);

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/02/17 15:34:57 by alao ### ########.fr */ /* Updated: 2017/03/08 12:56:35 by gwojda ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */