summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/enable.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2002-06-29 19:48:15 +0000
committerBrian Paul <[email protected]>2002-06-29 19:48:15 +0000
commit4e9676fb13f60ecdbc247b120031f18cd3febcb0 (patch)
tree9f310d4b547592b025b5a7063aaf2b629bef6676 /src/mesa/main/enable.c
parentf1ad551604122dd2679dbd31ae6b2fa1197e9848 (diff)
Applied Matt Sealey's patch to remove/isolate all stdio.h function calls.
Instead of mstdio.[ch], use imports.[ch] to isolate these functions.
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r--src/mesa/main/enable.c32
1 files changed, 10 insertions, 22 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index aef516690ae..140358b463a 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -1,4 +1,4 @@
-/* $Id: enable.c,v 1.67 2002/06/18 16:53:46 brianp Exp $ */
+/* $Id: enable.c,v 1.68 2002/06/29 19:48:15 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -44,9 +44,8 @@
#define CHECK_EXTENSION(EXTNAME, CAP) \
if (!ctx->Extensions.EXTNAME) { \
- char s[100]; \
- sprintf(s, "gl%sClientState(0x%x)", state ? "Enable" : "Disable", CAP);\
- _mesa_error(ctx, GL_INVALID_ENUM, s); \
+ _mesa_error(ctx, GL_INVALID_ENUM, "gl%sClientState(0x%x)", \
+ state ? "Enable" : "Disable", CAP); \
return; \
}
@@ -117,11 +116,8 @@ client_state( GLcontext *ctx, GLenum cap, GLboolean state )
}
break;
default:
- {
- char s[100];
- sprintf(s, "glEnable/DisableClientState(0x%x)", cap);
- _mesa_error( ctx, GL_INVALID_ENUM, s);
- }
+ _mesa_error( ctx, GL_INVALID_ENUM,
+ "glEnable/DisableClientState(0x%x)", cap);
return;
}
@@ -166,9 +162,8 @@ _mesa_DisableClientState( GLenum cap )
#undef CHECK_EXTENSION
#define CHECK_EXTENSION(EXTNAME, CAP) \
if (!ctx->Extensions.EXTNAME) { \
- char s[100]; \
- sprintf(s, "gl%s(0x%x)", state ? "Enable" : "Disable", CAP); \
- _mesa_error(ctx, GL_INVALID_ENUM, s); \
+ _mesa_error(ctx, GL_INVALID_ENUM, "gl%s(0x%x)", \
+ state ? "Enable" : "Disable", CAP); \
return; \
}
@@ -895,11 +890,8 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
break;
default:
- {
- char s[100];
- sprintf(s, "%s(0x%x)", state ? "glEnable" : "glDisable", cap);
- _mesa_error(ctx, GL_INVALID_ENUM, s);
- }
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "%s(0x%x)", state ? "glEnable" : "glDisable", cap);
return;
}
@@ -1272,11 +1264,7 @@ _mesa_IsEnabled( GLenum cap )
}
default:
- {
- char s[100];
- sprintf(s, "glIsEnabled(0x%x)", (int) cap);
- _mesa_error( ctx, GL_INVALID_ENUM, s );
- }
+ _mesa_error(ctx, GL_INVALID_ENUM, "glIsEnabled(0x%x)", (int) cap);
return GL_FALSE;
}
}