mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
feat(debug): a way to easily debug a wordlist
This commit is contained in:
parent
18225f3356
commit
d652f32cff
2 changed files with 12 additions and 2 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/04/09 15:40:23 by khais #+# #+# */
|
/* Created: 2025/04/09 15:40:23 by khais #+# #+# */
|
||||||
/* Updated: 2025/04/15 12:07:34 by khais ### ########.fr */
|
/* Updated: 2025/04/16 15:10:29 by khais ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -42,6 +42,7 @@ t_wordlist *wordlist_push(t_wordlist *wordlist, t_worddesc *worddesc);
|
||||||
t_worddesc *wordlist_pop(t_wordlist **wordlist);
|
t_worddesc *wordlist_pop(t_wordlist **wordlist);
|
||||||
void wordlist_debug(t_wordlist *wordlist, t_buffer *leader,
|
void wordlist_debug(t_wordlist *wordlist, t_buffer *leader,
|
||||||
bool is_last);
|
bool is_last);
|
||||||
|
void wordlist_root_debug(t_wordlist *wordlist);
|
||||||
t_wordlist *wordlist_copy(const t_wordlist *wordlist);
|
t_wordlist *wordlist_copy(const t_wordlist *wordlist);
|
||||||
void wordlist_destroy_idx(t_wordlist **wordlist, int idx);
|
void wordlist_destroy_idx(t_wordlist **wordlist, int idx);
|
||||||
t_worddesc *wordlist_pop_idx(t_wordlist **wordlist, int idx);
|
t_worddesc *wordlist_pop_idx(t_wordlist **wordlist, int idx);
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/02/24 18:20:00 by khais #+# #+# */
|
/* Created: 2025/02/24 18:20:00 by khais #+# #+# */
|
||||||
/* Updated: 2025/04/15 14:38:39 by khais ### ########.fr */
|
/* Updated: 2025/04/16 15:10:13 by khais ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -33,3 +33,12 @@ void wordlist_debug(t_wordlist *wordlist, t_buffer *leader, bool is_last)
|
||||||
}
|
}
|
||||||
dedent(leader, is_last);
|
dedent(leader, is_last);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wordlist_root_debug(t_wordlist *wordlist)
|
||||||
|
{
|
||||||
|
t_buffer *leader;
|
||||||
|
|
||||||
|
leader = ft_buffer_new();
|
||||||
|
wordlist_debug(wordlist, leader, true);
|
||||||
|
ft_buffer_free(leader);
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue