diff options
Diffstat (limited to 'src/m_funptr.c')
-rw-r--r-- | src/m_funptr.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/m_funptr.c b/src/m_funptr.c index 2fdf4d1..bb8d80d 100644 --- a/src/m_funptr.c +++ b/src/m_funptr.c @@ -22,16 +22,14 @@ void init_buptr(t_msh *msh) { - msh->bu_ptr[0] = b_echo; - msh->bu_ptr[1] = b_cd; - msh->bu_ptr[2] = b_pwd; - msh->bu_ptr[3] = b_export; - msh->bu_ptr[4] = b_unset; - msh->bu_ptr[5] = b_env; - msh->bu_ptr[6] = b_exit; - msh->bu_ptr[7] = b_type; - if (!(msh->bu_ref = ft_split(FT_BUILTINS, '|'))) - { - f_alloc_and_destroy_msh(msh); - } + msh->bu_ptr[FT_ID_ECHO] = b_echo; + msh->bu_ptr[FT_ID_CD] = b_cd; + msh->bu_ptr[FT_ID_PWD] = b_pwd; + msh->bu_ptr[FT_ID_EXPORT] = b_export; + msh->bu_ptr[FT_ID_UNSET] = b_unset; + msh->bu_ptr[FT_ID_ENV] = b_env; + msh->bu_ptr[FT_ID_EXIT] = b_exit; + msh->bu_ptr[FT_ID_TYPE] = b_type; + msh->bu_ptr[FT_ID_SQB] = b_sqb; + msh->bu_ptr[FT_ID_ALIAS] = b_alias; } |