-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_parseheredoc.c
More file actions
26 lines (24 loc) · 1.17 KB
/
ft_parseheredoc.c
File metadata and controls
26 lines (24 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_parseheredoc.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: makbulut <makbulut@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/07/10 16:41:19 by makbulut #+# #+# */
/* Updated: 2022/09/05 13:55:56 by makbulut ### ########.fr */
/* */
/* ************************************************************************** */
#include "minishell.h"
#include "42-Libft/libft.h"
int ft_parseheredoc(t_command *cmd, t_token **tokens, int *i)
{
(*i)++;
if (tokens[*i] && tokens[*i]->type == WORD)
{
ft_addarr_str(&(cmd->heredocsteps), ft_strdup(tokens[*i]->data));
return (1);
}
ft_syntaxerror(tokens[*i]);
return (0);
}