/* By: ljiriste <ljiriste@student.42prague.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/07/21 08:57:54 by ljiriste #+# #+# */
-/* Updated: 2024/07/21 19:47:22 by ljiriste ### ########.fr */
+/* Updated: 2024/07/21 20:00:06 by ljiriste ### ########.fr */
/* */
/* ************************************************************************** */
return (0);
}
+static const char null_char = '\0';
+
char **expand(t_parse_tree_node *simple_command, const t_execution_env *env)
{
size_t i;
+ char **res;
t_vec expanded_str;
t_parse_tree_node *subnode;
}
++i;
}
- return (expanded_str.vec);
+ if (ft_vec_append(&expanded_str, &null_char) != success)
+ {
+ ft_vec_free(&expanded_str, NULL);
+ return (NULL);
+ }
+ res = ft_split(expanded_str.vec, ' ');
+ ft_vec_free(&expanded_str, NULL);
+ return (res);
+}
+
+int assignments_to_env(const t_vec *assignments, t_execution_env *env)
+{
+
}
int ex_simple_command(t_parse_tree_node *simple_command, t_execution_env *env)