/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* c_init.h :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: rbousset +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/14 17:19:27 by rbousset #+# #+# */ /* Updated: 2020/02/14 17:19:29 by rbousset ### ########lyon.fr */ /* */ /* ************************************************************************** */ #ifndef C_INIT_H # define C_INIT_H # include # include # include # include "s_struct.h" # define UP_K 0x415b1b # define DOWN_K 0x425b1b # define RIGHT_K 0x435b1b # define LEFT_K 0x445b1b # define HOME_K 0x485b1b # define END_K 0x465b1b # define DEL_K 0x7f # define RET_K 0x0d # define CTRL_A 0x01 # define CTRL_B 0x02 # define CTRL_C 0x03 # define CTRL_D 0x04 # define CTRL_E 0x05 # define CTRL_F 0x06 # define CTRL_L 0x0c # define CTRL_N 0x0e # define CTRL_P 0x10 typedef struct s_caps { struct termios tios; struct winsize ws; unsigned int cpos; unsigned int lpos; unsigned int nlines; unsigned short psx; unsigned short plen; short key; } t_caps; char *c_set_ptr(t_bool reset, char key, t_msh *msh); short c_gnl(int fd, char **line, char psx, t_msh *msh); short c_set_term_raw(char mode); #endif