summaryrefslogtreecommitdiffstats
path: root/src/b_type.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-10-27 19:59:20 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-10-27 19:59:20 +0100
commitc5aae008dee36276154882d8fd56c3bdeb473474 (patch)
treea40740914847ebf39a5f8cb3acf6a48c8b9d61ef /src/b_type.c
parentTODO update (diff)
download42-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_type.c')
-rw-r--r--src/b_type.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/b_type.c b/src/b_type.c
index d01a0b4..4cca44c 100644
--- a/src/b_type.c
+++ b/src/b_type.c
@@ -11,7 +11,6 @@
/* ************************************************************************** */
#include <libft.h>
-#include <stdint.h>
#include <dirent.h>
#include <fcntl.h>
#include <unistd.h>
@@ -28,9 +27,9 @@
#include "u_path.h"
#include "u_utils.h"
-static int8_t b_absolute_path_exists(char com[])
+static char b_absolute_path_exists(char com[])
{
- int32_t fd;
+ int fd;
DIR *dir;
if ((dir = opendir(com)) != NULL)
@@ -60,7 +59,7 @@ static void b_type_get_path(char fullpath[], char com[], t_msh *msh)
u_search_in_path(fullpath, com, PATH_MAX, msh);
}
-static uint8_t b_check_nonbuilt(char *ptr, uint8_t ret, t_msh *msh)
+static unsigned char b_check_nonbuilt(char *ptr, unsigned char ret, t_msh *msh)
{
char fullpath[PATH_MAX];
@@ -76,7 +75,7 @@ static uint8_t b_check_nonbuilt(char *ptr, uint8_t ret, t_msh *msh)
return (ret);
}
-static uint8_t b_check_builtins(char *ptr)
+static unsigned char b_check_builtins(char *ptr)
{
char tmp[M_BUILTINS_REF_LEN];
char *tok_bu;
@@ -96,11 +95,11 @@ static uint8_t b_check_builtins(char *ptr)
return (1);
}
-uint8_t b_type(char *args[], t_msh *msh)
+unsigned char b_type(char *args[], t_msh *msh)
{
t_lalias *p_alias;
char **ptr;
- int32_t ret;
+ int ret;
ptr = args;
if (*ptr == NULL)