mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-05 23:18:08 +01:00
debug, destroy all new types (also some code for testing it)
This commit is contained in:
parent
82da182773
commit
596b21fc2f
6 changed files with 10 additions and 8 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue