unsigned len;
va_list ap;
va_start(ap, format);
- len = util_vsnprintf(buf, sizeof(buf), format, ap);
+ len = vsnprintf(buf, sizeof(buf), format, ap);
va_end(ap);
trace_dump_write(buf, len);
}
char name[32];
va_list ap;
va_start(ap, format);
- util_vsnprintf(name, sizeof name, format, ap);
+ vsnprintf(name, sizeof name, format, ap);
va_end(ap);
LLVMSetValueName(val, name);
#else
va_list ap;
va_start(ap, str);
- util_vsnprintf(buf, sizeof(buf), str, ap);
+ vsnprintf(buf, sizeof(buf), str, ap);
va_end(ap);
if (!*s)
int written;
va_list ap;
va_start(ap, format);
- written = util_vsnprintf(sctx->ptr, sctx->left, format, ap);
+ written = vsnprintf(sctx->ptr, sctx->left, format, ap);
va_end(ap);
/* Some complicated logic needed to handle the return value of
unsigned len;
va_list ap;
va_start(ap, format);
- len = util_vsnprintf(buf, sizeof(buf), format, ap);
+ len = vsnprintf(buf, sizeof(buf), format, ap);
va_end(ap);
fwrite(buf, len, 1, stream);
}
va_list ap;
va_start(ap, name);
- util_vsnprintf(buf, sizeof(buf), name, ap);
+ vsnprintf(buf, sizeof(buf), name, ap);
va_end(ap);
printf("Test(%s) = %s\n", buf,
debug_printf("i915_program_error: ");
va_start( args, msg );
- util_vsnprintf( buffer, sizeof(buffer), msg, args );
+ vsnprintf( buffer, sizeof(buffer), msg, args );
va_end( args );
debug_printf("%s", buffer);
debug_printf("\n");
va_copy(arg_copy, args);
uint32_t space_left = str->capacity - str->length;
- int32_t len = util_vsnprintf(str->buf + str->length,
+ int32_t len = vsnprintf(str->buf + str->length,
space_left, format, arg_copy);
va_end(arg_copy);
#if defined(PIPE_OS_WINDOWS) || defined(PIPE_SUBSYSTEM_EMBEDDED)
/* We buffer until we find a newline. */
size_t len = strlen(buf);
- int ret = util_vsnprintf(buf + len, sizeof(buf) - len, format, ap);
+ int ret = vsnprintf(buf + len, sizeof(buf) - len, format, ap);
if (ret > (int)(sizeof(buf) - len - 1) || strchr(buf + len, '\n')) {
os_log_message(buf);
buf[0] = '\0';
}
#else
- util_vsnprintf(buf, sizeof(buf), format, ap);
+ vsnprintf(buf, sizeof(buf), format, ap);
os_log_message(buf);
#endif
}
#ifdef _WIN32
+#define vsnprintf util_vsnprintf
static inline int
util_vsnprintf(char *str, size_t size, const char *format, va_list ap)
{
va_list ap;
int ret;
va_start(ap, format);
- ret = util_vsnprintf(str, size, format, ap);
+ ret = vsnprintf(str, size, format, ap);
va_end(ap);
return ret;
}
{
va_list ap;
va_start(ap, format);
- util_vsnprintf(str, (size_t)-1, format, ap);
+ vsnprintf(str, (size_t)-1, format, ap);
va_end(ap);
}
/* Compute length of output string first */
va_copy(ap_copy, ap);
- int r = util_vsnprintf(NULL, 0, format, ap_copy);
+ int r = vsnprintf(NULL, 0, format, ap_copy);
va_end(ap_copy);
if (r < 0)
return -1;
/* Print to buffer */
- return util_vsnprintf(*ret, r + 1, format, ap);
+ return vsnprintf(*ret, r + 1, format, ap);
}
#define strncat util_strncat
#define strcasecmp stricmp
#define strdup _strdup
-#else
-
-#define util_vsnprintf vsnprintf
-
#endif