summaryrefslogtreecommitdiffstats
path: root/src/m_loop.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-10-28 01:26:44 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-10-28 01:26:44 +0100
commitf6faf88cd0991be3184af67d5fa271b12f70e925 (patch)
tree02c283541fd2c0b4ccacd31172cccf2ba9711c51 /src/m_loop.c
parentNorming in progress (diff)
download42-minishell-f6faf88cd0991be3184af67d5fa271b12f70e925.tar.gz
42-minishell-f6faf88cd0991be3184af67d5fa271b12f70e925.tar.bz2
42-minishell-f6faf88cd0991be3184af67d5fa271b12f70e925.tar.xz
42-minishell-f6faf88cd0991be3184af67d5fa271b12f70e925.tar.zst
42-minishell-f6faf88cd0991be3184af67d5fa271b12f70e925.zip
Norming
Diffstat (limited to 'src/m_loop.c')
-rw-r--r--src/m_loop.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/m_loop.c b/src/m_loop.c
index d8ea680..27ebecd 100644
--- a/src/m_loop.c
+++ b/src/m_loop.c
@@ -33,7 +33,9 @@
#include "u_parse.h"
#include "u_vars.h"
-static void m_parse_and_run_line(char line[], unsigned char previf, t_msh *msh)
+static void m_parse_and_run_line(char line[],
+ unsigned char previf,
+ t_msh *msh)
{
t_line_block *ptr;
@@ -62,10 +64,10 @@ static void m_parse_and_run_line(char line[], unsigned char previf, t_msh *msh)
s_line_clear(&msh->curr);
}
-void m_dump_hist(char hist[], t_msh *msh)
+void m_dump_hist(char hist[], t_msh *msh)
{
char histfile[PATH_MAX];
- int fd;
+ int fd;
if (hist[0] != C_NUL && ft_strlen(hist) > 0)
{
@@ -82,7 +84,7 @@ void m_dump_hist(char hist[], t_msh *msh)
}
}
-static void m_handle_hist(char hist[], char line[], t_msh *msh)
+static void m_handle_hist(char hist[], char line[], t_msh *msh)
{
static unsigned short hist_i = 0;
@@ -99,7 +101,7 @@ static void m_handle_hist(char hist[], char line[], t_msh *msh)
}
}
-static void m_delete_comments(char line[])
+static void m_delete_comments(char line[])
{
char *ptr;
t_quote_mode mode;
@@ -125,7 +127,7 @@ static void m_delete_comments(char line[])
}
}
-unsigned char m_loop(int fd, t_msh *msh)
+unsigned char m_loop(int fd, t_msh *msh)
{
static char hist[255 * 4096];
char *line;