PatchworkOS
Loading...
Searching...
No Matches
ansi.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
stdint.h
>
4
#include <
sys/kbd.h
>
5
6
#define ANSI_MAX_LENGTH 32
7
8
typedef
struct
9
{
10
char
buffer
[
ANSI_MAX_LENGTH
];
11
uint8_t
length
;
12
}
ansi_t
;
13
14
void
ansi_init
(
ansi_t
* ansi);
15
16
typedef
enum
17
{
18
ANSI_STILL_PARSING
,
19
ANSI_PRINTABLE
,
20
ANSI_BACKSPACE
,
21
ANSI_NEWLINE
,
22
ANSI_TAB
,
23
ANSI_ARROW_UP
,
24
ANSI_ARROW_DOWN
,
25
ANSI_ARROW_LEFT
,
26
ANSI_ARROW_RIGHT
,
27
ANSI_PAGE_UP
,
28
ANSI_PAGE_DOWN
,
29
ANSI_HOME
,
30
ANSI_END
,
31
ANSI_DELETE
,
32
ANSI_CTRL_C
,
33
}
ansi_result_type_t
;
34
35
typedef
struct
36
{
37
ansi_result_type_t
type
;
38
char
printable
;
39
}
ansi_result_t
;
40
41
uint64_t
ansi_parse
(
ansi_t
* ansi,
char
input,
ansi_result_t
* result);
kbd.h
buffer
EFI_PHYSICAL_ADDRESS buffer
Definition
mem.c:15
ansi_init
void ansi_init(ansi_t *ansi)
Definition
ansi.c:6
ansi_result_type_t
ansi_result_type_t
Definition
ansi.h:17
ANSI_BACKSPACE
@ ANSI_BACKSPACE
Definition
ansi.h:20
ANSI_PAGE_UP
@ ANSI_PAGE_UP
Definition
ansi.h:27
ANSI_CTRL_C
@ ANSI_CTRL_C
Definition
ansi.h:32
ANSI_HOME
@ ANSI_HOME
Definition
ansi.h:29
ANSI_PAGE_DOWN
@ ANSI_PAGE_DOWN
Definition
ansi.h:28
ANSI_ARROW_DOWN
@ ANSI_ARROW_DOWN
Definition
ansi.h:24
ANSI_NEWLINE
@ ANSI_NEWLINE
Definition
ansi.h:21
ANSI_END
@ ANSI_END
Definition
ansi.h:30
ANSI_TAB
@ ANSI_TAB
Definition
ansi.h:22
ANSI_STILL_PARSING
@ ANSI_STILL_PARSING
Definition
ansi.h:18
ANSI_PRINTABLE
@ ANSI_PRINTABLE
Definition
ansi.h:19
ANSI_ARROW_UP
@ ANSI_ARROW_UP
Definition
ansi.h:23
ANSI_DELETE
@ ANSI_DELETE
Definition
ansi.h:31
ANSI_ARROW_RIGHT
@ ANSI_ARROW_RIGHT
Definition
ansi.h:26
ANSI_ARROW_LEFT
@ ANSI_ARROW_LEFT
Definition
ansi.h:25
ANSI_MAX_LENGTH
#define ANSI_MAX_LENGTH
Definition
ansi.h:6
ansi_parse
uint64_t ansi_parse(ansi_t *ansi, char input, ansi_result_t *result)
Definition
ansi.c:11
stdint.h
uint64_t
__UINT64_TYPE__ uint64_t
Definition
stdint.h:17
uint8_t
__UINT8_TYPE__ uint8_t
Definition
stdint.h:11
ansi_result_t
Definition
ansi.h:36
ansi_result_t::printable
char printable
Definition
ansi.h:38
ansi_result_t::type
ansi_result_type_t type
Definition
ansi.h:37
ansi_t
Definition
ansi.h:9
ansi_t::length
uint8_t length
Definition
ansi.h:11
src
programs
shell
ansi.h
Generated by
1.9.8