some todos
This commit is contained in:
parent
40c2080447
commit
aba5e2f28b
@ -18,14 +18,13 @@ static void process_heredoc(t_minishell *ms, t_token *heredoc, t_token *delim)
|
|||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
fd = open(".ms_heredoc", O_WRONLY | O_CREAT | O_TRUNC, 0644);
|
fd = open(".ms_heredoc", O_WRONLY | O_CREAT | O_TRUNC, 0644);
|
||||||
if (fd < 0)
|
if (fd < 0) //TODO: Will this work?
|
||||||
return ;
|
return ;
|
||||||
|
|
||||||
|
|
||||||
while (TRUE)
|
while (TRUE)
|
||||||
{
|
{
|
||||||
line = readline("heredoc>");
|
line = readline(">");
|
||||||
if ((*line && ft_strcmp(line, delim->value) == 0) || !line)
|
if ((*line && ft_strcmp(line, delim->value) == 0) || !line) //TODO: What if not line?
|
||||||
break ;
|
break ;
|
||||||
if (!*line)
|
if (!*line)
|
||||||
ft_putendl_fd("", fd);
|
ft_putendl_fd("", fd);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user