Merge branch 'master' of https://github.com/jzck/42sh
This commit is contained in:
commit
376a1e966b
3 changed files with 3 additions and 3 deletions
|
|
@ -20,7 +20,7 @@ static int c_addnode(t_comp *c, char *value)
|
||||||
{
|
{
|
||||||
t_clst *tmp;
|
t_clst *tmp;
|
||||||
|
|
||||||
if (!(tmp = (t_clst *)malloc(sizeof(t_clst))))
|
if (!(tmp = (t_clst *)ft_malloc(sizeof(t_clst))))
|
||||||
return (-1);
|
return (-1);
|
||||||
tmp->name = value;
|
tmp->name = value;
|
||||||
tmp->len = ft_strlen(tmp->name);
|
tmp->len = ft_strlen(tmp->name);
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ void c_init(t_data *s, long int input)
|
||||||
{
|
{
|
||||||
int len_trail;
|
int len_trail;
|
||||||
|
|
||||||
if (!(s->comp = (t_comp *)malloc((sizeof(t_comp)))))
|
if (!(s->comp = (t_comp *)ft_malloc((sizeof(t_comp)))))
|
||||||
return ;
|
return ;
|
||||||
c_init_base(s->comp);
|
c_init_base(s->comp);
|
||||||
s->comp->rcmd = c_trimmer(s->line.input, s->line.pos, s->line.pos);
|
s->comp->rcmd = c_trimmer(s->line.input, s->line.pos, s->line.pos);
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ static int c_storing(t_comp *c, char *value, unsigned char type)
|
||||||
return (0);
|
return (0);
|
||||||
if (c->match && ft_strnequ(c->match, value, ft_strlen(c->match)) != 1)
|
if (c->match && ft_strnequ(c->match, value, ft_strlen(c->match)) != 1)
|
||||||
return (0);
|
return (0);
|
||||||
if (!(tmp = (t_clst *)malloc(sizeof(t_clst))))
|
if (!(tmp = (t_clst *)ft_malloc(sizeof(t_clst))))
|
||||||
return (-1);
|
return (-1);
|
||||||
tmp->name = ft_strdup(value);
|
tmp->name = ft_strdup(value);
|
||||||
tmp->len = ft_strlen(tmp->name);
|
tmp->len = ft_strlen(tmp->name);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue