Implement variables framework, update Libft
authorLukas Jiriste <ljiriste@student.42prague.com>
Thu, 2 May 2024 11:27:09 +0000 (13:27 +0200)
committerLukas Jiriste <ljiriste@student.42prague.com>
Thu, 2 May 2024 12:00:21 +0000 (14:00 +0200)
commit184d7cb99bcd836bf07f0707d08ddd8ef1ecee0f
tree3f3ebb222f73cb643f4e3ba87cb198968c57df12
parentf1da67974f0da2a220b0fca4a75c9dd3305de964
Implement variables framework, update Libft

So far the variable handling consists of copying the environment
inherited by minishell to separate variable to make changes to it
possible (I suspect that one should not directly change the environ).

The vars struct consists of 2 vectos of strings, one for the exported
variables and one for the others.
This is done so that the exported->vec can be directly passed to execve
instead of contructing it by filtering the exported values from
a common vector.
This is also why the vector is initialized with NULL. The other vec
is constructed the same way so as to be able to reuse the code for
exported.

During work on this commit the function ft_strcat_alloc seemed to be
a great candidate for  addition to Libft. That was done and the
function was used in this commit, hence the Libft update.
Libft
Makefile
inc/minishell.h [new file with mode: 0644]
src/main.c
src/vars.c [new file with mode: 0644]