mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
tree debug: implement rest of tree debug
This is a big commit, sorry!
This commit is contained in:
parent
76b2b8ec7f
commit
1f03cbbedb
16 changed files with 190 additions and 159 deletions
|
|
@ -6,12 +6,14 @@
|
|||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/02/21 12:30:07 by khais #+# #+# */
|
||||
/* Updated: 2025/02/21 12:51:07 by khais ### ########.fr */
|
||||
/* Updated: 2025/03/19 14:28:36 by khais ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "simple_cmd.h"
|
||||
#include "libft.h"
|
||||
#include "../../treedrawing.h"
|
||||
#include "../../postprocess/redirections/redirection_list.h"
|
||||
|
||||
/*
|
||||
** parse a wordlist and yield a simple command.
|
||||
|
|
@ -36,3 +38,17 @@ void simple_cmd_destroy(t_simple_cmd *cmd)
|
|||
wordlist_destroy(cmd->words);
|
||||
free(cmd);
|
||||
}
|
||||
|
||||
void simple_cmd_debug(t_simple_cmd *cmd, t_buffer *leader, bool is_last)
|
||||
{
|
||||
if (cmd == NULL)
|
||||
return ;
|
||||
indent(leader, is_last);
|
||||
ft_printf("%s\n", "t_simple_cmd");
|
||||
indent(leader, false);
|
||||
ft_printf("words = ");
|
||||
wordlist_debug(cmd->words);
|
||||
dedent(leader, false);
|
||||
redir_list_debug(cmd->redirections, leader, true);
|
||||
dedent(leader, is_last);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue