This check was to differentiate empty line and CTRL-D. Ncurses does not
work the same way (or at least wgetnstr does not) and the check is
unnecessary.
input->argc = 0;
return (1);
}
input->argc = 0;
return (1);
}
- if (str_inp[0] == '\n')
- return (1);
if (str_inp[0] && str_inp[ft_strlen(str_inp) - 1] == '\n')
str_inp[ft_strlen(str_inp) - 1] = '\0';
split_inp = ft_split(str_inp, " ");
if (str_inp[0] && str_inp[ft_strlen(str_inp) - 1] == '\n')
str_inp[ft_strlen(str_inp) - 1] = '\0';
split_inp = ft_split(str_inp, " ");