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

Function vary

test/core/test_varargs.c:11–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9#include <stdarg.h>
10
11void vary(const char *s, ...) {
12 va_list v;
13 va_start(v, s);
14 char d[20];
15 vsnprintf(d, 20, s, v);
16 puts(d);
17
18 // Try it with copying
19 va_list tempva;
20 va_copy(tempva, v);
21 vsnprintf(d, 20, s, tempva);
22 puts(d);
23
24 va_end(v);
25}
26
27void vary2(char color, const char *s, ...) {
28 va_list v;

Callers 1

mainFunction · 0.70

Calls 2

vsnprintfFunction · 0.85
putsFunction · 0.85

Tested by

no test coverage detected