tiny-shell 0.2
A mini shell project aiming to gain knowledge about Win32 and Linux API
|
Go to the source code of this file.
Functions | |
void | io_set_last_status (enum run_result result) |
Set the result of last command (RUN_OK/RUN_FAIL/...) | |
void | io_set_text_white () |
Set default text color to white. | |
void | io_set_prompt_visibility (bool visible) |
Config if prompt should be printed. | |
void | scan_input (struct cmd *obj) |
Ask and convert user's input into command. | |
void | format_success (char *fmt,...) |
Used format_xxx instead of printf and such for uniform output. | |
void | format_output (char *fmt,...) |
Used format_xxx instead of printf and such for uniform output. | |
void | format_usage (char *fmt,...) |
Used format_xxx instead of printf and such for uniform output. | |
void | format_error (char *fmt,...) |
Used format_xxx instead of printf and such for uniform output. | |
void format_error | ( | char * | fmt, |
... ) |
Used format_xxx
instead of printf
and such for uniform output.
Definition at line 89 of file io_wrap.c.
References COLOR_DEFAULT, COLOR_RED, and support_color().
Referenced by add_path(), cmd_init_from_str(), main(), split_by_whitespaces(), and transform_quotes().
void format_output | ( | char * | fmt, |
... ) |
Used format_xxx
instead of printf
and such for uniform output.
Definition at line 80 of file io_wrap.c.
References COLOR_DEFAULT, and support_color().
Referenced by run_get_all_env(), run_get_env(), and run_help().
void format_success | ( | char * | fmt, |
... ) |
Used format_xxx
instead of printf
and such for uniform output.
Definition at line 69 of file io_wrap.c.
References COLOR_DEFAULT, COLOR_GREEN, and support_color().
Referenced by add_path(), invoke_runner(), and main().
void format_usage | ( | char * | fmt, |
... ) |
Used format_xxx
instead of printf
and such for uniform output.
Definition at line 57 of file io_wrap.c.
References COLOR_DEFAULT, COLOR_YELLOW, and support_color().
Referenced by cmd_init_from_str().
void io_set_last_status | ( | enum run_result | result | ) |
Set the result of last command (RUN_OK/RUN_FAIL/...)
Definition at line 29 of file io_wrap.c.
References last_run_status().
Referenced by main().
void io_set_prompt_visibility | ( | bool | visible | ) |
Config if prompt should be printed.
Definition at line 42 of file io_wrap.c.
References is_prompt_visible().
Referenced by main().
void io_set_text_white | ( | ) |
Set default text color to white.
Definition at line 33 of file io_wrap.c.
References io_use_white_text().
Referenced by main().
void scan_input | ( | struct cmd * | obj | ) |
Ask and convert user's input into command.
Definition at line 47 of file io_wrap.c.
References cmd_init_from_str(), INPUT_BUFFER_SIZE, and prompt_input().
Referenced by main().