mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
tree debug: create library for easy indent/dedent
This commit is contained in:
parent
47a61699ab
commit
40c5164eef
7 changed files with 84 additions and 35 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/02/24 17:49:46 by khais #+# #+# */
|
||||
/* Updated: 2025/03/18 15:08:30 by khais ### ########.fr */
|
||||
/* Updated: 2025/03/18 15:31:31 by khais ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -118,19 +118,10 @@ void cmdlist_destroy(t_cmdlist *cmd)
|
|||
free(cmd);
|
||||
}
|
||||
|
||||
void cmdlist_debug(t_cmdlist *cmd, t_buffer **indent, bool is_last)
|
||||
void cmdlist_debug(t_cmdlist *cmd, t_buffer **leader, bool is_last)
|
||||
{
|
||||
ft_printf("%s", (*indent)->buffer);
|
||||
if (is_last)
|
||||
{
|
||||
ft_printf("%s", CORNER);
|
||||
*indent = ft_buffer_push_buf(*indent, SPACE, TREEDRAW_LENGTH);
|
||||
}
|
||||
else
|
||||
{
|
||||
ft_printf("%s", CROSS);
|
||||
*indent = ft_buffer_push_buf(*indent, VERTICAL, TREEDRAW_LENGTH);
|
||||
}
|
||||
indent(leader, is_last);
|
||||
ft_printf("%s\n", "t_cmdlist");
|
||||
(void)cmd; // TODO
|
||||
dedent(leader, is_last);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue