From 851968359252a8ef189e58c9ab80ad2caa0f714c Mon Sep 17 00:00:00 2001 From: Dominik Kaiser Date: Wed, 12 Nov 2025 14:29:55 +0100 Subject: Make runnable on linux --- include/minishell.h | 2 +- lib/libft/Makefile | 2 +- src/execute_cmd.c | 1 + src/main.c | 2 -- 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 #include +#include 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); diff --git a/src/main.c b/src/main.c index f759de7..9a5122b 100644 --- a/src/main.c +++ b/src/main.c @@ -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()) diff --git a/src/repl.c b/src/repl.c index a0b7864..3f4435d 100644 --- a/src/repl.c +++ b/src/repl.c @@ -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); -- cgit v1.2.3