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

34 lines
593 B
C
Raw Normal View History

2020-12-06 23:47:53 -05:00
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
2020-11-28 16:24:50 -05:00
#include <kernaux/multiboot2.h>
2020-11-29 07:57:34 -05:00
#include <assert.h>
2022-02-01 22:09:54 -05:00
#include <stdarg.h>
2020-11-28 16:24:50 -05:00
#include <stdio.h>
2022-01-12 23:05:34 -05:00
#include "multiboot2_info_example1.h"
2020-11-28 16:24:50 -05:00
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);
}
2020-11-28 16:24:50 -05:00
int main()
{
2022-01-12 22:59:52 -05:00
assert(KernAux_Multiboot2_Info_is_valid(
2022-01-12 23:05:34 -05:00
(struct KernAux_Multiboot2_Info*)multiboot2_info_example1
2020-11-29 07:57:34 -05:00
));
2022-01-12 22:59:52 -05:00
KernAux_Multiboot2_Info_print(
2022-01-12 23:05:34 -05:00
(struct KernAux_Multiboot2_Info*)multiboot2_info_example1,
2022-02-01 22:09:54 -05:00
my_printf
2020-11-28 16:24:50 -05:00
);
return 0;
}