replaced occurrences of last exit_status

+ deleted envp comments
+ WIP Macro exit status
+ TODO : Invalid free of environ in readline
This commit is contained in:
LuckyLaszlo
2021-11-27 12:59:16 +01:00
parent 843b6d84c5
commit 3baf91afb3
16 changed files with 59 additions and 65 deletions

View File

@@ -1,7 +1,7 @@
#include "minishell.h"
int getenv_position(char **envp, char *name)
int getenv_position(char **envp, char *name) // TODO : virer arg envp et utiliser "extern **environ" à la place
{
int i;
@@ -26,7 +26,7 @@ int builtin_export(int argc, char *argv[], t_all *c)
environ = ft_resize_2d_arr(environ, 1);
environ[env_position] = ft_strdup(argv[1]);
if (!ft_strncmp(var[0], "PATH", 4 + 1))
c->path = retrieve_path(environ);
c->path = retrieve_path();
// free var
return (0);
}