diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-07-15 12:44:15 +0200 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-07-15 12:44:15 +0200 |
| commit | ecd23e205de52d84d9a843fc891d7890d1046682 (patch) | |
| tree | cfb48581ba7601079cc34cf9d4438d12dcd1efd1 /include/minishell.h | |
| parent | 2025376e43a174586f087ff284d1f65798f555b2 (diff) | |
| download | minishell-ecd23e205de52d84d9a843fc891d7890d1046682.tar.gz minishell-ecd23e205de52d84d9a843fc891d7890d1046682.tar.bz2 minishell-ecd23e205de52d84d9a843fc891d7890d1046682.zip | |
Added g_basename global for error message prefix
Diffstat (limited to 'include/minishell.h')
| -rw-r--r-- | include/minishell.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/include/minishell.h b/include/minishell.h index 9405109..67c2266 100644 --- a/include/minishell.h +++ b/include/minishell.h @@ -6,7 +6,7 @@ /* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/26 15:33:51 by cacharle #+# #+# */ -/* Updated: 2020/07/14 09:35:14 by charles ### ########.fr */ +/* Updated: 2020/07/14 11:06:50 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -48,6 +48,7 @@ typedef t_ftht* t_path; typedef t_ftvec* t_env; extern int g_last_status_code; +extern char *g_basename; /* ** path.c @@ -85,7 +86,6 @@ typedef struct { char *name; t_builtin_func func; - bool child_process; } t_builtin_entry; t_builtin_entry *builtin_search_func(char *name); @@ -118,14 +118,20 @@ enum e_error ERROR_CMD_FOUND_ERROR, }; +/* +** \brief Error specification +** \param id Error type +** \param status Status code returned +** \param msg Error message to print, if is NULL, use strerror as a msg +*/ + typedef struct { enum e_error id; int status; - char *msg; // if NULL call strerror - // char basename; + char *msg; } t_error; -void error_eval_put(enum e_error id, char *unexpected); +void error_eval_put(enum e_error id, char *content); #endif |
