✏️」 norm: Normed everything and leak erased from the surface of the earth and what the fuck am i doing at this hour coding i shoud be sleeping 1:30am wtf god damn please give me a bed and fuck you yosyo 🖕

This commit is contained in:
2024-07-10 01:22:28 +02:00
parent b1f77b386a
commit 54e01e9bc3
19 changed files with 359 additions and 220 deletions

View File

@ -6,7 +6,7 @@
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/29 13:20:22 by mmoussou #+# #+# */
/* Updated: 2024/07/03 11:04:53 by mmoussou ### ########.fr */
/* Updated: 2024/07/10 01:21:10 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
@ -14,11 +14,28 @@
# define EXECUTION_H
# include "env.h"
# include "libft.h"
# include "parsing.h"
# include "tokenizer.h"
int format_quotes(t_list *list_cmd);
typedef struct s_exec
{
char **env_array;
int status;
int i;
int pipe_fd[2];
} t_exec;
int format_quotes(t_list *list_cmd, t_env *env);
char *get_path(char *path, char *cmd);
int exec_split_cmd(t_list *list_cmd, t_env *env);
int switch_cmd_path(t_cmd *cmd, t_env *env);
int is_in_builtins(char *cmd);
char *get_cmd_local_path(char *cmd, t_env *env);
void print_return_value(int return_code);
void __wait(int i);
void __close(void *content);
/**
* @brief spawn a heredoc
@ -27,6 +44,8 @@ int exec_split_cmd(t_list *list_cmd, t_env *env);
*
* @return (int) fd of a file containing the user's input, or -1 on error
*/
int ft_heredoc(char *delimiter);
int ft_heredoc(char *delimiter, t_cmd *cmd);
int __open_fd_here(char *path, int mode);
void ft_lstclear_till_nxt(t_list **lst, void (*del)(void *));
#endif