mirror of
https://github.com/tailix/libkernaux.git
synced 2025-04-07 17:32:45 -04:00
Fix API usage
This commit is contained in:
parent
a4fc6661e3
commit
bd3d2ea030
2 changed files with 12 additions and 3 deletions
|
@ -17,6 +17,13 @@
|
|||
|
||||
#include <stddef.h>
|
||||
|
||||
static void kernaux_console_printf_putc(
|
||||
const char c,
|
||||
void *const arg __attribute__((unused))
|
||||
) {
|
||||
kernaux_console_putc(c);
|
||||
}
|
||||
|
||||
void kernaux_console_putc(const char c __attribute__((unused)))
|
||||
{
|
||||
#ifdef ASM_I386
|
||||
|
@ -39,7 +46,7 @@ void kernaux_console_printf(const char *format, ...)
|
|||
{
|
||||
va_list va;
|
||||
va_start(va, format);
|
||||
kernaux_vprintf(kernaux_console_putc, NULL, format, va);
|
||||
kernaux_vprintf(kernaux_console_printf_putc, NULL, format, va);
|
||||
va_end(va);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -14,8 +14,10 @@
|
|||
static char buffer[BUFFER_SIZE];
|
||||
static size_t buffer_index;
|
||||
|
||||
static void test_putchar(const char chr)
|
||||
{
|
||||
static void test_putchar(
|
||||
const char chr,
|
||||
void *const arg __attribute__((unused))
|
||||
) {
|
||||
if (buffer_index >= BUFFER_SIZE) {
|
||||
printf("Buffer overflow!\n");
|
||||
abort();
|
||||
|
|
Loading…
Add table
Reference in a new issue