summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/c_init.c2
-rw-r--r--src/c_keys_next.c30
-rw-r--r--src/c_keys_next.h3
3 files changed, 28 insertions, 7 deletions
diff --git a/src/c_init.c b/src/c_init.c
index 84f91db..1ab6743 100644
--- a/src/c_init.c
+++ b/src/c_init.c
@@ -91,7 +91,7 @@ static short
return (c_ctrl_l(line, tcaps, msh));
else if (((*((unsigned int *)buf)) == UP_K) ||
((*((unsigned int *)buf)) == CTRL_P))
- return (c_key_up(tcaps));
+ return (c_key_up(tcaps, msh));
else if ((*((unsigned int *)buf)) == CTRL_D &&
line[0] == '\0')
{
diff --git a/src/c_keys_next.c b/src/c_keys_next.c
index 68b2a3a..99f01b9 100644
--- a/src/c_keys_next.c
+++ b/src/c_keys_next.c
@@ -11,15 +11,35 @@
/* ************************************************************************** */
#include <libft.h>
+#include <stddef.h>
#include <term.h>
#include "c_init.h"
+#include "d_define.h"
+#include "s_struct.h"
-short c_key_up(t_caps *tcaps)
+short c_key_up(t_caps *tcaps, t_msh *msh)
{
- tputs("qwe", 1, ft_putchar);
- tcaps->cpos = 3;
- tcaps->lpos = 1;
- /* ft_dprintf(0, "qwe"); */
+ /* static char *ptr; */
+ /* static t_bool set = TRUE; */
+ /* */
+ /* if (set == TRUE) */
+ /* { */
+ /* ptr = msh->curr_hist_ptr + ft_strlen(msh->curr_hist_ptr); */
+ /* set = FALSE; */
+ /* } */
+ /* while (ptr - msh->curr_hist_ptr != 0 && *ptr != '\n') */
+ /* { */
+ /* ft_printf("{%c}\n", *ptr); */
+ /* ptr--; */
+ /* } */
+ /* ptr += 1; */
+ /* ft_dprintf(1, "[%s]\n", ptr); */
+ (void)msh;
+ (void)tcaps;
+ ft_dprintf(0, "qwe");
+ /* tcaps->cpos = 0; */
+ /* tcaps->lpos = 0; */
+ /* tputs(tgetstr("nd", NULL), 1, ft_putchar); */
return (1);
}
diff --git a/src/c_keys_next.h b/src/c_keys_next.h
index f71ff5c..fc76ecf 100644
--- a/src/c_keys_next.h
+++ b/src/c_keys_next.h
@@ -14,7 +14,8 @@
# define C_KEYS_NEXT_H
#include "c_init.h"
+#include "s_struct.h"
-short c_key_up(t_caps *tcaps);
+short c_key_up(t_caps *tcaps, t_msh *msh);
#endif