summaryrefslogtreecommitdiffstats
path: root/src/c_keys_next.c
diff options
context:
space:
mode:
authorjoe <rbousset@42lyon.fr>2020-11-30 18:58:08 +0100
committerjoe <rbousset@42lyon.fr>2020-11-30 18:58:08 +0100
commitcb1b766ec085ad051d1c2402476089a47606912c (patch)
tree8863133ade31deac025ec03c24e12a360dff9156 /src/c_keys_next.c
parentHey at least I tried (diff)
download42-minishell-cb1b766ec085ad051d1c2402476089a47606912c.tar.gz
42-minishell-cb1b766ec085ad051d1c2402476089a47606912c.tar.bz2
42-minishell-cb1b766ec085ad051d1c2402476089a47606912c.tar.xz
42-minishell-cb1b766ec085ad051d1c2402476089a47606912c.tar.zst
42-minishell-cb1b766ec085ad051d1c2402476089a47606912c.zip
Not quite done
Diffstat (limited to 'src/c_keys_next.c')
-rw-r--r--src/c_keys_next.c30
1 files changed, 25 insertions, 5 deletions
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);
}