🔨」 fix: tab working

This commit is contained in:
2024-07-30 19:11:26 +02:00
parent 64ab542422
commit 8a2de9177c
3 changed files with 8 additions and 8 deletions

View File

@ -6,7 +6,7 @@
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/06/05 13:48:57 by adjoly #+# #+# */
/* Updated: 2024/07/21 17:33:54 by mmoussou ### ########.fr */
/* Updated: 2024/07/30 19:10:17 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
@ -21,7 +21,7 @@ size_t __get_len_arg(char *s)
tmp = s;
while (*tmp)
{
if (*tmp == ' ' && is_inquote(s, tmp - s) == FALSE)
if (ft_isspace(*tmp) && is_inquote(s, tmp - s) == FALSE)
break ;
tmp++;
}
@ -46,7 +46,7 @@ size_t __count_args(char *s)
i = 0;
while (*tmp)
{
if (*tmp == ' ')
if (ft_isspace(*tmp))
tmp++;
else
{
@ -70,7 +70,7 @@ char **split_argv(char *readline)
tmp_av = argv;
while (*tmp)
{
if (*tmp == ' ')
if (ft_isspace(*tmp))
tmp++;
else
{

View File

@ -6,7 +6,7 @@
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/25 15:06:15 by adjoly #+# #+# */
/* Updated: 2024/07/24 18:53:18 by adjoly ### ########.fr */
/* Updated: 2024/07/30 19:08:20 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
@ -39,7 +39,7 @@ t_redirection *__to_redir(char *redir_s)
redir_s += 2;
else
redir_s++;
while (*redir_s && *redir_s == ' ')
while (*redir_s && ft_isspace(*redir_s))
redir_s++;
redir->file_name = __redir_filename_cpy(redir_s);
return (redir);

View File

@ -6,7 +6,7 @@
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/20 21:05:04 by adjoly #+# #+# */
/* Updated: 2024/07/29 19:32:38 by adjoly ### ########.fr */
/* Updated: 2024/07/30 19:07:22 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
@ -31,7 +31,7 @@ size_t __get_sizeof_redir(char *redir_s, t_redirection *redir)
if (!redir->file_name)
return (i);
tmp = redir_s + i;
while (*++tmp && *tmp == ' ')
while (*++tmp && ft_isspace(*tmp))
i++;
i += __get_len_arg(tmp);
return (i);