diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-07-27 18:55:07 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-07-27 18:55:07 +0200 |
commit | 487a66394061f2d14a2fa421302966b5442d643f (patch) | |
tree | 34237d4e9cb85f94bcefd46f399d2224dff3f6b3 /src/s_init.c | |
parent | Correct shell prompt (diff) | |
download | 42-minishell-487a66394061f2d14a2fa421302966b5442d643f.tar.gz 42-minishell-487a66394061f2d14a2fa421302966b5442d643f.tar.bz2 42-minishell-487a66394061f2d14a2fa421302966b5442d643f.tar.xz 42-minishell-487a66394061f2d14a2fa421302966b5442d643f.tar.zst 42-minishell-487a66394061f2d14a2fa421302966b5442d643f.zip |
I couldn't see shit
Diffstat (limited to '')
-rw-r--r-- | src/s_init.c (renamed from src/ft_s_init.c) | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/ft_s_init.c b/src/s_init.c index 88a3817..454cb67 100644 --- a/src/ft_s_init.c +++ b/src/s_init.c @@ -1,7 +1,7 @@ /* ************************************************************************** */ /* */ /* ::: :::::::: */ -/* ft_s_init.c :+: :+: :+: */ +/* s_init.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ @@ -15,12 +15,12 @@ #include <stdlib.h> #include <unistd.h> -#include "ft_d_define.h" -#include "ft_m_funptr.h" -#include "ft_s_init.h" +#include "d_define.h" +#include "m_funptr.h" +#include "s_init.h" static char - **ft_dupenv_del(char **nenvp, + **dupenv_del(char **nenvp, uint64_t i) { while (i > 0) @@ -33,7 +33,7 @@ static char } static char - **ft_dupenv(char *const envp[]) + **dupenv(char *const envp[]) { uint64_t i; char **nenvp; @@ -51,7 +51,7 @@ static char while (envp[i]) { if (!(nenvp[i] = ft_strdup(envp[i]))) - return (ft_dupenv_del(nenvp, i)); + return (dupenv_del(nenvp, i)); i++; } nenvp[i] = NULL; @@ -59,7 +59,7 @@ static char } t_msh - *ft_init_msh(char *const argv[], + *init_msh(char *const argv[], char *const envp[]) { t_msh *msh; @@ -75,10 +75,10 @@ t_msh msh->cwd = getcwd(NULL, 0); /* TODO: handle getcwd failed */ msh->envp = NULL; - if (!(msh->envp = ft_dupenv(envp))) + if (!(msh->envp = dupenv(envp))) return (NULL); msh->ret = 0; - ft_init_buptr(msh); + init_buptr(msh); msh->curr = NULL; msh->vars = NULL; return (msh); |