22    printf(
"\n\033[32m%s\n\033[92m>\033[m ", cwd);
 
 
  110        if (previous == 
NULL)
 
  114        while (state->
pos > 0) 
 
  129        while (state->
pos > 0) 
 
  166        while (state->
pos > 0)
 
 
  196    for (
uint64_t i = 0; i < length; i++)
 
 
  221    printf(
"Welcome to the PatchworkOS Shell!\n");
 
  222    printf(
"Type \033[92mhelp\033[m for information on how to use the shell.\n");
 
  237        if (readCount == 
ERR)
 
 
#define MAX_PATH
Maximum length of filepaths.
void ansi_init(ansi_t *ansi)
uint64_t ansi_parse(ansi_t *ansi, char input, ansi_result_t *result)
#define errno
Error number variable.
uint64_t readfile(const char *path, void *buffer, uint64_t count, uint64_t offset)
Wrapper for reading a file directly using a path.
uint64_t read(fd_t fd, void *buffer, uint64_t count)
System call for reading from files.
#define NULL
Pointer error value.
#define ERR
Integer error value.
const char * history_previous(history_t *history)
void history_deinit(history_t *history)
void history_push(history_t *history, const char *entry)
void history_init(history_t *history)
const char * history_next(history_t *history)
static uint64_t interactive_handle_input(interactive_state_t *state, const char *input, uint64_t length)
static uint64_t interactive_handle_ansi(interactive_state_t *state, ansi_result_t *result)
int interactive_shell(void)
static void interactive_prompt(void)
static uint64_t interactive_execute_command(interactive_state_t *state)
EFI_PHYSICAL_ADDRESS buffer
uint64_t pipeline_execute(pipeline_t *pipeline)
void pipeline_deinit(pipeline_t *pipeline)
uint64_t pipeline_init(pipeline_t *pipeline, const char *cmdline)
_PUBLIC int fflush(FILE *stream)
_PUBLIC int printf(const char *_RESTRICT format,...)
_PUBLIC char * strerror(int errnum)
_PUBLIC void * memmove(void *_RESTRICT s1, const void *_RESTRICT s2, size_t n)
_PUBLIC char * strncpy(char *_RESTRICT s1, const char *_RESTRICT s2, size_t n)
_PUBLIC size_t strlen(const char *s)
_PUBLIC char * strcpy(char *_RESTRICT s1, const char *_RESTRICT s2)
_PUBLIC void * memset(void *s, int c, size_t n)