MCPcopy Create free account
hub / github.com/HelenOS/helenos / vsnprintf

Function vsnprintf

kernel/generic/src/printf/vsnprintf.c:170–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170int vsnprintf(char *str, size_t size, const char *fmt, va_list ap)
171{
172 vsnprintf_data_t data = {
173 size,
174 0,
175 str
176 };
177 printf_spec_t ps = {
178 (int (*) (const char *, size_t, void *)) vsnprintf_str_write,
179 (int (*) (const char32_t *, size_t, void *)) vsnprintf_wstr_write,
180 &data
181 };
182
183 /* Print 0 at end of string - fix the case that nothing will be printed */
184 if (size > 0)
185 str[0] = 0;
186
187 /* vsnprintf_write ensures that str will be terminated by zero. */
188 return printf_core(fmt, &ps, ap);
189}
190
191/** @}
192 */

Callers 1

snprintfFunction · 0.70

Calls 1

printf_coreFunction · 0.70

Tested by

no test coverage detected