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/b_h.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/b_h.c')
-rw-r--r-- | src/b_h.c | 21 |
1 files changed, 10 insertions, 11 deletions
@@ -11,7 +11,6 @@ /* ************************************************************************** */ #include <libft.h> -#include <stdint.h> #include <stddef.h> #include <unistd.h> @@ -20,9 +19,9 @@ #include "s_struct.h" #include "u_utils.h" -static uint64_t b_get_total_hist(t_msh *msh) +static unsigned long b_get_total_hist(t_msh *msh) { - uint64_t total; + unsigned long total; char *ptr; total = 0; @@ -46,12 +45,12 @@ static uint64_t b_get_total_hist(t_msh *msh) return (total); } -static uint32_t b_print_prev_history(uint64_t asked, uint64_t total, t_msh *msh) +static unsigned int b_print_prev_history(unsigned long asked, unsigned long total, t_msh *msh) { char *hist; char *tok; - int64_t to_print; - int64_t i; + long to_print; + long i; to_print = total - asked; to_print = (to_print < 0) ? (0) : (to_print); @@ -73,12 +72,12 @@ static uint32_t b_print_prev_history(uint64_t asked, uint64_t total, t_msh *msh) return (i); } -static void b_print_history(uint64_t asked, uint64_t total, t_msh *msh) +static void b_print_history(unsigned long asked, unsigned long total, t_msh *msh) { char *hist; char *tok; - int64_t to_print; - int64_t i; + long to_print; + long i; to_print = total - asked; to_print = (to_print < 0) ? (0) : (to_print); @@ -112,9 +111,9 @@ static t_bool b_check_numeric(const char arg[]) return (TRUE); } -uint8_t b_h(char *args[], t_msh *msh) +unsigned char b_h(char *args[], t_msh *msh) { - const uint64_t argc = u_builtins_get_argc((const char **)args); + const unsigned long argc = u_builtins_get_argc((const char **)args); if (argc > 1) { |