diff options
-rw-r--r-- | src/p_subst_alias.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/p_subst_alias.c b/src/p_subst_alias.c index 55087de..9bf77f7 100644 --- a/src/p_subst_alias.c +++ b/src/p_subst_alias.c @@ -20,15 +20,6 @@ #include "u_utils.h" #include "u_vars.h" -static char *p_skip_whitespace(char *ptr) -{ - while (*ptr != C_NUL && ft_iswhitespace(*ptr)) - { - ptr++; - } - return (ptr); -} - static t_bool p_meet_whitespace(char *head, char *ptr, t_quote_mode mode) { if (mode == Q_NONE && u_is_not_escaped(head, ptr) == TRUE) @@ -56,7 +47,8 @@ static char *p_set_ptr(char *ptr, char word[], t_bool *good, size_t locat[]) break ; else { - ptr = p_skip_whitespace(ptr); + while (*ptr != C_NUL && ft_iswhitespace(*ptr)) + ptr++; locat[0] = (ptr - word); ptr -= 1; *good = TRUE; @@ -118,7 +110,8 @@ size_t p_subst_alias(char word[], t_bool reset, t_msh *msh) p_reset_used(used, reset, &i); ptr = word; - ptr = p_skip_whitespace(ptr); + while (*ptr != C_NUL && ft_iswhitespace(*ptr)) + ptr++; s.good = TRUE; s.locat[0] = (ptr - word); s.locat[1] = (ptr - word); |