diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-09-16 16:40:22 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-09-16 16:40:22 +0200 |
| commit | 3bb997212b3a0d140a34932f9deff52793673d49 (patch) | |
| tree | 2df7ed965a0a29a1c47442831218cdf553633dfb /include/minishell.h | |
| parent | e439b71d807529734f04ce9d78b98c12022e7c72 (diff) | |
| download | minishell-3bb997212b3a0d140a34932f9deff52793673d49.tar.gz minishell-3bb997212b3a0d140a34932f9deff52793673d49.tar.bz2 minishell-3bb997212b3a0d140a34932f9deff52793673d49.zip | |
Added g_state to store global variables, Refactoring tok_assign_str
Diffstat (limited to 'include/minishell.h')
| -rw-r--r-- | include/minishell.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/include/minishell.h b/include/minishell.h index 58afe7f..2f64269 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/09/16 16:07:36 by charles ### ########.fr */ +/* Updated: 2020/09/16 16:26:25 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -50,8 +50,14 @@ typedef t_ftvec* t_env; -extern int g_last_status; -extern char *g_progname; +typedef struct +{ + int last_status; + char *progname; + +} t_state; + +extern t_state g_state; /* ** path.c @@ -127,6 +133,6 @@ void print_prompt(void); ** setup.c */ -bool setup(char *first_arg, t_env env); +bool setup(char *first_arg, t_env env); #endif |
