summaryrefslogtreecommitdiffstats
path: root/src/c_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/c_utils.c')
-rw-r--r--src/c_utils.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/c_utils.c b/src/c_utils.c
index 3198dff..a25a35a 100644
--- a/src/c_utils.c
+++ b/src/c_utils.c
@@ -24,8 +24,8 @@
char
*c_new_line(char *line, t_caps *tcaps)
{
- char *ret;
- size_t i;
+ char *ret;
+ size_t i;
i = tcaps->lpos;
ret = NULL;
@@ -50,7 +50,7 @@ char
char
*c_insert_char(char *str, char c, t_caps *tcaps)
{
- int i;
+ int i;
size_t j;
size_t len;
char *dst;
@@ -77,9 +77,9 @@ char
char
*c_delchar(char *str, unsigned short cpos)
{
- char *dst;
unsigned short i;
unsigned short j;
+ char *dst;
j = 0;
i = 0;
@@ -135,8 +135,9 @@ short
unsigned int i;
unsigned int j;
+ (void)msh;
tcaps->nlines = c_get_line_num(line, tcaps->cpos,
- ft_strlen(msh->ps[tcaps->psx]), tcaps);
+ tcaps->plen, tcaps);
i = 0;
j = tcaps->lpos;
tputs(tgetstr("cr", NULL), 1, ft_putchar);
@@ -146,10 +147,10 @@ short
tputs(tgetstr("up", NULL), 1, ft_putchar);
tputs(tgetstr("up", NULL), 1, ft_putchar);
}
- while (i++ < ft_strlen(msh->ps[tcaps->psx]))
+ while (i++ < tcaps->plen)
tputs(tgetstr("nd", NULL), 1, ft_putchar);
ft_printf("%s", line);
return ((tcaps->cpos != ft_strlen(line)) ?
- c_redraw_next(ft_strlen(msh->ps[tcaps->psx]), ft_strlen(line), tcaps) :
+ c_redraw_next(tcaps->plen, ft_strlen(line), tcaps) :
ft_strlen(line));
}