diff --git a/42sh/Makefile b/42sh/Makefile index 488e22b2..af7a7cb2 100644 --- a/42sh/Makefile +++ b/42sh/Makefile @@ -19,7 +19,7 @@ O_SER = $(addprefix -L, $(D_SER)) D_LIB = ft ncurses O_LIB = $(addprefix -l, $(D_LIB)) -W_FLAGS = -Wall -Wextra -Werror +W_FLAGS = -Wall -Wextra #-Werror D_FLAGS = -g MKDIR = mkdir -p @@ -30,7 +30,7 @@ RM = /bin/rm -rf all: $(NAME) $(NAME): libft/libft.a $(DF_OBJ) - $(CC) $(O_INC) $(O_SER) $(O_LIB) $(W_FLAGS) $(DF_OBJ) -o $@ $(D_FLAGS) + $(CC) $(O_INC) $(O_SER) $(W_FLAGS) $(DF_OBJ) -o $@ $(D_FLAGS) $(O_LIB) $(D_OBJ)/%.o: $(D_SRC)/main/%.c includes/minishell.h @$(MKDIR) $(D_OBJ) diff --git a/42sh/src/line-editing/OLD/ft_clear_line.c b/42sh/OLD/ft_clear_line.c similarity index 100% rename from 42sh/src/line-editing/OLD/ft_clear_line.c rename to 42sh/OLD/ft_clear_line.c diff --git a/42sh/src/line-editing/OLD/ft_cursor_left.c b/42sh/OLD/ft_cursor_left.c similarity index 100% rename from 42sh/src/line-editing/OLD/ft_cursor_left.c rename to 42sh/OLD/ft_cursor_left.c diff --git a/42sh/src/line-editing/OLD/ft_cursor_right.c b/42sh/OLD/ft_cursor_right.c similarity index 100% rename from 42sh/src/line-editing/OLD/ft_cursor_right.c rename to 42sh/OLD/ft_cursor_right.c diff --git a/42sh/src/line-editing/OLD/ft_history_add.c b/42sh/OLD/ft_history_add.c similarity index 100% rename from 42sh/src/line-editing/OLD/ft_history_add.c rename to 42sh/OLD/ft_history_add.c diff --git a/42sh/src/line-editing/OLD/ft_history_down.c b/42sh/OLD/ft_history_down.c similarity index 100% rename from 42sh/src/line-editing/OLD/ft_history_down.c rename to 42sh/OLD/ft_history_down.c diff --git a/42sh/src/line-editing/OLD/ft_history_up.c b/42sh/OLD/ft_history_up.c similarity index 100% rename from 42sh/src/line-editing/OLD/ft_history_up.c rename to 42sh/OLD/ft_history_up.c diff --git a/42sh/src/line-editing/OLD/ft_input_is_escaped.c b/42sh/OLD/ft_input_is_escaped.c similarity index 100% rename from 42sh/src/line-editing/OLD/ft_input_is_escaped.c rename to 42sh/OLD/ft_input_is_escaped.c diff --git a/42sh/src/line-editing/OLD/ft_interactive_sh.c b/42sh/OLD/ft_interactive_sh.c similarity index 100% rename from 42sh/src/line-editing/OLD/ft_interactive_sh.c rename to 42sh/OLD/ft_interactive_sh.c diff --git a/42sh/src/line-editing/OLD/ft_key_ctrl_c.c b/42sh/OLD/ft_key_ctrl_c.c similarity index 100% rename from 42sh/src/line-editing/OLD/ft_key_ctrl_c.c rename to 42sh/OLD/ft_key_ctrl_c.c diff --git a/42sh/src/line-editing/OLD/ft_key_ctrl_d.c b/42sh/OLD/ft_key_ctrl_d.c similarity index 100% rename from 42sh/src/line-editing/OLD/ft_key_ctrl_d.c rename to 42sh/OLD/ft_key_ctrl_d.c diff --git a/42sh/src/line-editing/OLD/ft_key_default.c b/42sh/OLD/ft_key_default.c similarity index 100% rename from 42sh/src/line-editing/OLD/ft_key_default.c rename to 42sh/OLD/ft_key_default.c diff --git a/42sh/src/line-editing/OLD/ft_key_del.c b/42sh/OLD/ft_key_del.c similarity index 100% rename from 42sh/src/line-editing/OLD/ft_key_del.c rename to 42sh/OLD/ft_key_del.c diff --git a/42sh/src/line-editing/OLD/ft_key_enter.c b/42sh/OLD/ft_key_enter.c similarity index 100% rename from 42sh/src/line-editing/OLD/ft_key_enter.c rename to 42sh/OLD/ft_key_enter.c diff --git a/42sh/src/line-editing/OLD/ft_line_down.c b/42sh/OLD/ft_line_down.c similarity index 100% rename from 42sh/src/line-editing/OLD/ft_line_down.c rename to 42sh/OLD/ft_line_down.c diff --git a/42sh/src/line-editing/OLD/ft_line_end.c b/42sh/OLD/ft_line_end.c similarity index 100% rename from 42sh/src/line-editing/OLD/ft_line_end.c rename to 42sh/OLD/ft_line_end.c diff --git a/42sh/src/line-editing/OLD/ft_line_start.c b/42sh/OLD/ft_line_start.c similarity index 100% rename from 42sh/src/line-editing/OLD/ft_line_start.c rename to 42sh/OLD/ft_line_start.c diff --git a/42sh/src/line-editing/OLD/ft_line_up.c b/42sh/OLD/ft_line_up.c similarity index 100% rename from 42sh/src/line-editing/OLD/ft_line_up.c rename to 42sh/OLD/ft_line_up.c diff --git a/42sh/src/line-editing/OLD/ft_prompt.c b/42sh/OLD/ft_prompt.c similarity index 100% rename from 42sh/src/line-editing/OLD/ft_prompt.c rename to 42sh/OLD/ft_prompt.c diff --git a/42sh/src/line-editing/OLD/ft_set_termios.c b/42sh/OLD/ft_set_termios.c similarity index 100% rename from 42sh/src/line-editing/OLD/ft_set_termios.c rename to 42sh/OLD/ft_set_termios.c diff --git a/42sh/src/line-editing/OLD/ft_word_left.c b/42sh/OLD/ft_word_left.c similarity index 100% rename from 42sh/src/line-editing/OLD/ft_word_left.c rename to 42sh/OLD/ft_word_left.c diff --git a/42sh/src/line-editing/OLD/ft_word_right.c b/42sh/OLD/ft_word_right.c similarity index 100% rename from 42sh/src/line-editing/OLD/ft_word_right.c rename to 42sh/OLD/ft_word_right.c diff --git a/42sh/src/line-editing/OLD/input_init.c b/42sh/OLD/input_init.c similarity index 100% rename from 42sh/src/line-editing/OLD/input_init.c rename to 42sh/OLD/input_init.c diff --git a/42sh/src/lexer/qstate_update.c b/42sh/OLD/lexer/qstate_update.c similarity index 100% rename from 42sh/src/lexer/qstate_update.c rename to 42sh/OLD/lexer/qstate_update.c diff --git a/42sh/src/line-editing/OLD/qstate_dquote.c b/42sh/OLD/qstate_dquote.c similarity index 100% rename from 42sh/src/line-editing/OLD/qstate_dquote.c rename to 42sh/OLD/qstate_dquote.c diff --git a/42sh/src/line-editing/OLD/qstate_none.c b/42sh/OLD/qstate_none.c similarity index 100% rename from 42sh/src/line-editing/OLD/qstate_none.c rename to 42sh/OLD/qstate_none.c diff --git a/42sh/src/line-editing/OLD/qstate_quote.c b/42sh/OLD/qstate_quote.c similarity index 100% rename from 42sh/src/line-editing/OLD/qstate_quote.c rename to 42sh/OLD/qstate_quote.c diff --git a/42sh/includes/ft_readline.h b/42sh/includes/ft_readline.h index f73e6770..f50d785c 100644 --- a/42sh/includes/ft_readline.h +++ b/42sh/includes/ft_readline.h @@ -6,7 +6,7 @@ /* By: sbenning +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/08 18:02:25 by sbenning #+# #+# */ -/* Updated: 2016/12/10 11:49:42 by sbenning ### ########.fr */ +/* Updated: 2016/12/10 12:20:20 by sbenning ### ########.fr */ /* */ /* ************************************************************************** */ @@ -15,6 +15,13 @@ # include "libft.h" # include "ft_curs.h" + +/* + * Input-Key Mapping +*/ + +# define LINUX +//# define MACOSX # include "ft_input.h" /* @@ -88,6 +95,9 @@ struct s_line char *clipboard; t_curs curs; t_list *stack; + /*COMPATIBILITY*/ + t_dlist *history; + t_list *qstack; }; /*