fix: $PATH checked from variables *
also fix variables assignment
This commit is contained in:
parent
1091ddf32f
commit
ef11eb0c8c
7 changed files with 24 additions and 24 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: jschaft <cecile.schaft@orange.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/04/23 14:15:12 by mcolonna #+# #+# */
|
||||
/* Updated: 2024/06/13 14:01:41 by mcolonna ### ########.fr */
|
||||
/* Updated: 2024/06/21 16:22:20 by mcolonna ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -50,4 +50,7 @@ typedef struct s_pipes
|
|||
// If error, return a t_command wth the value .error = true.
|
||||
t_command parse_command(t_env *env, const char *command);
|
||||
|
||||
// TODO reorganize
|
||||
const char *variables_get(t_list *variables, const char *name);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: jschaft <cecile.schaft@orange.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/04/23 14:15:12 by mcolonna #+# #+# */
|
||||
/* Updated: 2024/06/13 13:00:10 by mcolonna ### ########.fr */
|
||||
/* Updated: 2024/06/21 16:24:15 by mcolonna ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -17,15 +17,11 @@
|
|||
|
||||
///// PATH /////
|
||||
|
||||
// Get the PATH values.
|
||||
// Return a list of strings ended by NULL.
|
||||
const char **get_path(const t_memclass mc, char *const envp[]);
|
||||
|
||||
// Search the program in $PATH.
|
||||
// Returns the path of the program to use, or NULL if there is none.
|
||||
// If there is several possibilities, it returns the one from the first path
|
||||
// given in $PATH.
|
||||
const char *search_path(
|
||||
const t_memclass mc, const char **path, const char *prog);
|
||||
const t_memclass mc, t_list *variables, const char *prog);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue