diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-04-20 17:31:32 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-04-20 17:31:32 +0200 |
commit | c85c10c0308c565ed0e1c6320a81551f1777b56d (patch) | |
tree | 8f4fbed31da06f4f0716cd37d1b4cfaa43f55685 /src/ft_m_funptr.c | |
parent | Nice prompt (diff) | |
download | 42-minishell-c85c10c0308c565ed0e1c6320a81551f1777b56d.tar.gz 42-minishell-c85c10c0308c565ed0e1c6320a81551f1777b56d.tar.bz2 42-minishell-c85c10c0308c565ed0e1c6320a81551f1777b56d.tar.xz 42-minishell-c85c10c0308c565ed0e1c6320a81551f1777b56d.tar.zst 42-minishell-c85c10c0308c565ed0e1c6320a81551f1777b56d.zip |
Cool funptr
Diffstat (limited to '')
-rw-r--r-- | src/ft_m_funptr.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/ft_m_funptr.c b/src/ft_m_funptr.c new file mode 100644 index 0000000..682472b --- /dev/null +++ b/src/ft_m_funptr.c @@ -0,0 +1,31 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* 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 "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, '|'))) + { + return ; + } +} |