diff options
author | Eric Anholt <anholt@freebsd.org> | 2004-06-16 09:25:21 +0000 |
---|---|---|
committer | Eric Anholt <anholt@freebsd.org> | 2004-06-16 09:25:21 +0000 |
commit | 2e1868b560315a8b20d688e646c489a5ad93eeae (patch) | |
tree | ebe22dc92bc971e96deebba2b95ef690289f0292 /GL/glx/single2swap.c | |
parent | f45c46c630855e8e0d1c28b1f0d3b2ad54334619 (diff) |
DRI trunk-20040613 import
Diffstat (limited to 'GL/glx/single2swap.c')
-rw-r--r-- | GL/glx/single2swap.c | 53 |
1 files changed, 1 insertions, 52 deletions
diff --git a/GL/glx/single2swap.c b/GL/glx/single2swap.c index 96db415f9..c8c496871 100644 --- a/GL/glx/single2swap.c +++ b/GL/glx/single2swap.c @@ -262,58 +262,7 @@ int __glXDispSwap_Finish(__GLXclientState *cl, GLbyte *pc) int __glXDispSwap_GetString(__GLXclientState *cl, GLbyte *pc) { - ClientPtr client; - __GLXcontext *cx; - GLenum name; - const char *string; - __GLX_DECLARE_SWAP_VARIABLES; - int error; - char *buf = NULL, *buf1 = NULL; - GLint length = 0; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 0); - name = *(GLenum *)(pc + 0); - string = (const char *)glGetString(name); - client = cl->client; - - /* - ** Restrict extensions to those that are supported by both the - ** implementation and the connection. That is, return the - ** intersection of client, server, and core extension strings. - */ - if (name == GL_EXTENSIONS) { - buf1 = __glXcombine_strings(string, - cl->GLClientextensions); - buf = __glXcombine_strings(buf1, - cx->pGlxScreen->GLextensions); - if (buf1 != NULL) { - __glXFree(buf1); - } - string = buf; - } - if (string) { - length = __glXStrlen((const char *) string) + 1; - } - - __GLX_BEGIN_REPLY(length); - __GLX_PUT_SIZE(length); - - __GLX_SWAP_REPLY_SIZE(); - __GLX_SWAP_REPLY_HEADER(); - __GLX_SEND_HEADER(); - WriteToClient(client, length, (char *) string); - if (buf != NULL) { - __glXFree(buf); - } - - return Success; + return DoGetString(cl, pc, GL_TRUE); } int __glXDispSwap_GetClipPlane(__GLXclientState *cl, GLbyte *pc) |