summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-10-27 21:11:02 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-10-27 21:11:02 +0100
commitea373d1d6b23447b72c3ba6504a9027df559599b (patch)
treedb71addcffda4e130b7fd920b74ab7e3f0a2d70d
parentNormed libft (diff)
download42-minishell-ea373d1d6b23447b72c3ba6504a9027df559599b.tar.gz
42-minishell-ea373d1d6b23447b72c3ba6504a9027df559599b.tar.bz2
42-minishell-ea373d1d6b23447b72c3ba6504a9027df559599b.tar.xz
42-minishell-ea373d1d6b23447b72c3ba6504a9027df559599b.tar.zst
42-minishell-ea373d1d6b23447b72c3ba6504a9027df559599b.zip
Norming in progress
-rw-r--r--src/b_env.h1
-rw-r--r--src/b_exit.c2
-rw-r--r--src/b_export_mute.c6
-rw-r--r--src/b_export_next.c6
-rw-r--r--src/b_h.c14
-rw-r--r--src/b_sqb.h1
-rw-r--r--src/p_args.h1
-rw-r--r--src/s_struct.h14
-rw-r--r--src/u_path.c4
-rw-r--r--src/u_vars_next.c2
10 files changed, 26 insertions, 25 deletions
diff --git a/src/b_env.h b/src/b_env.h
index 2c8c3c8..9eab990 100644
--- a/src/b_env.h
+++ b/src/b_env.h
@@ -13,7 +13,6 @@
#ifndef B_ENV_H
# define B_ENV_H
-
# include "s_struct.h"
unsigned char b_env(char *args[], t_msh *msh);
diff --git a/src/b_exit.c b/src/b_exit.c
index 11a72a3..aa3360d 100644
--- a/src/b_exit.c
+++ b/src/b_exit.c
@@ -26,7 +26,7 @@
unsigned char b_exit(char *args[], t_msh *msh)
{
- unsigned char ret;
+ unsigned char ret;
const unsigned long argc = u_builtins_get_argc((const char**)args);
if (argc > 1)
diff --git a/src/b_export_mute.c b/src/b_export_mute.c
index 2b78d27..b4b1cda 100644
--- a/src/b_export_mute.c
+++ b/src/b_export_mute.c
@@ -24,7 +24,7 @@
#include "u_utils.h"
#include "u_vars.h"
-static void b_classic_export_mute(char *ptr[], t_msh *msh)
+static void b_classic_export_mute(char *ptr[], t_msh *msh)
{
char varval[4096];
char fmt[4096];
@@ -45,9 +45,9 @@ static void b_classic_export_mute(char *ptr[], t_msh *msh)
}
}
-unsigned char b_export_mute(char *args[], t_msh *msh)
+unsigned char b_export_mute(char *args[], t_msh *msh)
{
- char **ptr;
+ char **ptr;
unsigned char r;
if (args[0] == NULL)
diff --git a/src/b_export_next.c b/src/b_export_next.c
index a1cae4a..975a579 100644
--- a/src/b_export_next.c
+++ b/src/b_export_next.c
@@ -21,7 +21,7 @@
#include "u_utils.h"
#include "u_vars.h"
-static char **b_get_var(const char arg[], t_msh *msh)
+static char **b_get_var(const char arg[], t_msh *msh)
{
size_t len;
char **var;
@@ -62,7 +62,7 @@ static long b_is_it_in_env(const char varname[], t_msh *msh)
return (-1);
}
-static void b_add_to_env(const char arg[], t_msh *msh)
+static void b_add_to_env(const char arg[], t_msh *msh)
{
size_t i;
char **nenvp;
@@ -86,7 +86,7 @@ static void b_add_to_env(const char arg[], t_msh *msh)
msh->envp = nenvp;
}
-void b_export_with_equals(const char arg[], t_msh *msh)
+void b_export_with_equals(const char arg[], t_msh *msh)
{
char varval[4096];
char **var;
diff --git a/src/b_h.c b/src/b_h.c
index 23e2ef5..19d9bca 100644
--- a/src/b_h.c
+++ b/src/b_h.c
@@ -22,7 +22,7 @@
static unsigned long b_get_total_hist(t_msh *msh)
{
unsigned long total;
- char *ptr;
+ char *ptr;
total = 0;
if (msh->prev_hist != NULL)
@@ -45,7 +45,9 @@ static unsigned long b_get_total_hist(t_msh *msh)
return (total);
}
-static unsigned int b_print_prev_history(unsigned long asked, unsigned long total, t_msh *msh)
+static unsigned int b_print_prev_history(unsigned long asked,
+ unsigned long total,
+ t_msh *msh)
{
char *hist;
char *tok;
@@ -72,7 +74,9 @@ static unsigned int b_print_prev_history(unsigned long asked, unsigned long tota
return (i);
}
-static void b_print_history(unsigned long asked, unsigned long total, t_msh *msh)
+static void b_print_history(unsigned long asked,
+ unsigned long total,
+ t_msh *msh)
{
char *hist;
char *tok;
@@ -95,7 +99,7 @@ static void b_print_history(unsigned long asked, unsigned long total, t_msh *ms
ft_memdel((void*)&hist);
}
-static t_bool b_check_numeric(const char arg[])
+static t_bool b_check_numeric(const char arg[])
{
char *ptr;
@@ -111,7 +115,7 @@ static t_bool b_check_numeric(const char arg[])
return (TRUE);
}
-unsigned char b_h(char *args[], t_msh *msh)
+unsigned char b_h(char *args[], t_msh *msh)
{
const unsigned long argc = u_builtins_get_argc((const char **)args);
diff --git a/src/b_sqb.h b/src/b_sqb.h
index 51449ea..271d75d 100644
--- a/src/b_sqb.h
+++ b/src/b_sqb.h
@@ -13,7 +13,6 @@
#ifndef FT_B_SQB_H
# define FT_B_SQB_H
-
# include "s_struct.h"
unsigned char b_sqb(char *args[], t_msh *msh);
diff --git a/src/p_args.h b/src/p_args.h
index a7db861..260642e 100644
--- a/src/p_args.h
+++ b/src/p_args.h
@@ -13,7 +13,6 @@
#ifndef P_ARGS_H
# define P_ARGS_H
-
char **p_split_args(char word[]);
#endif
diff --git a/src/s_struct.h b/src/s_struct.h
index 5d19dd4..ee70a31 100644
--- a/src/s_struct.h
+++ b/src/s_struct.h
@@ -53,8 +53,8 @@ typedef struct s_lredir
{
char path[PATH_MAX];
char *heredoc;
- int fd;
- int right_fd;
+ int fd;
+ int right_fd;
char redir;
struct s_lredir *next;
} t_lredir;
@@ -84,7 +84,7 @@ struct s_lpipes
typedef struct s_line_block
{
char *lblock;
- unsigned char nextif;
+ unsigned char nextif;
struct s_line_block *next;
} t_line_block;
@@ -95,7 +95,7 @@ typedef struct s_msh
struct s_lpipes *pipes;
struct s_lvars *vars;
struct s_lalias *alias;
- int argc;
+ int argc;
char **argv;
char **envp;
char *prev_hist;
@@ -104,9 +104,9 @@ typedef struct s_msh
char env_fork_tmp[128][4096];
char sqb_ref[B_ID_SQB_COUNT][4];
char *cwd;
- int fd;
- unsigned char (*bu_ptr[B_BUILTINS_COUNT])(char **, struct s_msh*);
- unsigned char ret;
+ int fd;
+ unsigned char (*bu_ptr[B_BUILTINS_COUNT])(char **, struct s_msh*);
+ unsigned char ret;
} t_msh;
#endif
diff --git a/src/u_path.c b/src/u_path.c
index 02f3059..29adef1 100644
--- a/src/u_path.c
+++ b/src/u_path.c
@@ -42,7 +42,7 @@ static void u_get_fullpath(char fullpath[],
}
}
-static char u_read_dir(DIR *dir,
+static char u_read_dir(DIR *dir,
struct s_path s,
const char com[],
char fullpath[])
@@ -63,7 +63,7 @@ static char u_read_dir(DIR *dir,
return (-1);
}
-unsigned char u_search_in_path(char fullpath[],
+unsigned char u_search_in_path(char fullpath[],
const char com[],
size_t dstsize,
t_msh *msh)
diff --git a/src/u_vars_next.c b/src/u_vars_next.c
index 05538d4..22288d2 100644
--- a/src/u_vars_next.c
+++ b/src/u_vars_next.c
@@ -24,7 +24,7 @@
#include "u_parse.h"
#include "u_utils.h"
-static long u_get_env_var_line(const char varname[], t_msh *msh)
+static long u_get_env_var_line(const char varname[], t_msh *msh)
{
char **env_dup;
long i;