summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-09-30 18:18:43 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-09-30 18:18:43 +0200
commitacad97085533c56d0cb037107ec92ac515f6abc9 (patch)
treefdfeb9811fd4adfb10d9365f71fe5177cadf41a1 /src
parentNormed b_type (diff)
download42-minishell-acad97085533c56d0cb037107ec92ac515f6abc9.tar.gz
42-minishell-acad97085533c56d0cb037107ec92ac515f6abc9.tar.bz2
42-minishell-acad97085533c56d0cb037107ec92ac515f6abc9.tar.xz
42-minishell-acad97085533c56d0cb037107ec92ac515f6abc9.tar.zst
42-minishell-acad97085533c56d0cb037107ec92ac515f6abc9.zip
Normed b_unset
Diffstat (limited to 'src')
-rw-r--r--src/b_unset.c17
-rw-r--r--src/b_unset.h8
2 files changed, 9 insertions, 16 deletions
diff --git a/src/b_unset.c b/src/b_unset.c
index 116a1b3..d5e7b1b 100644
--- a/src/b_unset.c
+++ b/src/b_unset.c
@@ -19,8 +19,7 @@
#include "s_struct.h"
#include "u_utils.h"
-static t_bool
- check_valid_identifier(const char arg[])
+static t_bool check_valid_identifier(const char arg[])
{
char *ptr;
t_bool r;
@@ -46,9 +45,7 @@ static t_bool
return (r);
}
-static void
- b_realloc_env(size_t skip,
- t_msh *msh)
+static void b_realloc_env(size_t skip, t_msh *msh)
{
char **nenvp;
int8_t skipped;
@@ -79,9 +76,7 @@ static void
msh->envp = nenvp;
}
-static t_bool
- b_removed_from_env(const char arg[],
- t_msh *msh)
+static t_bool b_removed_from_env(const char arg[], t_msh *msh)
{
char **env_dup;
size_t i;
@@ -102,7 +97,7 @@ static t_bool
return (FALSE);
}
-static void b_remove_it(const char arg[], t_msh *msh)
+static void b_remove_it(const char arg[], t_msh *msh)
{
if (b_removed_from_env(arg, msh) == FALSE)
{
@@ -110,9 +105,7 @@ static void b_remove_it(const char arg[], t_msh *msh)
}
}
-uint8_t
- b_unset(char *args[],
- t_msh *msh)
+uint8_t b_unset(char *args[], t_msh *msh)
{
char **ptr;
t_bool next;
diff --git a/src/b_unset.h b/src/b_unset.h
index fa89161..8e8c3dc 100644
--- a/src/b_unset.h
+++ b/src/b_unset.h
@@ -10,12 +10,12 @@
/* */
/* ************************************************************************** */
-#ifndef B_UNSET_H
-#define B_UNSET_H
+#ifndef FT_B_UNSET_H
+# define FT_B_UNSET_H
-#include <stdint.h>
+# include <stdint.h>
-#include "s_struct.h"
+# include "s_struct.h"
uint8_t b_unset(char *args[], t_msh *msh);