mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-05 23:18:08 +01:00
feat(debug): add function to easily treeprint a redirect
This commit is contained in:
parent
c00cc21ae4
commit
5de82f2940
2 changed files with 12 additions and 2 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/04/09 15:07:58 by khais #+# #+# */
|
||||
/* Updated: 2025/04/15 12:06:19 by khais ### ########.fr */
|
||||
/* Updated: 2025/04/21 10:33:06 by khais ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -90,3 +90,12 @@ void redirect_debug(t_redirect *redirect, t_buffer *leader, bool is_last)
|
|||
}
|
||||
dedent(leader, is_last);
|
||||
}
|
||||
|
||||
void redirect_root_debug(t_redirect *redirect)
|
||||
{
|
||||
t_buffer *leader;
|
||||
|
||||
leader = ft_buffer_new();
|
||||
redirect_debug(redirect, leader, true);
|
||||
ft_buffer_free(leader);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/04/09 15:06:43 by khais #+# #+# */
|
||||
/* Updated: 2025/04/15 12:05:26 by khais ### ########.fr */
|
||||
/* Updated: 2025/04/21 10:33:16 by khais ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -16,5 +16,6 @@
|
|||
# include "../../minishell.h"
|
||||
|
||||
void redirect_debug(t_redirect *redirect, t_buffer *leader, bool is_last);
|
||||
void redirect_root_debug(t_redirect *redirect);
|
||||
|
||||
#endif // REDIRECT_DEBUG_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue