-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
shorten function executor/input_utils.c
- Loading branch information
Showing
3 changed files
with
18 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: esali <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2023/06/20 17:16:06 by esali #+# #+# */ | ||
/* Updated: 2023/08/12 20:36:30 by esali ### ########.fr */ | ||
/* Updated: 2023/08/13 11:17:28 by esali ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -177,7 +177,6 @@ int is_built_in(char *token); | |
int replace_env_var(char *key, char *value); | ||
void redirect_stdin_to_pipe(t_list *node); | ||
void redirect_stdout_to_pipe(void); | ||
void print_env_error(void); | ||
void free_env(void); | ||
int open_file(t_list *node); | ||
int is_pipe(char *token); | ||
|
@@ -186,10 +185,14 @@ int its_output(t_list *node); | |
int its_input(t_list *node); | ||
int its_append(t_list *node); | ||
int its_heredoc(t_list *node); | ||
void print_export_error(char *msg); | ||
int maxlen(char *s1, char *s2); | ||
void increase_shlvl(void); | ||
|
||
/* Error Handling*/ | ||
void print_export_error(char *msg); | ||
void print_env_error(void); | ||
void print_dir_error(char *dir); | ||
|
||
/* File Handling */ | ||
|
||
void reset_original_std(void); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: esali <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2023/08/01 17:59:56 by smagalha #+# #+# */ | ||
/* Updated: 2023/08/10 19:46:42 by esali ### ########.fr */ | ||
/* Updated: 2023/08/13 11:16:02 by esali ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -19,8 +19,14 @@ void print_env_error(void) | |
return ; | ||
} | ||
|
||
void print_export_error(char *msg) | ||
void print_export_error(char *command) | ||
{ | ||
ft_printf("export: %s is not a valid identifier\n", msg); | ||
ft_printf("export: %s is not a valid identifier\n", command); | ||
get_data()->exit = 1; | ||
} | ||
|
||
void print_dir_error(char *dir) | ||
{ | ||
ft_printf("%s: no such file or dir.\n", dir); | ||
get_data()->exit = 1; | ||
} |