updated todo_list

This commit is contained in:
mdev9
2024-04-24 19:07:28 +02:00
parent 93e4d43283
commit 080f05d4f7
4 changed files with 8 additions and 12 deletions

View File

@ -6,7 +6,7 @@
/* By: tomoron <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/24 14:54:53 by tomoron #+# #+# */
/* Updated: 2024/04/24 14:55:56 by tomoron ### ########.fr */
/* Updated: 2024/04/24 18:57:48 by marde-vr ### ########.fr */
/* */
/* ************************************************************************** */
@ -38,7 +38,7 @@ int check_tokens_syntax(t_cmd *cmd, t_cmd *last, t_env *env)
return (0);
}
token = parse_cmds_to_token(cmd, env);
if (!token)
if (token == (void *)1)
return (0);
free_token(token);
return (1);

View File

@ -6,7 +6,7 @@
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/03/28 13:50:14 by tomoron #+# #+# */
/* Updated: 2024/04/24 15:22:20 by tomoron ### ########.fr */
/* Updated: 2024/04/24 18:55:58 by marde-vr ### ########.fr */
/* */
/* ************************************************************************** */
@ -116,7 +116,10 @@ void exec_commands(t_msh *msh)
int i;
if (!msh->tokens && !is_parenthesis(msh->cmds))
{
g_return_code = 0;
return ;
}
cmd_count = get_cmd_count(msh->cmds);
msh->fds = ft_calloc(cmd_count + 1, sizeof(int **));
msh->pids = ft_calloc(cmd_count, sizeof(int *));

View File

@ -6,7 +6,7 @@
/* By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/03/27 17:19:27 by tomoron #+# #+# */
/* Updated: 2024/04/18 20:49:00 by marde-vr ### ########.fr */
/* Updated: 2024/04/24 18:59:26 by marde-vr ### ########.fr */
/* */
/* ************************************************************************** */
@ -16,7 +16,7 @@ t_token *parsing_syntax_error(t_token *res)
{
free_token(res);
ft_putstr_fd("minishell: syntax error\n", 2);
return (0);
return ((void *)1);
}
int is_input_type(t_cmd *cmd)

View File

@ -1,13 +1,6 @@
#invalid command, followed by empty variable, should clear the exit code
doesntexist
$EMPTY
echo $?
To test:
test signals
test and verify all malocs
verify forbidden functions
check for any hidden or useless files
return code 0 quand liste token est a 0