diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-10-01 18:44:17 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-10-01 18:44:17 +0200 |
commit | 054058a9fe42d747fd9bc3444ddefbe87106ac1c (patch) | |
tree | fdcc232e3c71f4ceb6bb8f7f1106ec5d925b87ee /src/m_loop.c | |
parent | Normed m_init (diff) | |
download | 42-minishell-054058a9fe42d747fd9bc3444ddefbe87106ac1c.tar.gz 42-minishell-054058a9fe42d747fd9bc3444ddefbe87106ac1c.tar.bz2 42-minishell-054058a9fe42d747fd9bc3444ddefbe87106ac1c.tar.xz 42-minishell-054058a9fe42d747fd9bc3444ddefbe87106ac1c.tar.zst 42-minishell-054058a9fe42d747fd9bc3444ddefbe87106ac1c.zip |
Normed m_loop
Diffstat (limited to '')
-rw-r--r-- | src/m_loop.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/m_loop.c b/src/m_loop.c index 8912284..fe4a4b8 100644 --- a/src/m_loop.c +++ b/src/m_loop.c @@ -29,8 +29,7 @@ #include "u_parse.h" #include "u_vars.h" -static void - m_parse_and_run_line(char line[], t_msh *msh) +static void m_parse_and_run_line(char line[], t_msh *msh) { t_line_block *ptr; uint8_t previf; @@ -56,8 +55,7 @@ static void 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]; int32_t fd; @@ -77,8 +75,7 @@ void } } -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 uint16_t hist_i = 0; @@ -121,8 +118,7 @@ static void m_delete_comments(char line[]) } } -uint8_t - m_loop(int32_t fd, t_msh *msh) +uint8_t m_loop(int32_t fd, t_msh *msh) { static char hist[255 * 4096]; char *line; @@ -138,10 +134,7 @@ uint8_t m_delete_comments(line); if (line[0] != C_NUL) { - line = m_check_multi_backslash(fd, line, msh); - line = m_check_multi_pipe(fd, line, msh); - line = m_check_multi_and(fd, line, msh); - line = m_check_multi_quotes(fd, line, msh); + line = m_check_multis(fd, line, msh); if (fd == STDIN_FILENO) m_handle_hist(hist, line, msh); m_parse_and_run_line(line, msh); |