MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / PrintWide

Function PrintWide

test/core/test_wprintf.cpp:14–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12#define MAX_CHARS_BIG 8096
13
14void PrintWide ( const wchar_t * format, ... )
15{
16 wchar_t buffer[MAX_CHARS_SMALL];
17 memset(buffer, 0, MAX_CHARS_SMALL);
18 va_list args;
19 va_start ( args, format );
20 wprintf(L"format starts with 0x%x\n", *(int*)format);
21 wprintf(L"fmt continues with 0x%x\n", *(((int*)format) + 1));
22 wprintf(L"fmt continues with 0x%x\n", *(((int*)format) + 2));
23 int r = vswprintf ( buffer, MAX_CHARS_SMALL-1, format, args );
24 wprintf(L"vswprintf told us %d\n", r);
25 wprintf(L"vswoutput st-rts with 0x%x\n", *(int*)buffer);
26 wprintf(L"vsw continues with 0x%x\n", *(((int*)buffer) + 1));
27 wprintf(L"vsw continues with 0x%x\n", *(((int*)buffer) + 2));
28 wprintf(buffer);
29 va_end ( args );
30}
31
32void PrintBigWide ( const wchar_t * format, ... )
33{

Callers 1

mainFunction · 0.85

Calls 3

memsetFunction · 0.85
wprintfFunction · 0.85
vswprintfFunction · 0.85

Tested by

no test coverage detected