diff options
| -rw-r--r-- | include/minishell.h | 2 | ||||
| -rw-r--r-- | lib/libft/Makefile | 2 | ||||
| -rw-r--r-- | src/execute_cmd.c | 1 | ||||
| -rw-r--r-- | src/main.c | 2 | ||||
| -rw-r--r-- | src/repl.c | 1 |
5 files changed, 3 insertions, 5 deletions
diff --git a/include/minishell.h b/include/minishell.h index 6961815..354d5b9 100644 --- a/include/minishell.h +++ b/include/minishell.h @@ -30,7 +30,7 @@ int init(void); int init_signal_handling(void); -void repl(const char *prompt, t_env **env, int *promptflag); +void repl(const char *prompt, t_env **env); t_node *parse(t_token *tokens, t_env **env); t_node *parse_cmd(t_token *tokens, t_env **env); diff --git a/lib/libft/Makefile b/lib/libft/Makefile index 2150e99..055f166 100644 --- a/lib/libft/Makefile +++ b/lib/libft/Makefile @@ -1,6 +1,6 @@ NAME = libft.a CC = cc -CFLAGS = -Wall -Wextra -Werror +CFLAGS = -Wall -Wextra SRC = ft_atoi.c \ ft_bzero.c \ diff --git a/src/execute_cmd.c b/src/execute_cmd.c index adfcb37..2d8878b 100644 --- a/src/execute_cmd.c +++ b/src/execute_cmd.c @@ -13,6 +13,7 @@ #include "minishell.h" #include <stdio.h> #include <stdlib.h> +#include <wait.h> static void establish_pipeline(int original_stdin, int original_stdout); static int exec_cmd(t_cmd *cmd, t_env **env, int original_std[2], int result); @@ -15,10 +15,8 @@ int main(int argc, char *argv[], char *envp[]) { t_env *env; - static int promptflag; env = NULL; - promptflag = 0; if (!argc && !argv) return (1); if (init()) @@ -26,7 +26,6 @@ void repl(const char *prompt, t_env **env) t_token *token_list; t_node *ast; - (*promptflag)++; while (1) { input = readline(prompt); |
