-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_getpaths.c
More file actions
27 lines (24 loc) · 1.09 KB
/
ft_getpaths.c
File metadata and controls
27 lines (24 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_getpaths.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: sid-bell <sid-bell@student.1337.ma> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/09/04 00:33:37 by sid-bell #+# #+# */
/* Updated: 2019/02/22 09:53:20 by sid-bell ### ########.fr */
/* */
/* ************************************************************************** */
#include "minishell.h"
char **ft_getpaths(t_list *list)
{
char *path;
char **result;
if ((path = ft_get_env_key("PATH", list)))
{
result = ft_strsplit(path, ':');
free(path);
return (result);
}
return (NULL);
}