From 62afe606a355581c5b48cca361478c43fb6ae4cf Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sun, 19 Apr 2020 22:27:11 +0200 Subject: Well well well that wasn't too bad, now remake everything --- src/main.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 618530d..beafbb5 100644 --- a/src/main.c +++ b/src/main.c @@ -15,21 +15,26 @@ #include #include #include +#include #include -#include int - main(void) +main(int argc, + const char *argv[], + const char *envp[]) { char *arg; - int gnlret; + int8_t gnlret; - ft_putstr(FT_PS1); - while ((gnlret= get_next_line(STDIN_FILENO, &arg)) > 0) + (void)argc; + (void)argv; + (void)envp; + ft_printf(FT_PS1); + while ((gnlret = get_next_line(STDIN_FILENO, &arg)) > 0) { ft_process_arg(arg); - free(arg); - ft_putstr(FT_PS1); + ft_memdel((void*)&arg); + ft_printf(FT_PS1); } free(arg); return (0); -- cgit v1.2.3