From 16e243d6cd64f6168b0127b07866a4b8209c335f Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Thu, 8 Oct 2020 17:44:59 +0200 Subject: Added tok_lst_pop_front wrapper --- include/lexer.h | 3 ++- include/minishell.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/lexer.h b/include/lexer.h index 82b4d1d..72480d5 100644 --- a/include/lexer.h +++ b/include/lexer.h @@ -6,7 +6,7 @@ /* By: nahaddac +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/06/19 10:51:26 by nahaddac #+# #+# */ -/* Updated: 2020/10/06 16:21:01 by cacharle ### ########.fr */ +/* Updated: 2020/10/08 17:38:33 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -89,6 +89,7 @@ t_tok_lst *tok_lst_new(enum e_tok tag, char *content); t_tok_lst *tok_lst_new_until(enum e_tok tag, char *content, size_t n); void tok_lst_push_back(t_tok_lst **tokens, t_tok_lst *pushed); t_tok_lst *tok_lst_push_front(t_tok_lst **tokens, t_tok_lst *pushed); +void tok_lst_pop_front(t_tok_lst **tokens, void (*del)(void*)); void *tok_lst_destroy(t_tok_lst **tokens, void (*del)(void*)); t_tok_lst *tok_lst_last(t_tok_lst *tokens); t_tok_lst *tok_lst_uncons(t_tok_lst **tokens); diff --git a/include/minishell.h b/include/minishell.h index 5bc9ad4..cfc8b42 100644 --- a/include/minishell.h +++ b/include/minishell.h @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/26 15:33:51 by cacharle #+# #+# */ -/* Updated: 2020/10/07 14:58:27 by cacharle ### ########.fr */ +/* Updated: 2020/10/08 17:42:07 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -138,6 +138,7 @@ void signal_sigterm(int signum); */ void print_prompt(void); +void exit_if(bool predicate); /* ** setup.c -- cgit