MiniDevil
As beautiful as a shell
Output buffer management: adds / clears command output lines. More...
#include "minishell_ui.h"
Include dependency graph for output.c:Output buffer management: adds / clears command output lines.
Definition in file output.c.
Functions | |
| void | out_add_line (t_out *out, const char *line) |
| Append a duplicate of a line to the output buffer. More... | |
| void | out_clear (t_out *out) |
| Free stored output lines and reset the scroll state. More... | |
| void | out_free (t_out *out) |
| Clear all output lines and free the lines pointer array. More... | |
| void | add_welcome_msg (t_ui *ui) |
| Fill the output buffer w/ an introductory welcome banner. More... | |
| void out_add_line | ( | t_out * | out, |
| const char * | line | ||
| ) |
Append a duplicate of a line to the output buffer.
Do nothing if the buffers already reached MAX_LINES
| out | Output to append to |
| line | String to store |
Definition at line 23 of file output.c.
References t_out::count, t_out::lines, and MAX_LINES.
Referenced by add_welcome_msg(), handle_fork_error(), init_pipe_and_fds(), process_output_char(), and read_output_from_fd().
Here is the caller graph for this function:| void out_clear | ( | t_out * | out | ) |
Free stored output lines and reset the scroll state.
| out | Output state to clear |
Definition at line 37 of file output.c.
References t_out::count, t_out::lines, and t_out::scroll.
Referenced by cmd_execute(), exec_ui_builtin(), and out_free().
Here is the caller graph for this function:| void out_free | ( | t_out * | out | ) |
Clear all output lines and free the lines pointer array.
| out | Output to release |
Definition at line 57 of file output.c.
References t_out::lines, and out_clear().
Referenced by cleanup_term(), and exec_child().
Here is the call graph for this function:
Here is the caller graph for this function:| void add_welcome_msg | ( | t_ui * | ui | ) |
Fill the output buffer w/ an introductory welcome banner.
| ui | UI state for which output buffer receives the banner |
Definition at line 68 of file output.c.
References t_ui::out, and out_add_line().
Referenced by ui_loop().
Here is the call graph for this function:
Here is the caller graph for this function: