|
PatchworkOS
|
#include "interactive.h"#include "ansi.h"#include "history.h"#include "pipeline.h"#include <errno.h>#include <stdbool.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/io.h>#include <sys/kbd.h>#include <sys/proc.h>Go to the source code of this file.
Data Structures | |
| struct | interactive_state_t |
Functions | |
| static void | interactive_prompt (void) |
| static uint64_t | interactive_execute_command (interactive_state_t *state) |
| static uint64_t | interactive_handle_ansi (interactive_state_t *state, ansi_result_t *result) |
| static uint64_t | interactive_handle_input (interactive_state_t *state, const char *input, uint64_t length) |
| int | interactive_shell (void) |
|
static |
Definition at line 35 of file interactive.c.
References interactive_state_t::buffer, ERR, interactive_state_t::history, history_push(), pipeline_deinit(), pipeline_execute(), pipeline_init(), interactive_state_t::pos, printf(), interactive_state_t::status, pipeline_t::status, and strerror().
Referenced by interactive_handle_ansi().
|
static |
Definition at line 65 of file interactive.c.
References ANSI_ARROW_DOWN, ANSI_ARROW_LEFT, ANSI_ARROW_RIGHT, ANSI_ARROW_UP, ANSI_BACKSPACE, ANSI_CTRL_C, ANSI_END, ANSI_HOME, ANSI_NEWLINE, ANSI_PRINTABLE, ANSI_TAB, interactive_state_t::buffer, ERR, fflush(), interactive_state_t::history, history_next(), history_previous(), interactive_execute_command(), interactive_prompt(), MAX_PATH, memmove(), memset(), next, NULL, interactive_state_t::pos, ansi_result_t::printable, printf(), stdout, strlen(), strncpy(), and ansi_result_t::type.
Referenced by interactive_handle_input().
|
static |
Definition at line 194 of file interactive.c.
References interactive_state_t::ansi, ansi_parse(), ANSI_STILL_PARSING, ERR, errno, interactive_handle_ansi(), printf(), strerror(), and ansi_result_t::type.
Referenced by interactive_shell().
|
static |
Definition at line 15 of file interactive.c.
References ERR, fflush(), MAX_PATH, printf(), readfile(), stdout, and strcpy().
Referenced by interactive_handle_ansi(), and interactive_shell().
| int interactive_shell | ( | void | ) |
Definition at line 219 of file interactive.c.
References interactive_state_t::ansi, ansi_init(), buffer, interactive_state_t::buffer, ERR, errno, EXIT_FAILURE, interactive_state_t::history, history_deinit(), history_init(), interactive_handle_input(), interactive_prompt(), MAX_PATH, memset(), interactive_state_t::pos, printf(), read(), interactive_state_t::status, STDIN_FILENO, and strerror().
Referenced by main().