diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-08-26 00:52:38 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-08-26 00:52:38 +0200 |
commit | 0c70b27f97513563096c65f9d2b5202caeaf6d26 (patch) | |
tree | 35046670a2a33f36d19e3784c377459766348cad | |
parent | New flags, in progress (diff) | |
download | 42-minishell-0c70b27f97513563096c65f9d2b5202caeaf6d26.tar.gz 42-minishell-0c70b27f97513563096c65f9d2b5202caeaf6d26.tar.bz2 42-minishell-0c70b27f97513563096c65f9d2b5202caeaf6d26.tar.xz 42-minishell-0c70b27f97513563096c65f9d2b5202caeaf6d26.tar.zst 42-minishell-0c70b27f97513563096c65f9d2b5202caeaf6d26.zip |
Coolio
Diffstat (limited to '')
-rw-r--r-- | src/b_sqb.c | 4 | ||||
-rw-r--r-- | src/d_define.h | 4 | ||||
-rw-r--r-- | src/s_init.c | 4 |
3 files changed, 4 insertions, 8 deletions
diff --git a/src/b_sqb.c b/src/b_sqb.c index d78e345..90e9b58 100644 --- a/src/b_sqb.c +++ b/src/b_sqb.c @@ -63,8 +63,8 @@ static uint8_t return (2); } /* TODO: check errors */ - if (id < ) - ft_printf("%s\n", msh->sqb_ref[id]); + if (id < FT_ID_SQB_NT && id != FT_ID_SQB_Z && id != FT_ID_SQB_N) + ft_printf("%s\n", msh->sqb_ref[id]); return (0); } diff --git a/src/d_define.h b/src/d_define.h index b0840f7..b5ae142 100644 --- a/src/d_define.h +++ b/src/d_define.h @@ -78,12 +78,10 @@ #define FT_SQB_E "-e" #define FT_SQB_F "-f" #define FT_SQB_H "-h" -#define FT_SQB_K "-k" #define FT_SQB_N "-n" #define FT_SQB_P "-p" #define FT_SQB_R "-r" #define FT_SQB_S "-s" -#define FT_SQB_U "-u" #define FT_SQB_W "-w" #define FT_SQB_X "-x" #define FT_SQB_Z "-z" @@ -108,12 +106,10 @@ enum FT_ID_SQB_E, FT_ID_SQB_F, FT_ID_SQB_H, - FT_ID_SQB_K, FT_ID_SQB_N, FT_ID_SQB_P, FT_ID_SQB_R, FT_ID_SQB_S, - FT_ID_SQB_U, FT_ID_SQB_W, FT_ID_SQB_X, FT_ID_SQB_Z, diff --git a/src/s_init.c b/src/s_init.c index d42822c..2722c4b 100644 --- a/src/s_init.c +++ b/src/s_init.c @@ -35,10 +35,10 @@ static void ft_memcpy(msh->sqb_ref[FT_ID_SQB_E], FT_SQB_E, ft_strlen(FT_SQB_E) + 1); ft_memcpy(msh->sqb_ref[FT_ID_SQB_F], FT_SQB_F, ft_strlen(FT_SQB_F) + 1); ft_memcpy(msh->sqb_ref[FT_ID_SQB_H], FT_SQB_H, ft_strlen(FT_SQB_H) + 1); - ft_memcpy(msh->sqb_ref[FT_ID_SQB_K], FT_SQB_K, ft_strlen(FT_SQB_K) + 1); ft_memcpy(msh->sqb_ref[FT_ID_SQB_N], FT_SQB_N, ft_strlen(FT_SQB_N) + 1); + ft_memcpy(msh->sqb_ref[FT_ID_SQB_R], FT_SQB_P, ft_strlen(FT_SQB_R) + 1); + ft_memcpy(msh->sqb_ref[FT_ID_SQB_P], FT_SQB_R, ft_strlen(FT_SQB_P) + 1); ft_memcpy(msh->sqb_ref[FT_ID_SQB_S], FT_SQB_S, ft_strlen(FT_SQB_S) + 1); - ft_memcpy(msh->sqb_ref[FT_ID_SQB_U], FT_SQB_U, ft_strlen(FT_SQB_U) + 1); ft_memcpy(msh->sqb_ref[FT_ID_SQB_W], FT_SQB_W, ft_strlen(FT_SQB_W) + 1); ft_memcpy(msh->sqb_ref[FT_ID_SQB_X], FT_SQB_X, ft_strlen(FT_SQB_X) + 1); ft_memcpy(msh->sqb_ref[FT_ID_SQB_Z], FT_SQB_Z, ft_strlen(FT_SQB_Z) + 1); |