mirror of
https://github.com/gbowne1/ClassicOS.git
synced 2025-10-13 21:25:07 -07:00
mostly improvements to malloc
This commit is contained in:
10
kernel/vga.c
10
kernel/vga.c
@@ -1,9 +1,9 @@
|
||||
#include "vga.h"
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h> // Include for vsnprintf
|
||||
#include <string.h> // Include for strlen
|
||||
#include <stdarg.h> // Include for va_list, va_start, etc.
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include "string_utils.h"
|
||||
|
||||
void outb(uint16_t port, uint8_t value) {
|
||||
__asm__ volatile("outb %0, %1" : : "a"(value), "Nd"(port));
|
||||
@@ -130,11 +130,11 @@ void vga_printf(const char* format, ...) {
|
||||
char buffer[256]; // Buffer to store the formatted string
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
vsnprintf(buffer, sizeof(buffer), format, args);
|
||||
my_vsnprintf(buffer, sizeof(buffer), format, args); // Use my_vsnprintf instead of vsnprintf
|
||||
va_end(args);
|
||||
|
||||
// Now you can use the buffer with vga_write_string
|
||||
vga_write_string(buffer, strlen(buffer));
|
||||
vga_write_string(buffer, my_strlen(buffer)); // Use my_strlen instead of strlen
|
||||
}
|
||||
|
||||
void vga_init(void) {
|
||||
|
Reference in New Issue
Block a user