summaryrefslogtreecommitdiffstats
path: root/src/c_init.c
diff options
context:
space:
mode:
authorSalad <water_appreciator@protonmail.com>2020-10-19 17:40:44 +0200
committerSalad <water_appreciator@protonmail.com>2020-10-19 17:40:44 +0200
commit36184c4d5906043241d912390b788343f088bff1 (patch)
tree30233749e79f3cacfeddd1141454906bd375d57e /src/c_init.c
parentFIX ALL NIG (diff)
download42-minishell-36184c4d5906043241d912390b788343f088bff1.tar.gz
42-minishell-36184c4d5906043241d912390b788343f088bff1.tar.bz2
42-minishell-36184c4d5906043241d912390b788343f088bff1.tar.xz
42-minishell-36184c4d5906043241d912390b788343f088bff1.tar.zst
42-minishell-36184c4d5906043241d912390b788343f088bff1.zip
norme + backslash + delchar + init --> gnl
Diffstat (limited to 'src/c_init.c')
-rw-r--r--src/c_init.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/c_init.c b/src/c_init.c
index 0e48b2f..69885fc 100644
--- a/src/c_init.c
+++ b/src/c_init.c
@@ -23,8 +23,7 @@
#include "m_prompt.h"
static t_caps
- *c_get_struct(int mode,
- t_caps *src)
+ *c_get_struct(int mode, t_caps *src)
{
static t_caps *caps;
@@ -60,10 +59,7 @@ int16_t
}
int16_t
-c_read_cap(char *buf,
- char *line,
- t_caps *tcaps,
- t_msh *msh)
+c_read_cap(char *buf, char *line, t_caps *tcaps, t_msh *msh)
{
if (((*((unsigned int *)buf)) == LEFT_K) || ((*((unsigned int *)buf)) == CTRL_B))
return (c_key_left(ft_strlen(msh->ps[tcaps->psx]), tcaps));
@@ -82,19 +78,15 @@ c_read_cap(char *buf,
}
static char
- *c_process_key(char *buf,
- t_caps *tcaps,
- t_msh *msh)
+ *c_process_key(char *buf, t_caps *tcaps, t_msh *msh)
{
static char *line = NULL;
int i;
i = -1;
if (line == NULL)
- {
if (!(line = ft_calloc(1, sizeof(char))))
return (NULL);
- }
if (ft_isprint(buf[0]))
{
line = c_insert_char(line, buf[0], tcaps);
@@ -120,10 +112,7 @@ static char
}
int16_t
-c_init_tcaps(int32_t fd,
- char **line,
- uint8_t psx,
- t_msh *msh)
+c_gnl(int32_t fd, char **line, uint8_t psx, t_msh *msh)
{
t_caps tcaps;
char *term;