diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-09-13 21:01:18 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-09-13 21:01:18 +0200 |
| commit | c51d31b8b751585153500729c25ae2f02d179e45 (patch) | |
| tree | eab34e14508f5a2a3ad2c5d06c56afdd7ba72e9e /src/builtin/builtin.c | |
| parent | 490237aece240c05b5a9035665a88327e1be87ed (diff) | |
| download | minishell-c51d31b8b751585153500729c25ae2f02d179e45.tar.gz minishell-c51d31b8b751585153500729c25ae2f02d179e45.tar.bz2 minishell-c51d31b8b751585153500729c25ae2f02d179e45.zip | |
Refactoring eval file structure, Added comment to builtin
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; |
