diff options
author | salad <fmoenne-@student.le-101.fr> | 2020-10-20 18:44:30 +0200 |
---|---|---|
committer | salad <fmoenne-@student.le-101.fr> | 2020-10-20 18:44:30 +0200 |
commit | 6238338ae0c89c9cb16e437bf80db3f4fb1cce10 (patch) | |
tree | c8f058727128f5d7ba0e47c12b35eb135ec55a53 /src/c_init.h | |
parent | norme + backslash + delchar + init --> gnl (diff) | |
download | 42-minishell-6238338ae0c89c9cb16e437bf80db3f4fb1cce10.tar.gz 42-minishell-6238338ae0c89c9cb16e437bf80db3f4fb1cce10.tar.bz2 42-minishell-6238338ae0c89c9cb16e437bf80db3f4fb1cce10.tar.xz 42-minishell-6238338ae0c89c9cb16e437bf80db3f4fb1cce10.tar.zst 42-minishell-6238338ae0c89c9cb16e437bf80db3f4fb1cce10.zip |
globul scope
Diffstat (limited to 'src/c_init.h')
-rw-r--r-- | src/c_init.h | 43 |
1 files changed, 15 insertions, 28 deletions
diff --git a/src/c_init.h b/src/c_init.h index 86eb89a..cb10864 100644 --- a/src/c_init.h +++ b/src/c_init.h @@ -10,13 +10,13 @@ /* */ /* ************************************************************************** */ -#ifndef U_INIT_H -#define U_INIT_H +#ifndef C_INIT_H +# define C_INIT_H -#include <termios.h> -#include <sys/ioctl.h> +# include <termios.h> +# include <sys/ioctl.h> -#include "s_struct.h" +# include "s_struct.h" # define LEFT_K 0x445b1b # define RIGHT_K 0x435b1b @@ -30,30 +30,17 @@ # define CTRL_C 0x03 # define CTRL_L 0x0c - -typedef struct s_caps +typedef struct s_caps { - struct termios tios; - struct winsize ws; - uint32_t cpos; /*cursor position (column)*/ - uint32_t lpos; /*cursor position (line)*/ - uint32_t nlines; /*cursor position (line)*/ - uint8_t psx; /*cursor position (line)*/ -} t_caps; + struct termios tios; + struct winsize ws; + uint32_t cpos; + uint32_t lpos; + uint32_t nlines; + uint8_t psx; +} t_caps; -int16_t c_gnl(int32_t fd, char **line, uint8_t psx, t_msh *msh); -int16_t c_set_term_raw(uint8_t mode); +int16_t c_gnl(int32_t fd, char **line, uint8_t psx, t_msh *msh); +int16_t c_set_term_raw(uint8_t mode); #endif - -/* cm_str; cursor mobility*/ -/* nl; newline, returned by tgoto()*/ -/* ks; indicate that keys transmit from now on*/ -/* ke; indicate that keys transmit from now on*/ -/* pc; padding char --> do not touch (default 0)*/ -/* bc; left one char*/ -/* le; left one char*/ -/* up; up one line*/ -/* DO; down one line*/ -/* nd; right one char*/ -/* cl; line clear*/ |