debug, destroy all new types (also some code for testing it)

This commit is contained in:
Khaïs COLIN 2025-04-08 16:18:57 +02:00
parent 82da182773
commit 596b21fc2f
Signed by: logistic-bot
SSH key fingerprint: SHA256:RlpiqKeXpcPFZZ4y9Ou4xi2M8OhRJovIwDlbCaMsuAo
6 changed files with 10 additions and 8 deletions

View file

@ -6,7 +6,7 @@
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/04/04 19:26:37 by khais #+# #+# */
/* Updated: 2025/04/07 10:38:07 by khais ### ########.fr */
/* Updated: 2025/04/08 16:22:22 by khais ### ########.fr */
/* */
/* ************************************************************************** */
@ -17,6 +17,8 @@
void cmd_execute(t_cmd *cmd, t_minishell *app)
{
if (cmd == NULL)
return ;
if (cmd->type == FT_SIMPLE)
simple_cmd_execute(cmd->value.simple, app);
if (cmd->type == FT_GROUP)

View file

@ -6,7 +6,7 @@
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/04/07 10:38:55 by khais #+# #+# */
/* Updated: 2025/04/07 11:36:57 by khais ### ########.fr */
/* Updated: 2025/04/09 16:58:44 by khais ### ########.fr */
/* */
/* ************************************************************************** */
@ -46,6 +46,8 @@ static void connec_pipe_cmd_execute(t_connec_cmd *cmd, t_minishell *app)
void connec_cmd_execute(t_connec_cmd *cmd, t_minishell *app)
{
if (cmd == NULL)
return ;
if (cmd->connector == FT_AND)
connec_and_cmd_execute(cmd, app);
if (cmd->connector == FT_OR)

View file

@ -6,17 +6,17 @@
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/04/09 16:53:27 by khais #+# #+# */
/* Updated: 2025/04/14 15:07:59 by khais ### ########.fr */
/* Updated: 2025/04/15 13:49:07 by khais ### ########.fr */
/* */
/* ************************************************************************** */
#include "cmd_debug.h"
#include "libft.h"
#include "../../treedrawing.h"
#include "../redirect/redirect_debug.h"
#include "../simple_cmd/simple_cmd.h"
#include "../group_cmd/group_cmd_debug.h"
#include "../connec_cmd/connec_cmd_debug.h"
#include "../redirect/redirect_debug.h"
static void cmd_type_debug(t_cmd_type type, t_buffer *leader, bool is_last)
{

View file

@ -6,7 +6,7 @@
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/04/09 16:53:02 by khais #+# #+# */
/* Updated: 2025/04/14 15:01:23 by khais ### ########.fr */
/* Updated: 2025/04/15 13:49:15 by khais ### ########.fr */
/* */
/* ************************************************************************** */

View file

@ -76,8 +76,6 @@ void redirect_debug(t_redirect *redirect, t_buffer *leader, bool is_last)
ft_printf("redirections = (empty redir list)\n");
else
{
single_redirect_debug(redirect, leader, redirect->next == NULL);
redirect = redirect->next;
ft_printf("redirections\n");
i = 0;
while (redirect != NULL)

View file

@ -13,8 +13,8 @@
#include "simple_cmd.h"
#include "libft.h"
#include "../../treedrawing.h"
#include "../cmd/cmd_destroy.h"
#include "../redirect/redirect_debug.h"
#include "../cmd/cmd_destroy.h"
/*
** parse a wordlist and yield a simple command.