diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-10-27 19:59:20 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-10-27 19:59:20 +0100 |
commit | c5aae008dee36276154882d8fd56c3bdeb473474 (patch) | |
tree | a40740914847ebf39a5f8cb3acf6a48c8b9d61ef /src/m_loop.c | |
parent | TODO update (diff) | |
download | 42-minishell-c5aae008dee36276154882d8fd56c3bdeb473474.tar.gz 42-minishell-c5aae008dee36276154882d8fd56c3bdeb473474.tar.bz2 42-minishell-c5aae008dee36276154882d8fd56c3bdeb473474.tar.xz 42-minishell-c5aae008dee36276154882d8fd56c3bdeb473474.tar.zst 42-minishell-c5aae008dee36276154882d8fd56c3bdeb473474.zip |
Now norme
Diffstat (limited to 'src/m_loop.c')
-rw-r--r-- | src/m_loop.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/m_loop.c b/src/m_loop.c index 732c005..d8ea680 100644 --- a/src/m_loop.c +++ b/src/m_loop.c @@ -11,7 +11,6 @@ /* ************************************************************************** */ #include <libft.h> -#include <stdint.h> #include <stdlib.h> #include <fcntl.h> #include <unistd.h> @@ -34,7 +33,7 @@ #include "u_parse.h" #include "u_vars.h" -static void m_parse_and_run_line(char line[], uint8_t previf, t_msh *msh) +static void m_parse_and_run_line(char line[], unsigned char previf, t_msh *msh) { t_line_block *ptr; @@ -66,7 +65,7 @@ static void m_parse_and_run_line(char line[], uint8_t previf, t_msh *msh) void m_dump_hist(char hist[], t_msh *msh) { char histfile[PATH_MAX]; - int32_t fd; + int fd; if (hist[0] != C_NUL && ft_strlen(hist) > 0) { @@ -85,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 uint16_t hist_i = 0; + static unsigned short hist_i = 0; if (hist_i == 0) hist[0] = '\0'; @@ -126,11 +125,11 @@ static void m_delete_comments(char line[]) } } -uint8_t m_loop(int32_t fd, t_msh *msh) +unsigned char m_loop(int fd, t_msh *msh) { static char hist[255 * 4096]; char *line; - int8_t gnl; + char gnl; gnl = 1; msh->curr_hist_ptr = hist; |