summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-10-03 15:38:48 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-10-03 15:38:48 +0200
commitec0506bc7f469e1cc9798c6392f0a44bce87e467 (patch)
tree53802fd1d27388146cc4752aeae4ca1a935ac47e /src
parentNormed p_heredoc (diff)
download42-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 'src')
-rw-r--r--src/p_split.c21
-rw-r--r--src/p_split.h4
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
{