Kintsugi OS 0.5.0
x86 Monolithic OS
Loading...
Searching...
No Matches
line_editor.c File Reference
#include "../drivers/keyboard.h"
#include "../drivers/terminal.h"
#include "../kklibc/kklibc.h"
#include "shell.h"

Macros

#define HISTORY_SIZE   16
 

Functions

static void prompt (void)
 
static void redraw (void)
 
void line_editor_init (void)
 
static void recall (int direction)
 
void line_editor_key (int key)
 

Variables

static char line [SHELL_LINE_SIZE]
 
static char history [HISTORY_SIZE][SHELL_LINE_SIZE]
 
static char draft [SHELL_LINE_SIZE]
 
static u32 length
 
static u32 cursor
 
static u32 rendered
 
static u32 origin_x
 
static u32 origin_y
 
static u32 history_count
 
static u32 history_position
 

Macro Definition Documentation

◆ HISTORY_SIZE

#define HISTORY_SIZE   16

Function Documentation

◆ line_editor_init()

void line_editor_init ( void  )

◆ line_editor_key()

void line_editor_key ( int  key)

◆ prompt()

static void prompt ( void  )
static

◆ recall()

static void recall ( int  direction)
static

◆ redraw()

static void redraw ( void  )
static

Variable Documentation

◆ cursor

u32 cursor
static

◆ draft

char draft[SHELL_LINE_SIZE]
static

◆ history

char history[HISTORY_SIZE][SHELL_LINE_SIZE]
static

◆ history_count

u32 history_count
static

◆ history_position

u32 history_position
static

◆ length

u32 length
static

◆ line

char line[SHELL_LINE_SIZE]
static

◆ origin_x

u32 origin_x
static

◆ origin_y

u32 origin_y
static

◆ rendered

u32 rendered
static