summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-09-11 17:01:33 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-09-11 17:01:33 +0200
commit9d23dbe9fded1100b50073d29d06d99b4adb37fa (patch)
tree16a5459fffb60a6d10056728988f2c9d522116da
parentalias in progress (diff)
download42-minishell-9d23dbe9fded1100b50073d29d06d99b4adb37fa.tar.gz
42-minishell-9d23dbe9fded1100b50073d29d06d99b4adb37fa.tar.bz2
42-minishell-9d23dbe9fded1100b50073d29d06d99b4adb37fa.tar.xz
42-minishell-9d23dbe9fded1100b50073d29d06d99b4adb37fa.tar.zst
42-minishell-9d23dbe9fded1100b50073d29d06d99b4adb37fa.zip
Preparing files
-rw-r--r--src/s_alias.c0
-rw-r--r--src/s_alias.h0
-rw-r--r--src/s_lvars.c13
-rw-r--r--src/s_struct.h14
-rw-r--r--src/u_alias.c0
-rw-r--r--src/u_alias.h0
6 files changed, 11 insertions, 16 deletions
diff --git a/src/s_alias.c b/src/s_alias.c
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/s_alias.c
diff --git a/src/s_alias.h b/src/s_alias.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/s_alias.h
diff --git a/src/s_lvars.c b/src/s_lvars.c
index 9369f84..ff19d92 100644
--- a/src/s_lvars.c
+++ b/src/s_lvars.c
@@ -19,9 +19,7 @@
#include "s_struct.h"
void
- lvars_rebind(t_lvars **lvars,
- const char name[],
- const char newval[])
+ lvars_rebind(t_lvars **lvars, const char name[], const char newval[])
{
t_lvars *tmp;
@@ -43,8 +41,7 @@ void
}
void
- lvars_delone(t_lvars **lvars,
- const char name[])
+ lvars_delone(t_lvars **lvars, const char name[])
{
t_lvars *tmp;
t_lvars *prev;
@@ -72,8 +69,7 @@ void
}
void
- lvars_add_front(t_lvars **alvars,
- t_lvars *new)
+ lvars_add_front(t_lvars **alvars, t_lvars *new)
{
if (!alvars || !new)
{
@@ -104,8 +100,7 @@ void
}
t_lvars
- *lvars_new(const char name[],
- const char val[])
+ *lvars_new(const char name[], const char val[])
{
t_lvars *link;
diff --git a/src/s_struct.h b/src/s_struct.h
index b45af9f..d678c36 100644
--- a/src/s_struct.h
+++ b/src/s_struct.h
@@ -18,6 +18,13 @@
#include "d_define.h"
+typedef struct s_lvars
+{
+ char *name;
+ char *val;
+ struct s_lvars *next;
+} t_lvars;
+
typedef struct s_lalias
{
char *name;
@@ -25,13 +32,6 @@ typedef struct s_lalias
struct s_lalias *next;
} t_lalias;
-typedef struct s_lvars
-{
- struct s_lvars *next;
- char *name;
- char *val;
-} t_lvars;
-
/*
** redir(int8_t) index
** -------------------
diff --git a/src/u_alias.c b/src/u_alias.c
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/u_alias.c
diff --git a/src/u_alias.h b/src/u_alias.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/u_alias.h