Added env hashmap with build_env function to build envp
This commit is contained in:
parent
f35e986145
commit
f86947a852
54 changed files with 2010 additions and 105 deletions
40
sources/exec/handle_expension.c
Normal file
40
sources/exec/handle_expension.c
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* handle_expension.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/05/03 15:24:25 by maiboyer #+# #+# */
|
||||
/* Updated: 2024/05/04 18:28:39 by maiboyer ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "app/node/handle_expension.h"
|
||||
#include "gmr/symbols.h"
|
||||
#include "me/types.h"
|
||||
|
||||
t_error handle_expension_complex(t_node *self, t_utils *shcat, t_str *ret)
|
||||
{
|
||||
(void)(self);
|
||||
(void)(shcat);
|
||||
(void)(ret);
|
||||
return (ERROR);
|
||||
}
|
||||
t_error handle_expension_simple(t_node *self, t_utils *shcat, t_str *ret)
|
||||
{
|
||||
(void)(self);
|
||||
(void)(shcat);
|
||||
(void)(ret);
|
||||
return (ERROR);
|
||||
}
|
||||
|
||||
t_error handle_expension(t_node *self, t_utils *shcat, t_str *ret)
|
||||
{
|
||||
if (self->childs_count != 0 && self->childs[0].kind == anon_sym_DOLLAR)
|
||||
return (handle_expension_simple(self, shcat, ret));
|
||||
if (self->childs_count != 0 &&
|
||||
self->childs[0].kind == anon_sym_DOLLAR_LBRACE)
|
||||
return (handle_expension_complex(self, shcat, ret));
|
||||
return (ERROR);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue