diff options
Diffstat (limited to 'src/builtin/builtin.c')
| -rw-r--r-- | src/builtin/builtin.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/builtin/builtin.c b/src/builtin/builtin.c index 08abcd8..23a5f44 100644 --- a/src/builtin/builtin.c +++ b/src/builtin/builtin.c @@ -6,7 +6,7 @@ /* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/04/01 17:11:01 by charles #+# #+# */ -/* Updated: 2020/07/17 11:16:57 by charles ### ########.fr */ +/* Updated: 2020/09/13 20:18:32 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -18,7 +18,8 @@ #include "minishell.h" /* -** \brief Array storing builtin executable name and associated functions +** \brief Array storing builtin executable name, associated functions +** and if they should be executed in a fork */ static t_builtin_entry g_builtin_lookup[] = { @@ -31,6 +32,13 @@ static t_builtin_entry g_builtin_lookup[] = { {"exit", builtin_exit, false}, }; +/* +** \brief Search a builtin by name in g_builtin_lookup +** \param name Name of the searched builtin +** \return the builtin entry of the associated name +** or NULL if name is not a builtin. +*/ + t_builtin_entry *builtin_search_func(char *name) { size_t i; |
