2023-01-31 09:02:23 -05:00
|
|
|
#ifndef FT_MINISHELL
|
|
|
|
# define FT_MINISHELL
|
|
|
|
# include "libftx/libftx.h"
|
2023-02-01 11:28:38 -05:00
|
|
|
# include "utils/utils.h"
|
|
|
|
# include <sys/types.h>
|
|
|
|
# include <sys/stat.h>
|
|
|
|
# include <fcntl.h>
|
2023-01-31 09:02:23 -05:00
|
|
|
|
2023-02-01 11:28:38 -05:00
|
|
|
int ft_file_is_readable(char *path);
|
|
|
|
int ft_file_is_writeable(char *path);
|
2023-02-10 07:19:28 -05:00
|
|
|
t_list **init_env(char **env);
|
|
|
|
char *get_value_index(int index, t_list **head);
|
|
|
|
char *get_value_key(char *key, t_list **head);
|
2023-01-31 08:40:15 -05:00
|
|
|
|
|
|
|
typedef struct cmd
|
|
|
|
{
|
|
|
|
int fd_in;
|
|
|
|
int fd_out;
|
|
|
|
char *cmd;
|
|
|
|
char *args;
|
|
|
|
} cmd;
|
2023-01-31 09:02:23 -05:00
|
|
|
|
2023-02-10 07:19:28 -05:00
|
|
|
typedef struct s_data
|
|
|
|
{
|
|
|
|
t_list **env;
|
|
|
|
} t_data;
|
|
|
|
|
2023-01-31 09:02:23 -05:00
|
|
|
#endif
|