summaryrefslogtreecommitdiffstats
path: root/src/m_funptr.c
blob: 2ae09f6c0e1f917f623fb6033d064f175e39da8e (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
/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   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 "d_enum.h"
#include "b_builtins.h"
#include "f_fail.h"
#include "m_funptr.h"
#include "s_struct.h"

void	init_buptr(t_msh *msh)
{
	msh->bu_ptr[B_ID_ECHO] = b_echo;
	msh->bu_ptr[B_ID_CD] = b_cd;
	msh->bu_ptr[B_ID_PWD] = b_pwd;
	msh->bu_ptr[B_ID_EXPORT] = b_export;
	msh->bu_ptr[B_ID_UNSET] = b_unset;
	msh->bu_ptr[B_ID_ENV] = b_env;
	msh->bu_ptr[B_ID_EXIT] = b_exit;
	msh->bu_ptr[B_ID_TYPE] = b_type;
	msh->bu_ptr[B_ID_SQB] = b_sqb;
	msh->bu_ptr[B_ID_ALIAS] = b_alias;
	msh->bu_ptr[B_ID_H] = b_h;
}