(FEA) Now Compound is featured with indexer displaying while printing.
This commit is contained in:
26
Var/test.c
Normal file
26
Var/test.c
Normal 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;
|
||||
}
|
Reference in New Issue
Block a user