aboutsummaryrefslogtreecommitdiff
path: root/src/repl.c
diff options
context:
space:
mode:
authorDominik Kaiser2025-01-25 15:42:11 +0100
committerDominik Kaiser2025-01-25 15:42:11 +0100
commit21874e1446ccd08f4433870a69dbe1c08f8331a9 (patch)
treee0d92a277fbb353167ff7909a2007f669058b5bc /src/repl.c
parentb427100b6c0c655f74dc689533a3f36edfeebffc (diff)
downloadminishell-21874e1446ccd08f4433870a69dbe1c08f8331a9.tar.gz
minishell-21874e1446ccd08f4433870a69dbe1c08f8331a9.zip
Make norminette happy
Diffstat (limited to 'src/repl.c')
-rw-r--r--src/repl.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/repl.c b/src/repl.c
index 93874a7..3f4435d 100644
--- a/src/repl.c
+++ b/src/repl.c
@@ -6,34 +6,31 @@
/* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/06/24 16:07:04 by dkaiser #+# #+# */
-/* Updated: 2025/01/25 12:41:48 by chuhlig ### ########.fr */
+/* Updated: 2025/01/25 15:39:36 by dkaiser ### ########.fr */
/* */
/* ************************************************************************** */
#include "../include/minishell.h"
#include "token.h"
-void free_repl(char *input, t_node *ast)
+static void free_repl(char *input, t_node *ast)
{
free(input);
if (ast)
free_node(ast);
}
-void repl(const char *prompt, t_env **env, int *promptflag)
+void repl(const char *prompt, t_env **env)
{
char *input;
t_token *token_list;
t_node *ast;
- (*promptflag)++;
while (1)
{
input = readline(prompt);
if (input == NULL)
{
- if (*promptflag > 1)
- (*promptflag)--;
printf("exit\n");
break ;
}