diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-10-02 19:47:19 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-10-02 19:47:19 +0200 |
commit | b39cd85e93ab8c3d9be249160bbcb6200dd9b5a3 (patch) | |
tree | d0d21e7c481cc65d566b035259c90f6932ea5295 /src | |
parent | Renormed p_args_escape (diff) | |
download | 42-minishell-b39cd85e93ab8c3d9be249160bbcb6200dd9b5a3.tar.gz 42-minishell-b39cd85e93ab8c3d9be249160bbcb6200dd9b5a3.tar.bz2 42-minishell-b39cd85e93ab8c3d9be249160bbcb6200dd9b5a3.tar.xz 42-minishell-b39cd85e93ab8c3d9be249160bbcb6200dd9b5a3.tar.zst 42-minishell-b39cd85e93ab8c3d9be249160bbcb6200dd9b5a3.zip |
Normed p_args_len
Diffstat (limited to 'src')
-rw-r--r-- | src/p_args_len.c | 9 | ||||
-rw-r--r-- | src/p_args_len.h | 6 |
2 files changed, 7 insertions, 8 deletions
diff --git a/src/p_args_len.c b/src/p_args_len.c index 729e5c5..f7d3710 100644 --- a/src/p_args_len.c +++ b/src/p_args_len.c @@ -17,8 +17,9 @@ #include "u_parse.h" #include "u_utils.h" -static t_bool - p_meet_whitespace(const char *head, char *ptr, t_quote_mode mode) +static t_bool p_meet_whitespace(const char *head, + char *ptr, + t_quote_mode mode) { if (mode == Q_NONE && u_is_not_escaped(head, ptr) == TRUE) { @@ -27,8 +28,7 @@ static t_bool return (FALSE); } -size_t - p_arg_len(const char word[], const size_t start) +size_t p_arg_len(const char word[], const size_t start) { t_quote_mode mode; char *ptr; @@ -53,4 +53,3 @@ size_t ptr -= 1; return (ptr - word); } - diff --git a/src/p_args_len.h b/src/p_args_len.h index 093d8f7..cbe8cd0 100644 --- a/src/p_args_len.h +++ b/src/p_args_len.h @@ -10,10 +10,10 @@ /* */ /* ************************************************************************** */ -#ifndef P_ARGS_LEN_H -#define P_ARGS_LEN_H +#ifndef FT_P_ARGS_LEN_H +# define FT_P_ARGS_LEN_H -#include <stddef.h> +# include <stddef.h> size_t p_arg_len(const char word[], const size_t start); |