diff options
Diffstat (limited to 'src/ft_m_loop.c')
| -rw-r--r-- | src/ft_m_loop.c | 33 | 
1 files changed, 33 insertions, 0 deletions
| diff --git a/src/ft_m_loop.c b/src/ft_m_loop.c new file mode 100644 index 0000000..1e2efc0 --- /dev/null +++ b/src/ft_m_loop.c @@ -0,0 +1,33 @@ +/* ************************************************************************** */ +/*                                                                            */ +/*                                                        :::      ::::::::   */ +/*   ft_m_loop.c                                        :+:      :+:    :+:   */ +/*                                                    +:+ +:+         +:+     */ +/*   By: rbousset <marvin@42.fr>                    +#+  +:+       +#+        */ +/*                                                +#+#+#+#+#+   +#+           */ +/*   Created: 2020/02/14 17:19:27 by rbousset          #+#    #+#             */ +/*   Updated: 2020/02/14 17:19:29 by rbousset         ###   ########lyon.fr   */ +/*                                                                            */ +/* ************************************************************************** */ + +#include <libft.h> +#include <stdint.h> +#include <unistd.h> +#include "ft_d_enum.h" +#include "ft_m_loop.h" +#include "ft_m_prompt.h" + +int32_t +	ft_m_loop(t_msh *msh) +{ +	int8_t	gnl; +	char	*line; + +	gnl = 1; +	while (gnl > 0) +	{ +		ft_m_prompt(msh); +		gnl = get_next_line(STDIN_FILENO, &line); +	} +	return (FT_RET_FINE); +} | 
