/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_b_echo.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: rbousset +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/14 17:19:27 by rbousset #+# #+# */ /* Updated: 2020/02/14 17:19:29 by rbousset ### ########lyon.fr */ /* */ /* ************************************************************************** */ #include #include #include "ft_s_struct.h" #include "ft_u_utils.h" uint8_t ft_b_echo(char *args[], t_msh *msh) { char **ptr; int8_t nopt; (void)msh; ptr = args; nopt = 0; if (ft_strncmp(ptr[0], "-n", 2) == 0) { nopt = 1; ptr += 1; } ft_printf("%s", *ptr); ptr++; while (*ptr) { ft_printf(" %s", *ptr); ptr++; } if (nopt == 0) ft_printf("\n"); return (0); }