mirror of
https://github.com/KeyZox71/ft_minipowershell.git
synced 2025-06-25 02:13:35 +02:00
「✏️」 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:
@ -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
|
||||
|
@ -41,5 +41,6 @@ void free_cmd(void *content);
|
||||
|
||||
t_env **get_env(t_env **env);
|
||||
t_list **get_list(t_list **list);
|
||||
t_list **get_list2(t_list **list);
|
||||
|
||||
#endif
|
||||
|
@ -6,7 +6,7 @@
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/04/25 12:20:26 by adjoly #+# #+# */
|
||||
/* Updated: 2024/07/07 14:37:59 by adjoly ### ########.fr */
|
||||
/* Updated: 2024/07/09 23:52:39 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -33,8 +33,8 @@ typedef enum s_quote
|
||||
DOUBLE = 34
|
||||
} t_quote;
|
||||
|
||||
t_cmd *get_redir_fd(void *content, t_env *env);
|
||||
t_list *get_cmd_list(t_list *list, t_env *env);
|
||||
t_cmd *get_redir_fd(void *content);
|
||||
t_list *get_cmd_list(t_list *list);
|
||||
void open_redir(t_redirection *redir, t_cmd *cmd, t_redir_sign sign[2]);
|
||||
|
||||
/**
|
||||
@ -135,5 +135,6 @@ void print_quote_type(t_quote type);
|
||||
void print_redir_sign(t_redir_sign redir_sign);
|
||||
void print_token(t_token *token);
|
||||
void print_redir(t_redirection *redir);
|
||||
void print_cmd(t_cmd *cmd);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user