Yes.
I first set up a enum for easier reading and to not make this take more time.
I then set up a scan code get (inb/outb IS imported) and a key get which displays the pressed key as long it is in the list.
Code: Select all
terminalf/fkbd.h:44:2: error: invalid suffix "P_SCD" on integer constant
1P_SCD = 0x02,
^
terminalf/fkbd.h:44:2: error: expected identifier before numeric constant
terminalf/fkbd.h:45:2: error: invalid suffix "P_SCD" on integer constant
2P_SCD = 0x03,
^
terminalf/fkbd.h:46:2: error: invalid suffix "P_SCD" on integer constant
3P_SCD = 0x04,
^
terminalf/fkbd.h:47:2: error: invalid suffix "P_SCD" on integer constant
4P_SCD = 0x05,
^
terminalf/fkbd.h:48:2: error: invalid suffix "P_SCD" on integer constant
5P_SCD = 0x06,
^
terminalf/fkbd.h:49:2: error: invalid suffix "P_SCD" on integer constant
6P_SCD = 0x07,
^
terminalf/fkbd.h:50:2: error: invalid suffix "P_SCD" on integer constant
7P_SCD = 0x08,
^
terminalf/fkbd.h:51:2: error: invalid suffix "P_SCD" on integer constant
8P_SCD = 0x09,
^
terminalf/fkbd.h:52:2: error: invalid suffix "P_SCD" on integer constant
9P_SCD = 0x0A,
^
terminalf/fkbd.h:53:2: error: invalid suffix "P_SCD" on integer constant
0P_SCD = 0x0B,
^
terminalf/fkbd.h: In function 'getchar':
terminalf/fkbd.h:73:8: error: 'scancode' undeclared (first use in this function)
return scancode[getScancode()+1];
^
terminalf/fkbd.h:73:8: note: each undeclared identifier is reported only once for each function it appears in
terminalf/fkbd.h: In function 'getKey':
terminalf/fkbd.h:79:6: error: 'scancode' undeclared (first use in this function)
if (scancode == AP_SCD)
^
terminalf/fkbd.h:190:16: warning: operation on 'terminal_row' may be undefined [-Wsequence-point]
terminal_row = terminal_row++;
^
terminalf/fkbd.h:195:18: error: invalid suffix "P_SCD" on integer constant
if (scancode == 1P_SCD)
^
terminalf/fkbd.h:200:18: error: invalid suffix "P_SCD" on integer constant
if (scancode == 2P_SCD)
^
terminalf/fkbd.h:205:18: error: invalid suffix "P_SCD" on integer constant
if (scancode == 3P_SCD)
^
terminalf/fkbd.h:210:18: error: invalid suffix "P_SCD" on integer constant
if (scancode == 4P_SCD)
^
terminalf/fkbd.h:215:18: error: invalid suffix "P_SCD" on integer constant
if (scancode == 5P_SCD)
^
terminalf/fkbd.h:220:18: error: invalid suffix "P_SCD" on integer constant
if (scancode == 6P_SCD)
^
terminalf/fkbd.h:225:18: error: invalid suffix "P_SCD" on integer constant
if (scancode == 7P_SCD)
^
terminalf/fkbd.h:230:18: error: invalid suffix "P_SCD" on integer constant
if (scancode == 8P_SCD)
^
terminalf/fkbd.h:235:18: error: invalid suffix "P_SCD" on integer constant
if (scancode == 9P_SCD)
^
terminalf/fkbd.h:240:18: error: invalid suffix "P_SCD" on integer constant
if (scancode == 0P_SCD)
^
terminalf/fkbd.h:245:18: error: 'SLASHP_SCD' undeclared (first use in this function)
if (scancode == SLASHP_SCD)
^
terminalf/fkbd.h:250:18: error: 'POINTP_SCD' undeclared (first use in this function)
if (scancode == POINTP_SCD)
^
terminalf/fkbd.h:255:18: error: 'SINGQUOTP_SCD' undeclared (first use in this function)
if (scancode == SINGQUOTP_SCD)
^
terminalf/fkbd.h:260:18: error: 'EQUALP_SCD' undeclared (first use in this function)
if (scancode == EQUALP_SCD)
^
In file included from terminalf/f.c:7:0,
from kernel.c:8:
terminalf/printservices.h: At top level:
terminalf/printservices.h:20:6: error: nested redefinition of 'enum vga_color'
enum vga_color {
^
terminalf/printservices.h:20:6: error: redeclaration of 'enum vga_color'
In file included from terminalf/fkbd.h:6:0,
from terminalf/f.c:6,
from kernel.c:8:
terminalf/printservices.h:20:6: note: originally defined here
enum vga_color {
^
In file included from terminalf/f.c:7:0,
from kernel.c:8:
terminalf/printservices.h:21:2: error: redeclaration of enumerator 'VGA_COLOR_BLACK'
VGA_COLOR_BLACK = 0,
^
In file included from terminalf/fkbd.h:6:0,
from terminalf/f.c:6,
from kernel.c:8:
terminalf/printservices.h:21:2: note: previous definition of 'VGA_COLOR_BLACK' was here
VGA_COLOR_BLACK = 0,
^
In file included from terminalf/f.c:7:0,
from kernel.c:8:
terminalf/printservices.h:22:2: error: redeclaration of enumerator 'VGA_COLOR_BLUE'
VGA_COLOR_BLUE = 1,
^
In file included from terminalf/fkbd.h:6:0,
from terminalf/f.c:6,
from kernel.c:8:
terminalf/printservices.h:22:2: note: previous definition of 'VGA_COLOR_BLUE' was here
VGA_COLOR_BLUE = 1,
^
In file included from terminalf/f.c:7:0,
from kernel.c:8:
terminalf/printservices.h:23:2: error: redeclaration of enumerator 'VGA_COLOR_GREEN'
VGA_COLOR_GREEN = 2,
^
In file included from terminalf/fkbd.h:6:0,
from terminalf/f.c:6,
from kernel.c:8:
terminalf/printservices.h:23:2: note: previous definition of 'VGA_COLOR_GREEN' was here
VGA_COLOR_GREEN = 2,
^
In file included from terminalf/f.c:7:0,
from kernel.c:8:
terminalf/printservices.h:24:2: error: redeclaration of enumerator 'VGA_COLOR_CYAN'
VGA_COLOR_CYAN = 3,
^
In file included from terminalf/fkbd.h:6:0,
from terminalf/f.c:6,
from kernel.c:8:
terminalf/printservices.h:24:2: note: previous definition of 'VGA_COLOR_CYAN' was here
VGA_COLOR_CYAN = 3,
^
In file included from terminalf/f.c:7:0,
from kernel.c:8:
terminalf/printservices.h:25:2: error: redeclaration of enumerator 'VGA_COLOR_RED'
VGA_COLOR_RED = 4,
^
In file included from terminalf/fkbd.h:6:0,
from terminalf/f.c:6,
from kernel.c:8:
terminalf/printservices.h:25:2: note: previous definition of 'VGA_COLOR_RED' was here
VGA_COLOR_RED = 4,
^
In file included from terminalf/f.c:7:0,
from kernel.c:8:
terminalf/printservices.h:26:2: error: redeclaration of enumerator 'VGA_COLOR_MAGENTA'
VGA_COLOR_MAGENTA = 5,
^
In file included from terminalf/fkbd.h:6:0,
from terminalf/f.c:6,
from kernel.c:8:
terminalf/printservices.h:26:2: note: previous definition of 'VGA_COLOR_MAGENTA' was here
VGA_COLOR_MAGENTA = 5,
^
In file included from terminalf/f.c:7:0,
from kernel.c:8:
terminalf/printservices.h:27:2: error: redeclaration of enumerator 'VGA_COLOR_BROWN'
VGA_COLOR_BROWN = 6,
^
In file included from terminalf/fkbd.h:6:0,
from terminalf/f.c:6,
from kernel.c:8:
terminalf/printservices.h:27:2: note: previous definition of 'VGA_COLOR_BROWN' was here
VGA_COLOR_BROWN = 6,
^
In file included from terminalf/f.c:7:0,
from kernel.c:8:
terminalf/printservices.h:28:2: error: redeclaration of enumerator 'VGA_COLOR_LIGHT_GREY'
VGA_COLOR_LIGHT_GREY = 7,
^
In file included from terminalf/fkbd.h:6:0,
from terminalf/f.c:6,
from kernel.c:8:
terminalf/printservices.h:28:2: note: previous definition of 'VGA_COLOR_LIGHT_GREY' was here
VGA_COLOR_LIGHT_GREY = 7,
^
In file included from terminalf/f.c:7:0,
from kernel.c:8:
terminalf/printservices.h:29:2: error: redeclaration of enumerator 'VGA_COLOR_DARK_GREY'
VGA_COLOR_DARK_GREY = 8,
^
In file included from terminalf/fkbd.h:6:0,
from terminalf/f.c:6,
from kernel.c:8:
terminalf/printservices.h:29:2: note: previous definition of 'VGA_COLOR_DARK_GREY' was here
VGA_COLOR_DARK_GREY = 8,
^
In file included from terminalf/f.c:7:0,
from kernel.c:8:
terminalf/printservices.h:30:2: error: redeclaration of enumerator 'VGA_COLOR_LIGHT_BLUE'
VGA_COLOR_LIGHT_BLUE = 9,
^
In file included from terminalf/fkbd.h:6:0,
from terminalf/f.c:6,
from kernel.c:8:
terminalf/printservices.h:30:2: note: previous definition of 'VGA_COLOR_LIGHT_BLUE' was here
VGA_COLOR_LIGHT_BLUE = 9,
^
In file included from terminalf/f.c:7:0,
from kernel.c:8:
terminalf/printservices.h:31:2: error: redeclaration of enumerator 'VGA_COLOR_LIGHT_GREEN'
VGA_COLOR_LIGHT_GREEN = 10,
^
In file included from terminalf/fkbd.h:6:0,
from terminalf/f.c:6,
from kernel.c:8:
terminalf/printservices.h:31:2: note: previous definition of 'VGA_COLOR_LIGHT_GREEN' was here
VGA_COLOR_LIGHT_GREEN = 10,
^
In file included from terminalf/f.c:7:0,
from kernel.c:8:
terminalf/printservices.h:32:2: error: redeclaration of enumerator 'VGA_COLOR_LIGHT_CYAN'
VGA_COLOR_LIGHT_CYAN = 11,
^
In file included from terminalf/fkbd.h:6:0,
from terminalf/f.c:6,
from kernel.c:8:
terminalf/printservices.h:32:2: note: previous definition of 'VGA_COLOR_LIGHT_CYAN' was here
VGA_COLOR_LIGHT_CYAN = 11,
^
In file included from terminalf/f.c:7:0,
from kernel.c:8:
terminalf/printservices.h:33:2: error: redeclaration of enumerator 'VGA_COLOR_LIGHT_RED'
VGA_COLOR_LIGHT_RED = 12,
^
In file included from terminalf/fkbd.h:6:0,
from terminalf/f.c:6,
from kernel.c:8:
terminalf/printservices.h:33:2: note: previous definition of 'VGA_COLOR_LIGHT_RED' was here
VGA_COLOR_LIGHT_RED = 12,
^
In file included from terminalf/f.c:7:0,
from kernel.c:8:
terminalf/printservices.h:34:2: error: redeclaration of enumerator 'VGA_COLOR_LIGHT_MAGENTA'
VGA_COLOR_LIGHT_MAGENTA = 13,
^
In file included from terminalf/fkbd.h:6:0,
from terminalf/f.c:6,
from kernel.c:8:
terminalf/printservices.h:34:2: note: previous definition of 'VGA_COLOR_LIGHT_MAGENTA' was here
VGA_COLOR_LIGHT_MAGENTA = 13,
^
In file included from terminalf/f.c:7:0,
from kernel.c:8:
terminalf/printservices.h:35:2: error: redeclaration of enumerator 'VGA_COLOR_LIGHT_BROWN'
VGA_COLOR_LIGHT_BROWN = 14,
^
In file included from terminalf/fkbd.h:6:0,
from terminalf/f.c:6,
from kernel.c:8:
terminalf/printservices.h:35:2: note: previous definition of 'VGA_COLOR_LIGHT_BROWN' was here
VGA_COLOR_LIGHT_BROWN = 14,
^
In file included from terminalf/f.c:7:0,
from kernel.c:8:
terminalf/printservices.h:36:2: error: redeclaration of enumerator 'VGA_COLOR_WHITE'
VGA_COLOR_WHITE = 15,
^
In file included from terminalf/fkbd.h:6:0,
from terminalf/f.c:6,
from kernel.c:8:
terminalf/printservices.h:36:2: note: previous definition of 'VGA_COLOR_WHITE' was here
VGA_COLOR_WHITE = 15,
^
In file included from terminalf/f.c:7:0,
from kernel.c:8:
terminalf/printservices.h:39:23: error: redefinition of 'vga_entry_color'
static inline uint8_t vga_entry_color(enum vga_color fg, enum vga_color bg) {
^
In file included from terminalf/fkbd.h:6:0,
from terminalf/f.c:6,
from kernel.c:8:
terminalf/printservices.h:39:23: note: previous definition of 'vga_entry_color' was here
static inline uint8_t vga_entry_color(enum vga_color fg, enum vga_color bg) {
^
In file included from terminalf/f.c:7:0,
from kernel.c:8:
terminalf/printservices.h:43:24: error: redefinition of 'vga_entry'
static inline uint16_t vga_entry(unsigned char uc, uint8_t color) {
^
In file included from terminalf/fkbd.h:6:0,
from terminalf/f.c:6,
from kernel.c:8:
terminalf/printservices.h:43:24: note: previous definition of 'vga_entry' was here
static inline uint16_t vga_entry(unsigned char uc, uint8_t color) {
^
In file included from terminalf/f.c:7:0,
from kernel.c:8:
terminalf/printservices.h:47:8: error: redefinition of 'strlen'
size_t strlen(const char* str) {
^
In file included from terminalf/fkbd.h:6:0,
from terminalf/f.c:6,
from kernel.c:8:
terminalf/printservices.h:47:8: note: previous definition of 'strlen' was here
size_t strlen(const char* str) {
^
In file included from terminalf/f.c:7:0,
from kernel.c:8:
terminalf/printservices.h:54:21: error: redefinition of 'VGA_WIDTH'
static const size_t VGA_WIDTH = 80;
^
In file included from terminalf/fkbd.h:6:0,
from terminalf/f.c:6,
from kernel.c:8:
terminalf/printservices.h:54:21: note: previous definition of 'VGA_WIDTH' was here
static const size_t VGA_WIDTH = 80;
^
In file included from terminalf/f.c:7:0,
from kernel.c:8:
terminalf/printservices.h:55:21: error: redefinition of 'VGA_HEIGHT'
static const size_t VGA_HEIGHT = 25;
^
In file included from terminalf/fkbd.h:6:0,
from terminalf/f.c:6,
from kernel.c:8:
terminalf/printservices.h:55:21: note: previous definition of 'VGA_HEIGHT' was here
static const size_t VGA_HEIGHT = 25;
^
In file included from terminalf/f.c:7:0,
from kernel.c:8:
terminalf/printservices.h:62:6: error: redefinition of 'terminal_initialize'
void terminal_initialize(void) {
^
In file included from terminalf/fkbd.h:6:0,
from terminalf/f.c:6,
from kernel.c:8:
terminalf/printservices.h:62:6: note: previous definition of 'terminal_initialize' was here
void terminal_initialize(void) {
^
In file included from terminalf/f.c:7:0,
from kernel.c:8:
terminalf/printservices.h:75:6: error: redefinition of 'terminal_setcolor'
void terminal_setcolor(uint8_t color) {
^
In file included from terminalf/fkbd.h:6:0,
from terminalf/f.c:6,
from kernel.c:8:
terminalf/printservices.h:75:6: note: previous definition of 'terminal_setcolor' was here
void terminal_setcolor(uint8_t color) {
^
In file included from terminalf/f.c:7:0,
from kernel.c:8:
terminalf/printservices.h:79:6: error: redefinition of 'terminal_putentryat'
void terminal_putentryat(char c, uint8_t color, size_t x, size_t y) {
^
In file included from terminalf/fkbd.h:6:0,
from terminalf/f.c:6,
from kernel.c:8:
terminalf/printservices.h:79:6: note: previous definition of 'terminal_putentryat' was here
void terminal_putentryat(char c, uint8_t color, size_t x, size_t y) {
^
In file included from terminalf/f.c:7:0,
from kernel.c:8:
terminalf/printservices.h:84:6: error: redefinition of 'terminal_putchar'
void terminal_putchar(char c) {
^
In file included from terminalf/fkbd.h:6:0,
from terminalf/f.c:6,
from kernel.c:8:
terminalf/printservices.h:84:6: note: previous definition of 'terminal_putchar' was here
void terminal_putchar(char c) {
^
In file included from terminalf/f.c:7:0,
from kernel.c:8:
terminalf/printservices.h:93:6: error: redefinition of 'terminal_write'
void terminal_write(const char* data, size_t size) {
^
In file included from terminalf/fkbd.h:6:0,
from terminalf/f.c:6,
from kernel.c:8:
terminalf/printservices.h:93:6: note: previous definition of 'terminal_write' was here
void terminal_write(const char* data, size_t size) {
^
In file included from terminalf/f.c:7:0,
from kernel.c:8:
terminalf/printservices.h:98:6: error: redefinition of 'terminal_writestring'
void terminal_writestring(const char* data) {
^
In file included from terminalf/fkbd.h:6:0,
from terminalf/f.c:6,
from kernel.c:8:
terminalf/printservices.h:98:6: note: previous definition of 'terminal_writestring' was here
void terminal_writestring(const char* data) {
^
In file included from terminalf/f.c:6:0,
from kernel.c:8:
terminalf/fkbd.h: In function 'getchar':
terminalf/fkbd.h:74:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
terminalf/fkbd.h: In function 'getKey':
terminalf/fkbd.h:265:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^