blob: 813e5a37dd7a521af9b25a2053b693c030817c05 (
plain)
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
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_m_funptr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/14 17:19:27 by rbousset #+# #+# */
/* Updated: 2020/02/14 17:19:29 by rbousset ### ########lyon.fr */
/* */
/* ************************************************************************** */
#include <libft.h>
#include <stdlib.h>
#include "ft_b_echo.h"
#include "ft_b_env.h"
#include "ft_d_enum.h"
#include "ft_f_fail.h"
#include "ft_m_funptr.h"
#include "ft_s_struct.h"
void
ft_init_buptr(t_msh *msh)
{
msh->bu_ptr[0] = ft_b_echo;
/* msh->bu_ptr[1] = ft_b_cd; */
/* msh->bu_ptr[2] = ft_b_pwd; */
/* msh->bu_ptr[3] = ft_b_export; */
/* msh->bu_ptr[4] = ft_b_unset; */
msh->bu_ptr[5] = ft_b_env;
/* msh->bu_ptr[6] = ft_b_exit; */
/* msh->bu_ptr[7] = ft_b_cat; */
if (!(msh->bu_ref = ft_split(FT_BUILTINS, '|')))
{
ft_fail_alloc();
}
}
|