52 lines
1.1 KiB
C
52 lines
1.1 KiB
C
#include "axl.h"
|
|
#include "axl_vlq.h"
|
|
#include <windows.h>
|
|
|
|
int _start(void)
|
|
{
|
|
SetConsoleOutputCP(CP_UTF8);
|
|
axl_init();
|
|
|
|
axl_puts("Привет, мир!");
|
|
axl_puts("Hello, world!");
|
|
axl_puts("Bonjour le monde!");
|
|
axl_puts("Hola mundo!");
|
|
axl_puts("こんにちは世界!");
|
|
axl_puts("你好世界!");
|
|
axl_puts("안녕하세요 세계!");
|
|
axl_puts("สวัสดีชาวโลก!");
|
|
axl_puts("नमस्ते दुनिया!");
|
|
axl_puts("مرحبا بالعالم!");
|
|
|
|
void* fds = axl_malloc(83);
|
|
|
|
int* f = axl_malloc(sizeof(int));
|
|
*f = 4;
|
|
*(int*)(fds) = 4;
|
|
(void)axl_memcmp(f, fds, 4);
|
|
axl_free(fds);
|
|
axl_free(f);
|
|
|
|
(void)fds;
|
|
(void)f;
|
|
|
|
|
|
u32 new_len = 0;
|
|
u8 src[] = "Bonjour le monde!";
|
|
u32 src_len = axl_strlen((i8*)src);
|
|
for(u32 i = 0; i < src_len; i += 4)
|
|
{
|
|
u8 buff[AXL_VLQ_MAX_LEN + 1];
|
|
|
|
u32 encoded_l = axl_vlq_encode(*((u32*)(src + i)), buff);
|
|
new_len += encoded_l;
|
|
|
|
buff[encoded_l] = '\0';
|
|
|
|
axl_puts((i8*)buff);
|
|
}
|
|
(void)new_len;
|
|
|
|
|
|
return 0;
|
|
}
|