--- /dev/null
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* builtins.h :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: ljiriste <ljiriste@student.42prague.com> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2024/08/26 11:39:54 by ljiriste #+# #+# */
+/* Updated: 2024/08/26 11:51:32 by ljiriste ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#ifndef BUILTINS_H
+# define BUILTINS_H
+
+#include "minishell_structs.h"
+
+int cd(int argc, char **argv, t_execution_env *env);
+int echo(int argc, char **argv);
+int pwd(void);
+int ft_env(int argc, t_execution_env *env);
+int export(int argc, char **argv, t_execution_env *env);
+
+#endif // BUILTINS_H
/* By: ljiriste <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/02 17:40:19 by ljiriste #+# #+# */
-/* Updated: 2024/08/26 11:41:25 by ljiriste ### ########.fr */
+/* Updated: 2024/08/26 11:42:37 by ljiriste ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef EXECUTION_H
# define EXECUTION_H
-#include "minishell.h"
-
-int cd(int argc, char **argv, t_execution_env *env);
-int echo(int argc, char **argv);
-int pwd(void);
-int ft_env(int argc, t_execution_env *env);
-int export(int argc, char **argv, t_execution_env *env);
-
#endif // EXECUTION_H
/* By: ljiriste <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/02 16:37:48 by ljiriste #+# #+# */
-/* Updated: 2024/08/23 16:54:38 by ljiriste ### ########.fr */
+/* Updated: 2024/08/26 11:45:11 by ljiriste ### ########.fr */
/* */
/* ************************************************************************** */
-#include "minishell.h"
-#include "execution.h"
+#include "builtins.h"
+#include "minishell_structs.h"
#include <unistd.h>
#include <stdlib.h>
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* echo.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: ljiriste <ljiriste@student.42prague.com> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2024/08/26 11:43:48 by ljiriste #+# #+# */
+/* Updated: 2024/08/26 11:45:17 by ljiriste ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#include "builtins.h"
+#include "minishell_structs.h"
#include <stdio.h>
-#include "minishell.h"
-#include "execution.h"
#include <unistd.h>
int ft_check_n(char *str)
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* env.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: ljiriste <ljiriste@student.42prague.com> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2024/08/26 11:44:01 by ljiriste #+# #+# */
+/* Updated: 2024/08/26 11:44:23 by ljiriste ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#include "builtins.h"
+#include "minishell_structs.h"
+#include "libft.h"
#include <stdio.h>
#include <unistd.h>
-#include "minishell.h"
-#include "execution.h"
-#include "libft.h"
int env_exec(const t_execution_env *env)
{
/* By: ljiriste <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/23 09:40:38 by ljiriste #+# #+# */
-/* Updated: 2024/08/23 18:06:00 by ljiriste ### ########.fr */
+/* Updated: 2024/08/26 11:44:35 by ljiriste ### ########.fr */
/* */
/* ************************************************************************** */
-#include "execution.h"
-#include "minishell.h"
+#include "builtins.h"
+#include "minishell_structs.h"
#include <stdlib.h>
static void unset_single(const char *name, t_execution_env *env)
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* pwd.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: ljiriste <ljiriste@student.42prague.com> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2024/08/26 11:44:43 by ljiriste #+# #+# */
+/* Updated: 2024/08/26 11:44:47 by ljiriste ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#include "builtins.h"
+#include "minishell_structs.h"
#include <stdio.h>
#include <unistd.h>
-#include "minishell.h"
-#include "execution.h"
int pwd(void)
{
/* By: lnikolov <lnikolov@student.42prague.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/07/21 08:57:54 by ljiriste #+# #+# */
-/* Updated: 2024/08/26 09:40:31 by ljiriste ### ########.fr */
+/* Updated: 2024/08/26 11:50:12 by ljiriste ### ########.fr */
/* */
/* ************************************************************************** */
-#include "minishell_structs.h"
#include "execution.h"
+#include "builtins.h"
+#include "minishell_structs.h"
#include "minishell.h"
#include "libft.h"
#include <stdlib.h>