Fixed compilation
This commit is contained in:
@@ -106,7 +106,7 @@ static char *get_path_from_env(
|
||||
path = get_env(env_name, msh);
|
||||
if (path == NULL)
|
||||
{
|
||||
ft_eputendl(error);
|
||||
ft_eputendl((char *)error);
|
||||
*status = EXIT_FAILURE;
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
4
src/builtins/env/env.c
vendored
4
src/builtins/env/env.c
vendored
@@ -33,10 +33,10 @@ static void print_entry(
|
||||
t_map_entry *entry
|
||||
)
|
||||
{
|
||||
ft_putstr(entry->key);
|
||||
ft_putstr((char *)entry->key);
|
||||
ft_putchar('=');
|
||||
if (entry->value != NULL)
|
||||
ft_putstr(entry->value);
|
||||
ft_putstr((char *)entry->value);
|
||||
ft_putchar('\n');
|
||||
}
|
||||
|
||||
|
||||
@@ -26,8 +26,8 @@ static void set_argv(t_command *command, char *line, t_minishell *minishell);
|
||||
static void expand_envs(char *arg, t_minishell *minishell);
|
||||
static char **lst_to_argv(t_list *argv_list);
|
||||
static void set_argc(t_command *command);
|
||||
static void set_infile(t_command *command);
|
||||
static void set_outfile(t_command *command);
|
||||
// static void set_infile(t_command *command);
|
||||
// static void set_outfile(t_command *command);
|
||||
static void set_path(t_command *command, t_minishell *minishell);
|
||||
static u_int8_t path_is_solved(char *cmd_name, t_minishell *msh);
|
||||
static char *solve_path(char *command_name, t_minishell *minishell);
|
||||
@@ -37,7 +37,7 @@ t_list *parse(
|
||||
t_minishell *minishell
|
||||
) {
|
||||
t_list *commands;
|
||||
t_list *tokens;
|
||||
// t_list *tokens;
|
||||
t_command *command;
|
||||
char *command_str;
|
||||
size_t i;
|
||||
@@ -48,7 +48,7 @@ t_list *parse(
|
||||
i = 0;
|
||||
while (line[i] != '\0')
|
||||
{
|
||||
tokens = tokenize();
|
||||
// tokens = tokenize();
|
||||
command_str = extract_next_command(line, &i);
|
||||
if (command_str != NULL)
|
||||
{
|
||||
@@ -155,8 +155,8 @@ static t_command *cmdnew(
|
||||
return (NULL);
|
||||
}
|
||||
set_argc(command);
|
||||
set_infile(command);
|
||||
set_outfile(command);
|
||||
// set_infile(command);
|
||||
// set_outfile(command);
|
||||
set_path(command, minishell);
|
||||
return (command);
|
||||
}
|
||||
@@ -233,19 +233,19 @@ static void set_argc(
|
||||
command->argc = argc;
|
||||
}
|
||||
|
||||
static void set_infile(
|
||||
t_command *command
|
||||
) {
|
||||
// test_infile
|
||||
command->infile = -1;
|
||||
}
|
||||
// static void set_infile(
|
||||
// t_command *command
|
||||
// ) {
|
||||
// // test_infile
|
||||
// command->infile = -1;
|
||||
// }
|
||||
|
||||
static void set_outfile(
|
||||
t_command *command
|
||||
) {
|
||||
// test_outfile
|
||||
command->outfile = STDOUT_FILENO;
|
||||
}
|
||||
// static void set_outfile(
|
||||
// t_command *command
|
||||
// ) {
|
||||
// // test_outfile
|
||||
// command->outfile = STDOUT_FILENO;
|
||||
// }
|
||||
|
||||
static void set_path(
|
||||
t_command *command,
|
||||
|
||||
Reference in New Issue
Block a user