31 lines
1.4 KiB
C
31 lines
1.4 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* path.h :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* 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 */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#ifndef PATH_H
|
|
# define PATH_H
|
|
|
|
# include "include.h"
|
|
|
|
///// 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);
|
|
|
|
#endif
|