(FEA) Now Compound is featured with indexer displaying while printing.

This commit is contained in:
2024-06-25 12:27:21 +08:00
parent bcbec01992
commit acad934238
7 changed files with 647 additions and 6 deletions

BIN
Var/VarTest Executable file

Binary file not shown.

26
Var/test.c Normal file
View File

@@ -0,0 +1,26 @@
#include <Compound/var.h>
int main(void)
{
Var v1 = {
.addr = malloc(sizeof(int)),
.sz = sizeof(int)
};
Var v2 = (Var){v1.addr, v1.sz};
wchar_t wbuff[UINT8_MAX + 1] = {};
wchar_t *wp = wbuff;
(void)var_literalise(v1, &wp);
(void)wprintf(L"%ls\n", wp);
(void)var_literalise(v2, &wp);
(void)wprintf(L"%ls\n", wp);
free(v1.addr);
return 0;
}