signals and termios WIP
+ shell script placeholder + generics functions + valgrind add_history() supp + misc
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2021/10/19 08:38:55 by lperrey #+# #+# */
|
||||
/* Updated: 2021/10/30 12:43:05 by lperrey ### ########.fr */
|
||||
/* Updated: 2021/10/30 14:19:42 by lperrey ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -29,15 +29,6 @@ enum e_fill_token_return
|
||||
DELIMITE_TOKEN
|
||||
};
|
||||
|
||||
t_list *ft_lstbeforelast(t_list *lst) // tmp
|
||||
{
|
||||
if (!lst || !lst->next)
|
||||
return (NULL);
|
||||
while (lst->next->next)
|
||||
lst = lst->next;
|
||||
return (lst);
|
||||
}
|
||||
|
||||
t_token *input_to_tokens(char *input)
|
||||
{
|
||||
t_token *t_head;
|
||||
@@ -50,7 +41,7 @@ t_token *input_to_tokens(char *input)
|
||||
return (ft_retp_perror(NULL, "alloc_token() error"));
|
||||
if (!tokenize_input(t_head, input, input_len))
|
||||
return (ft_lstclear((t_list **)&t_head, free));
|
||||
t_tmp = ft_lstbeforelast((t_list *)t_head);
|
||||
t_tmp = (t_token *)ft_lstbeforelast((t_list *)t_head);
|
||||
if (t_tmp && !t_tmp->next->id)
|
||||
{
|
||||
ft_lstdelone((t_list *)t_tmp->next, free);
|
||||
|
||||
Reference in New Issue
Block a user