MiniDevil
As beautiful as a shell
Terminal initialization: sets up UI state and terminal mode. More...
#include "minishell_ui.h"
Include dependency graph for terminal_init.c:Terminal initialization: sets up UI state and terminal mode.
Definition in file terminal_init.c.
Functions | |
| static void | init_ui_state (t_ui *ui) |
| Intializes the command buffer, output state and waifu mood. More... | |
| void | init_term (t_ui *ui) |
| Prepare the terminal and UI state for the main event. More... | |
| void | cleanup_term (t_ui *ui) |
| Clean up the UI terminal state and free output memory. More... | |
|
static |
Intializes the command buffer, output state and waifu mood.
| ui | UI state |
Definition at line 24 of file terminal_init.c.
References t_cmd::buf, t_ui::cmd, t_out::count, t_cmd::cursor, t_out::exit_code, t_cmd::len, t_out::lines, MAX_CMD_LEN, MAX_LINES, t_waifu::mood, MOOD_PROUD, t_ui::out, t_ui::running, t_out::scroll, and t_ui::waifu.
Referenced by init_term().
Here is the caller graph for this function:| void init_term | ( | t_ui * | ui | ) |
Prepare the terminal and UI state for the main event.
| ui |
Definition at line 51 of file terminal_init.c.
References CLEAR_SCREEN, CURSOR_HIDE, get_term_size(), init_ui_state(), set_raw_mode(), and t_ui::term.
Referenced by init_ui().
Here is the call graph for this function:
Here is the caller graph for this function:| void cleanup_term | ( | t_ui * | ui | ) |
Clean up the UI terminal state and free output memory.
| ui |
Definition at line 68 of file terminal_init.c.
References CLEAR_SCREEN, CURSOR_SHOW, t_ui::out, out_free(), restore_term_mode(), and t_ui::term.
Referenced by run_ui_mode().
Here is the call graph for this function:
Here is the caller graph for this function: