diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-10-03 15:38:48 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-10-03 15:38:48 +0200 |
commit | ec0506bc7f469e1cc9798c6392f0a44bce87e467 (patch) | |
tree | 53802fd1d27388146cc4752aeae4ca1a935ac47e /src | |
parent | Normed p_heredoc (diff) | |
download | 42-minishell-ec0506bc7f469e1cc9798c6392f0a44bce87e467.tar.gz 42-minishell-ec0506bc7f469e1cc9798c6392f0a44bce87e467.tar.bz2 42-minishell-ec0506bc7f469e1cc9798c6392f0a44bce87e467.tar.xz 42-minishell-ec0506bc7f469e1cc9798c6392f0a44bce87e467.tar.zst 42-minishell-ec0506bc7f469e1cc9798c6392f0a44bce87e467.zip |
Normed p_split
Diffstat (limited to '')
-rw-r--r-- | src/p_split.c | 21 | ||||
-rw-r--r-- | src/p_split.h | 4 |
2 files changed, 10 insertions, 15 deletions
diff --git a/src/p_split.c b/src/p_split.c index dc26c04..359b97e 100644 --- a/src/p_split.c +++ b/src/p_split.c @@ -21,11 +21,10 @@ #include "u_parse.h" #include "u_utils.h" -static void - p_meet_splitter(char *ptr, - const char line[], - t_split_block *sp, - t_quote_mode mode) +static void p_meet_splitter(char *ptr, + const char line[], + t_split_block *sp, + t_quote_mode mode) { if (mode == Q_NONE && *ptr == C_SEMIC && *(ptr + 1) != C_SEMIC && u_is_not_escaped(line, ptr) == TRUE) @@ -50,8 +49,7 @@ static void } } -static void - p_fill_sp(t_split_block *sp, const char line[]) +static void p_fill_sp(t_split_block *sp, const char line[]) { char *ptr; t_quote_mode mode; @@ -76,8 +74,7 @@ static void sp->count += 1; } -static void - *p_del_split(char *words[], size_t todel) +static void *p_del_split(char *words[], size_t todel) { size_t i; @@ -90,8 +87,7 @@ static void return (NULL); } -static char - **p_get_words(const char line[], const t_split_block *sp) +static char **p_get_words(const char line[], const t_split_block *sp) { char **words; int64_t i; @@ -120,8 +116,7 @@ static char return (words); } -char - **p_split_line(char line[]) +char **p_split_line(char line[]) { t_split_block sp; char **words; diff --git a/src/p_split.h b/src/p_split.h index 00da660..85f663f 100644 --- a/src/p_split.h +++ b/src/p_split.h @@ -10,8 +10,8 @@ /* */ /* ************************************************************************** */ -#ifndef P_SPLIT_H -#define P_SPLIT_H +#ifndef FT_P_SPLIT_H +# define FT_P_SPLIT_H typedef struct s_split_block { |