2022-09-08 06:57:22 +01:00
|
|
|
#define STB_SPRINTF_DECORATE(name) name
|
|
|
|
#define STB_SPRINTF_IMPLEMENTATION 1
|
|
|
|
#define STB_SPRINTF_NOFLOAT 1
|
|
|
|
#include <stb_sprintf.h>
|
|
|
|
#include <limine.h>
|
|
|
|
|
2023-07-15 07:12:16 +01:00
|
|
|
//static volatile struct limine_terminal_request terminal_request = {
|
|
|
|
// .id = LIMINE_TERMINAL_REQUEST,
|
|
|
|
// .revision = 0
|
|
|
|
//};
|
2022-09-08 06:57:22 +01:00
|
|
|
|
|
|
|
#define PRINT_BUFFER_SIZE 8192
|
|
|
|
|
|
|
|
int printf(const char *format, ...)
|
|
|
|
{
|
|
|
|
va_list args;
|
|
|
|
char buffer[PRINT_BUFFER_SIZE];
|
2023-07-15 07:12:16 +01:00
|
|
|
//struct limine_terminal *terminal;
|
2022-09-08 06:57:22 +01:00
|
|
|
size_t length;
|
|
|
|
|
|
|
|
va_start(args, format);
|
|
|
|
|
|
|
|
length = vsnprintf(buffer, PRINT_BUFFER_SIZE, format, args);
|
2023-07-15 07:12:16 +01:00
|
|
|
//terminal = terminal_request.response->terminals[0];
|
|
|
|
//terminal_request.response->write(terminal, buffer, length);
|
2022-09-08 06:57:22 +01:00
|
|
|
|
|
|
|
va_end(args);
|
|
|
|
|
|
|
|
return length;
|
|
|
|
}
|
|
|
|
|