diff --git a/srcs/exec_bonus.c b/srcs/exec_bonus.c index cbaaa11..13c2f24 100755 --- a/srcs/exec_bonus.c +++ b/srcs/exec_bonus.c @@ -6,7 +6,7 @@ /* By: marde-vr +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/03/28 13:50:14 by tomoron #+# #+# */ -/* Updated: 2024/04/22 15:39:40 by marde-vr ### ########.fr */ +/* Updated: 2024/04/22 16:43:18 by tomoron ### ########.fr */ /* */ /* ************************************************************************** */ @@ -152,11 +152,12 @@ void print_signaled(int status) static const char *sigmsg[] = {0, "Hangup", 0, "Quit", \ "Illegal instruction", "Trace/breakpoint trap", "Aborted", "Bus error", \ "Floating point exception", "Killed", "User defined signal 1", \ - "Segmentation fault", "User defined signal 2", 0, "Alarm clock", \ - "Terminated", "Stack fault" ,0 ,0, "Stopped", "Stopped","Stopped", \ - "Stopped", 0, "CPU time limit exceeded","File size limit exceeded", \ - "Virtual time expired", "Profiling timer expired", \ - "I/O possible", "Power failure", "Bad system call"}; + "Segmentation fault (skill issue)", "User defined signal 2", 0,\ + "Alarm clock", "Terminated", "Stack fault" ,0 ,0, "Stopped", "Stopped",\ + "Stopped", "Stopped", 0, "CPU time limit exceeded",\ + "File size limit exceeded", "Virtual time expired",\ + "Profiling timer expired","I/O possible", "Power failure",\ + "Bad system call"}; signal = WTERMSIG(status); if(signal < 31 && sigmsg[signal]) diff --git a/srcs/input_redirections.c b/srcs/input_redirections.c index ed1800e..ed37b0e 100755 --- a/srcs/input_redirections.c +++ b/srcs/input_redirections.c @@ -6,7 +6,7 @@ /* By: marde-vr +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/03/05 18:15:27 by marde-vr #+# #+# */ -/* Updated: 2024/04/22 16:36:10 by tomoron ### ########.fr */ +/* Updated: 2024/04/22 16:42:49 by tomoron ### ########.fr */ /* */ /* ************************************************************************** */ @@ -65,7 +65,6 @@ int get_in_type(t_msh *msh, t_cmd *tokens) cur_token = tokens; if (cur_token && cur_token->cmd_type == PIPE) - { msh->in_type = PIPE; cur_token = cur_token->next; } diff --git a/srcs/parsing_var.c b/srcs/parsing_var.c index c333abc..eef2578 100755 --- a/srcs/parsing_var.c +++ b/srcs/parsing_var.c @@ -6,7 +6,7 @@ /* By: marde-vr +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/02/09 15:24:36 by tomoron #+# #+# */ -/* Updated: 2024/04/18 20:48:58 by marde-vr ### ########.fr */ +/* Updated: 2024/04/22 14:46:18 by tomoron ### ########.fr */ /* */ /* ************************************************************************** */ @@ -28,7 +28,7 @@ int get_var_len(char **command, t_env *env) char *env_var; (*command)++; - if (**command == '\'' || **command == '"') + if (**command == '\'' || **command == '"' || !**command) return (1); if (!ft_isalnum(**command) && **command != '_' && **command != '?') return (2); @@ -87,7 +87,7 @@ int add_var_to_str(char *res, char **command, t_env *env) i = 0; (*command)++; - if (**command == '\'' || **command == '"') + if (**command == '\'' || **command == '"' || !**command) { *res = '$'; (*command)--; diff --git a/srcs/utils.c b/srcs/utils.c index e31ebae..e379895 100755 --- a/srcs/utils.c +++ b/srcs/utils.c @@ -6,7 +6,7 @@ /* By: marde-vr +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/03/05 18:19:26 by marde-vr #+# #+# */ -/* Updated: 2024/04/22 14:33:56 by marde-vr ### ########.fr */ +/* Updated: 2024/04/22 16:43:31 by tomoron ### ########.fr */ /* */ /* ************************************************************************** */