diff options
author | Salad <water_appreciator@protonmail.com> | 2020-10-19 17:40:44 +0200 |
---|---|---|
committer | Salad <water_appreciator@protonmail.com> | 2020-10-19 17:40:44 +0200 |
commit | 36184c4d5906043241d912390b788343f088bff1 (patch) | |
tree | 30233749e79f3cacfeddd1141454906bd375d57e /src/c_utils.c | |
parent | FIX ALL NIG (diff) | |
download | 42-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_utils.c')
-rw-r--r-- | src/c_utils.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/c_utils.c b/src/c_utils.c index ad1ccba..3c21bff 100644 --- a/src/c_utils.c +++ b/src/c_utils.c @@ -30,8 +30,7 @@ */ char - *c_new_line(char *line, - t_caps *tcaps) + *c_new_line(char *line, t_caps *tcaps) { char *ret; @@ -50,9 +49,7 @@ char } char - *c_insert_char(char *str, - char c, - t_caps *tcaps) + *c_insert_char(char *str, char c, t_caps *tcaps) { int32_t i; size_t j; @@ -79,8 +76,7 @@ char } char - *c_delchar(char *str, - uint16_t cpos) + *c_delchar(char *str, uint16_t cpos) { char *dst; uint16_t i; @@ -105,14 +101,13 @@ char } static int16_t - c_redraw_next(size_t plen, - uint32_t len, - t_caps *tcaps) + c_redraw_next(size_t plen, uint32_t len, t_caps *tcaps) { uint32_t i; uint32_t j; - i = (tcaps->nlines == tcaps->lpos) ? 0 : tcaps->ws.ws_col * (tcaps->lpos - 1); + i = (tcaps->nlines == tcaps->lpos) ? 0 : + tcaps->ws.ws_col * (tcaps->lpos - 1); j = tcaps->nlines; if (tcaps->nlines != tcaps->lpos) { @@ -136,9 +131,7 @@ static int16_t } int16_t - c_redraw_line(char *line, - t_caps *tcaps, - t_msh *msh) + c_redraw_line(char *line, t_caps *tcaps, t_msh *msh) { uint32_t i; uint32_t j; |