cd ok et appel a path dans export
This commit is contained in:
12
srcs/init.c
12
srcs/init.c
@@ -6,14 +6,16 @@
|
||||
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2021/10/08 09:22:12 by lperrey #+# #+# */
|
||||
/* Updated: 2021/11/25 19:47:00 by hulamy ### ########.fr */
|
||||
/* Updated: 2021/11/25 23:59:33 by hulamy ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "minishell.h"
|
||||
|
||||
static char *init_prompt_base(void);
|
||||
static char *init_prompt(char *prompt_base);
|
||||
// pas static si utilisee par cd
|
||||
//static char *init_prompt(char *prompt_base);
|
||||
char *init_prompt(char *prompt_base);
|
||||
|
||||
//int init(t_all *c, char *envp[])
|
||||
int init(t_all *c, char **environ)
|
||||
@@ -37,7 +39,8 @@ int init(t_all *c, char **environ)
|
||||
return (1);
|
||||
}
|
||||
|
||||
// TODO : Un appel à builtin_export() modifiant $PATH doit aussi entrainer un appel à "c->path = retrieve_path()"
|
||||
// done : TODO : Un appel à builtin_export() modifiant $PATH doit aussi entrainer un appel à "c->path = retrieve_path()"
|
||||
// changer le prototype si utilise pas envp
|
||||
char **retrieve_path(char *envp[])
|
||||
{
|
||||
char *path;
|
||||
@@ -74,7 +77,8 @@ static char *init_prompt_base(void) // WIP, error return TODO
|
||||
return (prompt_base);
|
||||
}
|
||||
|
||||
static char *init_prompt(char *prompt_base) // WIP, error return TODO
|
||||
//static char *init_prompt(char *prompt_base) // WIP, error return TODO
|
||||
char *init_prompt(char *prompt_base) // WIP, error return TODO
|
||||
{
|
||||
char *prompt;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user