aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorDominik Kaiser2025-01-20 20:14:32 +0100
committerGitHub2025-01-20 20:14:32 +0100
commitbd8c817797d5f2b1affe6957ffc51846a38e70ec (patch)
tree2fc0f567b1c4f2f168a931ad0bff69e52c6c226c /src/main.c
parenta9aba07b52cbf98eb9c52cd8ee0cd5f5021d2931 (diff)
parentdc6a4f2d0de92984c2584ef905011e2a60792850 (diff)
downloadminishell-bd8c817797d5f2b1affe6957ffc51846a38e70ec.tar.gz
minishell-bd8c817797d5f2b1affe6957ffc51846a38e70ec.zip
Merge interpreter changes into main
Miau
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index 4e1d9da..a2aad22 100644
--- a/src/main.c
+++ b/src/main.c
@@ -6,8 +6,7 @@
/* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/06/22 17:14:03 by dkaiser #+# #+# */
-/* Updated: 2024/08/26 19:55:57 by chuhlig ### ########.fr */
-/* Updated: 2024/10/25 16:06:32 by chuhlig ### ########.fr */
+/* Updated: 2025/01/14 18:41:15 by chuhlig ### ########.fr */
/* */
/* ************************************************************************** */
@@ -15,13 +14,18 @@
int main(int argc, char *argv[], char *envp[])
{
- t_env *env;
+ t_env *env;
+ static int promptflag;
env = NULL;
+ promptflag = 0;
if (!argc && !argv)
return (1);
if (init())
return (1);
getenvlst(&env, envp);
- repl("Minishell $ ", &env);
+ set_return_code(0, &env);
+ repl("Minishell $ ", &env, &promptflag);
+ free_envlst(&env);
+ return (0);
}