aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/errors.c
diff options
context:
space:
mode:
authorDylan Baker <[email protected]>2019-12-09 10:54:16 -0800
committerDylan Baker <[email protected]>2020-04-21 11:09:03 -0700
commitbf188f3494b85f550a39dddbf059669c2a9ee324 (patch)
treeced53e90730a93cef0200b2b974d25ba09a604b5 /src/mesa/main/errors.c
parentc495c3af26b73cb1d444fdd67cc6c1f0226bd168 (diff)
mesa|mapi: replace _mesa_[v]snprintf with [v]snprintf
MSVC 2015 and newer has perfectly valid snprintf and vsnprintf implementations, let's just use those. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
Diffstat (limited to 'src/mesa/main/errors.c')
-rw-r--r--src/mesa/main/errors.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c
index 7c8cb3886d9..b3487efb522 100644
--- a/src/mesa/main/errors.c
+++ b/src/mesa/main/errors.c
@@ -86,7 +86,7 @@ output_if_debug(const char *prefixString, const char *outputString,
* visible, so communicate with the debugger instead */
{
char buf[4096];
- _mesa_snprintf(buf, sizeof(buf), "%s: %s%s", prefixString, outputString, newline ? "\n" : "");
+ snprintf(buf, sizeof(buf), "%s: %s%s", prefixString, outputString, newline ? "\n" : "");
OutputDebugStringA(buf);
}
#endif
@@ -116,7 +116,7 @@ flush_delayed_errors( struct gl_context *ctx )
char s[MAX_DEBUG_MESSAGE_LENGTH];
if (ctx->ErrorDebugCount) {
- _mesa_snprintf(s, MAX_DEBUG_MESSAGE_LENGTH, "%d similar %s errors",
+ snprintf(s, MAX_DEBUG_MESSAGE_LENGTH, "%d similar %s errors",
ctx->ErrorDebugCount,
_mesa_enum_to_string(ctx->ErrorValue));
@@ -140,7 +140,7 @@ _mesa_warning( struct gl_context *ctx, const char *fmtString, ... )
char str[MAX_DEBUG_MESSAGE_LENGTH];
va_list args;
va_start( args, fmtString );
- (void) _mesa_vsnprintf( str, MAX_DEBUG_MESSAGE_LENGTH, fmtString, args );
+ (void) vsnprintf( str, MAX_DEBUG_MESSAGE_LENGTH, fmtString, args );
va_end( args );
if (ctx)
@@ -170,7 +170,7 @@ _mesa_problem( const struct gl_context *ctx, const char *fmtString, ... )
numCalls++;
va_start( args, fmtString );
- _mesa_vsnprintf( str, MAX_DEBUG_MESSAGE_LENGTH, fmtString, args );
+ vsnprintf( str, MAX_DEBUG_MESSAGE_LENGTH, fmtString, args );
va_end( args );
fprintf(stderr, "Mesa " PACKAGE_VERSION " implementation error: %s\n",
str);
@@ -230,7 +230,7 @@ _mesa_gl_vdebugf(struct gl_context *ctx,
_mesa_debug_get_id(id);
- len = _mesa_vsnprintf(s, MAX_DEBUG_MESSAGE_LENGTH, fmtString, args);
+ len = vsnprintf(s, MAX_DEBUG_MESSAGE_LENGTH, fmtString, args);
if (len >= MAX_DEBUG_MESSAGE_LENGTH)
/* message was truncated */
len = MAX_DEBUG_MESSAGE_LENGTH - 1;
@@ -325,7 +325,7 @@ _mesa_error( struct gl_context *ctx, GLenum error, const char *fmtString, ... )
va_list args;
va_start(args, fmtString);
- len = _mesa_vsnprintf(s, MAX_DEBUG_MESSAGE_LENGTH, fmtString, args);
+ len = vsnprintf(s, MAX_DEBUG_MESSAGE_LENGTH, fmtString, args);
va_end(args);
if (len >= MAX_DEBUG_MESSAGE_LENGTH) {
@@ -336,7 +336,7 @@ _mesa_error( struct gl_context *ctx, GLenum error, const char *fmtString, ... )
return;
}
- len = _mesa_snprintf(s2, MAX_DEBUG_MESSAGE_LENGTH, "%s in %s",
+ len = snprintf(s2, MAX_DEBUG_MESSAGE_LENGTH, "%s in %s",
_mesa_enum_to_string(error), s);
if (len >= MAX_DEBUG_MESSAGE_LENGTH) {
/* Same as above. */
@@ -382,7 +382,7 @@ _mesa_debug( const struct gl_context *ctx, const char *fmtString, ... )
char s[MAX_DEBUG_MESSAGE_LENGTH];
va_list args;
va_start(args, fmtString);
- _mesa_vsnprintf(s, MAX_DEBUG_MESSAGE_LENGTH, fmtString, args);
+ vsnprintf(s, MAX_DEBUG_MESSAGE_LENGTH, fmtString, args);
va_end(args);
output_if_debug("Mesa", s, GL_FALSE);
#endif /* DEBUG */
@@ -397,7 +397,7 @@ _mesa_log(const char *fmtString, ...)
char s[MAX_DEBUG_MESSAGE_LENGTH];
va_list args;
va_start(args, fmtString);
- _mesa_vsnprintf(s, MAX_DEBUG_MESSAGE_LENGTH, fmtString, args);
+ vsnprintf(s, MAX_DEBUG_MESSAGE_LENGTH, fmtString, args);
va_end(args);
output_if_debug("", s, GL_FALSE);
}