space replace tab

This commit is contained in:
Quinten Mennen 2025-02-26 16:57:17 +01:00
parent 4cb8ca86b9
commit abb2e8563a
2 changed files with 30 additions and 30 deletions

View File

@ -6,7 +6,7 @@
/* By: qmennen <qmennen@student.codam.nl> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* redirect_valid_type.c :+: :+: */
/* +:+ */
/* By: Quinten <qmennen@student.codam.nl> +#+ */
/* +#+ */
/* 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 <qmennen@student.codam.nl> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/23 12:30:18 by Quinten #+# #+# */
/* Updated: 2025/02/26 16:56:51 by qmennen ### ########.fr */
/* */
/* ************************************************************************** */
@ -22,28 +22,28 @@ int redirect_token_type(t_token *token)
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);
}