1
0
Fork 0
mirror of https://github.com/tailix/libkernaux.git synced 2024-11-13 11:04:27 -05:00
libkernaux/tests/multiboot2_header_print1.c

34 lines
609 B
C
Raw Normal View History

2022-01-13 08:37:37 -05:00
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <kernaux/multiboot2.h>
#include <assert.h>
2022-02-01 22:09:54 -05:00
#include <stdarg.h>
2022-01-13 08:37:37 -05:00
#include <stdio.h>
#include "multiboot2_header_example1.h"
2022-02-01 22:09:54 -05:00
static void my_printf(const char *format, ...)
{
va_list va;
va_start(va, format);
vprintf(format, va);
va_end(va);
}
2022-01-13 08:37:37 -05:00
int main()
{
assert(KernAux_Multiboot2_Header_is_valid(
2022-01-14 02:16:26 -05:00
(struct KernAux_Multiboot2_Header*)&multiboot2_header_example1
2022-01-13 08:37:37 -05:00
));
KernAux_Multiboot2_Header_print(
2022-01-14 02:16:26 -05:00
(struct KernAux_Multiboot2_Header*)&multiboot2_header_example1,
2022-02-01 22:09:54 -05:00
my_printf
2022-01-13 08:37:37 -05:00
);
return 0;
}