From abb2e8563a3ee66477d88635e93c6c8e291a8920 Mon Sep 17 00:00:00 2001 From: Quinten Mennen Date: Wed, 26 Feb 2025 16:57:17 +0100 Subject: [PATCH] space replace tab --- src/redirect/redirect_get_inputs.c | 2 +- src/redirect/redirect_valid_type.c | 58 +++++++++++++++--------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/redirect/redirect_get_inputs.c b/src/redirect/redirect_get_inputs.c index 5b8654b..cb864bf 100644 --- a/src/redirect/redirect_get_inputs.c +++ b/src/redirect/redirect_get_inputs.c @@ -6,7 +6,7 @@ /* By: qmennen +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/02/23 12:29:05 by Quinten #+# #+# */ -/* Updated: 2025/02/26 16:46:44 by qmennen ### ########.fr */ +/* Updated: 2025/02/26 16:57:02 by qmennen ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/src/redirect/redirect_valid_type.c b/src/redirect/redirect_valid_type.c index dc0e50e..7824a23 100644 --- a/src/redirect/redirect_valid_type.c +++ b/src/redirect/redirect_valid_type.c @@ -1,49 +1,49 @@ -/* ************************************************************************** */ -/* */ -/* :::::::: */ -/* redirect_valid_type.c :+: :+: */ -/* +:+ */ -/* By: Quinten +#+ */ -/* +#+ */ -/* Created: 2025/02/23 12:30:18 by Quinten #+# #+# */ -/* Updated: 2025/02/23 12:30:18 by Quinten ######## odam.nl */ -/* */ -/* ************************************************************************** */ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* redirect_valid_type.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: qmennen +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2025/02/23 12:30:18 by Quinten #+# #+# */ +/* Updated: 2025/02/26 16:56:51 by qmennen ### ########.fr */ +/* */ +/* ************************************************************************** */ -#include "minishell.h" +#include "minishell.h" -int redirect_token_type(t_token *token) +int redirect_token_type(t_token *token) { - return (token->type == T_REDIRECT_IN - || token->type == T_HEREDOC - || token->type == T_REDIRECT_OUT - || token->type == T_APPEND_OUT); + return (token->type == T_REDIRECT_IN + || token->type == T_HEREDOC + || token->type == T_REDIRECT_OUT + || token->type == T_APPEND_OUT); } int redirect_is_valid(t_list *lst, t_token *token, int mode) { - t_token *next; + t_token *next; - if (!lst->next) - return (0); - next = (t_token *)lst->next->content; - if (!next) + if (!lst->next) + return (0); + next = (t_token *)lst->next->content; + if (!next) { - return (0); + return (0); } if (mode >= 0 && access(next->value, mode) != 0) { error_msg("minishell", "unable to write to temp file"); return (0); } - return (redirect_token_type(token) && next->type < 3); + return (redirect_token_type(token) && next->type < 3); } int redirect_is_delimiter(t_token *token) { - return (token->type == T_PIPE - || token->type == T_AND - || token->type == T_OR - || token->type == T_EOF - || token->type == T_ERROR); + return (token->type == T_PIPE + || token->type == T_AND + || token->type == T_OR + || token->type == T_EOF + || token->type == T_ERROR); }