debut modifs heredoc

This commit is contained in:
hugogogo
2021-11-18 19:51:08 +01:00
parent 74ee526d57
commit 0b6d8cf127
2 changed files with 5 additions and 3 deletions

View File

@@ -6,13 +6,15 @@
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/10/08 02:59:58 by lperrey #+# #+# */
/* Updated: 2021/11/18 13:18:08 by hulamy ### ########.fr */
/* Updated: 2021/11/18 17:52:50 by hulamy ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef MINISHELL_PROTOTYPES_H
# define MINISHELL_PROTOTYPES_H
int
// Init
int init(t_all *c, char *envp[]);
char **retrieve_path(char *envp[]);

View File

@@ -6,7 +6,7 @@
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/11/11 18:46:43 by lperrey #+# #+# */
/* Updated: 2021/11/18 17:17:42 by hulamy ### ########.fr */
/* Updated: 2021/11/18 17:32:32 by hulamy ### ########.fr */
/* */
/* ************************************************************************** */
@@ -74,7 +74,7 @@ static int here_doc_write(char *delimiter, int doc_fd)
ft_putstr_fd(" delimited by end-of-file (wanted `", 2);
ft_putstr_fd(delimiter, 2);
ft_putstr_fd("')\n", 2);
return (0);
return (1);
}
if (ft_strncmp(line, delimiter, ft_strlen(line) + 1) == 0) // Ou ft_strlen(delimiter) + 1 ? Ça devrais être identique et ça peux se calculer une seul fois.
break ;