cowos

custom OS from scratch in C
git clone git://git.daat.foo/cowos.git
Log | Files | Refs | README | LICENSE

commit 4a6c2e265642859c21d1053d078099212a0f1dd4
parent 16103b00112601eae0e51151170bdd6d98655df3
Author: cowmonk <rekketstone@duck.com>
Date:   Thu, 17 Apr 2025 23:21:59 -0700

Improved (more like fixed) a couple things

Diffstat:
Mkernel/drivers/video/vga.c | 4++--
Mkernel/include/drivers/video/vga.h | 4++--
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/drivers/video/vga.c b/kernel/drivers/video/vga.c @@ -37,7 +37,7 @@ term_putentryat(char c, uint8_t color, size_t x, size_t y) void term_putchar(char c) { - term_putentryat(c, term_color, term_row); + term_putentryat(c, term_color, term_col, term_row); if (++term_col == VGA_WIDTH) { term_col = 0; if (++term_row == VGA_HEIGHT) { @@ -49,7 +49,7 @@ term_putchar(char c) void term_writestr(const char* data) { - for (size_t i = 0; i < strlen(data); i++) { + for (size_t i = 0; data[i] != '\0'; i++) { term_putchar(data[i]); } } diff --git a/kernel/include/drivers/video/vga.h b/kernel/include/drivers/video/vga.h @@ -41,10 +41,10 @@ vga_entry(unsigned char uc, uint8_t color) #define VGA_HEIGHT 25 #define VGA_MEMORY 0xB8000 /* VGA memory location */ -void term init(void); +void term_init(void); void term_setcolor(uint8_t color); void term_putentryat(char c, uint8_t color, size_t x, size_t y); void term_putchar(char c); void term_writestr(const char* data); -#endif #VGA_H +#endif // VGA_H