MiniDevil
As beautiful as a shell
Terminal control: dimensions, raw mode, cursor management. More...
#include "minishell_ui.h"
Include dependency graph for terminal.c:Terminal control: dimensions, raw mode, cursor management.
Definition in file terminal.c.
Functions | |
| void | get_term_size (t_term *term) |
| Get the terinal dimensions via ioctl and store them. More... | |
| void | set_raw_mode (t_term *term) |
| Switch the terminal into non canonical and no echo mode. More... | |
| void | restore_term_mode (t_term *term) |
| Restore the terminal to the saved settings. More... | |
| void | print_goodbye (void) |
| Print the exit banner to STDOUT. More... | |
| void get_term_size | ( | t_term * | term | ) |
Get the terinal dimensions via ioctl and store them.
Fallback is 80x24 (default) in case ioctl fails
| term | Terminal state to fill with width and height |
Definition at line 22 of file terminal.c.
References t_term::height, and t_term::width.
Referenced by check_resize(), and init_term().
Here is the caller graph for this function:| void set_raw_mode | ( | t_term * | term | ) |
Switch the terminal into non canonical and no echo mode.
| term | Terminal state (original is saved before modification) |
Definition at line 46 of file terminal.c.
References t_term::orig.
Referenced by init_term().
Here is the caller graph for this function:| void restore_term_mode | ( | t_term * | term | ) |
Restore the terminal to the saved settings.
| term | Terminal state (holds the saved orig termios) |
Definition at line 63 of file terminal.c.
References t_term::orig.
Referenced by cleanup_term().
Here is the caller graph for this function:| void print_goodbye | ( | void | ) |
Print the exit banner to STDOUT.
Definition at line 71 of file terminal.c.
References BOLD, PURPLE, and RESET.
Referenced by run_ui_mode().
Here is the caller graph for this function: