-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexport_utils6.c
38 lines (33 loc) · 1.46 KB
/
export_utils6.c
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
28
29
30
31
32
33
34
35
36
37
38
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* export_utils6.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mazaroua <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/05/15 20:17:19 by abenheni #+# #+# */
/* Updated: 2023/05/16 15:05:24 by mazaroua ### ########.fr */
/* */
/* ************************************************************************** */
#include "minishell.h"
void edit_free(char **name_value, t_export **export, t_env_list **env_list)
{
edit_value(name_value[0], name_value[1], export, env_list);
free_2d(name_value);
}
void append_free(char **name_value, t_export **export, t_env_list **env_list)
{
append_string(name_value[0], name_value[1], export, env_list);
free_2d(name_value);
}
char **fill_name_value(char *str)
{
char **name_value;
name_value = malloc(sizeof(char *) * 3);
if (!name_value)
return (NULL);
name_value[0] = get_name(str);
name_value[1] = get_value(str);
name_value[2] = NULL;
return (name_value);
}