addded my old set_termios

This commit is contained in:
Jack Halford 2017-01-10 17:05:17 +01:00
parent f011ea258d
commit 8f70df9264
6 changed files with 9 additions and 6 deletions

View file

@ -6,7 +6,7 @@
/* By: sbenning <sbenning@student.42.fr> +#+ +:+ +#+ */ /* By: sbenning <sbenning@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2016/12/08 18:02:25 by sbenning #+# #+# */ /* Created: 2016/12/08 18:02:25 by sbenning #+# #+# */
/* Updated: 2017/01/10 13:22:13 by jhalford ### ########.fr */ /* Updated: 2017/01/10 17:01:47 by jhalford ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -129,6 +129,7 @@ struct s_input
int rl_setup(t_line *line); int rl_setup(t_line *line);
int rl_cleanup(t_line *line); int rl_cleanup(t_line *line);
void rl_teardown(t_line *line); void rl_teardown(t_line *line);
int rl_set_termios(int input_mode);
/* /*
* Dynamic allocated buffer manipulation * Dynamic allocated buffer manipulation

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */ /* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2016/12/15 13:01:19 by jhalford #+# #+# */ /* Created: 2016/12/15 13:01:19 by jhalford #+# #+# */
/* Updated: 2017/01/09 16:24:22 by jhalford ### ########.fr */ /* Updated: 2017/01/10 17:04:27 by jhalford ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */ /* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2016/12/13 14:58:36 by jhalford #+# #+# */ /* Created: 2016/12/13 14:58:36 by jhalford #+# #+# */
/* Updated: 2017/01/10 12:32:49 by jhalford ### ########.fr */ /* Updated: 2017/01/10 16:56:52 by jhalford ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */

View file

@ -6,7 +6,7 @@
/* By: sbenning <sbenning@student.42.fr> +#+ +:+ +#+ */ /* By: sbenning <sbenning@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2016/12/08 18:03:48 by sbenning #+# #+# */ /* Created: 2016/12/08 18:03:48 by sbenning #+# #+# */
/* Updated: 2017/01/10 11:51:34 by jhalford ### ########.fr */ /* Updated: 2017/01/10 16:59:00 by jhalford ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */

View file

@ -6,7 +6,7 @@
/* By: sbenning <sbenning@student.42.fr> +#+ +:+ +#+ */ /* By: sbenning <sbenning@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2016/12/08 18:07:47 by sbenning #+# #+# */ /* Created: 2016/12/08 18:07:47 by sbenning #+# #+# */
/* Updated: 2017/01/10 11:54:49 by jhalford ### ########.fr */ /* Updated: 2017/01/10 17:02:48 by jhalford ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -14,6 +14,7 @@
int rl_setup(t_line *line) int rl_setup(t_line *line)
{ {
rl_set_termios(1);
ft_bzero(line, sizeof(t_line)); ft_bzero(line, sizeof(t_line));
if (curs_setup(&line->curs) < 0) if (curs_setup(&line->curs) < 0)
return (-1); return (-1);
@ -24,6 +25,7 @@ int rl_setup(t_line *line)
int rl_cleanup(t_line *line) int rl_cleanup(t_line *line)
{ {
rl_set_termios(0);
if (curs_cleanup(&line->curs) < 0) if (curs_cleanup(&line->curs) < 0)
return (-1); return (-1);
if (rl_merge_line(line) < 0) if (rl_merge_line(line) < 0)

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */ /* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2016/12/12 17:23:59 by jhalford #+# #+# */ /* Created: 2016/12/12 17:23:59 by jhalford #+# #+# */
/* Updated: 2017/01/10 12:37:46 by jhalford ### ########.fr */ /* Updated: 2017/01/10 17:00:46 by jhalford ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */