diff options
170 files changed, 8249 insertions, 19613 deletions
diff --git a/GL/glx/.gitignore b/GL/glx/.gitignore index 5cf6f0a44..c49b54d43 100644 --- a/GL/glx/.gitignore +++ b/GL/glx/.gitignore @@ -1,5 +1,13 @@ -indirect_size.h +glapi.c glcontextmodes.c glcontextmodes.h -glapi.c glthread.c +indirect_dispatch.c +indirect_dispatch.h +indirect_dispatch_swap.c +indirect_reqsize.c +indirect_reqsize.h +indirect_size.h +indirect_size_get.c +indirect_size_get.h +indirect_table.c diff --git a/GL/glx/Makefile.am b/GL/glx/Makefile.am index 4cf56e89d..377d76019 100644 --- a/GL/glx/Makefile.am +++ b/GL/glx/Makefile.am @@ -25,6 +25,7 @@ INCLUDES = \ -I$(top_srcdir)/hw/xfree86/os-support/bus \ -I$(top_srcdir)/hw/xfree86/common \ -I$(top_srcdir)/hw/xfree86/dri \ + -I$(top_srcdir)/hw/xfree86/dri2 \ -I$(top_srcdir)/mi @@ -32,10 +33,19 @@ nodist_libglx_la_SOURCES = indirect_size.h \ glapi.c \ glcontextmodes.c \ glcontextmode.h \ - glthread.c + glthread.c \ + indirect_dispatch.c \ + indirect_dispatch.h \ + indirect_dispatch_swap.c \ + indirect_reqsize.c \ + indirect_reqsize.h \ + indirect_size_get.c \ + indirect_size_get.h \ + indirect_table.c libglxdri_la_SOURCES = \ glxdri.c \ + glxdri2.c \ extension_string.c \ extension_string.h @@ -54,15 +64,7 @@ libglx_la_SOURCES = \ glxserver.h \ glxutil.c \ glxutil.h \ - indirect_dispatch.c \ - indirect_dispatch.h \ - indirect_dispatch_swap.c \ indirect_program.c \ - indirect_reqsize.c \ - indirect_reqsize.h \ - indirect_size_get.c \ - indirect_size_get.h \ - indirect_table.c \ indirect_table.h \ indirect_texture_compression.c \ indirect_util.c \ diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c index 6c1a199f7..f9b28e427 100644 --- a/GL/glx/glxdri.c +++ b/GL/glx/glxdri.c @@ -180,11 +180,54 @@ __glXDRIenterServer(GLboolean rendering) DRIWakeupHandler(NULL, 0, NULL); } + +static void +__glXDRIdoReleaseTexImage(__GLXDRIscreen *screen, __GLXDRIdrawable *drawable) +{ + GLuint lastOverride = screen->lastTexOffsetOverride; + + if (lastOverride) { + __GLXDRIdrawable **texOffsetOverride = screen->texOffsetOverride; + int i; + + for (i = 0; i < lastOverride; i++) { + if (texOffsetOverride[i] == drawable) { + + texOffsetOverride[i] = NULL; + + if (i + 1 == lastOverride) { + lastOverride = 0; + + while (i--) { + if (texOffsetOverride[i]) { + lastOverride = i + 1; + break; + } + } + + screen->lastTexOffsetOverride = lastOverride; + + break; + } + } + } + } +} + + static void __glXDRIdrawableDestroy(__GLXdrawable *drawable) { __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable; + int i; + + for (i = 0; i < screenInfo.numScreens; i++) { + __glXDRIdoReleaseTexImage((__GLXDRIscreen *) + glxGetScreen(screenInfo.screens[i]), + private); + } + (*private->driDrawable.destroyDrawable)(&private->driDrawable); /* If the X window was destroyed, the dri DestroyWindow hook will @@ -525,41 +568,9 @@ __glXDRIreleaseTexImage(__GLXcontext *baseContext, int buffer, __GLXdrawable *pixmap) { - ScreenPtr pScreen = pixmap->pDraw->pScreen; - __GLXDRIdrawable *driDraw = - containerOf(pixmap, __GLXDRIdrawable, base); - __GLXDRIscreen * const screen = - (__GLXDRIscreen *) glxGetScreen(pScreen); - GLuint lastOverride = screen->lastTexOffsetOverride; - - if (lastOverride) { - __GLXDRIdrawable **texOffsetOverride = screen->texOffsetOverride; - int i; - - for (i = 0; i < lastOverride; i++) { - if (texOffsetOverride[i] == driDraw) { - if (screen->texOffsetFinish) - screen->texOffsetFinish((PixmapPtr)pixmap->pDraw); - - texOffsetOverride[i] = NULL; - - if (i + 1 == lastOverride) { - lastOverride = 0; - - while (i--) { - if (texOffsetOverride[i]) { - lastOverride = i + 1; - break; - } - } - - screen->lastTexOffsetOverride = lastOverride; - - break; - } - } - } - } + __glXDRIdoReleaseTexImage((__GLXDRIscreen *) + glxGetScreen(pixmap->pDraw->pScreen), + containerOf(pixmap, __GLXDRIdrawable, base)); return Success; } @@ -603,6 +614,9 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen, else driShare = NULL; + if (baseShareContext && baseShareContext->isDirect) + return NULL; + context = xalloc(sizeof *context); if (context == NULL) return NULL; @@ -638,6 +652,14 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen, hwContext, &context->driContext); + if (context->driContext.private == NULL) { + __glXenterServer(GL_FALSE); + retval = DRIDestroyContext(baseScreen->pScreen, context->hwContextID); + __glXleaveServer(GL_FALSE); + xfree(context); + return NULL; + } + return &context->base; } @@ -684,6 +706,14 @@ __glXDRIscreenCreateDrawable(__GLXscreen *screen, &private->driDrawable, hwDrawable, 0, NULL); + if (private->driDrawable.private == NULL) { + __glXenterServer(GL_FALSE); + DRIDestroyDrawable(screen->pScreen, serverClient, pDraw); + __glXleaveServer(GL_FALSE); + xfree(private); + return NULL; + } + return &private->base; } @@ -787,10 +817,14 @@ static void __glXReportDamage(__DRIdrawable *driDraw, DrawablePtr pDraw = drawable->base.pDraw; RegionRec region; + __glXenterServer(GL_FALSE); + REGION_INIT(pDraw->pScreen, ®ion, (BoxPtr) rects, num_rects); REGION_TRANSLATE(pScreen, ®ion, pDraw->x, pDraw->y); DamageDamageRegion(pDraw, ®ion); REGION_UNINIT(pDraw->pScreen, ®ion); + + __glXleaveServer(GL_FALSE); } /* Table of functions that we export to the driver. */ diff --git a/GL/glx/glxdri2.c b/GL/glx/glxdri2.c new file mode 100644 index 000000000..d1c8d417e --- /dev/null +++ b/GL/glx/glxdri2.c @@ -0,0 +1,633 @@ +/* + * Copyright © 2007 Red Hat, Inc + * + * Permission to use, copy, modify, distribute, and sell this software + * and its documentation for any purpose is hereby granted without + * fee, provided that the above copyright notice appear in all copies + * and that both that copyright notice and this permission notice + * appear in supporting documentation, and that the name of Red Hat, + * Inc not be used in advertising or publicity pertaining to + * distribution of the software without specific, written prior + * permission. Red Hat, Inc makes no representations about the + * suitability of this software for any purpose. It is provided "as + * is" without express or implied warranty. + * + * RED HAT, INC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN + * NO EVENT SHALL RED HAT, INC BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS + * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, + * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <stdint.h> +#include <stdio.h> +#include <string.h> +#include <errno.h> +#include <sys/time.h> +#include <dlfcn.h> + +#include <drm.h> +#include <GL/gl.h> +#include <GL/internal/dri_interface.h> + +#include <windowstr.h> +#include <os.h> + +#define _XF86DRI_SERVER_ +#include <xf86drm.h> +#include <xf86dristr.h> +#include <xf86str.h> +#include <xf86.h> +#include <dri2.h> + +#include "glxserver.h" +#include "glxutil.h" +#include "glcontextmodes.h" + +#include "g_disptab.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" +#include "extension_string.h" + +#define containerOf(ptr, type, member) \ + (type *)( (char *)ptr - offsetof(type,member) ) + +typedef struct __GLXDRIscreen __GLXDRIscreen; +typedef struct __GLXDRIcontext __GLXDRIcontext; +typedef struct __GLXDRIdrawable __GLXDRIdrawable; + +struct __GLXDRIscreen { + __GLXscreen base; + __DRIscreen driScreen; + void *driver; + int fd; + + xf86EnterVTProc *enterVT; + xf86LeaveVTProc *leaveVT; + + __DRIcopySubBufferExtension *copySubBuffer; + __DRIswapControlExtension *swapControl; + __DRItexBufferExtension *texBuffer; + + unsigned char glx_enable_bits[__GLX_EXT_BYTES]; +}; + +struct __GLXDRIcontext { + __GLXcontext base; + __DRIcontext driContext; + drm_context_t hwContext; +}; + +struct __GLXDRIdrawable { + __GLXdrawable base; + __DRIdrawable driDrawable; +}; + +static const char CREATE_NEW_SCREEN_FUNC[] = __DRI2_CREATE_NEW_SCREEN_STRING; + +static void +__glXDRIdrawableDestroy(__GLXdrawable *drawable) +{ + __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable; + + (*private->driDrawable.destroyDrawable)(&private->driDrawable); + + /* If the X window was destroyed, the dri DestroyWindow hook will + * aready have taken care of this, so only call if pDraw isn't NULL. */ + if (drawable->pDraw != NULL) + DRI2DestroyDrawable(drawable->pDraw->pScreen, drawable->pDraw); + + xfree(private); +} + +static GLboolean +__glXDRIdrawableResize(__GLXdrawable *glxPriv) +{ + /* Nothing to do here, the DRI driver asks the server for drawable + * geometry when it sess the SAREA timestamps change.*/ + + return GL_TRUE; +} + +static GLboolean +__glXDRIdrawableSwapBuffers(__GLXdrawable *basePrivate) +{ + __GLXDRIdrawable *private = (__GLXDRIdrawable *) basePrivate; + + (*private->driDrawable.swapBuffers)(&private->driDrawable); + + return TRUE; +} + + +static int +__glXDRIdrawableSwapInterval(__GLXdrawable *baseDrawable, int interval) +{ + __GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseDrawable; + __GLXDRIscreen *screen = (__GLXDRIscreen *) + glxGetScreen(baseDrawable->pDraw->pScreen); + + if (screen->swapControl) + screen->swapControl->setSwapInterval(&draw->driDrawable, interval); + + return 0; +} + + +static void +__glXDRIdrawableCopySubBuffer(__GLXdrawable *basePrivate, + int x, int y, int w, int h) +{ + __GLXDRIdrawable *private = (__GLXDRIdrawable *) basePrivate; + __GLXDRIscreen *screen = (__GLXDRIscreen *) + glxGetScreen(basePrivate->pDraw->pScreen); + + if (screen->copySubBuffer) + screen->copySubBuffer->copySubBuffer(&private->driDrawable, + x, y, w, h); +} + +static void +__glXDRIcontextDestroy(__GLXcontext *baseContext) +{ + __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; + __GLXDRIscreen *screen = (__GLXDRIscreen *) baseContext->pGlxScreen; + + context->driContext.destroyContext(&context->driContext); + drmDestroyContext(screen->fd, context->hwContext); + __glXContextDestroy(&context->base); + xfree(context); +} + +static int +__glXDRIcontextMakeCurrent(__GLXcontext *baseContext) +{ + __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; + __GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseContext->drawPriv; + __GLXDRIdrawable *read = (__GLXDRIdrawable *) baseContext->readPriv; + + return (*context->driContext.bindContext)(&context->driContext, + &draw->driDrawable, + &read->driDrawable); +} + +static int +__glXDRIcontextLoseCurrent(__GLXcontext *baseContext) +{ + __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; + + return (*context->driContext.unbindContext)(&context->driContext); +} + +static int +__glXDRIcontextCopy(__GLXcontext *baseDst, __GLXcontext *baseSrc, + unsigned long mask) +{ + __GLXDRIcontext *dst = (__GLXDRIcontext *) baseDst; + __GLXDRIcontext *src = (__GLXDRIcontext *) baseSrc; + + /* FIXME: We will need to add DRIcontext::copyContext for this. */ + + (void) dst; + (void) src; + + return FALSE; +} + +static int +__glXDRIcontextForceCurrent(__GLXcontext *baseContext) +{ + __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; + __GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseContext->drawPriv; + __GLXDRIdrawable *read = (__GLXDRIdrawable *) baseContext->readPriv; + + return (*context->driContext.bindContext)(&context->driContext, + &draw->driDrawable, + &read->driDrawable); +} + +#ifdef __DRI_TEX_BUFFER + +#define isPowerOfTwo(n) (((n) & ((n) - 1 )) == 0) + +static int +__glXDRIbindTexImage(__GLXcontext *baseContext, + int buffer, + __GLXdrawable *glxPixmap) +{ + ScreenPtr pScreen = glxPixmap->pDraw->pScreen; + __GLXDRIscreen * const screen = (__GLXDRIscreen *) glxGetScreen(pScreen); + PixmapPtr pixmap; + __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; + unsigned int flags; + int w, h, target; + + if (screen->texBuffer == NULL) + return Success; + + pixmap = (PixmapPtr) glxPixmap->pDraw; + w = pixmap->drawable.width; + h = pixmap->drawable.height; + + if (!isPowerOfTwo(w) || !isPowerOfTwo(h)) + target = GL_TEXTURE_RECTANGLE_ARB; + else + target = GL_TEXTURE_2D; + + screen->texBuffer->setTexBuffer(&context->driContext, + target, + DRI2GetPixmapHandle(pixmap, &flags), + pixmap->drawable.depth, + pixmap->devKind, + h); + + return Success; +} + +static int +__glXDRIreleaseTexImage(__GLXcontext *baseContext, + int buffer, + __GLXdrawable *pixmap) +{ + /* FIXME: Just unbind the texture? */ + return Success; +} + +#else + +static int +__glXDRIbindTexImage(__GLXcontext *baseContext, + int buffer, + __GLXdrawable *glxPixmap) +{ + return Success; +} + +static int +__glXDRIreleaseTexImage(__GLXcontext *baseContext, + int buffer, + __GLXdrawable *pixmap) +{ + return Success; +} + +#endif + +static __GLXtextureFromPixmap __glXDRItextureFromPixmap = { + __glXDRIbindTexImage, + __glXDRIreleaseTexImage +}; + +static void +__glXDRIscreenDestroy(__GLXscreen *baseScreen) +{ + __GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen; + + screen->driScreen.destroyScreen(&screen->driScreen); + + dlclose(screen->driver); + + __glXScreenDestroy(baseScreen); + + xfree(screen); +} + +static __GLXcontext * +__glXDRIscreenCreateContext(__GLXscreen *baseScreen, + __GLcontextModes *modes, + __GLXcontext *baseShareContext) +{ + __GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen; + __GLXDRIcontext *context, *shareContext; + __DRIcontext *driShare; + + shareContext = (__GLXDRIcontext *) baseShareContext; + if (shareContext) + driShare = &shareContext->driContext; + else + driShare = NULL; + + context = xalloc(sizeof *context); + if (context == NULL) + return NULL; + + memset(context, 0, sizeof *context); + context->base.destroy = __glXDRIcontextDestroy; + context->base.makeCurrent = __glXDRIcontextMakeCurrent; + context->base.loseCurrent = __glXDRIcontextLoseCurrent; + context->base.copy = __glXDRIcontextCopy; + context->base.forceCurrent = __glXDRIcontextForceCurrent; + context->base.textureFromPixmap = &__glXDRItextureFromPixmap; + + if (drmCreateContext(screen->fd, &context->hwContext)) + return GL_FALSE; + + context->driContext.private = + screen->driScreen.createNewContext(&screen->driScreen, + modes, + 0, /* render type */ + driShare, + context->hwContext, + &context->driContext); + + return &context->base; +} + +static __GLXdrawable * +__glXDRIscreenCreateDrawable(__GLXscreen *screen, + DrawablePtr pDraw, + int type, + XID drawId, + __GLcontextModes *modes) +{ + __GLXDRIscreen *driScreen = (__GLXDRIscreen *) screen; + __GLXDRIdrawable *private; + GLboolean retval; + drm_drawable_t hwDrawable; + + private = xalloc(sizeof *private); + if (private == NULL) + return NULL; + + memset(private, 0, sizeof *private); + + if (!__glXDrawableInit(&private->base, screen, + pDraw, type, drawId, modes)) { + xfree(private); + return NULL; + } + + private->base.destroy = __glXDRIdrawableDestroy; + private->base.resize = __glXDRIdrawableResize; + private->base.swapBuffers = __glXDRIdrawableSwapBuffers; + private->base.copySubBuffer = __glXDRIdrawableCopySubBuffer; + + retval = DRI2CreateDrawable(screen->pScreen, pDraw, &hwDrawable); + + private->driDrawable.private = + (driScreen->driScreen.createNewDrawable)(&driScreen->driScreen, + modes, + &private->driDrawable, + hwDrawable, 0, NULL); + + return &private->base; +} + +static int +getUST(int64_t *ust) +{ + struct timeval tv; + + if (ust == NULL) + return -EFAULT; + + if (gettimeofday(&tv, NULL) == 0) { + ust[0] = (tv.tv_sec * 1000000) + tv.tv_usec; + return 0; + } else { + return -errno; + } +} + +static void __glXReportDamage(__DRIdrawable *driDraw, + int x, int y, + drm_clip_rect_t *rects, int num_rects, + GLboolean front_buffer) +{ + __GLXDRIdrawable *drawable = + containerOf(driDraw, __GLXDRIdrawable, driDrawable); + DrawablePtr pDraw = drawable->base.pDraw; + RegionRec region; + + REGION_INIT(pDraw->pScreen, ®ion, (BoxPtr) rects, num_rects); + REGION_TRANSLATE(pScreen, ®ion, pDraw->x, pDraw->y); + DamageDamageRegion(pDraw, ®ion); + REGION_UNINIT(pDraw->pScreen, ®ion); +} + +/* Table of functions that we export to the driver. */ +static const __DRIinterfaceMethods interface_methods = { + _gl_context_modes_create, + _gl_context_modes_destroy, + + NULL, + + getUST, + NULL, + + __glXReportDamage, +}; + +static const char dri_driver_path[] = DRI_DRIVER_PATH; + +static Bool +glxDRIEnterVT (int index, int flags) +{ + __GLXDRIscreen *screen = (__GLXDRIscreen *) + glxGetScreen(screenInfo.screens[index]); + + LogMessage(X_INFO, "AIGLX: Resuming AIGLX clients after VT switch\n"); + + if (!(*screen->enterVT) (index, flags)) + return FALSE; + + glxResumeClients(); + + return TRUE; +} + +static void +glxDRILeaveVT (int index, int flags) +{ + __GLXDRIscreen *screen = (__GLXDRIscreen *) + glxGetScreen(screenInfo.screens[index]); + + LogMessage(X_INFO, "AIGLX: Suspending AIGLX clients for VT switch\n"); + + glxSuspendClients(); + + return (*screen->leaveVT) (index, flags); +} + +static void +initializeExtensions(__GLXDRIscreen *screen) +{ + const __DRIextension **extensions; + int i; + + extensions = screen->driScreen.getExtensions(&screen->driScreen); + for (i = 0; extensions[i]; i++) { +#ifdef __DRI_COPY_SUB_BUFFER + if (strcmp(extensions[i]->name, __DRI_COPY_SUB_BUFFER) == 0) { + screen->copySubBuffer = (__DRIcopySubBufferExtension *) extensions[i]; + __glXEnableExtension(screen->glx_enable_bits, + "GLX_MESA_copy_sub_buffer"); + + LogMessage(X_INFO, "AIGLX: enabled GLX_MESA_copy_sub_buffer\n"); + } +#endif + +#ifdef __DRI_SWAP_CONTROL + if (strcmp(extensions[i]->name, __DRI_SWAP_CONTROL) == 0) { + screen->swapControl = (__DRIswapControlExtension *) extensions[i]; + __glXEnableExtension(screen->glx_enable_bits, + "GLX_SGI_swap_control"); + __glXEnableExtension(screen->glx_enable_bits, + "GLX_MESA_swap_control"); + + LogMessage(X_INFO, "AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control\n"); + } +#endif + +#ifdef __DRI_TEX_BUFFER + if (strcmp(extensions[i]->name, __DRI_TEX_BUFFER) == 0) { + screen->texBuffer = (__DRItexBufferExtension *) extensions[i]; + /* GLX_EXT_texture_from_pixmap is always enabled. */ + LogMessage(X_INFO, "AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects\n"); + } +#endif + /* Ignore unknown extensions */ + } +} + +static __GLXscreen * +__glXDRIscreenProbe(ScreenPtr pScreen) +{ + __DRI2_CREATE_NEW_SCREEN_FUNC *createNewScreen; + __DRIversion ddx_version; + __DRIversion dri_version; + __DRIversion drm_version; + drmVersionPtr version; + const char *driverName; + __GLXDRIscreen *screen; + char filename[128]; + size_t buffer_size; + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + unsigned int sareaHandle; + + screen = xalloc(sizeof *screen); + if (screen == NULL) + return NULL; + memset(screen, 0, sizeof *screen); + + if (!xf86LoaderCheckSymbol("DRI2Connect") || + !DRI2Connect(pScreen, + &screen->fd, + &driverName, + &ddx_version.major, + &ddx_version.minor, + &ddx_version.patch, + &sareaHandle)) { + LogMessage(X_INFO, + "AIGLX: Screen %d is not DRI2 capable\n", pScreen->myNum); + return NULL; + } + + screen->base.destroy = __glXDRIscreenDestroy; + screen->base.createContext = __glXDRIscreenCreateContext; + screen->base.createDrawable = __glXDRIscreenCreateDrawable; + screen->base.swapInterval = __glXDRIdrawableSwapInterval; + screen->base.pScreen = pScreen; + + __glXInitExtensionEnableBits(screen->glx_enable_bits); + + /* DRI protocol version. */ + dri_version.major = XF86DRI_MAJOR_VERSION; + dri_version.minor = XF86DRI_MINOR_VERSION; + dri_version.patch = XF86DRI_PATCH_VERSION; + + version = drmGetVersion(screen->fd); + if (version) { + drm_version.major = version->version_major; + drm_version.minor = version->version_minor; + drm_version.patch = version->version_patchlevel; + drmFreeVersion(version); + } + else { + drm_version.major = -1; + drm_version.minor = -1; + drm_version.patch = -1; + } + + snprintf(filename, sizeof filename, "%s/%s_dri.so", + dri_driver_path, driverName); + + screen->driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL); + if (screen->driver == NULL) { + LogMessage(X_ERROR, "AIGLX error: dlopen of %s failed (%s)\n", + filename, dlerror()); + goto handle_error; + } + + createNewScreen = dlsym(screen->driver, CREATE_NEW_SCREEN_FUNC); + if (createNewScreen == NULL) { + LogMessage(X_ERROR, "AIGLX error: dlsym for %s failed (%s)\n", + CREATE_NEW_SCREEN_FUNC, dlerror()); + goto handle_error; + } + + screen->driScreen.private = + (*createNewScreen)(pScreen->myNum, + &screen->driScreen, + &ddx_version, + &dri_version, + &drm_version, + screen->fd, + sareaHandle, + &interface_methods, + &screen->base.fbconfigs); + + if (screen->driScreen.private == NULL) { + LogMessage(X_ERROR, "AIGLX error: Calling driver entry point failed"); + goto handle_error; + } + + initializeExtensions(screen); + + __glXScreenInit(&screen->base, pScreen); + + buffer_size = __glXGetExtensionString(screen->glx_enable_bits, NULL); + if (buffer_size > 0) { + if (screen->base.GLXextensions != NULL) { + xfree(screen->base.GLXextensions); + } + + screen->base.GLXextensions = xnfalloc(buffer_size); + (void) __glXGetExtensionString(screen->glx_enable_bits, + screen->base.GLXextensions); + } + + screen->enterVT = pScrn->EnterVT; + pScrn->EnterVT = glxDRIEnterVT; + screen->leaveVT = pScrn->LeaveVT; + pScrn->LeaveVT = glxDRILeaveVT; + + LogMessage(X_INFO, + "AIGLX: Loaded and initialized %s\n", filename); + + return &screen->base; + + handle_error: + if (screen->driver) + dlclose(screen->driver); + + xfree(screen); + + LogMessage(X_ERROR, "AIGLX: reverting to software rendering\n"); + + return NULL; +} + +__GLXprovider __glXDRI2Provider = { + __glXDRIscreenProbe, + "DRI2", + NULL +}; diff --git a/GL/glx/glxscreens.c b/GL/glx/glxscreens.c index 88773a785..6575b271d 100644 --- a/GL/glx/glxscreens.c +++ b/GL/glx/glxscreens.c @@ -280,6 +280,30 @@ void GlxSetVisualConfigs(int nconfigs, * call it. */ } +static void +filterOutNativeConfigs(__GLXscreen *pGlxScreen) +{ + __GLcontextModes *m, *next, *native_modes, **last; + ScreenPtr pScreen = pGlxScreen->pScreen; + int i, depth; + + last = &pGlxScreen->fbconfigs; + for (m = pGlxScreen->fbconfigs; m != NULL; m = next) { + next = m->next; + depth = m->redBits + m->blueBits + m->greenBits; + + for (i = 0; i < pScreen->numVisuals; i++) { + if (pScreen->visuals[i].nplanes == depth) { + *last = m; + last = &m->next; + break; + } + } + } + + *last = NULL; +} + static XID findVisualForConfig(ScreenPtr pScreen, __GLcontextModes *m) { @@ -513,6 +537,8 @@ void __glXScreenInit(__GLXscreen *pGlxScreen, ScreenPtr pScreen) pGlxScreen->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = glxCloseScreen; + filterOutNativeConfigs(pGlxScreen); + i = 0; for (m = pGlxScreen->fbconfigs; m != NULL; m = m->next) { m->fbconfigID = FakeClientID(0); diff --git a/GL/glx/indirect_dispatch.c b/GL/glx/indirect_dispatch.c deleted file mode 100644 index 2afd3eb22..000000000 --- a/GL/glx/indirect_dispatch.c +++ /dev/null @@ -1,5889 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by glX_proto_recv.py (from Mesa) script */ - -/* - * (C) Copyright IBM Corporation 2005 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * IBM, - * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include <X11/Xmd.h> -#include <GL/gl.h> -#include <GL/glxproto.h> -#include <inttypes.h> -#include "indirect_size.h" -#include "indirect_size_get.h" -#include "indirect_dispatch.h" -#include "glxserver.h" -#include "glxbyteorder.h" -#include "indirect_util.h" -#include "singlesize.h" -#include "glapitable.h" -#include "glapi.h" -#include "glthread.h" -#include "dispatch.h" - -#define __GLX_PAD(x) (((x) + 3) & ~3) - -typedef struct { - __GLX_PIXEL_3D_HDR; -} __GLXpixel3DHeader; - -extern GLboolean __glXErrorOccured( void ); -extern void __glXClearErrorOccured( void ); - -static const unsigned dummy_answer[2] = {0, 0}; - -int __glXDisp_NewList(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - CALL_NewList( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - *(GLenum *)(pc + 4) - ) ); - error = Success; - } - - return error; -} - -int __glXDisp_EndList(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - CALL_EndList( GET_DISPATCH(), () ); - error = Success; - } - - return error; -} - -void __glXDisp_CallList(GLbyte * pc) -{ - CALL_CallList( GET_DISPATCH(), ( - *(GLuint *)(pc + 0) - ) ); -} - -void __glXDisp_CallLists(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 0); - const GLenum type = *(GLenum *)(pc + 4); - const GLvoid * lists = (const GLvoid *)(pc + 8); - - lists = (const GLvoid *) (pc + 8); - - CALL_CallLists( GET_DISPATCH(), ( - n, - type, - lists - ) ); -} - -int __glXDisp_DeleteLists(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - CALL_DeleteLists( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - *(GLsizei *)(pc + 4) - ) ); - error = Success; - } - - return error; -} - -int __glXDisp_GenLists(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - GLuint retval; - retval = CALL_GenLists( GET_DISPATCH(), ( - *(GLsizei *)(pc + 0) - ) ); - __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDisp_ListBase(GLbyte * pc) -{ - CALL_ListBase( GET_DISPATCH(), ( - *(GLuint *)(pc + 0) - ) ); -} - -void __glXDisp_Begin(GLbyte * pc) -{ - CALL_Begin( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -void __glXDisp_Bitmap(GLbyte * pc) -{ - const GLubyte * const bitmap = (const GLubyte *) (pc + 44); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); - - CALL_Bitmap( GET_DISPATCH(), ( - *(GLsizei *)(pc + 20), - *(GLsizei *)(pc + 24), - *(GLfloat *)(pc + 28), - *(GLfloat *)(pc + 32), - *(GLfloat *)(pc + 36), - *(GLfloat *)(pc + 40), - bitmap - ) ); -} - -void __glXDisp_Color3bv(GLbyte * pc) -{ - CALL_Color3bv( GET_DISPATCH(), ( - (const GLbyte *)(pc + 0) - ) ); -} - -void __glXDisp_Color3dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 24); - pc -= 4; - } -#endif - - CALL_Color3dv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_Color3fv(GLbyte * pc) -{ - CALL_Color3fv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_Color3iv(GLbyte * pc) -{ - CALL_Color3iv( GET_DISPATCH(), ( - (const GLint *)(pc + 0) - ) ); -} - -void __glXDisp_Color3sv(GLbyte * pc) -{ - CALL_Color3sv( GET_DISPATCH(), ( - (const GLshort *)(pc + 0) - ) ); -} - -void __glXDisp_Color3ubv(GLbyte * pc) -{ - CALL_Color3ubv( GET_DISPATCH(), ( - (const GLubyte *)(pc + 0) - ) ); -} - -void __glXDisp_Color3uiv(GLbyte * pc) -{ - CALL_Color3uiv( GET_DISPATCH(), ( - (const GLuint *)(pc + 0) - ) ); -} - -void __glXDisp_Color3usv(GLbyte * pc) -{ - CALL_Color3usv( GET_DISPATCH(), ( - (const GLushort *)(pc + 0) - ) ); -} - -void __glXDisp_Color4bv(GLbyte * pc) -{ - CALL_Color4bv( GET_DISPATCH(), ( - (const GLbyte *)(pc + 0) - ) ); -} - -void __glXDisp_Color4dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 32); - pc -= 4; - } -#endif - - CALL_Color4dv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_Color4fv(GLbyte * pc) -{ - CALL_Color4fv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_Color4iv(GLbyte * pc) -{ - CALL_Color4iv( GET_DISPATCH(), ( - (const GLint *)(pc + 0) - ) ); -} - -void __glXDisp_Color4sv(GLbyte * pc) -{ - CALL_Color4sv( GET_DISPATCH(), ( - (const GLshort *)(pc + 0) - ) ); -} - -void __glXDisp_Color4ubv(GLbyte * pc) -{ - CALL_Color4ubv( GET_DISPATCH(), ( - (const GLubyte *)(pc + 0) - ) ); -} - -void __glXDisp_Color4uiv(GLbyte * pc) -{ - CALL_Color4uiv( GET_DISPATCH(), ( - (const GLuint *)(pc + 0) - ) ); -} - -void __glXDisp_Color4usv(GLbyte * pc) -{ - CALL_Color4usv( GET_DISPATCH(), ( - (const GLushort *)(pc + 0) - ) ); -} - -void __glXDisp_EdgeFlagv(GLbyte * pc) -{ - CALL_EdgeFlagv( GET_DISPATCH(), ( - (const GLboolean *)(pc + 0) - ) ); -} - -void __glXDisp_End(GLbyte * pc) -{ - CALL_End( GET_DISPATCH(), () ); -} - -void __glXDisp_Indexdv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 8); - pc -= 4; - } -#endif - - CALL_Indexdv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_Indexfv(GLbyte * pc) -{ - CALL_Indexfv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_Indexiv(GLbyte * pc) -{ - CALL_Indexiv( GET_DISPATCH(), ( - (const GLint *)(pc + 0) - ) ); -} - -void __glXDisp_Indexsv(GLbyte * pc) -{ - CALL_Indexsv( GET_DISPATCH(), ( - (const GLshort *)(pc + 0) - ) ); -} - -void __glXDisp_Normal3bv(GLbyte * pc) -{ - CALL_Normal3bv( GET_DISPATCH(), ( - (const GLbyte *)(pc + 0) - ) ); -} - -void __glXDisp_Normal3dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 24); - pc -= 4; - } -#endif - - CALL_Normal3dv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_Normal3fv(GLbyte * pc) -{ - CALL_Normal3fv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_Normal3iv(GLbyte * pc) -{ - CALL_Normal3iv( GET_DISPATCH(), ( - (const GLint *)(pc + 0) - ) ); -} - -void __glXDisp_Normal3sv(GLbyte * pc) -{ - CALL_Normal3sv( GET_DISPATCH(), ( - (const GLshort *)(pc + 0) - ) ); -} - -void __glXDisp_RasterPos2dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 16); - pc -= 4; - } -#endif - - CALL_RasterPos2dv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_RasterPos2fv(GLbyte * pc) -{ - CALL_RasterPos2fv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_RasterPos2iv(GLbyte * pc) -{ - CALL_RasterPos2iv( GET_DISPATCH(), ( - (const GLint *)(pc + 0) - ) ); -} - -void __glXDisp_RasterPos2sv(GLbyte * pc) -{ - CALL_RasterPos2sv( GET_DISPATCH(), ( - (const GLshort *)(pc + 0) - ) ); -} - -void __glXDisp_RasterPos3dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 24); - pc -= 4; - } -#endif - - CALL_RasterPos3dv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_RasterPos3fv(GLbyte * pc) -{ - CALL_RasterPos3fv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_RasterPos3iv(GLbyte * pc) -{ - CALL_RasterPos3iv( GET_DISPATCH(), ( - (const GLint *)(pc + 0) - ) ); -} - -void __glXDisp_RasterPos3sv(GLbyte * pc) -{ - CALL_RasterPos3sv( GET_DISPATCH(), ( - (const GLshort *)(pc + 0) - ) ); -} - -void __glXDisp_RasterPos4dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 32); - pc -= 4; - } -#endif - - CALL_RasterPos4dv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_RasterPos4fv(GLbyte * pc) -{ - CALL_RasterPos4fv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_RasterPos4iv(GLbyte * pc) -{ - CALL_RasterPos4iv( GET_DISPATCH(), ( - (const GLint *)(pc + 0) - ) ); -} - -void __glXDisp_RasterPos4sv(GLbyte * pc) -{ - CALL_RasterPos4sv( GET_DISPATCH(), ( - (const GLshort *)(pc + 0) - ) ); -} - -void __glXDisp_Rectdv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 32); - pc -= 4; - } -#endif - - CALL_Rectdv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0), - (const GLdouble *)(pc + 16) - ) ); -} - -void __glXDisp_Rectfv(GLbyte * pc) -{ - CALL_Rectfv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0), - (const GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_Rectiv(GLbyte * pc) -{ - CALL_Rectiv( GET_DISPATCH(), ( - (const GLint *)(pc + 0), - (const GLint *)(pc + 8) - ) ); -} - -void __glXDisp_Rectsv(GLbyte * pc) -{ - CALL_Rectsv( GET_DISPATCH(), ( - (const GLshort *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_TexCoord1dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 8); - pc -= 4; - } -#endif - - CALL_TexCoord1dv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_TexCoord1fv(GLbyte * pc) -{ - CALL_TexCoord1fv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_TexCoord1iv(GLbyte * pc) -{ - CALL_TexCoord1iv( GET_DISPATCH(), ( - (const GLint *)(pc + 0) - ) ); -} - -void __glXDisp_TexCoord1sv(GLbyte * pc) -{ - CALL_TexCoord1sv( GET_DISPATCH(), ( - (const GLshort *)(pc + 0) - ) ); -} - -void __glXDisp_TexCoord2dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 16); - pc -= 4; - } -#endif - - CALL_TexCoord2dv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_TexCoord2fv(GLbyte * pc) -{ - CALL_TexCoord2fv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_TexCoord2iv(GLbyte * pc) -{ - CALL_TexCoord2iv( GET_DISPATCH(), ( - (const GLint *)(pc + 0) - ) ); -} - -void __glXDisp_TexCoord2sv(GLbyte * pc) -{ - CALL_TexCoord2sv( GET_DISPATCH(), ( - (const GLshort *)(pc + 0) - ) ); -} - -void __glXDisp_TexCoord3dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 24); - pc -= 4; - } -#endif - - CALL_TexCoord3dv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_TexCoord3fv(GLbyte * pc) -{ - CALL_TexCoord3fv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_TexCoord3iv(GLbyte * pc) -{ - CALL_TexCoord3iv( GET_DISPATCH(), ( - (const GLint *)(pc + 0) - ) ); -} - -void __glXDisp_TexCoord3sv(GLbyte * pc) -{ - CALL_TexCoord3sv( GET_DISPATCH(), ( - (const GLshort *)(pc + 0) - ) ); -} - -void __glXDisp_TexCoord4dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 32); - pc -= 4; - } -#endif - - CALL_TexCoord4dv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_TexCoord4fv(GLbyte * pc) -{ - CALL_TexCoord4fv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_TexCoord4iv(GLbyte * pc) -{ - CALL_TexCoord4iv( GET_DISPATCH(), ( - (const GLint *)(pc + 0) - ) ); -} - -void __glXDisp_TexCoord4sv(GLbyte * pc) -{ - CALL_TexCoord4sv( GET_DISPATCH(), ( - (const GLshort *)(pc + 0) - ) ); -} - -void __glXDisp_Vertex2dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 16); - pc -= 4; - } -#endif - - CALL_Vertex2dv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_Vertex2fv(GLbyte * pc) -{ - CALL_Vertex2fv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_Vertex2iv(GLbyte * pc) -{ - CALL_Vertex2iv( GET_DISPATCH(), ( - (const GLint *)(pc + 0) - ) ); -} - -void __glXDisp_Vertex2sv(GLbyte * pc) -{ - CALL_Vertex2sv( GET_DISPATCH(), ( - (const GLshort *)(pc + 0) - ) ); -} - -void __glXDisp_Vertex3dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 24); - pc -= 4; - } -#endif - - CALL_Vertex3dv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_Vertex3fv(GLbyte * pc) -{ - CALL_Vertex3fv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_Vertex3iv(GLbyte * pc) -{ - CALL_Vertex3iv( GET_DISPATCH(), ( - (const GLint *)(pc + 0) - ) ); -} - -void __glXDisp_Vertex3sv(GLbyte * pc) -{ - CALL_Vertex3sv( GET_DISPATCH(), ( - (const GLshort *)(pc + 0) - ) ); -} - -void __glXDisp_Vertex4dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 32); - pc -= 4; - } -#endif - - CALL_Vertex4dv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_Vertex4fv(GLbyte * pc) -{ - CALL_Vertex4fv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_Vertex4iv(GLbyte * pc) -{ - CALL_Vertex4iv( GET_DISPATCH(), ( - (const GLint *)(pc + 0) - ) ); -} - -void __glXDisp_Vertex4sv(GLbyte * pc) -{ - CALL_Vertex4sv( GET_DISPATCH(), ( - (const GLshort *)(pc + 0) - ) ); -} - -void __glXDisp_ClipPlane(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 36); - pc -= 4; - } -#endif - - CALL_ClipPlane( GET_DISPATCH(), ( - *(GLenum *)(pc + 32), - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_ColorMaterial(GLbyte * pc) -{ - CALL_ColorMaterial( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4) - ) ); -} - -void __glXDisp_CullFace(GLbyte * pc) -{ - CALL_CullFace( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -void __glXDisp_Fogf(GLbyte * pc) -{ - CALL_Fogf( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_Fogfv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 0); - const GLfloat * params; - - params = (const GLfloat *) (pc + 4); - - CALL_Fogfv( GET_DISPATCH(), ( - pname, - params - ) ); -} - -void __glXDisp_Fogi(GLbyte * pc) -{ - CALL_Fogi( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4) - ) ); -} - -void __glXDisp_Fogiv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 0); - const GLint * params; - - params = (const GLint *) (pc + 4); - - CALL_Fogiv( GET_DISPATCH(), ( - pname, - params - ) ); -} - -void __glXDisp_FrontFace(GLbyte * pc) -{ - CALL_FrontFace( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -void __glXDisp_Hint(GLbyte * pc) -{ - CALL_Hint( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4) - ) ); -} - -void __glXDisp_Lightf(GLbyte * pc) -{ - CALL_Lightf( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_Lightfv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 4); - const GLfloat * params; - - params = (const GLfloat *) (pc + 8); - - CALL_Lightfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); -} - -void __glXDisp_Lighti(GLbyte * pc) -{ - CALL_Lighti( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8) - ) ); -} - -void __glXDisp_Lightiv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 4); - const GLint * params; - - params = (const GLint *) (pc + 8); - - CALL_Lightiv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); -} - -void __glXDisp_LightModelf(GLbyte * pc) -{ - CALL_LightModelf( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_LightModelfv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 0); - const GLfloat * params; - - params = (const GLfloat *) (pc + 4); - - CALL_LightModelfv( GET_DISPATCH(), ( - pname, - params - ) ); -} - -void __glXDisp_LightModeli(GLbyte * pc) -{ - CALL_LightModeli( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4) - ) ); -} - -void __glXDisp_LightModeliv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 0); - const GLint * params; - - params = (const GLint *) (pc + 4); - - CALL_LightModeliv( GET_DISPATCH(), ( - pname, - params - ) ); -} - -void __glXDisp_LineStipple(GLbyte * pc) -{ - CALL_LineStipple( GET_DISPATCH(), ( - *(GLint *)(pc + 0), - *(GLushort *)(pc + 4) - ) ); -} - -void __glXDisp_LineWidth(GLbyte * pc) -{ - CALL_LineWidth( GET_DISPATCH(), ( - *(GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_Materialf(GLbyte * pc) -{ - CALL_Materialf( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_Materialfv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 4); - const GLfloat * params; - - params = (const GLfloat *) (pc + 8); - - CALL_Materialfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); -} - -void __glXDisp_Materiali(GLbyte * pc) -{ - CALL_Materiali( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8) - ) ); -} - -void __glXDisp_Materialiv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 4); - const GLint * params; - - params = (const GLint *) (pc + 8); - - CALL_Materialiv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); -} - -void __glXDisp_PointSize(GLbyte * pc) -{ - CALL_PointSize( GET_DISPATCH(), ( - *(GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_PolygonMode(GLbyte * pc) -{ - CALL_PolygonMode( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4) - ) ); -} - -void __glXDisp_PolygonStipple(GLbyte * pc) -{ - const GLubyte * const mask = (const GLubyte *) (pc + 20); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); - - CALL_PolygonStipple( GET_DISPATCH(), ( - mask - ) ); -} - -void __glXDisp_Scissor(GLbyte * pc) -{ - CALL_Scissor( GET_DISPATCH(), ( - *(GLint *)(pc + 0), - *(GLint *)(pc + 4), - *(GLsizei *)(pc + 8), - *(GLsizei *)(pc + 12) - ) ); -} - -void __glXDisp_ShadeModel(GLbyte * pc) -{ - CALL_ShadeModel( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -void __glXDisp_TexParameterf(GLbyte * pc) -{ - CALL_TexParameterf( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_TexParameterfv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 4); - const GLfloat * params; - - params = (const GLfloat *) (pc + 8); - - CALL_TexParameterfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); -} - -void __glXDisp_TexParameteri(GLbyte * pc) -{ - CALL_TexParameteri( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8) - ) ); -} - -void __glXDisp_TexParameteriv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 4); - const GLint * params; - - params = (const GLint *) (pc + 8); - - CALL_TexParameteriv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); -} - -void __glXDisp_TexImage1D(GLbyte * pc) -{ - const GLvoid * const pixels = (const GLvoid *) (pc + 52); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); - - CALL_TexImage1D( GET_DISPATCH(), ( - *(GLenum *)(pc + 20), - *(GLint *)(pc + 24), - *(GLint *)(pc + 28), - *(GLsizei *)(pc + 32), - *(GLint *)(pc + 40), - *(GLenum *)(pc + 44), - *(GLenum *)(pc + 48), - pixels - ) ); -} - -void __glXDisp_TexImage2D(GLbyte * pc) -{ - const GLvoid * const pixels = (const GLvoid *) (pc + 52); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); - - CALL_TexImage2D( GET_DISPATCH(), ( - *(GLenum *)(pc + 20), - *(GLint *)(pc + 24), - *(GLint *)(pc + 28), - *(GLsizei *)(pc + 32), - *(GLsizei *)(pc + 36), - *(GLint *)(pc + 40), - *(GLenum *)(pc + 44), - *(GLenum *)(pc + 48), - pixels - ) ); -} - -void __glXDisp_TexEnvf(GLbyte * pc) -{ - CALL_TexEnvf( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_TexEnvfv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 4); - const GLfloat * params; - - params = (const GLfloat *) (pc + 8); - - CALL_TexEnvfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); -} - -void __glXDisp_TexEnvi(GLbyte * pc) -{ - CALL_TexEnvi( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8) - ) ); -} - -void __glXDisp_TexEnviv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 4); - const GLint * params; - - params = (const GLint *) (pc + 8); - - CALL_TexEnviv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); -} - -void __glXDisp_TexGend(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 16); - pc -= 4; - } -#endif - - CALL_TexGend( GET_DISPATCH(), ( - *(GLenum *)(pc + 8), - *(GLenum *)(pc + 12), - *(GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_TexGendv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 4); - const GLdouble * params; - -#ifdef __GLX_ALIGN64 - const GLuint compsize = __glTexGendv_size(pname); - const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8)) - 4; - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, cmdlen); - pc -= 4; - } -#endif - - params = (const GLdouble *) (pc + 8); - - CALL_TexGendv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); -} - -void __glXDisp_TexGenf(GLbyte * pc) -{ - CALL_TexGenf( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_TexGenfv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 4); - const GLfloat * params; - - params = (const GLfloat *) (pc + 8); - - CALL_TexGenfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); -} - -void __glXDisp_TexGeni(GLbyte * pc) -{ - CALL_TexGeni( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8) - ) ); -} - -void __glXDisp_TexGeniv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 4); - const GLint * params; - - params = (const GLint *) (pc + 8); - - CALL_TexGeniv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); -} - -void __glXDisp_InitNames(GLbyte * pc) -{ - CALL_InitNames( GET_DISPATCH(), () ); -} - -void __glXDisp_LoadName(GLbyte * pc) -{ - CALL_LoadName( GET_DISPATCH(), ( - *(GLuint *)(pc + 0) - ) ); -} - -void __glXDisp_PassThrough(GLbyte * pc) -{ - CALL_PassThrough( GET_DISPATCH(), ( - *(GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_PopName(GLbyte * pc) -{ - CALL_PopName( GET_DISPATCH(), () ); -} - -void __glXDisp_PushName(GLbyte * pc) -{ - CALL_PushName( GET_DISPATCH(), ( - *(GLuint *)(pc + 0) - ) ); -} - -void __glXDisp_DrawBuffer(GLbyte * pc) -{ - CALL_DrawBuffer( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -void __glXDisp_Clear(GLbyte * pc) -{ - CALL_Clear( GET_DISPATCH(), ( - *(GLbitfield *)(pc + 0) - ) ); -} - -void __glXDisp_ClearAccum(GLbyte * pc) -{ - CALL_ClearAccum( GET_DISPATCH(), ( - *(GLfloat *)(pc + 0), - *(GLfloat *)(pc + 4), - *(GLfloat *)(pc + 8), - *(GLfloat *)(pc + 12) - ) ); -} - -void __glXDisp_ClearIndex(GLbyte * pc) -{ - CALL_ClearIndex( GET_DISPATCH(), ( - *(GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_ClearColor(GLbyte * pc) -{ - CALL_ClearColor( GET_DISPATCH(), ( - *(GLclampf *)(pc + 0), - *(GLclampf *)(pc + 4), - *(GLclampf *)(pc + 8), - *(GLclampf *)(pc + 12) - ) ); -} - -void __glXDisp_ClearStencil(GLbyte * pc) -{ - CALL_ClearStencil( GET_DISPATCH(), ( - *(GLint *)(pc + 0) - ) ); -} - -void __glXDisp_ClearDepth(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 8); - pc -= 4; - } -#endif - - CALL_ClearDepth( GET_DISPATCH(), ( - *(GLclampd *)(pc + 0) - ) ); -} - -void __glXDisp_StencilMask(GLbyte * pc) -{ - CALL_StencilMask( GET_DISPATCH(), ( - *(GLuint *)(pc + 0) - ) ); -} - -void __glXDisp_ColorMask(GLbyte * pc) -{ - CALL_ColorMask( GET_DISPATCH(), ( - *(GLboolean *)(pc + 0), - *(GLboolean *)(pc + 1), - *(GLboolean *)(pc + 2), - *(GLboolean *)(pc + 3) - ) ); -} - -void __glXDisp_DepthMask(GLbyte * pc) -{ - CALL_DepthMask( GET_DISPATCH(), ( - *(GLboolean *)(pc + 0) - ) ); -} - -void __glXDisp_IndexMask(GLbyte * pc) -{ - CALL_IndexMask( GET_DISPATCH(), ( - *(GLuint *)(pc + 0) - ) ); -} - -void __glXDisp_Accum(GLbyte * pc) -{ - CALL_Accum( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_Disable(GLbyte * pc) -{ - CALL_Disable( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -void __glXDisp_Enable(GLbyte * pc) -{ - CALL_Enable( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -void __glXDisp_PopAttrib(GLbyte * pc) -{ - CALL_PopAttrib( GET_DISPATCH(), () ); -} - -void __glXDisp_PushAttrib(GLbyte * pc) -{ - CALL_PushAttrib( GET_DISPATCH(), ( - *(GLbitfield *)(pc + 0) - ) ); -} - -void __glXDisp_MapGrid1d(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 20); - pc -= 4; - } -#endif - - CALL_MapGrid1d( GET_DISPATCH(), ( - *(GLint *)(pc + 16), - *(GLdouble *)(pc + 0), - *(GLdouble *)(pc + 8) - ) ); -} - -void __glXDisp_MapGrid1f(GLbyte * pc) -{ - CALL_MapGrid1f( GET_DISPATCH(), ( - *(GLint *)(pc + 0), - *(GLfloat *)(pc + 4), - *(GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_MapGrid2d(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 40); - pc -= 4; - } -#endif - - CALL_MapGrid2d( GET_DISPATCH(), ( - *(GLint *)(pc + 32), - *(GLdouble *)(pc + 0), - *(GLdouble *)(pc + 8), - *(GLint *)(pc + 36), - *(GLdouble *)(pc + 16), - *(GLdouble *)(pc + 24) - ) ); -} - -void __glXDisp_MapGrid2f(GLbyte * pc) -{ - CALL_MapGrid2f( GET_DISPATCH(), ( - *(GLint *)(pc + 0), - *(GLfloat *)(pc + 4), - *(GLfloat *)(pc + 8), - *(GLint *)(pc + 12), - *(GLfloat *)(pc + 16), - *(GLfloat *)(pc + 20) - ) ); -} - -void __glXDisp_EvalCoord1dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 8); - pc -= 4; - } -#endif - - CALL_EvalCoord1dv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_EvalCoord1fv(GLbyte * pc) -{ - CALL_EvalCoord1fv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_EvalCoord2dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 16); - pc -= 4; - } -#endif - - CALL_EvalCoord2dv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_EvalCoord2fv(GLbyte * pc) -{ - CALL_EvalCoord2fv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_EvalMesh1(GLbyte * pc) -{ - CALL_EvalMesh1( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLint *)(pc + 8) - ) ); -} - -void __glXDisp_EvalPoint1(GLbyte * pc) -{ - CALL_EvalPoint1( GET_DISPATCH(), ( - *(GLint *)(pc + 0) - ) ); -} - -void __glXDisp_EvalMesh2(GLbyte * pc) -{ - CALL_EvalMesh2( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLint *)(pc + 16) - ) ); -} - -void __glXDisp_EvalPoint2(GLbyte * pc) -{ - CALL_EvalPoint2( GET_DISPATCH(), ( - *(GLint *)(pc + 0), - *(GLint *)(pc + 4) - ) ); -} - -void __glXDisp_AlphaFunc(GLbyte * pc) -{ - CALL_AlphaFunc( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLclampf *)(pc + 4) - ) ); -} - -void __glXDisp_BlendFunc(GLbyte * pc) -{ - CALL_BlendFunc( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4) - ) ); -} - -void __glXDisp_LogicOp(GLbyte * pc) -{ - CALL_LogicOp( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -void __glXDisp_StencilFunc(GLbyte * pc) -{ - CALL_StencilFunc( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLuint *)(pc + 8) - ) ); -} - -void __glXDisp_StencilOp(GLbyte * pc) -{ - CALL_StencilOp( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLenum *)(pc + 8) - ) ); -} - -void __glXDisp_DepthFunc(GLbyte * pc) -{ - CALL_DepthFunc( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -void __glXDisp_PixelZoom(GLbyte * pc) -{ - CALL_PixelZoom( GET_DISPATCH(), ( - *(GLfloat *)(pc + 0), - *(GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_PixelTransferf(GLbyte * pc) -{ - CALL_PixelTransferf( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_PixelTransferi(GLbyte * pc) -{ - CALL_PixelTransferi( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4) - ) ); -} - -int __glXDisp_PixelStoref(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - CALL_PixelStoref( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLfloat *)(pc + 4) - ) ); - error = Success; - } - - return error; -} - -int __glXDisp_PixelStorei(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - CALL_PixelStorei( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4) - ) ); - error = Success; - } - - return error; -} - -void __glXDisp_PixelMapfv(GLbyte * pc) -{ - const GLsizei mapsize = *(GLsizei *)(pc + 4); - - CALL_PixelMapfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - mapsize, - (const GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_PixelMapuiv(GLbyte * pc) -{ - const GLsizei mapsize = *(GLsizei *)(pc + 4); - - CALL_PixelMapuiv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - mapsize, - (const GLuint *)(pc + 8) - ) ); -} - -void __glXDisp_PixelMapusv(GLbyte * pc) -{ - const GLsizei mapsize = *(GLsizei *)(pc + 4); - - CALL_PixelMapusv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - mapsize, - (const GLushort *)(pc + 8) - ) ); -} - -void __glXDisp_ReadBuffer(GLbyte * pc) -{ - CALL_ReadBuffer( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -void __glXDisp_CopyPixels(GLbyte * pc) -{ - CALL_CopyPixels( GET_DISPATCH(), ( - *(GLint *)(pc + 0), - *(GLint *)(pc + 4), - *(GLsizei *)(pc + 8), - *(GLsizei *)(pc + 12), - *(GLenum *)(pc + 16) - ) ); -} - -void __glXDisp_DrawPixels(GLbyte * pc) -{ - const GLvoid * const pixels = (const GLvoid *) (pc + 36); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); - - CALL_DrawPixels( GET_DISPATCH(), ( - *(GLsizei *)(pc + 20), - *(GLsizei *)(pc + 24), - *(GLenum *)(pc + 28), - *(GLenum *)(pc + 32), - pixels - ) ); -} - -int __glXDisp_GetBooleanv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 0); - - const GLuint compsize = __glGetBooleanv_size(pname); - GLboolean answerBuffer[200]; - GLboolean * params = __glXGetAnswerBuffer(cl, compsize, answerBuffer, sizeof(answerBuffer), 1); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetBooleanv( GET_DISPATCH(), ( - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 1, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetClipPlane(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - GLdouble equation[4]; - CALL_GetClipPlane( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - equation - ) ); - __glXSendReply(cl->client, equation, 4, 8, GL_TRUE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetDoublev(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 0); - - const GLuint compsize = __glGetDoublev_size(pname); - GLdouble answerBuffer[200]; - GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetDoublev( GET_DISPATCH(), ( - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetError(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - GLenum retval; - retval = CALL_GetError( GET_DISPATCH(), () ); - __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -int __glXDisp_GetFloatv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 0); - - const GLuint compsize = __glGetFloatv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetFloatv( GET_DISPATCH(), ( - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetIntegerv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 0); - - const GLuint compsize = __glGetIntegerv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetIntegerv( GET_DISPATCH(), ( - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetLightfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetLightfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetLightfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetLightiv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetLightiv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetLightiv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetMapdv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum target = *(GLenum *)(pc + 0); - const GLenum query = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetMapdv_size(target,query); - GLdouble answerBuffer[200]; - GLdouble * v = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); - - if (v == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMapdv( GET_DISPATCH(), ( - target, - query, - v - ) ); - __glXSendReply(cl->client, v, compsize, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetMapfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum target = *(GLenum *)(pc + 0); - const GLenum query = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetMapfv_size(target,query); - GLfloat answerBuffer[200]; - GLfloat * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (v == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMapfv( GET_DISPATCH(), ( - target, - query, - v - ) ); - __glXSendReply(cl->client, v, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetMapiv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum target = *(GLenum *)(pc + 0); - const GLenum query = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetMapiv_size(target,query); - GLint answerBuffer[200]; - GLint * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (v == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMapiv( GET_DISPATCH(), ( - target, - query, - v - ) ); - __glXSendReply(cl->client, v, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetMaterialfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetMaterialfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMaterialfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetMaterialiv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetMaterialiv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMaterialiv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetPixelMapfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum map = *(GLenum *)(pc + 0); - - const GLuint compsize = __glGetPixelMapfv_size(map); - GLfloat answerBuffer[200]; - GLfloat * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (values == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetPixelMapfv( GET_DISPATCH(), ( - map, - values - ) ); - __glXSendReply(cl->client, values, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetPixelMapuiv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum map = *(GLenum *)(pc + 0); - - const GLuint compsize = __glGetPixelMapuiv_size(map); - GLuint answerBuffer[200]; - GLuint * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (values == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetPixelMapuiv( GET_DISPATCH(), ( - map, - values - ) ); - __glXSendReply(cl->client, values, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetPixelMapusv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum map = *(GLenum *)(pc + 0); - - const GLuint compsize = __glGetPixelMapusv_size(map); - GLushort answerBuffer[200]; - GLushort * values = __glXGetAnswerBuffer(cl, compsize * 2, answerBuffer, sizeof(answerBuffer), 2); - - if (values == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetPixelMapusv( GET_DISPATCH(), ( - map, - values - ) ); - __glXSendReply(cl->client, values, compsize, 2, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetTexEnvfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetTexEnvfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexEnvfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetTexEnviv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetTexEnviv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexEnviv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetTexGendv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetTexGendv_size(pname); - GLdouble answerBuffer[200]; - GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexGendv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetTexGenfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetTexGenfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexGenfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetTexGeniv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetTexGeniv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexGeniv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetTexParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetTexParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexParameterfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetTexParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetTexParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexParameteriv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetTexLevelParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 8); - - const GLuint compsize = __glGetTexLevelParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexLevelParameterfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetTexLevelParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 8); - - const GLuint compsize = __glGetTexLevelParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexLevelParameteriv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_IsEnabled(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsEnabled( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); - __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -int __glXDisp_IsList(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsList( GET_DISPATCH(), ( - *(GLuint *)(pc + 0) - ) ); - __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDisp_DepthRange(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 16); - pc -= 4; - } -#endif - - CALL_DepthRange( GET_DISPATCH(), ( - *(GLclampd *)(pc + 0), - *(GLclampd *)(pc + 8) - ) ); -} - -void __glXDisp_Frustum(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 48); - pc -= 4; - } -#endif - - CALL_Frustum( GET_DISPATCH(), ( - *(GLdouble *)(pc + 0), - *(GLdouble *)(pc + 8), - *(GLdouble *)(pc + 16), - *(GLdouble *)(pc + 24), - *(GLdouble *)(pc + 32), - *(GLdouble *)(pc + 40) - ) ); -} - -void __glXDisp_LoadIdentity(GLbyte * pc) -{ - CALL_LoadIdentity( GET_DISPATCH(), () ); -} - -void __glXDisp_LoadMatrixf(GLbyte * pc) -{ - CALL_LoadMatrixf( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_LoadMatrixd(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 128); - pc -= 4; - } -#endif - - CALL_LoadMatrixd( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_MatrixMode(GLbyte * pc) -{ - CALL_MatrixMode( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -void __glXDisp_MultMatrixf(GLbyte * pc) -{ - CALL_MultMatrixf( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_MultMatrixd(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 128); - pc -= 4; - } -#endif - - CALL_MultMatrixd( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_Ortho(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 48); - pc -= 4; - } -#endif - - CALL_Ortho( GET_DISPATCH(), ( - *(GLdouble *)(pc + 0), - *(GLdouble *)(pc + 8), - *(GLdouble *)(pc + 16), - *(GLdouble *)(pc + 24), - *(GLdouble *)(pc + 32), - *(GLdouble *)(pc + 40) - ) ); -} - -void __glXDisp_PopMatrix(GLbyte * pc) -{ - CALL_PopMatrix( GET_DISPATCH(), () ); -} - -void __glXDisp_PushMatrix(GLbyte * pc) -{ - CALL_PushMatrix( GET_DISPATCH(), () ); -} - -void __glXDisp_Rotated(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 32); - pc -= 4; - } -#endif - - CALL_Rotated( GET_DISPATCH(), ( - *(GLdouble *)(pc + 0), - *(GLdouble *)(pc + 8), - *(GLdouble *)(pc + 16), - *(GLdouble *)(pc + 24) - ) ); -} - -void __glXDisp_Rotatef(GLbyte * pc) -{ - CALL_Rotatef( GET_DISPATCH(), ( - *(GLfloat *)(pc + 0), - *(GLfloat *)(pc + 4), - *(GLfloat *)(pc + 8), - *(GLfloat *)(pc + 12) - ) ); -} - -void __glXDisp_Scaled(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 24); - pc -= 4; - } -#endif - - CALL_Scaled( GET_DISPATCH(), ( - *(GLdouble *)(pc + 0), - *(GLdouble *)(pc + 8), - *(GLdouble *)(pc + 16) - ) ); -} - -void __glXDisp_Scalef(GLbyte * pc) -{ - CALL_Scalef( GET_DISPATCH(), ( - *(GLfloat *)(pc + 0), - *(GLfloat *)(pc + 4), - *(GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_Translated(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 24); - pc -= 4; - } -#endif - - CALL_Translated( GET_DISPATCH(), ( - *(GLdouble *)(pc + 0), - *(GLdouble *)(pc + 8), - *(GLdouble *)(pc + 16) - ) ); -} - -void __glXDisp_Translatef(GLbyte * pc) -{ - CALL_Translatef( GET_DISPATCH(), ( - *(GLfloat *)(pc + 0), - *(GLfloat *)(pc + 4), - *(GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_Viewport(GLbyte * pc) -{ - CALL_Viewport( GET_DISPATCH(), ( - *(GLint *)(pc + 0), - *(GLint *)(pc + 4), - *(GLsizei *)(pc + 8), - *(GLsizei *)(pc + 12) - ) ); -} - -void __glXDisp_BindTexture(GLbyte * pc) -{ - CALL_BindTexture( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4) - ) ); -} - -void __glXDisp_Indexubv(GLbyte * pc) -{ - CALL_Indexubv( GET_DISPATCH(), ( - (const GLubyte *)(pc + 0) - ) ); -} - -void __glXDisp_PolygonOffset(GLbyte * pc) -{ - CALL_PolygonOffset( GET_DISPATCH(), ( - *(GLfloat *)(pc + 0), - *(GLfloat *)(pc + 4) - ) ); -} - -int __glXDisp_AreTexturesResident(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = *(GLsizei *)(pc + 0); - - GLboolean retval; - GLboolean answerBuffer[200]; - GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); - retval = CALL_AreTexturesResident( GET_DISPATCH(), ( - n, - (const GLuint *)(pc + 4), - residences - ) ); - __glXSendReply(cl->client, residences, n, 1, GL_TRUE, retval); - error = Success; - } - - return error; -} - -int __glXDisp_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = *(GLsizei *)(pc + 0); - - GLboolean retval; - GLboolean answerBuffer[200]; - GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); - retval = CALL_AreTexturesResident( GET_DISPATCH(), ( - n, - (const GLuint *)(pc + 4), - residences - ) ); - __glXSendReply(cl->client, residences, n, 1, GL_TRUE, retval); - error = Success; - } - - return error; -} - -void __glXDisp_CopyTexImage1D(GLbyte * pc) -{ - CALL_CopyTexImage1D( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLint *)(pc + 12), - *(GLint *)(pc + 16), - *(GLsizei *)(pc + 20), - *(GLint *)(pc + 24) - ) ); -} - -void __glXDisp_CopyTexImage2D(GLbyte * pc) -{ - CALL_CopyTexImage2D( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLint *)(pc + 12), - *(GLint *)(pc + 16), - *(GLsizei *)(pc + 20), - *(GLsizei *)(pc + 24), - *(GLint *)(pc + 28) - ) ); -} - -void __glXDisp_CopyTexSubImage1D(GLbyte * pc) -{ - CALL_CopyTexSubImage1D( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLint *)(pc + 16), - *(GLsizei *)(pc + 20) - ) ); -} - -void __glXDisp_CopyTexSubImage2D(GLbyte * pc) -{ - CALL_CopyTexSubImage2D( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLint *)(pc + 16), - *(GLint *)(pc + 20), - *(GLsizei *)(pc + 24), - *(GLsizei *)(pc + 28) - ) ); -} - -int __glXDisp_DeleteTextures(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = *(GLsizei *)(pc + 0); - - CALL_DeleteTextures( GET_DISPATCH(), ( - n, - (const GLuint *)(pc + 4) - ) ); - error = Success; - } - - return error; -} - -int __glXDisp_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = *(GLsizei *)(pc + 0); - - CALL_DeleteTextures( GET_DISPATCH(), ( - n, - (const GLuint *)(pc + 4) - ) ); - error = Success; - } - - return error; -} - -int __glXDisp_GenTextures(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = *(GLsizei *)(pc + 0); - - GLuint answerBuffer[200]; - GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); - CALL_GenTextures( GET_DISPATCH(), ( - n, - textures - ) ); - __glXSendReply(cl->client, textures, n, 4, GL_TRUE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = *(GLsizei *)(pc + 0); - - GLuint answerBuffer[200]; - GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); - CALL_GenTextures( GET_DISPATCH(), ( - n, - textures - ) ); - __glXSendReply(cl->client, textures, n, 4, GL_TRUE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_IsTexture(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsTexture( GET_DISPATCH(), ( - *(GLuint *)(pc + 0) - ) ); - __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -int __glXDisp_IsTextureEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsTexture( GET_DISPATCH(), ( - *(GLuint *)(pc + 0) - ) ); - __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDisp_PrioritizeTextures(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 0); - - CALL_PrioritizeTextures( GET_DISPATCH(), ( - n, - (const GLuint *)(pc + 4), - (const GLclampf *)(pc + 4) - ) ); -} - -void __glXDisp_TexSubImage1D(GLbyte * pc) -{ - const CARD32 ptr_is_null = *(CARD32 *)(pc + 52); - const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 56); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); - - CALL_TexSubImage1D( GET_DISPATCH(), ( - *(GLenum *)(pc + 20), - *(GLint *)(pc + 24), - *(GLint *)(pc + 28), - *(GLsizei *)(pc + 36), - *(GLenum *)(pc + 44), - *(GLenum *)(pc + 48), - pixels - ) ); -} - -void __glXDisp_TexSubImage2D(GLbyte * pc) -{ - const CARD32 ptr_is_null = *(CARD32 *)(pc + 52); - const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 56); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); - - CALL_TexSubImage2D( GET_DISPATCH(), ( - *(GLenum *)(pc + 20), - *(GLint *)(pc + 24), - *(GLint *)(pc + 28), - *(GLint *)(pc + 32), - *(GLsizei *)(pc + 36), - *(GLsizei *)(pc + 40), - *(GLenum *)(pc + 44), - *(GLenum *)(pc + 48), - pixels - ) ); -} - -void __glXDisp_BlendColor(GLbyte * pc) -{ - CALL_BlendColor( GET_DISPATCH(), ( - *(GLclampf *)(pc + 0), - *(GLclampf *)(pc + 4), - *(GLclampf *)(pc + 8), - *(GLclampf *)(pc + 12) - ) ); -} - -void __glXDisp_BlendEquation(GLbyte * pc) -{ - CALL_BlendEquation( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -void __glXDisp_ColorTable(GLbyte * pc) -{ - const GLvoid * const table = (const GLvoid *) (pc + 40); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); - - CALL_ColorTable( GET_DISPATCH(), ( - *(GLenum *)(pc + 20), - *(GLenum *)(pc + 24), - *(GLsizei *)(pc + 28), - *(GLenum *)(pc + 32), - *(GLenum *)(pc + 36), - table - ) ); -} - -void __glXDisp_ColorTableParameterfv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 4); - const GLfloat * params; - - params = (const GLfloat *) (pc + 8); - - CALL_ColorTableParameterfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); -} - -void __glXDisp_ColorTableParameteriv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 4); - const GLint * params; - - params = (const GLint *) (pc + 8); - - CALL_ColorTableParameteriv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); -} - -void __glXDisp_CopyColorTable(GLbyte * pc) -{ - CALL_CopyColorTable( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLsizei *)(pc + 16) - ) ); -} - -int __glXDisp_GetColorTableParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetColorTableParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetColorTableParameterfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetColorTableParameterfvSGI(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetColorTableParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetColorTableParameterfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetColorTableParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetColorTableParameteriv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetColorTableParameterivSGI(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetColorTableParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetColorTableParameteriv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -void __glXDisp_ColorSubTable(GLbyte * pc) -{ - const GLvoid * const data = (const GLvoid *) (pc + 40); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); - - CALL_ColorSubTable( GET_DISPATCH(), ( - *(GLenum *)(pc + 20), - *(GLsizei *)(pc + 24), - *(GLsizei *)(pc + 28), - *(GLenum *)(pc + 32), - *(GLenum *)(pc + 36), - data - ) ); -} - -void __glXDisp_CopyColorSubTable(GLbyte * pc) -{ - CALL_CopyColorSubTable( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLsizei *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLsizei *)(pc + 16) - ) ); -} - -void __glXDisp_ConvolutionFilter1D(GLbyte * pc) -{ - const GLvoid * const image = (const GLvoid *) (pc + 44); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); - - CALL_ConvolutionFilter1D( GET_DISPATCH(), ( - *(GLenum *)(pc + 20), - *(GLenum *)(pc + 24), - *(GLsizei *)(pc + 28), - *(GLenum *)(pc + 36), - *(GLenum *)(pc + 40), - image - ) ); -} - -void __glXDisp_ConvolutionFilter2D(GLbyte * pc) -{ - const GLvoid * const image = (const GLvoid *) (pc + 44); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); - - CALL_ConvolutionFilter2D( GET_DISPATCH(), ( - *(GLenum *)(pc + 20), - *(GLenum *)(pc + 24), - *(GLsizei *)(pc + 28), - *(GLsizei *)(pc + 32), - *(GLenum *)(pc + 36), - *(GLenum *)(pc + 40), - image - ) ); -} - -void __glXDisp_ConvolutionParameterf(GLbyte * pc) -{ - CALL_ConvolutionParameterf( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_ConvolutionParameterfv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 4); - const GLfloat * params; - - params = (const GLfloat *) (pc + 8); - - CALL_ConvolutionParameterfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); -} - -void __glXDisp_ConvolutionParameteri(GLbyte * pc) -{ - CALL_ConvolutionParameteri( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8) - ) ); -} - -void __glXDisp_ConvolutionParameteriv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 4); - const GLint * params; - - params = (const GLint *) (pc + 8); - - CALL_ConvolutionParameteriv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); -} - -void __glXDisp_CopyConvolutionFilter1D(GLbyte * pc) -{ - CALL_CopyConvolutionFilter1D( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLsizei *)(pc + 16) - ) ); -} - -void __glXDisp_CopyConvolutionFilter2D(GLbyte * pc) -{ - CALL_CopyConvolutionFilter2D( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLsizei *)(pc + 16), - *(GLsizei *)(pc + 20) - ) ); -} - -int __glXDisp_GetConvolutionParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetConvolutionParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetConvolutionParameterfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetConvolutionParameterfvEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetConvolutionParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetConvolutionParameterfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetConvolutionParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetConvolutionParameteriv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetConvolutionParameterivEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetConvolutionParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetConvolutionParameteriv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetHistogramParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetHistogramParameterfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetHistogramParameterfvEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetHistogramParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetHistogramParameterfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetHistogramParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetHistogramParameteriv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetHistogramParameterivEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetHistogramParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetHistogramParameteriv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetMinmaxParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMinmaxParameterfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetMinmaxParameterfvEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetMinmaxParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMinmaxParameterfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetMinmaxParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMinmaxParameteriv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetMinmaxParameterivEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetMinmaxParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMinmaxParameteriv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -void __glXDisp_Histogram(GLbyte * pc) -{ - CALL_Histogram( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLsizei *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLboolean *)(pc + 12) - ) ); -} - -void __glXDisp_Minmax(GLbyte * pc) -{ - CALL_Minmax( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLboolean *)(pc + 8) - ) ); -} - -void __glXDisp_ResetHistogram(GLbyte * pc) -{ - CALL_ResetHistogram( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -void __glXDisp_ResetMinmax(GLbyte * pc) -{ - CALL_ResetMinmax( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -void __glXDisp_TexImage3D(GLbyte * pc) -{ - const CARD32 ptr_is_null = *(CARD32 *)(pc + 76); - const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 80); - __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) hdr->imageHeight) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES, (GLint) hdr->skipImages) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); - - CALL_TexImage3D( GET_DISPATCH(), ( - *(GLenum *)(pc + 36), - *(GLint *)(pc + 40), - *(GLint *)(pc + 44), - *(GLsizei *)(pc + 48), - *(GLsizei *)(pc + 52), - *(GLsizei *)(pc + 56), - *(GLint *)(pc + 64), - *(GLenum *)(pc + 68), - *(GLenum *)(pc + 72), - pixels - ) ); -} - -void __glXDisp_TexSubImage3D(GLbyte * pc) -{ - const CARD32 ptr_is_null = *(CARD32 *)(pc + 84); - const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 88); - __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) hdr->imageHeight) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES, (GLint) hdr->skipImages) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); - - CALL_TexSubImage3D( GET_DISPATCH(), ( - *(GLenum *)(pc + 36), - *(GLint *)(pc + 40), - *(GLint *)(pc + 44), - *(GLint *)(pc + 48), - *(GLint *)(pc + 52), - *(GLsizei *)(pc + 60), - *(GLsizei *)(pc + 64), - *(GLsizei *)(pc + 68), - *(GLenum *)(pc + 76), - *(GLenum *)(pc + 80), - pixels - ) ); -} - -void __glXDisp_CopyTexSubImage3D(GLbyte * pc) -{ - CALL_CopyTexSubImage3D( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLint *)(pc + 16), - *(GLint *)(pc + 20), - *(GLint *)(pc + 24), - *(GLsizei *)(pc + 28), - *(GLsizei *)(pc + 32) - ) ); -} - -void __glXDisp_ActiveTextureARB(GLbyte * pc) -{ - CALL_ActiveTextureARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -void __glXDisp_MultiTexCoord1dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 12); - pc -= 4; - } -#endif - - CALL_MultiTexCoord1dvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 8), - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_MultiTexCoord1fvARB(GLbyte * pc) -{ - CALL_MultiTexCoord1fvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - (const GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_MultiTexCoord1ivARB(GLbyte * pc) -{ - CALL_MultiTexCoord1ivARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - (const GLint *)(pc + 4) - ) ); -} - -void __glXDisp_MultiTexCoord1svARB(GLbyte * pc) -{ - CALL_MultiTexCoord1svARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_MultiTexCoord2dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 20); - pc -= 4; - } -#endif - - CALL_MultiTexCoord2dvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 16), - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_MultiTexCoord2fvARB(GLbyte * pc) -{ - CALL_MultiTexCoord2fvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - (const GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_MultiTexCoord2ivARB(GLbyte * pc) -{ - CALL_MultiTexCoord2ivARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - (const GLint *)(pc + 4) - ) ); -} - -void __glXDisp_MultiTexCoord2svARB(GLbyte * pc) -{ - CALL_MultiTexCoord2svARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_MultiTexCoord3dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 28); - pc -= 4; - } -#endif - - CALL_MultiTexCoord3dvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 24), - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_MultiTexCoord3fvARB(GLbyte * pc) -{ - CALL_MultiTexCoord3fvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - (const GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_MultiTexCoord3ivARB(GLbyte * pc) -{ - CALL_MultiTexCoord3ivARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - (const GLint *)(pc + 4) - ) ); -} - -void __glXDisp_MultiTexCoord3svARB(GLbyte * pc) -{ - CALL_MultiTexCoord3svARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_MultiTexCoord4dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 36); - pc -= 4; - } -#endif - - CALL_MultiTexCoord4dvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 32), - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_MultiTexCoord4fvARB(GLbyte * pc) -{ - CALL_MultiTexCoord4fvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - (const GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_MultiTexCoord4ivARB(GLbyte * pc) -{ - CALL_MultiTexCoord4ivARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - (const GLint *)(pc + 4) - ) ); -} - -void __glXDisp_MultiTexCoord4svARB(GLbyte * pc) -{ - CALL_MultiTexCoord4svARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_SampleCoverageARB(GLbyte * pc) -{ - CALL_SampleCoverageARB( GET_DISPATCH(), ( - *(GLclampf *)(pc + 0), - *(GLboolean *)(pc + 4) - ) ); -} - -void __glXDisp_CompressedTexImage1DARB(GLbyte * pc) -{ - const GLsizei imageSize = *(GLsizei *)(pc + 20); - - CALL_CompressedTexImage1DARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLsizei *)(pc + 12), - *(GLint *)(pc + 16), - imageSize, - (const GLvoid *)(pc + 24) - ) ); -} - -void __glXDisp_CompressedTexImage2DARB(GLbyte * pc) -{ - const GLsizei imageSize = *(GLsizei *)(pc + 24); - - CALL_CompressedTexImage2DARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLsizei *)(pc + 12), - *(GLsizei *)(pc + 16), - *(GLint *)(pc + 20), - imageSize, - (const GLvoid *)(pc + 28) - ) ); -} - -void __glXDisp_CompressedTexImage3DARB(GLbyte * pc) -{ - const GLsizei imageSize = *(GLsizei *)(pc + 28); - - CALL_CompressedTexImage3DARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLsizei *)(pc + 12), - *(GLsizei *)(pc + 16), - *(GLsizei *)(pc + 20), - *(GLint *)(pc + 24), - imageSize, - (const GLvoid *)(pc + 32) - ) ); -} - -void __glXDisp_CompressedTexSubImage1DARB(GLbyte * pc) -{ - const GLsizei imageSize = *(GLsizei *)(pc + 20); - - CALL_CompressedTexSubImage1DARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLint *)(pc + 8), - *(GLsizei *)(pc + 12), - *(GLenum *)(pc + 16), - imageSize, - (const GLvoid *)(pc + 24) - ) ); -} - -void __glXDisp_CompressedTexSubImage2DARB(GLbyte * pc) -{ - const GLsizei imageSize = *(GLsizei *)(pc + 28); - - CALL_CompressedTexSubImage2DARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLsizei *)(pc + 16), - *(GLsizei *)(pc + 20), - *(GLenum *)(pc + 24), - imageSize, - (const GLvoid *)(pc + 32) - ) ); -} - -void __glXDisp_CompressedTexSubImage3DARB(GLbyte * pc) -{ - const GLsizei imageSize = *(GLsizei *)(pc + 36); - - CALL_CompressedTexSubImage3DARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLint *)(pc + 16), - *(GLsizei *)(pc + 20), - *(GLsizei *)(pc + 24), - *(GLsizei *)(pc + 28), - *(GLenum *)(pc + 32), - imageSize, - (const GLvoid *)(pc + 40) - ) ); -} - -int __glXDisp_GetProgramEnvParameterdvARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLdouble params[4]; - CALL_GetProgramEnvParameterdvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - params - ) ); - __glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetProgramEnvParameterfvARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLfloat params[4]; - CALL_GetProgramEnvParameterfvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - params - ) ); - __glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetProgramLocalParameterdvARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLdouble params[4]; - CALL_GetProgramLocalParameterdvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - params - ) ); - __glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetProgramLocalParameterfvARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLfloat params[4]; - CALL_GetProgramLocalParameterfvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - params - ) ); - __glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetProgramivARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetProgramivARB_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetProgramivARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetVertexAttribdvARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetVertexAttribdvARB_size(pname); - GLdouble answerBuffer[200]; - GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetVertexAttribdvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetVertexAttribfvARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetVertexAttribfvARB_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetVertexAttribfvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetVertexAttribivARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetVertexAttribivARB_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetVertexAttribivARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -void __glXDisp_ProgramEnvParameter4dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 40); - pc -= 4; - } -#endif - - CALL_ProgramEnvParameter4dvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - (const GLdouble *)(pc + 8) - ) ); -} - -void __glXDisp_ProgramEnvParameter4fvARB(GLbyte * pc) -{ - CALL_ProgramEnvParameter4fvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - (const GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_ProgramLocalParameter4dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 40); - pc -= 4; - } -#endif - - CALL_ProgramLocalParameter4dvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - (const GLdouble *)(pc + 8) - ) ); -} - -void __glXDisp_ProgramLocalParameter4fvARB(GLbyte * pc) -{ - CALL_ProgramLocalParameter4fvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - (const GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_ProgramStringARB(GLbyte * pc) -{ - const GLsizei len = *(GLsizei *)(pc + 8); - - CALL_ProgramStringARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - len, - (const GLvoid *)(pc + 12) - ) ); -} - -void __glXDisp_VertexAttrib1dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 12); - pc -= 4; - } -#endif - - CALL_VertexAttrib1dvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLdouble *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib1fvARB(GLbyte * pc) -{ - CALL_VertexAttrib1fvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib1svARB(GLbyte * pc) -{ - CALL_VertexAttrib1svARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib2dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 20); - pc -= 4; - } -#endif - - CALL_VertexAttrib2dvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLdouble *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib2fvARB(GLbyte * pc) -{ - CALL_VertexAttrib2fvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib2svARB(GLbyte * pc) -{ - CALL_VertexAttrib2svARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib3dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 28); - pc -= 4; - } -#endif - - CALL_VertexAttrib3dvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLdouble *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib3fvARB(GLbyte * pc) -{ - CALL_VertexAttrib3fvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib3svARB(GLbyte * pc) -{ - CALL_VertexAttrib3svARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4NbvARB(GLbyte * pc) -{ - CALL_VertexAttrib4NbvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLbyte *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4NivARB(GLbyte * pc) -{ - CALL_VertexAttrib4NivARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLint *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4NsvARB(GLbyte * pc) -{ - CALL_VertexAttrib4NsvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4NubvARB(GLbyte * pc) -{ - CALL_VertexAttrib4NubvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLubyte *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4NuivARB(GLbyte * pc) -{ - CALL_VertexAttrib4NuivARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLuint *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4NusvARB(GLbyte * pc) -{ - CALL_VertexAttrib4NusvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLushort *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4bvARB(GLbyte * pc) -{ - CALL_VertexAttrib4bvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLbyte *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 36); - pc -= 4; - } -#endif - - CALL_VertexAttrib4dvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLdouble *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4fvARB(GLbyte * pc) -{ - CALL_VertexAttrib4fvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4ivARB(GLbyte * pc) -{ - CALL_VertexAttrib4ivARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLint *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4svARB(GLbyte * pc) -{ - CALL_VertexAttrib4svARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4ubvARB(GLbyte * pc) -{ - CALL_VertexAttrib4ubvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLubyte *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4uivARB(GLbyte * pc) -{ - CALL_VertexAttrib4uivARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLuint *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4usvARB(GLbyte * pc) -{ - CALL_VertexAttrib4usvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLushort *)(pc + 4) - ) ); -} - -void __glXDisp_BeginQueryARB(GLbyte * pc) -{ - CALL_BeginQueryARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4) - ) ); -} - -int __glXDisp_DeleteQueriesARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = *(GLsizei *)(pc + 0); - - CALL_DeleteQueriesARB( GET_DISPATCH(), ( - n, - (const GLuint *)(pc + 4) - ) ); - error = Success; - } - - return error; -} - -void __glXDisp_EndQueryARB(GLbyte * pc) -{ - CALL_EndQueryARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -int __glXDisp_GenQueriesARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = *(GLsizei *)(pc + 0); - - GLuint answerBuffer[200]; - GLuint * ids = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); - CALL_GenQueriesARB( GET_DISPATCH(), ( - n, - ids - ) ); - __glXSendReply(cl->client, ids, n, 4, GL_TRUE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetQueryObjectivARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetQueryObjectivARB_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetQueryObjectivARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetQueryObjectuivARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetQueryObjectuivARB_size(pname); - GLuint answerBuffer[200]; - GLuint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetQueryObjectuivARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetQueryivARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetQueryivARB_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetQueryivARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_IsQueryARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsQueryARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0) - ) ); - __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDisp_DrawBuffersARB(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 0); - - CALL_DrawBuffersARB( GET_DISPATCH(), ( - n, - (const GLenum *)(pc + 4) - ) ); -} - -void __glXDisp_SampleMaskSGIS(GLbyte * pc) -{ - CALL_SampleMaskSGIS( GET_DISPATCH(), ( - *(GLclampf *)(pc + 0), - *(GLboolean *)(pc + 4) - ) ); -} - -void __glXDisp_SamplePatternSGIS(GLbyte * pc) -{ - CALL_SamplePatternSGIS( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -void __glXDisp_PointParameterfEXT(GLbyte * pc) -{ - CALL_PointParameterfEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_PointParameterfvEXT(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 0); - const GLfloat * params; - - params = (const GLfloat *) (pc + 4); - - CALL_PointParameterfvEXT( GET_DISPATCH(), ( - pname, - params - ) ); -} - -void __glXDisp_SecondaryColor3bvEXT(GLbyte * pc) -{ - CALL_SecondaryColor3bvEXT( GET_DISPATCH(), ( - (const GLbyte *)(pc + 0) - ) ); -} - -void __glXDisp_SecondaryColor3dvEXT(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 24); - pc -= 4; - } -#endif - - CALL_SecondaryColor3dvEXT( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_SecondaryColor3fvEXT(GLbyte * pc) -{ - CALL_SecondaryColor3fvEXT( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_SecondaryColor3ivEXT(GLbyte * pc) -{ - CALL_SecondaryColor3ivEXT( GET_DISPATCH(), ( - (const GLint *)(pc + 0) - ) ); -} - -void __glXDisp_SecondaryColor3svEXT(GLbyte * pc) -{ - CALL_SecondaryColor3svEXT( GET_DISPATCH(), ( - (const GLshort *)(pc + 0) - ) ); -} - -void __glXDisp_SecondaryColor3ubvEXT(GLbyte * pc) -{ - CALL_SecondaryColor3ubvEXT( GET_DISPATCH(), ( - (const GLubyte *)(pc + 0) - ) ); -} - -void __glXDisp_SecondaryColor3uivEXT(GLbyte * pc) -{ - CALL_SecondaryColor3uivEXT( GET_DISPATCH(), ( - (const GLuint *)(pc + 0) - ) ); -} - -void __glXDisp_SecondaryColor3usvEXT(GLbyte * pc) -{ - CALL_SecondaryColor3usvEXT( GET_DISPATCH(), ( - (const GLushort *)(pc + 0) - ) ); -} - -void __glXDisp_FogCoorddvEXT(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 8); - pc -= 4; - } -#endif - - CALL_FogCoorddvEXT( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_FogCoordfvEXT(GLbyte * pc) -{ - CALL_FogCoordfvEXT( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_BlendFuncSeparateEXT(GLbyte * pc) -{ - CALL_BlendFuncSeparateEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLenum *)(pc + 12) - ) ); -} - -void __glXDisp_WindowPos3fvMESA(GLbyte * pc) -{ - CALL_WindowPos3fvMESA( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -int __glXDisp_AreProgramsResidentNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = *(GLsizei *)(pc + 0); - - GLboolean retval; - GLboolean answerBuffer[200]; - GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); - retval = CALL_AreProgramsResidentNV( GET_DISPATCH(), ( - n, - (const GLuint *)(pc + 4), - residences - ) ); - __glXSendReply(cl->client, residences, n, 1, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDisp_BindProgramNV(GLbyte * pc) -{ - CALL_BindProgramNV( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4) - ) ); -} - -int __glXDisp_DeleteProgramsNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = *(GLsizei *)(pc + 0); - - CALL_DeleteProgramsNV( GET_DISPATCH(), ( - n, - (const GLuint *)(pc + 4) - ) ); - error = Success; - } - - return error; -} - -void __glXDisp_ExecuteProgramNV(GLbyte * pc) -{ - CALL_ExecuteProgramNV( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - (const GLfloat *)(pc + 8) - ) ); -} - -int __glXDisp_GenProgramsNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = *(GLsizei *)(pc + 0); - - GLuint answerBuffer[200]; - GLuint * programs = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); - CALL_GenProgramsNV( GET_DISPATCH(), ( - n, - programs - ) ); - __glXSendReply(cl->client, programs, n, 4, GL_TRUE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetProgramParameterdvNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLdouble params[4]; - CALL_GetProgramParameterdvNV( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - *(GLenum *)(pc + 8), - params - ) ); - __glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetProgramParameterfvNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLfloat params[4]; - CALL_GetProgramParameterfvNV( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - *(GLenum *)(pc + 8), - params - ) ); - __glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetProgramivNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetProgramivNV_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetProgramivNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetTrackMatrixivNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLint params[1]; - CALL_GetTrackMatrixivNV( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - *(GLenum *)(pc + 8), - params - ) ); - __glXSendReply(cl->client, params, 1, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetVertexAttribdvNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetVertexAttribdvNV_size(pname); - GLdouble answerBuffer[200]; - GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetVertexAttribdvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetVertexAttribfvNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetVertexAttribfvNV_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetVertexAttribfvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetVertexAttribivNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetVertexAttribivNV_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetVertexAttribivNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_IsProgramNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsProgramNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0) - ) ); - __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDisp_LoadProgramNV(GLbyte * pc) -{ - const GLsizei len = *(GLsizei *)(pc + 8); - - CALL_LoadProgramNV( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - len, - (const GLubyte *)(pc + 12) - ) ); -} - -void __glXDisp_ProgramParameters4dvNV(GLbyte * pc) -{ - const GLuint num = *(GLuint *)(pc + 8); - -#ifdef __GLX_ALIGN64 - const GLuint cmdlen = 16 + __GLX_PAD((num * 32)) - 4; - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, cmdlen); - pc -= 4; - } -#endif - - CALL_ProgramParameters4dvNV( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - num, - (const GLdouble *)(pc + 12) - ) ); -} - -void __glXDisp_ProgramParameters4fvNV(GLbyte * pc) -{ - const GLuint num = *(GLuint *)(pc + 8); - - CALL_ProgramParameters4fvNV( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - num, - (const GLfloat *)(pc + 12) - ) ); -} - -void __glXDisp_RequestResidentProgramsNV(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 0); - - CALL_RequestResidentProgramsNV( GET_DISPATCH(), ( - n, - (const GLuint *)(pc + 4) - ) ); -} - -void __glXDisp_TrackMatrixNV(GLbyte * pc) -{ - CALL_TrackMatrixNV( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLenum *)(pc + 12) - ) ); -} - -void __glXDisp_VertexAttrib1dvNV(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 12); - pc -= 4; - } -#endif - - CALL_VertexAttrib1dvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLdouble *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib1fvNV(GLbyte * pc) -{ - CALL_VertexAttrib1fvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib1svNV(GLbyte * pc) -{ - CALL_VertexAttrib1svNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib2dvNV(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 20); - pc -= 4; - } -#endif - - CALL_VertexAttrib2dvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLdouble *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib2fvNV(GLbyte * pc) -{ - CALL_VertexAttrib2fvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib2svNV(GLbyte * pc) -{ - CALL_VertexAttrib2svNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib3dvNV(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 28); - pc -= 4; - } -#endif - - CALL_VertexAttrib3dvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLdouble *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib3fvNV(GLbyte * pc) -{ - CALL_VertexAttrib3fvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib3svNV(GLbyte * pc) -{ - CALL_VertexAttrib3svNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4dvNV(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 36); - pc -= 4; - } -#endif - - CALL_VertexAttrib4dvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLdouble *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4fvNV(GLbyte * pc) -{ - CALL_VertexAttrib4fvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4svNV(GLbyte * pc) -{ - CALL_VertexAttrib4svNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4ubvNV(GLbyte * pc) -{ - CALL_VertexAttrib4ubvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLubyte *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttribs1dvNV(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 4); - -#ifdef __GLX_ALIGN64 - const GLuint cmdlen = 12 + __GLX_PAD((n * 8)) - 4; - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, cmdlen); - pc -= 4; - } -#endif - - CALL_VertexAttribs1dvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - n, - (const GLdouble *)(pc + 8) - ) ); -} - -void __glXDisp_VertexAttribs1fvNV(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 4); - - CALL_VertexAttribs1fvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - n, - (const GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_VertexAttribs1svNV(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 4); - - CALL_VertexAttribs1svNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - n, - (const GLshort *)(pc + 8) - ) ); -} - -void __glXDisp_VertexAttribs2dvNV(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 4); - -#ifdef __GLX_ALIGN64 - const GLuint cmdlen = 12 + __GLX_PAD((n * 16)) - 4; - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, cmdlen); - pc -= 4; - } -#endif - - CALL_VertexAttribs2dvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - n, - (const GLdouble *)(pc + 8) - ) ); -} - -void __glXDisp_VertexAttribs2fvNV(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 4); - - CALL_VertexAttribs2fvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - n, - (const GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_VertexAttribs2svNV(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 4); - - CALL_VertexAttribs2svNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - n, - (const GLshort *)(pc + 8) - ) ); -} - -void __glXDisp_VertexAttribs3dvNV(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 4); - -#ifdef __GLX_ALIGN64 - const GLuint cmdlen = 12 + __GLX_PAD((n * 24)) - 4; - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, cmdlen); - pc -= 4; - } -#endif - - CALL_VertexAttribs3dvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - n, - (const GLdouble *)(pc + 8) - ) ); -} - -void __glXDisp_VertexAttribs3fvNV(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 4); - - CALL_VertexAttribs3fvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - n, - (const GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_VertexAttribs3svNV(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 4); - - CALL_VertexAttribs3svNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - n, - (const GLshort *)(pc + 8) - ) ); -} - -void __glXDisp_VertexAttribs4dvNV(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 4); - -#ifdef __GLX_ALIGN64 - const GLuint cmdlen = 12 + __GLX_PAD((n * 32)) - 4; - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, cmdlen); - pc -= 4; - } -#endif - - CALL_VertexAttribs4dvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - n, - (const GLdouble *)(pc + 8) - ) ); -} - -void __glXDisp_VertexAttribs4fvNV(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 4); - - CALL_VertexAttribs4fvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - n, - (const GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_VertexAttribs4svNV(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 4); - - CALL_VertexAttribs4svNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - n, - (const GLshort *)(pc + 8) - ) ); -} - -void __glXDisp_VertexAttribs4ubvNV(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 4); - - CALL_VertexAttribs4ubvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - n, - (const GLubyte *)(pc + 8) - ) ); -} - -void __glXDisp_PointParameteriNV(GLbyte * pc) -{ - CALL_PointParameteriNV( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4) - ) ); -} - -void __glXDisp_PointParameterivNV(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 0); - const GLint * params; - - params = (const GLint *) (pc + 4); - - CALL_PointParameterivNV( GET_DISPATCH(), ( - pname, - params - ) ); -} - -void __glXDisp_ActiveStencilFaceEXT(GLbyte * pc) -{ - CALL_ActiveStencilFaceEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -int __glXDisp_GetProgramNamedParameterdvNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei len = *(GLsizei *)(pc + 4); - - GLdouble params[4]; - CALL_GetProgramNamedParameterdvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - len, - (const GLubyte *)(pc + 8), - params - ) ); - __glXSendReply(cl->client, params, 4, 8, GL_TRUE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetProgramNamedParameterfvNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei len = *(GLsizei *)(pc + 4); - - GLfloat params[4]; - CALL_GetProgramNamedParameterfvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - len, - (const GLubyte *)(pc + 8), - params - ) ); - __glXSendReply(cl->client, params, 4, 4, GL_TRUE, 0); - error = Success; - } - - return error; -} - -void __glXDisp_ProgramNamedParameter4dvNV(GLbyte * pc) -{ - const GLsizei len = *(GLsizei *)(pc + 36); - -#ifdef __GLX_ALIGN64 - const GLuint cmdlen = 44 + __GLX_PAD(len) - 4; - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, cmdlen); - pc -= 4; - } -#endif - - CALL_ProgramNamedParameter4dvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 32), - len, - (const GLubyte *)(pc + 40), - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_ProgramNamedParameter4fvNV(GLbyte * pc) -{ - const GLsizei len = *(GLsizei *)(pc + 4); - - CALL_ProgramNamedParameter4fvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - len, - (const GLubyte *)(pc + 24), - (const GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_BlendEquationSeparateEXT(GLbyte * pc) -{ - CALL_BlendEquationSeparateEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4) - ) ); -} - -void __glXDisp_BindFramebufferEXT(GLbyte * pc) -{ - CALL_BindFramebufferEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4) - ) ); -} - -void __glXDisp_BindRenderbufferEXT(GLbyte * pc) -{ - CALL_BindRenderbufferEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4) - ) ); -} - -int __glXDisp_CheckFramebufferStatusEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLenum retval; - retval = CALL_CheckFramebufferStatusEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); - __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDisp_DeleteFramebuffersEXT(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 0); - - CALL_DeleteFramebuffersEXT( GET_DISPATCH(), ( - n, - (const GLuint *)(pc + 4) - ) ); -} - -void __glXDisp_DeleteRenderbuffersEXT(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 0); - - CALL_DeleteRenderbuffersEXT( GET_DISPATCH(), ( - n, - (const GLuint *)(pc + 4) - ) ); -} - -void __glXDisp_FramebufferRenderbufferEXT(GLbyte * pc) -{ - CALL_FramebufferRenderbufferEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLuint *)(pc + 12) - ) ); -} - -void __glXDisp_FramebufferTexture1DEXT(GLbyte * pc) -{ - CALL_FramebufferTexture1DEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLuint *)(pc + 12), - *(GLint *)(pc + 16) - ) ); -} - -void __glXDisp_FramebufferTexture2DEXT(GLbyte * pc) -{ - CALL_FramebufferTexture2DEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLuint *)(pc + 12), - *(GLint *)(pc + 16) - ) ); -} - -void __glXDisp_FramebufferTexture3DEXT(GLbyte * pc) -{ - CALL_FramebufferTexture3DEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLuint *)(pc + 12), - *(GLint *)(pc + 16), - *(GLint *)(pc + 20) - ) ); -} - -int __glXDisp_GenFramebuffersEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = *(GLsizei *)(pc + 0); - - GLuint answerBuffer[200]; - GLuint * framebuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); - CALL_GenFramebuffersEXT( GET_DISPATCH(), ( - n, - framebuffers - ) ); - __glXSendReply(cl->client, framebuffers, n, 4, GL_TRUE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GenRenderbuffersEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = *(GLsizei *)(pc + 0); - - GLuint answerBuffer[200]; - GLuint * renderbuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); - CALL_GenRenderbuffersEXT( GET_DISPATCH(), ( - n, - renderbuffers - ) ); - __glXSendReply(cl->client, renderbuffers, n, 4, GL_TRUE, 0); - error = Success; - } - - return error; -} - -void __glXDisp_GenerateMipmapEXT(GLbyte * pc) -{ - CALL_GenerateMipmapEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -int __glXDisp_GetFramebufferAttachmentParameterivEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLint params[1]; - CALL_GetFramebufferAttachmentParameterivEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLenum *)(pc + 8), - params - ) ); - __glXSendReply(cl->client, params, 1, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetRenderbufferParameterivEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLint params[1]; - CALL_GetRenderbufferParameterivEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - params - ) ); - __glXSendReply(cl->client, params, 1, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_IsFramebufferEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsFramebufferEXT( GET_DISPATCH(), ( - *(GLuint *)(pc + 0) - ) ); - __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -int __glXDisp_IsRenderbufferEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsRenderbufferEXT( GET_DISPATCH(), ( - *(GLuint *)(pc + 0) - ) ); - __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDisp_RenderbufferStorageEXT(GLbyte * pc) -{ - CALL_RenderbufferStorageEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLsizei *)(pc + 8), - *(GLsizei *)(pc + 12) - ) ); -} - diff --git a/GL/glx/indirect_dispatch.h b/GL/glx/indirect_dispatch.h deleted file mode 100644 index e81c382f0..000000000 --- a/GL/glx/indirect_dispatch.h +++ /dev/null @@ -1,1047 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by glX_proto_recv.py (from Mesa) script */ - -/* - * (C) Copyright IBM Corporation 2005 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * IBM, - * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#if !defined( _INDIRECT_DISPATCH_H_ ) -# define _INDIRECT_DISPATCH_H_ - -# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) -# define HIDDEN __attribute__((visibility("hidden"))) -# else -# define HIDDEN -# endif -struct __GLXclientStateRec; - -extern HIDDEN void __glXDisp_MapGrid1d(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MapGrid1d(GLbyte * pc); -extern HIDDEN void __glXDisp_MapGrid1f(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MapGrid1f(GLbyte * pc); -extern HIDDEN int __glXDisp_NewList(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_NewList(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_LoadIdentity(GLbyte * pc); -extern HIDDEN void __glXDispSwap_LoadIdentity(GLbyte * pc); -extern HIDDEN void __glXDisp_SampleCoverageARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_SampleCoverageARB(GLbyte * pc); -extern HIDDEN void __glXDisp_ConvolutionFilter1D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ConvolutionFilter1D(GLbyte * pc); -extern HIDDEN void __glXDisp_BeginQueryARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_BeginQueryARB(GLbyte * pc); -extern HIDDEN void __glXDisp_RasterPos3dv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_RasterPos3dv(GLbyte * pc); -extern HIDDEN void __glXDisp_PointParameteriNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PointParameteriNV(GLbyte * pc); -extern HIDDEN void __glXDisp_TexCoord1iv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexCoord1iv(GLbyte * pc); -extern HIDDEN void __glXDisp_TexCoord4sv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexCoord4sv(GLbyte * pc); -extern HIDDEN void __glXDisp_ActiveTextureARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ActiveTextureARB(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib4ubvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4ubvNV(GLbyte * pc); -extern HIDDEN int __glXDisp_GetProgramNamedParameterdvNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetProgramNamedParameterdvNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Histogram(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Histogram(GLbyte * pc); -extern HIDDEN int __glXDisp_GetMapfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetMapfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_RasterPos4dv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_RasterPos4dv(GLbyte * pc); -extern HIDDEN void __glXDisp_PolygonStipple(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PolygonStipple(GLbyte * pc); -extern HIDDEN void __glXDisp_BlendEquationSeparateEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_BlendEquationSeparateEXT(GLbyte * pc); -extern HIDDEN int __glXDisp_GetPixelMapfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetPixelMapfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Color3uiv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color3uiv(GLbyte * pc); -extern HIDDEN int __glXDisp_IsEnabled(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_IsEnabled(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_VertexAttrib4svNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4svNV(GLbyte * pc); -extern HIDDEN void __glXDisp_EvalCoord2fv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_EvalCoord2fv(GLbyte * pc); -extern HIDDEN int __glXDisp_DestroyPixmap(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_DestroyPixmap(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetMapiv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetMapiv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_SwapBuffers(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_SwapBuffers(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Indexubv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Indexubv(GLbyte * pc); -extern HIDDEN int __glXDisp_Render(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_Render(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetQueryivARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetQueryivARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_TexImage3D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexImage3D(GLbyte * pc); -extern HIDDEN int __glXDisp_MakeContextCurrent(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_MakeContextCurrent(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetFBConfigs(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetFBConfigs(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Color3ubv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color3ubv(GLbyte * pc); -extern HIDDEN int __glXDisp_GetQueryObjectivARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetQueryObjectivARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Vertex3dv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Vertex3dv(GLbyte * pc); -extern HIDDEN void __glXDisp_CompressedTexSubImage2DARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CompressedTexSubImage2DARB(GLbyte * pc); -extern HIDDEN void __glXDisp_LightModeliv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_LightModeliv(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib1svARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib1svARB(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttribs1dvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttribs1dvNV(GLbyte * pc); -extern HIDDEN void __glXDisp_Normal3bv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Normal3bv(GLbyte * pc); -extern HIDDEN int __glXDisp_VendorPrivate(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_VendorPrivate(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_CreateGLXPixmapWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_CreateGLXPixmapWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_VertexAttrib1fvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib1fvNV(GLbyte * pc); -extern HIDDEN void __glXDisp_Vertex3iv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Vertex3iv(GLbyte * pc); -extern HIDDEN void __glXDisp_CopyConvolutionFilter1D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CopyConvolutionFilter1D(GLbyte * pc); -extern HIDDEN void __glXDisp_BlendColor(GLbyte * pc); -extern HIDDEN void __glXDispSwap_BlendColor(GLbyte * pc); -extern HIDDEN void __glXDisp_Scalef(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Scalef(GLbyte * pc); -extern HIDDEN void __glXDisp_Normal3iv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Normal3iv(GLbyte * pc); -extern HIDDEN void __glXDisp_PassThrough(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PassThrough(GLbyte * pc); -extern HIDDEN void __glXDisp_Viewport(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Viewport(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib4NusvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4NusvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_CopyTexSubImage2D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CopyTexSubImage2D(GLbyte * pc); -extern HIDDEN void __glXDisp_DepthRange(GLbyte * pc); -extern HIDDEN void __glXDispSwap_DepthRange(GLbyte * pc); -extern HIDDEN void __glXDisp_ResetHistogram(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ResetHistogram(GLbyte * pc); -extern HIDDEN int __glXDisp_GetProgramNamedParameterfvNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetProgramNamedParameterfvNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_PointParameterfEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PointParameterfEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_TexCoord2sv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexCoord2sv(GLbyte * pc); -extern HIDDEN void __glXDisp_Vertex4dv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Vertex4dv(GLbyte * pc); -extern HIDDEN void __glXDisp_CompressedTexImage3DARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CompressedTexImage3DARB(GLbyte * pc); -extern HIDDEN void __glXDisp_Color3sv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color3sv(GLbyte * pc); -extern HIDDEN int __glXDisp_GetConvolutionParameteriv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetConvolutionParameteriv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetConvolutionParameterivEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetConvolutionParameterivEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Vertex2dv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Vertex2dv(GLbyte * pc); -extern HIDDEN int __glXDisp_GetVisualConfigs(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetVisualConfigs(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_MultiTexCoord1fvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultiTexCoord1fvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_TexCoord3iv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexCoord3iv(GLbyte * pc); -extern HIDDEN int __glXDisp_CopyContext(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_CopyContext(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Color3fv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color3fv(GLbyte * pc); -extern HIDDEN void __glXDisp_PointSize(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PointSize(GLbyte * pc); -extern HIDDEN void __glXDisp_PopName(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PopName(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib4NbvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4NbvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_Vertex4sv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Vertex4sv(GLbyte * pc); -extern HIDDEN int __glXDisp_GetTexEnvfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetTexEnvfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_LineStipple(GLbyte * pc); -extern HIDDEN void __glXDispSwap_LineStipple(GLbyte * pc); -extern HIDDEN void __glXDisp_TexEnvi(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexEnvi(GLbyte * pc); -extern HIDDEN int __glXDisp_GetClipPlane(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetClipPlane(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_VertexAttribs3dvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttribs3dvNV(GLbyte * pc); -extern HIDDEN void __glXDisp_LightModeli(GLbyte * pc); -extern HIDDEN void __glXDispSwap_LightModeli(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttribs4fvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttribs4fvNV(GLbyte * pc); -extern HIDDEN void __glXDisp_Scaled(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Scaled(GLbyte * pc); -extern HIDDEN void __glXDisp_CallLists(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CallLists(GLbyte * pc); -extern HIDDEN void __glXDisp_AlphaFunc(GLbyte * pc); -extern HIDDEN void __glXDispSwap_AlphaFunc(GLbyte * pc); -extern HIDDEN void __glXDisp_TexCoord2iv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexCoord2iv(GLbyte * pc); -extern HIDDEN void __glXDisp_CompressedTexImage1DARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CompressedTexImage1DARB(GLbyte * pc); -extern HIDDEN void __glXDisp_Rotated(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Rotated(GLbyte * pc); -extern HIDDEN int __glXDisp_ReadPixels(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_ReadPixels(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_EdgeFlagv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_EdgeFlagv(GLbyte * pc); -extern HIDDEN void __glXDisp_TexParameterf(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexParameterf(GLbyte * pc); -extern HIDDEN void __glXDisp_TexParameteri(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexParameteri(GLbyte * pc); -extern HIDDEN int __glXDisp_DestroyContext(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_DestroyContext(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_DrawPixels(GLbyte * pc); -extern HIDDEN void __glXDispSwap_DrawPixels(GLbyte * pc); -extern HIDDEN void __glXDisp_MultiTexCoord2svARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultiTexCoord2svARB(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttribs3fvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttribs3fvNV(GLbyte * pc); -extern HIDDEN void __glXDisp_GenerateMipmapEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_GenerateMipmapEXT(GLbyte * pc); -extern HIDDEN int __glXDisp_GenLists(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GenLists(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_MapGrid2d(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MapGrid2d(GLbyte * pc); -extern HIDDEN void __glXDisp_MapGrid2f(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MapGrid2f(GLbyte * pc); -extern HIDDEN void __glXDisp_Scissor(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Scissor(GLbyte * pc); -extern HIDDEN void __glXDisp_Fogf(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Fogf(GLbyte * pc); -extern HIDDEN void __glXDisp_TexSubImage1D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexSubImage1D(GLbyte * pc); -extern HIDDEN void __glXDisp_Color4usv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color4usv(GLbyte * pc); -extern HIDDEN void __glXDisp_Fogi(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Fogi(GLbyte * pc); -extern HIDDEN void __glXDisp_RasterPos3iv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_RasterPos3iv(GLbyte * pc); -extern HIDDEN void __glXDisp_PixelMapfv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PixelMapfv(GLbyte * pc); -extern HIDDEN void __glXDisp_Color3usv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color3usv(GLbyte * pc); -extern HIDDEN int __glXDisp_AreTexturesResident(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_AreTexturesResident(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_AreTexturesResidentEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_AreTexturesResidentEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_IsRenderbufferEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_IsRenderbufferEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_PointParameterfvEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PointParameterfvEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_Color3bv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color3bv(GLbyte * pc); -extern HIDDEN void __glXDisp_SecondaryColor3bvEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_SecondaryColor3bvEXT(GLbyte * pc); -extern HIDDEN int __glXDisp_GetProgramLocalParameterfvARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetProgramLocalParameterfvARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_RenderbufferStorageEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_RenderbufferStorageEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_ColorTable(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ColorTable(GLbyte * pc); -extern HIDDEN void __glXDisp_Accum(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Accum(GLbyte * pc); -extern HIDDEN int __glXDisp_GetTexImage(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetTexImage(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_ConvolutionFilter2D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ConvolutionFilter2D(GLbyte * pc); -extern HIDDEN int __glXDisp_Finish(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_Finish(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_ClearStencil(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ClearStencil(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib3dvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib3dvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttribs4ubvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttribs4ubvNV(GLbyte * pc); -extern HIDDEN void __glXDisp_ConvolutionParameteriv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ConvolutionParameteriv(GLbyte * pc); -extern HIDDEN void __glXDisp_RasterPos2fv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_RasterPos2fv(GLbyte * pc); -extern HIDDEN void __glXDisp_TexCoord1fv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexCoord1fv(GLbyte * pc); -extern HIDDEN void __glXDisp_ProgramEnvParameter4fvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ProgramEnvParameter4fvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_RasterPos4fv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_RasterPos4fv(GLbyte * pc); -extern HIDDEN void __glXDisp_ClearIndex(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ClearIndex(GLbyte * pc); -extern HIDDEN void __glXDisp_LoadMatrixd(GLbyte * pc); -extern HIDDEN void __glXDispSwap_LoadMatrixd(GLbyte * pc); -extern HIDDEN void __glXDisp_PushMatrix(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PushMatrix(GLbyte * pc); -extern HIDDEN void __glXDisp_ConvolutionParameterfv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ConvolutionParameterfv(GLbyte * pc); -extern HIDDEN int __glXDisp_GetTexGendv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetTexGendv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_LoadProgramNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_LoadProgramNV(GLbyte * pc); -extern HIDDEN int __glXDisp_EndList(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_EndList(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_VertexAttrib4fvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4fvNV(GLbyte * pc); -extern HIDDEN void __glXDisp_EvalCoord1fv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_EvalCoord1fv(GLbyte * pc); -extern HIDDEN void __glXDisp_EvalMesh2(GLbyte * pc); -extern HIDDEN void __glXDispSwap_EvalMesh2(GLbyte * pc); -extern HIDDEN void __glXDisp_Vertex4fv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Vertex4fv(GLbyte * pc); -extern HIDDEN int __glXDisp_CheckFramebufferStatusEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_CheckFramebufferStatusEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetVertexAttribivARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetVertexAttribivARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetFBConfigsSGIX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetFBConfigsSGIX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_CreateNewContext(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_CreateNewContext(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetMinmax(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetMinmax(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetMinmaxEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetMinmaxEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetVertexAttribdvNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetVertexAttribdvNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Normal3fv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Normal3fv(GLbyte * pc); -extern HIDDEN void __glXDisp_ProgramEnvParameter4dvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ProgramEnvParameter4dvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib4ivARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4ivARB(GLbyte * pc); -extern HIDDEN void __glXDisp_End(GLbyte * pc); -extern HIDDEN void __glXDispSwap_End(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttribs2dvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttribs2dvNV(GLbyte * pc); -extern HIDDEN void __glXDisp_MultiTexCoord3fvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultiTexCoord3fvARB(GLbyte * pc); -extern HIDDEN int __glXDisp_GetProgramParameterfvNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetProgramParameterfvNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_BindTexture(GLbyte * pc); -extern HIDDEN void __glXDispSwap_BindTexture(GLbyte * pc); -extern HIDDEN void __glXDisp_TexSubImage2D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexSubImage2D(GLbyte * pc); -extern HIDDEN void __glXDisp_DeleteRenderbuffersEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_DeleteRenderbuffersEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_TexGenfv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexGenfv(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib4bvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4bvARB(GLbyte * pc); -extern HIDDEN int __glXDisp_CreateContextWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_CreateContextWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_FramebufferTexture3DEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_FramebufferTexture3DEXT(GLbyte * pc); -extern HIDDEN int __glXDisp_CopySubBufferMESA(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_CopySubBufferMESA(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_BlendEquation(GLbyte * pc); -extern HIDDEN void __glXDispSwap_BlendEquation(GLbyte * pc); -extern HIDDEN int __glXDisp_GetError(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetError(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_TexCoord3dv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexCoord3dv(GLbyte * pc); -extern HIDDEN void __glXDisp_Indexdv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Indexdv(GLbyte * pc); -extern HIDDEN void __glXDisp_PushName(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PushName(GLbyte * pc); -extern HIDDEN void __glXDisp_MultiTexCoord2dvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultiTexCoord2dvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_ProgramNamedParameter4fvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ProgramNamedParameter4fvNV(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib4fvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4fvARB(GLbyte * pc); -extern HIDDEN int __glXDisp_CreateGLXPbufferSGIX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_CreateGLXPbufferSGIX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_MultiTexCoord1svARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultiTexCoord1svARB(GLbyte * pc); -extern HIDDEN void __glXDisp_EndQueryARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_EndQueryARB(GLbyte * pc); -extern HIDDEN void __glXDisp_DepthMask(GLbyte * pc); -extern HIDDEN void __glXDispSwap_DepthMask(GLbyte * pc); -extern HIDDEN void __glXDisp_Color4iv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color4iv(GLbyte * pc); -extern HIDDEN int __glXDisp_GetMaterialiv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetMaterialiv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_StencilOp(GLbyte * pc); -extern HIDDEN void __glXDispSwap_StencilOp(GLbyte * pc); -extern HIDDEN void __glXDisp_MultiTexCoord3svARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultiTexCoord3svARB(GLbyte * pc); -extern HIDDEN void __glXDisp_TexEnvfv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexEnvfv(GLbyte * pc); -extern HIDDEN int __glXDisp_QueryServerString(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_QueryServerString(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_LoadMatrixf(GLbyte * pc); -extern HIDDEN void __glXDispSwap_LoadMatrixf(GLbyte * pc); -extern HIDDEN void __glXDisp_Color4bv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color4bv(GLbyte * pc); -extern HIDDEN void __glXDisp_SecondaryColor3usvEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_SecondaryColor3usvEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib2fvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib2fvNV(GLbyte * pc); -extern HIDDEN void __glXDisp_ProgramLocalParameter4dvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ProgramLocalParameter4dvARB(GLbyte * pc); -extern HIDDEN int __glXDisp_DeleteLists(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_DeleteLists(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_LogicOp(GLbyte * pc); -extern HIDDEN void __glXDispSwap_LogicOp(GLbyte * pc); -extern HIDDEN void __glXDisp_TexCoord4fv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexCoord4fv(GLbyte * pc); -extern HIDDEN int __glXDisp_WaitX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_WaitX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_SecondaryColor3uivEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_SecondaryColor3uivEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_FramebufferRenderbufferEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_FramebufferRenderbufferEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib1dvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib1dvNV(GLbyte * pc); -extern HIDDEN int __glXDisp_GenTextures(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GenTextures(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GenTexturesEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GenTexturesEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_FramebufferTexture1DEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_FramebufferTexture1DEXT(GLbyte * pc); -extern HIDDEN int __glXDisp_GetDrawableAttributes(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetDrawableAttributes(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_RasterPos2sv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_RasterPos2sv(GLbyte * pc); -extern HIDDEN void __glXDisp_Color4ubv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color4ubv(GLbyte * pc); -extern HIDDEN void __glXDisp_DrawBuffer(GLbyte * pc); -extern HIDDEN void __glXDispSwap_DrawBuffer(GLbyte * pc); -extern HIDDEN void __glXDisp_TexCoord2fv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexCoord2fv(GLbyte * pc); -extern HIDDEN void __glXDisp_TexCoord1sv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexCoord1sv(GLbyte * pc); -extern HIDDEN void __glXDisp_TexGeniv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexGeniv(GLbyte * pc); -extern HIDDEN void __glXDisp_DepthFunc(GLbyte * pc); -extern HIDDEN void __glXDispSwap_DepthFunc(GLbyte * pc); -extern HIDDEN void __glXDisp_PixelMapusv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PixelMapusv(GLbyte * pc); -extern HIDDEN void __glXDisp_PointParameterivNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PointParameterivNV(GLbyte * pc); -extern HIDDEN void __glXDisp_BlendFunc(GLbyte * pc); -extern HIDDEN void __glXDispSwap_BlendFunc(GLbyte * pc); -extern HIDDEN int __glXDisp_WaitGL(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_WaitGL(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_MultiTexCoord3dvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultiTexCoord3dvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_ProgramNamedParameter4dvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ProgramNamedParameter4dvNV(GLbyte * pc); -extern HIDDEN int __glXDisp_Flush(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_Flush(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Color4uiv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color4uiv(GLbyte * pc); -extern HIDDEN void __glXDisp_RasterPos3sv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_RasterPos3sv(GLbyte * pc); -extern HIDDEN void __glXDisp_BindFramebufferEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_BindFramebufferEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_PushAttrib(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PushAttrib(GLbyte * pc); -extern HIDDEN int __glXDisp_DestroyPbuffer(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_DestroyPbuffer(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_TexParameteriv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexParameteriv(GLbyte * pc); -extern HIDDEN void __glXDisp_WindowPos3fvMESA(GLbyte * pc); -extern HIDDEN void __glXDispSwap_WindowPos3fvMESA(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib1svNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib1svNV(GLbyte * pc); -extern HIDDEN int __glXDisp_QueryExtensionsString(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_QueryExtensionsString(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_RasterPos3fv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_RasterPos3fv(GLbyte * pc); -extern HIDDEN void __glXDisp_CopyTexSubImage3D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CopyTexSubImage3D(GLbyte * pc); -extern HIDDEN int __glXDisp_GetColorTable(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetColorTable(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetColorTableSGI(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetColorTableSGI(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Indexiv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Indexiv(GLbyte * pc); -extern HIDDEN int __glXDisp_CreateContext(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_CreateContext(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_CopyColorTable(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CopyColorTable(GLbyte * pc); -extern HIDDEN int __glXDisp_GetHistogramParameterfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetHistogramParameterfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetHistogramParameterfvEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetHistogramParameterfvEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Frustum(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Frustum(GLbyte * pc); -extern HIDDEN int __glXDisp_GetString(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetString(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_CreateGLXPixmap(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_CreateGLXPixmap(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_TexEnvf(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexEnvf(GLbyte * pc); -extern HIDDEN int __glXDisp_GetProgramStringARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetProgramStringARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_MultiTexCoord3ivARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultiTexCoord3ivARB(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib1dvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib1dvARB(GLbyte * pc); -extern HIDDEN int __glXDisp_DeleteTextures(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_DeleteTextures(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_DeleteTexturesEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_DeleteTexturesEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetTexLevelParameteriv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetTexLevelParameteriv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_ClearAccum(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ClearAccum(GLbyte * pc); -extern HIDDEN int __glXDisp_QueryVersion(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_QueryVersion(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetVertexAttribfvARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetVertexAttribfvARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_SecondaryColor3ivEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_SecondaryColor3ivEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_TexCoord4iv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexCoord4iv(GLbyte * pc); -extern HIDDEN int __glXDisp_GetDrawableAttributesSGIX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetDrawableAttributesSGIX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_SampleMaskSGIS(GLbyte * pc); -extern HIDDEN void __glXDispSwap_SampleMaskSGIS(GLbyte * pc); -extern HIDDEN void __glXDisp_ColorTableParameteriv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ColorTableParameteriv(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib4ubvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4ubvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_CopyTexImage2D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CopyTexImage2D(GLbyte * pc); -extern HIDDEN void __glXDisp_Lightfv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Lightfv(GLbyte * pc); -extern HIDDEN void __glXDisp_ClearDepth(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ClearDepth(GLbyte * pc); -extern HIDDEN void __glXDisp_ColorSubTable(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ColorSubTable(GLbyte * pc); -extern HIDDEN void __glXDisp_Color4fv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color4fv(GLbyte * pc); -extern HIDDEN void __glXDisp_MultiTexCoord4ivARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultiTexCoord4ivARB(GLbyte * pc); -extern HIDDEN int __glXDisp_CreatePixmap(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_CreatePixmap(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Lightiv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Lightiv(GLbyte * pc); -extern HIDDEN int __glXDisp_GetQueryObjectuivARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetQueryObjectuivARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetTexParameteriv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetTexParameteriv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GenRenderbuffersEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GenRenderbuffersEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_VertexAttrib2dvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib2dvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttribs2svNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttribs2svNV(GLbyte * pc); -extern HIDDEN void __glXDisp_Rectdv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Rectdv(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib4NivARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4NivARB(GLbyte * pc); -extern HIDDEN void __glXDisp_Materialiv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Materialiv(GLbyte * pc); -extern HIDDEN void __glXDisp_SecondaryColor3fvEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_SecondaryColor3fvEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_PolygonMode(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PolygonMode(GLbyte * pc); -extern HIDDEN void __glXDisp_CompressedTexSubImage1DARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CompressedTexSubImage1DARB(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib2dvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib2dvNV(GLbyte * pc); -extern HIDDEN int __glXDisp_GetVertexAttribivNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetVertexAttribivNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_IsQueryARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_IsQueryARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_TexGeni(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexGeni(GLbyte * pc); -extern HIDDEN void __glXDisp_TexGenf(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexGenf(GLbyte * pc); -extern HIDDEN void __glXDisp_TexGend(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexGend(GLbyte * pc); -extern HIDDEN int __glXDisp_GetPolygonStipple(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetPolygonStipple(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetVertexAttribfvNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetVertexAttribfvNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_VertexAttrib2svNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib2svNV(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttribs1fvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttribs1fvNV(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib4NuivARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4NuivARB(GLbyte * pc); -extern HIDDEN int __glXDisp_DestroyWindow(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_DestroyWindow(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Color4sv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color4sv(GLbyte * pc); -extern HIDDEN int __glXDisp_IsProgramNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_IsProgramNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_PixelZoom(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PixelZoom(GLbyte * pc); -extern HIDDEN void __glXDisp_ColorTableParameterfv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ColorTableParameterfv(GLbyte * pc); -extern HIDDEN void __glXDisp_PixelMapuiv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PixelMapuiv(GLbyte * pc); -extern HIDDEN void __glXDisp_Color3dv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color3dv(GLbyte * pc); -extern HIDDEN int __glXDisp_IsTexture(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_IsTexture(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_IsTextureEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_IsTextureEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_DeleteQueriesARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_DeleteQueriesARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetMapdv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetMapdv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_DestroyGLXPixmap(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_DestroyGLXPixmap(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_SamplePatternSGIS(GLbyte * pc); -extern HIDDEN void __glXDispSwap_SamplePatternSGIS(GLbyte * pc); -extern HIDDEN int __glXDisp_PixelStoref(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_PixelStoref(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_PrioritizeTextures(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PrioritizeTextures(GLbyte * pc); -extern HIDDEN int __glXDisp_PixelStorei(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_PixelStorei(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_VertexAttrib4usvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4usvARB(GLbyte * pc); -extern HIDDEN int __glXDisp_DestroyGLXPbufferSGIX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_DestroyGLXPbufferSGIX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_EvalCoord2dv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_EvalCoord2dv(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib3svARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib3svARB(GLbyte * pc); -extern HIDDEN void __glXDisp_ColorMaterial(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ColorMaterial(GLbyte * pc); -extern HIDDEN void __glXDisp_CompressedTexSubImage3DARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CompressedTexSubImage3DARB(GLbyte * pc); -extern HIDDEN int __glXDisp_IsFramebufferEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_IsFramebufferEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetVertexAttribdvARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetVertexAttribdvARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetSeparableFilter(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetSeparableFilter(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetSeparableFilterEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetSeparableFilterEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_RequestResidentProgramsNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_RequestResidentProgramsNV(GLbyte * pc); -extern HIDDEN int __glXDisp_FeedbackBuffer(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_FeedbackBuffer(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_RasterPos2iv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_RasterPos2iv(GLbyte * pc); -extern HIDDEN void __glXDisp_TexImage1D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexImage1D(GLbyte * pc); -extern HIDDEN void __glXDisp_FrontFace(GLbyte * pc); -extern HIDDEN void __glXDispSwap_FrontFace(GLbyte * pc); -extern HIDDEN int __glXDisp_RenderLarge(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_RenderLarge(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_VertexAttrib4dvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4dvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_PolygonOffset(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PolygonOffset(GLbyte * pc); -extern HIDDEN void __glXDisp_ExecuteProgramNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ExecuteProgramNV(GLbyte * pc); -extern HIDDEN void __glXDisp_Normal3dv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Normal3dv(GLbyte * pc); -extern HIDDEN void __glXDisp_Lightf(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Lightf(GLbyte * pc); -extern HIDDEN void __glXDisp_MatrixMode(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MatrixMode(GLbyte * pc); -extern HIDDEN void __glXDisp_FramebufferTexture2DEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_FramebufferTexture2DEXT(GLbyte * pc); -extern HIDDEN int __glXDisp_GetPixelMapusv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetPixelMapusv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Lighti(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Lighti(GLbyte * pc); -extern HIDDEN int __glXDisp_GetFramebufferAttachmentParameterivEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetFramebufferAttachmentParameterivEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_ChangeDrawableAttributesSGIX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_ChangeDrawableAttributesSGIX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_MultiTexCoord4dvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultiTexCoord4dvARB(GLbyte * pc); -extern HIDDEN int __glXDisp_CreatePbuffer(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_CreatePbuffer(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetDoublev(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetDoublev(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_MultMatrixd(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultMatrixd(GLbyte * pc); -extern HIDDEN void __glXDisp_MultMatrixf(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultMatrixf(GLbyte * pc); -extern HIDDEN void __glXDisp_MultiTexCoord4fvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultiTexCoord4fvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_TrackMatrixNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TrackMatrixNV(GLbyte * pc); -extern HIDDEN void __glXDisp_RasterPos4sv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_RasterPos4sv(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib4NsvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4NsvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib3fvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib3fvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_ClearColor(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ClearColor(GLbyte * pc); -extern HIDDEN int __glXDisp_IsDirect(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_IsDirect(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_DeleteFramebuffersEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_DeleteFramebuffersEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_TexEnviv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexEnviv(GLbyte * pc); -extern HIDDEN void __glXDisp_TexSubImage3D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexSubImage3D(GLbyte * pc); -extern HIDDEN int __glXDisp_SwapIntervalSGI(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_SwapIntervalSGI(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetColorTableParameterfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetColorTableParameterfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetColorTableParameterfvSGI(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetColorTableParameterfvSGI(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Bitmap(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Bitmap(GLbyte * pc); -extern HIDDEN int __glXDisp_GetTexLevelParameterfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetTexLevelParameterfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GenFramebuffersEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GenFramebuffersEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetProgramParameterdvNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetProgramParameterdvNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Vertex2sv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Vertex2sv(GLbyte * pc); -extern HIDDEN int __glXDisp_GetIntegerv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetIntegerv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetProgramEnvParameterfvARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetProgramEnvParameterfvARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetTrackMatrixivNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetTrackMatrixivNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_VertexAttrib3svNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib3svNV(GLbyte * pc); -extern HIDDEN int __glXDisp_GetTexEnviv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetTexEnviv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_VendorPrivateWithReply(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_VendorPrivateWithReply(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_SeparableFilter2D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_SeparableFilter2D(GLbyte * pc); -extern HIDDEN void __glXDisp_Map1d(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Map1d(GLbyte * pc); -extern HIDDEN void __glXDisp_Map1f(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Map1f(GLbyte * pc); -extern HIDDEN void __glXDisp_CompressedTexImage2DARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CompressedTexImage2DARB(GLbyte * pc); -extern HIDDEN void __glXDisp_TexImage2D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexImage2D(GLbyte * pc); -extern HIDDEN void __glXDisp_ProgramParameters4fvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ProgramParameters4fvNV(GLbyte * pc); -extern HIDDEN int __glXDisp_GetProgramivNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetProgramivNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_ChangeDrawableAttributes(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_ChangeDrawableAttributes(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetMinmaxParameteriv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetMinmaxParameteriv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetMinmaxParameterivEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetMinmaxParameterivEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_PixelTransferf(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PixelTransferf(GLbyte * pc); -extern HIDDEN void __glXDisp_CopyTexImage1D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CopyTexImage1D(GLbyte * pc); -extern HIDDEN void __glXDisp_RasterPos2dv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_RasterPos2dv(GLbyte * pc); -extern HIDDEN void __glXDisp_Fogiv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Fogiv(GLbyte * pc); -extern HIDDEN void __glXDisp_TexCoord1dv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexCoord1dv(GLbyte * pc); -extern HIDDEN void __glXDisp_PixelTransferi(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PixelTransferi(GLbyte * pc); -extern HIDDEN void __glXDisp_SecondaryColor3ubvEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_SecondaryColor3ubvEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib3fvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib3fvNV(GLbyte * pc); -extern HIDDEN void __glXDisp_Clear(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Clear(GLbyte * pc); -extern HIDDEN void __glXDisp_ReadBuffer(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ReadBuffer(GLbyte * pc); -extern HIDDEN void __glXDisp_ConvolutionParameteri(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ConvolutionParameteri(GLbyte * pc); -extern HIDDEN void __glXDisp_Ortho(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Ortho(GLbyte * pc); -extern HIDDEN void __glXDisp_ListBase(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ListBase(GLbyte * pc); -extern HIDDEN void __glXDisp_ConvolutionParameterf(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ConvolutionParameterf(GLbyte * pc); -extern HIDDEN int __glXDisp_GetColorTableParameteriv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetColorTableParameteriv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetColorTableParameterivSGI(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetColorTableParameterivSGI(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_ReleaseTexImageEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_ReleaseTexImageEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_CallList(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CallList(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttribs2fvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttribs2fvNV(GLbyte * pc); -extern HIDDEN void __glXDisp_Rectiv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Rectiv(GLbyte * pc); -extern HIDDEN void __glXDisp_SecondaryColor3dvEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_SecondaryColor3dvEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_Vertex2fv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Vertex2fv(GLbyte * pc); -extern HIDDEN void __glXDisp_BindRenderbufferEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_BindRenderbufferEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_Vertex3sv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Vertex3sv(GLbyte * pc); -extern HIDDEN int __glXDisp_BindTexImageEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_BindTexImageEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_ProgramLocalParameter4fvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ProgramLocalParameter4fvARB(GLbyte * pc); -extern HIDDEN int __glXDisp_DeleteProgramsNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_DeleteProgramsNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_EvalMesh1(GLbyte * pc); -extern HIDDEN void __glXDispSwap_EvalMesh1(GLbyte * pc); -extern HIDDEN void __glXDisp_MultiTexCoord1dvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultiTexCoord1dvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_Vertex2iv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Vertex2iv(GLbyte * pc); -extern HIDDEN int __glXDisp_GetProgramStringNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetProgramStringNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_LineWidth(GLbyte * pc); -extern HIDDEN void __glXDispSwap_LineWidth(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib2fvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib2fvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_TexGendv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexGendv(GLbyte * pc); -extern HIDDEN void __glXDisp_ResetMinmax(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ResetMinmax(GLbyte * pc); -extern HIDDEN int __glXDisp_GetConvolutionParameterfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetConvolutionParameterfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetConvolutionParameterfvEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetConvolutionParameterfvEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_VertexAttribs4dvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttribs4dvNV(GLbyte * pc); -extern HIDDEN int __glXDisp_GetMaterialfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetMaterialfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_UseXFont(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_UseXFont(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_ShadeModel(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ShadeModel(GLbyte * pc); -extern HIDDEN void __glXDisp_Materialfv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Materialfv(GLbyte * pc); -extern HIDDEN void __glXDisp_TexCoord3fv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexCoord3fv(GLbyte * pc); -extern HIDDEN void __glXDisp_FogCoordfvEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_FogCoordfvEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_MultiTexCoord1ivARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultiTexCoord1ivARB(GLbyte * pc); -extern HIDDEN void __glXDisp_MultiTexCoord2ivARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultiTexCoord2ivARB(GLbyte * pc); -extern HIDDEN void __glXDisp_DrawArrays(GLbyte * pc); -extern HIDDEN void __glXDispSwap_DrawArrays(GLbyte * pc); -extern HIDDEN void __glXDisp_Color3iv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color3iv(GLbyte * pc); -extern HIDDEN int __glXDisp_GetProgramLocalParameterdvARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetProgramLocalParameterdvARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetHistogramParameteriv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetHistogramParameteriv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetHistogramParameterivEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetHistogramParameterivEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Rotatef(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Rotatef(GLbyte * pc); -extern HIDDEN int __glXDisp_GetProgramivARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetProgramivARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_BlendFuncSeparateEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_BlendFuncSeparateEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_ProgramParameters4dvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ProgramParameters4dvNV(GLbyte * pc); -extern HIDDEN void __glXDisp_EvalPoint2(GLbyte * pc); -extern HIDDEN void __glXDispSwap_EvalPoint2(GLbyte * pc); -extern HIDDEN void __glXDisp_EvalPoint1(GLbyte * pc); -extern HIDDEN void __glXDispSwap_EvalPoint1(GLbyte * pc); -extern HIDDEN void __glXDisp_PopMatrix(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PopMatrix(GLbyte * pc); -extern HIDDEN int __glXDisp_MakeCurrentReadSGI(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_MakeCurrentReadSGI(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetTexGeniv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetTexGeniv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_MakeCurrent(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_MakeCurrent(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Map2d(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Map2d(GLbyte * pc); -extern HIDDEN void __glXDisp_Map2f(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Map2f(GLbyte * pc); -extern HIDDEN void __glXDisp_ProgramStringARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ProgramStringARB(GLbyte * pc); -extern HIDDEN int __glXDisp_GetConvolutionFilter(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetConvolutionFilter(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetConvolutionFilterEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetConvolutionFilterEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetCompressedTexImageARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetCompressedTexImageARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetTexGenfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetTexGenfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetHistogram(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetHistogram(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetHistogramEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetHistogramEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_ActiveStencilFaceEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ActiveStencilFaceEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_Materialf(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Materialf(GLbyte * pc); -extern HIDDEN void __glXDisp_Materiali(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Materiali(GLbyte * pc); -extern HIDDEN void __glXDisp_Indexsv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Indexsv(GLbyte * pc); -extern HIDDEN void __glXDisp_MultiTexCoord4svARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultiTexCoord4svARB(GLbyte * pc); -extern HIDDEN void __glXDisp_LightModelfv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_LightModelfv(GLbyte * pc); -extern HIDDEN void __glXDisp_TexCoord2dv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexCoord2dv(GLbyte * pc); -extern HIDDEN int __glXDisp_GenQueriesARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GenQueriesARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_EvalCoord1dv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_EvalCoord1dv(GLbyte * pc); -extern HIDDEN void __glXDisp_Translated(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Translated(GLbyte * pc); -extern HIDDEN void __glXDisp_Translatef(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Translatef(GLbyte * pc); -extern HIDDEN void __glXDisp_StencilMask(GLbyte * pc); -extern HIDDEN void __glXDispSwap_StencilMask(GLbyte * pc); -extern HIDDEN int __glXDisp_CreateWindow(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_CreateWindow(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetLightiv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetLightiv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_IsList(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_IsList(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_RenderMode(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_RenderMode(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_DrawBuffersARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_DrawBuffersARB(GLbyte * pc); -extern HIDDEN void __glXDisp_LoadName(GLbyte * pc); -extern HIDDEN void __glXDispSwap_LoadName(GLbyte * pc); -extern HIDDEN void __glXDisp_CopyTexSubImage1D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CopyTexSubImage1D(GLbyte * pc); -extern HIDDEN void __glXDisp_CullFace(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CullFace(GLbyte * pc); -extern HIDDEN int __glXDisp_QueryContextInfoEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_QueryContextInfoEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_VertexAttribs3svNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttribs3svNV(GLbyte * pc); -extern HIDDEN void __glXDisp_StencilFunc(GLbyte * pc); -extern HIDDEN void __glXDispSwap_StencilFunc(GLbyte * pc); -extern HIDDEN void __glXDisp_CopyPixels(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CopyPixels(GLbyte * pc); -extern HIDDEN void __glXDisp_Rectsv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Rectsv(GLbyte * pc); -extern HIDDEN void __glXDisp_CopyConvolutionFilter2D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CopyConvolutionFilter2D(GLbyte * pc); -extern HIDDEN void __glXDisp_TexParameterfv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexParameterfv(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib4uivARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4uivARB(GLbyte * pc); -extern HIDDEN void __glXDisp_ClipPlane(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ClipPlane(GLbyte * pc); -extern HIDDEN int __glXDisp_GetPixelMapuiv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetPixelMapuiv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Indexfv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Indexfv(GLbyte * pc); -extern HIDDEN int __glXDisp_QueryContext(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_QueryContext(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_SecondaryColor3svEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_SecondaryColor3svEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_IndexMask(GLbyte * pc); -extern HIDDEN void __glXDispSwap_IndexMask(GLbyte * pc); -extern HIDDEN void __glXDisp_BindProgramNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_BindProgramNV(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib4svARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4svARB(GLbyte * pc); -extern HIDDEN int __glXDisp_GetFloatv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetFloatv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_TexCoord3sv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexCoord3sv(GLbyte * pc); -extern HIDDEN void __glXDisp_PopAttrib(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PopAttrib(GLbyte * pc); -extern HIDDEN void __glXDisp_Fogfv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Fogfv(GLbyte * pc); -extern HIDDEN void __glXDisp_InitNames(GLbyte * pc); -extern HIDDEN void __glXDispSwap_InitNames(GLbyte * pc); -extern HIDDEN void __glXDisp_Normal3sv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Normal3sv(GLbyte * pc); -extern HIDDEN void __glXDisp_Minmax(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Minmax(GLbyte * pc); -extern HIDDEN void __glXDisp_FogCoorddvEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_FogCoorddvEXT(GLbyte * pc); -extern HIDDEN int __glXDisp_GetBooleanv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetBooleanv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Hint(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Hint(GLbyte * pc); -extern HIDDEN void __glXDisp_Color4dv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color4dv(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib2svARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib2svARB(GLbyte * pc); -extern HIDDEN int __glXDisp_AreProgramsResidentNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_AreProgramsResidentNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_CopyColorSubTable(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CopyColorSubTable(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib4NubvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4NubvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib3dvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib3dvNV(GLbyte * pc); -extern HIDDEN void __glXDisp_Vertex4iv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Vertex4iv(GLbyte * pc); -extern HIDDEN int __glXDisp_GetProgramEnvParameterdvARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetProgramEnvParameterdvARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_TexCoord4dv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexCoord4dv(GLbyte * pc); -extern HIDDEN void __glXDisp_Begin(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Begin(GLbyte * pc); -extern HIDDEN int __glXDisp_ClientInfo(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_ClientInfo(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Rectfv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Rectfv(GLbyte * pc); -extern HIDDEN void __glXDisp_LightModelf(GLbyte * pc); -extern HIDDEN void __glXDispSwap_LightModelf(GLbyte * pc); -extern HIDDEN int __glXDisp_GetTexParameterfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetTexParameterfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetLightfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetLightfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Disable(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Disable(GLbyte * pc); -extern HIDDEN void __glXDisp_MultiTexCoord2fvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultiTexCoord2fvARB(GLbyte * pc); -extern HIDDEN int __glXDisp_GetRenderbufferParameterivEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetRenderbufferParameterivEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_SelectBuffer(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_SelectBuffer(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_ColorMask(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ColorMask(GLbyte * pc); -extern HIDDEN void __glXDisp_RasterPos4iv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_RasterPos4iv(GLbyte * pc); -extern HIDDEN void __glXDisp_Enable(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Enable(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttribs4svNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttribs4svNV(GLbyte * pc); -extern HIDDEN int __glXDisp_GetMinmaxParameterfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetMinmaxParameterfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetMinmaxParameterfvEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetMinmaxParameterfvEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_VertexAttrib1fvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib1fvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttribs1svNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttribs1svNV(GLbyte * pc); -extern HIDDEN void __glXDisp_Vertex3fv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Vertex3fv(GLbyte * pc); -extern HIDDEN int __glXDisp_GenProgramsNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GenProgramsNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_VertexAttrib4dvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4dvNV(GLbyte * pc); - -# undef HIDDEN - -#endif /* !defined( _INDIRECT_DISPATCH_H_ ) */ diff --git a/GL/glx/indirect_dispatch_swap.c b/GL/glx/indirect_dispatch_swap.c deleted file mode 100644 index f137cbe98..000000000 --- a/GL/glx/indirect_dispatch_swap.c +++ /dev/null @@ -1,6051 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by glX_proto_recv.py (from Mesa) script */ - -/* - * (C) Copyright IBM Corporation 2005 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * IBM, - * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include <X11/Xmd.h> -#include <GL/gl.h> -#include <GL/glxproto.h> -#include <inttypes.h> -#include "indirect_size.h" -#include "indirect_size_get.h" -#include "indirect_dispatch.h" -#include "glxserver.h" -#include "glxbyteorder.h" -#include "indirect_util.h" -#include "singlesize.h" -#include "glapitable.h" -#include "glapi.h" -#include "glthread.h" -#include "dispatch.h" - -#define __GLX_PAD(x) (((x) + 3) & ~3) - -typedef struct { - __GLX_PIXEL_3D_HDR; -} __GLXpixel3DHeader; - -extern GLboolean __glXErrorOccured( void ); -extern void __glXClearErrorOccured( void ); - -static const unsigned dummy_answer[2] = {0, 0}; - -static GLsizei -bswap_CARD32( const void * src ) -{ - union { uint32_t dst; GLsizei ret; } x; - x.dst = bswap_32( *(uint32_t *) src ); - return x.ret; -} - -static GLshort -bswap_CARD16( const void * src ) -{ - union { uint16_t dst; GLshort ret; } x; - x.dst = bswap_16( *(uint16_t *) src ); - return x.ret; -} - -static GLenum -bswap_ENUM( const void * src ) -{ - union { uint32_t dst; GLenum ret; } x; - x.dst = bswap_32( *(uint32_t *) src ); - return x.ret; -} - -static GLdouble -bswap_FLOAT64( const void * src ) -{ - union { uint64_t dst; GLdouble ret; } x; - x.dst = bswap_64( *(uint64_t *) src ); - return x.ret; -} - -static GLfloat -bswap_FLOAT32( const void * src ) -{ - union { uint32_t dst; GLfloat ret; } x; - x.dst = bswap_32( *(uint32_t *) src ); - return x.ret; -} - -static void * -bswap_16_array( uint16_t * src, unsigned count ) -{ - unsigned i; - - for ( i = 0 ; i < count ; i++ ) { - uint16_t temp = bswap_16( src[i] ); - src[i] = temp; - } - - return src; -} - -static void * -bswap_32_array( uint32_t * src, unsigned count ) -{ - unsigned i; - - for ( i = 0 ; i < count ; i++ ) { - uint32_t temp = bswap_32( src[i] ); - src[i] = temp; - } - - return src; -} - -static void * -bswap_64_array( uint64_t * src, unsigned count ) -{ - unsigned i; - - for ( i = 0 ; i < count ; i++ ) { - uint64_t temp = bswap_64( src[i] ); - src[i] = temp; - } - - return src; -} - -int __glXDispSwap_NewList(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - CALL_NewList( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ) - ) ); - error = Success; - } - - return error; -} - -int __glXDispSwap_EndList(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - CALL_EndList( GET_DISPATCH(), () ); - error = Success; - } - - return error; -} - -void __glXDispSwap_CallList(GLbyte * pc) -{ - CALL_CallList( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ) - ) ); -} - -void __glXDispSwap_CallLists(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - const GLenum type = (GLenum )bswap_ENUM ( pc + 4 ); - const GLvoid * lists; - - switch(type) { - case GL_BYTE: - case GL_UNSIGNED_BYTE: - case GL_2_BYTES: - case GL_3_BYTES: - case GL_4_BYTES: - lists = (const GLvoid *) (pc + 8); break; - case GL_SHORT: - case GL_UNSIGNED_SHORT: - lists = (const GLvoid *) bswap_16_array( (uint16_t *) (pc + 8), n ); break; - case GL_INT: - case GL_UNSIGNED_INT: - case GL_FLOAT: - lists = (const GLvoid *) bswap_32_array( (uint32_t *) (pc + 8), n ); break; - default: - return; - } - - CALL_CallLists( GET_DISPATCH(), ( - n, - type, - lists - ) ); -} - -int __glXDispSwap_DeleteLists(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - CALL_DeleteLists( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (GLsizei )bswap_CARD32 ( pc + 4 ) - ) ); - error = Success; - } - - return error; -} - -int __glXDispSwap_GenLists(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - GLuint retval; - retval = CALL_GenLists( GET_DISPATCH(), ( - (GLsizei )bswap_CARD32 ( pc + 0 ) - ) ); - __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDispSwap_ListBase(GLbyte * pc) -{ - CALL_ListBase( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ) - ) ); -} - -void __glXDispSwap_Begin(GLbyte * pc) -{ - CALL_Begin( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -void __glXDispSwap_Bitmap(GLbyte * pc) -{ - const GLubyte * const bitmap = (const GLubyte *) (pc + 44); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); - - CALL_Bitmap( GET_DISPATCH(), ( - (GLsizei )bswap_CARD32 ( pc + 20 ), - (GLsizei )bswap_CARD32 ( pc + 24 ), - (GLfloat )bswap_FLOAT32( pc + 28 ), - (GLfloat )bswap_FLOAT32( pc + 32 ), - (GLfloat )bswap_FLOAT32( pc + 36 ), - (GLfloat )bswap_FLOAT32( pc + 40 ), - bitmap - ) ); -} - -void __glXDispSwap_Color3bv(GLbyte * pc) -{ - CALL_Color3bv( GET_DISPATCH(), ( - (const GLbyte *)(pc + 0) - ) ); -} - -void __glXDispSwap_Color3dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 24); - pc -= 4; - } -#endif - - CALL_Color3dv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_Color3fv(GLbyte * pc) -{ - CALL_Color3fv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_Color3iv(GLbyte * pc) -{ - CALL_Color3iv( GET_DISPATCH(), ( - (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_Color3sv(GLbyte * pc) -{ - CALL_Color3sv( GET_DISPATCH(), ( - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_Color3ubv(GLbyte * pc) -{ - CALL_Color3ubv( GET_DISPATCH(), ( - (const GLubyte *)(pc + 0) - ) ); -} - -void __glXDispSwap_Color3uiv(GLbyte * pc) -{ - CALL_Color3uiv( GET_DISPATCH(), ( - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_Color3usv(GLbyte * pc) -{ - CALL_Color3usv( GET_DISPATCH(), ( - (const GLushort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_Color4bv(GLbyte * pc) -{ - CALL_Color4bv( GET_DISPATCH(), ( - (const GLbyte *)(pc + 0) - ) ); -} - -void __glXDispSwap_Color4dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 32); - pc -= 4; - } -#endif - - CALL_Color4dv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_Color4fv(GLbyte * pc) -{ - CALL_Color4fv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_Color4iv(GLbyte * pc) -{ - CALL_Color4iv( GET_DISPATCH(), ( - (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_Color4sv(GLbyte * pc) -{ - CALL_Color4sv( GET_DISPATCH(), ( - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_Color4ubv(GLbyte * pc) -{ - CALL_Color4ubv( GET_DISPATCH(), ( - (const GLubyte *)(pc + 0) - ) ); -} - -void __glXDispSwap_Color4uiv(GLbyte * pc) -{ - CALL_Color4uiv( GET_DISPATCH(), ( - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_Color4usv(GLbyte * pc) -{ - CALL_Color4usv( GET_DISPATCH(), ( - (const GLushort *)bswap_16_array( (uint16_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_EdgeFlagv(GLbyte * pc) -{ - CALL_EdgeFlagv( GET_DISPATCH(), ( - (const GLboolean *)(pc + 0) - ) ); -} - -void __glXDispSwap_End(GLbyte * pc) -{ - CALL_End( GET_DISPATCH(), () ); -} - -void __glXDispSwap_Indexdv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 8); - pc -= 4; - } -#endif - - CALL_Indexdv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 ) - ) ); -} - -void __glXDispSwap_Indexfv(GLbyte * pc) -{ - CALL_Indexfv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 1 ) - ) ); -} - -void __glXDispSwap_Indexiv(GLbyte * pc) -{ - CALL_Indexiv( GET_DISPATCH(), ( - (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 1 ) - ) ); -} - -void __glXDispSwap_Indexsv(GLbyte * pc) -{ - CALL_Indexsv( GET_DISPATCH(), ( - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 1 ) - ) ); -} - -void __glXDispSwap_Normal3bv(GLbyte * pc) -{ - CALL_Normal3bv( GET_DISPATCH(), ( - (const GLbyte *)(pc + 0) - ) ); -} - -void __glXDispSwap_Normal3dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 24); - pc -= 4; - } -#endif - - CALL_Normal3dv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_Normal3fv(GLbyte * pc) -{ - CALL_Normal3fv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_Normal3iv(GLbyte * pc) -{ - CALL_Normal3iv( GET_DISPATCH(), ( - (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_Normal3sv(GLbyte * pc) -{ - CALL_Normal3sv( GET_DISPATCH(), ( - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_RasterPos2dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 16); - pc -= 4; - } -#endif - - CALL_RasterPos2dv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 ) - ) ); -} - -void __glXDispSwap_RasterPos2fv(GLbyte * pc) -{ - CALL_RasterPos2fv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) - ) ); -} - -void __glXDispSwap_RasterPos2iv(GLbyte * pc) -{ - CALL_RasterPos2iv( GET_DISPATCH(), ( - (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) - ) ); -} - -void __glXDispSwap_RasterPos2sv(GLbyte * pc) -{ - CALL_RasterPos2sv( GET_DISPATCH(), ( - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 2 ) - ) ); -} - -void __glXDispSwap_RasterPos3dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 24); - pc -= 4; - } -#endif - - CALL_RasterPos3dv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_RasterPos3fv(GLbyte * pc) -{ - CALL_RasterPos3fv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_RasterPos3iv(GLbyte * pc) -{ - CALL_RasterPos3iv( GET_DISPATCH(), ( - (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_RasterPos3sv(GLbyte * pc) -{ - CALL_RasterPos3sv( GET_DISPATCH(), ( - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_RasterPos4dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 32); - pc -= 4; - } -#endif - - CALL_RasterPos4dv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_RasterPos4fv(GLbyte * pc) -{ - CALL_RasterPos4fv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_RasterPos4iv(GLbyte * pc) -{ - CALL_RasterPos4iv( GET_DISPATCH(), ( - (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_RasterPos4sv(GLbyte * pc) -{ - CALL_RasterPos4sv( GET_DISPATCH(), ( - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_Rectdv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 32); - pc -= 4; - } -#endif - - CALL_Rectdv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 16), 2 ) - ) ); -} - -void __glXDispSwap_Rectfv(GLbyte * pc) -{ - CALL_Rectfv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 2 ) - ) ); -} - -void __glXDispSwap_Rectiv(GLbyte * pc) -{ - CALL_Rectiv( GET_DISPATCH(), ( - (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 2 ), - (const GLint *)bswap_32_array( (uint32_t *) (pc + 8), 2 ) - ) ); -} - -void __glXDispSwap_Rectsv(GLbyte * pc) -{ - CALL_Rectsv( GET_DISPATCH(), ( - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 2 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 2 ) - ) ); -} - -void __glXDispSwap_TexCoord1dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 8); - pc -= 4; - } -#endif - - CALL_TexCoord1dv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 ) - ) ); -} - -void __glXDispSwap_TexCoord1fv(GLbyte * pc) -{ - CALL_TexCoord1fv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 1 ) - ) ); -} - -void __glXDispSwap_TexCoord1iv(GLbyte * pc) -{ - CALL_TexCoord1iv( GET_DISPATCH(), ( - (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 1 ) - ) ); -} - -void __glXDispSwap_TexCoord1sv(GLbyte * pc) -{ - CALL_TexCoord1sv( GET_DISPATCH(), ( - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 1 ) - ) ); -} - -void __glXDispSwap_TexCoord2dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 16); - pc -= 4; - } -#endif - - CALL_TexCoord2dv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 ) - ) ); -} - -void __glXDispSwap_TexCoord2fv(GLbyte * pc) -{ - CALL_TexCoord2fv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) - ) ); -} - -void __glXDispSwap_TexCoord2iv(GLbyte * pc) -{ - CALL_TexCoord2iv( GET_DISPATCH(), ( - (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) - ) ); -} - -void __glXDispSwap_TexCoord2sv(GLbyte * pc) -{ - CALL_TexCoord2sv( GET_DISPATCH(), ( - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 2 ) - ) ); -} - -void __glXDispSwap_TexCoord3dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 24); - pc -= 4; - } -#endif - - CALL_TexCoord3dv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_TexCoord3fv(GLbyte * pc) -{ - CALL_TexCoord3fv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_TexCoord3iv(GLbyte * pc) -{ - CALL_TexCoord3iv( GET_DISPATCH(), ( - (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_TexCoord3sv(GLbyte * pc) -{ - CALL_TexCoord3sv( GET_DISPATCH(), ( - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_TexCoord4dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 32); - pc -= 4; - } -#endif - - CALL_TexCoord4dv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_TexCoord4fv(GLbyte * pc) -{ - CALL_TexCoord4fv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_TexCoord4iv(GLbyte * pc) -{ - CALL_TexCoord4iv( GET_DISPATCH(), ( - (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_TexCoord4sv(GLbyte * pc) -{ - CALL_TexCoord4sv( GET_DISPATCH(), ( - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_Vertex2dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 16); - pc -= 4; - } -#endif - - CALL_Vertex2dv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 ) - ) ); -} - -void __glXDispSwap_Vertex2fv(GLbyte * pc) -{ - CALL_Vertex2fv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) - ) ); -} - -void __glXDispSwap_Vertex2iv(GLbyte * pc) -{ - CALL_Vertex2iv( GET_DISPATCH(), ( - (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) - ) ); -} - -void __glXDispSwap_Vertex2sv(GLbyte * pc) -{ - CALL_Vertex2sv( GET_DISPATCH(), ( - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 2 ) - ) ); -} - -void __glXDispSwap_Vertex3dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 24); - pc -= 4; - } -#endif - - CALL_Vertex3dv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_Vertex3fv(GLbyte * pc) -{ - CALL_Vertex3fv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_Vertex3iv(GLbyte * pc) -{ - CALL_Vertex3iv( GET_DISPATCH(), ( - (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_Vertex3sv(GLbyte * pc) -{ - CALL_Vertex3sv( GET_DISPATCH(), ( - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_Vertex4dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 32); - pc -= 4; - } -#endif - - CALL_Vertex4dv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_Vertex4fv(GLbyte * pc) -{ - CALL_Vertex4fv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_Vertex4iv(GLbyte * pc) -{ - CALL_Vertex4iv( GET_DISPATCH(), ( - (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_Vertex4sv(GLbyte * pc) -{ - CALL_Vertex4sv( GET_DISPATCH(), ( - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_ClipPlane(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 36); - pc -= 4; - } -#endif - - CALL_ClipPlane( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 32 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_ColorMaterial(GLbyte * pc) -{ - CALL_ColorMaterial( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ) - ) ); -} - -void __glXDispSwap_CullFace(GLbyte * pc) -{ - CALL_CullFace( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -void __glXDispSwap_Fogf(GLbyte * pc) -{ - CALL_Fogf( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLfloat )bswap_FLOAT32( pc + 4 ) - ) ); -} - -void __glXDispSwap_Fogfv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); - const GLfloat * params; - - params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 4), __glFogfv_size(pname) ); - - CALL_Fogfv( GET_DISPATCH(), ( - pname, - params - ) ); -} - -void __glXDispSwap_Fogi(GLbyte * pc) -{ - CALL_Fogi( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ) - ) ); -} - -void __glXDispSwap_Fogiv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); - const GLint * params; - - params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 4), __glFogiv_size(pname) ); - - CALL_Fogiv( GET_DISPATCH(), ( - pname, - params - ) ); -} - -void __glXDispSwap_FrontFace(GLbyte * pc) -{ - CALL_FrontFace( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -void __glXDispSwap_Hint(GLbyte * pc) -{ - CALL_Hint( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ) - ) ); -} - -void __glXDispSwap_Lightf(GLbyte * pc) -{ - CALL_Lightf( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLfloat )bswap_FLOAT32( pc + 8 ) - ) ); -} - -void __glXDispSwap_Lightfv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLfloat * params; - - params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glLightfv_size(pname) ); - - CALL_Lightfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); -} - -void __glXDispSwap_Lighti(GLbyte * pc) -{ - CALL_Lighti( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ) - ) ); -} - -void __glXDispSwap_Lightiv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLint * params; - - params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glLightiv_size(pname) ); - - CALL_Lightiv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); -} - -void __glXDispSwap_LightModelf(GLbyte * pc) -{ - CALL_LightModelf( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLfloat )bswap_FLOAT32( pc + 4 ) - ) ); -} - -void __glXDispSwap_LightModelfv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); - const GLfloat * params; - - params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 4), __glLightModelfv_size(pname) ); - - CALL_LightModelfv( GET_DISPATCH(), ( - pname, - params - ) ); -} - -void __glXDispSwap_LightModeli(GLbyte * pc) -{ - CALL_LightModeli( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ) - ) ); -} - -void __glXDispSwap_LightModeliv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); - const GLint * params; - - params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 4), __glLightModeliv_size(pname) ); - - CALL_LightModeliv( GET_DISPATCH(), ( - pname, - params - ) ); -} - -void __glXDispSwap_LineStipple(GLbyte * pc) -{ - CALL_LineStipple( GET_DISPATCH(), ( - (GLint )bswap_CARD32 ( pc + 0 ), - (GLushort)bswap_CARD16 ( pc + 4 ) - ) ); -} - -void __glXDispSwap_LineWidth(GLbyte * pc) -{ - CALL_LineWidth( GET_DISPATCH(), ( - (GLfloat )bswap_FLOAT32( pc + 0 ) - ) ); -} - -void __glXDispSwap_Materialf(GLbyte * pc) -{ - CALL_Materialf( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLfloat )bswap_FLOAT32( pc + 8 ) - ) ); -} - -void __glXDispSwap_Materialfv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLfloat * params; - - params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glMaterialfv_size(pname) ); - - CALL_Materialfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); -} - -void __glXDispSwap_Materiali(GLbyte * pc) -{ - CALL_Materiali( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ) - ) ); -} - -void __glXDispSwap_Materialiv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLint * params; - - params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glMaterialiv_size(pname) ); - - CALL_Materialiv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); -} - -void __glXDispSwap_PointSize(GLbyte * pc) -{ - CALL_PointSize( GET_DISPATCH(), ( - (GLfloat )bswap_FLOAT32( pc + 0 ) - ) ); -} - -void __glXDispSwap_PolygonMode(GLbyte * pc) -{ - CALL_PolygonMode( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ) - ) ); -} - -void __glXDispSwap_PolygonStipple(GLbyte * pc) -{ - const GLubyte * const mask = (const GLubyte *) (pc + 20); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); - - CALL_PolygonStipple( GET_DISPATCH(), ( - mask - ) ); -} - -void __glXDispSwap_Scissor(GLbyte * pc) -{ - CALL_Scissor( GET_DISPATCH(), ( - (GLint )bswap_CARD32 ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLsizei )bswap_CARD32 ( pc + 8 ), - (GLsizei )bswap_CARD32 ( pc + 12 ) - ) ); -} - -void __glXDispSwap_ShadeModel(GLbyte * pc) -{ - CALL_ShadeModel( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -void __glXDispSwap_TexParameterf(GLbyte * pc) -{ - CALL_TexParameterf( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLfloat )bswap_FLOAT32( pc + 8 ) - ) ); -} - -void __glXDispSwap_TexParameterfv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLfloat * params; - - params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glTexParameterfv_size(pname) ); - - CALL_TexParameterfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); -} - -void __glXDispSwap_TexParameteri(GLbyte * pc) -{ - CALL_TexParameteri( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ) - ) ); -} - -void __glXDispSwap_TexParameteriv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLint * params; - - params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glTexParameteriv_size(pname) ); - - CALL_TexParameteriv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); -} - -void __glXDispSwap_TexImage1D(GLbyte * pc) -{ - const GLvoid * const pixels = (const GLvoid *) (pc + 52); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); - - CALL_TexImage1D( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 20 ), - (GLint )bswap_CARD32 ( pc + 24 ), - (GLint )bswap_CARD32 ( pc + 28 ), - (GLsizei )bswap_CARD32 ( pc + 32 ), - (GLint )bswap_CARD32 ( pc + 40 ), - (GLenum )bswap_ENUM ( pc + 44 ), - (GLenum )bswap_ENUM ( pc + 48 ), - pixels - ) ); -} - -void __glXDispSwap_TexImage2D(GLbyte * pc) -{ - const GLvoid * const pixels = (const GLvoid *) (pc + 52); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); - - CALL_TexImage2D( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 20 ), - (GLint )bswap_CARD32 ( pc + 24 ), - (GLint )bswap_CARD32 ( pc + 28 ), - (GLsizei )bswap_CARD32 ( pc + 32 ), - (GLsizei )bswap_CARD32 ( pc + 36 ), - (GLint )bswap_CARD32 ( pc + 40 ), - (GLenum )bswap_ENUM ( pc + 44 ), - (GLenum )bswap_ENUM ( pc + 48 ), - pixels - ) ); -} - -void __glXDispSwap_TexEnvf(GLbyte * pc) -{ - CALL_TexEnvf( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLfloat )bswap_FLOAT32( pc + 8 ) - ) ); -} - -void __glXDispSwap_TexEnvfv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLfloat * params; - - params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glTexEnvfv_size(pname) ); - - CALL_TexEnvfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); -} - -void __glXDispSwap_TexEnvi(GLbyte * pc) -{ - CALL_TexEnvi( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ) - ) ); -} - -void __glXDispSwap_TexEnviv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLint * params; - - params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glTexEnviv_size(pname) ); - - CALL_TexEnviv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); -} - -void __glXDispSwap_TexGend(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 16); - pc -= 4; - } -#endif - - CALL_TexGend( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 8 ), - (GLenum )bswap_ENUM ( pc + 12 ), - (GLdouble)bswap_FLOAT64( pc + 0 ) - ) ); -} - -void __glXDispSwap_TexGendv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLdouble * params; - -#ifdef __GLX_ALIGN64 - const GLuint compsize = __glTexGendv_size(pname); - const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8)) - 4; - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, cmdlen); - pc -= 4; - } -#endif - - params = (const GLdouble *) bswap_64_array( (uint64_t *) (pc + 8), __glTexGendv_size(pname) ); - - CALL_TexGendv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); -} - -void __glXDispSwap_TexGenf(GLbyte * pc) -{ - CALL_TexGenf( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLfloat )bswap_FLOAT32( pc + 8 ) - ) ); -} - -void __glXDispSwap_TexGenfv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLfloat * params; - - params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glTexGenfv_size(pname) ); - - CALL_TexGenfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); -} - -void __glXDispSwap_TexGeni(GLbyte * pc) -{ - CALL_TexGeni( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ) - ) ); -} - -void __glXDispSwap_TexGeniv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLint * params; - - params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glTexGeniv_size(pname) ); - - CALL_TexGeniv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); -} - -void __glXDispSwap_InitNames(GLbyte * pc) -{ - CALL_InitNames( GET_DISPATCH(), () ); -} - -void __glXDispSwap_LoadName(GLbyte * pc) -{ - CALL_LoadName( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ) - ) ); -} - -void __glXDispSwap_PassThrough(GLbyte * pc) -{ - CALL_PassThrough( GET_DISPATCH(), ( - (GLfloat )bswap_FLOAT32( pc + 0 ) - ) ); -} - -void __glXDispSwap_PopName(GLbyte * pc) -{ - CALL_PopName( GET_DISPATCH(), () ); -} - -void __glXDispSwap_PushName(GLbyte * pc) -{ - CALL_PushName( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ) - ) ); -} - -void __glXDispSwap_DrawBuffer(GLbyte * pc) -{ - CALL_DrawBuffer( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -void __glXDispSwap_Clear(GLbyte * pc) -{ - CALL_Clear( GET_DISPATCH(), ( - (GLbitfield)bswap_CARD32 ( pc + 0 ) - ) ); -} - -void __glXDispSwap_ClearAccum(GLbyte * pc) -{ - CALL_ClearAccum( GET_DISPATCH(), ( - (GLfloat )bswap_FLOAT32( pc + 0 ), - (GLfloat )bswap_FLOAT32( pc + 4 ), - (GLfloat )bswap_FLOAT32( pc + 8 ), - (GLfloat )bswap_FLOAT32( pc + 12 ) - ) ); -} - -void __glXDispSwap_ClearIndex(GLbyte * pc) -{ - CALL_ClearIndex( GET_DISPATCH(), ( - (GLfloat )bswap_FLOAT32( pc + 0 ) - ) ); -} - -void __glXDispSwap_ClearColor(GLbyte * pc) -{ - CALL_ClearColor( GET_DISPATCH(), ( - (GLclampf)bswap_FLOAT32( pc + 0 ), - (GLclampf)bswap_FLOAT32( pc + 4 ), - (GLclampf)bswap_FLOAT32( pc + 8 ), - (GLclampf)bswap_FLOAT32( pc + 12 ) - ) ); -} - -void __glXDispSwap_ClearStencil(GLbyte * pc) -{ - CALL_ClearStencil( GET_DISPATCH(), ( - (GLint )bswap_CARD32 ( pc + 0 ) - ) ); -} - -void __glXDispSwap_ClearDepth(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 8); - pc -= 4; - } -#endif - - CALL_ClearDepth( GET_DISPATCH(), ( - (GLclampd)bswap_FLOAT64( pc + 0 ) - ) ); -} - -void __glXDispSwap_StencilMask(GLbyte * pc) -{ - CALL_StencilMask( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ) - ) ); -} - -void __glXDispSwap_ColorMask(GLbyte * pc) -{ - CALL_ColorMask( GET_DISPATCH(), ( - *(GLboolean *)(pc + 0), - *(GLboolean *)(pc + 1), - *(GLboolean *)(pc + 2), - *(GLboolean *)(pc + 3) - ) ); -} - -void __glXDispSwap_DepthMask(GLbyte * pc) -{ - CALL_DepthMask( GET_DISPATCH(), ( - *(GLboolean *)(pc + 0) - ) ); -} - -void __glXDispSwap_IndexMask(GLbyte * pc) -{ - CALL_IndexMask( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ) - ) ); -} - -void __glXDispSwap_Accum(GLbyte * pc) -{ - CALL_Accum( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLfloat )bswap_FLOAT32( pc + 4 ) - ) ); -} - -void __glXDispSwap_Disable(GLbyte * pc) -{ - CALL_Disable( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -void __glXDispSwap_Enable(GLbyte * pc) -{ - CALL_Enable( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -void __glXDispSwap_PopAttrib(GLbyte * pc) -{ - CALL_PopAttrib( GET_DISPATCH(), () ); -} - -void __glXDispSwap_PushAttrib(GLbyte * pc) -{ - CALL_PushAttrib( GET_DISPATCH(), ( - (GLbitfield)bswap_CARD32 ( pc + 0 ) - ) ); -} - -void __glXDispSwap_MapGrid1d(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 20); - pc -= 4; - } -#endif - - CALL_MapGrid1d( GET_DISPATCH(), ( - (GLint )bswap_CARD32 ( pc + 16 ), - (GLdouble)bswap_FLOAT64( pc + 0 ), - (GLdouble)bswap_FLOAT64( pc + 8 ) - ) ); -} - -void __glXDispSwap_MapGrid1f(GLbyte * pc) -{ - CALL_MapGrid1f( GET_DISPATCH(), ( - (GLint )bswap_CARD32 ( pc + 0 ), - (GLfloat )bswap_FLOAT32( pc + 4 ), - (GLfloat )bswap_FLOAT32( pc + 8 ) - ) ); -} - -void __glXDispSwap_MapGrid2d(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 40); - pc -= 4; - } -#endif - - CALL_MapGrid2d( GET_DISPATCH(), ( - (GLint )bswap_CARD32 ( pc + 32 ), - (GLdouble)bswap_FLOAT64( pc + 0 ), - (GLdouble)bswap_FLOAT64( pc + 8 ), - (GLint )bswap_CARD32 ( pc + 36 ), - (GLdouble)bswap_FLOAT64( pc + 16 ), - (GLdouble)bswap_FLOAT64( pc + 24 ) - ) ); -} - -void __glXDispSwap_MapGrid2f(GLbyte * pc) -{ - CALL_MapGrid2f( GET_DISPATCH(), ( - (GLint )bswap_CARD32 ( pc + 0 ), - (GLfloat )bswap_FLOAT32( pc + 4 ), - (GLfloat )bswap_FLOAT32( pc + 8 ), - (GLint )bswap_CARD32 ( pc + 12 ), - (GLfloat )bswap_FLOAT32( pc + 16 ), - (GLfloat )bswap_FLOAT32( pc + 20 ) - ) ); -} - -void __glXDispSwap_EvalCoord1dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 8); - pc -= 4; - } -#endif - - CALL_EvalCoord1dv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 ) - ) ); -} - -void __glXDispSwap_EvalCoord1fv(GLbyte * pc) -{ - CALL_EvalCoord1fv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 1 ) - ) ); -} - -void __glXDispSwap_EvalCoord2dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 16); - pc -= 4; - } -#endif - - CALL_EvalCoord2dv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 ) - ) ); -} - -void __glXDispSwap_EvalCoord2fv(GLbyte * pc) -{ - CALL_EvalCoord2fv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) - ) ); -} - -void __glXDispSwap_EvalMesh1(GLbyte * pc) -{ - CALL_EvalMesh1( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ) - ) ); -} - -void __glXDispSwap_EvalPoint1(GLbyte * pc) -{ - CALL_EvalPoint1( GET_DISPATCH(), ( - (GLint )bswap_CARD32 ( pc + 0 ) - ) ); -} - -void __glXDispSwap_EvalMesh2(GLbyte * pc) -{ - CALL_EvalMesh2( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ), - (GLint )bswap_CARD32 ( pc + 12 ), - (GLint )bswap_CARD32 ( pc + 16 ) - ) ); -} - -void __glXDispSwap_EvalPoint2(GLbyte * pc) -{ - CALL_EvalPoint2( GET_DISPATCH(), ( - (GLint )bswap_CARD32 ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ) - ) ); -} - -void __glXDispSwap_AlphaFunc(GLbyte * pc) -{ - CALL_AlphaFunc( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLclampf)bswap_FLOAT32( pc + 4 ) - ) ); -} - -void __glXDispSwap_BlendFunc(GLbyte * pc) -{ - CALL_BlendFunc( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ) - ) ); -} - -void __glXDispSwap_LogicOp(GLbyte * pc) -{ - CALL_LogicOp( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -void __glXDispSwap_StencilFunc(GLbyte * pc) -{ - CALL_StencilFunc( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLuint )bswap_CARD32 ( pc + 8 ) - ) ); -} - -void __glXDispSwap_StencilOp(GLbyte * pc) -{ - CALL_StencilOp( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ) - ) ); -} - -void __glXDispSwap_DepthFunc(GLbyte * pc) -{ - CALL_DepthFunc( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -void __glXDispSwap_PixelZoom(GLbyte * pc) -{ - CALL_PixelZoom( GET_DISPATCH(), ( - (GLfloat )bswap_FLOAT32( pc + 0 ), - (GLfloat )bswap_FLOAT32( pc + 4 ) - ) ); -} - -void __glXDispSwap_PixelTransferf(GLbyte * pc) -{ - CALL_PixelTransferf( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLfloat )bswap_FLOAT32( pc + 4 ) - ) ); -} - -void __glXDispSwap_PixelTransferi(GLbyte * pc) -{ - CALL_PixelTransferi( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ) - ) ); -} - -int __glXDispSwap_PixelStoref(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - CALL_PixelStoref( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLfloat )bswap_FLOAT32( pc + 4 ) - ) ); - error = Success; - } - - return error; -} - -int __glXDispSwap_PixelStorei(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - CALL_PixelStorei( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ) - ) ); - error = Success; - } - - return error; -} - -void __glXDispSwap_PixelMapfv(GLbyte * pc) -{ - const GLsizei mapsize = (GLsizei )bswap_CARD32 ( pc + 4 ); - - CALL_PixelMapfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - mapsize, - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 0 ) - ) ); -} - -void __glXDispSwap_PixelMapuiv(GLbyte * pc) -{ - const GLsizei mapsize = (GLsizei )bswap_CARD32 ( pc + 4 ); - - CALL_PixelMapuiv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - mapsize, - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 8), 0 ) - ) ); -} - -void __glXDispSwap_PixelMapusv(GLbyte * pc) -{ - const GLsizei mapsize = (GLsizei )bswap_CARD32 ( pc + 4 ); - - CALL_PixelMapusv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - mapsize, - (const GLushort *)bswap_16_array( (uint16_t *) (pc + 8), 0 ) - ) ); -} - -void __glXDispSwap_ReadBuffer(GLbyte * pc) -{ - CALL_ReadBuffer( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -void __glXDispSwap_CopyPixels(GLbyte * pc) -{ - CALL_CopyPixels( GET_DISPATCH(), ( - (GLint )bswap_CARD32 ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLsizei )bswap_CARD32 ( pc + 8 ), - (GLsizei )bswap_CARD32 ( pc + 12 ), - (GLenum )bswap_ENUM ( pc + 16 ) - ) ); -} - -void __glXDispSwap_DrawPixels(GLbyte * pc) -{ - const GLvoid * const pixels = (const GLvoid *) (pc + 36); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); - - CALL_DrawPixels( GET_DISPATCH(), ( - (GLsizei )bswap_CARD32 ( pc + 20 ), - (GLsizei )bswap_CARD32 ( pc + 24 ), - (GLenum )bswap_ENUM ( pc + 28 ), - (GLenum )bswap_ENUM ( pc + 32 ), - pixels - ) ); -} - -int __glXDispSwap_GetBooleanv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); - - const GLuint compsize = __glGetBooleanv_size(pname); - GLboolean answerBuffer[200]; - GLboolean * params = __glXGetAnswerBuffer(cl, compsize, answerBuffer, sizeof(answerBuffer), 1); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetBooleanv( GET_DISPATCH(), ( - pname, - params - ) ); - __glXSendReplySwap(cl->client, params, compsize, 1, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetClipPlane(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - GLdouble equation[4]; - CALL_GetClipPlane( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - equation - ) ); - (void) bswap_64_array( (uint64_t *) equation, 4 ); - __glXSendReplySwap(cl->client, equation, 4, 8, GL_TRUE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetDoublev(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); - - const GLuint compsize = __glGetDoublev_size(pname); - GLdouble answerBuffer[200]; - GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetDoublev( GET_DISPATCH(), ( - pname, - params - ) ); - (void) bswap_64_array( (uint64_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetError(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - GLenum retval; - retval = CALL_GetError( GET_DISPATCH(), () ); - __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetFloatv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); - - const GLuint compsize = __glGetFloatv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetFloatv( GET_DISPATCH(), ( - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetIntegerv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); - - const GLuint compsize = __glGetIntegerv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetIntegerv( GET_DISPATCH(), ( - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetLightfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetLightfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetLightfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetLightiv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetLightiv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetLightiv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetMapdv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum target = (GLenum )bswap_ENUM ( pc + 0 ); - const GLenum query = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetMapdv_size(target,query); - GLdouble answerBuffer[200]; - GLdouble * v = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); - - if (v == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMapdv( GET_DISPATCH(), ( - target, - query, - v - ) ); - (void) bswap_64_array( (uint64_t *) v, compsize ); - __glXSendReplySwap(cl->client, v, compsize, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetMapfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum target = (GLenum )bswap_ENUM ( pc + 0 ); - const GLenum query = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetMapfv_size(target,query); - GLfloat answerBuffer[200]; - GLfloat * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (v == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMapfv( GET_DISPATCH(), ( - target, - query, - v - ) ); - (void) bswap_32_array( (uint32_t *) v, compsize ); - __glXSendReplySwap(cl->client, v, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetMapiv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum target = (GLenum )bswap_ENUM ( pc + 0 ); - const GLenum query = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetMapiv_size(target,query); - GLint answerBuffer[200]; - GLint * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (v == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMapiv( GET_DISPATCH(), ( - target, - query, - v - ) ); - (void) bswap_32_array( (uint32_t *) v, compsize ); - __glXSendReplySwap(cl->client, v, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetMaterialfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetMaterialfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMaterialfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetMaterialiv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetMaterialiv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMaterialiv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetPixelMapfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum map = (GLenum )bswap_ENUM ( pc + 0 ); - - const GLuint compsize = __glGetPixelMapfv_size(map); - GLfloat answerBuffer[200]; - GLfloat * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (values == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetPixelMapfv( GET_DISPATCH(), ( - map, - values - ) ); - (void) bswap_32_array( (uint32_t *) values, compsize ); - __glXSendReplySwap(cl->client, values, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetPixelMapuiv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum map = (GLenum )bswap_ENUM ( pc + 0 ); - - const GLuint compsize = __glGetPixelMapuiv_size(map); - GLuint answerBuffer[200]; - GLuint * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (values == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetPixelMapuiv( GET_DISPATCH(), ( - map, - values - ) ); - (void) bswap_32_array( (uint32_t *) values, compsize ); - __glXSendReplySwap(cl->client, values, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetPixelMapusv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum map = (GLenum )bswap_ENUM ( pc + 0 ); - - const GLuint compsize = __glGetPixelMapusv_size(map); - GLushort answerBuffer[200]; - GLushort * values = __glXGetAnswerBuffer(cl, compsize * 2, answerBuffer, sizeof(answerBuffer), 2); - - if (values == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetPixelMapusv( GET_DISPATCH(), ( - map, - values - ) ); - (void) bswap_16_array( (uint16_t *) values, compsize ); - __glXSendReplySwap(cl->client, values, compsize, 2, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetTexEnvfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetTexEnvfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexEnvfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetTexEnviv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetTexEnviv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexEnviv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetTexGendv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetTexGendv_size(pname); - GLdouble answerBuffer[200]; - GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexGendv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_64_array( (uint64_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetTexGenfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetTexGenfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexGenfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetTexGeniv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetTexGeniv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexGeniv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetTexParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetTexParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexParameterfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetTexParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetTexParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexParameteriv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetTexLevelParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 8 ); - - const GLuint compsize = __glGetTexLevelParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexLevelParameterfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetTexLevelParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 8 ); - - const GLuint compsize = __glGetTexLevelParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexLevelParameteriv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_IsEnabled(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsEnabled( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); - __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -int __glXDispSwap_IsList(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsList( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ) - ) ); - __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDispSwap_DepthRange(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 16); - pc -= 4; - } -#endif - - CALL_DepthRange( GET_DISPATCH(), ( - (GLclampd)bswap_FLOAT64( pc + 0 ), - (GLclampd)bswap_FLOAT64( pc + 8 ) - ) ); -} - -void __glXDispSwap_Frustum(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 48); - pc -= 4; - } -#endif - - CALL_Frustum( GET_DISPATCH(), ( - (GLdouble)bswap_FLOAT64( pc + 0 ), - (GLdouble)bswap_FLOAT64( pc + 8 ), - (GLdouble)bswap_FLOAT64( pc + 16 ), - (GLdouble)bswap_FLOAT64( pc + 24 ), - (GLdouble)bswap_FLOAT64( pc + 32 ), - (GLdouble)bswap_FLOAT64( pc + 40 ) - ) ); -} - -void __glXDispSwap_LoadIdentity(GLbyte * pc) -{ - CALL_LoadIdentity( GET_DISPATCH(), () ); -} - -void __glXDispSwap_LoadMatrixf(GLbyte * pc) -{ - CALL_LoadMatrixf( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 16 ) - ) ); -} - -void __glXDispSwap_LoadMatrixd(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 128); - pc -= 4; - } -#endif - - CALL_LoadMatrixd( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 16 ) - ) ); -} - -void __glXDispSwap_MatrixMode(GLbyte * pc) -{ - CALL_MatrixMode( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -void __glXDispSwap_MultMatrixf(GLbyte * pc) -{ - CALL_MultMatrixf( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 16 ) - ) ); -} - -void __glXDispSwap_MultMatrixd(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 128); - pc -= 4; - } -#endif - - CALL_MultMatrixd( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 16 ) - ) ); -} - -void __glXDispSwap_Ortho(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 48); - pc -= 4; - } -#endif - - CALL_Ortho( GET_DISPATCH(), ( - (GLdouble)bswap_FLOAT64( pc + 0 ), - (GLdouble)bswap_FLOAT64( pc + 8 ), - (GLdouble)bswap_FLOAT64( pc + 16 ), - (GLdouble)bswap_FLOAT64( pc + 24 ), - (GLdouble)bswap_FLOAT64( pc + 32 ), - (GLdouble)bswap_FLOAT64( pc + 40 ) - ) ); -} - -void __glXDispSwap_PopMatrix(GLbyte * pc) -{ - CALL_PopMatrix( GET_DISPATCH(), () ); -} - -void __glXDispSwap_PushMatrix(GLbyte * pc) -{ - CALL_PushMatrix( GET_DISPATCH(), () ); -} - -void __glXDispSwap_Rotated(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 32); - pc -= 4; - } -#endif - - CALL_Rotated( GET_DISPATCH(), ( - (GLdouble)bswap_FLOAT64( pc + 0 ), - (GLdouble)bswap_FLOAT64( pc + 8 ), - (GLdouble)bswap_FLOAT64( pc + 16 ), - (GLdouble)bswap_FLOAT64( pc + 24 ) - ) ); -} - -void __glXDispSwap_Rotatef(GLbyte * pc) -{ - CALL_Rotatef( GET_DISPATCH(), ( - (GLfloat )bswap_FLOAT32( pc + 0 ), - (GLfloat )bswap_FLOAT32( pc + 4 ), - (GLfloat )bswap_FLOAT32( pc + 8 ), - (GLfloat )bswap_FLOAT32( pc + 12 ) - ) ); -} - -void __glXDispSwap_Scaled(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 24); - pc -= 4; - } -#endif - - CALL_Scaled( GET_DISPATCH(), ( - (GLdouble)bswap_FLOAT64( pc + 0 ), - (GLdouble)bswap_FLOAT64( pc + 8 ), - (GLdouble)bswap_FLOAT64( pc + 16 ) - ) ); -} - -void __glXDispSwap_Scalef(GLbyte * pc) -{ - CALL_Scalef( GET_DISPATCH(), ( - (GLfloat )bswap_FLOAT32( pc + 0 ), - (GLfloat )bswap_FLOAT32( pc + 4 ), - (GLfloat )bswap_FLOAT32( pc + 8 ) - ) ); -} - -void __glXDispSwap_Translated(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 24); - pc -= 4; - } -#endif - - CALL_Translated( GET_DISPATCH(), ( - (GLdouble)bswap_FLOAT64( pc + 0 ), - (GLdouble)bswap_FLOAT64( pc + 8 ), - (GLdouble)bswap_FLOAT64( pc + 16 ) - ) ); -} - -void __glXDispSwap_Translatef(GLbyte * pc) -{ - CALL_Translatef( GET_DISPATCH(), ( - (GLfloat )bswap_FLOAT32( pc + 0 ), - (GLfloat )bswap_FLOAT32( pc + 4 ), - (GLfloat )bswap_FLOAT32( pc + 8 ) - ) ); -} - -void __glXDispSwap_Viewport(GLbyte * pc) -{ - CALL_Viewport( GET_DISPATCH(), ( - (GLint )bswap_CARD32 ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLsizei )bswap_CARD32 ( pc + 8 ), - (GLsizei )bswap_CARD32 ( pc + 12 ) - ) ); -} - -void __glXDispSwap_BindTexture(GLbyte * pc) -{ - CALL_BindTexture( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ) - ) ); -} - -void __glXDispSwap_Indexubv(GLbyte * pc) -{ - CALL_Indexubv( GET_DISPATCH(), ( - (const GLubyte *)(pc + 0) - ) ); -} - -void __glXDispSwap_PolygonOffset(GLbyte * pc) -{ - CALL_PolygonOffset( GET_DISPATCH(), ( - (GLfloat )bswap_FLOAT32( pc + 0 ), - (GLfloat )bswap_FLOAT32( pc + 4 ) - ) ); -} - -int __glXDispSwap_AreTexturesResident(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - GLboolean retval; - GLboolean answerBuffer[200]; - GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); - retval = CALL_AreTexturesResident( GET_DISPATCH(), ( - n, - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ), - residences - ) ); - __glXSendReplySwap(cl->client, residences, n, 1, GL_TRUE, retval); - error = Success; - } - - return error; -} - -int __glXDispSwap_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - GLboolean retval; - GLboolean answerBuffer[200]; - GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); - retval = CALL_AreTexturesResident( GET_DISPATCH(), ( - n, - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ), - residences - ) ); - __glXSendReplySwap(cl->client, residences, n, 1, GL_TRUE, retval); - error = Success; - } - - return error; -} - -void __glXDispSwap_CopyTexImage1D(GLbyte * pc) -{ - CALL_CopyTexImage1D( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - (GLint )bswap_CARD32 ( pc + 12 ), - (GLint )bswap_CARD32 ( pc + 16 ), - (GLsizei )bswap_CARD32 ( pc + 20 ), - (GLint )bswap_CARD32 ( pc + 24 ) - ) ); -} - -void __glXDispSwap_CopyTexImage2D(GLbyte * pc) -{ - CALL_CopyTexImage2D( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - (GLint )bswap_CARD32 ( pc + 12 ), - (GLint )bswap_CARD32 ( pc + 16 ), - (GLsizei )bswap_CARD32 ( pc + 20 ), - (GLsizei )bswap_CARD32 ( pc + 24 ), - (GLint )bswap_CARD32 ( pc + 28 ) - ) ); -} - -void __glXDispSwap_CopyTexSubImage1D(GLbyte * pc) -{ - CALL_CopyTexSubImage1D( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ), - (GLint )bswap_CARD32 ( pc + 12 ), - (GLint )bswap_CARD32 ( pc + 16 ), - (GLsizei )bswap_CARD32 ( pc + 20 ) - ) ); -} - -void __glXDispSwap_CopyTexSubImage2D(GLbyte * pc) -{ - CALL_CopyTexSubImage2D( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ), - (GLint )bswap_CARD32 ( pc + 12 ), - (GLint )bswap_CARD32 ( pc + 16 ), - (GLint )bswap_CARD32 ( pc + 20 ), - (GLsizei )bswap_CARD32 ( pc + 24 ), - (GLsizei )bswap_CARD32 ( pc + 28 ) - ) ); -} - -int __glXDispSwap_DeleteTextures(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - CALL_DeleteTextures( GET_DISPATCH(), ( - n, - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) - ) ); - error = Success; - } - - return error; -} - -int __glXDispSwap_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - CALL_DeleteTextures( GET_DISPATCH(), ( - n, - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) - ) ); - error = Success; - } - - return error; -} - -int __glXDispSwap_GenTextures(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - GLuint answerBuffer[200]; - GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); - CALL_GenTextures( GET_DISPATCH(), ( - n, - textures - ) ); - (void) bswap_32_array( (uint32_t *) textures, n ); - __glXSendReplySwap(cl->client, textures, n, 4, GL_TRUE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - GLuint answerBuffer[200]; - GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); - CALL_GenTextures( GET_DISPATCH(), ( - n, - textures - ) ); - (void) bswap_32_array( (uint32_t *) textures, n ); - __glXSendReplySwap(cl->client, textures, n, 4, GL_TRUE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_IsTexture(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsTexture( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ) - ) ); - __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -int __glXDispSwap_IsTextureEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsTexture( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ) - ) ); - __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDispSwap_PrioritizeTextures(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - CALL_PrioritizeTextures( GET_DISPATCH(), ( - n, - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ), - (const GLclampf *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) - ) ); -} - -void __glXDispSwap_TexSubImage1D(GLbyte * pc) -{ - const CARD32 ptr_is_null = *(CARD32 *)(pc + 52); - const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 56); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); - - CALL_TexSubImage1D( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 20 ), - (GLint )bswap_CARD32 ( pc + 24 ), - (GLint )bswap_CARD32 ( pc + 28 ), - (GLsizei )bswap_CARD32 ( pc + 36 ), - (GLenum )bswap_ENUM ( pc + 44 ), - (GLenum )bswap_ENUM ( pc + 48 ), - pixels - ) ); -} - -void __glXDispSwap_TexSubImage2D(GLbyte * pc) -{ - const CARD32 ptr_is_null = *(CARD32 *)(pc + 52); - const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 56); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); - - CALL_TexSubImage2D( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 20 ), - (GLint )bswap_CARD32 ( pc + 24 ), - (GLint )bswap_CARD32 ( pc + 28 ), - (GLint )bswap_CARD32 ( pc + 32 ), - (GLsizei )bswap_CARD32 ( pc + 36 ), - (GLsizei )bswap_CARD32 ( pc + 40 ), - (GLenum )bswap_ENUM ( pc + 44 ), - (GLenum )bswap_ENUM ( pc + 48 ), - pixels - ) ); -} - -void __glXDispSwap_BlendColor(GLbyte * pc) -{ - CALL_BlendColor( GET_DISPATCH(), ( - (GLclampf)bswap_FLOAT32( pc + 0 ), - (GLclampf)bswap_FLOAT32( pc + 4 ), - (GLclampf)bswap_FLOAT32( pc + 8 ), - (GLclampf)bswap_FLOAT32( pc + 12 ) - ) ); -} - -void __glXDispSwap_BlendEquation(GLbyte * pc) -{ - CALL_BlendEquation( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -void __glXDispSwap_ColorTable(GLbyte * pc) -{ - const GLvoid * const table = (const GLvoid *) (pc + 40); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); - - CALL_ColorTable( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 20 ), - (GLenum )bswap_ENUM ( pc + 24 ), - (GLsizei )bswap_CARD32 ( pc + 28 ), - (GLenum )bswap_ENUM ( pc + 32 ), - (GLenum )bswap_ENUM ( pc + 36 ), - table - ) ); -} - -void __glXDispSwap_ColorTableParameterfv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLfloat * params; - - params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glColorTableParameterfv_size(pname) ); - - CALL_ColorTableParameterfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); -} - -void __glXDispSwap_ColorTableParameteriv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLint * params; - - params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glColorTableParameteriv_size(pname) ); - - CALL_ColorTableParameteriv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); -} - -void __glXDispSwap_CopyColorTable(GLbyte * pc) -{ - CALL_CopyColorTable( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ), - (GLint )bswap_CARD32 ( pc + 12 ), - (GLsizei )bswap_CARD32 ( pc + 16 ) - ) ); -} - -int __glXDispSwap_GetColorTableParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetColorTableParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetColorTableParameterfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetColorTableParameterfvSGI(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetColorTableParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetColorTableParameterfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetColorTableParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetColorTableParameteriv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetColorTableParameterivSGI(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetColorTableParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetColorTableParameteriv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -void __glXDispSwap_ColorSubTable(GLbyte * pc) -{ - const GLvoid * const data = (const GLvoid *) (pc + 40); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); - - CALL_ColorSubTable( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 20 ), - (GLsizei )bswap_CARD32 ( pc + 24 ), - (GLsizei )bswap_CARD32 ( pc + 28 ), - (GLenum )bswap_ENUM ( pc + 32 ), - (GLenum )bswap_ENUM ( pc + 36 ), - data - ) ); -} - -void __glXDispSwap_CopyColorSubTable(GLbyte * pc) -{ - CALL_CopyColorSubTable( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLsizei )bswap_CARD32 ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ), - (GLint )bswap_CARD32 ( pc + 12 ), - (GLsizei )bswap_CARD32 ( pc + 16 ) - ) ); -} - -void __glXDispSwap_ConvolutionFilter1D(GLbyte * pc) -{ - const GLvoid * const image = (const GLvoid *) (pc + 44); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); - - CALL_ConvolutionFilter1D( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 20 ), - (GLenum )bswap_ENUM ( pc + 24 ), - (GLsizei )bswap_CARD32 ( pc + 28 ), - (GLenum )bswap_ENUM ( pc + 36 ), - (GLenum )bswap_ENUM ( pc + 40 ), - image - ) ); -} - -void __glXDispSwap_ConvolutionFilter2D(GLbyte * pc) -{ - const GLvoid * const image = (const GLvoid *) (pc + 44); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); - - CALL_ConvolutionFilter2D( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 20 ), - (GLenum )bswap_ENUM ( pc + 24 ), - (GLsizei )bswap_CARD32 ( pc + 28 ), - (GLsizei )bswap_CARD32 ( pc + 32 ), - (GLenum )bswap_ENUM ( pc + 36 ), - (GLenum )bswap_ENUM ( pc + 40 ), - image - ) ); -} - -void __glXDispSwap_ConvolutionParameterf(GLbyte * pc) -{ - CALL_ConvolutionParameterf( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLfloat )bswap_FLOAT32( pc + 8 ) - ) ); -} - -void __glXDispSwap_ConvolutionParameterfv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLfloat * params; - - params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glConvolutionParameterfv_size(pname) ); - - CALL_ConvolutionParameterfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); -} - -void __glXDispSwap_ConvolutionParameteri(GLbyte * pc) -{ - CALL_ConvolutionParameteri( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ) - ) ); -} - -void __glXDispSwap_ConvolutionParameteriv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLint * params; - - params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glConvolutionParameteriv_size(pname) ); - - CALL_ConvolutionParameteriv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); -} - -void __glXDispSwap_CopyConvolutionFilter1D(GLbyte * pc) -{ - CALL_CopyConvolutionFilter1D( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ), - (GLint )bswap_CARD32 ( pc + 12 ), - (GLsizei )bswap_CARD32 ( pc + 16 ) - ) ); -} - -void __glXDispSwap_CopyConvolutionFilter2D(GLbyte * pc) -{ - CALL_CopyConvolutionFilter2D( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ), - (GLint )bswap_CARD32 ( pc + 12 ), - (GLsizei )bswap_CARD32 ( pc + 16 ), - (GLsizei )bswap_CARD32 ( pc + 20 ) - ) ); -} - -int __glXDispSwap_GetConvolutionParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetConvolutionParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetConvolutionParameterfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetConvolutionParameterfvEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetConvolutionParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetConvolutionParameterfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetConvolutionParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetConvolutionParameteriv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetConvolutionParameterivEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetConvolutionParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetConvolutionParameteriv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetHistogramParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetHistogramParameterfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetHistogramParameterfvEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetHistogramParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetHistogramParameterfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetHistogramParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetHistogramParameteriv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetHistogramParameterivEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetHistogramParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetHistogramParameteriv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetMinmaxParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMinmaxParameterfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetMinmaxParameterfvEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetMinmaxParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMinmaxParameterfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetMinmaxParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMinmaxParameteriv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetMinmaxParameterivEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetMinmaxParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMinmaxParameteriv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -void __glXDispSwap_Histogram(GLbyte * pc) -{ - CALL_Histogram( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLsizei )bswap_CARD32 ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - *(GLboolean *)(pc + 12) - ) ); -} - -void __glXDispSwap_Minmax(GLbyte * pc) -{ - CALL_Minmax( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - *(GLboolean *)(pc + 8) - ) ); -} - -void __glXDispSwap_ResetHistogram(GLbyte * pc) -{ - CALL_ResetHistogram( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -void __glXDispSwap_ResetMinmax(GLbyte * pc) -{ - CALL_ResetMinmax( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -void __glXDispSwap_TexImage3D(GLbyte * pc) -{ - const CARD32 ptr_is_null = *(CARD32 *)(pc + 76); - const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 80); - __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) bswap_CARD32( & hdr->imageHeight )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES, (GLint) bswap_CARD32( & hdr->skipImages )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); - - CALL_TexImage3D( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 36 ), - (GLint )bswap_CARD32 ( pc + 40 ), - (GLint )bswap_CARD32 ( pc + 44 ), - (GLsizei )bswap_CARD32 ( pc + 48 ), - (GLsizei )bswap_CARD32 ( pc + 52 ), - (GLsizei )bswap_CARD32 ( pc + 56 ), - (GLint )bswap_CARD32 ( pc + 64 ), - (GLenum )bswap_ENUM ( pc + 68 ), - (GLenum )bswap_ENUM ( pc + 72 ), - pixels - ) ); -} - -void __glXDispSwap_TexSubImage3D(GLbyte * pc) -{ - const CARD32 ptr_is_null = *(CARD32 *)(pc + 84); - const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 88); - __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) bswap_CARD32( & hdr->imageHeight )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES, (GLint) bswap_CARD32( & hdr->skipImages )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); - - CALL_TexSubImage3D( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 36 ), - (GLint )bswap_CARD32 ( pc + 40 ), - (GLint )bswap_CARD32 ( pc + 44 ), - (GLint )bswap_CARD32 ( pc + 48 ), - (GLint )bswap_CARD32 ( pc + 52 ), - (GLsizei )bswap_CARD32 ( pc + 60 ), - (GLsizei )bswap_CARD32 ( pc + 64 ), - (GLsizei )bswap_CARD32 ( pc + 68 ), - (GLenum )bswap_ENUM ( pc + 76 ), - (GLenum )bswap_ENUM ( pc + 80 ), - pixels - ) ); -} - -void __glXDispSwap_CopyTexSubImage3D(GLbyte * pc) -{ - CALL_CopyTexSubImage3D( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ), - (GLint )bswap_CARD32 ( pc + 12 ), - (GLint )bswap_CARD32 ( pc + 16 ), - (GLint )bswap_CARD32 ( pc + 20 ), - (GLint )bswap_CARD32 ( pc + 24 ), - (GLsizei )bswap_CARD32 ( pc + 28 ), - (GLsizei )bswap_CARD32 ( pc + 32 ) - ) ); -} - -void __glXDispSwap_ActiveTextureARB(GLbyte * pc) -{ - CALL_ActiveTextureARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -void __glXDispSwap_MultiTexCoord1dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 12); - pc -= 4; - } -#endif - - CALL_MultiTexCoord1dvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 8 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 ) - ) ); -} - -void __glXDispSwap_MultiTexCoord1fvARB(GLbyte * pc) -{ - CALL_MultiTexCoord1fvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 1 ) - ) ); -} - -void __glXDispSwap_MultiTexCoord1ivARB(GLbyte * pc) -{ - CALL_MultiTexCoord1ivARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 1 ) - ) ); -} - -void __glXDispSwap_MultiTexCoord1svARB(GLbyte * pc) -{ - CALL_MultiTexCoord1svARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 1 ) - ) ); -} - -void __glXDispSwap_MultiTexCoord2dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 20); - pc -= 4; - } -#endif - - CALL_MultiTexCoord2dvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 16 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 ) - ) ); -} - -void __glXDispSwap_MultiTexCoord2fvARB(GLbyte * pc) -{ - CALL_MultiTexCoord2fvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 2 ) - ) ); -} - -void __glXDispSwap_MultiTexCoord2ivARB(GLbyte * pc) -{ - CALL_MultiTexCoord2ivARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 2 ) - ) ); -} - -void __glXDispSwap_MultiTexCoord2svARB(GLbyte * pc) -{ - CALL_MultiTexCoord2svARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 2 ) - ) ); -} - -void __glXDispSwap_MultiTexCoord3dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 28); - pc -= 4; - } -#endif - - CALL_MultiTexCoord3dvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 24 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_MultiTexCoord3fvARB(GLbyte * pc) -{ - CALL_MultiTexCoord3fvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 3 ) - ) ); -} - -void __glXDispSwap_MultiTexCoord3ivARB(GLbyte * pc) -{ - CALL_MultiTexCoord3ivARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 3 ) - ) ); -} - -void __glXDispSwap_MultiTexCoord3svARB(GLbyte * pc) -{ - CALL_MultiTexCoord3svARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 3 ) - ) ); -} - -void __glXDispSwap_MultiTexCoord4dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 36); - pc -= 4; - } -#endif - - CALL_MultiTexCoord4dvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 32 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_MultiTexCoord4fvARB(GLbyte * pc) -{ - CALL_MultiTexCoord4fvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_MultiTexCoord4ivARB(GLbyte * pc) -{ - CALL_MultiTexCoord4ivARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_MultiTexCoord4svARB(GLbyte * pc) -{ - CALL_MultiTexCoord4svARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_SampleCoverageARB(GLbyte * pc) -{ - CALL_SampleCoverageARB( GET_DISPATCH(), ( - (GLclampf)bswap_FLOAT32( pc + 0 ), - *(GLboolean *)(pc + 4) - ) ); -} - -void __glXDispSwap_CompressedTexImage1DARB(GLbyte * pc) -{ - const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 20 ); - - CALL_CompressedTexImage1DARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - (GLsizei )bswap_CARD32 ( pc + 12 ), - (GLint )bswap_CARD32 ( pc + 16 ), - imageSize, - (const GLvoid *)(pc + 24) - ) ); -} - -void __glXDispSwap_CompressedTexImage2DARB(GLbyte * pc) -{ - const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 24 ); - - CALL_CompressedTexImage2DARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - (GLsizei )bswap_CARD32 ( pc + 12 ), - (GLsizei )bswap_CARD32 ( pc + 16 ), - (GLint )bswap_CARD32 ( pc + 20 ), - imageSize, - (const GLvoid *)(pc + 28) - ) ); -} - -void __glXDispSwap_CompressedTexImage3DARB(GLbyte * pc) -{ - const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 28 ); - - CALL_CompressedTexImage3DARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - (GLsizei )bswap_CARD32 ( pc + 12 ), - (GLsizei )bswap_CARD32 ( pc + 16 ), - (GLsizei )bswap_CARD32 ( pc + 20 ), - (GLint )bswap_CARD32 ( pc + 24 ), - imageSize, - (const GLvoid *)(pc + 32) - ) ); -} - -void __glXDispSwap_CompressedTexSubImage1DARB(GLbyte * pc) -{ - const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 20 ); - - CALL_CompressedTexSubImage1DARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ), - (GLsizei )bswap_CARD32 ( pc + 12 ), - (GLenum )bswap_ENUM ( pc + 16 ), - imageSize, - (const GLvoid *)(pc + 24) - ) ); -} - -void __glXDispSwap_CompressedTexSubImage2DARB(GLbyte * pc) -{ - const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 28 ); - - CALL_CompressedTexSubImage2DARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ), - (GLint )bswap_CARD32 ( pc + 12 ), - (GLsizei )bswap_CARD32 ( pc + 16 ), - (GLsizei )bswap_CARD32 ( pc + 20 ), - (GLenum )bswap_ENUM ( pc + 24 ), - imageSize, - (const GLvoid *)(pc + 32) - ) ); -} - -void __glXDispSwap_CompressedTexSubImage3DARB(GLbyte * pc) -{ - const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 36 ); - - CALL_CompressedTexSubImage3DARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ), - (GLint )bswap_CARD32 ( pc + 12 ), - (GLint )bswap_CARD32 ( pc + 16 ), - (GLsizei )bswap_CARD32 ( pc + 20 ), - (GLsizei )bswap_CARD32 ( pc + 24 ), - (GLsizei )bswap_CARD32 ( pc + 28 ), - (GLenum )bswap_ENUM ( pc + 32 ), - imageSize, - (const GLvoid *)(pc + 40) - ) ); -} - -int __glXDispSwap_GetProgramEnvParameterdvARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLdouble params[4]; - CALL_GetProgramEnvParameterdvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - params - ) ); - (void) bswap_64_array( (uint64_t *) params, 4 ); - __glXSendReplySwap(cl->client, params, 4, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetProgramEnvParameterfvARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLfloat params[4]; - CALL_GetProgramEnvParameterfvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - params - ) ); - (void) bswap_32_array( (uint32_t *) params, 4 ); - __glXSendReplySwap(cl->client, params, 4, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetProgramLocalParameterdvARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLdouble params[4]; - CALL_GetProgramLocalParameterdvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - params - ) ); - (void) bswap_64_array( (uint64_t *) params, 4 ); - __glXSendReplySwap(cl->client, params, 4, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetProgramLocalParameterfvARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLfloat params[4]; - CALL_GetProgramLocalParameterfvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - params - ) ); - (void) bswap_32_array( (uint32_t *) params, 4 ); - __glXSendReplySwap(cl->client, params, 4, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetProgramivARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetProgramivARB_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetProgramivARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetVertexAttribdvARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetVertexAttribdvARB_size(pname); - GLdouble answerBuffer[200]; - GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetVertexAttribdvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - pname, - params - ) ); - (void) bswap_64_array( (uint64_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetVertexAttribfvARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetVertexAttribfvARB_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetVertexAttribfvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetVertexAttribivARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetVertexAttribivARB_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetVertexAttribivARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -void __glXDispSwap_ProgramEnvParameter4dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 40); - pc -= 4; - } -#endif - - CALL_ProgramEnvParameter4dvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 4 ) - ) ); -} - -void __glXDispSwap_ProgramEnvParameter4fvARB(GLbyte * pc) -{ - CALL_ProgramEnvParameter4fvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 ) - ) ); -} - -void __glXDispSwap_ProgramLocalParameter4dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 40); - pc -= 4; - } -#endif - - CALL_ProgramLocalParameter4dvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 4 ) - ) ); -} - -void __glXDispSwap_ProgramLocalParameter4fvARB(GLbyte * pc) -{ - CALL_ProgramLocalParameter4fvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 ) - ) ); -} - -void __glXDispSwap_ProgramStringARB(GLbyte * pc) -{ - const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 8 ); - - CALL_ProgramStringARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - len, - (const GLvoid *)(pc + 12) - ) ); -} - -void __glXDispSwap_VertexAttrib1dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 12); - pc -= 4; - } -#endif - - CALL_VertexAttrib1dvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 1 ) - ) ); -} - -void __glXDispSwap_VertexAttrib1fvARB(GLbyte * pc) -{ - CALL_VertexAttrib1fvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 1 ) - ) ); -} - -void __glXDispSwap_VertexAttrib1svARB(GLbyte * pc) -{ - CALL_VertexAttrib1svARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 1 ) - ) ); -} - -void __glXDispSwap_VertexAttrib2dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 20); - pc -= 4; - } -#endif - - CALL_VertexAttrib2dvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 2 ) - ) ); -} - -void __glXDispSwap_VertexAttrib2fvARB(GLbyte * pc) -{ - CALL_VertexAttrib2fvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 2 ) - ) ); -} - -void __glXDispSwap_VertexAttrib2svARB(GLbyte * pc) -{ - CALL_VertexAttrib2svARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 2 ) - ) ); -} - -void __glXDispSwap_VertexAttrib3dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 28); - pc -= 4; - } -#endif - - CALL_VertexAttrib3dvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 3 ) - ) ); -} - -void __glXDispSwap_VertexAttrib3fvARB(GLbyte * pc) -{ - CALL_VertexAttrib3fvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 3 ) - ) ); -} - -void __glXDispSwap_VertexAttrib3svARB(GLbyte * pc) -{ - CALL_VertexAttrib3svARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 3 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4NbvARB(GLbyte * pc) -{ - CALL_VertexAttrib4NbvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLbyte *)(pc + 4) - ) ); -} - -void __glXDispSwap_VertexAttrib4NivARB(GLbyte * pc) -{ - CALL_VertexAttrib4NivARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4NsvARB(GLbyte * pc) -{ - CALL_VertexAttrib4NsvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4NubvARB(GLbyte * pc) -{ - CALL_VertexAttrib4NubvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLubyte *)(pc + 4) - ) ); -} - -void __glXDispSwap_VertexAttrib4NuivARB(GLbyte * pc) -{ - CALL_VertexAttrib4NuivARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4NusvARB(GLbyte * pc) -{ - CALL_VertexAttrib4NusvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLushort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4bvARB(GLbyte * pc) -{ - CALL_VertexAttrib4bvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLbyte *)(pc + 4) - ) ); -} - -void __glXDispSwap_VertexAttrib4dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 36); - pc -= 4; - } -#endif - - CALL_VertexAttrib4dvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4fvARB(GLbyte * pc) -{ - CALL_VertexAttrib4fvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4ivARB(GLbyte * pc) -{ - CALL_VertexAttrib4ivARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4svARB(GLbyte * pc) -{ - CALL_VertexAttrib4svARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4ubvARB(GLbyte * pc) -{ - CALL_VertexAttrib4ubvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLubyte *)(pc + 4) - ) ); -} - -void __glXDispSwap_VertexAttrib4uivARB(GLbyte * pc) -{ - CALL_VertexAttrib4uivARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4usvARB(GLbyte * pc) -{ - CALL_VertexAttrib4usvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLushort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_BeginQueryARB(GLbyte * pc) -{ - CALL_BeginQueryARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ) - ) ); -} - -int __glXDispSwap_DeleteQueriesARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - CALL_DeleteQueriesARB( GET_DISPATCH(), ( - n, - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) - ) ); - error = Success; - } - - return error; -} - -void __glXDispSwap_EndQueryARB(GLbyte * pc) -{ - CALL_EndQueryARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -int __glXDispSwap_GenQueriesARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - GLuint answerBuffer[200]; - GLuint * ids = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); - CALL_GenQueriesARB( GET_DISPATCH(), ( - n, - ids - ) ); - (void) bswap_32_array( (uint32_t *) ids, n ); - __glXSendReplySwap(cl->client, ids, n, 4, GL_TRUE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetQueryObjectivARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetQueryObjectivARB_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetQueryObjectivARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetQueryObjectuivARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetQueryObjectuivARB_size(pname); - GLuint answerBuffer[200]; - GLuint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetQueryObjectuivARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetQueryivARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetQueryivARB_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetQueryivARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_IsQueryARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsQueryARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ) - ) ); - __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDispSwap_DrawBuffersARB(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - CALL_DrawBuffersARB( GET_DISPATCH(), ( - n, - (const GLenum *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) - ) ); -} - -void __glXDispSwap_SampleMaskSGIS(GLbyte * pc) -{ - CALL_SampleMaskSGIS( GET_DISPATCH(), ( - (GLclampf)bswap_FLOAT32( pc + 0 ), - *(GLboolean *)(pc + 4) - ) ); -} - -void __glXDispSwap_SamplePatternSGIS(GLbyte * pc) -{ - CALL_SamplePatternSGIS( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -void __glXDispSwap_PointParameterfEXT(GLbyte * pc) -{ - CALL_PointParameterfEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLfloat )bswap_FLOAT32( pc + 4 ) - ) ); -} - -void __glXDispSwap_PointParameterfvEXT(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); - const GLfloat * params; - - params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 4), __glPointParameterfvEXT_size(pname) ); - - CALL_PointParameterfvEXT( GET_DISPATCH(), ( - pname, - params - ) ); -} - -void __glXDispSwap_SecondaryColor3bvEXT(GLbyte * pc) -{ - CALL_SecondaryColor3bvEXT( GET_DISPATCH(), ( - (const GLbyte *)(pc + 0) - ) ); -} - -void __glXDispSwap_SecondaryColor3dvEXT(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 24); - pc -= 4; - } -#endif - - CALL_SecondaryColor3dvEXT( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_SecondaryColor3fvEXT(GLbyte * pc) -{ - CALL_SecondaryColor3fvEXT( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_SecondaryColor3ivEXT(GLbyte * pc) -{ - CALL_SecondaryColor3ivEXT( GET_DISPATCH(), ( - (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_SecondaryColor3svEXT(GLbyte * pc) -{ - CALL_SecondaryColor3svEXT( GET_DISPATCH(), ( - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_SecondaryColor3ubvEXT(GLbyte * pc) -{ - CALL_SecondaryColor3ubvEXT( GET_DISPATCH(), ( - (const GLubyte *)(pc + 0) - ) ); -} - -void __glXDispSwap_SecondaryColor3uivEXT(GLbyte * pc) -{ - CALL_SecondaryColor3uivEXT( GET_DISPATCH(), ( - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_SecondaryColor3usvEXT(GLbyte * pc) -{ - CALL_SecondaryColor3usvEXT( GET_DISPATCH(), ( - (const GLushort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_FogCoorddvEXT(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 8); - pc -= 4; - } -#endif - - CALL_FogCoorddvEXT( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 ) - ) ); -} - -void __glXDispSwap_FogCoordfvEXT(GLbyte * pc) -{ - CALL_FogCoordfvEXT( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 1 ) - ) ); -} - -void __glXDispSwap_BlendFuncSeparateEXT(GLbyte * pc) -{ - CALL_BlendFuncSeparateEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - (GLenum )bswap_ENUM ( pc + 12 ) - ) ); -} - -void __glXDispSwap_WindowPos3fvMESA(GLbyte * pc) -{ - CALL_WindowPos3fvMESA( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) - ) ); -} - -int __glXDispSwap_AreProgramsResidentNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - GLboolean retval; - GLboolean answerBuffer[200]; - GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); - retval = CALL_AreProgramsResidentNV( GET_DISPATCH(), ( - n, - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ), - residences - ) ); - __glXSendReplySwap(cl->client, residences, n, 1, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDispSwap_BindProgramNV(GLbyte * pc) -{ - CALL_BindProgramNV( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ) - ) ); -} - -int __glXDispSwap_DeleteProgramsNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - CALL_DeleteProgramsNV( GET_DISPATCH(), ( - n, - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) - ) ); - error = Success; - } - - return error; -} - -void __glXDispSwap_ExecuteProgramNV(GLbyte * pc) -{ - CALL_ExecuteProgramNV( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 ) - ) ); -} - -int __glXDispSwap_GenProgramsNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - GLuint answerBuffer[200]; - GLuint * programs = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); - CALL_GenProgramsNV( GET_DISPATCH(), ( - n, - programs - ) ); - (void) bswap_32_array( (uint32_t *) programs, n ); - __glXSendReplySwap(cl->client, programs, n, 4, GL_TRUE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetProgramParameterdvNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLdouble params[4]; - CALL_GetProgramParameterdvNV( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - params - ) ); - (void) bswap_64_array( (uint64_t *) params, 4 ); - __glXSendReplySwap(cl->client, params, 4, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetProgramParameterfvNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLfloat params[4]; - CALL_GetProgramParameterfvNV( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - params - ) ); - (void) bswap_32_array( (uint32_t *) params, 4 ); - __glXSendReplySwap(cl->client, params, 4, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetProgramivNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetProgramivNV_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetProgramivNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetTrackMatrixivNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLint params[1]; - CALL_GetTrackMatrixivNV( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - params - ) ); - (void) bswap_32_array( (uint32_t *) params, 1 ); - __glXSendReplySwap(cl->client, params, 1, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetVertexAttribdvNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetVertexAttribdvNV_size(pname); - GLdouble answerBuffer[200]; - GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetVertexAttribdvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - pname, - params - ) ); - (void) bswap_64_array( (uint64_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetVertexAttribfvNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetVertexAttribfvNV_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetVertexAttribfvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetVertexAttribivNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetVertexAttribivNV_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetVertexAttribivNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_IsProgramNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsProgramNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ) - ) ); - __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDispSwap_LoadProgramNV(GLbyte * pc) -{ - const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 8 ); - - CALL_LoadProgramNV( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - len, - (const GLubyte *)(pc + 12) - ) ); -} - -void __glXDispSwap_ProgramParameters4dvNV(GLbyte * pc) -{ - const GLuint num = (GLuint )bswap_CARD32 ( pc + 8 ); - -#ifdef __GLX_ALIGN64 - const GLuint cmdlen = 16 + __GLX_PAD((num * 32)) - 4; - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, cmdlen); - pc -= 4; - } -#endif - - CALL_ProgramParameters4dvNV( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - num, - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 12), 0 ) - ) ); -} - -void __glXDispSwap_ProgramParameters4fvNV(GLbyte * pc) -{ - const GLuint num = (GLuint )bswap_CARD32 ( pc + 8 ); - - CALL_ProgramParameters4fvNV( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - num, - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 12), 0 ) - ) ); -} - -void __glXDispSwap_RequestResidentProgramsNV(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - CALL_RequestResidentProgramsNV( GET_DISPATCH(), ( - n, - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) - ) ); -} - -void __glXDispSwap_TrackMatrixNV(GLbyte * pc) -{ - CALL_TrackMatrixNV( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - (GLenum )bswap_ENUM ( pc + 12 ) - ) ); -} - -void __glXDispSwap_VertexAttrib1dvNV(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 12); - pc -= 4; - } -#endif - - CALL_VertexAttrib1dvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 1 ) - ) ); -} - -void __glXDispSwap_VertexAttrib1fvNV(GLbyte * pc) -{ - CALL_VertexAttrib1fvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 1 ) - ) ); -} - -void __glXDispSwap_VertexAttrib1svNV(GLbyte * pc) -{ - CALL_VertexAttrib1svNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 1 ) - ) ); -} - -void __glXDispSwap_VertexAttrib2dvNV(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 20); - pc -= 4; - } -#endif - - CALL_VertexAttrib2dvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 2 ) - ) ); -} - -void __glXDispSwap_VertexAttrib2fvNV(GLbyte * pc) -{ - CALL_VertexAttrib2fvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 2 ) - ) ); -} - -void __glXDispSwap_VertexAttrib2svNV(GLbyte * pc) -{ - CALL_VertexAttrib2svNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 2 ) - ) ); -} - -void __glXDispSwap_VertexAttrib3dvNV(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 28); - pc -= 4; - } -#endif - - CALL_VertexAttrib3dvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 3 ) - ) ); -} - -void __glXDispSwap_VertexAttrib3fvNV(GLbyte * pc) -{ - CALL_VertexAttrib3fvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 3 ) - ) ); -} - -void __glXDispSwap_VertexAttrib3svNV(GLbyte * pc) -{ - CALL_VertexAttrib3svNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 3 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4dvNV(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 36); - pc -= 4; - } -#endif - - CALL_VertexAttrib4dvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4fvNV(GLbyte * pc) -{ - CALL_VertexAttrib4fvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4svNV(GLbyte * pc) -{ - CALL_VertexAttrib4svNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4ubvNV(GLbyte * pc) -{ - CALL_VertexAttrib4ubvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLubyte *)(pc + 4) - ) ); -} - -void __glXDispSwap_VertexAttribs1dvNV(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); - -#ifdef __GLX_ALIGN64 - const GLuint cmdlen = 12 + __GLX_PAD((n * 8)) - 4; - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, cmdlen); - pc -= 4; - } -#endif - - CALL_VertexAttribs1dvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - n, - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 0 ) - ) ); -} - -void __glXDispSwap_VertexAttribs1fvNV(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); - - CALL_VertexAttribs1fvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - n, - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 0 ) - ) ); -} - -void __glXDispSwap_VertexAttribs1svNV(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); - - CALL_VertexAttribs1svNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - n, - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 8), 0 ) - ) ); -} - -void __glXDispSwap_VertexAttribs2dvNV(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); - -#ifdef __GLX_ALIGN64 - const GLuint cmdlen = 12 + __GLX_PAD((n * 16)) - 4; - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, cmdlen); - pc -= 4; - } -#endif - - CALL_VertexAttribs2dvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - n, - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 0 ) - ) ); -} - -void __glXDispSwap_VertexAttribs2fvNV(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); - - CALL_VertexAttribs2fvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - n, - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 0 ) - ) ); -} - -void __glXDispSwap_VertexAttribs2svNV(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); - - CALL_VertexAttribs2svNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - n, - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 8), 0 ) - ) ); -} - -void __glXDispSwap_VertexAttribs3dvNV(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); - -#ifdef __GLX_ALIGN64 - const GLuint cmdlen = 12 + __GLX_PAD((n * 24)) - 4; - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, cmdlen); - pc -= 4; - } -#endif - - CALL_VertexAttribs3dvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - n, - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 0 ) - ) ); -} - -void __glXDispSwap_VertexAttribs3fvNV(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); - - CALL_VertexAttribs3fvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - n, - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 0 ) - ) ); -} - -void __glXDispSwap_VertexAttribs3svNV(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); - - CALL_VertexAttribs3svNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - n, - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 8), 0 ) - ) ); -} - -void __glXDispSwap_VertexAttribs4dvNV(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); - -#ifdef __GLX_ALIGN64 - const GLuint cmdlen = 12 + __GLX_PAD((n * 32)) - 4; - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, cmdlen); - pc -= 4; - } -#endif - - CALL_VertexAttribs4dvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - n, - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 0 ) - ) ); -} - -void __glXDispSwap_VertexAttribs4fvNV(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); - - CALL_VertexAttribs4fvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - n, - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 0 ) - ) ); -} - -void __glXDispSwap_VertexAttribs4svNV(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); - - CALL_VertexAttribs4svNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - n, - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 8), 0 ) - ) ); -} - -void __glXDispSwap_VertexAttribs4ubvNV(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); - - CALL_VertexAttribs4ubvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - n, - (const GLubyte *)(pc + 8) - ) ); -} - -void __glXDispSwap_PointParameteriNV(GLbyte * pc) -{ - CALL_PointParameteriNV( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ) - ) ); -} - -void __glXDispSwap_PointParameterivNV(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); - const GLint * params; - - params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 4), __glPointParameterivNV_size(pname) ); - - CALL_PointParameterivNV( GET_DISPATCH(), ( - pname, - params - ) ); -} - -void __glXDispSwap_ActiveStencilFaceEXT(GLbyte * pc) -{ - CALL_ActiveStencilFaceEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -int __glXDispSwap_GetProgramNamedParameterdvNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 4 ); - - GLdouble params[4]; - CALL_GetProgramNamedParameterdvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - len, - (const GLubyte *)(pc + 8), - params - ) ); - (void) bswap_64_array( (uint64_t *) params, 4 ); - __glXSendReplySwap(cl->client, params, 4, 8, GL_TRUE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetProgramNamedParameterfvNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 4 ); - - GLfloat params[4]; - CALL_GetProgramNamedParameterfvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - len, - (const GLubyte *)(pc + 8), - params - ) ); - (void) bswap_32_array( (uint32_t *) params, 4 ); - __glXSendReplySwap(cl->client, params, 4, 4, GL_TRUE, 0); - error = Success; - } - - return error; -} - -void __glXDispSwap_ProgramNamedParameter4dvNV(GLbyte * pc) -{ - const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 36 ); - -#ifdef __GLX_ALIGN64 - const GLuint cmdlen = 44 + __GLX_PAD(len) - 4; - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, cmdlen); - pc -= 4; - } -#endif - - CALL_ProgramNamedParameter4dvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 32 ), - len, - (const GLubyte *)(pc + 40), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_ProgramNamedParameter4fvNV(GLbyte * pc) -{ - const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 4 ); - - CALL_ProgramNamedParameter4fvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - len, - (const GLubyte *)(pc + 24), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 ) - ) ); -} - -void __glXDispSwap_BlendEquationSeparateEXT(GLbyte * pc) -{ - CALL_BlendEquationSeparateEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ) - ) ); -} - -void __glXDispSwap_BindFramebufferEXT(GLbyte * pc) -{ - CALL_BindFramebufferEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ) - ) ); -} - -void __glXDispSwap_BindRenderbufferEXT(GLbyte * pc) -{ - CALL_BindRenderbufferEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ) - ) ); -} - -int __glXDispSwap_CheckFramebufferStatusEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLenum retval; - retval = CALL_CheckFramebufferStatusEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); - __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDispSwap_DeleteFramebuffersEXT(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - CALL_DeleteFramebuffersEXT( GET_DISPATCH(), ( - n, - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) - ) ); -} - -void __glXDispSwap_DeleteRenderbuffersEXT(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - CALL_DeleteRenderbuffersEXT( GET_DISPATCH(), ( - n, - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) - ) ); -} - -void __glXDispSwap_FramebufferRenderbufferEXT(GLbyte * pc) -{ - CALL_FramebufferRenderbufferEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - (GLuint )bswap_CARD32 ( pc + 12 ) - ) ); -} - -void __glXDispSwap_FramebufferTexture1DEXT(GLbyte * pc) -{ - CALL_FramebufferTexture1DEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - (GLuint )bswap_CARD32 ( pc + 12 ), - (GLint )bswap_CARD32 ( pc + 16 ) - ) ); -} - -void __glXDispSwap_FramebufferTexture2DEXT(GLbyte * pc) -{ - CALL_FramebufferTexture2DEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - (GLuint )bswap_CARD32 ( pc + 12 ), - (GLint )bswap_CARD32 ( pc + 16 ) - ) ); -} - -void __glXDispSwap_FramebufferTexture3DEXT(GLbyte * pc) -{ - CALL_FramebufferTexture3DEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - (GLuint )bswap_CARD32 ( pc + 12 ), - (GLint )bswap_CARD32 ( pc + 16 ), - (GLint )bswap_CARD32 ( pc + 20 ) - ) ); -} - -int __glXDispSwap_GenFramebuffersEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - GLuint answerBuffer[200]; - GLuint * framebuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); - CALL_GenFramebuffersEXT( GET_DISPATCH(), ( - n, - framebuffers - ) ); - (void) bswap_32_array( (uint32_t *) framebuffers, n ); - __glXSendReplySwap(cl->client, framebuffers, n, 4, GL_TRUE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GenRenderbuffersEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - GLuint answerBuffer[200]; - GLuint * renderbuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); - CALL_GenRenderbuffersEXT( GET_DISPATCH(), ( - n, - renderbuffers - ) ); - (void) bswap_32_array( (uint32_t *) renderbuffers, n ); - __glXSendReplySwap(cl->client, renderbuffers, n, 4, GL_TRUE, 0); - error = Success; - } - - return error; -} - -void __glXDispSwap_GenerateMipmapEXT(GLbyte * pc) -{ - CALL_GenerateMipmapEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -int __glXDispSwap_GetFramebufferAttachmentParameterivEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLint params[1]; - CALL_GetFramebufferAttachmentParameterivEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - params - ) ); - (void) bswap_32_array( (uint32_t *) params, 1 ); - __glXSendReplySwap(cl->client, params, 1, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetRenderbufferParameterivEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLint params[1]; - CALL_GetRenderbufferParameterivEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - params - ) ); - (void) bswap_32_array( (uint32_t *) params, 1 ); - __glXSendReplySwap(cl->client, params, 1, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_IsFramebufferEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsFramebufferEXT( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ) - ) ); - __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -int __glXDispSwap_IsRenderbufferEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsRenderbufferEXT( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ) - ) ); - __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDispSwap_RenderbufferStorageEXT(GLbyte * pc) -{ - CALL_RenderbufferStorageEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLsizei )bswap_CARD32 ( pc + 8 ), - (GLsizei )bswap_CARD32 ( pc + 12 ) - ) ); -} - diff --git a/GL/glx/indirect_reqsize.c b/GL/glx/indirect_reqsize.c deleted file mode 100644 index 954eecd97..000000000 --- a/GL/glx/indirect_reqsize.c +++ /dev/null @@ -1,832 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ - -/* - * (C) Copyright IBM Corporation 2005 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * IBM, - * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - - -#include <GL/gl.h> -#include "glxserver.h" -#include "glxbyteorder.h" -#include "indirect_size.h" -#include "indirect_reqsize.h" - -#define __GLX_PAD(x) (((x) + 3) & ~3) - -#if defined(__CYGWIN__) || defined(__MINGW32__) -# undef HAVE_ALIAS -#endif -#ifdef HAVE_ALIAS -# define ALIAS2(from,to) \ - GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \ - __attribute__ ((alias( # to ))); -# define ALIAS(from,to) ALIAS2( from, __glX ## to ## ReqSize ) -#else -# define ALIAS(from,to) \ - GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \ - { return __glX ## to ## ReqSize( pc, swap ); } -#endif - - -int -__glXCallListsReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei n = *(GLsizei *) (pc + 0); - GLenum type = *(GLenum *) (pc + 4); - GLsizei compsize; - - if (swap) { - n = bswap_32(n); - type = bswap_32(type); - } - - compsize = __glCallLists_size(type); - return __GLX_PAD((compsize * n)); -} - -int -__glXBitmapReqSize(const GLbyte *pc, Bool swap) -{ - GLint row_length = *(GLint *) (pc + 4); - GLint image_height = 0; - GLint skip_images = 0; - GLint skip_rows = *(GLint *) (pc + 8); - GLint alignment = *(GLint *) (pc + 16); - GLsizei width = *(GLsizei *) (pc + 20); - GLsizei height = *(GLsizei *) (pc + 24); - - if (swap) { - row_length = bswap_32(row_length); - skip_rows = bswap_32(skip_rows); - alignment = bswap_32(alignment); - width = bswap_32(width); - height = bswap_32(height); - } - - return __glXImageSize(GL_COLOR_INDEX, GL_BITMAP, 0, width, height, 1, - image_height, row_length, skip_images, - skip_rows, alignment); -} - -int -__glXFogfvReqSize(const GLbyte *pc, Bool swap) -{ - GLenum pname = *(GLenum *) (pc + 0); - GLsizei compsize; - - if (swap) { - pname = bswap_32(pname); - } - - compsize = __glFogfv_size(pname); - return __GLX_PAD((compsize * 4)); -} - -int -__glXLightfvReqSize(const GLbyte *pc, Bool swap) -{ - GLenum pname = *(GLenum *) (pc + 4); - GLsizei compsize; - - if (swap) { - pname = bswap_32(pname); - } - - compsize = __glLightfv_size(pname); - return __GLX_PAD((compsize * 4)); -} - -int -__glXLightModelfvReqSize(const GLbyte *pc, Bool swap) -{ - GLenum pname = *(GLenum *) (pc + 0); - GLsizei compsize; - - if (swap) { - pname = bswap_32(pname); - } - - compsize = __glLightModelfv_size(pname); - return __GLX_PAD((compsize * 4)); -} - -int -__glXMaterialfvReqSize(const GLbyte *pc, Bool swap) -{ - GLenum pname = *(GLenum *) (pc + 4); - GLsizei compsize; - - if (swap) { - pname = bswap_32(pname); - } - - compsize = __glMaterialfv_size(pname); - return __GLX_PAD((compsize * 4)); -} - -int -__glXPolygonStippleReqSize(const GLbyte *pc, Bool swap) -{ - GLint row_length = *(GLint *) (pc + 4); - GLint image_height = 0; - GLint skip_images = 0; - GLint skip_rows = *(GLint *) (pc + 8); - GLint alignment = *(GLint *) (pc + 16); - - if (swap) { - row_length = bswap_32(row_length); - skip_rows = bswap_32(skip_rows); - alignment = bswap_32(alignment); - } - - return __glXImageSize(GL_COLOR_INDEX, GL_BITMAP, 0, 32, 32, 1, - image_height, row_length, skip_images, - skip_rows, alignment); -} - -int -__glXTexParameterfvReqSize(const GLbyte *pc, Bool swap) -{ - GLenum pname = *(GLenum *) (pc + 4); - GLsizei compsize; - - if (swap) { - pname = bswap_32(pname); - } - - compsize = __glTexParameterfv_size(pname); - return __GLX_PAD((compsize * 4)); -} - -int -__glXTexImage1DReqSize(const GLbyte *pc, Bool swap) -{ - GLint row_length = *(GLint *) (pc + 4); - GLint image_height = 0; - GLint skip_images = 0; - GLint skip_rows = *(GLint *) (pc + 8); - GLint alignment = *(GLint *) (pc + 16); - GLenum target = *(GLenum *) (pc + 20); - GLsizei width = *(GLsizei *) (pc + 32); - GLenum format = *(GLenum *) (pc + 44); - GLenum type = *(GLenum *) (pc + 48); - - if (swap) { - row_length = bswap_32(row_length); - skip_rows = bswap_32(skip_rows); - alignment = bswap_32(alignment); - target = bswap_32(target); - width = bswap_32(width); - format = bswap_32(format); - type = bswap_32(type); - } - - return __glXImageSize(format, type, target, width, 1, 1, - image_height, row_length, skip_images, - skip_rows, alignment); -} - -int -__glXTexImage2DReqSize(const GLbyte *pc, Bool swap) -{ - GLint row_length = *(GLint *) (pc + 4); - GLint image_height = 0; - GLint skip_images = 0; - GLint skip_rows = *(GLint *) (pc + 8); - GLint alignment = *(GLint *) (pc + 16); - GLenum target = *(GLenum *) (pc + 20); - GLsizei width = *(GLsizei *) (pc + 32); - GLsizei height = *(GLsizei *) (pc + 36); - GLenum format = *(GLenum *) (pc + 44); - GLenum type = *(GLenum *) (pc + 48); - - if (swap) { - row_length = bswap_32(row_length); - skip_rows = bswap_32(skip_rows); - alignment = bswap_32(alignment); - target = bswap_32(target); - width = bswap_32(width); - height = bswap_32(height); - format = bswap_32(format); - type = bswap_32(type); - } - - return __glXImageSize(format, type, target, width, height, 1, - image_height, row_length, skip_images, - skip_rows, alignment); -} - -int -__glXTexEnvfvReqSize(const GLbyte *pc, Bool swap) -{ - GLenum pname = *(GLenum *) (pc + 4); - GLsizei compsize; - - if (swap) { - pname = bswap_32(pname); - } - - compsize = __glTexEnvfv_size(pname); - return __GLX_PAD((compsize * 4)); -} - -int -__glXTexGendvReqSize(const GLbyte *pc, Bool swap) -{ - GLenum pname = *(GLenum *) (pc + 4); - GLsizei compsize; - - if (swap) { - pname = bswap_32(pname); - } - - compsize = __glTexGendv_size(pname); - return __GLX_PAD((compsize * 8)); -} - -int -__glXTexGenfvReqSize(const GLbyte *pc, Bool swap) -{ - GLenum pname = *(GLenum *) (pc + 4); - GLsizei compsize; - - if (swap) { - pname = bswap_32(pname); - } - - compsize = __glTexGenfv_size(pname); - return __GLX_PAD((compsize * 4)); -} - -int -__glXPixelMapfvReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei mapsize = *(GLsizei *) (pc + 4); - - if (swap) { - mapsize = bswap_32(mapsize); - } - - return __GLX_PAD((mapsize * 4)); -} - -int -__glXPixelMapusvReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei mapsize = *(GLsizei *) (pc + 4); - - if (swap) { - mapsize = bswap_32(mapsize); - } - - return __GLX_PAD((mapsize * 2)); -} - -int -__glXDrawPixelsReqSize(const GLbyte *pc, Bool swap) -{ - GLint row_length = *(GLint *) (pc + 4); - GLint image_height = 0; - GLint skip_images = 0; - GLint skip_rows = *(GLint *) (pc + 8); - GLint alignment = *(GLint *) (pc + 16); - GLsizei width = *(GLsizei *) (pc + 20); - GLsizei height = *(GLsizei *) (pc + 24); - GLenum format = *(GLenum *) (pc + 28); - GLenum type = *(GLenum *) (pc + 32); - - if (swap) { - row_length = bswap_32(row_length); - skip_rows = bswap_32(skip_rows); - alignment = bswap_32(alignment); - width = bswap_32(width); - height = bswap_32(height); - format = bswap_32(format); - type = bswap_32(type); - } - - return __glXImageSize(format, type, 0, width, height, 1, - image_height, row_length, skip_images, - skip_rows, alignment); -} - -int -__glXPrioritizeTexturesReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei n = *(GLsizei *) (pc + 0); - - if (swap) { - n = bswap_32(n); - } - - return __GLX_PAD((n * 4) + (n * 4)); -} - -int -__glXTexSubImage1DReqSize(const GLbyte *pc, Bool swap) -{ - GLint row_length = *(GLint *) (pc + 4); - GLint image_height = 0; - GLint skip_images = 0; - GLint skip_rows = *(GLint *) (pc + 8); - GLint alignment = *(GLint *) (pc + 16); - GLenum target = *(GLenum *) (pc + 20); - GLsizei width = *(GLsizei *) (pc + 36); - GLenum format = *(GLenum *) (pc + 44); - GLenum type = *(GLenum *) (pc + 48); - - if (swap) { - row_length = bswap_32(row_length); - skip_rows = bswap_32(skip_rows); - alignment = bswap_32(alignment); - target = bswap_32(target); - width = bswap_32(width); - format = bswap_32(format); - type = bswap_32(type); - } - - return __glXImageSize(format, type, target, width, 1, 1, - image_height, row_length, skip_images, - skip_rows, alignment); -} - -int -__glXTexSubImage2DReqSize(const GLbyte *pc, Bool swap) -{ - GLint row_length = *(GLint *) (pc + 4); - GLint image_height = 0; - GLint skip_images = 0; - GLint skip_rows = *(GLint *) (pc + 8); - GLint alignment = *(GLint *) (pc + 16); - GLenum target = *(GLenum *) (pc + 20); - GLsizei width = *(GLsizei *) (pc + 36); - GLsizei height = *(GLsizei *) (pc + 40); - GLenum format = *(GLenum *) (pc + 44); - GLenum type = *(GLenum *) (pc + 48); - - if (swap) { - row_length = bswap_32(row_length); - skip_rows = bswap_32(skip_rows); - alignment = bswap_32(alignment); - target = bswap_32(target); - width = bswap_32(width); - height = bswap_32(height); - format = bswap_32(format); - type = bswap_32(type); - } - - return __glXImageSize(format, type, target, width, height, 1, - image_height, row_length, skip_images, - skip_rows, alignment); -} - -int -__glXColorTableReqSize(const GLbyte *pc, Bool swap) -{ - GLint row_length = *(GLint *) (pc + 4); - GLint image_height = 0; - GLint skip_images = 0; - GLint skip_rows = *(GLint *) (pc + 8); - GLint alignment = *(GLint *) (pc + 16); - GLenum target = *(GLenum *) (pc + 20); - GLsizei width = *(GLsizei *) (pc + 28); - GLenum format = *(GLenum *) (pc + 32); - GLenum type = *(GLenum *) (pc + 36); - - if (swap) { - row_length = bswap_32(row_length); - skip_rows = bswap_32(skip_rows); - alignment = bswap_32(alignment); - target = bswap_32(target); - width = bswap_32(width); - format = bswap_32(format); - type = bswap_32(type); - } - - return __glXImageSize(format, type, target, width, 1, 1, - image_height, row_length, skip_images, - skip_rows, alignment); -} - -int -__glXColorTableParameterfvReqSize(const GLbyte *pc, Bool swap) -{ - GLenum pname = *(GLenum *) (pc + 4); - GLsizei compsize; - - if (swap) { - pname = bswap_32(pname); - } - - compsize = __glColorTableParameterfv_size(pname); - return __GLX_PAD((compsize * 4)); -} - -int -__glXColorSubTableReqSize(const GLbyte *pc, Bool swap) -{ - GLint row_length = *(GLint *) (pc + 4); - GLint image_height = 0; - GLint skip_images = 0; - GLint skip_rows = *(GLint *) (pc + 8); - GLint alignment = *(GLint *) (pc + 16); - GLenum target = *(GLenum *) (pc + 20); - GLsizei count = *(GLsizei *) (pc + 28); - GLenum format = *(GLenum *) (pc + 32); - GLenum type = *(GLenum *) (pc + 36); - - if (swap) { - row_length = bswap_32(row_length); - skip_rows = bswap_32(skip_rows); - alignment = bswap_32(alignment); - target = bswap_32(target); - count = bswap_32(count); - format = bswap_32(format); - type = bswap_32(type); - } - - return __glXImageSize(format, type, target, count, 1, 1, - image_height, row_length, skip_images, - skip_rows, alignment); -} - -int -__glXConvolutionFilter1DReqSize(const GLbyte *pc, Bool swap) -{ - GLint row_length = *(GLint *) (pc + 4); - GLint image_height = 0; - GLint skip_images = 0; - GLint skip_rows = *(GLint *) (pc + 8); - GLint alignment = *(GLint *) (pc + 16); - GLenum target = *(GLenum *) (pc + 20); - GLsizei width = *(GLsizei *) (pc + 28); - GLenum format = *(GLenum *) (pc + 36); - GLenum type = *(GLenum *) (pc + 40); - - if (swap) { - row_length = bswap_32(row_length); - skip_rows = bswap_32(skip_rows); - alignment = bswap_32(alignment); - target = bswap_32(target); - width = bswap_32(width); - format = bswap_32(format); - type = bswap_32(type); - } - - return __glXImageSize(format, type, target, width, 1, 1, - image_height, row_length, skip_images, - skip_rows, alignment); -} - -int -__glXConvolutionFilter2DReqSize(const GLbyte *pc, Bool swap) -{ - GLint row_length = *(GLint *) (pc + 4); - GLint image_height = 0; - GLint skip_images = 0; - GLint skip_rows = *(GLint *) (pc + 8); - GLint alignment = *(GLint *) (pc + 16); - GLenum target = *(GLenum *) (pc + 20); - GLsizei width = *(GLsizei *) (pc + 28); - GLsizei height = *(GLsizei *) (pc + 32); - GLenum format = *(GLenum *) (pc + 36); - GLenum type = *(GLenum *) (pc + 40); - - if (swap) { - row_length = bswap_32(row_length); - skip_rows = bswap_32(skip_rows); - alignment = bswap_32(alignment); - target = bswap_32(target); - width = bswap_32(width); - height = bswap_32(height); - format = bswap_32(format); - type = bswap_32(type); - } - - return __glXImageSize(format, type, target, width, height, 1, - image_height, row_length, skip_images, - skip_rows, alignment); -} - -int -__glXConvolutionParameterfvReqSize(const GLbyte *pc, Bool swap) -{ - GLenum pname = *(GLenum *) (pc + 4); - GLsizei compsize; - - if (swap) { - pname = bswap_32(pname); - } - - compsize = __glConvolutionParameterfv_size(pname); - return __GLX_PAD((compsize * 4)); -} - -int -__glXTexImage3DReqSize(const GLbyte *pc, Bool swap) -{ - GLint row_length = *(GLint *) (pc + 4); - GLint image_height = *(GLint *) (pc + 8); - GLint skip_rows = *(GLint *) (pc + 16); - GLint skip_images = *(GLint *) (pc + 20); - GLint alignment = *(GLint *) (pc + 32); - GLenum target = *(GLenum *) (pc + 36); - GLsizei width = *(GLsizei *) (pc + 48); - GLsizei height = *(GLsizei *) (pc + 52); - GLsizei depth = *(GLsizei *) (pc + 56); - GLenum format = *(GLenum *) (pc + 68); - GLenum type = *(GLenum *) (pc + 72); - - if (swap) { - row_length = bswap_32(row_length); - image_height = bswap_32(image_height); - skip_rows = bswap_32(skip_rows); - skip_images = bswap_32(skip_images); - alignment = bswap_32(alignment); - target = bswap_32(target); - width = bswap_32(width); - height = bswap_32(height); - depth = bswap_32(depth); - format = bswap_32(format); - type = bswap_32(type); - } - - return __glXImageSize(format, type, target, width, height, depth, - image_height, row_length, skip_images, - skip_rows, alignment); -} - -int -__glXTexSubImage3DReqSize(const GLbyte *pc, Bool swap) -{ - GLint row_length = *(GLint *) (pc + 4); - GLint image_height = *(GLint *) (pc + 8); - GLint skip_rows = *(GLint *) (pc + 16); - GLint skip_images = *(GLint *) (pc + 20); - GLint alignment = *(GLint *) (pc + 32); - GLenum target = *(GLenum *) (pc + 36); - GLsizei width = *(GLsizei *) (pc + 60); - GLsizei height = *(GLsizei *) (pc + 64); - GLsizei depth = *(GLsizei *) (pc + 68); - GLenum format = *(GLenum *) (pc + 76); - GLenum type = *(GLenum *) (pc + 80); - - if (swap) { - row_length = bswap_32(row_length); - image_height = bswap_32(image_height); - skip_rows = bswap_32(skip_rows); - skip_images = bswap_32(skip_images); - alignment = bswap_32(alignment); - target = bswap_32(target); - width = bswap_32(width); - height = bswap_32(height); - depth = bswap_32(depth); - format = bswap_32(format); - type = bswap_32(type); - } - - return __glXImageSize(format, type, target, width, height, depth, - image_height, row_length, skip_images, - skip_rows, alignment); -} - -int -__glXCompressedTexImage1DARBReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei imageSize = *(GLsizei *) (pc + 20); - - if (swap) { - imageSize = bswap_32(imageSize); - } - - return __GLX_PAD(imageSize); -} - -int -__glXCompressedTexImage2DARBReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei imageSize = *(GLsizei *) (pc + 24); - - if (swap) { - imageSize = bswap_32(imageSize); - } - - return __GLX_PAD(imageSize); -} - -int -__glXCompressedTexImage3DARBReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei imageSize = *(GLsizei *) (pc + 28); - - if (swap) { - imageSize = bswap_32(imageSize); - } - - return __GLX_PAD(imageSize); -} - -int -__glXCompressedTexSubImage3DARBReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei imageSize = *(GLsizei *) (pc + 36); - - if (swap) { - imageSize = bswap_32(imageSize); - } - - return __GLX_PAD(imageSize); -} - -int -__glXProgramStringARBReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei len = *(GLsizei *) (pc + 8); - - if (swap) { - len = bswap_32(len); - } - - return __GLX_PAD(len); -} - -int -__glXDrawBuffersARBReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei n = *(GLsizei *) (pc + 0); - - if (swap) { - n = bswap_32(n); - } - - return __GLX_PAD((n * 4)); -} - -int -__glXPointParameterfvEXTReqSize(const GLbyte *pc, Bool swap) -{ - GLenum pname = *(GLenum *) (pc + 0); - GLsizei compsize; - - if (swap) { - pname = bswap_32(pname); - } - - compsize = __glPointParameterfvEXT_size(pname); - return __GLX_PAD((compsize * 4)); -} - -int -__glXProgramParameters4dvNVReqSize(const GLbyte *pc, Bool swap) -{ - GLuint num = *(GLuint *) (pc + 8); - - if (swap) { - num = bswap_32(num); - } - - return __GLX_PAD((num * 32)); -} - -int -__glXProgramParameters4fvNVReqSize(const GLbyte *pc, Bool swap) -{ - GLuint num = *(GLuint *) (pc + 8); - - if (swap) { - num = bswap_32(num); - } - - return __GLX_PAD((num * 16)); -} - -int -__glXVertexAttribs1dvNVReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei n = *(GLsizei *) (pc + 4); - - if (swap) { - n = bswap_32(n); - } - - return __GLX_PAD((n * 8)); -} - -int -__glXVertexAttribs2dvNVReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei n = *(GLsizei *) (pc + 4); - - if (swap) { - n = bswap_32(n); - } - - return __GLX_PAD((n * 16)); -} - -int -__glXVertexAttribs3dvNVReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei n = *(GLsizei *) (pc + 4); - - if (swap) { - n = bswap_32(n); - } - - return __GLX_PAD((n * 24)); -} - -int -__glXVertexAttribs3fvNVReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei n = *(GLsizei *) (pc + 4); - - if (swap) { - n = bswap_32(n); - } - - return __GLX_PAD((n * 12)); -} - -int -__glXVertexAttribs3svNVReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei n = *(GLsizei *) (pc + 4); - - if (swap) { - n = bswap_32(n); - } - - return __GLX_PAD((n * 6)); -} - -int -__glXVertexAttribs4dvNVReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei n = *(GLsizei *) (pc + 4); - - if (swap) { - n = bswap_32(n); - } - - return __GLX_PAD((n * 32)); -} - -int -__glXProgramNamedParameter4fvNVReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei len = *(GLsizei *) (pc + 4); - - if (swap) { - len = bswap_32(len); - } - - return __GLX_PAD(len); -} - -ALIAS(Fogiv, Fogfv) - ALIAS(Lightiv, Lightfv) - ALIAS(LightModeliv, LightModelfv) - ALIAS(Materialiv, Materialfv) - ALIAS(TexParameteriv, TexParameterfv) - ALIAS(TexEnviv, TexEnvfv) - ALIAS(TexGeniv, TexGenfv) - ALIAS(PixelMapuiv, PixelMapfv) - ALIAS(ColorTableParameteriv, ColorTableParameterfv) - ALIAS(ConvolutionParameteriv, ConvolutionParameterfv) - ALIAS(CompressedTexSubImage1DARB, CompressedTexImage1DARB) - ALIAS(CompressedTexSubImage2DARB, CompressedTexImage3DARB) - ALIAS(LoadProgramNV, ProgramStringARB) - ALIAS(RequestResidentProgramsNV, DrawBuffersARB) - ALIAS(VertexAttribs1fvNV, PixelMapfv) - ALIAS(VertexAttribs1svNV, PixelMapusv) - ALIAS(VertexAttribs2fvNV, VertexAttribs1dvNV) - ALIAS(VertexAttribs2svNV, PixelMapfv) - ALIAS(VertexAttribs4fvNV, VertexAttribs2dvNV) - ALIAS(VertexAttribs4svNV, VertexAttribs1dvNV) - ALIAS(VertexAttribs4ubvNV, PixelMapfv) - ALIAS(PointParameterivNV, PointParameterfvEXT) - ALIAS(ProgramNamedParameter4dvNV, CompressedTexSubImage3DARB) - ALIAS(DeleteFramebuffersEXT, DrawBuffersARB) - ALIAS(DeleteRenderbuffersEXT, DrawBuffersARB) diff --git a/GL/glx/indirect_reqsize.h b/GL/glx/indirect_reqsize.h deleted file mode 100644 index 26211ee5c..000000000 --- a/GL/glx/indirect_reqsize.h +++ /dev/null @@ -1,121 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ - -/* - * (C) Copyright IBM Corporation 2005 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * IBM, - * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#if !defined( _INDIRECT_REQSIZE_H_ ) -# define _INDIRECT_REQSIZE_H_ - -# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) -# define HIDDEN __attribute__((visibility("hidden"))) -# else -# define HIDDEN -# endif - -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define PURE __attribute__((pure)) -# else -# define PURE -# endif - -extern PURE HIDDEN int __glXCallListsReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXBitmapReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXFogfvReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXFogivReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXLightfvReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXLightivReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXLightModelfvReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXLightModelivReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXMaterialfvReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXMaterialivReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXPolygonStippleReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXTexParameterfvReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXTexParameterivReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXTexImage1DReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXTexImage2DReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXTexEnvfvReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXTexEnvivReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXTexGendvReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXTexGenfvReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXTexGenivReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXMap1dReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXMap1fReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXMap2dReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXMap2fReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXPixelMapfvReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXPixelMapuivReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXPixelMapusvReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXDrawPixelsReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXDrawArraysReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXPrioritizeTexturesReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXTexSubImage1DReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXTexSubImage2DReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXColorTableReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXColorTableParameterfvReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXColorTableParameterivReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXColorSubTableReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXConvolutionFilter1DReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXConvolutionFilter2DReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXConvolutionParameterfvReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXConvolutionParameterivReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXSeparableFilter2DReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXTexImage3DReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXTexSubImage3DReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXCompressedTexImage1DARBReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXCompressedTexImage2DARBReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXCompressedTexImage3DARBReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXCompressedTexSubImage1DARBReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXCompressedTexSubImage2DARBReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXCompressedTexSubImage3DARBReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXProgramStringARBReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXDrawBuffersARBReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXPointParameterfvEXTReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXLoadProgramNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXProgramParameters4dvNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXProgramParameters4fvNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXRequestResidentProgramsNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXVertexAttribs1dvNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXVertexAttribs1fvNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXVertexAttribs1svNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXVertexAttribs2dvNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXVertexAttribs2fvNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXVertexAttribs2svNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXVertexAttribs3dvNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXVertexAttribs3fvNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXVertexAttribs3svNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXVertexAttribs4dvNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXVertexAttribs4fvNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXVertexAttribs4svNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXVertexAttribs4ubvNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXPointParameterivNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXProgramNamedParameter4dvNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXProgramNamedParameter4fvNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXDeleteFramebuffersEXTReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXDeleteRenderbuffersEXTReqSize(const GLbyte *pc, Bool swap); - -# undef HIDDEN -# undef PURE - -#endif /* !defined( _INDIRECT_REQSIZE_H_ ) */ diff --git a/GL/glx/indirect_size_get.c b/GL/glx/indirect_size_get.c deleted file mode 100644 index e7eaf97cb..000000000 --- a/GL/glx/indirect_size_get.c +++ /dev/null @@ -1,1206 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ - -/* - * (C) Copyright IBM Corporation 2004 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * IBM, - * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - - -#include <GL/gl.h> -#include "indirect_size_get.h" -#include "glxserver.h" -#include "indirect_util.h" -#include "indirect_size.h" - -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define PURE __attribute__((pure)) -# else -# define PURE -# endif - -# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) -# define FASTCALL __attribute__((fastcall)) -# else -# define FASTCALL -# endif - -# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) -# define INTERNAL __attribute__((visibility("internal"))) -# else -# define INTERNAL -# endif - - -#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__) -# undef HAVE_ALIAS -#endif -#ifdef HAVE_ALIAS -# define ALIAS2(from,to) \ - INTERNAL PURE FASTCALL GLint __gl ## from ## _size( GLenum e ) \ - __attribute__ ((alias( # to ))); -# define ALIAS(from,to) ALIAS2( from, __gl ## to ## _size ) -#else -# define ALIAS(from,to) \ - INTERNAL PURE FASTCALL GLint __gl ## from ## _size( GLenum e ) \ - { return __gl ## to ## _size( e ); } -#endif - - -INTERNAL PURE FASTCALL GLint -__glCallLists_size(GLenum e) -{ - switch (e) { - case GL_BYTE: - case GL_UNSIGNED_BYTE: - return 1; - case GL_SHORT: - case GL_UNSIGNED_SHORT: - case GL_2_BYTES: - return 2; - case GL_3_BYTES: - return 3; - case GL_INT: - case GL_UNSIGNED_INT: - case GL_FLOAT: - case GL_4_BYTES: - return 4; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glFogfv_size(GLenum e) -{ - switch (e) { - case GL_FOG_INDEX: - case GL_FOG_DENSITY: - case GL_FOG_START: - case GL_FOG_END: - case GL_FOG_MODE: - case GL_FOG_OFFSET_VALUE_SGIX: - case GL_FOG_DISTANCE_MODE_NV: - return 1; - case GL_FOG_COLOR: - return 4; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glLightfv_size(GLenum e) -{ - switch (e) { - case GL_SPOT_EXPONENT: - case GL_SPOT_CUTOFF: - case GL_CONSTANT_ATTENUATION: - case GL_LINEAR_ATTENUATION: - case GL_QUADRATIC_ATTENUATION: - return 1; - case GL_SPOT_DIRECTION: - return 3; - case GL_AMBIENT: - case GL_DIFFUSE: - case GL_SPECULAR: - case GL_POSITION: - return 4; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glLightModelfv_size(GLenum e) -{ - switch (e) { - case GL_LIGHT_MODEL_LOCAL_VIEWER: - case GL_LIGHT_MODEL_TWO_SIDE: - case GL_LIGHT_MODEL_COLOR_CONTROL: -/* case GL_LIGHT_MODEL_COLOR_CONTROL_EXT:*/ - return 1; - case GL_LIGHT_MODEL_AMBIENT: - return 4; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glMaterialfv_size(GLenum e) -{ - switch (e) { - case GL_SHININESS: - return 1; - case GL_COLOR_INDEXES: - return 3; - case GL_AMBIENT: - case GL_DIFFUSE: - case GL_SPECULAR: - case GL_EMISSION: - case GL_AMBIENT_AND_DIFFUSE: - return 4; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glTexParameterfv_size(GLenum e) -{ - switch (e) { - case GL_TEXTURE_MAG_FILTER: - case GL_TEXTURE_MIN_FILTER: - case GL_TEXTURE_WRAP_S: - case GL_TEXTURE_WRAP_T: - case GL_TEXTURE_PRIORITY: - case GL_TEXTURE_WRAP_R: - case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB: -/* case GL_SHADOW_AMBIENT_SGIX:*/ - case GL_TEXTURE_MIN_LOD: - case GL_TEXTURE_MAX_LOD: - case GL_TEXTURE_BASE_LEVEL: - case GL_TEXTURE_MAX_LEVEL: - case GL_TEXTURE_CLIPMAP_FRAME_SGIX: - case GL_TEXTURE_LOD_BIAS_S_SGIX: - case GL_TEXTURE_LOD_BIAS_T_SGIX: - case GL_TEXTURE_LOD_BIAS_R_SGIX: - case GL_GENERATE_MIPMAP: -/* case GL_GENERATE_MIPMAP_SGIS:*/ - case GL_TEXTURE_COMPARE_SGIX: - case GL_TEXTURE_COMPARE_OPERATOR_SGIX: - case GL_TEXTURE_MAX_CLAMP_S_SGIX: - case GL_TEXTURE_MAX_CLAMP_T_SGIX: - case GL_TEXTURE_MAX_CLAMP_R_SGIX: - case GL_TEXTURE_MAX_ANISOTROPY_EXT: - case GL_TEXTURE_LOD_BIAS: -/* case GL_TEXTURE_LOD_BIAS_EXT:*/ - case GL_DEPTH_TEXTURE_MODE: -/* case GL_DEPTH_TEXTURE_MODE_ARB:*/ - case GL_TEXTURE_COMPARE_MODE: -/* case GL_TEXTURE_COMPARE_MODE_ARB:*/ - case GL_TEXTURE_COMPARE_FUNC: -/* case GL_TEXTURE_COMPARE_FUNC_ARB:*/ - case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV: - return 1; - case GL_TEXTURE_CLIPMAP_CENTER_SGIX: - case GL_TEXTURE_CLIPMAP_OFFSET_SGIX: - return 2; - case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX: - return 3; - case GL_TEXTURE_BORDER_COLOR: - case GL_POST_TEXTURE_FILTER_BIAS_SGIX: - case GL_POST_TEXTURE_FILTER_SCALE_SGIX: - return 4; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glTexEnvfv_size(GLenum e) -{ - switch (e) { - case GL_ALPHA_SCALE: - case GL_TEXTURE_ENV_MODE: - case GL_TEXTURE_LOD_BIAS: - case GL_COMBINE_RGB: - case GL_COMBINE_ALPHA: - case GL_RGB_SCALE: - case GL_SOURCE0_RGB: - case GL_SOURCE1_RGB: - case GL_SOURCE2_RGB: - case GL_SOURCE3_RGB_NV: - case GL_SOURCE0_ALPHA: - case GL_SOURCE1_ALPHA: - case GL_SOURCE2_ALPHA: - case GL_SOURCE3_ALPHA_NV: - case GL_OPERAND0_RGB: - case GL_OPERAND1_RGB: - case GL_OPERAND2_RGB: - case GL_OPERAND3_RGB_NV: - case GL_OPERAND0_ALPHA: - case GL_OPERAND1_ALPHA: - case GL_OPERAND2_ALPHA: - case GL_OPERAND3_ALPHA_NV: - case GL_COORD_REPLACE_ARB: -/* case GL_COORD_REPLACE_NV:*/ - return 1; - case GL_TEXTURE_ENV_COLOR: - return 4; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glTexGendv_size(GLenum e) -{ - switch (e) { - case GL_TEXTURE_GEN_MODE: - return 1; - case GL_OBJECT_PLANE: - case GL_EYE_PLANE: - return 4; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glMap1d_size(GLenum e) -{ - switch (e) { - case GL_MAP1_INDEX: - case GL_MAP1_TEXTURE_COORD_1: - return 1; - case GL_MAP1_TEXTURE_COORD_2: - return 2; - case GL_MAP1_NORMAL: - case GL_MAP1_TEXTURE_COORD_3: - case GL_MAP1_VERTEX_3: - return 3; - case GL_MAP1_COLOR_4: - case GL_MAP1_TEXTURE_COORD_4: - case GL_MAP1_VERTEX_4: - return 4; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glMap2d_size(GLenum e) -{ - switch (e) { - case GL_MAP2_INDEX: - case GL_MAP2_TEXTURE_COORD_1: - return 1; - case GL_MAP2_TEXTURE_COORD_2: - return 2; - case GL_MAP2_NORMAL: - case GL_MAP2_TEXTURE_COORD_3: - case GL_MAP2_VERTEX_3: - return 3; - case GL_MAP2_COLOR_4: - case GL_MAP2_TEXTURE_COORD_4: - case GL_MAP2_VERTEX_4: - return 4; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glGetBooleanv_size(GLenum e) -{ - switch (e) { - case GL_CURRENT_INDEX: - case GL_CURRENT_RASTER_INDEX: - case GL_CURRENT_RASTER_POSITION_VALID: - case GL_CURRENT_RASTER_DISTANCE: - case GL_POINT_SMOOTH: - case GL_POINT_SIZE: - case GL_SMOOTH_POINT_SIZE_GRANULARITY: - case GL_LINE_SMOOTH: - case GL_LINE_WIDTH: - case GL_LINE_WIDTH_GRANULARITY: - case GL_LINE_STIPPLE: - case GL_LINE_STIPPLE_PATTERN: - case GL_LINE_STIPPLE_REPEAT: - case GL_LIST_MODE: - case GL_MAX_LIST_NESTING: - case GL_LIST_BASE: - case GL_LIST_INDEX: - case GL_POLYGON_SMOOTH: - case GL_POLYGON_STIPPLE: - case GL_EDGE_FLAG: - case GL_CULL_FACE: - case GL_CULL_FACE_MODE: - case GL_FRONT_FACE: - case GL_LIGHTING: - case GL_LIGHT_MODEL_LOCAL_VIEWER: - case GL_LIGHT_MODEL_TWO_SIDE: - case GL_SHADE_MODEL: - case GL_COLOR_MATERIAL_FACE: - case GL_COLOR_MATERIAL_PARAMETER: - case GL_COLOR_MATERIAL: - case GL_FOG: - case GL_FOG_INDEX: - case GL_FOG_DENSITY: - case GL_FOG_START: - case GL_FOG_END: - case GL_FOG_MODE: - case GL_DEPTH_TEST: - case GL_DEPTH_WRITEMASK: - case GL_DEPTH_CLEAR_VALUE: - case GL_DEPTH_FUNC: - case GL_STENCIL_TEST: - case GL_STENCIL_CLEAR_VALUE: - case GL_STENCIL_FUNC: - case GL_STENCIL_VALUE_MASK: - case GL_STENCIL_FAIL: - case GL_STENCIL_PASS_DEPTH_FAIL: - case GL_STENCIL_PASS_DEPTH_PASS: - case GL_STENCIL_REF: - case GL_STENCIL_WRITEMASK: - case GL_MATRIX_MODE: - case GL_NORMALIZE: - case GL_MODELVIEW_STACK_DEPTH: - case GL_PROJECTION_STACK_DEPTH: - case GL_TEXTURE_STACK_DEPTH: - case GL_ATTRIB_STACK_DEPTH: - case GL_CLIENT_ATTRIB_STACK_DEPTH: - case GL_ALPHA_TEST: - case GL_ALPHA_TEST_FUNC: - case GL_ALPHA_TEST_REF: - case GL_DITHER: - case GL_BLEND_DST: - case GL_BLEND_SRC: - case GL_BLEND: - case GL_LOGIC_OP_MODE: - case GL_LOGIC_OP: - case GL_AUX_BUFFERS: - case GL_DRAW_BUFFER: - case GL_READ_BUFFER: - case GL_SCISSOR_TEST: - case GL_INDEX_CLEAR_VALUE: - case GL_INDEX_WRITEMASK: - case GL_INDEX_MODE: - case GL_RGBA_MODE: - case GL_DOUBLEBUFFER: - case GL_STEREO: - case GL_RENDER_MODE: - case GL_PERSPECTIVE_CORRECTION_HINT: - case GL_POINT_SMOOTH_HINT: - case GL_LINE_SMOOTH_HINT: - case GL_POLYGON_SMOOTH_HINT: - case GL_FOG_HINT: - case GL_TEXTURE_GEN_S: - case GL_TEXTURE_GEN_T: - case GL_TEXTURE_GEN_R: - case GL_TEXTURE_GEN_Q: - case GL_PIXEL_MAP_I_TO_I: - case GL_PIXEL_MAP_I_TO_I_SIZE: - case GL_PIXEL_MAP_S_TO_S_SIZE: - case GL_PIXEL_MAP_I_TO_R_SIZE: - case GL_PIXEL_MAP_I_TO_G_SIZE: - case GL_PIXEL_MAP_I_TO_B_SIZE: - case GL_PIXEL_MAP_I_TO_A_SIZE: - case GL_PIXEL_MAP_R_TO_R_SIZE: - case GL_PIXEL_MAP_G_TO_G_SIZE: - case GL_PIXEL_MAP_B_TO_B_SIZE: - case GL_PIXEL_MAP_A_TO_A_SIZE: - case GL_UNPACK_SWAP_BYTES: - case GL_UNPACK_LSB_FIRST: - case GL_UNPACK_ROW_LENGTH: - case GL_UNPACK_SKIP_ROWS: - case GL_UNPACK_SKIP_PIXELS: - case GL_UNPACK_ALIGNMENT: - case GL_PACK_SWAP_BYTES: - case GL_PACK_LSB_FIRST: - case GL_PACK_ROW_LENGTH: - case GL_PACK_SKIP_ROWS: - case GL_PACK_SKIP_PIXELS: - case GL_PACK_ALIGNMENT: - case GL_MAP_COLOR: - case GL_MAP_STENCIL: - case GL_INDEX_SHIFT: - case GL_INDEX_OFFSET: - case GL_RED_SCALE: - case GL_RED_BIAS: - case GL_ZOOM_X: - case GL_ZOOM_Y: - case GL_GREEN_SCALE: - case GL_GREEN_BIAS: - case GL_BLUE_SCALE: - case GL_BLUE_BIAS: - case GL_ALPHA_SCALE: - case GL_ALPHA_BIAS: - case GL_DEPTH_SCALE: - case GL_DEPTH_BIAS: - case GL_MAX_EVAL_ORDER: - case GL_MAX_LIGHTS: - case GL_MAX_CLIP_PLANES: - case GL_MAX_TEXTURE_SIZE: - case GL_MAX_PIXEL_MAP_TABLE: - case GL_MAX_ATTRIB_STACK_DEPTH: - case GL_MAX_MODELVIEW_STACK_DEPTH: - case GL_MAX_NAME_STACK_DEPTH: - case GL_MAX_PROJECTION_STACK_DEPTH: - case GL_MAX_TEXTURE_STACK_DEPTH: - case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH: - case GL_SUBPIXEL_BITS: - case GL_INDEX_BITS: - case GL_RED_BITS: - case GL_GREEN_BITS: - case GL_BLUE_BITS: - case GL_ALPHA_BITS: - case GL_DEPTH_BITS: - case GL_STENCIL_BITS: - case GL_ACCUM_RED_BITS: - case GL_ACCUM_GREEN_BITS: - case GL_ACCUM_BLUE_BITS: - case GL_ACCUM_ALPHA_BITS: - case GL_NAME_STACK_DEPTH: - case GL_AUTO_NORMAL: - case GL_MAP1_COLOR_4: - case GL_MAP1_INDEX: - case GL_MAP1_NORMAL: - case GL_MAP1_TEXTURE_COORD_1: - case GL_MAP1_TEXTURE_COORD_2: - case GL_MAP1_TEXTURE_COORD_3: - case GL_MAP1_TEXTURE_COORD_4: - case GL_MAP1_VERTEX_3: - case GL_MAP1_VERTEX_4: - case GL_MAP2_COLOR_4: - case GL_MAP2_INDEX: - case GL_MAP2_NORMAL: - case GL_MAP2_TEXTURE_COORD_1: - case GL_MAP2_TEXTURE_COORD_2: - case GL_MAP2_TEXTURE_COORD_3: - case GL_MAP2_TEXTURE_COORD_4: - case GL_MAP2_VERTEX_3: - case GL_MAP2_VERTEX_4: - case GL_MAP1_GRID_SEGMENTS: - case GL_TEXTURE_1D: - case GL_TEXTURE_2D: - case GL_POLYGON_OFFSET_UNITS: - case GL_CLIP_PLANE0: - case GL_CLIP_PLANE1: - case GL_CLIP_PLANE2: - case GL_CLIP_PLANE3: - case GL_CLIP_PLANE4: - case GL_CLIP_PLANE5: - case GL_LIGHT0: - case GL_LIGHT1: - case GL_LIGHT2: - case GL_LIGHT3: - case GL_LIGHT4: - case GL_LIGHT5: - case GL_LIGHT6: - case GL_LIGHT7: - case GL_BLEND_EQUATION: -/* case GL_BLEND_EQUATION_EXT:*/ - case GL_CONVOLUTION_1D: - case GL_CONVOLUTION_2D: - case GL_SEPARABLE_2D: - case GL_MAX_CONVOLUTION_WIDTH: -/* case GL_MAX_CONVOLUTION_WIDTH_EXT:*/ - case GL_MAX_CONVOLUTION_HEIGHT: -/* case GL_MAX_CONVOLUTION_HEIGHT_EXT:*/ - case GL_POST_CONVOLUTION_RED_SCALE: -/* case GL_POST_CONVOLUTION_RED_SCALE_EXT:*/ - case GL_POST_CONVOLUTION_GREEN_SCALE: -/* case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:*/ - case GL_POST_CONVOLUTION_BLUE_SCALE: -/* case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:*/ - case GL_POST_CONVOLUTION_ALPHA_SCALE: -/* case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:*/ - case GL_POST_CONVOLUTION_RED_BIAS: -/* case GL_POST_CONVOLUTION_RED_BIAS_EXT:*/ - case GL_POST_CONVOLUTION_GREEN_BIAS: -/* case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:*/ - case GL_POST_CONVOLUTION_BLUE_BIAS: -/* case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:*/ - case GL_POST_CONVOLUTION_ALPHA_BIAS: -/* case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:*/ - case GL_HISTOGRAM: - case GL_MINMAX: - case GL_POLYGON_OFFSET_FACTOR: - case GL_RESCALE_NORMAL: -/* case GL_RESCALE_NORMAL_EXT:*/ - case GL_TEXTURE_BINDING_1D: - case GL_TEXTURE_BINDING_2D: - case GL_TEXTURE_BINDING_3D: - case GL_PACK_SKIP_IMAGES: - case GL_PACK_IMAGE_HEIGHT: - case GL_UNPACK_SKIP_IMAGES: - case GL_UNPACK_IMAGE_HEIGHT: - case GL_TEXTURE_3D: - case GL_MAX_3D_TEXTURE_SIZE: - case GL_VERTEX_ARRAY: - case GL_NORMAL_ARRAY: - case GL_COLOR_ARRAY: - case GL_INDEX_ARRAY: - case GL_TEXTURE_COORD_ARRAY: - case GL_EDGE_FLAG_ARRAY: - case GL_VERTEX_ARRAY_SIZE: - case GL_VERTEX_ARRAY_TYPE: - case GL_VERTEX_ARRAY_STRIDE: - case GL_NORMAL_ARRAY_TYPE: - case GL_NORMAL_ARRAY_STRIDE: - case GL_COLOR_ARRAY_SIZE: - case GL_COLOR_ARRAY_TYPE: - case GL_COLOR_ARRAY_STRIDE: - case GL_INDEX_ARRAY_TYPE: - case GL_INDEX_ARRAY_STRIDE: - case GL_TEXTURE_COORD_ARRAY_SIZE: - case GL_TEXTURE_COORD_ARRAY_TYPE: - case GL_TEXTURE_COORD_ARRAY_STRIDE: - case GL_EDGE_FLAG_ARRAY_STRIDE: - case GL_MULTISAMPLE: -/* case GL_MULTISAMPLE_ARB:*/ - case GL_SAMPLE_ALPHA_TO_COVERAGE: -/* case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:*/ - case GL_SAMPLE_ALPHA_TO_ONE: -/* case GL_SAMPLE_ALPHA_TO_ONE_ARB:*/ - case GL_SAMPLE_COVERAGE: -/* case GL_SAMPLE_COVERAGE_ARB:*/ - case GL_SAMPLE_BUFFERS: -/* case GL_SAMPLE_BUFFERS_ARB:*/ - case GL_SAMPLES: -/* case GL_SAMPLES_ARB:*/ - case GL_SAMPLE_COVERAGE_VALUE: -/* case GL_SAMPLE_COVERAGE_VALUE_ARB:*/ - case GL_SAMPLE_COVERAGE_INVERT: -/* case GL_SAMPLE_COVERAGE_INVERT_ARB:*/ - case GL_COLOR_MATRIX_STACK_DEPTH: - case GL_MAX_COLOR_MATRIX_STACK_DEPTH: - case GL_POST_COLOR_MATRIX_RED_SCALE: - case GL_POST_COLOR_MATRIX_GREEN_SCALE: - case GL_POST_COLOR_MATRIX_BLUE_SCALE: - case GL_POST_COLOR_MATRIX_ALPHA_SCALE: - case GL_POST_COLOR_MATRIX_RED_BIAS: - case GL_POST_COLOR_MATRIX_GREEN_BIAS: - case GL_POST_COLOR_MATRIX_BLUE_BIAS: - case GL_POST_COLOR_MATRIX_ALPHA_BIAS: - case GL_BLEND_DST_RGB: - case GL_BLEND_SRC_RGB: - case GL_BLEND_DST_ALPHA: - case GL_BLEND_SRC_ALPHA: - case GL_COLOR_TABLE: - case GL_POST_CONVOLUTION_COLOR_TABLE: - case GL_POST_COLOR_MATRIX_COLOR_TABLE: - case GL_MAX_ELEMENTS_VERTICES: - case GL_MAX_ELEMENTS_INDICES: - case GL_CLIP_VOLUME_CLIPPING_HINT_EXT: - case GL_OCCLUSION_TEST_HP: - case GL_OCCLUSION_TEST_RESULT_HP: - case GL_LIGHT_MODEL_COLOR_CONTROL: - case GL_CURRENT_FOG_COORD: - case GL_FOG_COORDINATE_ARRAY_TYPE: - case GL_FOG_COORDINATE_ARRAY_STRIDE: - case GL_FOG_COORD_ARRAY: - case GL_COLOR_SUM_ARB: - case GL_SECONDARY_COLOR_ARRAY_SIZE: - case GL_SECONDARY_COLOR_ARRAY_TYPE: - case GL_SECONDARY_COLOR_ARRAY_STRIDE: - case GL_SECONDARY_COLOR_ARRAY: - case GL_ACTIVE_TEXTURE: -/* case GL_ACTIVE_TEXTURE_ARB:*/ - case GL_CLIENT_ACTIVE_TEXTURE: -/* case GL_CLIENT_ACTIVE_TEXTURE_ARB:*/ - case GL_MAX_TEXTURE_UNITS: -/* case GL_MAX_TEXTURE_UNITS_ARB:*/ - case GL_MAX_RENDERBUFFER_SIZE_EXT: - case GL_TEXTURE_COMPRESSION_HINT: -/* case GL_TEXTURE_COMPRESSION_HINT_ARB:*/ - case GL_TEXTURE_RECTANGLE_ARB: -/* case GL_TEXTURE_RECTANGLE_NV:*/ - case GL_TEXTURE_BINDING_RECTANGLE_ARB: -/* case GL_TEXTURE_BINDING_RECTANGLE_NV:*/ - case GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB: -/* case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:*/ - case GL_MAX_TEXTURE_LOD_BIAS: - case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT: - case GL_MAX_SHININESS_NV: - case GL_MAX_SPOT_EXPONENT_NV: - case GL_TEXTURE_CUBE_MAP: -/* case GL_TEXTURE_CUBE_MAP_ARB:*/ - case GL_TEXTURE_BINDING_CUBE_MAP: -/* case GL_TEXTURE_BINDING_CUBE_MAP_ARB:*/ - case GL_MAX_CUBE_MAP_TEXTURE_SIZE: -/* case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:*/ - case GL_MULTISAMPLE_FILTER_HINT_NV: - case GL_FOG_DISTANCE_MODE_NV: - case GL_VERTEX_PROGRAM_ARB: - case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB: - case GL_MAX_PROGRAM_MATRICES_ARB: - case GL_CURRENT_MATRIX_STACK_DEPTH_ARB: - case GL_VERTEX_PROGRAM_POINT_SIZE_ARB: - case GL_VERTEX_PROGRAM_TWO_SIDE_ARB: - case GL_PROGRAM_ERROR_POSITION_ARB: - case GL_DEPTH_CLAMP_NV: - case GL_NUM_COMPRESSED_TEXTURE_FORMATS: -/* case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:*/ - case GL_MAX_VERTEX_UNITS_ARB: - case GL_ACTIVE_VERTEX_UNITS_ARB: - case GL_WEIGHT_SUM_UNITY_ARB: - case GL_VERTEX_BLEND_ARB: - case GL_CURRENT_WEIGHT_ARB: - case GL_WEIGHT_ARRAY_TYPE_ARB: - case GL_WEIGHT_ARRAY_STRIDE_ARB: - case GL_WEIGHT_ARRAY_SIZE_ARB: - case GL_WEIGHT_ARRAY_ARB: - case GL_PACK_INVERT_MESA: - case GL_STENCIL_BACK_FUNC_ATI: - case GL_STENCIL_BACK_FAIL_ATI: - case GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI: - case GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI: - case GL_FRAGMENT_PROGRAM_ARB: - case GL_MAX_DRAW_BUFFERS_ARB: -/* case GL_MAX_DRAW_BUFFERS_ATI:*/ - case GL_DRAW_BUFFER0_ARB: -/* case GL_DRAW_BUFFER0_ATI:*/ - case GL_DRAW_BUFFER1_ARB: -/* case GL_DRAW_BUFFER1_ATI:*/ - case GL_DRAW_BUFFER2_ARB: -/* case GL_DRAW_BUFFER2_ATI:*/ - case GL_DRAW_BUFFER3_ARB: -/* case GL_DRAW_BUFFER3_ATI:*/ - case GL_DRAW_BUFFER4_ARB: -/* case GL_DRAW_BUFFER4_ATI:*/ - case GL_DRAW_BUFFER5_ARB: -/* case GL_DRAW_BUFFER5_ATI:*/ - case GL_DRAW_BUFFER6_ARB: -/* case GL_DRAW_BUFFER6_ATI:*/ - case GL_DRAW_BUFFER7_ARB: -/* case GL_DRAW_BUFFER7_ATI:*/ - case GL_DRAW_BUFFER8_ARB: -/* case GL_DRAW_BUFFER8_ATI:*/ - case GL_DRAW_BUFFER9_ARB: -/* case GL_DRAW_BUFFER9_ATI:*/ - case GL_DRAW_BUFFER10_ARB: -/* case GL_DRAW_BUFFER10_ATI:*/ - case GL_DRAW_BUFFER11_ARB: -/* case GL_DRAW_BUFFER11_ATI:*/ - case GL_DRAW_BUFFER12_ARB: -/* case GL_DRAW_BUFFER12_ATI:*/ - case GL_DRAW_BUFFER13_ARB: -/* case GL_DRAW_BUFFER13_ATI:*/ - case GL_DRAW_BUFFER14_ARB: -/* case GL_DRAW_BUFFER14_ATI:*/ - case GL_DRAW_BUFFER15_ARB: -/* case GL_DRAW_BUFFER15_ATI:*/ - case GL_BLEND_EQUATION_ALPHA_EXT: - case GL_MATRIX_PALETTE_ARB: - case GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB: - case GL_MAX_PALETTE_MATRICES_ARB: - case GL_CURRENT_PALETTE_MATRIX_ARB: - case GL_MATRIX_INDEX_ARRAY_ARB: - case GL_CURRENT_MATRIX_INDEX_ARB: - case GL_MATRIX_INDEX_ARRAY_SIZE_ARB: - case GL_MATRIX_INDEX_ARRAY_TYPE_ARB: - case GL_MATRIX_INDEX_ARRAY_STRIDE_ARB: - case GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT: - case GL_POINT_SPRITE_ARB: -/* case GL_POINT_SPRITE_NV:*/ - case GL_POINT_SPRITE_R_MODE_NV: - case GL_MAX_VERTEX_ATTRIBS_ARB: - case GL_MAX_TEXTURE_COORDS_ARB: - case GL_MAX_TEXTURE_IMAGE_UNITS_ARB: - case GL_DEPTH_BOUNDS_TEST_EXT: - case GL_MAX_ARRAY_TEXTURE_LAYERS_EXT: - case GL_STENCIL_TEST_TWO_SIDE_EXT: - case GL_ACTIVE_STENCIL_FACE_EXT: - case GL_TEXTURE_BINDING_1D_ARRAY_EXT: - case GL_TEXTURE_BINDING_2D_ARRAY_EXT: - case GL_DRAW_FRAMEBUFFER_BINDING_EXT: - case GL_RENDERBUFFER_BINDING_EXT: - case GL_READ_FRAMEBUFFER_BINDING_EXT: - case GL_MAX_COLOR_ATTACHMENTS_EXT: - case GL_RASTER_POSITION_UNCLIPPED_IBM: - return 1; - case GL_SMOOTH_POINT_SIZE_RANGE: - case GL_LINE_WIDTH_RANGE: - case GL_POLYGON_MODE: - case GL_DEPTH_RANGE: - case GL_MAX_VIEWPORT_DIMS: - case GL_MAP1_GRID_DOMAIN: - case GL_MAP2_GRID_SEGMENTS: - case GL_ALIASED_POINT_SIZE_RANGE: - case GL_ALIASED_LINE_WIDTH_RANGE: - case GL_DEPTH_BOUNDS_EXT: - return 2; - case GL_CURRENT_NORMAL: - return 3; - case GL_CURRENT_COLOR: - case GL_CURRENT_TEXTURE_COORDS: - case GL_CURRENT_RASTER_COLOR: - case GL_CURRENT_RASTER_TEXTURE_COORDS: - case GL_CURRENT_RASTER_POSITION: - case GL_LIGHT_MODEL_AMBIENT: - case GL_FOG_COLOR: - case GL_ACCUM_CLEAR_VALUE: - case GL_VIEWPORT: - case GL_SCISSOR_BOX: - case GL_COLOR_CLEAR_VALUE: - case GL_COLOR_WRITEMASK: - case GL_MAP2_GRID_DOMAIN: - case GL_BLEND_COLOR: -/* case GL_BLEND_COLOR_EXT:*/ - case GL_CURRENT_SECONDARY_COLOR: - return 4; - case GL_MODELVIEW_MATRIX: - case GL_PROJECTION_MATRIX: - case GL_TEXTURE_MATRIX: - case GL_MODELVIEW0_ARB: - case GL_COLOR_MATRIX: - case GL_MODELVIEW1_ARB: - case GL_CURRENT_MATRIX_ARB: - case GL_MODELVIEW2_ARB: - case GL_MODELVIEW3_ARB: - case GL_MODELVIEW4_ARB: - case GL_MODELVIEW5_ARB: - case GL_MODELVIEW6_ARB: - case GL_MODELVIEW7_ARB: - case GL_MODELVIEW8_ARB: - case GL_MODELVIEW9_ARB: - case GL_MODELVIEW10_ARB: - case GL_MODELVIEW11_ARB: - case GL_MODELVIEW12_ARB: - case GL_MODELVIEW13_ARB: - case GL_MODELVIEW14_ARB: - case GL_MODELVIEW15_ARB: - case GL_MODELVIEW16_ARB: - case GL_MODELVIEW17_ARB: - case GL_MODELVIEW18_ARB: - case GL_MODELVIEW19_ARB: - case GL_MODELVIEW20_ARB: - case GL_MODELVIEW21_ARB: - case GL_MODELVIEW22_ARB: - case GL_MODELVIEW23_ARB: - case GL_MODELVIEW24_ARB: - case GL_MODELVIEW25_ARB: - case GL_MODELVIEW26_ARB: - case GL_MODELVIEW27_ARB: - case GL_MODELVIEW28_ARB: - case GL_MODELVIEW29_ARB: - case GL_MODELVIEW30_ARB: - case GL_MODELVIEW31_ARB: - case GL_TRANSPOSE_CURRENT_MATRIX_ARB: - return 16; - case GL_FOG_COORDINATE_SOURCE: - case GL_COMPRESSED_TEXTURE_FORMATS: - return __glGetBooleanv_variable_size(e); - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glGetTexParameterfv_size(GLenum e) -{ - switch (e) { - case GL_TEXTURE_MAG_FILTER: - case GL_TEXTURE_MIN_FILTER: - case GL_TEXTURE_WRAP_S: - case GL_TEXTURE_WRAP_T: - case GL_TEXTURE_PRIORITY: - case GL_TEXTURE_RESIDENT: - case GL_TEXTURE_WRAP_R: - case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB: -/* case GL_SHADOW_AMBIENT_SGIX:*/ - case GL_TEXTURE_MIN_LOD: - case GL_TEXTURE_MAX_LOD: - case GL_TEXTURE_BASE_LEVEL: - case GL_TEXTURE_MAX_LEVEL: - case GL_TEXTURE_CLIPMAP_FRAME_SGIX: - case GL_TEXTURE_LOD_BIAS_S_SGIX: - case GL_TEXTURE_LOD_BIAS_T_SGIX: - case GL_TEXTURE_LOD_BIAS_R_SGIX: - case GL_GENERATE_MIPMAP: -/* case GL_GENERATE_MIPMAP_SGIS:*/ - case GL_TEXTURE_COMPARE_SGIX: - case GL_TEXTURE_COMPARE_OPERATOR_SGIX: - case GL_TEXTURE_MAX_CLAMP_S_SGIX: - case GL_TEXTURE_MAX_CLAMP_T_SGIX: - case GL_TEXTURE_MAX_CLAMP_R_SGIX: - case GL_TEXTURE_MAX_ANISOTROPY_EXT: - case GL_TEXTURE_LOD_BIAS: -/* case GL_TEXTURE_LOD_BIAS_EXT:*/ - case GL_DEPTH_TEXTURE_MODE: -/* case GL_DEPTH_TEXTURE_MODE_ARB:*/ - case GL_TEXTURE_COMPARE_MODE: -/* case GL_TEXTURE_COMPARE_MODE_ARB:*/ - case GL_TEXTURE_COMPARE_FUNC: -/* case GL_TEXTURE_COMPARE_FUNC_ARB:*/ - case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV: - return 1; - case GL_TEXTURE_CLIPMAP_CENTER_SGIX: - case GL_TEXTURE_CLIPMAP_OFFSET_SGIX: - return 2; - case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX: - return 3; - case GL_TEXTURE_BORDER_COLOR: - case GL_POST_TEXTURE_FILTER_BIAS_SGIX: - case GL_POST_TEXTURE_FILTER_SCALE_SGIX: - return 4; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glGetTexLevelParameterfv_size(GLenum e) -{ - switch (e) { - case GL_TEXTURE_WIDTH: - case GL_TEXTURE_HEIGHT: - case GL_TEXTURE_COMPONENTS: - case GL_TEXTURE_BORDER: - case GL_TEXTURE_RED_SIZE: -/* case GL_TEXTURE_RED_SIZE_EXT:*/ - case GL_TEXTURE_GREEN_SIZE: -/* case GL_TEXTURE_GREEN_SIZE_EXT:*/ - case GL_TEXTURE_BLUE_SIZE: -/* case GL_TEXTURE_BLUE_SIZE_EXT:*/ - case GL_TEXTURE_ALPHA_SIZE: -/* case GL_TEXTURE_ALPHA_SIZE_EXT:*/ - case GL_TEXTURE_LUMINANCE_SIZE: -/* case GL_TEXTURE_LUMINANCE_SIZE_EXT:*/ - case GL_TEXTURE_INTENSITY_SIZE: -/* case GL_TEXTURE_INTENSITY_SIZE_EXT:*/ - case GL_TEXTURE_DEPTH: - case GL_TEXTURE_INDEX_SIZE_EXT: - case GL_TEXTURE_COMPRESSED_IMAGE_SIZE: -/* case GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB:*/ - case GL_TEXTURE_COMPRESSED: -/* case GL_TEXTURE_COMPRESSED_ARB:*/ - case GL_TEXTURE_DEPTH_SIZE: -/* case GL_TEXTURE_DEPTH_SIZE_ARB:*/ - return 1; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glColorTableParameterfv_size(GLenum e) -{ - switch (e) { - case GL_COLOR_TABLE_SCALE: - case GL_COLOR_TABLE_BIAS: - return 4; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glGetColorTableParameterfv_size(GLenum e) -{ - switch (e) { - case GL_COLOR_TABLE_FORMAT: -/* case GL_COLOR_TABLE_FORMAT_EXT:*/ - case GL_COLOR_TABLE_WIDTH: -/* case GL_COLOR_TABLE_WIDTH_EXT:*/ - case GL_COLOR_TABLE_RED_SIZE: -/* case GL_COLOR_TABLE_RED_SIZE_EXT:*/ - case GL_COLOR_TABLE_GREEN_SIZE: -/* case GL_COLOR_TABLE_GREEN_SIZE_EXT:*/ - case GL_COLOR_TABLE_BLUE_SIZE: -/* case GL_COLOR_TABLE_BLUE_SIZE_EXT:*/ - case GL_COLOR_TABLE_ALPHA_SIZE: -/* case GL_COLOR_TABLE_ALPHA_SIZE_EXT:*/ - case GL_COLOR_TABLE_LUMINANCE_SIZE: -/* case GL_COLOR_TABLE_LUMINANCE_SIZE_EXT:*/ - case GL_COLOR_TABLE_INTENSITY_SIZE: -/* case GL_COLOR_TABLE_INTENSITY_SIZE_EXT:*/ - return 1; - case GL_COLOR_TABLE_SCALE: - case GL_COLOR_TABLE_BIAS: - return 4; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glConvolutionParameterfv_size(GLenum e) -{ - switch (e) { - case GL_CONVOLUTION_BORDER_MODE: -/* case GL_CONVOLUTION_BORDER_MODE_EXT:*/ - return 1; - case GL_CONVOLUTION_FILTER_SCALE: -/* case GL_CONVOLUTION_FILTER_SCALE_EXT:*/ - case GL_CONVOLUTION_FILTER_BIAS: -/* case GL_CONVOLUTION_FILTER_BIAS_EXT:*/ - case GL_CONVOLUTION_BORDER_COLOR: -/* case GL_CONVOLUTION_BORDER_COLOR_HP:*/ - return 4; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glGetConvolutionParameterfv_size(GLenum e) -{ - switch (e) { - case GL_CONVOLUTION_BORDER_MODE: -/* case GL_CONVOLUTION_BORDER_MODE_EXT:*/ - case GL_CONVOLUTION_FORMAT: -/* case GL_CONVOLUTION_FORMAT_EXT:*/ - case GL_CONVOLUTION_WIDTH: -/* case GL_CONVOLUTION_WIDTH_EXT:*/ - case GL_CONVOLUTION_HEIGHT: -/* case GL_CONVOLUTION_HEIGHT_EXT:*/ - case GL_MAX_CONVOLUTION_WIDTH: -/* case GL_MAX_CONVOLUTION_WIDTH_EXT:*/ - case GL_MAX_CONVOLUTION_HEIGHT: -/* case GL_MAX_CONVOLUTION_HEIGHT_EXT:*/ - return 1; - case GL_CONVOLUTION_FILTER_SCALE: -/* case GL_CONVOLUTION_FILTER_SCALE_EXT:*/ - case GL_CONVOLUTION_FILTER_BIAS: -/* case GL_CONVOLUTION_FILTER_BIAS_EXT:*/ - case GL_CONVOLUTION_BORDER_COLOR: -/* case GL_CONVOLUTION_BORDER_COLOR_HP:*/ - return 4; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glGetHistogramParameterfv_size(GLenum e) -{ - switch (e) { - case GL_HISTOGRAM_WIDTH: - case GL_HISTOGRAM_FORMAT: - case GL_HISTOGRAM_RED_SIZE: - case GL_HISTOGRAM_GREEN_SIZE: - case GL_HISTOGRAM_BLUE_SIZE: - case GL_HISTOGRAM_ALPHA_SIZE: - case GL_HISTOGRAM_LUMINANCE_SIZE: - case GL_HISTOGRAM_SINK: - return 1; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glGetMinmaxParameterfv_size(GLenum e) -{ - switch (e) { - case GL_MINMAX_FORMAT: - case GL_MINMAX_SINK: - return 1; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glGetProgramivARB_size(GLenum e) -{ - switch (e) { - case GL_PROGRAM_LENGTH_ARB: - case GL_PROGRAM_BINDING_ARB: - case GL_PROGRAM_ALU_INSTRUCTIONS_ARB: - case GL_PROGRAM_TEX_INSTRUCTIONS_ARB: - case GL_PROGRAM_TEX_INDIRECTIONS_ARB: - case GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB: - case GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB: - case GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB: - case GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB: - case GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB: - case GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB: - case GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB: - case GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB: - case GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB: - case GL_PROGRAM_FORMAT_ARB: - case GL_PROGRAM_INSTRUCTIONS_ARB: - case GL_MAX_PROGRAM_INSTRUCTIONS_ARB: - case GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB: - case GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB: - case GL_PROGRAM_TEMPORARIES_ARB: - case GL_MAX_PROGRAM_TEMPORARIES_ARB: - case GL_PROGRAM_NATIVE_TEMPORARIES_ARB: - case GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB: - case GL_PROGRAM_PARAMETERS_ARB: - case GL_MAX_PROGRAM_PARAMETERS_ARB: - case GL_PROGRAM_NATIVE_PARAMETERS_ARB: - case GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB: - case GL_PROGRAM_ATTRIBS_ARB: - case GL_MAX_PROGRAM_ATTRIBS_ARB: - case GL_PROGRAM_NATIVE_ATTRIBS_ARB: - case GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB: - case GL_PROGRAM_ADDRESS_REGISTERS_ARB: - case GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB: - case GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB: - case GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB: - case GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB: - case GL_MAX_PROGRAM_ENV_PARAMETERS_ARB: - case GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB: - case GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV: - case GL_MAX_PROGRAM_CALL_DEPTH_NV: - case GL_MAX_PROGRAM_IF_DEPTH_NV: - case GL_MAX_PROGRAM_LOOP_DEPTH_NV: - case GL_MAX_PROGRAM_LOOP_COUNT_NV: - return 1; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glGetVertexAttribdvARB_size(GLenum e) -{ - switch (e) { - case GL_VERTEX_PROGRAM_ARB: - case GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB: - case GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB: - case GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB: - case GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB: - case GL_CURRENT_VERTEX_ATTRIB_ARB: - return 1; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glGetQueryObjectivARB_size(GLenum e) -{ - switch (e) { - case GL_QUERY_RESULT_ARB: - case GL_QUERY_RESULT_AVAILABLE_ARB: - return 1; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glGetQueryivARB_size(GLenum e) -{ - switch (e) { - case GL_QUERY_COUNTER_BITS_ARB: - case GL_CURRENT_QUERY_ARB: - return 1; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glPointParameterfvEXT_size(GLenum e) -{ - switch (e) { - case GL_POINT_SIZE_MIN: -/* case GL_POINT_SIZE_MIN_ARB:*/ -/* case GL_POINT_SIZE_MIN_SGIS:*/ - case GL_POINT_SIZE_MAX: -/* case GL_POINT_SIZE_MAX_ARB:*/ -/* case GL_POINT_SIZE_MAX_SGIS:*/ - case GL_POINT_FADE_THRESHOLD_SIZE: -/* case GL_POINT_FADE_THRESHOLD_SIZE_ARB:*/ -/* case GL_POINT_FADE_THRESHOLD_SIZE_SGIS:*/ - case GL_POINT_SPRITE_R_MODE_NV: - case GL_POINT_SPRITE_COORD_ORIGIN: - return 1; - case GL_POINT_DISTANCE_ATTENUATION: -/* case GL_POINT_DISTANCE_ATTENUATION_ARB:*/ -/* case GL_POINT_DISTANCE_ATTENUATION_SGIS:*/ - return 3; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glGetProgramivNV_size(GLenum e) -{ - switch (e) { - case GL_PROGRAM_LENGTH_NV: - case GL_PROGRAM_TARGET_NV: - case GL_PROGRAM_RESIDENT_NV: - return 1; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glGetVertexAttribdvNV_size(GLenum e) -{ - switch (e) { - case GL_ATTRIB_ARRAY_SIZE_NV: - case GL_ATTRIB_ARRAY_STRIDE_NV: - case GL_ATTRIB_ARRAY_TYPE_NV: - case GL_CURRENT_ATTRIB_NV: - return 1; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glGetFramebufferAttachmentParameterivEXT_size(GLenum e) -{ - switch (e) { - case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT: - case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT: - case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT: - case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT: - case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT: - return 1; - default: - return 0; - } -} - -ALIAS(Fogiv, Fogfv) - ALIAS(Lightiv, Lightfv) - ALIAS(LightModeliv, LightModelfv) - ALIAS(Materialiv, Materialfv) - ALIAS(TexParameteriv, TexParameterfv) - ALIAS(TexEnviv, TexEnvfv) - ALIAS(TexGenfv, TexGendv) - ALIAS(TexGeniv, TexGendv) - ALIAS(Map1f, Map1d) - ALIAS(Map2f, Map2d) - ALIAS(GetDoublev, GetBooleanv) - ALIAS(GetFloatv, GetBooleanv) - ALIAS(GetIntegerv, GetBooleanv) - ALIAS(GetLightfv, Lightfv) - ALIAS(GetLightiv, Lightfv) - ALIAS(GetMaterialfv, Materialfv) - ALIAS(GetMaterialiv, Materialfv) - ALIAS(GetTexEnvfv, TexEnvfv) - ALIAS(GetTexEnviv, TexEnvfv) - ALIAS(GetTexGendv, TexGendv) - ALIAS(GetTexGenfv, TexGendv) - ALIAS(GetTexGeniv, TexGendv) - ALIAS(GetTexParameteriv, GetTexParameterfv) - ALIAS(GetTexLevelParameteriv, GetTexLevelParameterfv) - ALIAS(ColorTableParameteriv, ColorTableParameterfv) - ALIAS(GetColorTableParameteriv, GetColorTableParameterfv) - ALIAS(ConvolutionParameteriv, ConvolutionParameterfv) - ALIAS(GetConvolutionParameteriv, GetConvolutionParameterfv) - ALIAS(GetHistogramParameteriv, GetHistogramParameterfv) - ALIAS(GetMinmaxParameteriv, GetMinmaxParameterfv) - ALIAS(GetVertexAttribfvARB, GetVertexAttribdvARB) - ALIAS(GetVertexAttribivARB, GetVertexAttribdvARB) - ALIAS(GetQueryObjectuivARB, GetQueryObjectivARB) - ALIAS(GetVertexAttribfvNV, GetVertexAttribdvNV) - ALIAS(GetVertexAttribivNV, GetVertexAttribdvNV) - ALIAS(PointParameterivNV, PointParameterfvEXT) -# undef PURE -# undef FASTCALL -# undef INTERNAL diff --git a/GL/glx/indirect_size_get.h b/GL/glx/indirect_size_get.h deleted file mode 100644 index 4fcb55b4e..000000000 --- a/GL/glx/indirect_size_get.h +++ /dev/null @@ -1,102 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ - -/* - * (C) Copyright IBM Corporation 2004 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * IBM, - * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#if !defined( _INDIRECT_SIZE_GET_H_ ) -# define _INDIRECT_SIZE_GET_H_ - -/** - * \file - * Prototypes for functions used to determine the number of data elements in - * various GLX protocol messages. - * - * \author Ian Romanick <idr@us.ibm.com> - */ - -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define PURE __attribute__((pure)) -# else -# define PURE -# endif - -# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) -# define FASTCALL __attribute__((fastcall)) -# else -# define FASTCALL -# endif - -# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) -# define INTERNAL __attribute__((visibility("internal"))) -# else -# define INTERNAL -# endif - -extern INTERNAL PURE FASTCALL GLint __glGetBooleanv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetDoublev_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetFloatv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetIntegerv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetLightfv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetLightiv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetMaterialfv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetMaterialiv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetTexEnvfv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetTexEnviv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetTexGendv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetTexGenfv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetTexGeniv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetTexParameterfv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetTexParameteriv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetTexLevelParameterfv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetTexLevelParameteriv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameterfv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameteriv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint -__glGetConvolutionParameterfv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint -__glGetConvolutionParameteriv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetHistogramParameterfv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetHistogramParameteriv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetMinmaxParameterfv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetMinmaxParameteriv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetProgramivARB_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribdvARB_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribfvARB_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribivARB_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetQueryObjectivARB_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetQueryObjectuivARB_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetQueryivARB_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetProgramivNV_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribdvNV_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribfvNV_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribivNV_size(GLenum); -extern INTERNAL PURE FASTCALL GLint -__glGetFramebufferAttachmentParameterivEXT_size(GLenum); - -# undef PURE -# undef FASTCALL -# undef INTERNAL - -#endif /* !defined( _INDIRECT_SIZE_GET_H_ ) */ diff --git a/GL/glx/indirect_table.c b/GL/glx/indirect_table.c deleted file mode 100644 index cb3202605..000000000 --- a/GL/glx/indirect_table.c +++ /dev/null @@ -1,1596 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by glX_server_table.py (from Mesa) script */ - -/* - * (C) Copyright IBM Corporation 2005, 2006 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * IBM, - * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include <inttypes.h> -#include "glxserver.h" -#include "glxext.h" -#include "indirect_dispatch.h" -#include "indirect_reqsize.h" -#include "g_disptab.h" -#include "indirect_table.h" - -/*****************************************************************/ -/* tree depth = 3 */ -static const int_fast16_t Single_dispatch_tree[24] = { - /* [0] -> opcode range [0, 256], node depth 1 */ - 2, - 5, - 13, - 16, - EMPTY_LEAF, - - /* [5] -> opcode range [0, 64], node depth 2 */ - 2, - LEAF(0), - LEAF(16), - 10, - EMPTY_LEAF, - - /* [10] -> opcode range [32, 48], node depth 3 */ - 1, - LEAF(32), - EMPTY_LEAF, - - /* [13] -> opcode range [64, 128], node depth 2 */ - 1, - EMPTY_LEAF, - LEAF(40), - - /* [16] -> opcode range [128, 192], node depth 2 */ - 2, - LEAF(72), - LEAF(88), - 21, - EMPTY_LEAF, - - /* [21] -> opcode range [160, 176], node depth 3 */ - 1, - LEAF(104), - EMPTY_LEAF, - -}; - -static const void *Single_function_table[112][2] = { - /* [ 0] = 0 */ {NULL, NULL}, - /* [ 1] = 1 */ {__glXDisp_Render, __glXDispSwap_Render}, - /* [ 2] = 2 */ {__glXDisp_RenderLarge, __glXDispSwap_RenderLarge}, - /* [ 3] = 3 */ {__glXDisp_CreateContext, __glXDispSwap_CreateContext}, - /* [ 4] = 4 */ {__glXDisp_DestroyContext, __glXDispSwap_DestroyContext}, - /* [ 5] = 5 */ {__glXDisp_MakeCurrent, __glXDispSwap_MakeCurrent}, - /* [ 6] = 6 */ {__glXDisp_IsDirect, __glXDispSwap_IsDirect}, - /* [ 7] = 7 */ {__glXDisp_QueryVersion, __glXDispSwap_QueryVersion}, - /* [ 8] = 8 */ {__glXDisp_WaitGL, __glXDispSwap_WaitGL}, - /* [ 9] = 9 */ {__glXDisp_WaitX, __glXDispSwap_WaitX}, - /* [ 10] = 10 */ {__glXDisp_CopyContext, __glXDispSwap_CopyContext}, - /* [ 11] = 11 */ {__glXDisp_SwapBuffers, __glXDispSwap_SwapBuffers}, - /* [ 12] = 12 */ {__glXDisp_UseXFont, __glXDispSwap_UseXFont}, - /* [ 13] = 13 */ {__glXDisp_CreateGLXPixmap, __glXDispSwap_CreateGLXPixmap}, - /* [ 14] = 14 */ {__glXDisp_GetVisualConfigs, __glXDispSwap_GetVisualConfigs}, - /* [ 15] = 15 */ {__glXDisp_DestroyGLXPixmap, __glXDispSwap_DestroyGLXPixmap}, - /* [ 16] = 16 */ {__glXDisp_VendorPrivate, __glXDispSwap_VendorPrivate}, - /* [ 17] = 17 */ {__glXDisp_VendorPrivateWithReply, __glXDispSwap_VendorPrivateWithReply}, - /* [ 18] = 18 */ {__glXDisp_QueryExtensionsString, __glXDispSwap_QueryExtensionsString}, - /* [ 19] = 19 */ {__glXDisp_QueryServerString, __glXDispSwap_QueryServerString}, - /* [ 20] = 20 */ {__glXDisp_ClientInfo, __glXDispSwap_ClientInfo}, - /* [ 21] = 21 */ {__glXDisp_GetFBConfigs, __glXDispSwap_GetFBConfigs}, - /* [ 22] = 22 */ {__glXDisp_CreatePixmap, __glXDispSwap_CreatePixmap}, - /* [ 23] = 23 */ {__glXDisp_DestroyPixmap, __glXDispSwap_DestroyPixmap}, - /* [ 24] = 24 */ {__glXDisp_CreateNewContext, __glXDispSwap_CreateNewContext}, - /* [ 25] = 25 */ {__glXDisp_QueryContext, __glXDispSwap_QueryContext}, - /* [ 26] = 26 */ {__glXDisp_MakeContextCurrent, __glXDispSwap_MakeContextCurrent}, - /* [ 27] = 27 */ {__glXDisp_CreatePbuffer, __glXDispSwap_CreatePbuffer}, - /* [ 28] = 28 */ {__glXDisp_DestroyPbuffer, __glXDispSwap_DestroyPbuffer}, - /* [ 29] = 29 */ {__glXDisp_GetDrawableAttributes, __glXDispSwap_GetDrawableAttributes}, - /* [ 30] = 30 */ {__glXDisp_ChangeDrawableAttributes, __glXDispSwap_ChangeDrawableAttributes}, - /* [ 31] = 31 */ {__glXDisp_CreateWindow, __glXDispSwap_CreateWindow}, - /* [ 32] = 32 */ {__glXDisp_DestroyWindow, __glXDispSwap_DestroyWindow}, - /* [ 33] = 33 */ {NULL, NULL}, - /* [ 34] = 34 */ {NULL, NULL}, - /* [ 35] = 35 */ {NULL, NULL}, - /* [ 36] = 36 */ {NULL, NULL}, - /* [ 37] = 37 */ {NULL, NULL}, - /* [ 38] = 38 */ {NULL, NULL}, - /* [ 39] = 39 */ {NULL, NULL}, - /* [ 40] = 96 */ {NULL, NULL}, - /* [ 41] = 97 */ {NULL, NULL}, - /* [ 42] = 98 */ {NULL, NULL}, - /* [ 43] = 99 */ {NULL, NULL}, - /* [ 44] = 100 */ {NULL, NULL}, - /* [ 45] = 101 */ {__glXDisp_NewList, __glXDispSwap_NewList}, - /* [ 46] = 102 */ {__glXDisp_EndList, __glXDispSwap_EndList}, - /* [ 47] = 103 */ {__glXDisp_DeleteLists, __glXDispSwap_DeleteLists}, - /* [ 48] = 104 */ {__glXDisp_GenLists, __glXDispSwap_GenLists}, - /* [ 49] = 105 */ {__glXDisp_FeedbackBuffer, __glXDispSwap_FeedbackBuffer}, - /* [ 50] = 106 */ {__glXDisp_SelectBuffer, __glXDispSwap_SelectBuffer}, - /* [ 51] = 107 */ {__glXDisp_RenderMode, __glXDispSwap_RenderMode}, - /* [ 52] = 108 */ {__glXDisp_Finish, __glXDispSwap_Finish}, - /* [ 53] = 109 */ {__glXDisp_PixelStoref, __glXDispSwap_PixelStoref}, - /* [ 54] = 110 */ {__glXDisp_PixelStorei, __glXDispSwap_PixelStorei}, - /* [ 55] = 111 */ {__glXDisp_ReadPixels, __glXDispSwap_ReadPixels}, - /* [ 56] = 112 */ {__glXDisp_GetBooleanv, __glXDispSwap_GetBooleanv}, - /* [ 57] = 113 */ {__glXDisp_GetClipPlane, __glXDispSwap_GetClipPlane}, - /* [ 58] = 114 */ {__glXDisp_GetDoublev, __glXDispSwap_GetDoublev}, - /* [ 59] = 115 */ {__glXDisp_GetError, __glXDispSwap_GetError}, - /* [ 60] = 116 */ {__glXDisp_GetFloatv, __glXDispSwap_GetFloatv}, - /* [ 61] = 117 */ {__glXDisp_GetIntegerv, __glXDispSwap_GetIntegerv}, - /* [ 62] = 118 */ {__glXDisp_GetLightfv, __glXDispSwap_GetLightfv}, - /* [ 63] = 119 */ {__glXDisp_GetLightiv, __glXDispSwap_GetLightiv}, - /* [ 64] = 120 */ {__glXDisp_GetMapdv, __glXDispSwap_GetMapdv}, - /* [ 65] = 121 */ {__glXDisp_GetMapfv, __glXDispSwap_GetMapfv}, - /* [ 66] = 122 */ {__glXDisp_GetMapiv, __glXDispSwap_GetMapiv}, - /* [ 67] = 123 */ {__glXDisp_GetMaterialfv, __glXDispSwap_GetMaterialfv}, - /* [ 68] = 124 */ {__glXDisp_GetMaterialiv, __glXDispSwap_GetMaterialiv}, - /* [ 69] = 125 */ {__glXDisp_GetPixelMapfv, __glXDispSwap_GetPixelMapfv}, - /* [ 70] = 126 */ {__glXDisp_GetPixelMapuiv, __glXDispSwap_GetPixelMapuiv}, - /* [ 71] = 127 */ {__glXDisp_GetPixelMapusv, __glXDispSwap_GetPixelMapusv}, - /* [ 72] = 128 */ {__glXDisp_GetPolygonStipple, __glXDispSwap_GetPolygonStipple}, - /* [ 73] = 129 */ {__glXDisp_GetString, __glXDispSwap_GetString}, - /* [ 74] = 130 */ {__glXDisp_GetTexEnvfv, __glXDispSwap_GetTexEnvfv}, - /* [ 75] = 131 */ {__glXDisp_GetTexEnviv, __glXDispSwap_GetTexEnviv}, - /* [ 76] = 132 */ {__glXDisp_GetTexGendv, __glXDispSwap_GetTexGendv}, - /* [ 77] = 133 */ {__glXDisp_GetTexGenfv, __glXDispSwap_GetTexGenfv}, - /* [ 78] = 134 */ {__glXDisp_GetTexGeniv, __glXDispSwap_GetTexGeniv}, - /* [ 79] = 135 */ {__glXDisp_GetTexImage, __glXDispSwap_GetTexImage}, - /* [ 80] = 136 */ {__glXDisp_GetTexParameterfv, __glXDispSwap_GetTexParameterfv}, - /* [ 81] = 137 */ {__glXDisp_GetTexParameteriv, __glXDispSwap_GetTexParameteriv}, - /* [ 82] = 138 */ {__glXDisp_GetTexLevelParameterfv, __glXDispSwap_GetTexLevelParameterfv}, - /* [ 83] = 139 */ {__glXDisp_GetTexLevelParameteriv, __glXDispSwap_GetTexLevelParameteriv}, - /* [ 84] = 140 */ {__glXDisp_IsEnabled, __glXDispSwap_IsEnabled}, - /* [ 85] = 141 */ {__glXDisp_IsList, __glXDispSwap_IsList}, - /* [ 86] = 142 */ {__glXDisp_Flush, __glXDispSwap_Flush}, - /* [ 87] = 143 */ {__glXDisp_AreTexturesResident, __glXDispSwap_AreTexturesResident}, - /* [ 88] = 144 */ {__glXDisp_DeleteTextures, __glXDispSwap_DeleteTextures}, - /* [ 89] = 145 */ {__glXDisp_GenTextures, __glXDispSwap_GenTextures}, - /* [ 90] = 146 */ {__glXDisp_IsTexture, __glXDispSwap_IsTexture}, - /* [ 91] = 147 */ {__glXDisp_GetColorTable, __glXDispSwap_GetColorTable}, - /* [ 92] = 148 */ {__glXDisp_GetColorTableParameterfv, __glXDispSwap_GetColorTableParameterfv}, - /* [ 93] = 149 */ {__glXDisp_GetColorTableParameteriv, __glXDispSwap_GetColorTableParameteriv}, - /* [ 94] = 150 */ {__glXDisp_GetConvolutionFilter, __glXDispSwap_GetConvolutionFilter}, - /* [ 95] = 151 */ {__glXDisp_GetConvolutionParameterfv, __glXDispSwap_GetConvolutionParameterfv}, - /* [ 96] = 152 */ {__glXDisp_GetConvolutionParameteriv, __glXDispSwap_GetConvolutionParameteriv}, - /* [ 97] = 153 */ {__glXDisp_GetSeparableFilter, __glXDispSwap_GetSeparableFilter}, - /* [ 98] = 154 */ {__glXDisp_GetHistogram, __glXDispSwap_GetHistogram}, - /* [ 99] = 155 */ {__glXDisp_GetHistogramParameterfv, __glXDispSwap_GetHistogramParameterfv}, - /* [ 100] = 156 */ {__glXDisp_GetHistogramParameteriv, __glXDispSwap_GetHistogramParameteriv}, - /* [ 101] = 157 */ {__glXDisp_GetMinmax, __glXDispSwap_GetMinmax}, - /* [ 102] = 158 */ {__glXDisp_GetMinmaxParameterfv, __glXDispSwap_GetMinmaxParameterfv}, - /* [ 103] = 159 */ {__glXDisp_GetMinmaxParameteriv, __glXDispSwap_GetMinmaxParameteriv}, - /* [ 104] = 160 */ {__glXDisp_GetCompressedTexImageARB, __glXDispSwap_GetCompressedTexImageARB}, - /* [ 105] = 161 */ {__glXDisp_DeleteQueriesARB, __glXDispSwap_DeleteQueriesARB}, - /* [ 106] = 162 */ {__glXDisp_GenQueriesARB, __glXDispSwap_GenQueriesARB}, - /* [ 107] = 163 */ {__glXDisp_IsQueryARB, __glXDispSwap_IsQueryARB}, - /* [ 108] = 164 */ {__glXDisp_GetQueryivARB, __glXDispSwap_GetQueryivARB}, - /* [ 109] = 165 */ {__glXDisp_GetQueryObjectivARB, __glXDispSwap_GetQueryObjectivARB}, - /* [ 110] = 166 */ {__glXDisp_GetQueryObjectuivARB, __glXDispSwap_GetQueryObjectuivARB}, - /* [ 111] = 167 */ {NULL, NULL}, -}; - -const struct __glXDispatchInfo Single_dispatch_info = { - 8, - Single_dispatch_tree, - Single_function_table, - NULL, - NULL -}; - -/*****************************************************************/ -/* tree depth = 8 */ -static const int_fast16_t Render_dispatch_tree[95] = { - /* [0] -> opcode range [0, 8192], node depth 1 */ - 2, - 5, - 31, - 54, - EMPTY_LEAF, - - /* [5] -> opcode range [0, 2048], node depth 2 */ - 1, - 8, - EMPTY_LEAF, - - /* [8] -> opcode range [0, 1024], node depth 3 */ - 1, - 11, - EMPTY_LEAF, - - /* [11] -> opcode range [0, 512], node depth 4 */ - 1, - 14, - EMPTY_LEAF, - - /* [14] -> opcode range [0, 256], node depth 5 */ - 4, - LEAF(0), - LEAF(16), - LEAF(32), - LEAF(48), - LEAF(64), - LEAF(80), - LEAF(96), - LEAF(112), - LEAF(128), - LEAF(144), - LEAF(160), - LEAF(176), - LEAF(192), - LEAF(208), - LEAF(224), - EMPTY_LEAF, - - /* [31] -> opcode range [2048, 4096], node depth 2 */ - 1, - 34, - EMPTY_LEAF, - - /* [34] -> opcode range [2048, 3072], node depth 3 */ - 1, - 37, - EMPTY_LEAF, - - /* [37] -> opcode range [2048, 2560], node depth 4 */ - 1, - 40, - EMPTY_LEAF, - - /* [40] -> opcode range [2048, 2304], node depth 5 */ - 1, - 43, - EMPTY_LEAF, - - /* [43] -> opcode range [2048, 2176], node depth 6 */ - 1, - 46, - EMPTY_LEAF, - - /* [46] -> opcode range [2048, 2112], node depth 7 */ - 1, - 49, - EMPTY_LEAF, - - /* [49] -> opcode range [2048, 2080], node depth 8 */ - 2, - LEAF(240), - LEAF(248), - LEAF(256), - EMPTY_LEAF, - - /* [54] -> opcode range [4096, 6144], node depth 2 */ - 1, - 57, - EMPTY_LEAF, - - /* [57] -> opcode range [4096, 5120], node depth 3 */ - 1, - 60, - EMPTY_LEAF, - - /* [60] -> opcode range [4096, 4608], node depth 4 */ - 1, - 63, - EMPTY_LEAF, - - /* [63] -> opcode range [4096, 4352], node depth 5 */ - 4, - LEAF(264), - LEAF(280), - 80, - EMPTY_LEAF, - EMPTY_LEAF, - LEAF(296), - LEAF(312), - LEAF(328), - LEAF(344), - EMPTY_LEAF, - 83, - 86, - EMPTY_LEAF, - 89, - 92, - EMPTY_LEAF, - - /* [80] -> opcode range [4128, 4144], node depth 6 */ - 1, - LEAF(360), - EMPTY_LEAF, - - /* [83] -> opcode range [4256, 4272], node depth 6 */ - 1, - EMPTY_LEAF, - LEAF(368), - - /* [86] -> opcode range [4272, 4288], node depth 6 */ - 1, - LEAF(376), - EMPTY_LEAF, - - /* [89] -> opcode range [4304, 4320], node depth 6 */ - 1, - EMPTY_LEAF, - LEAF(384), - - /* [92] -> opcode range [4320, 4336], node depth 6 */ - 1, - LEAF(392), - EMPTY_LEAF, - -}; - -static const void *Render_function_table[400][2] = { - /* [ 0] = 0 */ {NULL, NULL}, - /* [ 1] = 1 */ {__glXDisp_CallList, __glXDispSwap_CallList}, - /* [ 2] = 2 */ {__glXDisp_CallLists, __glXDispSwap_CallLists}, - /* [ 3] = 3 */ {__glXDisp_ListBase, __glXDispSwap_ListBase}, - /* [ 4] = 4 */ {__glXDisp_Begin, __glXDispSwap_Begin}, - /* [ 5] = 5 */ {__glXDisp_Bitmap, __glXDispSwap_Bitmap}, - /* [ 6] = 6 */ {__glXDisp_Color3bv, __glXDispSwap_Color3bv}, - /* [ 7] = 7 */ {__glXDisp_Color3dv, __glXDispSwap_Color3dv}, - /* [ 8] = 8 */ {__glXDisp_Color3fv, __glXDispSwap_Color3fv}, - /* [ 9] = 9 */ {__glXDisp_Color3iv, __glXDispSwap_Color3iv}, - /* [ 10] = 10 */ {__glXDisp_Color3sv, __glXDispSwap_Color3sv}, - /* [ 11] = 11 */ {__glXDisp_Color3ubv, __glXDispSwap_Color3ubv}, - /* [ 12] = 12 */ {__glXDisp_Color3uiv, __glXDispSwap_Color3uiv}, - /* [ 13] = 13 */ {__glXDisp_Color3usv, __glXDispSwap_Color3usv}, - /* [ 14] = 14 */ {__glXDisp_Color4bv, __glXDispSwap_Color4bv}, - /* [ 15] = 15 */ {__glXDisp_Color4dv, __glXDispSwap_Color4dv}, - /* [ 16] = 16 */ {__glXDisp_Color4fv, __glXDispSwap_Color4fv}, - /* [ 17] = 17 */ {__glXDisp_Color4iv, __glXDispSwap_Color4iv}, - /* [ 18] = 18 */ {__glXDisp_Color4sv, __glXDispSwap_Color4sv}, - /* [ 19] = 19 */ {__glXDisp_Color4ubv, __glXDispSwap_Color4ubv}, - /* [ 20] = 20 */ {__glXDisp_Color4uiv, __glXDispSwap_Color4uiv}, - /* [ 21] = 21 */ {__glXDisp_Color4usv, __glXDispSwap_Color4usv}, - /* [ 22] = 22 */ {__glXDisp_EdgeFlagv, __glXDispSwap_EdgeFlagv}, - /* [ 23] = 23 */ {__glXDisp_End, __glXDispSwap_End}, - /* [ 24] = 24 */ {__glXDisp_Indexdv, __glXDispSwap_Indexdv}, - /* [ 25] = 25 */ {__glXDisp_Indexfv, __glXDispSwap_Indexfv}, - /* [ 26] = 26 */ {__glXDisp_Indexiv, __glXDispSwap_Indexiv}, - /* [ 27] = 27 */ {__glXDisp_Indexsv, __glXDispSwap_Indexsv}, - /* [ 28] = 28 */ {__glXDisp_Normal3bv, __glXDispSwap_Normal3bv}, - /* [ 29] = 29 */ {__glXDisp_Normal3dv, __glXDispSwap_Normal3dv}, - /* [ 30] = 30 */ {__glXDisp_Normal3fv, __glXDispSwap_Normal3fv}, - /* [ 31] = 31 */ {__glXDisp_Normal3iv, __glXDispSwap_Normal3iv}, - /* [ 32] = 32 */ {__glXDisp_Normal3sv, __glXDispSwap_Normal3sv}, - /* [ 33] = 33 */ {__glXDisp_RasterPos2dv, __glXDispSwap_RasterPos2dv}, - /* [ 34] = 34 */ {__glXDisp_RasterPos2fv, __glXDispSwap_RasterPos2fv}, - /* [ 35] = 35 */ {__glXDisp_RasterPos2iv, __glXDispSwap_RasterPos2iv}, - /* [ 36] = 36 */ {__glXDisp_RasterPos2sv, __glXDispSwap_RasterPos2sv}, - /* [ 37] = 37 */ {__glXDisp_RasterPos3dv, __glXDispSwap_RasterPos3dv}, - /* [ 38] = 38 */ {__glXDisp_RasterPos3fv, __glXDispSwap_RasterPos3fv}, - /* [ 39] = 39 */ {__glXDisp_RasterPos3iv, __glXDispSwap_RasterPos3iv}, - /* [ 40] = 40 */ {__glXDisp_RasterPos3sv, __glXDispSwap_RasterPos3sv}, - /* [ 41] = 41 */ {__glXDisp_RasterPos4dv, __glXDispSwap_RasterPos4dv}, - /* [ 42] = 42 */ {__glXDisp_RasterPos4fv, __glXDispSwap_RasterPos4fv}, - /* [ 43] = 43 */ {__glXDisp_RasterPos4iv, __glXDispSwap_RasterPos4iv}, - /* [ 44] = 44 */ {__glXDisp_RasterPos4sv, __glXDispSwap_RasterPos4sv}, - /* [ 45] = 45 */ {__glXDisp_Rectdv, __glXDispSwap_Rectdv}, - /* [ 46] = 46 */ {__glXDisp_Rectfv, __glXDispSwap_Rectfv}, - /* [ 47] = 47 */ {__glXDisp_Rectiv, __glXDispSwap_Rectiv}, - /* [ 48] = 48 */ {__glXDisp_Rectsv, __glXDispSwap_Rectsv}, - /* [ 49] = 49 */ {__glXDisp_TexCoord1dv, __glXDispSwap_TexCoord1dv}, - /* [ 50] = 50 */ {__glXDisp_TexCoord1fv, __glXDispSwap_TexCoord1fv}, - /* [ 51] = 51 */ {__glXDisp_TexCoord1iv, __glXDispSwap_TexCoord1iv}, - /* [ 52] = 52 */ {__glXDisp_TexCoord1sv, __glXDispSwap_TexCoord1sv}, - /* [ 53] = 53 */ {__glXDisp_TexCoord2dv, __glXDispSwap_TexCoord2dv}, - /* [ 54] = 54 */ {__glXDisp_TexCoord2fv, __glXDispSwap_TexCoord2fv}, - /* [ 55] = 55 */ {__glXDisp_TexCoord2iv, __glXDispSwap_TexCoord2iv}, - /* [ 56] = 56 */ {__glXDisp_TexCoord2sv, __glXDispSwap_TexCoord2sv}, - /* [ 57] = 57 */ {__glXDisp_TexCoord3dv, __glXDispSwap_TexCoord3dv}, - /* [ 58] = 58 */ {__glXDisp_TexCoord3fv, __glXDispSwap_TexCoord3fv}, - /* [ 59] = 59 */ {__glXDisp_TexCoord3iv, __glXDispSwap_TexCoord3iv}, - /* [ 60] = 60 */ {__glXDisp_TexCoord3sv, __glXDispSwap_TexCoord3sv}, - /* [ 61] = 61 */ {__glXDisp_TexCoord4dv, __glXDispSwap_TexCoord4dv}, - /* [ 62] = 62 */ {__glXDisp_TexCoord4fv, __glXDispSwap_TexCoord4fv}, - /* [ 63] = 63 */ {__glXDisp_TexCoord4iv, __glXDispSwap_TexCoord4iv}, - /* [ 64] = 64 */ {__glXDisp_TexCoord4sv, __glXDispSwap_TexCoord4sv}, - /* [ 65] = 65 */ {__glXDisp_Vertex2dv, __glXDispSwap_Vertex2dv}, - /* [ 66] = 66 */ {__glXDisp_Vertex2fv, __glXDispSwap_Vertex2fv}, - /* [ 67] = 67 */ {__glXDisp_Vertex2iv, __glXDispSwap_Vertex2iv}, - /* [ 68] = 68 */ {__glXDisp_Vertex2sv, __glXDispSwap_Vertex2sv}, - /* [ 69] = 69 */ {__glXDisp_Vertex3dv, __glXDispSwap_Vertex3dv}, - /* [ 70] = 70 */ {__glXDisp_Vertex3fv, __glXDispSwap_Vertex3fv}, - /* [ 71] = 71 */ {__glXDisp_Vertex3iv, __glXDispSwap_Vertex3iv}, - /* [ 72] = 72 */ {__glXDisp_Vertex3sv, __glXDispSwap_Vertex3sv}, - /* [ 73] = 73 */ {__glXDisp_Vertex4dv, __glXDispSwap_Vertex4dv}, - /* [ 74] = 74 */ {__glXDisp_Vertex4fv, __glXDispSwap_Vertex4fv}, - /* [ 75] = 75 */ {__glXDisp_Vertex4iv, __glXDispSwap_Vertex4iv}, - /* [ 76] = 76 */ {__glXDisp_Vertex4sv, __glXDispSwap_Vertex4sv}, - /* [ 77] = 77 */ {__glXDisp_ClipPlane, __glXDispSwap_ClipPlane}, - /* [ 78] = 78 */ {__glXDisp_ColorMaterial, __glXDispSwap_ColorMaterial}, - /* [ 79] = 79 */ {__glXDisp_CullFace, __glXDispSwap_CullFace}, - /* [ 80] = 80 */ {__glXDisp_Fogf, __glXDispSwap_Fogf}, - /* [ 81] = 81 */ {__glXDisp_Fogfv, __glXDispSwap_Fogfv}, - /* [ 82] = 82 */ {__glXDisp_Fogi, __glXDispSwap_Fogi}, - /* [ 83] = 83 */ {__glXDisp_Fogiv, __glXDispSwap_Fogiv}, - /* [ 84] = 84 */ {__glXDisp_FrontFace, __glXDispSwap_FrontFace}, - /* [ 85] = 85 */ {__glXDisp_Hint, __glXDispSwap_Hint}, - /* [ 86] = 86 */ {__glXDisp_Lightf, __glXDispSwap_Lightf}, - /* [ 87] = 87 */ {__glXDisp_Lightfv, __glXDispSwap_Lightfv}, - /* [ 88] = 88 */ {__glXDisp_Lighti, __glXDispSwap_Lighti}, - /* [ 89] = 89 */ {__glXDisp_Lightiv, __glXDispSwap_Lightiv}, - /* [ 90] = 90 */ {__glXDisp_LightModelf, __glXDispSwap_LightModelf}, - /* [ 91] = 91 */ {__glXDisp_LightModelfv, __glXDispSwap_LightModelfv}, - /* [ 92] = 92 */ {__glXDisp_LightModeli, __glXDispSwap_LightModeli}, - /* [ 93] = 93 */ {__glXDisp_LightModeliv, __glXDispSwap_LightModeliv}, - /* [ 94] = 94 */ {__glXDisp_LineStipple, __glXDispSwap_LineStipple}, - /* [ 95] = 95 */ {__glXDisp_LineWidth, __glXDispSwap_LineWidth}, - /* [ 96] = 96 */ {__glXDisp_Materialf, __glXDispSwap_Materialf}, - /* [ 97] = 97 */ {__glXDisp_Materialfv, __glXDispSwap_Materialfv}, - /* [ 98] = 98 */ {__glXDisp_Materiali, __glXDispSwap_Materiali}, - /* [ 99] = 99 */ {__glXDisp_Materialiv, __glXDispSwap_Materialiv}, - /* [ 100] = 100 */ {__glXDisp_PointSize, __glXDispSwap_PointSize}, - /* [ 101] = 101 */ {__glXDisp_PolygonMode, __glXDispSwap_PolygonMode}, - /* [ 102] = 102 */ {__glXDisp_PolygonStipple, __glXDispSwap_PolygonStipple}, - /* [ 103] = 103 */ {__glXDisp_Scissor, __glXDispSwap_Scissor}, - /* [ 104] = 104 */ {__glXDisp_ShadeModel, __glXDispSwap_ShadeModel}, - /* [ 105] = 105 */ {__glXDisp_TexParameterf, __glXDispSwap_TexParameterf}, - /* [ 106] = 106 */ {__glXDisp_TexParameterfv, __glXDispSwap_TexParameterfv}, - /* [ 107] = 107 */ {__glXDisp_TexParameteri, __glXDispSwap_TexParameteri}, - /* [ 108] = 108 */ {__glXDisp_TexParameteriv, __glXDispSwap_TexParameteriv}, - /* [ 109] = 109 */ {__glXDisp_TexImage1D, __glXDispSwap_TexImage1D}, - /* [ 110] = 110 */ {__glXDisp_TexImage2D, __glXDispSwap_TexImage2D}, - /* [ 111] = 111 */ {__glXDisp_TexEnvf, __glXDispSwap_TexEnvf}, - /* [ 112] = 112 */ {__glXDisp_TexEnvfv, __glXDispSwap_TexEnvfv}, - /* [ 113] = 113 */ {__glXDisp_TexEnvi, __glXDispSwap_TexEnvi}, - /* [ 114] = 114 */ {__glXDisp_TexEnviv, __glXDispSwap_TexEnviv}, - /* [ 115] = 115 */ {__glXDisp_TexGend, __glXDispSwap_TexGend}, - /* [ 116] = 116 */ {__glXDisp_TexGendv, __glXDispSwap_TexGendv}, - /* [ 117] = 117 */ {__glXDisp_TexGenf, __glXDispSwap_TexGenf}, - /* [ 118] = 118 */ {__glXDisp_TexGenfv, __glXDispSwap_TexGenfv}, - /* [ 119] = 119 */ {__glXDisp_TexGeni, __glXDispSwap_TexGeni}, - /* [ 120] = 120 */ {__glXDisp_TexGeniv, __glXDispSwap_TexGeniv}, - /* [ 121] = 121 */ {__glXDisp_InitNames, __glXDispSwap_InitNames}, - /* [ 122] = 122 */ {__glXDisp_LoadName, __glXDispSwap_LoadName}, - /* [ 123] = 123 */ {__glXDisp_PassThrough, __glXDispSwap_PassThrough}, - /* [ 124] = 124 */ {__glXDisp_PopName, __glXDispSwap_PopName}, - /* [ 125] = 125 */ {__glXDisp_PushName, __glXDispSwap_PushName}, - /* [ 126] = 126 */ {__glXDisp_DrawBuffer, __glXDispSwap_DrawBuffer}, - /* [ 127] = 127 */ {__glXDisp_Clear, __glXDispSwap_Clear}, - /* [ 128] = 128 */ {__glXDisp_ClearAccum, __glXDispSwap_ClearAccum}, - /* [ 129] = 129 */ {__glXDisp_ClearIndex, __glXDispSwap_ClearIndex}, - /* [ 130] = 130 */ {__glXDisp_ClearColor, __glXDispSwap_ClearColor}, - /* [ 131] = 131 */ {__glXDisp_ClearStencil, __glXDispSwap_ClearStencil}, - /* [ 132] = 132 */ {__glXDisp_ClearDepth, __glXDispSwap_ClearDepth}, - /* [ 133] = 133 */ {__glXDisp_StencilMask, __glXDispSwap_StencilMask}, - /* [ 134] = 134 */ {__glXDisp_ColorMask, __glXDispSwap_ColorMask}, - /* [ 135] = 135 */ {__glXDisp_DepthMask, __glXDispSwap_DepthMask}, - /* [ 136] = 136 */ {__glXDisp_IndexMask, __glXDispSwap_IndexMask}, - /* [ 137] = 137 */ {__glXDisp_Accum, __glXDispSwap_Accum}, - /* [ 138] = 138 */ {__glXDisp_Disable, __glXDispSwap_Disable}, - /* [ 139] = 139 */ {__glXDisp_Enable, __glXDispSwap_Enable}, - /* [ 140] = 140 */ {NULL, NULL}, - /* [ 141] = 141 */ {__glXDisp_PopAttrib, __glXDispSwap_PopAttrib}, - /* [ 142] = 142 */ {__glXDisp_PushAttrib, __glXDispSwap_PushAttrib}, - /* [ 143] = 143 */ {__glXDisp_Map1d, __glXDispSwap_Map1d}, - /* [ 144] = 144 */ {__glXDisp_Map1f, __glXDispSwap_Map1f}, - /* [ 145] = 145 */ {__glXDisp_Map2d, __glXDispSwap_Map2d}, - /* [ 146] = 146 */ {__glXDisp_Map2f, __glXDispSwap_Map2f}, - /* [ 147] = 147 */ {__glXDisp_MapGrid1d, __glXDispSwap_MapGrid1d}, - /* [ 148] = 148 */ {__glXDisp_MapGrid1f, __glXDispSwap_MapGrid1f}, - /* [ 149] = 149 */ {__glXDisp_MapGrid2d, __glXDispSwap_MapGrid2d}, - /* [ 150] = 150 */ {__glXDisp_MapGrid2f, __glXDispSwap_MapGrid2f}, - /* [ 151] = 151 */ {__glXDisp_EvalCoord1dv, __glXDispSwap_EvalCoord1dv}, - /* [ 152] = 152 */ {__glXDisp_EvalCoord1fv, __glXDispSwap_EvalCoord1fv}, - /* [ 153] = 153 */ {__glXDisp_EvalCoord2dv, __glXDispSwap_EvalCoord2dv}, - /* [ 154] = 154 */ {__glXDisp_EvalCoord2fv, __glXDispSwap_EvalCoord2fv}, - /* [ 155] = 155 */ {__glXDisp_EvalMesh1, __glXDispSwap_EvalMesh1}, - /* [ 156] = 156 */ {__glXDisp_EvalPoint1, __glXDispSwap_EvalPoint1}, - /* [ 157] = 157 */ {__glXDisp_EvalMesh2, __glXDispSwap_EvalMesh2}, - /* [ 158] = 158 */ {__glXDisp_EvalPoint2, __glXDispSwap_EvalPoint2}, - /* [ 159] = 159 */ {__glXDisp_AlphaFunc, __glXDispSwap_AlphaFunc}, - /* [ 160] = 160 */ {__glXDisp_BlendFunc, __glXDispSwap_BlendFunc}, - /* [ 161] = 161 */ {__glXDisp_LogicOp, __glXDispSwap_LogicOp}, - /* [ 162] = 162 */ {__glXDisp_StencilFunc, __glXDispSwap_StencilFunc}, - /* [ 163] = 163 */ {__glXDisp_StencilOp, __glXDispSwap_StencilOp}, - /* [ 164] = 164 */ {__glXDisp_DepthFunc, __glXDispSwap_DepthFunc}, - /* [ 165] = 165 */ {__glXDisp_PixelZoom, __glXDispSwap_PixelZoom}, - /* [ 166] = 166 */ {__glXDisp_PixelTransferf, __glXDispSwap_PixelTransferf}, - /* [ 167] = 167 */ {__glXDisp_PixelTransferi, __glXDispSwap_PixelTransferi}, - /* [ 168] = 168 */ {__glXDisp_PixelMapfv, __glXDispSwap_PixelMapfv}, - /* [ 169] = 169 */ {__glXDisp_PixelMapuiv, __glXDispSwap_PixelMapuiv}, - /* [ 170] = 170 */ {__glXDisp_PixelMapusv, __glXDispSwap_PixelMapusv}, - /* [ 171] = 171 */ {__glXDisp_ReadBuffer, __glXDispSwap_ReadBuffer}, - /* [ 172] = 172 */ {__glXDisp_CopyPixels, __glXDispSwap_CopyPixels}, - /* [ 173] = 173 */ {__glXDisp_DrawPixels, __glXDispSwap_DrawPixels}, - /* [ 174] = 174 */ {__glXDisp_DepthRange, __glXDispSwap_DepthRange}, - /* [ 175] = 175 */ {__glXDisp_Frustum, __glXDispSwap_Frustum}, - /* [ 176] = 176 */ {__glXDisp_LoadIdentity, __glXDispSwap_LoadIdentity}, - /* [ 177] = 177 */ {__glXDisp_LoadMatrixf, __glXDispSwap_LoadMatrixf}, - /* [ 178] = 178 */ {__glXDisp_LoadMatrixd, __glXDispSwap_LoadMatrixd}, - /* [ 179] = 179 */ {__glXDisp_MatrixMode, __glXDispSwap_MatrixMode}, - /* [ 180] = 180 */ {__glXDisp_MultMatrixf, __glXDispSwap_MultMatrixf}, - /* [ 181] = 181 */ {__glXDisp_MultMatrixd, __glXDispSwap_MultMatrixd}, - /* [ 182] = 182 */ {__glXDisp_Ortho, __glXDispSwap_Ortho}, - /* [ 183] = 183 */ {__glXDisp_PopMatrix, __glXDispSwap_PopMatrix}, - /* [ 184] = 184 */ {__glXDisp_PushMatrix, __glXDispSwap_PushMatrix}, - /* [ 185] = 185 */ {__glXDisp_Rotated, __glXDispSwap_Rotated}, - /* [ 186] = 186 */ {__glXDisp_Rotatef, __glXDispSwap_Rotatef}, - /* [ 187] = 187 */ {__glXDisp_Scaled, __glXDispSwap_Scaled}, - /* [ 188] = 188 */ {__glXDisp_Scalef, __glXDispSwap_Scalef}, - /* [ 189] = 189 */ {__glXDisp_Translated, __glXDispSwap_Translated}, - /* [ 190] = 190 */ {__glXDisp_Translatef, __glXDispSwap_Translatef}, - /* [ 191] = 191 */ {__glXDisp_Viewport, __glXDispSwap_Viewport}, - /* [ 192] = 192 */ {__glXDisp_PolygonOffset, __glXDispSwap_PolygonOffset}, - /* [ 193] = 193 */ {__glXDisp_DrawArrays, __glXDispSwap_DrawArrays}, - /* [ 194] = 194 */ {__glXDisp_Indexubv, __glXDispSwap_Indexubv}, - /* [ 195] = 195 */ {__glXDisp_ColorSubTable, __glXDispSwap_ColorSubTable}, - /* [ 196] = 196 */ {__glXDisp_CopyColorSubTable, __glXDispSwap_CopyColorSubTable}, - /* [ 197] = 197 */ {__glXDisp_ActiveTextureARB, __glXDispSwap_ActiveTextureARB}, - /* [ 198] = 198 */ {__glXDisp_MultiTexCoord1dvARB, __glXDispSwap_MultiTexCoord1dvARB}, - /* [ 199] = 199 */ {__glXDisp_MultiTexCoord1fvARB, __glXDispSwap_MultiTexCoord1fvARB}, - /* [ 200] = 200 */ {__glXDisp_MultiTexCoord1ivARB, __glXDispSwap_MultiTexCoord1ivARB}, - /* [ 201] = 201 */ {__glXDisp_MultiTexCoord1svARB, __glXDispSwap_MultiTexCoord1svARB}, - /* [ 202] = 202 */ {__glXDisp_MultiTexCoord2dvARB, __glXDispSwap_MultiTexCoord2dvARB}, - /* [ 203] = 203 */ {__glXDisp_MultiTexCoord2fvARB, __glXDispSwap_MultiTexCoord2fvARB}, - /* [ 204] = 204 */ {__glXDisp_MultiTexCoord2ivARB, __glXDispSwap_MultiTexCoord2ivARB}, - /* [ 205] = 205 */ {__glXDisp_MultiTexCoord2svARB, __glXDispSwap_MultiTexCoord2svARB}, - /* [ 206] = 206 */ {__glXDisp_MultiTexCoord3dvARB, __glXDispSwap_MultiTexCoord3dvARB}, - /* [ 207] = 207 */ {__glXDisp_MultiTexCoord3fvARB, __glXDispSwap_MultiTexCoord3fvARB}, - /* [ 208] = 208 */ {__glXDisp_MultiTexCoord3ivARB, __glXDispSwap_MultiTexCoord3ivARB}, - /* [ 209] = 209 */ {__glXDisp_MultiTexCoord3svARB, __glXDispSwap_MultiTexCoord3svARB}, - /* [ 210] = 210 */ {__glXDisp_MultiTexCoord4dvARB, __glXDispSwap_MultiTexCoord4dvARB}, - /* [ 211] = 211 */ {__glXDisp_MultiTexCoord4fvARB, __glXDispSwap_MultiTexCoord4fvARB}, - /* [ 212] = 212 */ {__glXDisp_MultiTexCoord4ivARB, __glXDispSwap_MultiTexCoord4ivARB}, - /* [ 213] = 213 */ {__glXDisp_MultiTexCoord4svARB, __glXDispSwap_MultiTexCoord4svARB}, - /* [ 214] = 214 */ {__glXDisp_CompressedTexImage1DARB, __glXDispSwap_CompressedTexImage1DARB}, - /* [ 215] = 215 */ {__glXDisp_CompressedTexImage2DARB, __glXDispSwap_CompressedTexImage2DARB}, - /* [ 216] = 216 */ {__glXDisp_CompressedTexImage3DARB, __glXDispSwap_CompressedTexImage3DARB}, - /* [ 217] = 217 */ {__glXDisp_CompressedTexSubImage1DARB, __glXDispSwap_CompressedTexSubImage1DARB}, - /* [ 218] = 218 */ {__glXDisp_CompressedTexSubImage2DARB, __glXDispSwap_CompressedTexSubImage2DARB}, - /* [ 219] = 219 */ {__glXDisp_CompressedTexSubImage3DARB, __glXDispSwap_CompressedTexSubImage3DARB}, - /* [ 220] = 220 */ {NULL, NULL}, - /* [ 221] = 221 */ {NULL, NULL}, - /* [ 222] = 222 */ {NULL, NULL}, - /* [ 223] = 223 */ {NULL, NULL}, - /* [ 224] = 224 */ {NULL, NULL}, - /* [ 225] = 225 */ {NULL, NULL}, - /* [ 226] = 226 */ {NULL, NULL}, - /* [ 227] = 227 */ {NULL, NULL}, - /* [ 228] = 228 */ {NULL, NULL}, - /* [ 229] = 229 */ {__glXDisp_SampleCoverageARB, __glXDispSwap_SampleCoverageARB}, - /* [ 230] = 230 */ {__glXDisp_WindowPos3fvMESA, __glXDispSwap_WindowPos3fvMESA}, - /* [ 231] = 231 */ {__glXDisp_BeginQueryARB, __glXDispSwap_BeginQueryARB}, - /* [ 232] = 232 */ {__glXDisp_EndQueryARB, __glXDispSwap_EndQueryARB}, - /* [ 233] = 233 */ {__glXDisp_DrawBuffersARB, __glXDispSwap_DrawBuffersARB}, - /* [ 234] = 234 */ {NULL, NULL}, - /* [ 235] = 235 */ {NULL, NULL}, - /* [ 236] = 236 */ {NULL, NULL}, - /* [ 237] = 237 */ {NULL, NULL}, - /* [ 238] = 238 */ {NULL, NULL}, - /* [ 239] = 239 */ {NULL, NULL}, - /* [ 240] = 2048 */ {__glXDisp_SampleMaskSGIS, __glXDispSwap_SampleMaskSGIS}, - /* [ 241] = 2049 */ {__glXDisp_SamplePatternSGIS, __glXDispSwap_SamplePatternSGIS}, - /* [ 242] = 2050 */ {NULL, NULL}, - /* [ 243] = 2051 */ {NULL, NULL}, - /* [ 244] = 2052 */ {NULL, NULL}, - /* [ 245] = 2053 */ {__glXDisp_ColorTable, __glXDispSwap_ColorTable}, - /* [ 246] = 2054 */ {__glXDisp_ColorTableParameterfv, __glXDispSwap_ColorTableParameterfv}, - /* [ 247] = 2055 */ {__glXDisp_ColorTableParameteriv, __glXDispSwap_ColorTableParameteriv}, - /* [ 248] = 2056 */ {__glXDisp_CopyColorTable, __glXDispSwap_CopyColorTable}, - /* [ 249] = 2057 */ {NULL, NULL}, - /* [ 250] = 2058 */ {NULL, NULL}, - /* [ 251] = 2059 */ {NULL, NULL}, - /* [ 252] = 2060 */ {NULL, NULL}, - /* [ 253] = 2061 */ {NULL, NULL}, - /* [ 254] = 2062 */ {NULL, NULL}, - /* [ 255] = 2063 */ {NULL, NULL}, - /* [ 256] = 2064 */ {NULL, NULL}, - /* [ 257] = 2065 */ {__glXDisp_PointParameterfEXT, __glXDispSwap_PointParameterfEXT}, - /* [ 258] = 2066 */ {__glXDisp_PointParameterfvEXT, __glXDispSwap_PointParameterfvEXT}, - /* [ 259] = 2067 */ {NULL, NULL}, - /* [ 260] = 2068 */ {NULL, NULL}, - /* [ 261] = 2069 */ {NULL, NULL}, - /* [ 262] = 2070 */ {NULL, NULL}, - /* [ 263] = 2071 */ {NULL, NULL}, - /* [ 264] = 4096 */ {__glXDisp_BlendColor, __glXDispSwap_BlendColor}, - /* [ 265] = 4097 */ {__glXDisp_BlendEquation, __glXDispSwap_BlendEquation}, - /* [ 266] = 4098 */ {NULL, NULL}, - /* [ 267] = 4099 */ {__glXDisp_TexSubImage1D, __glXDispSwap_TexSubImage1D}, - /* [ 268] = 4100 */ {__glXDisp_TexSubImage2D, __glXDispSwap_TexSubImage2D}, - /* [ 269] = 4101 */ {__glXDisp_ConvolutionFilter1D, __glXDispSwap_ConvolutionFilter1D}, - /* [ 270] = 4102 */ {__glXDisp_ConvolutionFilter2D, __glXDispSwap_ConvolutionFilter2D}, - /* [ 271] = 4103 */ {__glXDisp_ConvolutionParameterf, __glXDispSwap_ConvolutionParameterf}, - /* [ 272] = 4104 */ {__glXDisp_ConvolutionParameterfv, __glXDispSwap_ConvolutionParameterfv}, - /* [ 273] = 4105 */ {__glXDisp_ConvolutionParameteri, __glXDispSwap_ConvolutionParameteri}, - /* [ 274] = 4106 */ {__glXDisp_ConvolutionParameteriv, __glXDispSwap_ConvolutionParameteriv}, - /* [ 275] = 4107 */ {__glXDisp_CopyConvolutionFilter1D, __glXDispSwap_CopyConvolutionFilter1D}, - /* [ 276] = 4108 */ {__glXDisp_CopyConvolutionFilter2D, __glXDispSwap_CopyConvolutionFilter2D}, - /* [ 277] = 4109 */ {__glXDisp_SeparableFilter2D, __glXDispSwap_SeparableFilter2D}, - /* [ 278] = 4110 */ {__glXDisp_Histogram, __glXDispSwap_Histogram}, - /* [ 279] = 4111 */ {__glXDisp_Minmax, __glXDispSwap_Minmax}, - /* [ 280] = 4112 */ {__glXDisp_ResetHistogram, __glXDispSwap_ResetHistogram}, - /* [ 281] = 4113 */ {__glXDisp_ResetMinmax, __glXDispSwap_ResetMinmax}, - /* [ 282] = 4114 */ {__glXDisp_TexImage3D, __glXDispSwap_TexImage3D}, - /* [ 283] = 4115 */ {__glXDisp_TexSubImage3D, __glXDispSwap_TexSubImage3D}, - /* [ 284] = 4116 */ {NULL, NULL}, - /* [ 285] = 4117 */ {__glXDisp_BindTexture, __glXDispSwap_BindTexture}, - /* [ 286] = 4118 */ {__glXDisp_PrioritizeTextures, __glXDispSwap_PrioritizeTextures}, - /* [ 287] = 4119 */ {__glXDisp_CopyTexImage1D, __glXDispSwap_CopyTexImage1D}, - /* [ 288] = 4120 */ {__glXDisp_CopyTexImage2D, __glXDispSwap_CopyTexImage2D}, - /* [ 289] = 4121 */ {__glXDisp_CopyTexSubImage1D, __glXDispSwap_CopyTexSubImage1D}, - /* [ 290] = 4122 */ {__glXDisp_CopyTexSubImage2D, __glXDispSwap_CopyTexSubImage2D}, - /* [ 291] = 4123 */ {__glXDisp_CopyTexSubImage3D, __glXDispSwap_CopyTexSubImage3D}, - /* [ 292] = 4124 */ {__glXDisp_FogCoordfvEXT, __glXDispSwap_FogCoordfvEXT}, - /* [ 293] = 4125 */ {__glXDisp_FogCoorddvEXT, __glXDispSwap_FogCoorddvEXT}, - /* [ 294] = 4126 */ {__glXDisp_SecondaryColor3bvEXT, __glXDispSwap_SecondaryColor3bvEXT}, - /* [ 295] = 4127 */ {__glXDisp_SecondaryColor3svEXT, __glXDispSwap_SecondaryColor3svEXT}, - /* [ 296] = 4176 */ {NULL, NULL}, - /* [ 297] = 4177 */ {NULL, NULL}, - /* [ 298] = 4178 */ {NULL, NULL}, - /* [ 299] = 4179 */ {NULL, NULL}, - /* [ 300] = 4180 */ {__glXDisp_BindProgramNV, __glXDispSwap_BindProgramNV}, - /* [ 301] = 4181 */ {__glXDisp_ExecuteProgramNV, __glXDispSwap_ExecuteProgramNV}, - /* [ 302] = 4182 */ {__glXDisp_RequestResidentProgramsNV, __glXDispSwap_RequestResidentProgramsNV}, - /* [ 303] = 4183 */ {__glXDisp_LoadProgramNV, __glXDispSwap_LoadProgramNV}, - /* [ 304] = 4184 */ {__glXDisp_ProgramEnvParameter4fvARB, __glXDispSwap_ProgramEnvParameter4fvARB}, - /* [ 305] = 4185 */ {__glXDisp_ProgramEnvParameter4dvARB, __glXDispSwap_ProgramEnvParameter4dvARB}, - /* [ 306] = 4186 */ {__glXDisp_ProgramParameters4fvNV, __glXDispSwap_ProgramParameters4fvNV}, - /* [ 307] = 4187 */ {__glXDisp_ProgramParameters4dvNV, __glXDispSwap_ProgramParameters4dvNV}, - /* [ 308] = 4188 */ {__glXDisp_TrackMatrixNV, __glXDispSwap_TrackMatrixNV}, - /* [ 309] = 4189 */ {__glXDisp_VertexAttrib1svARB, __glXDispSwap_VertexAttrib1svARB}, - /* [ 310] = 4190 */ {__glXDisp_VertexAttrib2svARB, __glXDispSwap_VertexAttrib2svARB}, - /* [ 311] = 4191 */ {__glXDisp_VertexAttrib3svARB, __glXDispSwap_VertexAttrib3svARB}, - /* [ 312] = 4192 */ {__glXDisp_VertexAttrib4svARB, __glXDispSwap_VertexAttrib4svARB}, - /* [ 313] = 4193 */ {__glXDisp_VertexAttrib1fvARB, __glXDispSwap_VertexAttrib1fvARB}, - /* [ 314] = 4194 */ {__glXDisp_VertexAttrib2fvARB, __glXDispSwap_VertexAttrib2fvARB}, - /* [ 315] = 4195 */ {__glXDisp_VertexAttrib3fvARB, __glXDispSwap_VertexAttrib3fvARB}, - /* [ 316] = 4196 */ {__glXDisp_VertexAttrib4fvARB, __glXDispSwap_VertexAttrib4fvARB}, - /* [ 317] = 4197 */ {__glXDisp_VertexAttrib1dvARB, __glXDispSwap_VertexAttrib1dvARB}, - /* [ 318] = 4198 */ {__glXDisp_VertexAttrib2dvARB, __glXDispSwap_VertexAttrib2dvARB}, - /* [ 319] = 4199 */ {__glXDisp_VertexAttrib3dvARB, __glXDispSwap_VertexAttrib3dvARB}, - /* [ 320] = 4200 */ {__glXDisp_VertexAttrib4dvARB, __glXDispSwap_VertexAttrib4dvARB}, - /* [ 321] = 4201 */ {__glXDisp_VertexAttrib4NubvARB, __glXDispSwap_VertexAttrib4NubvARB}, - /* [ 322] = 4202 */ {__glXDisp_VertexAttribs1svNV, __glXDispSwap_VertexAttribs1svNV}, - /* [ 323] = 4203 */ {__glXDisp_VertexAttribs2svNV, __glXDispSwap_VertexAttribs2svNV}, - /* [ 324] = 4204 */ {__glXDisp_VertexAttribs3svNV, __glXDispSwap_VertexAttribs3svNV}, - /* [ 325] = 4205 */ {__glXDisp_VertexAttribs4svNV, __glXDispSwap_VertexAttribs4svNV}, - /* [ 326] = 4206 */ {__glXDisp_VertexAttribs1fvNV, __glXDispSwap_VertexAttribs1fvNV}, - /* [ 327] = 4207 */ {__glXDisp_VertexAttribs2fvNV, __glXDispSwap_VertexAttribs2fvNV}, - /* [ 328] = 4208 */ {__glXDisp_VertexAttribs3fvNV, __glXDispSwap_VertexAttribs3fvNV}, - /* [ 329] = 4209 */ {__glXDisp_VertexAttribs4fvNV, __glXDispSwap_VertexAttribs4fvNV}, - /* [ 330] = 4210 */ {__glXDisp_VertexAttribs1dvNV, __glXDispSwap_VertexAttribs1dvNV}, - /* [ 331] = 4211 */ {__glXDisp_VertexAttribs2dvNV, __glXDispSwap_VertexAttribs2dvNV}, - /* [ 332] = 4212 */ {__glXDisp_VertexAttribs3dvNV, __glXDispSwap_VertexAttribs3dvNV}, - /* [ 333] = 4213 */ {__glXDisp_VertexAttribs4dvNV, __glXDispSwap_VertexAttribs4dvNV}, - /* [ 334] = 4214 */ {__glXDisp_VertexAttribs4ubvNV, __glXDispSwap_VertexAttribs4ubvNV}, - /* [ 335] = 4215 */ {__glXDisp_ProgramLocalParameter4fvARB, __glXDispSwap_ProgramLocalParameter4fvARB}, - /* [ 336] = 4216 */ {__glXDisp_ProgramLocalParameter4dvARB, __glXDispSwap_ProgramLocalParameter4dvARB}, - /* [ 337] = 4217 */ {__glXDisp_ProgramStringARB, __glXDispSwap_ProgramStringARB}, - /* [ 338] = 4218 */ {__glXDisp_ProgramNamedParameter4fvNV, __glXDispSwap_ProgramNamedParameter4fvNV}, - /* [ 339] = 4219 */ {__glXDisp_ProgramNamedParameter4dvNV, __glXDispSwap_ProgramNamedParameter4dvNV}, - /* [ 340] = 4220 */ {__glXDisp_ActiveStencilFaceEXT, __glXDispSwap_ActiveStencilFaceEXT}, - /* [ 341] = 4221 */ {__glXDisp_PointParameteriNV, __glXDispSwap_PointParameteriNV}, - /* [ 342] = 4222 */ {__glXDisp_PointParameterivNV, __glXDispSwap_PointParameterivNV}, - /* [ 343] = 4223 */ {NULL, NULL}, - /* [ 344] = 4224 */ {NULL, NULL}, - /* [ 345] = 4225 */ {NULL, NULL}, - /* [ 346] = 4226 */ {NULL, NULL}, - /* [ 347] = 4227 */ {NULL, NULL}, - /* [ 348] = 4228 */ {__glXDisp_BlendEquationSeparateEXT, __glXDispSwap_BlendEquationSeparateEXT}, - /* [ 349] = 4229 */ {NULL, NULL}, - /* [ 350] = 4230 */ {__glXDisp_VertexAttrib4bvARB, __glXDispSwap_VertexAttrib4bvARB}, - /* [ 351] = 4231 */ {__glXDisp_VertexAttrib4ivARB, __glXDispSwap_VertexAttrib4ivARB}, - /* [ 352] = 4232 */ {__glXDisp_VertexAttrib4ubvARB, __glXDispSwap_VertexAttrib4ubvARB}, - /* [ 353] = 4233 */ {__glXDisp_VertexAttrib4usvARB, __glXDispSwap_VertexAttrib4usvARB}, - /* [ 354] = 4234 */ {__glXDisp_VertexAttrib4uivARB, __glXDispSwap_VertexAttrib4uivARB}, - /* [ 355] = 4235 */ {__glXDisp_VertexAttrib4NbvARB, __glXDispSwap_VertexAttrib4NbvARB}, - /* [ 356] = 4236 */ {__glXDisp_VertexAttrib4NsvARB, __glXDispSwap_VertexAttrib4NsvARB}, - /* [ 357] = 4237 */ {__glXDisp_VertexAttrib4NivARB, __glXDispSwap_VertexAttrib4NivARB}, - /* [ 358] = 4238 */ {__glXDisp_VertexAttrib4NusvARB, __glXDispSwap_VertexAttrib4NusvARB}, - /* [ 359] = 4239 */ {__glXDisp_VertexAttrib4NuivARB, __glXDispSwap_VertexAttrib4NuivARB}, - /* [ 360] = 4128 */ {__glXDisp_SecondaryColor3ivEXT, __glXDispSwap_SecondaryColor3ivEXT}, - /* [ 361] = 4129 */ {__glXDisp_SecondaryColor3fvEXT, __glXDispSwap_SecondaryColor3fvEXT}, - /* [ 362] = 4130 */ {__glXDisp_SecondaryColor3dvEXT, __glXDispSwap_SecondaryColor3dvEXT}, - /* [ 363] = 4131 */ {__glXDisp_SecondaryColor3ubvEXT, __glXDispSwap_SecondaryColor3ubvEXT}, - /* [ 364] = 4132 */ {__glXDisp_SecondaryColor3usvEXT, __glXDispSwap_SecondaryColor3usvEXT}, - /* [ 365] = 4133 */ {__glXDisp_SecondaryColor3uivEXT, __glXDispSwap_SecondaryColor3uivEXT}, - /* [ 366] = 4134 */ {__glXDisp_BlendFuncSeparateEXT, __glXDispSwap_BlendFuncSeparateEXT}, - /* [ 367] = 4135 */ {NULL, NULL}, - /* [ 368] = 4264 */ {NULL, NULL}, - /* [ 369] = 4265 */ {__glXDisp_VertexAttrib1svNV, __glXDispSwap_VertexAttrib1svNV}, - /* [ 370] = 4266 */ {__glXDisp_VertexAttrib2svNV, __glXDispSwap_VertexAttrib2svNV}, - /* [ 371] = 4267 */ {__glXDisp_VertexAttrib3svNV, __glXDispSwap_VertexAttrib3svNV}, - /* [ 372] = 4268 */ {__glXDisp_VertexAttrib4svNV, __glXDispSwap_VertexAttrib4svNV}, - /* [ 373] = 4269 */ {__glXDisp_VertexAttrib1fvNV, __glXDispSwap_VertexAttrib1fvNV}, - /* [ 374] = 4270 */ {__glXDisp_VertexAttrib2fvNV, __glXDispSwap_VertexAttrib2fvNV}, - /* [ 375] = 4271 */ {__glXDisp_VertexAttrib3fvNV, __glXDispSwap_VertexAttrib3fvNV}, - /* [ 376] = 4272 */ {__glXDisp_VertexAttrib4fvNV, __glXDispSwap_VertexAttrib4fvNV}, - /* [ 377] = 4273 */ {__glXDisp_VertexAttrib1dvNV, __glXDispSwap_VertexAttrib1dvNV}, - /* [ 378] = 4274 */ {__glXDisp_VertexAttrib2dvNV, __glXDispSwap_VertexAttrib2dvNV}, - /* [ 379] = 4275 */ {__glXDisp_VertexAttrib3dvNV, __glXDispSwap_VertexAttrib3dvNV}, - /* [ 380] = 4276 */ {__glXDisp_VertexAttrib4dvNV, __glXDispSwap_VertexAttrib4dvNV}, - /* [ 381] = 4277 */ {__glXDisp_VertexAttrib4ubvNV, __glXDispSwap_VertexAttrib4ubvNV}, - /* [ 382] = 4278 */ {NULL, NULL}, - /* [ 383] = 4279 */ {NULL, NULL}, - /* [ 384] = 4312 */ {NULL, NULL}, - /* [ 385] = 4313 */ {NULL, NULL}, - /* [ 386] = 4314 */ {NULL, NULL}, - /* [ 387] = 4315 */ {NULL, NULL}, - /* [ 388] = 4316 */ {__glXDisp_BindRenderbufferEXT, __glXDispSwap_BindRenderbufferEXT}, - /* [ 389] = 4317 */ {__glXDisp_DeleteRenderbuffersEXT, __glXDispSwap_DeleteRenderbuffersEXT}, - /* [ 390] = 4318 */ {__glXDisp_RenderbufferStorageEXT, __glXDispSwap_RenderbufferStorageEXT}, - /* [ 391] = 4319 */ {__glXDisp_BindFramebufferEXT, __glXDispSwap_BindFramebufferEXT}, - /* [ 392] = 4320 */ {__glXDisp_DeleteFramebuffersEXT, __glXDispSwap_DeleteFramebuffersEXT}, - /* [ 393] = 4321 */ {__glXDisp_FramebufferTexture1DEXT, __glXDispSwap_FramebufferTexture1DEXT}, - /* [ 394] = 4322 */ {__glXDisp_FramebufferTexture2DEXT, __glXDispSwap_FramebufferTexture2DEXT}, - /* [ 395] = 4323 */ {__glXDisp_FramebufferTexture3DEXT, __glXDispSwap_FramebufferTexture3DEXT}, - /* [ 396] = 4324 */ {__glXDisp_FramebufferRenderbufferEXT, __glXDispSwap_FramebufferRenderbufferEXT}, - /* [ 397] = 4325 */ {__glXDisp_GenerateMipmapEXT, __glXDispSwap_GenerateMipmapEXT}, - /* [ 398] = 4326 */ {NULL, NULL}, - /* [ 399] = 4327 */ {NULL, NULL}, -}; - -static const int_fast16_t Render_size_table[400][2] = { - /* [ 0] = 0 */ { 0, ~0}, - /* [ 1] = 1 */ { 8, ~0}, - /* [ 2] = 2 */ { 12, 0}, - /* [ 3] = 3 */ { 8, ~0}, - /* [ 4] = 4 */ { 8, ~0}, - /* [ 5] = 5 */ { 48, 1}, - /* [ 6] = 6 */ { 8, ~0}, - /* [ 7] = 7 */ { 28, ~0}, - /* [ 8] = 8 */ { 16, ~0}, - /* [ 9] = 9 */ { 16, ~0}, - /* [ 10] = 10 */ { 12, ~0}, - /* [ 11] = 11 */ { 8, ~0}, - /* [ 12] = 12 */ { 16, ~0}, - /* [ 13] = 13 */ { 12, ~0}, - /* [ 14] = 14 */ { 8, ~0}, - /* [ 15] = 15 */ { 36, ~0}, - /* [ 16] = 16 */ { 20, ~0}, - /* [ 17] = 17 */ { 20, ~0}, - /* [ 18] = 18 */ { 12, ~0}, - /* [ 19] = 19 */ { 8, ~0}, - /* [ 20] = 20 */ { 20, ~0}, - /* [ 21] = 21 */ { 12, ~0}, - /* [ 22] = 22 */ { 8, ~0}, - /* [ 23] = 23 */ { 4, ~0}, - /* [ 24] = 24 */ { 12, ~0}, - /* [ 25] = 25 */ { 8, ~0}, - /* [ 26] = 26 */ { 8, ~0}, - /* [ 27] = 27 */ { 8, ~0}, - /* [ 28] = 28 */ { 8, ~0}, - /* [ 29] = 29 */ { 28, ~0}, - /* [ 30] = 30 */ { 16, ~0}, - /* [ 31] = 31 */ { 16, ~0}, - /* [ 32] = 32 */ { 12, ~0}, - /* [ 33] = 33 */ { 20, ~0}, - /* [ 34] = 34 */ { 12, ~0}, - /* [ 35] = 35 */ { 12, ~0}, - /* [ 36] = 36 */ { 8, ~0}, - /* [ 37] = 37 */ { 28, ~0}, - /* [ 38] = 38 */ { 16, ~0}, - /* [ 39] = 39 */ { 16, ~0}, - /* [ 40] = 40 */ { 12, ~0}, - /* [ 41] = 41 */ { 36, ~0}, - /* [ 42] = 42 */ { 20, ~0}, - /* [ 43] = 43 */ { 20, ~0}, - /* [ 44] = 44 */ { 12, ~0}, - /* [ 45] = 45 */ { 36, ~0}, - /* [ 46] = 46 */ { 20, ~0}, - /* [ 47] = 47 */ { 20, ~0}, - /* [ 48] = 48 */ { 12, ~0}, - /* [ 49] = 49 */ { 12, ~0}, - /* [ 50] = 50 */ { 8, ~0}, - /* [ 51] = 51 */ { 8, ~0}, - /* [ 52] = 52 */ { 8, ~0}, - /* [ 53] = 53 */ { 20, ~0}, - /* [ 54] = 54 */ { 12, ~0}, - /* [ 55] = 55 */ { 12, ~0}, - /* [ 56] = 56 */ { 8, ~0}, - /* [ 57] = 57 */ { 28, ~0}, - /* [ 58] = 58 */ { 16, ~0}, - /* [ 59] = 59 */ { 16, ~0}, - /* [ 60] = 60 */ { 12, ~0}, - /* [ 61] = 61 */ { 36, ~0}, - /* [ 62] = 62 */ { 20, ~0}, - /* [ 63] = 63 */ { 20, ~0}, - /* [ 64] = 64 */ { 12, ~0}, - /* [ 65] = 65 */ { 20, ~0}, - /* [ 66] = 66 */ { 12, ~0}, - /* [ 67] = 67 */ { 12, ~0}, - /* [ 68] = 68 */ { 8, ~0}, - /* [ 69] = 69 */ { 28, ~0}, - /* [ 70] = 70 */ { 16, ~0}, - /* [ 71] = 71 */ { 16, ~0}, - /* [ 72] = 72 */ { 12, ~0}, - /* [ 73] = 73 */ { 36, ~0}, - /* [ 74] = 74 */ { 20, ~0}, - /* [ 75] = 75 */ { 20, ~0}, - /* [ 76] = 76 */ { 12, ~0}, - /* [ 77] = 77 */ { 40, ~0}, - /* [ 78] = 78 */ { 12, ~0}, - /* [ 79] = 79 */ { 8, ~0}, - /* [ 80] = 80 */ { 12, ~0}, - /* [ 81] = 81 */ { 8, 2}, - /* [ 82] = 82 */ { 12, ~0}, - /* [ 83] = 83 */ { 8, 3}, - /* [ 84] = 84 */ { 8, ~0}, - /* [ 85] = 85 */ { 12, ~0}, - /* [ 86] = 86 */ { 16, ~0}, - /* [ 87] = 87 */ { 12, 4}, - /* [ 88] = 88 */ { 16, ~0}, - /* [ 89] = 89 */ { 12, 5}, - /* [ 90] = 90 */ { 12, ~0}, - /* [ 91] = 91 */ { 8, 6}, - /* [ 92] = 92 */ { 12, ~0}, - /* [ 93] = 93 */ { 8, 7}, - /* [ 94] = 94 */ { 12, ~0}, - /* [ 95] = 95 */ { 8, ~0}, - /* [ 96] = 96 */ { 16, ~0}, - /* [ 97] = 97 */ { 12, 8}, - /* [ 98] = 98 */ { 16, ~0}, - /* [ 99] = 99 */ { 12, 9}, - /* [100] = 100 */ { 8, ~0}, - /* [101] = 101 */ { 12, ~0}, - /* [102] = 102 */ { 24, 10}, - /* [103] = 103 */ { 20, ~0}, - /* [104] = 104 */ { 8, ~0}, - /* [105] = 105 */ { 16, ~0}, - /* [106] = 106 */ { 12, 11}, - /* [107] = 107 */ { 16, ~0}, - /* [108] = 108 */ { 12, 12}, - /* [109] = 109 */ { 56, 13}, - /* [110] = 110 */ { 56, 14}, - /* [111] = 111 */ { 16, ~0}, - /* [112] = 112 */ { 12, 15}, - /* [113] = 113 */ { 16, ~0}, - /* [114] = 114 */ { 12, 16}, - /* [115] = 115 */ { 20, ~0}, - /* [116] = 116 */ { 12, 17}, - /* [117] = 117 */ { 16, ~0}, - /* [118] = 118 */ { 12, 18}, - /* [119] = 119 */ { 16, ~0}, - /* [120] = 120 */ { 12, 19}, - /* [121] = 121 */ { 4, ~0}, - /* [122] = 122 */ { 8, ~0}, - /* [123] = 123 */ { 8, ~0}, - /* [124] = 124 */ { 4, ~0}, - /* [125] = 125 */ { 8, ~0}, - /* [126] = 126 */ { 8, ~0}, - /* [127] = 127 */ { 8, ~0}, - /* [128] = 128 */ { 20, ~0}, - /* [129] = 129 */ { 8, ~0}, - /* [130] = 130 */ { 20, ~0}, - /* [131] = 131 */ { 8, ~0}, - /* [132] = 132 */ { 12, ~0}, - /* [133] = 133 */ { 8, ~0}, - /* [134] = 134 */ { 8, ~0}, - /* [135] = 135 */ { 8, ~0}, - /* [136] = 136 */ { 8, ~0}, - /* [137] = 137 */ { 12, ~0}, - /* [138] = 138 */ { 8, ~0}, - /* [139] = 139 */ { 8, ~0}, - /* [140] = 140 */ { 0, ~0}, - /* [141] = 141 */ { 4, ~0}, - /* [142] = 142 */ { 8, ~0}, - /* [143] = 143 */ { 28, 20}, - /* [144] = 144 */ { 20, 21}, - /* [145] = 145 */ { 48, 22}, - /* [146] = 146 */ { 32, 23}, - /* [147] = 147 */ { 24, ~0}, - /* [148] = 148 */ { 16, ~0}, - /* [149] = 149 */ { 44, ~0}, - /* [150] = 150 */ { 28, ~0}, - /* [151] = 151 */ { 12, ~0}, - /* [152] = 152 */ { 8, ~0}, - /* [153] = 153 */ { 20, ~0}, - /* [154] = 154 */ { 12, ~0}, - /* [155] = 155 */ { 16, ~0}, - /* [156] = 156 */ { 8, ~0}, - /* [157] = 157 */ { 24, ~0}, - /* [158] = 158 */ { 12, ~0}, - /* [159] = 159 */ { 12, ~0}, - /* [160] = 160 */ { 12, ~0}, - /* [161] = 161 */ { 8, ~0}, - /* [162] = 162 */ { 16, ~0}, - /* [163] = 163 */ { 16, ~0}, - /* [164] = 164 */ { 8, ~0}, - /* [165] = 165 */ { 12, ~0}, - /* [166] = 166 */ { 12, ~0}, - /* [167] = 167 */ { 12, ~0}, - /* [168] = 168 */ { 12, 24}, - /* [169] = 169 */ { 12, 25}, - /* [170] = 170 */ { 12, 26}, - /* [171] = 171 */ { 8, ~0}, - /* [172] = 172 */ { 24, ~0}, - /* [173] = 173 */ { 40, 27}, - /* [174] = 174 */ { 20, ~0}, - /* [175] = 175 */ { 52, ~0}, - /* [176] = 176 */ { 4, ~0}, - /* [177] = 177 */ { 68, ~0}, - /* [178] = 178 */ {132, ~0}, - /* [179] = 179 */ { 8, ~0}, - /* [180] = 180 */ { 68, ~0}, - /* [181] = 181 */ {132, ~0}, - /* [182] = 182 */ { 52, ~0}, - /* [183] = 183 */ { 4, ~0}, - /* [184] = 184 */ { 4, ~0}, - /* [185] = 185 */ { 36, ~0}, - /* [186] = 186 */ { 20, ~0}, - /* [187] = 187 */ { 28, ~0}, - /* [188] = 188 */ { 16, ~0}, - /* [189] = 189 */ { 28, ~0}, - /* [190] = 190 */ { 16, ~0}, - /* [191] = 191 */ { 20, ~0}, - /* [192] = 192 */ { 12, ~0}, - /* [193] = 193 */ { 16, 28}, - /* [194] = 194 */ { 8, ~0}, - /* [195] = 195 */ { 44, 29}, - /* [196] = 196 */ { 24, ~0}, - /* [197] = 197 */ { 8, ~0}, - /* [198] = 198 */ { 16, ~0}, - /* [199] = 199 */ { 12, ~0}, - /* [200] = 200 */ { 12, ~0}, - /* [201] = 201 */ { 12, ~0}, - /* [202] = 202 */ { 24, ~0}, - /* [203] = 203 */ { 16, ~0}, - /* [204] = 204 */ { 16, ~0}, - /* [205] = 205 */ { 12, ~0}, - /* [206] = 206 */ { 32, ~0}, - /* [207] = 207 */ { 20, ~0}, - /* [208] = 208 */ { 20, ~0}, - /* [209] = 209 */ { 16, ~0}, - /* [210] = 210 */ { 40, ~0}, - /* [211] = 211 */ { 24, ~0}, - /* [212] = 212 */ { 24, ~0}, - /* [213] = 213 */ { 16, ~0}, - /* [214] = 214 */ { 28, 30}, - /* [215] = 215 */ { 32, 31}, - /* [216] = 216 */ { 36, 32}, - /* [217] = 217 */ { 28, 33}, - /* [218] = 218 */ { 36, 34}, - /* [219] = 219 */ { 44, 35}, - /* [220] = 220 */ { 0, ~0}, - /* [221] = 221 */ { 0, ~0}, - /* [222] = 222 */ { 0, ~0}, - /* [223] = 223 */ { 0, ~0}, - /* [224] = 224 */ { 0, ~0}, - /* [225] = 225 */ { 0, ~0}, - /* [226] = 226 */ { 0, ~0}, - /* [227] = 227 */ { 0, ~0}, - /* [228] = 228 */ { 0, ~0}, - /* [229] = 229 */ { 12, ~0}, - /* [230] = 230 */ { 16, ~0}, - /* [231] = 231 */ { 12, ~0}, - /* [232] = 232 */ { 8, ~0}, - /* [233] = 233 */ { 8, 36}, - /* [234] = 234 */ { 0, ~0}, - /* [235] = 235 */ { 0, ~0}, - /* [236] = 236 */ { 0, ~0}, - /* [237] = 237 */ { 0, ~0}, - /* [238] = 238 */ { 0, ~0}, - /* [239] = 239 */ { 0, ~0}, - /* [240] = 2048 */ { 12, ~0}, - /* [241] = 2049 */ { 8, ~0}, - /* [242] = 2050 */ { 0, ~0}, - /* [243] = 2051 */ { 0, ~0}, - /* [244] = 2052 */ { 0, ~0}, - /* [245] = 2053 */ { 44, 37}, - /* [246] = 2054 */ { 12, 38}, - /* [247] = 2055 */ { 12, 39}, - /* [248] = 2056 */ { 24, ~0}, - /* [249] = 2057 */ { 0, ~0}, - /* [250] = 2058 */ { 0, ~0}, - /* [251] = 2059 */ { 0, ~0}, - /* [252] = 2060 */ { 0, ~0}, - /* [253] = 2061 */ { 0, ~0}, - /* [254] = 2062 */ { 0, ~0}, - /* [255] = 2063 */ { 0, ~0}, - /* [256] = 2064 */ { 0, ~0}, - /* [257] = 2065 */ { 12, ~0}, - /* [258] = 2066 */ { 8, 40}, - /* [259] = 2067 */ { 0, ~0}, - /* [260] = 2068 */ { 0, ~0}, - /* [261] = 2069 */ { 0, ~0}, - /* [262] = 2070 */ { 0, ~0}, - /* [263] = 2071 */ { 0, ~0}, - /* [264] = 4096 */ { 20, ~0}, - /* [265] = 4097 */ { 8, ~0}, - /* [266] = 4098 */ { 0, ~0}, - /* [267] = 4099 */ { 60, 41}, - /* [268] = 4100 */ { 60, 42}, - /* [269] = 4101 */ { 48, 43}, - /* [270] = 4102 */ { 48, 44}, - /* [271] = 4103 */ { 16, ~0}, - /* [272] = 4104 */ { 12, 45}, - /* [273] = 4105 */ { 16, ~0}, - /* [274] = 4106 */ { 12, 46}, - /* [275] = 4107 */ { 24, ~0}, - /* [276] = 4108 */ { 28, ~0}, - /* [277] = 4109 */ { 32, 47}, - /* [278] = 4110 */ { 20, ~0}, - /* [279] = 4111 */ { 16, ~0}, - /* [280] = 4112 */ { 8, ~0}, - /* [281] = 4113 */ { 8, ~0}, - /* [282] = 4114 */ { 84, 48}, - /* [283] = 4115 */ { 92, 49}, - /* [284] = 4116 */ { 0, ~0}, - /* [285] = 4117 */ { 12, ~0}, - /* [286] = 4118 */ { 8, 50}, - /* [287] = 4119 */ { 32, ~0}, - /* [288] = 4120 */ { 36, ~0}, - /* [289] = 4121 */ { 28, ~0}, - /* [290] = 4122 */ { 36, ~0}, - /* [291] = 4123 */ { 40, ~0}, - /* [292] = 4124 */ { 8, ~0}, - /* [293] = 4125 */ { 12, ~0}, - /* [294] = 4126 */ { 8, ~0}, - /* [295] = 4127 */ { 12, ~0}, - /* [296] = 4176 */ { 0, ~0}, - /* [297] = 4177 */ { 0, ~0}, - /* [298] = 4178 */ { 0, ~0}, - /* [299] = 4179 */ { 0, ~0}, - /* [300] = 4180 */ { 12, ~0}, - /* [301] = 4181 */ { 28, ~0}, - /* [302] = 4182 */ { 8, 51}, - /* [303] = 4183 */ { 16, 52}, - /* [304] = 4184 */ { 28, ~0}, - /* [305] = 4185 */ { 44, ~0}, - /* [306] = 4186 */ { 16, 53}, - /* [307] = 4187 */ { 16, 54}, - /* [308] = 4188 */ { 20, ~0}, - /* [309] = 4189 */ { 12, ~0}, - /* [310] = 4190 */ { 12, ~0}, - /* [311] = 4191 */ { 16, ~0}, - /* [312] = 4192 */ { 16, ~0}, - /* [313] = 4193 */ { 12, ~0}, - /* [314] = 4194 */ { 16, ~0}, - /* [315] = 4195 */ { 20, ~0}, - /* [316] = 4196 */ { 24, ~0}, - /* [317] = 4197 */ { 16, ~0}, - /* [318] = 4198 */ { 24, ~0}, - /* [319] = 4199 */ { 32, ~0}, - /* [320] = 4200 */ { 40, ~0}, - /* [321] = 4201 */ { 12, ~0}, - /* [322] = 4202 */ { 12, 55}, - /* [323] = 4203 */ { 12, 56}, - /* [324] = 4204 */ { 12, 57}, - /* [325] = 4205 */ { 12, 58}, - /* [326] = 4206 */ { 12, 59}, - /* [327] = 4207 */ { 12, 60}, - /* [328] = 4208 */ { 12, 61}, - /* [329] = 4209 */ { 12, 62}, - /* [330] = 4210 */ { 12, 63}, - /* [331] = 4211 */ { 12, 64}, - /* [332] = 4212 */ { 12, 65}, - /* [333] = 4213 */ { 12, 66}, - /* [334] = 4214 */ { 12, 67}, - /* [335] = 4215 */ { 28, ~0}, - /* [336] = 4216 */ { 44, ~0}, - /* [337] = 4217 */ { 16, 68}, - /* [338] = 4218 */ { 28, 69}, - /* [339] = 4219 */ { 44, 70}, - /* [340] = 4220 */ { 8, ~0}, - /* [341] = 4221 */ { 12, ~0}, - /* [342] = 4222 */ { 8, 71}, - /* [343] = 4223 */ { 0, ~0}, - /* [344] = 4224 */ { 0, ~0}, - /* [345] = 4225 */ { 0, ~0}, - /* [346] = 4226 */ { 0, ~0}, - /* [347] = 4227 */ { 0, ~0}, - /* [348] = 4228 */ { 12, ~0}, - /* [349] = 4229 */ { 0, ~0}, - /* [350] = 4230 */ { 12, ~0}, - /* [351] = 4231 */ { 24, ~0}, - /* [352] = 4232 */ { 12, ~0}, - /* [353] = 4233 */ { 16, ~0}, - /* [354] = 4234 */ { 24, ~0}, - /* [355] = 4235 */ { 12, ~0}, - /* [356] = 4236 */ { 16, ~0}, - /* [357] = 4237 */ { 24, ~0}, - /* [358] = 4238 */ { 16, ~0}, - /* [359] = 4239 */ { 24, ~0}, - /* [360] = 4128 */ { 16, ~0}, - /* [361] = 4129 */ { 16, ~0}, - /* [362] = 4130 */ { 28, ~0}, - /* [363] = 4131 */ { 8, ~0}, - /* [364] = 4132 */ { 12, ~0}, - /* [365] = 4133 */ { 16, ~0}, - /* [366] = 4134 */ { 20, ~0}, - /* [367] = 4135 */ { 0, ~0}, - /* [368] = 4264 */ { 0, ~0}, - /* [369] = 4265 */ { 12, ~0}, - /* [370] = 4266 */ { 12, ~0}, - /* [371] = 4267 */ { 16, ~0}, - /* [372] = 4268 */ { 16, ~0}, - /* [373] = 4269 */ { 12, ~0}, - /* [374] = 4270 */ { 16, ~0}, - /* [375] = 4271 */ { 20, ~0}, - /* [376] = 4272 */ { 24, ~0}, - /* [377] = 4273 */ { 16, ~0}, - /* [378] = 4274 */ { 24, ~0}, - /* [379] = 4275 */ { 32, ~0}, - /* [380] = 4276 */ { 40, ~0}, - /* [381] = 4277 */ { 12, ~0}, - /* [382] = 4278 */ { 0, ~0}, - /* [383] = 4279 */ { 0, ~0}, - /* [384] = 4312 */ { 0, ~0}, - /* [385] = 4313 */ { 0, ~0}, - /* [386] = 4314 */ { 0, ~0}, - /* [387] = 4315 */ { 0, ~0}, - /* [388] = 4316 */ { 12, ~0}, - /* [389] = 4317 */ { 8, 72}, - /* [390] = 4318 */ { 20, ~0}, - /* [391] = 4319 */ { 12, ~0}, - /* [392] = 4320 */ { 8, 73}, - /* [393] = 4321 */ { 24, ~0}, - /* [394] = 4322 */ { 24, ~0}, - /* [395] = 4323 */ { 28, ~0}, - /* [396] = 4324 */ { 20, ~0}, - /* [397] = 4325 */ { 8, ~0}, - /* [398] = 4326 */ { 0, ~0}, - /* [399] = 4327 */ { 0, ~0}, -}; - -static const gl_proto_size_func Render_size_func_table[74] = { - __glXCallListsReqSize, - __glXBitmapReqSize, - __glXFogfvReqSize, - __glXFogivReqSize, - __glXLightfvReqSize, - __glXLightivReqSize, - __glXLightModelfvReqSize, - __glXLightModelivReqSize, - __glXMaterialfvReqSize, - __glXMaterialivReqSize, - __glXPolygonStippleReqSize, - __glXTexParameterfvReqSize, - __glXTexParameterivReqSize, - __glXTexImage1DReqSize, - __glXTexImage2DReqSize, - __glXTexEnvfvReqSize, - __glXTexEnvivReqSize, - __glXTexGendvReqSize, - __glXTexGenfvReqSize, - __glXTexGenivReqSize, - __glXMap1dReqSize, - __glXMap1fReqSize, - __glXMap2dReqSize, - __glXMap2fReqSize, - __glXPixelMapfvReqSize, - __glXPixelMapuivReqSize, - __glXPixelMapusvReqSize, - __glXDrawPixelsReqSize, - __glXDrawArraysReqSize, - __glXColorSubTableReqSize, - __glXCompressedTexImage1DARBReqSize, - __glXCompressedTexImage2DARBReqSize, - __glXCompressedTexImage3DARBReqSize, - __glXCompressedTexSubImage1DARBReqSize, - __glXCompressedTexSubImage2DARBReqSize, - __glXCompressedTexSubImage3DARBReqSize, - __glXDrawBuffersARBReqSize, - __glXColorTableReqSize, - __glXColorTableParameterfvReqSize, - __glXColorTableParameterivReqSize, - __glXPointParameterfvEXTReqSize, - __glXTexSubImage1DReqSize, - __glXTexSubImage2DReqSize, - __glXConvolutionFilter1DReqSize, - __glXConvolutionFilter2DReqSize, - __glXConvolutionParameterfvReqSize, - __glXConvolutionParameterivReqSize, - __glXSeparableFilter2DReqSize, - __glXTexImage3DReqSize, - __glXTexSubImage3DReqSize, - __glXPrioritizeTexturesReqSize, - __glXRequestResidentProgramsNVReqSize, - __glXLoadProgramNVReqSize, - __glXProgramParameters4fvNVReqSize, - __glXProgramParameters4dvNVReqSize, - __glXVertexAttribs1svNVReqSize, - __glXVertexAttribs2svNVReqSize, - __glXVertexAttribs3svNVReqSize, - __glXVertexAttribs4svNVReqSize, - __glXVertexAttribs1fvNVReqSize, - __glXVertexAttribs2fvNVReqSize, - __glXVertexAttribs3fvNVReqSize, - __glXVertexAttribs4fvNVReqSize, - __glXVertexAttribs1dvNVReqSize, - __glXVertexAttribs2dvNVReqSize, - __glXVertexAttribs3dvNVReqSize, - __glXVertexAttribs4dvNVReqSize, - __glXVertexAttribs4ubvNVReqSize, - __glXProgramStringARBReqSize, - __glXProgramNamedParameter4fvNVReqSize, - __glXProgramNamedParameter4dvNVReqSize, - __glXPointParameterivNVReqSize, - __glXDeleteRenderbuffersEXTReqSize, - __glXDeleteFramebuffersEXTReqSize, -}; - -const struct __glXDispatchInfo Render_dispatch_info = { - 13, - Render_dispatch_tree, - Render_function_table, - Render_size_table, - Render_size_func_table -}; - -/*****************************************************************/ -/* tree depth = 12 */ -static const int_fast16_t VendorPriv_dispatch_tree[152] = { - /* [0] -> opcode range [0, 131072], node depth 1 */ - 2, - 5, - EMPTY_LEAF, - 119, - EMPTY_LEAF, - - /* [5] -> opcode range [0, 32768], node depth 2 */ - 1, - 8, - EMPTY_LEAF, - - /* [8] -> opcode range [0, 16384], node depth 3 */ - 1, - 11, - EMPTY_LEAF, - - /* [11] -> opcode range [0, 8192], node depth 4 */ - 2, - 16, - EMPTY_LEAF, - 78, - EMPTY_LEAF, - - /* [16] -> opcode range [0, 2048], node depth 5 */ - 2, - 21, - EMPTY_LEAF, - 36, - EMPTY_LEAF, - - /* [21] -> opcode range [0, 512], node depth 6 */ - 1, - 24, - EMPTY_LEAF, - - /* [24] -> opcode range [0, 256], node depth 7 */ - 1, - 27, - EMPTY_LEAF, - - /* [27] -> opcode range [0, 128], node depth 8 */ - 1, - 30, - EMPTY_LEAF, - - /* [30] -> opcode range [0, 64], node depth 9 */ - 1, - 33, - EMPTY_LEAF, - - /* [33] -> opcode range [0, 32], node depth 10 */ - 1, - LEAF(0), - EMPTY_LEAF, - - /* [36] -> opcode range [1024, 1536], node depth 6 */ - 2, - 41, - EMPTY_LEAF, - 53, - 67, - - /* [41] -> opcode range [1024, 1152], node depth 7 */ - 1, - 44, - EMPTY_LEAF, - - /* [44] -> opcode range [1024, 1088], node depth 8 */ - 1, - 47, - EMPTY_LEAF, - - /* [47] -> opcode range [1024, 1056], node depth 9 */ - 1, - 50, - EMPTY_LEAF, - - /* [50] -> opcode range [1024, 1040], node depth 10 */ - 1, - LEAF(16), - EMPTY_LEAF, - - /* [53] -> opcode range [1280, 1408], node depth 7 */ - 1, - 56, - EMPTY_LEAF, - - /* [56] -> opcode range [1280, 1344], node depth 8 */ - 2, - 61, - LEAF(24), - EMPTY_LEAF, - 64, - - /* [61] -> opcode range [1280, 1296], node depth 9 */ - 1, - EMPTY_LEAF, - LEAF(40), - - /* [64] -> opcode range [1328, 1344], node depth 9 */ - 1, - LEAF(48), - EMPTY_LEAF, - - /* [67] -> opcode range [1408, 1536], node depth 7 */ - 1, - 70, - EMPTY_LEAF, - - /* [70] -> opcode range [1408, 1472], node depth 8 */ - 1, - 73, - EMPTY_LEAF, - - /* [73] -> opcode range [1408, 1440], node depth 9 */ - 2, - EMPTY_LEAF, - LEAF(56), - LEAF(64), - EMPTY_LEAF, - - /* [78] -> opcode range [4096, 6144], node depth 5 */ - 2, - 83, - EMPTY_LEAF, - 101, - EMPTY_LEAF, - - /* [83] -> opcode range [4096, 4608], node depth 6 */ - 1, - 86, - EMPTY_LEAF, - - /* [86] -> opcode range [4096, 4352], node depth 7 */ - 1, - 89, - EMPTY_LEAF, - - /* [89] -> opcode range [4096, 4224], node depth 8 */ - 1, - 92, - EMPTY_LEAF, - - /* [92] -> opcode range [4096, 4160], node depth 9 */ - 1, - 95, - EMPTY_LEAF, - - /* [95] -> opcode range [4096, 4128], node depth 10 */ - 1, - 98, - EMPTY_LEAF, - - /* [98] -> opcode range [4096, 4112], node depth 11 */ - 1, - LEAF(72), - EMPTY_LEAF, - - /* [101] -> opcode range [5120, 5632], node depth 6 */ - 1, - 104, - EMPTY_LEAF, - - /* [104] -> opcode range [5120, 5376], node depth 7 */ - 1, - 107, - EMPTY_LEAF, - - /* [107] -> opcode range [5120, 5248], node depth 8 */ - 1, - 110, - EMPTY_LEAF, - - /* [110] -> opcode range [5120, 5184], node depth 9 */ - 1, - EMPTY_LEAF, - 113, - - /* [113] -> opcode range [5152, 5184], node depth 10 */ - 1, - 116, - EMPTY_LEAF, - - /* [116] -> opcode range [5152, 5168], node depth 11 */ - 1, - LEAF(80), - EMPTY_LEAF, - - /* [119] -> opcode range [65536, 98304], node depth 2 */ - 1, - 122, - EMPTY_LEAF, - - /* [122] -> opcode range [65536, 81920], node depth 3 */ - 1, - 125, - EMPTY_LEAF, - - /* [125] -> opcode range [65536, 73728], node depth 4 */ - 1, - 128, - EMPTY_LEAF, - - /* [128] -> opcode range [65536, 69632], node depth 5 */ - 1, - 131, - EMPTY_LEAF, - - /* [131] -> opcode range [65536, 67584], node depth 6 */ - 1, - 134, - EMPTY_LEAF, - - /* [134] -> opcode range [65536, 66560], node depth 7 */ - 1, - 137, - EMPTY_LEAF, - - /* [137] -> opcode range [65536, 66048], node depth 8 */ - 1, - 140, - EMPTY_LEAF, - - /* [140] -> opcode range [65536, 65792], node depth 9 */ - 1, - 143, - EMPTY_LEAF, - - /* [143] -> opcode range [65536, 65664], node depth 10 */ - 1, - 146, - EMPTY_LEAF, - - /* [146] -> opcode range [65536, 65600], node depth 11 */ - 1, - 149, - EMPTY_LEAF, - - /* [149] -> opcode range [65536, 65568], node depth 12 */ - 1, - LEAF(88), - EMPTY_LEAF, - -}; - -static const void *VendorPriv_function_table[104][2] = { - /* [ 0] = 0 */ {NULL, NULL}, - /* [ 1] = 1 */ {__glXDisp_GetConvolutionFilterEXT, __glXDispSwap_GetConvolutionFilterEXT}, - /* [ 2] = 2 */ {__glXDisp_GetConvolutionParameterfvEXT, __glXDispSwap_GetConvolutionParameterfvEXT}, - /* [ 3] = 3 */ {__glXDisp_GetConvolutionParameterivEXT, __glXDispSwap_GetConvolutionParameterivEXT}, - /* [ 4] = 4 */ {__glXDisp_GetSeparableFilterEXT, __glXDispSwap_GetSeparableFilterEXT}, - /* [ 5] = 5 */ {__glXDisp_GetHistogramEXT, __glXDispSwap_GetHistogramEXT}, - /* [ 6] = 6 */ {__glXDisp_GetHistogramParameterfvEXT, __glXDispSwap_GetHistogramParameterfvEXT}, - /* [ 7] = 7 */ {__glXDisp_GetHistogramParameterivEXT, __glXDispSwap_GetHistogramParameterivEXT}, - /* [ 8] = 8 */ {__glXDisp_GetMinmaxEXT, __glXDispSwap_GetMinmaxEXT}, - /* [ 9] = 9 */ {__glXDisp_GetMinmaxParameterfvEXT, __glXDispSwap_GetMinmaxParameterfvEXT}, - /* [ 10] = 10 */ {__glXDisp_GetMinmaxParameterivEXT, __glXDispSwap_GetMinmaxParameterivEXT}, - /* [ 11] = 11 */ {__glXDisp_AreTexturesResidentEXT, __glXDispSwap_AreTexturesResidentEXT}, - /* [ 12] = 12 */ {__glXDisp_DeleteTexturesEXT, __glXDispSwap_DeleteTexturesEXT}, - /* [ 13] = 13 */ {__glXDisp_GenTexturesEXT, __glXDispSwap_GenTexturesEXT}, - /* [ 14] = 14 */ {__glXDisp_IsTextureEXT, __glXDispSwap_IsTextureEXT}, - /* [ 15] = 15 */ {NULL, NULL}, - /* [ 16] = 1024 */ {__glXDisp_QueryContextInfoEXT, __glXDispSwap_QueryContextInfoEXT}, - /* [ 17] = 1025 */ {NULL, NULL}, - /* [ 18] = 1026 */ {NULL, NULL}, - /* [ 19] = 1027 */ {NULL, NULL}, - /* [ 20] = 1028 */ {NULL, NULL}, - /* [ 21] = 1029 */ {NULL, NULL}, - /* [ 22] = 1030 */ {NULL, NULL}, - /* [ 23] = 1031 */ {NULL, NULL}, - /* [ 24] = 1296 */ {__glXDisp_GetProgramEnvParameterfvARB, __glXDispSwap_GetProgramEnvParameterfvARB}, - /* [ 25] = 1297 */ {__glXDisp_GetProgramEnvParameterdvARB, __glXDispSwap_GetProgramEnvParameterdvARB}, - /* [ 26] = 1298 */ {__glXDisp_GetProgramivNV, __glXDispSwap_GetProgramivNV}, - /* [ 27] = 1299 */ {__glXDisp_GetProgramStringNV, __glXDispSwap_GetProgramStringNV}, - /* [ 28] = 1300 */ {__glXDisp_GetTrackMatrixivNV, __glXDispSwap_GetTrackMatrixivNV}, - /* [ 29] = 1301 */ {__glXDisp_GetVertexAttribdvARB, __glXDispSwap_GetVertexAttribdvARB}, - /* [ 30] = 1302 */ {__glXDisp_GetVertexAttribfvNV, __glXDispSwap_GetVertexAttribfvNV}, - /* [ 31] = 1303 */ {__glXDisp_GetVertexAttribivNV, __glXDispSwap_GetVertexAttribivNV}, - /* [ 32] = 1304 */ {__glXDisp_IsProgramNV, __glXDispSwap_IsProgramNV}, - /* [ 33] = 1305 */ {__glXDisp_GetProgramLocalParameterfvARB, __glXDispSwap_GetProgramLocalParameterfvARB}, - /* [ 34] = 1306 */ {__glXDisp_GetProgramLocalParameterdvARB, __glXDispSwap_GetProgramLocalParameterdvARB}, - /* [ 35] = 1307 */ {__glXDisp_GetProgramivARB, __glXDispSwap_GetProgramivARB}, - /* [ 36] = 1308 */ {__glXDisp_GetProgramStringARB, __glXDispSwap_GetProgramStringARB}, - /* [ 37] = 1309 */ {NULL, NULL}, - /* [ 38] = 1310 */ {__glXDisp_GetProgramNamedParameterfvNV, __glXDispSwap_GetProgramNamedParameterfvNV}, - /* [ 39] = 1311 */ {__glXDisp_GetProgramNamedParameterdvNV, __glXDispSwap_GetProgramNamedParameterdvNV}, - /* [ 40] = 1288 */ {NULL, NULL}, - /* [ 41] = 1289 */ {NULL, NULL}, - /* [ 42] = 1290 */ {NULL, NULL}, - /* [ 43] = 1291 */ {NULL, NULL}, - /* [ 44] = 1292 */ {NULL, NULL}, - /* [ 45] = 1293 */ {__glXDisp_AreProgramsResidentNV, __glXDispSwap_AreProgramsResidentNV}, - /* [ 46] = 1294 */ {__glXDisp_DeleteProgramsNV, __glXDispSwap_DeleteProgramsNV}, - /* [ 47] = 1295 */ {__glXDisp_GenProgramsNV, __glXDispSwap_GenProgramsNV}, - /* [ 48] = 1328 */ {NULL, NULL}, - /* [ 49] = 1329 */ {NULL, NULL}, - /* [ 50] = 1330 */ {__glXDisp_BindTexImageEXT, __glXDispSwap_BindTexImageEXT}, - /* [ 51] = 1331 */ {__glXDisp_ReleaseTexImageEXT, __glXDispSwap_ReleaseTexImageEXT}, - /* [ 52] = 1332 */ {NULL, NULL}, - /* [ 53] = 1333 */ {NULL, NULL}, - /* [ 54] = 1334 */ {NULL, NULL}, - /* [ 55] = 1335 */ {NULL, NULL}, - /* [ 56] = 1416 */ {NULL, NULL}, - /* [ 57] = 1417 */ {NULL, NULL}, - /* [ 58] = 1418 */ {NULL, NULL}, - /* [ 59] = 1419 */ {NULL, NULL}, - /* [ 60] = 1420 */ {NULL, NULL}, - /* [ 61] = 1421 */ {NULL, NULL}, - /* [ 62] = 1422 */ {__glXDisp_IsRenderbufferEXT, __glXDispSwap_IsRenderbufferEXT}, - /* [ 63] = 1423 */ {__glXDisp_GenRenderbuffersEXT, __glXDispSwap_GenRenderbuffersEXT}, - /* [ 64] = 1424 */ {__glXDisp_GetRenderbufferParameterivEXT, __glXDispSwap_GetRenderbufferParameterivEXT}, - /* [ 65] = 1425 */ {__glXDisp_IsFramebufferEXT, __glXDispSwap_IsFramebufferEXT}, - /* [ 66] = 1426 */ {__glXDisp_GenFramebuffersEXT, __glXDispSwap_GenFramebuffersEXT}, - /* [ 67] = 1427 */ {__glXDisp_CheckFramebufferStatusEXT, __glXDispSwap_CheckFramebufferStatusEXT}, - /* [ 68] = 1428 */ {__glXDisp_GetFramebufferAttachmentParameterivEXT, __glXDispSwap_GetFramebufferAttachmentParameterivEXT}, - /* [ 69] = 1429 */ {NULL, NULL}, - /* [ 70] = 1430 */ {NULL, NULL}, - /* [ 71] = 1431 */ {NULL, NULL}, - /* [ 72] = 4096 */ {NULL, NULL}, - /* [ 73] = 4097 */ {NULL, NULL}, - /* [ 74] = 4098 */ {__glXDisp_GetColorTableSGI, __glXDispSwap_GetColorTableSGI}, - /* [ 75] = 4099 */ {__glXDisp_GetColorTableParameterfvSGI, __glXDispSwap_GetColorTableParameterfvSGI}, - /* [ 76] = 4100 */ {__glXDisp_GetColorTableParameterivSGI, __glXDispSwap_GetColorTableParameterivSGI}, - /* [ 77] = 4101 */ {NULL, NULL}, - /* [ 78] = 4102 */ {NULL, NULL}, - /* [ 79] = 4103 */ {NULL, NULL}, - /* [ 80] = 5152 */ {NULL, NULL}, - /* [ 81] = 5153 */ {NULL, NULL}, - /* [ 82] = 5154 */ {__glXDisp_CopySubBufferMESA, __glXDispSwap_CopySubBufferMESA}, - /* [ 83] = 5155 */ {NULL, NULL}, - /* [ 84] = 5156 */ {NULL, NULL}, - /* [ 85] = 5157 */ {NULL, NULL}, - /* [ 86] = 5158 */ {NULL, NULL}, - /* [ 87] = 5159 */ {NULL, NULL}, - /* [ 88] = 65536 */ {__glXDisp_SwapIntervalSGI, __glXDispSwap_SwapIntervalSGI}, - /* [ 89] = 65537 */ {__glXDisp_MakeCurrentReadSGI, __glXDispSwap_MakeCurrentReadSGI}, - /* [ 90] = 65538 */ {NULL, NULL}, - /* [ 91] = 65539 */ {NULL, NULL}, - /* [ 92] = 65540 */ {__glXDisp_GetFBConfigsSGIX, __glXDispSwap_GetFBConfigsSGIX}, - /* [ 93] = 65541 */ {__glXDisp_CreateContextWithConfigSGIX, __glXDispSwap_CreateContextWithConfigSGIX}, - /* [ 94] = 65542 */ {__glXDisp_CreateGLXPixmapWithConfigSGIX, __glXDispSwap_CreateGLXPixmapWithConfigSGIX}, - /* [ 95] = 65543 */ {__glXDisp_CreateGLXPbufferSGIX, __glXDispSwap_CreateGLXPbufferSGIX}, - /* [ 96] = 65544 */ {__glXDisp_DestroyGLXPbufferSGIX, __glXDispSwap_DestroyGLXPbufferSGIX}, - /* [ 97] = 65545 */ {__glXDisp_ChangeDrawableAttributesSGIX, __glXDispSwap_ChangeDrawableAttributesSGIX}, - /* [ 98] = 65546 */ {__glXDisp_GetDrawableAttributesSGIX, __glXDispSwap_GetDrawableAttributesSGIX}, - /* [ 99] = 65547 */ {NULL, NULL}, - /* [ 100] = 65548 */ {NULL, NULL}, - /* [ 101] = 65549 */ {NULL, NULL}, - /* [ 102] = 65550 */ {NULL, NULL}, - /* [ 103] = 65551 */ {NULL, NULL}, -}; - -const struct __glXDispatchInfo VendorPriv_dispatch_info = { - 17, - VendorPriv_dispatch_tree, - VendorPriv_function_table, - NULL, - NULL -}; - diff --git a/GL/symlink-mesa.sh b/GL/symlink-mesa.sh index 0cfe1c9b6..af9adbd94 100755 --- a/GL/symlink-mesa.sh +++ b/GL/symlink-mesa.sh @@ -229,6 +229,14 @@ symlink_glx() { action indirect_size.h action glcontextmodes.c action glcontextmodes.h + action indirect_dispatch.c + action indirect_dispatch.h + action indirect_dispatch_swap.c + action indirect_reqsize.c + action indirect_reqsize.h + action indirect_size_get.c + action indirect_size_get.h + action indirect_table.c src_dir src/mesa/glapi diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c index 87d52a9db..086de46ce 100644 --- a/Xext/panoramiX.c +++ b/Xext/panoramiX.c @@ -81,9 +81,6 @@ static DepthPtr PanoramiXDepths; static int PanoramiXNumVisuals; static VisualPtr PanoramiXVisuals; -/* We support at most 256 visuals */ -_X_EXPORT XID *PanoramiXVisualTable = NULL; - _X_EXPORT unsigned long XRC_DRAWABLE; _X_EXPORT unsigned long XRT_WINDOW; _X_EXPORT unsigned long XRT_PIXMAP; @@ -463,10 +460,8 @@ void PanoramiXExtensionInit(int argc, char *argv[]) ProcPanoramiXDispatch, SProcPanoramiXDispatch, PanoramiXResetProc, StandardMinorOpcode); - if (!extEntry) { - ErrorF("PanoramiXExtensionInit(): failed to AddExtension\n"); + if (!extEntry) break; - } /* * First make sure all the basic allocations succeed. If not, @@ -514,7 +509,7 @@ void PanoramiXExtensionInit(int argc, char *argv[]) if (!success) { noPanoramiXExtension = TRUE; - ErrorF("%s Extension failed to initialize\n", PANORAMIX_PROTOCOL_NAME); + ErrorF(PANORAMIX_PROTOCOL_NAME " extension failed to initialize\n"); return; } @@ -604,14 +599,14 @@ Bool PanoramiXCreateConnectionBlock(void) */ if(!PanoramiXNumDepths) { - ErrorF("PanoramiX error: Incompatible screens. No common visuals\n"); + ErrorF("Xinerama error: No common visuals\n"); return FALSE; } for(i = 1; i < screenInfo.numScreens; i++) { pScreen = screenInfo.screens[i]; if(pScreen->rootDepth != screenInfo.screens[0]->rootDepth) { - ErrorF("PanoramiX error: Incompatible screens. Root window depths differ\n"); + ErrorF("Xinerama error: Root window depths differ\n"); return FALSE; } if(pScreen->backingStoreSupport != screenInfo.screens[0]->backingStoreSupport) @@ -704,143 +699,133 @@ Bool PanoramiXCreateConnectionBlock(void) return TRUE; } -extern -void PanoramiXConsolidate(void) +/* + * This isn't just memcmp(), bitsPerRGBValue is skipped. markv made that + * change way back before xf86 4.0, but the comment for _why_ is a bit + * opaque, so I'm not going to question it for now. + * + * This is probably better done as a screen hook so DBE/EVI/GLX can add + * their own tests, and adding privates to VisualRec so they don't have to + * do their own back-mapping. + */ +static Bool +VisualsEqual(VisualPtr a, VisualPtr b) { - int i, j, k; - VisualPtr pVisual, pVisual2; - ScreenPtr pScreen, pScreen2; - DepthPtr pDepth, pDepth2; - PanoramiXRes *root, *defmap, *saver; - Bool foundDepth, missingDepth; - - if(!PanoramiXVisualTable) - PanoramiXVisualTable = xcalloc(256 * MAXSCREENS, sizeof(XID)); - - pScreen = screenInfo.screens[0]; - pVisual = pScreen->visuals; - pDepth = pScreen->allowedDepths; + return ((a->class == b->class) && + (a->ColormapEntries == b->ColormapEntries) && + (a->nplanes == b->nplanes) && + (a->redMask == b->redMask) && + (a->greenMask == b->greenMask) && + (a->blueMask == b->blueMask) && + (a->offsetRed == b->offsetRed) && + (a->offsetGreen == b->offsetGreen) && + (a->offsetBlue == b->offsetBlue)); +} - PanoramiXNumDepths = 0; - PanoramiXDepths = xcalloc(pScreen->numDepths,sizeof(DepthRec)); - PanoramiXNumVisuals = 0; - PanoramiXVisuals = xcalloc(pScreen->numVisuals,sizeof(VisualRec)); - - for (i = 0; i < pScreen->numDepths; i++, pDepth++) { - missingDepth = FALSE; - for (j = 1; j < PanoramiXNumScreens; j++) { - pScreen2 = screenInfo.screens[j]; - pDepth2 = pScreen2->allowedDepths; - - foundDepth = FALSE; - for (k = 0; k < pScreen2->numDepths; k++, pDepth2++) { - if(pDepth2->depth == pDepth->depth) { - foundDepth = TRUE; - break; - } - } - - if(!foundDepth) { - missingDepth = TRUE; - break; - } - } - - if(!missingDepth) { - PanoramiXDepths[PanoramiXNumDepths].depth = pDepth->depth; - PanoramiXDepths[PanoramiXNumDepths].numVids = 0; - if(pDepth->numVids) - PanoramiXDepths[PanoramiXNumDepths].vids = - xalloc(sizeof(VisualID) * pDepth->numVids); - else - PanoramiXDepths[PanoramiXNumDepths].vids = NULL; - PanoramiXNumDepths++; - } +static void +PanoramiXMaybeAddDepth(DepthPtr pDepth) +{ + ScreenPtr pScreen; + int j, k; + Bool found = FALSE; + + for (j = 1; j < PanoramiXNumScreens; j++) { + pScreen = screenInfo.screens[j]; + for (k = 0; k < pScreen->numDepths; k++) { + if (pScreen->allowedDepths[k].depth == pDepth->depth) { + found = TRUE; + break; + } + } } - for (i = 0; i < pScreen->numVisuals; i++, pVisual++) { - PanoramiXVisualTable[pVisual->vid * MAXSCREENS] = pVisual->vid; + if (!found) + return; - /* check if the visual exists on all screens */ - for (j = 1; j < PanoramiXNumScreens; j++) { - pScreen2 = screenInfo.screens[j]; + j = PanoramiXNumDepths; + PanoramiXNumDepths++; + PanoramiXDepths = xrealloc(PanoramiXDepths, + PanoramiXNumDepths * sizeof(DepthRec)); + PanoramiXDepths[j].depth = pDepth->depth; + PanoramiXDepths[j].numVids = 0; + /* XXX suboptimal, should grow these dynamically */ + if(pDepth->numVids) + PanoramiXDepths[j].vids = xalloc(sizeof(VisualID) * pDepth->numVids); + else + PanoramiXDepths[j].vids = NULL; +} +static void +PanoramiXMaybeAddVisual(VisualPtr pVisual) +{ + ScreenPtr pScreen; + VisualPtr candidate = NULL; + int j, k; + Bool found = FALSE; + + for (j = 1; j < PanoramiXNumScreens; j++) { + pScreen = screenInfo.screens[j]; + found = FALSE; + + candidate = pScreen->visuals; + for (k = 0; k < pScreen->numVisuals; k++) { + candidate++; + if (VisualsEqual(pVisual, candidate) #ifdef GLXPROXY - pVisual2 = glxMatchVisual(pScreen, pVisual, pScreen2); - if (pVisual2) { - PanoramiXVisualTable[(pVisual->vid * MAXSCREENS) + j] = - pVisual2->vid; - continue; - } else if (glxMatchVisual(pScreen, pVisual, pScreen)) { - PanoramiXVisualTable[(pVisual->vid * MAXSCREENS) + j] = 0; - break; - } + && glxMatchVisual(screenInfo.screens[0], pVisual, pScreen) #endif - pVisual2 = pScreen2->visuals; - - for (k = 0; k < pScreen2->numVisuals; k++, pVisual2++) { - if ((pVisual->class == pVisual2->class) && - (pVisual->ColormapEntries == pVisual2->ColormapEntries) && - (pVisual->nplanes == pVisual2->nplanes) && - (pVisual->redMask == pVisual2->redMask) && - (pVisual->greenMask == pVisual2->greenMask) && - (pVisual->blueMask == pVisual2->blueMask) && - (pVisual->offsetRed == pVisual2->offsetRed) && - (pVisual->offsetGreen == pVisual2->offsetGreen) && - (pVisual->offsetBlue == pVisual2->offsetBlue)) - { - /* We merely assign the first visual that matches. OpenGL - will need to get involved at some point if you want - match GLX visuals */ - PanoramiXVisualTable[(pVisual->vid * MAXSCREENS) + j] = - pVisual2->vid; - break; - } - } - } - - /* if it doesn't exist on all screens we can't use it */ - for (j = 0; j < PanoramiXNumScreens; j++) { - if (!PanoramiXVisualTable[(pVisual->vid * MAXSCREENS) + j]) { - PanoramiXVisualTable[pVisual->vid * MAXSCREENS] = 0; + ) { + found = TRUE; break; } } - /* if it does, make sure it's in the list of supported depths and visuals */ - if(PanoramiXVisualTable[pVisual->vid * MAXSCREENS]) { - PanoramiXVisuals[PanoramiXNumVisuals].vid = pVisual->vid; - PanoramiXVisuals[PanoramiXNumVisuals].class = pVisual->class; - PanoramiXVisuals[PanoramiXNumVisuals].bitsPerRGBValue = pVisual->bitsPerRGBValue; - PanoramiXVisuals[PanoramiXNumVisuals].ColormapEntries = pVisual->ColormapEntries; - PanoramiXVisuals[PanoramiXNumVisuals].nplanes = pVisual->nplanes; - PanoramiXVisuals[PanoramiXNumVisuals].redMask = pVisual->redMask; - PanoramiXVisuals[PanoramiXNumVisuals].greenMask = pVisual->greenMask; - PanoramiXVisuals[PanoramiXNumVisuals].blueMask = pVisual->blueMask; - PanoramiXVisuals[PanoramiXNumVisuals].offsetRed = pVisual->offsetRed; - PanoramiXVisuals[PanoramiXNumVisuals].offsetGreen = pVisual->offsetGreen; - PanoramiXVisuals[PanoramiXNumVisuals].offsetBlue = pVisual->offsetBlue; - PanoramiXNumVisuals++; - - for (j = 0; j < PanoramiXNumDepths; j++) { - if (PanoramiXDepths[j].depth == pVisual->nplanes) { - PanoramiXDepths[j].vids[PanoramiXDepths[j].numVids] = pVisual->vid; - PanoramiXDepths[j].numVids++; - break; - } - } - } - } + if (!found) + return; + } + + /* found a matching visual on all screens, add it to the subset list */ + j = PanoramiXNumVisuals; + PanoramiXNumVisuals++; + PanoramiXVisuals = xrealloc(PanoramiXVisuals, + PanoramiXNumVisuals * sizeof(VisualRec)); + + memcpy(&PanoramiXVisuals[j], pVisual, sizeof(VisualRec)); + + for (k = 0; k < PanoramiXNumDepths; k++) { + if (PanoramiXDepths[k].depth == pVisual->nplanes) { + PanoramiXDepths[k].vids[PanoramiXDepths[k].numVids] = pVisual->vid; + PanoramiXDepths[k].numVids++; + break; + } + } +} + +extern void +PanoramiXConsolidate(void) +{ + int i; + PanoramiXRes *root, *defmap, *saver; + ScreenPtr pScreen = screenInfo.screens[0]; + DepthPtr pDepth = pScreen->allowedDepths; + VisualPtr pVisual = pScreen->visuals; + + PanoramiXNumDepths = 0; + PanoramiXNumVisuals = 0; + for (i = 0; i < pScreen->numDepths; i++) + PanoramiXMaybeAddDepth(pDepth++); - root = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)); + for (i = 0; i < pScreen->numVisuals; i++) + PanoramiXMaybeAddVisual(pVisual++); + + root = xalloc(sizeof(PanoramiXRes)); root->type = XRT_WINDOW; - defmap = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)); + defmap = xalloc(sizeof(PanoramiXRes)); defmap->type = XRT_COLORMAP; - saver = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)); + saver = xalloc(sizeof(PanoramiXRes)); saver->type = XRT_WINDOW; - for (i = 0; i < PanoramiXNumScreens; i++) { root->info[i].id = WindowTable[i]->drawable.id; root->u.win.class = InputOutput; @@ -856,6 +841,31 @@ void PanoramiXConsolidate(void) AddResource(defmap->info[0].id, XRT_COLORMAP, defmap); } +_X_EXPORT VisualID +PanoramiXTranslateVisualID(int screen, VisualID orig) +{ + VisualPtr pVisual = NULL; + int i, j; + + for (i = 0; i < PanoramiXNumVisuals; i++) { + if (orig == PanoramiXVisuals[i].vid) { + pVisual = &PanoramiXVisuals[i]; + break; + } + } + + if (!pVisual) + return 0; + + /* found the original, now translate it relative to the backend screen */ + for (i = 0; i < PanoramiXNumScreens; i++) + for (j = 0; j < screenInfo.screens[i]->numVisuals; j++) + if (VisualsEqual(pVisual, &screenInfo.screens[i]->visuals[j])) + return screenInfo.screens[i]->visuals[j].vid; + + return 0; +} + /* * PanoramiXResetProc() diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c index f9a579625..d19b3039a 100644 --- a/Xext/panoramiXprocs.c +++ b/Xext/panoramiXprocs.c @@ -150,7 +150,7 @@ int PanoramiXCreateWindow(ClientPtr client) if (cmap) *((CARD32 *) &stuff[1] + cmap_offset) = cmap->info[j].id; if ( orig_visual != CopyFromParent ) - stuff->visual = PanoramiXVisualTable[(orig_visual*MAXSCREENS) + j]; + stuff->visual = PanoramiXTranslateVisualID(j, orig_visual); result = (*SavedProcVector[X_CreateWindow])(client); if(result != Success) break; } @@ -2077,9 +2077,6 @@ int PanoramiXCreateColormap(ClientPtr client) client, stuff->window, XRT_WINDOW, DixReadAccess))) return BadWindow; - if(!stuff->visual || (stuff->visual > 255)) - return BadValue; - if(!(newCmap = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) return BadAlloc; @@ -2092,7 +2089,7 @@ int PanoramiXCreateColormap(ClientPtr client) FOR_NSCREENS_BACKWARD(j){ stuff->mid = newCmap->info[j].id; stuff->window = win->info[j].id; - stuff->visual = PanoramiXVisualTable[(orig_visual * MAXSCREENS) + j]; + stuff->visual = PanoramiXTranslateVisualID(j, orig_visual); result = (* SavedProcVector[X_CreateColormap])(client); if(result != Success) break; } diff --git a/Xext/panoramiXsrv.h b/Xext/panoramiXsrv.h index ae9024418..6d556e963 100644 --- a/Xext/panoramiXsrv.h +++ b/Xext/panoramiXsrv.h @@ -12,8 +12,8 @@ extern int PanoramiXNumScreens; extern PanoramiXData *panoramiXdataPtr; extern int PanoramiXPixWidth; extern int PanoramiXPixHeight; -extern XID *PanoramiXVisualTable; +extern VisualID PanoramiXTranslateVisualID(int screen, VisualID orig); extern void PanoramiXConsolidate(void); extern Bool PanoramiXCreateConnectionBlock(void); extern PanoramiXRes * PanoramiXFindIDByScrnum(RESTYPE, XID, int); diff --git a/Xext/saver.c b/Xext/saver.c index d4786b9b8..69a5fa140 100644 --- a/Xext/saver.c +++ b/Xext/saver.c @@ -1346,8 +1346,7 @@ ProcScreenSaverSetAttributes (ClientPtr client) *((CARD32 *) &stuff[1] + cmap_offset) = cmap->info[i].id; if (orig_visual != CopyFromParent) - stuff->visualID = - PanoramiXVisualTable[(orig_visual*MAXSCREENS) + i]; + stuff->visualID = PanoramiXTranslateVisualID(i, orig_visual); status = ScreenSaverSetAttributes(client); } diff --git a/Xext/security.c b/Xext/security.c index 914cec2f7..427be2f0c 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -29,6 +29,9 @@ in this Software without prior written authorization from The Open Group. #endif #include "scrnintstr.h" +#include "inputstr.h" +#include "windowstr.h" +#include "propertyst.h" #include "colormapst.h" #include "privates.h" #include "registry.h" @@ -67,10 +70,19 @@ static char *SecurityUntrustedExtensions[] = { NULL }; -/* Access modes that untrusted clients can do to trusted stuff */ -static const Mask SecurityAllowedMask = - DixGetAttrAccess | DixListPropAccess | DixGetPropAccess | - DixGetFocusAccess | DixListAccess | DixReceiveAccess; +/* + * Access modes that untrusted clients are allowed on trusted objects. + */ +static const Mask SecurityResourceMask = + DixGetAttrAccess | DixReceiveAccess | DixListPropAccess | + DixGetPropAccess | DixListAccess; +static const Mask SecurityRootWindowExtraMask = + DixReceiveAccess | DixSendAccess | DixAddAccess | DixRemoveAccess; +static const Mask SecurityDeviceMask = + DixGetAttrAccess | DixReceiveAccess | DixGetFocusAccess | + DixGrabAccess | DixSetAttrAccess | DixUseAccess; +static const Mask SecurityServerMask = DixGetAttrAccess | DixGrabAccess; +static const Mask SecurityClientMask = DixGetAttrAccess; /* SecurityAudit @@ -748,11 +760,15 @@ SecurityDevice(CallbackListPtr *pcbl, pointer unused, pointer calldata) XaceDeviceAccessRec *rec = calldata; SecurityStateRec *subj, *obj; Mask requested = rec->access_mode; - Mask allowed = SecurityAllowedMask; + Mask allowed = SecurityDeviceMask; subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); obj = dixLookupPrivate(&serverClient->devPrivates, stateKey); + if (rec->dev != inputInfo.keyboard) + /* this extension only supports the core keyboard */ + allowed = requested; + if (SecurityDoCheck(subj, obj, requested, allowed) != Success) { SecurityAudit("Security denied client %d keyboard access on request " "%s\n", rec->client->index, @@ -789,20 +805,29 @@ SecurityResource(CallbackListPtr *pcbl, pointer unused, pointer calldata) SecurityStateRec *subj, *obj; int cid = CLIENT_ID(rec->id); Mask requested = rec->access_mode; - Mask allowed = SecurityAllowedMask; + Mask allowed = SecurityResourceMask; subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); obj = dixLookupPrivate(&clients[cid]->devPrivates, stateKey); + /* disable background None for untrusted windows */ + if ((requested & DixCreateAccess) && (rec->rtype == RT_WINDOW)) + if (subj->haveState && subj->trustLevel != XSecurityClientTrusted) + ((WindowPtr)rec->res)->forcedBG = TRUE; + /* special checks for server-owned resources */ if (cid == 0) { if (rec->rtype & RC_DRAWABLE) /* additional operations allowed on root windows */ - allowed |= DixReadAccess|DixSendAccess; + allowed |= SecurityRootWindowExtraMask; else if (rec->rtype == RT_COLORMAP) /* allow access to default colormaps */ allowed = requested; + + else + /* allow read access to other server-owned resources */ + allowed |= DixReadAccess; } if (SecurityDoCheck(subj, obj, requested, allowed) == Success) @@ -813,9 +838,10 @@ SecurityResource(CallbackListPtr *pcbl, pointer unused, pointer calldata) return; #endif - SecurityAudit("Security: denied client %d access to resource 0x%x " - "of client %d on request %s\n", rec->client->index, rec->id, - cid, SecurityLookupRequestName(rec->client)); + SecurityAudit("Security: denied client %d access %x to resource 0x%x " + "of client %d on request %s\n", rec->client->index, + requested, rec->id, cid, + SecurityLookupRequestName(rec->client)); rec->status = BadAccess; /* deny access */ } @@ -847,7 +873,7 @@ SecurityServer(CallbackListPtr *pcbl, pointer unused, pointer calldata) XaceServerAccessRec *rec = calldata; SecurityStateRec *subj, *obj; Mask requested = rec->access_mode; - Mask allowed = SecurityAllowedMask; + Mask allowed = SecurityServerMask; subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); obj = dixLookupPrivate(&serverClient->devPrivates, stateKey); @@ -866,7 +892,7 @@ SecurityClient(CallbackListPtr *pcbl, pointer unused, pointer calldata) XaceClientAccessRec *rec = calldata; SecurityStateRec *subj, *obj; Mask requested = rec->access_mode; - Mask allowed = SecurityAllowedMask; + Mask allowed = SecurityClientMask; subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); obj = dixLookupPrivate(&rec->target->devPrivates, stateKey); @@ -886,7 +912,7 @@ SecurityProperty(CallbackListPtr *pcbl, pointer unused, pointer calldata) SecurityStateRec *subj, *obj; ATOM name = rec->pProp->propertyName; Mask requested = rec->access_mode; - Mask allowed = SecurityAllowedMask | DixReadAccess; + Mask allowed = SecurityResourceMask | DixReadAccess; subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); obj = dixLookupPrivate(&wClient(rec->pWin)->devPrivates, stateKey); @@ -1079,6 +1105,8 @@ SecurityExtensionInit(INITARGS) return; RTEventClient |= RC_NEVERRETAIN; + RegisterResourceName(SecurityAuthorizationResType, "SecurityAuthorization"); + RegisterResourceName(RTEventClient, "SecurityEventClient"); /* Allocate the private storage */ if (!dixRequestPrivate(stateKey, sizeof(SecurityStateRec))) diff --git a/Xext/xace.c b/Xext/xace.c index 0470e44dd..e88debc5f 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -23,6 +23,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <stdarg.h> #include "scrnintstr.h" +#include "extnsionst.h" +#include "pixmapstr.h" +#include "regionstr.h" +#include "gcstruct.h" #include "xacestr.h" CallbackListPtr XaceHooks[XACE_NUM_HOOKS] = {0}; @@ -51,6 +55,21 @@ int XaceHookDispatch(ClientPtr client, int major) } } +int XaceHookPropertyAccess(ClientPtr client, WindowPtr pWin, + PropertyPtr pProp, Mask access_mode) +{ + XacePropertyAccessRec rec = { client, pWin, pProp, access_mode, Success }; + CallCallbacks(&XaceHooks[XACE_PROPERTY_ACCESS], &rec); + return rec.status; +} + +int XaceHookSelectionAccess(ClientPtr client, Atom name, Mask access_mode) +{ + XaceSelectionAccessRec rec = { client, name, access_mode, Success }; + CallCallbacks(&XaceHooks[XACE_SELECTION_ACCESS], &rec); + return rec.status; +} + void XaceHookAuditEnd(ClientPtr ptr, int result) { XaceAuditRec rec = { ptr, result }; @@ -100,18 +119,6 @@ int XaceHook(int hook, ...) prv = &rec.status; break; } - case XACE_PROPERTY_ACCESS: { - XacePropertyAccessRec rec = { - va_arg(ap, ClientPtr), - va_arg(ap, WindowPtr), - va_arg(ap, PropertyPtr), - va_arg(ap, Mask), - Success /* default allow */ - }; - calldata = &rec; - prv = &rec.status; - break; - } case XACE_SEND_ACCESS: { XaceSendAccessRec rec = { va_arg(ap, ClientPtr), @@ -169,17 +176,6 @@ int XaceHook(int hook, ...) prv = &rec.status; break; } - case XACE_SELECTION_ACCESS: { - XaceSelectionAccessRec rec = { - va_arg(ap, ClientPtr), - va_arg(ap, Atom), - va_arg(ap, Mask), - Success /* default allow */ - }; - calldata = &rec; - prv = &rec.status; - break; - } case XACE_SCREEN_ACCESS: case XACE_SCREENSAVER_ACCESS: { XaceScreenAccessRec rec = { diff --git a/Xext/xace.h b/Xext/xace.h index 4100ba16e..1f07d9fd2 100644 --- a/Xext/xace.h +++ b/Xext/xace.h @@ -25,11 +25,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define XACE_MAJOR_VERSION 2 #define XACE_MINOR_VERSION 0 -#include "pixmap.h" /* for DrawablePtr */ -#include "regionstr.h" /* for RegionPtr */ +#include "pixmap.h" +#include "region.h" +#include "window.h" +#include "property.h" /* Default window background */ -#define XaceBackgroundNoneState None +#define XaceBackgroundNoneState(w) ((w)->forcedBG ? BackgroundPixel : None) /* security hooks */ /* Constants used to identify the available security hooks @@ -65,6 +67,10 @@ extern int XaceHook( /* Special-cased hook functions */ extern int XaceHookDispatch(ClientPtr ptr, int major); +extern int XaceHookPropertyAccess(ClientPtr ptr, WindowPtr pWin, + PropertyPtr pProp, Mask access_mode); +extern int XaceHookSelectionAccess(ClientPtr ptr, Atom name, + Mask access_mode); extern void XaceHookAuditEnd(ClientPtr ptr, int result); /* Register a callback for a given hook. @@ -94,18 +100,22 @@ extern void XaceCensorImage( #else /* XACE */ /* Default window background */ -#define XaceBackgroundNoneState None +#define XaceBackgroundNoneState(w) None /* Define calls away when XACE is not being built. */ #ifdef __GNUC__ #define XaceHook(args...) Success #define XaceHookDispatch(args...) Success +#define XaceHookPropertyAccess(args...) Success +#define XaceHookSelectionAccess(args...) Success #define XaceHookAuditEnd(args...) { ; } #define XaceCensorImage(args...) { ; } #else #define XaceHook(...) Success #define XaceHookDispatch(...) Success +#define XaceHookPropertyAccess(...) Success +#define XaceHookSelectionAccess(...) Success #define XaceHookAuditEnd(...) { ; } #define XaceCensorImage(...) { ; } #endif diff --git a/Xext/xacestr.h b/Xext/xacestr.h index 045f8364f..e31d4246a 100644 --- a/Xext/xacestr.h +++ b/Xext/xacestr.h @@ -20,13 +20,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef _XACESTR_H #define _XACESTR_H -#include "dixstruct.h" +#include "dix.h" #include "resource.h" #include "extnsionst.h" -#include "gcstruct.h" -#include "windowstr.h" -#include "inputstr.h" -#include "propertyst.h" +#include "window.h" +#include "input.h" +#include "property.h" #include "selection.h" #include "xace.h" diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c index 779f3b940..d5c5704de 100644 --- a/Xext/xf86bigfont.c +++ b/Xext/xf86bigfont.c @@ -236,15 +236,15 @@ shmalloc( size = (size + pagesize-1) & -pagesize; shmid = shmget(IPC_PRIVATE, size, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH); if (shmid == -1) { - ErrorF(XF86BIGFONTNAME " extension: shmget() failed, size = %u, errno = %d\n", - size, errno); + ErrorF(XF86BIGFONTNAME " extension: shmget() failed, size = %u, %s\n", + size, strerror(errno)); xfree(pDesc); return (ShmDescPtr) NULL; } if ((addr = shmat(shmid, 0, 0)) == (char *)-1) { - ErrorF(XF86BIGFONTNAME " extension: shmat() failed, size = %u, errno = %d\n", - size, errno); + ErrorF(XF86BIGFONTNAME " extension: shmat() failed, size = %u, %s\n", + size, strerror(errno)); shmctl(shmid, IPC_RMID, (void *) 0); xfree(pDesc); return (ShmDescPtr) NULL; diff --git a/Xext/xselinux.c b/Xext/xselinux.c index a6e27e695..98e1ec563 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -22,21 +22,28 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * All rights reserved. */ +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <sys/socket.h> +#include <stdio.h> +#include <stdarg.h> + #include <selinux/selinux.h> #include <selinux/label.h> #include <selinux/avc.h> #include <libaudit.h> -#ifdef HAVE_DIX_CONFIG_H -#include <dix-config.h> -#endif - #include <X11/Xatom.h> #include "resource.h" #include "privates.h" #include "registry.h" #include "dixstruct.h" +#include "inputstr.h" +#include "windowstr.h" +#include "propertyst.h" #include "extnsionst.h" #include "scrnintstr.h" #include "selection.h" @@ -46,8 +53,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define TRANS_SERVER #include <X11/Xtrans/Xtrans.h> #include "../os/osdep.h" -#include <stdio.h> -#include <stdarg.h> #include "modinit.h" @@ -56,7 +61,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* private state record */ -static DevPrivateKey stateKey = &stateKey; +static DevPrivateKey subjectKey = &subjectKey; +static DevPrivateKey objectKey = &objectKey; /* This is what we store for security state */ typedef struct { @@ -64,7 +70,12 @@ typedef struct { struct avc_entry_ref aeref; char *command; int privileged; -} SELinuxStateRec; +} SELinuxSubjectRec; + +typedef struct { + security_id_t sid; + int poly; +} SELinuxObjectRec; /* selection manager */ typedef struct { @@ -81,6 +92,7 @@ static int audit_fd; /* structure passed to auditing callback */ typedef struct { ClientPtr client; /* client */ + DeviceIntPtr dev; /* device */ char *command; /* client's executable path */ unsigned id; /* resource id, if any */ int restype; /* resource type, if any */ @@ -122,11 +134,11 @@ static struct security_class_mapping map[] = { { "x_gc", { "", "", "destroy", "create", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "use", NULL }}, { "x_font", { "", "", "destroy", "create", "getattr", "", "", "", "", "", "", "", "add_glyph", "remove_glyph", "", "", "", "", "", "", "", "", "", "", "use", NULL }}, { "x_colormap", { "read", "write", "destroy", "create", "getattr", "", "", "", "", "", "", "", "add_color", "remove_color", "", "", "", "", "", "", "install", "uninstall", "", "", "use", NULL }}, - { "x_property", { "read", "write", "destroy", "create", NULL }}, + { "x_property", { "read", "write", "destroy", "create", "getattr", "setattr", NULL }}, { "x_selection", { "read", "", "", "", "getattr", "setattr", NULL }}, { "x_cursor", { "read", "write", "destroy", "create", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "use", NULL }}, { "x_client", { "", "", "destroy", "", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "manage", NULL }}, - { "x_device", { "read", "write", "", "", "getattr", "setattr", "", "", "", "getfocus", "setfocus", "", "", "", "", "", "", "grab", "freeze", "force_cursor", "", "", "", "", "", "manage", "", "bell", NULL }}, + { "x_device", { "read", "write", "", "", "getattr", "setattr", "", "", "", "getfocus", "setfocus", "", "", "", "", "", "", "grab", "freeze", "force_cursor", "", "", "", "", "use", "manage", "", "bell", NULL }}, { "x_server", { "record", "", "", "", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "", "grab", "", "", "", "", "", "", "", "manage", "debug", NULL }}, { "x_extension", { "", "", "", "", "query", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "use", NULL }}, { "x_event", { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "send", "receive", NULL }}, @@ -150,7 +162,7 @@ static pointer truep = (pointer)1; * Looks up the SID corresponding to the given selection atom */ static int -SELinuxSelectionToSID(Atom selection, SELinuxStateRec *sid_return) +SELinuxSelectionToSID(Atom selection, SELinuxObjectRec *sid_return) { const char *name; unsigned i, size; @@ -197,7 +209,7 @@ SELinuxSelectionToSID(Atom selection, SELinuxStateRec *sid_return) */ static int SELinuxEventToSID(unsigned type, security_id_t sid_of_window, - SELinuxStateRec *sid_return) + SELinuxObjectRec *sid_return) { const char *name = LookupEventName(type); security_context_t con; @@ -288,7 +300,7 @@ SELinuxTypeToClass(RESTYPE type) * Performs an SELinux permission check. */ static int -SELinuxDoCheck(SELinuxStateRec *subj, SELinuxStateRec *obj, +SELinuxDoCheck(SELinuxSubjectRec *subj, SELinuxObjectRec *obj, security_class_t class, Mask mode, SELinuxAuditRec *auditdata) { /* serverClient requests OK */ @@ -300,9 +312,11 @@ SELinuxDoCheck(SELinuxStateRec *subj, SELinuxStateRec *obj, if (avc_has_perm(subj->sid, obj->sid, class, mode, &subj->aeref, auditdata) < 0) { + if (mode == DixUnknownAccess) + return Success; /* DixUnknownAccess requests OK ... for now */ if (errno == EACCES) return BadAccess; - ErrorF("ServerPerm: unexpected error %d\n", errno); + ErrorF("SELinux: avc_has_perm: unexpected error %d\n", errno); return BadValue; } @@ -316,11 +330,14 @@ static void SELinuxLabelClient(ClientPtr client) { XtransConnInfo ci = ((OsCommPtr)client->osPrivate)->trans_conn; - SELinuxStateRec *state; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj; security_context_t ctx; - state = dixLookupPrivate(&client->devPrivates, stateKey); - sidput(state->sid); + subj = dixLookupPrivate(&client->devPrivates, subjectKey); + sidput(subj->sid); + obj = dixLookupPrivate(&client->devPrivates, objectKey); + sidput(obj->sid); if (_XSERVTransIsLocal(ci)) { int fd = _XSERVTransGetConnectionNumber(ci); @@ -331,7 +348,7 @@ SELinuxLabelClient(ClientPtr client) /* For local clients, can get context from the socket */ if (getpeercon(fd, &ctx) < 0) - FatalError("Client %d: couldn't get context from socket\n", + FatalError("SELinux: client %d: couldn't get context from socket\n", client->index); /* Try and determine the client's executable name */ @@ -349,24 +366,25 @@ SELinuxLabelClient(ClientPtr client) if (bytes <= 0) goto finish; - state->command = xalloc(bytes); - if (!state->command) + subj->command = xalloc(bytes); + if (!subj->command) goto finish; - memcpy(state->command, path, bytes); - state->command[bytes - 1] = 0; + memcpy(subj->command, path, bytes); + subj->command[bytes - 1] = 0; } else /* For remote clients, need to use a default context */ if (selabel_lookup(label_hnd, &ctx, NULL, SELABEL_X_CLIENT) < 0) - FatalError("Client %d: couldn't get default remote context\n", - client->index); + FatalError("SELinux: failed to look up remote-client context\n"); finish: /* Get a SID from the context */ - if (avc_context_to_sid(ctx, &state->sid) < 0) - FatalError("Client %d: context_to_sid(%s) failed\n", + if (avc_context_to_sid(ctx, &subj->sid) < 0) + FatalError("SELinux: client %d: context_to_sid(%s) failed\n", client->index, ctx); + sidget(subj->sid); + obj->sid = subj->sid; freecon(ctx); } @@ -378,23 +396,27 @@ SELinuxLabelInitial(void) { int i; XaceScreenAccessRec srec; - SELinuxStateRec *state; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj; security_context_t ctx; pointer unused; /* Do the serverClient */ - state = dixLookupPrivate(&serverClient->devPrivates, stateKey); - state->privileged = 1; - sidput(state->sid); + subj = dixLookupPrivate(&serverClient->devPrivates, subjectKey); + obj = dixLookupPrivate(&serverClient->devPrivates, objectKey); + subj->privileged = 1; + sidput(subj->sid); /* Use the context of the X server process for the serverClient */ if (getcon(&ctx) < 0) - FatalError("Couldn't get context of X server process\n"); + FatalError("SELinux: couldn't get context of X server process\n"); /* Get a SID from the context */ - if (avc_context_to_sid(ctx, &state->sid) < 0) - FatalError("serverClient: context_to_sid(%s) failed\n", ctx); + if (avc_context_to_sid(ctx, &subj->sid) < 0) + FatalError("SELinux: serverClient: context_to_sid(%s) failed\n", ctx); + sidget(subj->sid); + obj->sid = subj->sid; freecon(ctx); srec.client = serverClient; @@ -441,11 +463,15 @@ SELinuxAudit(void *auditdata, propertyName = audit->property ? NameForAtom(audit->property) : NULL; selectionName = audit->selection ? NameForAtom(audit->selection) : NULL; - return snprintf(msgbuf, msgbufsize, "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", + return snprintf(msgbuf, msgbufsize, + "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", (major >= 0) ? "request=" : "", (major >= 0) ? LookupRequestName(major, minor) : "", audit->command ? " comm=" : "", audit->command ? audit->command : "", + audit->dev ? " xdevice=\"" : "", + audit->dev ? audit->dev->name : "", + audit->dev ? "\"" : "", audit->id ? " resid=" : "", audit->id ? idNum : "", audit->restype ? " restype=" : "", @@ -482,20 +508,27 @@ static void SELinuxDevice(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceDeviceAccessRec *rec = calldata; - SELinuxStateRec *subj, *obj; - SELinuxAuditRec auditdata = { .client = rec->client }; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj; + SELinuxAuditRec auditdata = { .client = rec->client, .dev = rec->dev }; int rc; - subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); - obj = dixLookupPrivate(&rec->dev->devPrivates, stateKey); + subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); + obj = dixLookupPrivate(&rec->dev->devPrivates, objectKey); /* If this is a new object that needs labeling, do it now */ if (rec->access_mode & DixCreateAccess) { + SELinuxSubjectRec *dsubj; + dsubj = dixLookupPrivate(&rec->dev->devPrivates, subjectKey); + + sidput(dsubj->sid); sidput(obj->sid); /* Label the device directly with the process SID */ sidget(subj->sid); obj->sid = subj->sid; + sidget(subj->sid); + dsubj->sid = subj->sid; } rc = SELinuxDoCheck(subj, obj, SECCLASS_X_DEVICE, rec->access_mode, @@ -508,17 +541,18 @@ static void SELinuxSend(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceSendAccessRec *rec = calldata; - SELinuxStateRec *subj, *obj, ev_sid; - SELinuxAuditRec auditdata = { .client = rec->client }; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj, ev_sid; + SELinuxAuditRec auditdata = { .client = rec->client, .dev = rec->dev }; security_class_t class; int rc, i, type; if (rec->dev) - subj = dixLookupPrivate(&rec->dev->devPrivates, stateKey); + subj = dixLookupPrivate(&rec->dev->devPrivates, subjectKey); else - subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); + subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); - obj = dixLookupPrivate(&rec->pWin->devPrivates, stateKey); + obj = dixLookupPrivate(&rec->pWin->devPrivates, objectKey); /* Check send permission on window */ rc = SELinuxDoCheck(subj, obj, SECCLASS_X_DRAWABLE, DixSendAccess, @@ -549,13 +583,14 @@ static void SELinuxReceive(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceReceiveAccessRec *rec = calldata; - SELinuxStateRec *subj, *obj, ev_sid; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj, ev_sid; SELinuxAuditRec auditdata = { .client = NULL }; security_class_t class; int rc, i, type; - subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); - obj = dixLookupPrivate(&rec->pWin->devPrivates, stateKey); + subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); + obj = dixLookupPrivate(&rec->pWin->devPrivates, objectKey); /* Check receive permission on window */ rc = SELinuxDoCheck(subj, obj, SECCLASS_X_DRAWABLE, DixReceiveAccess, @@ -586,12 +621,13 @@ static void SELinuxExtension(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceExtAccessRec *rec = calldata; - SELinuxStateRec *subj, *obj, *serv; + SELinuxSubjectRec *subj, *serv; + SELinuxObjectRec *obj; SELinuxAuditRec auditdata = { .client = rec->client }; int rc; - subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); - obj = dixLookupPrivate(&rec->ext->devPrivates, stateKey); + subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); + obj = dixLookupPrivate(&rec->ext->devPrivates, objectKey); /* If this is a new object that needs labeling, do it now */ /* XXX there should be a separate callback for this */ @@ -600,9 +636,9 @@ SELinuxExtension(CallbackListPtr *pcbl, pointer unused, pointer calldata) security_context_t con; security_id_t sid; - serv = dixLookupPrivate(&serverClient->devPrivates, stateKey); + serv = dixLookupPrivate(&serverClient->devPrivates, subjectKey); - /* Look in the mappings of property names to contexts */ + /* Look in the mappings of extension names to contexts */ if (selabel_lookup(label_hnd, &con, name, SELABEL_X_EXT) < 0) { ErrorF("SELinux: a property label lookup failed!\n"); rec->status = BadValue; @@ -640,12 +676,13 @@ static void SELinuxProperty(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XacePropertyAccessRec *rec = calldata; - SELinuxStateRec *subj, *obj; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj; SELinuxAuditRec auditdata = { .client = rec->client }; int rc; - subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); - obj = dixLookupPrivate(&rec->pProp->devPrivates, stateKey); + subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); + obj = dixLookupPrivate(&rec->pProp->devPrivates, objectKey); /* If this is a new object that needs labeling, do it now */ if (rec->access_mode & DixCreateAccess) { @@ -691,13 +728,15 @@ static void SELinuxResource(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceResourceAccessRec *rec = calldata; - SELinuxStateRec *subj, *obj, *pobj; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj, *sobj, *pobj; SELinuxAuditRec auditdata = { .client = rec->client }; PrivateRec **privatePtr; security_class_t class; int rc, offset; - subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); + subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); + sobj = dixLookupPrivate(&rec->client->devPrivates, objectKey); /* Determine if the resource object has a devPrivates field */ offset = dixLookupPrivateOffset(rec->rtype); @@ -705,12 +744,12 @@ SELinuxResource(CallbackListPtr *pcbl, pointer unused, pointer calldata) /* No: use the SID of the owning client */ class = SECCLASS_X_RESOURCE; privatePtr = &clients[CLIENT_ID(rec->id)]->devPrivates; - obj = dixLookupPrivate(privatePtr, stateKey); + obj = dixLookupPrivate(privatePtr, objectKey); } else { /* Yes: use the SID from the resource object itself */ class = SELinuxTypeToClass(rec->rtype); privatePtr = DEVPRIV_AT(rec->res, offset); - obj = dixLookupPrivate(privatePtr, stateKey); + obj = dixLookupPrivate(privatePtr, objectKey); } /* If this is a new object that needs labeling, do it now */ @@ -719,10 +758,10 @@ SELinuxResource(CallbackListPtr *pcbl, pointer unused, pointer calldata) offset = dixLookupPrivateOffset(rec->ptype); if (rec->parent && offset >= 0) /* Use the SID of the parent object in the labeling operation */ - pobj = dixLookupPrivate(DEVPRIV_AT(rec->parent, offset), stateKey); + pobj = dixLookupPrivate(DEVPRIV_AT(rec->parent, offset), objectKey); else /* Use the SID of the subject */ - pobj = subj; + pobj = sobj; sidput(obj->sid); @@ -746,13 +785,14 @@ static void SELinuxScreen(CallbackListPtr *pcbl, pointer is_saver, pointer calldata) { XaceScreenAccessRec *rec = calldata; - SELinuxStateRec *subj, *obj; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj; SELinuxAuditRec auditdata = { .client = rec->client }; Mask access_mode = rec->access_mode; int rc; - subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); - obj = dixLookupPrivate(&rec->screen->devPrivates, stateKey); + subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); + obj = dixLookupPrivate(&rec->screen->devPrivates, objectKey); /* If this is a new object that needs labeling, do it now */ if (access_mode & DixCreateAccess) { @@ -779,12 +819,13 @@ static void SELinuxClient(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceClientAccessRec *rec = calldata; - SELinuxStateRec *subj, *obj; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj; SELinuxAuditRec auditdata = { .client = rec->client }; int rc; - subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); - obj = dixLookupPrivate(&rec->target->devPrivates, stateKey); + subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); + obj = dixLookupPrivate(&rec->target->devPrivates, objectKey); rc = SELinuxDoCheck(subj, obj, SECCLASS_X_CLIENT, rec->access_mode, &auditdata); @@ -796,12 +837,13 @@ static void SELinuxServer(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceServerAccessRec *rec = calldata; - SELinuxStateRec *subj, *obj; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj; SELinuxAuditRec auditdata = { .client = rec->client }; int rc; - subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); - obj = dixLookupPrivate(&serverClient->devPrivates, stateKey); + subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); + obj = dixLookupPrivate(&serverClient->devPrivates, objectKey); rc = SELinuxDoCheck(subj, obj, SECCLASS_X_SERVER, rec->access_mode, &auditdata); @@ -813,11 +855,12 @@ static void SELinuxSelection(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceSelectionAccessRec *rec = (XaceSelectionAccessRec *)calldata; - SELinuxStateRec *subj, sel_sid; + SELinuxSubjectRec *subj; + SELinuxObjectRec sel_sid; SELinuxAuditRec auditdata = { .client = rec->client }; int rc; - subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); + subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); rc = SELinuxSelectionToSID(rec->name, &sel_sid); if (rc != Success) { @@ -864,18 +907,19 @@ static void SELinuxResourceState(CallbackListPtr *pcbl, pointer unused, pointer calldata) { ResourceStateInfoRec *rec = calldata; - SELinuxStateRec *state; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj; WindowPtr pWin; if (rec->type != RT_WINDOW) return; pWin = (WindowPtr)rec->value; - state = dixLookupPrivate(&wClient(pWin)->devPrivates, stateKey); + subj = dixLookupPrivate(&wClient(pWin)->devPrivates, subjectKey); - if (state->sid) { + if (subj->sid) { security_context_t ctx; - int rc = avc_sid_to_context(state->sid, &ctx); + int rc = avc_sid_to_context(subj->sid, &ctx); if (rc < 0) FatalError("SELinux: Failed to get security context!\n"); rc = dixChangeWindowProperty(serverClient, @@ -887,11 +931,11 @@ SELinuxResourceState(CallbackListPtr *pcbl, pointer unused, pointer calldata) } else FatalError("SELinux: Unexpected unlabeled client found\n"); - state = dixLookupPrivate(&pWin->devPrivates, stateKey); + obj = dixLookupPrivate(&pWin->devPrivates, objectKey); - if (state->sid) { + if (obj->sid) { security_context_t ctx; - int rc = avc_sid_to_context(state->sid, &ctx); + int rc = avc_sid_to_context(obj->sid, &ctx); if (rc < 0) FatalError("SELinux: Failed to get security context!\n"); rc = dixChangeWindowProperty(serverClient, @@ -908,41 +952,11 @@ static void SELinuxSelectionState(CallbackListPtr *pcbl, pointer unused, pointer calldata) { SelectionInfoRec *rec = calldata; - SELinuxStateRec *subj, *obj; switch (rec->kind) { case SelectionSetOwner: - /* save off the "real" owner of the selection */ - rec->selection->alt_client = rec->selection->client; - rec->selection->alt_window = rec->selection->window; - - /* figure out the new label for the content */ - subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); - obj = dixLookupPrivate(&rec->selection->devPrivates, stateKey); - sidput(obj->sid); - - if (avc_compute_create(subj->sid, subj->sid, SECCLASS_X_SELECTION, - &obj->sid) < 0) { - ErrorF("SELinux: a compute_create call failed!\n"); - obj->sid = unlabeled_sid; - } - break; - case SelectionGetOwner: - /* restore the real owner */ - rec->selection->window = rec->selection->alt_window; - break; - case SelectionConvertSelection: - /* redirect the convert request if necessary */ - if (securityManager && securityManager != rec->client) { - rec->selection->client = securityManager; - rec->selection->window = securityWindow; - } else { - rec->selection->client = rec->selection->alt_client; - rec->selection->window = rec->selection->alt_window; - } - break; default: break; } @@ -954,27 +968,47 @@ SELinuxSelectionState(CallbackListPtr *pcbl, pointer unused, pointer calldata) */ static void -SELinuxStateInit(CallbackListPtr *pcbl, pointer unused, pointer calldata) +SELinuxSubjectInit(CallbackListPtr *pcbl, pointer unused, pointer calldata) { PrivateCallbackRec *rec = calldata; - SELinuxStateRec *state = *rec->value; + SELinuxSubjectRec *subj = *rec->value; sidget(unlabeled_sid); - state->sid = unlabeled_sid; + subj->sid = unlabeled_sid; - avc_entry_ref_init(&state->aeref); + avc_entry_ref_init(&subj->aeref); } static void -SELinuxStateFree(CallbackListPtr *pcbl, pointer unused, pointer calldata) +SELinuxSubjectFree(CallbackListPtr *pcbl, pointer unused, pointer calldata) { PrivateCallbackRec *rec = calldata; - SELinuxStateRec *state = *rec->value; + SELinuxSubjectRec *subj = *rec->value; - xfree(state->command); + xfree(subj->command); if (avc_active) - sidput(state->sid); + sidput(subj->sid); +} + +static void +SELinuxObjectInit(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + PrivateCallbackRec *rec = calldata; + SELinuxObjectRec *obj = *rec->value; + + sidget(unlabeled_sid); + obj->sid = unlabeled_sid; +} + +static void +SELinuxObjectFree(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + PrivateCallbackRec *rec = calldata; + SELinuxObjectRec *obj = *rec->value; + + if (avc_active) + sidput(obj->sid); } @@ -1065,7 +1099,8 @@ ProcSELinuxSetDeviceContext(ClientPtr client) char *ctx; security_id_t sid; DeviceIntPtr dev; - SELinuxStateRec *state; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj; int rc; REQUEST(SELinuxSetContextReq); @@ -1083,9 +1118,13 @@ ProcSELinuxSetDeviceContext(ClientPtr client) if (rc != Success) return BadValue; - state = dixLookupPrivate(&dev->devPrivates, stateKey); - sidput(state->sid); - state->sid = sid; + subj = dixLookupPrivate(&dev->devPrivates, subjectKey); + sidput(subj->sid); + subj->sid = sid; + obj = dixLookupPrivate(&dev->devPrivates, objectKey); + sidput(obj->sid); + obj->sid = sid; + return Success; } @@ -1094,7 +1133,7 @@ ProcSELinuxGetDeviceContext(ClientPtr client) { char *ctx; DeviceIntPtr dev; - SELinuxStateRec *state; + SELinuxSubjectRec *subj; SELinuxGetContextReply rep; int rc; @@ -1105,8 +1144,8 @@ ProcSELinuxGetDeviceContext(ClientPtr client) if (rc != Success) return rc; - state = dixLookupPrivate(&dev->devPrivates, stateKey); - rc = avc_sid_to_context(state->sid, &ctx); + subj = dixLookupPrivate(&dev->devPrivates, subjectKey); + rc = avc_sid_to_context(subj->sid, &ctx); if (rc != Success) return BadValue; @@ -1146,7 +1185,7 @@ ProcSELinuxGetPropertyContext(ClientPtr client) char *ctx; WindowPtr pWin; PropertyPtr pProp; - SELinuxStateRec *state; + SELinuxObjectRec *obj; SELinuxGetContextReply rep; int rc; @@ -1166,12 +1205,12 @@ ProcSELinuxGetPropertyContext(ClientPtr client) if (!pProp) return BadValue; - rc = XaceHook(XACE_PROPERTY_ACCESS, client, pWin, pProp, DixGetAttrAccess); + rc = XaceHookPropertyAccess(client, pWin, pProp, DixGetAttrAccess); if (rc != Success) return rc; - state = dixLookupPrivate(&pProp->devPrivates, stateKey); - rc = avc_sid_to_context(state->sid, &ctx); + obj = dixLookupPrivate(&pProp->devPrivates, objectKey); + rc = avc_sid_to_context(obj->sid, &ctx); if (rc != Success) return BadValue; @@ -1210,7 +1249,7 @@ ProcSELinuxGetWindowContext(ClientPtr client) { char *ctx; WindowPtr pWin; - SELinuxStateRec *state; + SELinuxObjectRec *obj; SELinuxGetContextReply rep; int rc; @@ -1221,8 +1260,8 @@ ProcSELinuxGetWindowContext(ClientPtr client) if (rc != Success) return rc; - state = dixLookupPrivate(&pWin->devPrivates, stateKey); - rc = avc_sid_to_context(state->sid, &ctx); + obj = dixLookupPrivate(&pWin->devPrivates, objectKey); + rc = avc_sid_to_context(obj->sid, &ctx); if (rc != Success) return BadValue; @@ -1245,6 +1284,24 @@ ProcSELinuxGetWindowContext(ClientPtr client) } static int +ProcSELinuxSetSelectionCreateContext(ClientPtr client) +{ + return Success; +} + +static int +ProcSELinuxGetSelectionCreateContext(ClientPtr client) +{ + return Success; +} + +static int +ProcSELinuxGetSelectionContext(ClientPtr client) +{ + return Success; +} + +static int ProcSELinuxDispatch(ClientPtr client) { REQUEST(xReq); @@ -1275,6 +1332,12 @@ ProcSELinuxDispatch(ClientPtr client) return ProcSELinuxGetWindowCreateContext(client); case X_SELinuxGetWindowContext: return ProcSELinuxGetWindowContext(client); + case X_SELinuxSetSelectionCreateContext: + return ProcSELinuxSetSelectionCreateContext(client); + case X_SELinuxGetSelectionCreateContext: + return ProcSELinuxGetSelectionCreateContext(client); + case X_SELinuxGetSelectionContext: + return ProcSELinuxGetSelectionContext(client); default: return BadRequest; } @@ -1383,6 +1446,28 @@ SProcSELinuxGetWindowContext(ClientPtr client) } static int +SProcSELinuxSetSelectionCreateContext(ClientPtr client) +{ + REQUEST(SELinuxSetCreateContextReq); + int n; + + REQUEST_AT_LEAST_SIZE(SELinuxSetCreateContextReq); + swaps(&stuff->context_len, n); + return ProcSELinuxSetSelectionCreateContext(client); +} + +static int +SProcSELinuxGetSelectionContext(ClientPtr client) +{ + REQUEST(SELinuxGetContextReq); + int n; + + REQUEST_SIZE_MATCH(SELinuxGetContextReq); + swapl(&stuff->id, n); + return ProcSELinuxGetSelectionContext(client); +} + +static int SProcSELinuxDispatch(ClientPtr client) { REQUEST(xReq); @@ -1417,6 +1502,12 @@ SProcSELinuxDispatch(ClientPtr client) return ProcSELinuxGetWindowCreateContext(client); case X_SELinuxGetWindowContext: return SProcSELinuxGetWindowContext(client); + case X_SELinuxSetSelectionCreateContext: + return SProcSELinuxSetSelectionCreateContext(client); + case X_SELinuxGetSelectionCreateContext: + return ProcSELinuxGetSelectionCreateContext(client); + case X_SELinuxGetSelectionContext: + return SProcSELinuxGetSelectionContext(client); default: return BadRequest; } @@ -1516,7 +1607,8 @@ SELinuxExtensionInit(INITARGS) FatalError("SELinux: Failed to open the system audit log\n"); /* Allocate private storage */ - if (!dixRequestPrivate(stateKey, sizeof(SELinuxStateRec))) + if (!dixRequestPrivate(subjectKey, sizeof(SELinuxSubjectRec)) || + !dixRequestPrivate(objectKey, sizeof(SELinuxObjectRec))) FatalError("SELinux: Failed to allocate private storage.\n"); /* Create atoms for doing window labeling */ @@ -1528,8 +1620,10 @@ SELinuxExtensionInit(INITARGS) FatalError("SELinux: Failed to create atom\n"); /* Register callbacks */ - ret &= dixRegisterPrivateInitFunc(stateKey, SELinuxStateInit, NULL); - ret &= dixRegisterPrivateDeleteFunc(stateKey, SELinuxStateFree, NULL); + ret &= dixRegisterPrivateInitFunc(subjectKey, SELinuxSubjectInit, NULL); + ret &= dixRegisterPrivateDeleteFunc(subjectKey, SELinuxSubjectFree, NULL); + ret &= dixRegisterPrivateInitFunc(objectKey, SELinuxObjectInit, NULL); + ret &= dixRegisterPrivateDeleteFunc(objectKey, SELinuxObjectFree, NULL); ret &= AddCallback(&ClientStateCallback, SELinuxClientState, NULL); ret &= AddCallback(&ResourceStateCallback, SELinuxResourceState, NULL); diff --git a/Xext/xselinux.h b/Xext/xselinux.h index 7eeea5046..480276154 100644 --- a/Xext/xselinux.h +++ b/Xext/xselinux.h @@ -43,6 +43,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define X_SELinuxSetWindowCreateContext 10 #define X_SELinuxGetWindowCreateContext 11 #define X_SELinuxGetWindowContext 12 +#define X_SELinuxSetSelectionCreateContext 13 +#define X_SELinuxGetSelectionCreateContext 14 +#define X_SELinuxGetSelectionContext 15 typedef struct { CARD8 reqType; diff --git a/Xi/chgdctl.c b/Xi/chgdctl.c index 937bb38e4..26b79f6dc 100644 --- a/Xi/chgdctl.c +++ b/Xi/chgdctl.c @@ -77,11 +77,46 @@ int SProcXChangeDeviceControl(ClientPtr client) { char n; + xDeviceCtl *ctl; + xDeviceAbsCalibCtl *calib; + xDeviceAbsAreaCtl *area; REQUEST(xChangeDeviceControlReq); swaps(&stuff->length, n); REQUEST_AT_LEAST_SIZE(xChangeDeviceControlReq); swaps(&stuff->control, n); + ctl = (xDeviceCtl*)&stuff[1]; + swaps(&ctl->control, n); + swaps(&ctl->length, n); + switch(stuff->control) { + case DEVICE_ABS_CALIB: + calib = (xDeviceAbsCalibCtl*)ctl; + swaps(&calib->length, n); + swapl(&calib->min_x, n); + swapl(&calib->max_x, n); + swapl(&calib->min_y, n); + swapl(&calib->max_y, n); + swapl(&calib->flip_x, n); + swapl(&calib->flip_y, n); + swapl(&calib->rotation, n); + swapl(&calib->button_threshold, n); + break; + case DEVICE_ABS_AREA: + area = (xDeviceAbsAreaCtl*)ctl; + swapl(&area->offset_x, n); + swapl(&area->offset_y, n); + swapl(&area->width, n); + swapl(&area->height, n); + swapl(&area->screen, n); + swapl(&area->following, n); + break; + case DEVICE_CORE: + case DEVICE_ENABLE: + case DEVICE_RESOLUTION: + /* hmm. beer. *drool* */ + break; + + } return (ProcXChangeDeviceControl(client)); } @@ -111,7 +146,7 @@ ProcXChangeDeviceControl(ClientPtr client) REQUEST_AT_LEAST_SIZE(xChangeDeviceControlReq); len = stuff->length - (sizeof(xChangeDeviceControlReq) >> 2); - ret = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess); + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess); if (ret != Success) goto out; diff --git a/Xi/chgfctl.c b/Xi/chgfctl.c index 696b74a16..3155e87c2 100644 --- a/Xi/chgfctl.c +++ b/Xi/chgfctl.c @@ -444,7 +444,7 @@ ProcXChangeFeedbackControl(ClientPtr client) REQUEST_AT_LEAST_SIZE(xChangeFeedbackControlReq); len = stuff->length - (sizeof(xChangeFeedbackControlReq) >> 2); - rc = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess); + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess); if (rc != Success) return rc; diff --git a/Xi/chgkmap.c b/Xi/chgkmap.c index df334c11c..3f51648e1 100644 --- a/Xi/chgkmap.c +++ b/Xi/chgkmap.c @@ -106,7 +106,7 @@ ProcXChangeDeviceKeyMapping(ClientPtr client) count = stuff->keyCodes * stuff->keySymsPerKeyCode; REQUEST_FIXED_SIZE(xChangeDeviceKeyMappingReq, count * sizeof(CARD32)); - ret = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess); + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess); if (ret != Success) return ret; len = stuff->length - (sizeof(xChangeDeviceKeyMappingReq) >> 2); diff --git a/Xi/closedev.c b/Xi/closedev.c index 4c593ec2f..2be908c4a 100644 --- a/Xi/closedev.c +++ b/Xi/closedev.c @@ -146,7 +146,7 @@ ProcXCloseDevice(ClientPtr client) REQUEST(xCloseDeviceReq); REQUEST_SIZE_MATCH(xCloseDeviceReq); - rc = dixLookupDevice(&d, stuff->deviceid, client, DixGetAttrAccess); + rc = dixLookupDevice(&d, stuff->deviceid, client, DixUseAccess); if (rc != Success) return rc; diff --git a/Xi/opendev.c b/Xi/opendev.c index f4c0066ec..f14f848bf 100644 --- a/Xi/opendev.c +++ b/Xi/opendev.c @@ -102,7 +102,8 @@ ProcXOpenDevice(ClientPtr client) REQUEST(xOpenDeviceReq); REQUEST_SIZE_MATCH(xOpenDeviceReq); - status = dixLookupDevice(&dev, stuff->deviceid, client, DixReadAccess); + status = dixLookupDevice(&dev, stuff->deviceid, client, DixUseAccess); + if (status == BadDevice) { /* not open */ for (dev = inputInfo.off_devices; dev; dev = dev->next) if (dev->id == stuff->deviceid) diff --git a/Xi/setbmap.c b/Xi/setbmap.c index 3035c649e..f05225531 100644 --- a/Xi/setbmap.c +++ b/Xi/setbmap.c @@ -109,7 +109,7 @@ ProcXSetDeviceButtonMapping(ClientPtr client) rep.sequenceNumber = client->sequence; rep.status = MappingSuccess; - ret = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess); + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess); if (ret != Success) return ret; diff --git a/Xi/setmmap.c b/Xi/setmmap.c index be3d3cb6c..34efde595 100644 --- a/Xi/setmmap.c +++ b/Xi/setmmap.c @@ -98,7 +98,7 @@ ProcXSetDeviceModifierMapping(ClientPtr client) REQUEST(xSetDeviceModifierMappingReq); REQUEST_AT_LEAST_SIZE(xSetDeviceModifierMappingReq); - ret = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess); + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess); if (ret != Success) return ret; diff --git a/composite/compwindow.c b/composite/compwindow.c index 579236713..ee0f7d270 100644 --- a/composite/compwindow.c +++ b/composite/compwindow.c @@ -165,6 +165,29 @@ compCheckRedirect (WindowPtr pWin) return TRUE; } +static int +updateOverlayWindow(ScreenPtr pScreen) +{ + CompScreenPtr cs; + WindowPtr pWin; /* overlay window */ + XID vlist[2]; + + cs = GetCompScreen(pScreen); + if ((pWin = cs->pOverlayWin) != NULL) { + if ((pWin->drawable.width == pScreen->width) && + (pWin->drawable.height == pScreen->height)) + return Success; + + /* Let's resize the overlay window. */ + vlist[0] = pScreen->width; + vlist[1] = pScreen->height; + return ConfigureWindow(pWin, CWWidth | CWHeight, vlist, wClient(pWin)); + } + + /* Let's be on the safe side and not assume an overlay window is always allocated. */ + return Success; +} + Bool compPositionWindow (WindowPtr pWin, int x, int y) { @@ -203,6 +226,8 @@ compPositionWindow (WindowPtr pWin, int x, int y) cs->PositionWindow = pScreen->PositionWindow; pScreen->PositionWindow = compPositionWindow; compCheckTree (pWin->drawable.pScreen); + if (updateOverlayWindow(pScreen) != Success) + ret = FALSE; return ret; } diff --git a/configure.ac b/configure.ac index 566ddcbd0..10aa24158 100644 --- a/configure.ac +++ b/configure.ac @@ -368,6 +368,7 @@ AM_CONDITIONAL(PPC_VIDEO, [test "x$PPC_VIDEO" = xyes]) AM_CONDITIONAL(SPARC64_VIDEO, [test "x$SPARC64_VIDEO" = xyes]) DRI=no +DRI2=no KDRIVE_HW=no dnl it would be nice to autodetect these *CONS_SUPPORTs case $host_os in @@ -380,6 +381,7 @@ case $host_os in AC_DEFINE(PCVT_SUPPORT, 1, [System has PCVT console]) AC_DEFINE(SYSCONS_SUPPORT, 1, [System has syscons console]) DRI=yes + DRI2=yes ;; *netbsd*) AC_DEFINE(CSRG_BASED, 1, [System is BSD-like]) @@ -387,6 +389,7 @@ case $host_os in AC_DEFINE(PCVT_SUPPORT, 1, [System has PCVT console]) AC_DEFINE(WSCONS_SUPPORT, 1, [System has wscons console]) DRI=yes + DRI2=yes ;; *openbsd*) AC_DEFINE(CSRG_BASED, 1, [System is BSD-like]) @@ -395,6 +398,7 @@ case $host_os in ;; *linux*) DRI=yes + DRI2=yes KDRIVE_HW=yes ;; *solaris*) @@ -526,7 +530,7 @@ AC_ARG_ENABLE(composite, AS_HELP_STRING([--disable-composite], [Build Compo AC_ARG_ENABLE(mitshm, AS_HELP_STRING([--disable-shm], [Build SHM extension (default: enabled)]), [MITSHM=$enableval], [MITSHM=yes]) AC_ARG_ENABLE(xres, AS_HELP_STRING([--disable-xres], [Build XRes extension (default: enabled)]), [RES=$enableval], [RES=yes]) AC_ARG_ENABLE(xtrap, AS_HELP_STRING([--disable-xtrap], [Build XTrap extension (default: enabled)]), [XTRAP=$enableval], [XTRAP=yes]) -AC_ARG_ENABLE(record, AS_HELP_STRING([--disable-record], [Build Record extension (default: enabled)]), [RECORD=$enableval], [RECORD=yes]) +AC_ARG_ENABLE(record, AS_HELP_STRING([--disable-record], [Build Record extension (default: disabled)]), [RECORD=$enableval], [RECORD=no]) AC_ARG_ENABLE(xv, AS_HELP_STRING([--disable-xv], [Build Xv extension (default: enabled)]), [XV=$enableval], [XV=yes]) AC_ARG_ENABLE(xvmc, AS_HELP_STRING([--disable-xvmc], [Build XvMC extension (default: enabled)]), [XVMC=$enableval], [XVMC=yes]) AC_ARG_ENABLE(dga, AS_HELP_STRING([--disable-dga], [Build DGA extension (default: auto)]), [DGA=$enableval], [DGA=auto]) @@ -535,6 +539,7 @@ AC_ARG_ENABLE(xdmcp, AS_HELP_STRING([--disable-xdmcp], [Build XDMCP ext AC_ARG_ENABLE(xdm-auth-1, AS_HELP_STRING([--disable-xdm-auth-1], [Build XDM-Auth-1 extension (default: auto)]), [XDMAUTH=$enableval], [XDMAUTH=auto]) AC_ARG_ENABLE(glx, AS_HELP_STRING([--disable-glx], [Build GLX extension (default: enabled)]), [GLX=$enableval], [GLX=yes]) AC_ARG_ENABLE(dri, AS_HELP_STRING([--enable-dri], [Build DRI extension (default: auto)]), [DRI=$enableval]) +AC_ARG_ENABLE(dri2, AS_HELP_STRING([--enable-dri2], [Build DRI2 extension (default: auto)]), [DRI2=$enableval]) AC_ARG_ENABLE(xinerama, AS_HELP_STRING([--disable-xinerama], [Build Xinerama extension (default: enabled)]), [XINERAMA=$enableval], [XINERAMA=yes]) AC_ARG_ENABLE(xf86vidmode, AS_HELP_STRING([--disable-xf86vidmode], [Build XF86VidMode extension (default: auto)]), [XF86VIDMODE=$enableval], [XF86VIDMODE=auto]) AC_ARG_ENABLE(xf86misc, AS_HELP_STRING([--disable-xf86misc], [Build XF86Misc extension (default: auto)]), [XF86MISC=$enableval], [XF86MISC=auto]) @@ -857,6 +862,14 @@ if test "x$DRI" = xyes; then AC_SUBST(GL_CFLAGS) fi +AM_CONDITIONAL(DRI2, test "x$DRI2" = xyes) +if test "x$DRI2" = xyes; then + # FIXME: Bump the versions once we have releases of these. + AC_DEFINE(DRI2, 1, [Build DRI2 extension]) + PKG_CHECK_MODULES([DRIPROTO], [xf86driproto >= 2.0.3]) + PKG_CHECK_MODULES([LIBDRM], [libdrm >= 2.3.1]) +fi + AM_CONDITIONAL(XINERAMA, [test "x$XINERAMA" = xyes]) if test "x$XINERAMA" = xyes; then AC_DEFINE(XINERAMA, 1, [Support Xinerama extension]) @@ -2129,6 +2142,7 @@ hw/xfree86/doc/devel/Makefile hw/xfree86/doc/man/Makefile hw/xfree86/doc/sgml/Makefile hw/xfree86/dri/Makefile +hw/xfree86/dri2/Makefile hw/xfree86/dummylib/Makefile hw/xfree86/exa/Makefile hw/xfree86/fbdevhw/Makefile diff --git a/dix/devices.c b/dix/devices.c index f036985de..61b3b66af 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -743,7 +743,6 @@ FreeDeviceClass(int type, pointer *class) xfree((*p)); break; } - } *class = NULL; } @@ -1623,7 +1622,7 @@ DoSetModifierMapping(ClientPtr client, KeyCode *inputMap, } } - rc = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixSetAttrAccess); + rc = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixManageAccess); if (rc != Success) return rc; @@ -1762,7 +1761,7 @@ ProcChangeKeyboardMapping(ClientPtr client) for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->key) { - rc = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixSetAttrAccess); + rc = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixManageAccess); if (rc != Success) return rc; } @@ -1797,7 +1796,7 @@ DoSetPointerMapping(ClientPtr client, DeviceIntPtr device, BYTE *map, int n) for (dev = inputInfo.devices; dev; dev = dev->next) { if ((dev->coreEvents || dev == inputInfo.pointer) && dev->button) { - rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixSetAttrAccess); + rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixManageAccess); if (rc != Success) return rc; } @@ -2142,7 +2141,7 @@ ProcChangeKeyboardControl (ClientPtr client) for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->kbdfeed && pDev->kbdfeed->CtrlProc) { - ret = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixSetAttrAccess); + ret = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixManageAccess); if (ret != Success) return ret; } @@ -2298,7 +2297,7 @@ ProcChangePointerControl(ClientPtr client) for (mouse = inputInfo.devices; mouse; mouse = mouse->next) { if ((mouse->coreEvents || mouse == inputInfo.pointer) && mouse->ptrfeed && mouse->ptrfeed->CtrlProc) { - rc = XaceHook(XACE_DEVICE_ACCESS, client, mouse, DixSetAttrAccess); + rc = XaceHook(XACE_DEVICE_ACCESS, client, mouse, DixManageAccess); if (rc != Success) return rc; } diff --git a/dix/dispatch.c b/dix/dispatch.c index c7043ea8e..199c66b2f 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -417,17 +417,18 @@ Dispatch(void) } isItTimeToYield = FALSE; +#ifdef XPRINT requestingClient = client; +#endif #ifdef SMART_SCHEDULE start_tick = SmartScheduleTime; #endif while (!isItTimeToYield) { if (*icheck[0] != *icheck[1]) - { ProcessInputEvents(); - FlushIfCriticalOutputPending(); - } + + FlushIfCriticalOutputPending(); #ifdef SMART_SCHEDULE if (!SmartScheduleDisable && (SmartScheduleTime - start_tick) >= SmartScheduleSlice) @@ -483,9 +484,6 @@ Dispatch(void) client->errorValue, result); break; } -#ifdef DAMAGEEXT - FlushIfCriticalOutputPending (); -#endif } FlushAllOutput(); #ifdef SMART_SCHEDULE @@ -493,7 +491,9 @@ Dispatch(void) if (client) client->smart_stop_tick = SmartScheduleTime; #endif +#ifdef XPRINT requestingClient = NULL; +#endif } dispatchException &= ~DE_PRIORITYCHANGE; } @@ -995,8 +995,8 @@ ProcSetSelectionOwner(ClientPtr client) { int i = 0; - rc = XaceHook(XACE_SELECTION_ACCESS, client, stuff->selection, - DixSetAttrAccess); + rc = XaceHookSelectionAccess(client, stuff->selection, + DixSetAttrAccess); if (rc != Success) return rc; @@ -1082,8 +1082,7 @@ ProcGetSelectionOwner(ClientPtr client) int rc, i; xGetSelectionOwnerReply reply; - rc = XaceHook(XACE_SELECTION_ACCESS, client, stuff->id, - DixGetAttrAccess); + rc = XaceHookSelectionAccess(client, stuff->id, DixGetAttrAccess); if (rc != Success) return rc; @@ -1128,8 +1127,7 @@ ProcConvertSelection(ClientPtr client) rc = dixLookupWindow(&pWin, stuff->requestor, client, DixSetAttrAccess); if (rc != Success) return rc; - rc = XaceHook(XACE_SELECTION_ACCESS, client, stuff->selection, - DixReadAccess); + rc = XaceHookSelectionAccess(client, stuff->selection, DixReadAccess); if (rc != Success) return rc; @@ -2538,7 +2536,7 @@ ProcFreeColormap(ClientPtr client) else { client->errorValue = stuff->id; - return rc; + return (rc == BadValue) ? BadColor : rc; } } @@ -2567,7 +2565,7 @@ ProcCopyColormapAndFree(ClientPtr client) else { client->errorValue = stuff->srcCmap; - return rc; + return (rc == BadValue) ? BadColor : rc; } } @@ -2659,7 +2657,7 @@ ProcListInstalledColormaps(ClientPtr client) xfree(preply); rc = client->noClientException; out: - return (rc == BadValue) ? BadColor : rc; + return rc; } int diff --git a/dix/dixfonts.c b/dix/dixfonts.c index 4cc8d7188..0e6fa0300 100644 --- a/dix/dixfonts.c +++ b/dix/dixfonts.c @@ -1644,9 +1644,6 @@ FreeFontPath(FontPathElementPtr *list, int n, Bool force) found++; } if (list[i]->refcount != found) { - ErrorF("[dix] FreeFontPath: FPE \"%.*s\" refcount is %d, should be %d; fixing.\n", - list[i]->name_length, list[i]->name, - list[i]->refcount, found); list[i]->refcount = found; /* ensure it will get freed */ } } @@ -1934,12 +1931,15 @@ GetDefaultPointSize () FontResolutionPtr GetClientResolutions (int *num) { +#ifdef XPRINT if (requestingClient && requestingClient->fontResFunc != NULL && !requestingClient->clientGone) { return (*requestingClient->fontResFunc)(requestingClient, num); } - else { + else +#endif + { static struct _FontResolution res; ScreenPtr pScreen; diff --git a/dix/dixutils.c b/dix/dixutils.c index dd485d518..aaf510623 100644 --- a/dix/dixutils.c +++ b/dix/dixutils.c @@ -816,16 +816,8 @@ _DeleteCallbackList( *pcbl = NULL; } -static CallbackFuncsRec default_cbfuncs = -{ - _AddCallback, - _DeleteCallback, - _CallCallbacks, - _DeleteCallbackList -}; - static Bool -CreateCallbackList(CallbackListPtr *pcbl, CallbackFuncsPtr cbfuncs) +CreateCallbackList(CallbackListPtr *pcbl) { CallbackListPtr cbl; int i; @@ -833,7 +825,6 @@ CreateCallbackList(CallbackListPtr *pcbl, CallbackFuncsPtr cbfuncs) if (!pcbl) return FALSE; cbl = (CallbackListPtr) xalloc(sizeof(CallbackListRec)); if (!cbl) return FALSE; - cbl->funcs = cbfuncs ? *cbfuncs : default_cbfuncs; cbl->inCallback = 0; cbl->deleted = FALSE; cbl->numDeleted = 0; @@ -864,31 +855,31 @@ AddCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, pointer data) if (!pcbl) return FALSE; if (!*pcbl) { /* list hasn't been created yet; go create it */ - if (!CreateCallbackList(pcbl, (CallbackFuncsPtr)NULL)) + if (!CreateCallbackList(pcbl)) return FALSE; } - return ((*(*pcbl)->funcs.AddCallback) (pcbl, callback, data)); + return _AddCallback(pcbl, callback, data); } _X_EXPORT Bool DeleteCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, pointer data) { if (!pcbl || !*pcbl) return FALSE; - return ((*(*pcbl)->funcs.DeleteCallback) (pcbl, callback, data)); + return _DeleteCallback(pcbl, callback, data); } void CallCallbacks(CallbackListPtr *pcbl, pointer call_data) { if (!pcbl || !*pcbl) return; - (*(*pcbl)->funcs.CallCallbacks) (pcbl, call_data); + _CallCallbacks(pcbl, call_data); } void DeleteCallbackList(CallbackListPtr *pcbl) { if (!pcbl || !*pcbl) return; - (*(*pcbl)->funcs.DeleteCallbackList) (pcbl); + _DeleteCallbackList(pcbl); } void diff --git a/dix/getevents.c b/dix/getevents.c index 753790653..b2be9bd3d 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -358,10 +358,13 @@ clipAxis(DeviceIntPtr pDev, int axisNum, int *val) { AxisInfoPtr axes = pDev->valuator->axes + axisNum; - if (*val < axes->min_value) - *val = axes->min_value; - if (axes->max_value >= 0 && *val > axes->max_value) - *val = axes->max_value; + /* No clipping if the value-range <= 0 */ + if(axes->min_value < axes->min_value) { + if (*val < axes->min_value) + *val = axes->min_value; + if (*val > axes->max_value) + *val = axes->max_value; + } } /** @@ -660,10 +663,6 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, CARD32 ms = 0; deviceKeyButtonPointer *kbp = NULL; DeviceIntPtr master; - - /* Thanks to a broken lib, we _always_ have to chase DeviceMotionNotifies - * with DeviceValuators. */ - Bool sendValuators = (type == MotionNotify || flags & POINTER_ABSOLUTE); int x = 0, y = 0; /* The core pointer must not send Xi events. */ Bool coreOnly = (pDev == inputInfo.pointer); @@ -701,7 +700,7 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, } /* Do we need to send a DeviceValuator event? */ - if (!coreOnly && sendValuators) { + if (!coreOnly && num_valuators) { if ((((num_valuators - 1) / 6) + 1) > MAX_VALUATOR_EVENTS) num_valuators = MAX_VALUATOR_EVENTS * 6; num_events += ((num_valuators - 1) / 6) + 1; @@ -793,7 +792,7 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, kbp->root_y = y; events++; - if (sendValuators) { + if (num_valuators) { kbp->deviceid |= MORE_EVENTS; clipValuators(pDev, first_valuator, num_valuators, valuators); events = getValuatorEvents(events, pDev, first_valuator, diff --git a/dix/globals.c b/dix/globals.c index d76b604da..7f95eabd5 100644 --- a/dix/globals.c +++ b/dix/globals.c @@ -143,7 +143,9 @@ Bool loadableFonts = FALSE; CursorPtr rootCursor; Bool blackRoot=FALSE; Bool whiteRoot=FALSE; +#ifdef XPRINT ClientPtr requestingClient; /* XXX this should be obsolete now, remove? */ +#endif _X_EXPORT TimeStamp currentTime; _X_EXPORT TimeStamp lastDeviceEventTime; diff --git a/dix/main.c b/dix/main.c index 63e3273c6..d229c192e 100644 --- a/dix/main.c +++ b/dix/main.c @@ -137,8 +137,6 @@ _X_EXPORT PaddingInfo PixmapWidthPaddingInfo[33]; int connBlockScreenStart; -static int restart = 0; - _X_EXPORT void NotImplemented(xEvent *from, xEvent *to) { @@ -264,13 +262,6 @@ main(int argc, char *argv[], char *envp[]) DarwinHandleGUI(argc, argv, envp); #endif - /* Notice if we're restarted. Probably this is because we jumped through - * an uninitialized pointer */ - if (restart) - FatalError("server restarted. Jumped through uninitialized pointer?\n"); - else - restart = 1; - CheckUserParameters(argc, argv, envp); CheckUserAuthorization(); diff --git a/dix/property.c b/dix/property.c index 45b32bc7f..8cc4fefb7 100644 --- a/dix/property.c +++ b/dix/property.c @@ -156,8 +156,8 @@ ProcRotateProperties(ClientPtr client) xfree(props); return BadMatch; } - rc = XaceHook(XACE_PROPERTY_ACCESS, client, pWin, pProp, - DixReadAccess|DixWriteAccess); + rc = XaceHookPropertyAccess(client, pWin, pProp, + DixReadAccess|DixWriteAccess); if (rc != Success) { xfree(props); client->errorValue = atoms[i]; @@ -276,8 +276,8 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property, memmove((char *)data, (char *)value, totalSize); pProp->size = len; pProp->devPrivates = NULL; - rc = XaceHook(XACE_PROPERTY_ACCESS, pClient, pWin, pProp, - DixCreateAccess|DixWriteAccess); + rc = XaceHookPropertyAccess(pClient, pWin, pProp, + DixCreateAccess|DixWriteAccess); if (rc != Success) { xfree(data); xfree(pProp); @@ -289,8 +289,7 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property, } else { - rc = XaceHook(XACE_PROPERTY_ACCESS, pClient, pWin, pProp, - DixWriteAccess); + rc = XaceHookPropertyAccess(pClient, pWin, pProp, DixWriteAccess); if (rc != Success) { pClient->errorValue = property; return rc; @@ -382,8 +381,7 @@ DeleteProperty(ClientPtr client, WindowPtr pWin, Atom propName) } if (pProp) { - rc = XaceHook(XACE_PROPERTY_ACCESS, client, pWin, pProp, - DixDestroyAccess); + rc = XaceHookPropertyAccess(client, pWin, pProp, DixDestroyAccess); if (rc != Success) return rc; @@ -502,7 +500,7 @@ ProcGetProperty(ClientPtr client) if (stuff->delete) access_mode |= DixDestroyAccess; - rc = XaceHook(XACE_PROPERTY_ACCESS, client, pWin, pProp, access_mode); + rc = XaceHookPropertyAccess(client, pWin, pProp, access_mode); if (rc != Success) { client->errorValue = stuff->property; return rc; diff --git a/dix/resource.c b/dix/resource.c index dfc7bead0..81b2e95a7 100644 --- a/dix/resource.c +++ b/dix/resource.c @@ -535,7 +535,6 @@ FreeResource(XID id, RESTYPE skipDeleteFuncType) ResourcePtr *prev, *head; int *eltptr; int elements; - Bool gotOne = FALSE; if (((cid = CLIENT_ID(id)) < MAXCLIENTS) && clientTable[cid].buckets) { @@ -563,15 +562,11 @@ FreeResource(XID id, RESTYPE skipDeleteFuncType) xfree(res); if (*eltptr != elements) prev = head; /* prev may no longer be valid */ - gotOne = TRUE; } else prev = &res->next; } } - if (!gotOne) - ErrorF("[dix] Freeing resource id=%lX which isn't there.\n", - (unsigned long)id); } diff --git a/dix/window.c b/dix/window.c index a941dacd7..ee4c75649 100644 --- a/dix/window.c +++ b/dix/window.c @@ -305,9 +305,8 @@ SetWindowToDefaults(WindowPtr pWin) pWin->deliverableEvents = 0; pWin->dontPropagate = 0; pWin->forcedBS = FALSE; -#ifdef COMPOSITE pWin->redirectDraw = RedirectDrawNone; -#endif + pWin->forcedBG = FALSE; sem = xcalloc(1, sizeof(FocusSemaphoresRec)); dixSetPrivate(&pWin->devPrivates, FocusPrivatesKey, sem); @@ -734,8 +733,8 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, return NullWindow; } - pWin->backgroundState = XaceBackgroundNoneState; - pWin->background.pixel = 0; + pWin->backgroundState = XaceBackgroundNoneState(pWin); + pWin->background.pixel = pScreen->whitePixel; pWin->borderIsPixel = pParent->borderIsPixel; pWin->border = pParent->border; @@ -1066,8 +1065,8 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) if (!pWin->parent) MakeRootTile(pWin); else { - pWin->backgroundState = XaceBackgroundNoneState; - pWin->background.pixel = 0; + pWin->backgroundState = XaceBackgroundNoneState(pWin); + pWin->background.pixel = pScreen->whitePixel; } } else if (pixID == ParentRelative) @@ -2205,7 +2204,7 @@ WhereDoIGoInTheStack( return pWin->nextSib; default: { - ErrorF("[dix] Internal error in ConfigureWindow, smode == %d\n",smode ); + /* should never happen; make something up. */ return pWin->nextSib; } } diff --git a/exa/exa_render.c b/exa/exa_render.c index a510e54f6..38e2a04bd 100644 --- a/exa/exa_render.c +++ b/exa/exa_render.c @@ -587,7 +587,6 @@ exaComposite(CARD8 op, int ret = -1; Bool saveSrcRepeat = pSrc->repeat; Bool saveMaskRepeat = pMask ? pMask->repeat : 0; - PixmapPtr pSrcPixmap = NULL; RegionRec region; /* We currently don't support acceleration of gradients, or other pictures @@ -624,7 +623,9 @@ exaComposite(CARD8 op, if (ret == 1) goto done; } - else if (pSrcPixmap && !pSrc->repeat && !pSrc->transform) + else if (pSrc->pDrawable != NULL && + !pSrc->repeat && + !pSrc->transform) { xDst += pDst->pDrawable->x; yDst += pDst->pDrawable->y; @@ -644,7 +645,9 @@ exaComposite(CARD8 op, REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); goto done; } - else if (pSrcPixmap && !pSrc->transform && + else if (pSrc->pDrawable != NULL && + pSrc->pDrawable->type == DRAWABLE_PIXMAP && + !pSrc->transform && pSrc->repeatType == RepeatNormal) { DDXPointRec srcOrg; @@ -671,10 +674,11 @@ exaComposite(CARD8 op, width, height)) goto done; - srcOrg.x = (xSrc - xDst) % pSrcPixmap->drawable.width; - srcOrg.y = (ySrc - yDst) % pSrcPixmap->drawable.height; + srcOrg.x = (xSrc - xDst) % pSrc->pDrawable->width; + srcOrg.y = (ySrc - yDst) % pSrc->pDrawable->height; - ret = exaFillRegionTiled(pDst->pDrawable, ®ion, pSrcPixmap, + ret = exaFillRegionTiled(pDst->pDrawable, ®ion, + (PixmapPtr)pSrc->pDrawable, &srcOrg, FB_ALLONES, GXcopy); REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); @@ -692,8 +696,6 @@ exaComposite(CARD8 op, pMask->repeat = 0; if (pExaScr->info->PrepareComposite && - (!pSrc->repeat || pSrc->repeatType == RepeatNormal) && - (!pMask || !pMask->repeat || pMask->repeatType == RepeatNormal) && !pSrc->alphaMap && (!pMask || !pMask->alphaMap) && !pDst->alphaMap) { Bool isSrcSolid; @@ -2087,11 +2087,6 @@ fbFillRegionSolid (DrawablePtr pDrawable, FbBits and, FbBits xor); -void -fbFillRegionTiled (DrawablePtr pDrawable, - RegionPtr pRegion, - PixmapPtr pTile); - pixman_image_t *image_from_pict (PicturePtr pict, Bool has_clip); void free_pixman_pict (PicturePtr, pixman_image_t *); diff --git a/fb/fbwindow.c b/fb/fbwindow.c index 89f601f29..f6fe8aa83 100644 --- a/fb/fbwindow.c +++ b/fb/fbwindow.c @@ -250,68 +250,3 @@ fbFillRegionSolid (DrawablePtr pDrawable, fbFinishAccess (pDrawable); } - -#ifdef PANORAMIX -#include "panoramiX.h" -#include "panoramiXsrv.h" -#endif - -void -fbFillRegionTiled (DrawablePtr pDrawable, - RegionPtr pRegion, - PixmapPtr pTile) -{ - FbBits *dst; - FbStride dstStride; - int dstBpp; - int dstXoff, dstYoff; - FbBits *tile; - FbStride tileStride; - int tileBpp; - int tileXoff, tileYoff; /* XXX assumed to be zero */ - int tileWidth, tileHeight; - int n = REGION_NUM_RECTS(pRegion); - BoxPtr pbox = REGION_RECTS(pRegion); - int xRot = pDrawable->x; - int yRot = pDrawable->y; - -#ifdef PANORAMIX - if(!noPanoramiXExtension) - { - int index = pDrawable->pScreen->myNum; - if(&WindowTable[index]->drawable == pDrawable) - { - xRot -= panoramiXdataPtr[index].x; - yRot -= panoramiXdataPtr[index].y; - } - } -#endif - fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); - fbGetDrawable (&pTile->drawable, tile, tileStride, tileBpp, tileXoff, tileYoff); - tileWidth = pTile->drawable.width; - tileHeight = pTile->drawable.height; - xRot += dstXoff; - yRot += dstYoff; - - while (n--) - { - fbTile (dst + (pbox->y1 + dstYoff) * dstStride, - dstStride, - (pbox->x1 + dstXoff) * dstBpp, - (pbox->x2 - pbox->x1) * dstBpp, - pbox->y2 - pbox->y1, - tile, - tileStride, - tileWidth * dstBpp, - tileHeight, - GXcopy, - FB_ALLONES, - dstBpp, - xRot * dstBpp, - yRot - (pbox->y1 + dstYoff)); - pbox++; - } - - fbFinishAccess (&pTile->drawable); - fbFinishAccess (pDrawable); -} diff --git a/fb/wfbrename.h b/fb/wfbrename.h index 93822442f..dc0528559 100644 --- a/fb/wfbrename.h +++ b/fb/wfbrename.h @@ -79,7 +79,6 @@ #define fbExpandDirectColors wfbExpandDirectColors #define fbFill wfbFill #define fbFillRegionSolid wfbFillRegionSolid -#define fbFillRegionTiled wfbFillRegionTiled #define fbFillSpans wfbFillSpans #define fbFixCoordModePrevious wfbFixCoordModePrevious #define fbGCFuncs wfbGCFuncs diff --git a/hw/dmx/examples/ev.c b/hw/dmx/examples/ev.c index 10912266d..ba45c2b25 100644 --- a/hw/dmx/examples/ev.c +++ b/hw/dmx/examples/ev.c @@ -174,7 +174,7 @@ int main(int argc, char **argv) } printf("\n"); } - printf("rc = %d, errno = %d (%s)\n", rc, errno, strerror(errno)); + printf("rc = %d, (%s)\n", rc, strerror(errno)); close(fd); } } diff --git a/hw/dmx/examples/xinput.c b/hw/dmx/examples/xinput.c index 74353a93b..b6753e4ec 100644 --- a/hw/dmx/examples/xinput.c +++ b/hw/dmx/examples/xinput.c @@ -38,7 +38,7 @@ #include <X11/XKBlib.h> #include <X11/extensions/XInput.h> #include <X11/extensions/XKB.h> -#include <X11/extensions/XKBstr.h> +#include "xkbstr.h" #include <X11/extensions/dmxext.h> #include <sys/time.h> diff --git a/hw/dmx/examples/xled.c b/hw/dmx/examples/xled.c index 270f80511..322dda2f3 100644 --- a/hw/dmx/examples/xled.c +++ b/hw/dmx/examples/xled.c @@ -37,7 +37,7 @@ #include <X11/Xlib.h> #include <X11/XKBlib.h> #include <X11/extensions/XKB.h> -#include <X11/extensions/XKBstr.h> +#include "xkbstr.h" #include <sys/time.h> int main(int argc, char **argv) diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c index 6771cf1de..85e0f8701 100644 --- a/hw/dmx/glxProxy/glxcmds.c +++ b/hw/dmx/glxProxy/glxcmds.c @@ -66,7 +66,6 @@ #ifdef PANORAMIX #include "panoramiXsrv.h" -extern XID *PanoramiXVisualTable; #endif extern __GLXFBConfig **__glXFBConfigs; @@ -2824,14 +2823,8 @@ int __glXGetFBConfigs(__GLXclientState *cl, GLbyte *pc) #ifdef PANORAMIX else if (!noPanoramiXExtension) { /* convert the associated visualId to the panoramix one */ - for (v=0; v<255; v++) { - if ( PanoramiXVisualTable[ v * MAXSCREENS + screen ] == - associatedVisualId ) { - associatedVisualId = v; - break; - } - } - pFBConfig->associatedVisualId = associatedVisualId; + pFBConfig->associatedVisualId = + PanoramiXTranslateVisualID(screen, v); } #endif } diff --git a/hw/kdrive/ephyr/XF86dri.c b/hw/kdrive/ephyr/XF86dri.c index c11da0634..506d7bed8 100644 --- a/hw/kdrive/ephyr/XF86dri.c +++ b/hw/kdrive/ephyr/XF86dri.c @@ -385,7 +385,7 @@ Bool XF86DRICreateContext(dpy, screen, visual, context, hHWContext) context, hHWContext ); } -Bool XF86DRIDestroyContext( __DRInativeDisplay * ndpy, int screen, __DRIid context) +GLboolean XF86DRIDestroyContext( __DRInativeDisplay * ndpy, int screen, __DRIid context) { Display * const dpy = (Display *) ndpy; XExtDisplayInfo *info = find_display (dpy); @@ -406,7 +406,7 @@ Bool XF86DRIDestroyContext( __DRInativeDisplay * ndpy, int screen, __DRIid conte return True; } -Bool +GLboolean XF86DRICreateDrawable (__DRInativeDisplay * ndpy, int screen, __DRIid drawable, drm_drawable_t * hHWDrawable) { @@ -437,7 +437,7 @@ XF86DRICreateDrawable (__DRInativeDisplay * ndpy, int screen, return True; } -Bool XF86DRIDestroyDrawable( __DRInativeDisplay * ndpy, int screen, +GLboolean XF86DRIDestroyDrawable( __DRInativeDisplay * ndpy, int screen, __DRIid drawable ) { Display * const dpy = (Display *) ndpy; diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c index 90aadf0f2..e892a9b0f 100644 --- a/hw/kdrive/ephyr/ephyr.c +++ b/hw/kdrive/ephyr/ephyr.c @@ -841,6 +841,39 @@ miPointerScreenFuncRec ephyrPointerScreenFuncs = ephyrWarpCursor }; +#ifdef XEPHYR_DRI +/** + * find if the remote window denoted by a_remote + * is paired with an internal Window within the Xephyr server. + * If the remove window is paired with an internal window, send an + * expose event to the client insterested in the internal window expose event. + * + * Pairing happens when a drawable inside Xephyr is associated with + * a GL surface in a DRI environment. + * Look at the function ProcXF86DRICreateDrawable in ephyrdriext.c to + * know a paired window is created. + * + * This is useful to make GL drawables (only windows for now) handle + * expose events and send those events to clients. + */ +static void +ephyrExposePairedWindow (int a_remote) +{ + EphyrWindowPair *pair = NULL; + RegionRec reg; + ScreenPtr screen; + + if (!findWindowPairFromRemote (a_remote, &pair)) { + EPHYR_LOG ("did not find a pair for this window\n"); + return; + } + screen = pair->local->drawable.pScreen; + REGION_NULL (screen, ®); + REGION_COPY (screen, ®, &pair->local->clipList); + screen->WindowExposures (pair->local, ®, NullRegion); + REGION_UNINIT (screen, ®); +} +#endif /*XEPHYR_DRI*/ void ephyrPoll(void) @@ -861,9 +894,13 @@ ephyrPoll(void) if (ephyrCurScreen != ev.data.mouse_motion.screen) { EPHYR_LOG ("warping mouse cursor:%d\n", ephyrCurScreen) ; - ephyrWarpCursor(screenInfo.screens[ev.data.mouse_motion.screen], - ev.data.mouse_motion.x, - ev.data.mouse_motion.y ); + if (ev.data.mouse_motion.screen >= 0) + { + ephyrWarpCursor + (screenInfo.screens[ev.data.mouse_motion.screen], + ev.data.mouse_motion.x, + ev.data.mouse_motion.y ); + } } else { @@ -913,6 +950,18 @@ ephyrPoll(void) KdEnqueueKeyboardEvent (ephyrKbd, ev.data.key_up.scancode, TRUE); break; +#ifdef XEPHYR_DRI + case EPHYR_EV_EXPOSE: + /* + * We only receive expose events when the expose event have + * be generated for a drawable that is a host X window managed + * by Xephyr. Host X windows managed by Xephyr exists for instance + * when Xephyr is asked to create a GL drawable in a DRI environment. + */ + ephyrExposePairedWindow (ev.data.expose.window); + break; +#endif /*XEPHYR_DRI*/ + default: break; } diff --git a/hw/kdrive/ephyr/ephyrdriext.c b/hw/kdrive/ephyr/ephyrdriext.c index 1b9dce5c8..fafe56d1f 100644 --- a/hw/kdrive/ephyr/ephyrdriext.c +++ b/hw/kdrive/ephyr/ephyrdriext.c @@ -59,10 +59,6 @@ #define _HAVE_XALLOC_DECLS #include "ephyrlog.h" -typedef struct { - WindowPtr local ; - int remote ; -} EphyrWindowPair; typedef struct { int foo; @@ -950,6 +946,26 @@ findWindowPairFromLocal (WindowPtr a_local, return FALSE ; } +Bool +findWindowPairFromRemote (int a_remote, + EphyrWindowPair **a_pair) +{ + int i=0 ; + + EPHYR_RETURN_VAL_IF_FAIL (a_pair, FALSE) ; + + for (i=0; i < NUM_WINDOW_PAIRS; i++) { + if (window_pairs[i].remote == a_remote) { + *a_pair = &window_pairs[i] ; + EPHYR_LOG ("found (%p, %d)\n", + (*a_pair)->local, + (*a_pair)->remote) ; + return TRUE ; + } + } + return FALSE ; +} + static Bool createHostPeerWindow (const WindowPtr a_win, int *a_peer_win) diff --git a/hw/kdrive/ephyr/ephyrdriext.h b/hw/kdrive/ephyr/ephyrdriext.h index 66af833b9..01c9421fb 100644 --- a/hw/kdrive/ephyr/ephyrdriext.h +++ b/hw/kdrive/ephyr/ephyrdriext.h @@ -27,6 +27,16 @@ */ #ifndef __EPHYRDRIEXT_H__ #define __EPHYRDRIEXT_H__ + +typedef struct { + WindowPtr local ; + int remote ; +} EphyrWindowPair; + Bool ephyrDRIExtensionInit (ScreenPtr a_screen) ; + +Bool findWindowPairFromRemote (int a_remote, + EphyrWindowPair **a_pair); + #endif /*__EPHYRDRIEXT_H__*/ diff --git a/hw/kdrive/ephyr/ephyrglxext.c b/hw/kdrive/ephyr/ephyrglxext.c index 381c9d7ed..43a634d24 100644 --- a/hw/kdrive/ephyr/ephyrglxext.c +++ b/hw/kdrive/ephyr/ephyrglxext.c @@ -362,7 +362,7 @@ ephyrGLXQueryServerString(__GLXclientState *a_cl, GLbyte *a_pc) ClientPtr client = a_cl->client; xGLXQueryServerStringReq *req = (xGLXQueryServerStringReq *) a_pc; xGLXQueryServerStringReply reply; - char *server_string=NULL ; + char *server_string=NULL, *buf=NULL; int length=0 ; EPHYR_LOG ("enter\n") ; @@ -379,9 +379,15 @@ ephyrGLXQueryServerString(__GLXclientState *a_cl, GLbyte *a_pc) reply.sequenceNumber = client->sequence ; reply.length = __GLX_PAD (length) >> 2 ; reply.n = length ; + buf = xcalloc (reply.length << 2, 1); + if (!buf) { + EPHYR_LOG_ERROR ("failed to allocate string\n;"); + return BadAlloc; + } + memcpy (buf, server_string, length); WriteToClient(client, sz_xGLXQueryServerStringReply, (char*)&reply); - WriteToClient(client, (int)length, server_string); + WriteToClient(client, (int)(reply.length << 2), server_string); res = Success ; @@ -391,6 +397,10 @@ out: xfree (server_string) ; server_string = NULL; } + if (buf) { + xfree (buf); + buf = NULL; + } return res ; } diff --git a/hw/kdrive/ephyr/ephyrhostglx.c b/hw/kdrive/ephyr/ephyrhostglx.c index 5d9a482e8..f5db5be16 100644 --- a/hw/kdrive/ephyr/ephyrhostglx.c +++ b/hw/kdrive/ephyr/ephyrhostglx.c @@ -151,6 +151,7 @@ ephyrHostGLXGetStringFromServer (int a_screen_number, { Bool is_ok=FALSE ; Display *dpy = hostx_get_display () ; + int default_screen = DefaultScreen (dpy); xGLXGenericGetStringReq *req=NULL; xGLXSingleReply reply; int length=0, numbytes=0, major_opcode=0, get_string_op=0; @@ -188,13 +189,17 @@ ephyrHostGLXGetStringFromServer (int a_screen_number, GetReq (GLXGenericGetString, req); req->reqType = major_opcode; req->glxCode = get_string_op; - req->for_whom = DefaultScreen (dpy); + req->for_whom = default_screen; req->name = a_string_name; _XReply (dpy, (xReply *)&reply, 0, False); length = reply.length * 4; - numbytes = reply.size; + if (!length) { + numbytes = 0; + } else { + numbytes = reply.size; + } EPHYR_LOG ("going to get a string of size:%d\n", numbytes) ; *a_string = (char *) Xmalloc (numbytes +1); diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c index a5413b876..ae1bb4bf9 100644 --- a/hw/kdrive/ephyr/hostx.c +++ b/hw/kdrive/ephyr/hostx.c @@ -839,16 +839,38 @@ hostx_load_keymap(void) static struct EphyrHostScreen * host_screen_from_window (Window w) { - int index; + int index = 0; + struct EphyrHostScreen *result = NULL; +#if 0 + unsigned int num_children = 0; + Window root = None, parent = None, *children = NULL; +#endif for (index = 0 ; index < HostX.n_screens ; index++) { if (HostX.screens[index].win == w) { - return &HostX.screens[index]; + result = &HostX.screens[index]; + goto out; } } - return NULL; +#if 0 + XQueryTree (hostx_get_display (), w, &root, &parent, + &children, &num_children); + if (parent == root || parent == None) + goto out; + result = host_screen_from_window (parent); +#endif + +out: +#if 0 + if (children) + { + XFree (children); + children = NULL; + } +#endif + return result; } int @@ -870,9 +892,19 @@ hostx_get_event(EphyrHostXEvent *ev) { struct EphyrHostScreen *host_screen = host_screen_from_window (xev.xexpose.window); - hostx_paint_rect (host_screen->info, 0, 0, 0, 0, - host_screen->win_width, - host_screen->win_height); + if (host_screen) + { + hostx_paint_rect (host_screen->info, 0, 0, 0, 0, + host_screen->win_width, + host_screen->win_height); + } + else + { + EPHYR_LOG_ERROR ("failed to get host screen\n"); + ev->type = EPHYR_EV_EXPOSE; + ev->data.expose.window = xev.xexpose.window; + return 1; + } } return 0; @@ -1113,12 +1145,18 @@ hostx_create_window (int a_screen_number, visual_info->screen), visual_info->visual, AllocNone) ; - winmask = CWColormap; + attrs.event_mask = ButtonPressMask + |ButtonReleaseMask + |PointerMotionMask + |KeyPressMask + |KeyReleaseMask + |ExposureMask; + winmask = CWColormap|CWEventMask; win = XCreateWindow (dpy, hostx_get_window (a_screen_number), a_geometry->x, a_geometry->y, a_geometry->width, a_geometry->height, 0, - visual_info->depth, InputOutput, + visual_info->depth, CopyFromParent, visual_info->visual, winmask, &attrs) ; if (win == None) { EPHYR_LOG_ERROR ("failed to create peer window\n") ; diff --git a/hw/kdrive/ephyr/hostx.h b/hw/kdrive/ephyr/hostx.h index 3caa466a7..f72cfe700 100644 --- a/hw/kdrive/ephyr/hostx.h +++ b/hw/kdrive/ephyr/hostx.h @@ -47,7 +47,8 @@ typedef enum EphyrHostXEventType EPHYR_EV_MOUSE_PRESS, EPHYR_EV_MOUSE_RELEASE, EPHYR_EV_KEY_PRESS, - EPHYR_EV_KEY_RELEASE + EPHYR_EV_KEY_RELEASE, + EPHYR_EV_EXPOSE } EphyrHostXEventType; @@ -87,6 +88,10 @@ struct EphyrHostXEvent int scancode; } key_down; + struct expose { + int window; + } expose; + } data; int key_state; diff --git a/hw/kdrive/linux/linux.c b/hw/kdrive/linux/linux.c index 23cd8f59f..258dc7b81 100644 --- a/hw/kdrive/linux/linux.c +++ b/hw/kdrive/linux/linux.c @@ -441,7 +441,7 @@ LinuxFini (void) memset (&vts, '\0', sizeof (vts)); /* valgrind */ ioctl (fd, VT_GETSTATE, &vts); if (ioctl (fd, VT_DISALLOCATE, vtno) < 0) - fprintf (stderr, "Can't deallocate console %d errno %d\n", vtno, errno); + fprintf (stderr, "Can't deallocate console %d %s\n", vtno, strerror(errno)); close (fd); } return; diff --git a/hw/kdrive/src/kaa.c b/hw/kdrive/src/kaa.c index e75b08399..db09e9dba 100644 --- a/hw/kdrive/src/kaa.c +++ b/hw/kdrive/src/kaa.c @@ -996,18 +996,6 @@ kaaFillRegionSolid (DrawablePtr pDrawable, kaaDrawableDirty (pDrawable); } -#if 0 -static void -kaaFillRegionTiled (DrawablePtr pDrawable, - RegionPtr pRegion, - Pixmap pTile) -{ - else - { - kaaWaitSync -} -#endif - Bool kaaDrawInit (ScreenPtr pScreen, KaaScreenInfoPtr pScreenInfo) diff --git a/hw/kdrive/src/kmap.c b/hw/kdrive/src/kmap.c index b92c1a84f..ce1e28ae4 100644 --- a/hw/kdrive/src/kmap.c +++ b/hw/kdrive/src/kmap.c @@ -132,8 +132,8 @@ KdSetMappedMode (CARD32 addr, CARD32 size, int mode) sentry.type = type; if (ioctl (mtrr, MTRRIOC_ADD_ENTRY, &sentry) < 0) - ErrorF ("MTRRIOC_ADD_ENTRY failed 0x%x 0x%x %d (errno %d)\n", - base, bound - base, type, errno); + ErrorF ("MTRRIOC_ADD_ENTRY failed 0x%x 0x%x %d (%s)\n", + base, bound - base, type, strerror(errno)); } #endif } @@ -171,8 +171,8 @@ KdResetMappedMode (CARD32 addr, CARD32 size, int mode) sentry.type = type; if (ioctl (mtrr, MTRRIOC_DEL_ENTRY, &sentry) < 0) - ErrorF ("MTRRIOC_DEL_ENTRY failed 0x%x 0x%x %d (errno %d)\n", - base, bound - base, type, errno); + ErrorF ("MTRRIOC_DEL_ENTRY failed 0x%x 0x%x %d (%s)\n", + base, bound - base, type, strerror(errno)); } #endif } diff --git a/hw/kdrive/vesa/vm86.c b/hw/kdrive/vesa/vm86.c index 78fc593a7..0f7bb2262 100644 --- a/hw/kdrive/vesa/vm86.c +++ b/hw/kdrive/vesa/vm86.c @@ -567,7 +567,7 @@ vm86_loop(Vm86InfoPtr vi) if(errno == ENOSYS) { ErrorF("No vm86 support. Are you running on AMD64?\n"); } else { - ErrorF("vm86 failed (errno = %d).\n", errno); + ErrorF("vm86 failed (%s).\n", strerror(errno)); Vm86Debug(vi); } } else { diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c index a00f7a5bb..1edceb930 100644 --- a/hw/vfb/InitOutput.c +++ b/hw/vfb/InitOutput.c @@ -179,8 +179,8 @@ ddxGiveUp() if (-1 == unlink(vfbScreens[i].mmap_file)) { perror("unlink"); - ErrorF("unlink %s failed, errno %d", - vfbScreens[i].mmap_file, errno); + ErrorF("unlink %s failed, %s", + vfbScreens[i].mmap_file, strerror(errno)); } } break; @@ -196,7 +196,7 @@ ddxGiveUp() if (-1 == shmdt((char *)vfbScreens[i].pXWDHeader)) { perror("shmdt"); - ErrorF("shmdt failed, errno %d", errno); + ErrorF("shmdt failed, %s", strerror(errno)); } } break; @@ -582,7 +582,7 @@ vfbBlockHandler(pointer blockData, OSTimePtr pTimeout, pointer pReadmask) #endif { perror("msync"); - ErrorF("msync failed, errno %d", errno); + ErrorF("msync failed, %s", strerror(errno)); } } } @@ -605,7 +605,7 @@ vfbAllocateMmappedFramebuffer(vfbScreenInfoPtr pvfb) if (-1 == (pvfb->mmap_fd = open(pvfb->mmap_file, O_CREAT|O_RDWR, 0666))) { perror("open"); - ErrorF("open %s failed, errno %d", pvfb->mmap_file, errno); + ErrorF("open %s failed, %s", pvfb->mmap_file, strerror(errno)); return; } @@ -621,7 +621,7 @@ vfbAllocateMmappedFramebuffer(vfbScreenInfoPtr pvfb) if (-1 == write(pvfb->mmap_fd, dummyBuffer, writeThisTime)) { perror("write"); - ErrorF("write %s failed, errno %d", pvfb->mmap_file, errno); + ErrorF("write %s failed, %s", pvfb->mmap_file, strerror(errno)); return; } } @@ -635,7 +635,7 @@ vfbAllocateMmappedFramebuffer(vfbScreenInfoPtr pvfb) if (-1 == (long)pvfb->pXWDHeader) { perror("mmap"); - ErrorF("mmap %s failed, errno %d", pvfb->mmap_file, errno); + ErrorF("mmap %s failed, %s", pvfb->mmap_file, strerror(errno)); pvfb->pXWDHeader = NULL; return; } @@ -659,7 +659,7 @@ vfbAllocateSharedMemoryFramebuffer(vfbScreenInfoPtr pvfb) if (pvfb->shmid < 0) { perror("shmget"); - ErrorF("shmget %d bytes failed, errno %d", pvfb->sizeInBytes, errno); + ErrorF("shmget %d bytes failed, %s", pvfb->sizeInBytes, strerror(errno)); return; } @@ -669,7 +669,7 @@ vfbAllocateSharedMemoryFramebuffer(vfbScreenInfoPtr pvfb) if (-1 == (long)pvfb->pXWDHeader) { perror("shmat"); - ErrorF("shmat failed, errno %d", errno); + ErrorF("shmat failed, %s", strerror(errno)); pvfb->pXWDHeader = NULL; return; } diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am index 4afc3a4e5..03c2c3a3f 100644 --- a/hw/xfree86/Makefile.am +++ b/hw/xfree86/Makefile.am @@ -4,6 +4,10 @@ if DRI DRI_SUBDIR = dri endif +if DRI2 +DRI2_SUBDIR = dri2 +endif + if XF86UTILS XF86UTILS_SUBDIR = utils endif @@ -21,11 +25,11 @@ DOC_SUBDIR = doc SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support parser rac \ ramdac shadowfb vbe vgahw xaa $(MFB_SUBDIR) $(CFB_SUBDIR) \ xf8_16bpp loader dixmods exa modes \ - $(DRI_SUBDIR) $(XF86UTILS_SUBDIR) $(DOC_SUBDIR) + $(DRI_SUBDIR) $(DRI2_SUBDIR) $(XF86UTILS_SUBDIR) $(DOC_SUBDIR) DIST_SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support \ parser rac ramdac shadowfb vbe vgahw xaa xf1bpp xf4bpp \ - xf8_16bpp xf8_32bpp loader dixmods dri exa modes \ + xf8_16bpp xf8_32bpp loader dixmods dri dri2 exa modes \ utils doc bin_PROGRAMS = Xorg diff --git a/hw/xfree86/common/Makefile.am b/hw/xfree86/common/Makefile.am index c060b73f0..4f0a2d6b3 100644 --- a/hw/xfree86/common/Makefile.am +++ b/hw/xfree86/common/Makefile.am @@ -31,7 +31,7 @@ BUILT_SOURCES = xf86DefModeSet.c AM_LDFLAGS = -r libcommon_la_SOURCES = xf86Configure.c xf86Bus.c xf86Config.c \ xf86Cursor.c xf86cvt.c xf86DGA.c xf86DPMS.c \ - xf86DoProbe.c xf86DoScanPci.c xf86Events.c \ + xf86DoProbe.c xf86Events.c \ xf86Globals.c xf86AutoConfig.c \ xf86MiscExt.c xf86Option.c \ xf86VidMode.c xf86fbman.c xf86cmap.c \ diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h index 4e7d914bf..4b3e10463 100644 --- a/hw/xfree86/common/xf86.h +++ b/hw/xfree86/common/xf86.h @@ -337,8 +337,8 @@ int xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, pointer value); Bool xf86IsUnblank(int mode); -void xf86AddModuleInfo(ModuleInfoPtr info, pointer module); -void xf86DeleteModuleInfo(int idx); +_X_DEPRECATED void xf86AddModuleInfo(pointer info, pointer module); +_X_DEPRECATED void xf86DeleteModuleInfo(int idx); void xf86getsecs(long *, long *); /* xf86Debug.c */ diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c index c6e197216..da6c3f38d 100644 --- a/hw/xfree86/common/xf86AutoConfig.c +++ b/hw/xfree86/common/xf86AutoConfig.c @@ -184,7 +184,7 @@ videoPtrToDriverName(struct pci_device *dev) case 0x3d3d: return "glint"; case 0x1023: return "trident"; case 0x100c: return "tseng"; - case 0x1106: return "via"; + case 0x1106: return "openchrome"; case 0x15ad: return "vmware"; default: break; } diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index a6bc5dbe3..521ad548b 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -733,7 +733,6 @@ typedef enum { FLAG_DISABLEMODINDEV, FLAG_MODINDEVALLOWNONLOCAL, FLAG_ALLOWMOUSEOPENFAIL, - FLAG_VTINIT, FLAG_VTSYSREQ, FLAG_XKBDISABLE, FLAG_PCIPROBE1, @@ -785,8 +784,6 @@ static OptionInfoRec FlagOptions[] = { {0}, FALSE }, { FLAG_ALLOWMOUSEOPENFAIL, "AllowMouseOpenFail", OPTV_BOOLEAN, {0}, FALSE }, - { FLAG_VTINIT, "VTInit", OPTV_STRING, - {0}, FALSE }, { FLAG_VTSYSREQ, "VTSysReq", OPTV_BOOLEAN, {0}, FALSE }, { FLAG_XKBDISABLE, "XkbDisable", OPTV_BOOLEAN, @@ -977,8 +974,6 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) #endif } - xf86Info.vtinit = xf86GetOptValString(FlagOptions, FLAG_VTINIT); - if (xf86IsOptionSet(FlagOptions, FLAG_PCIPROBE1)) xf86Info.pciFlags = PCIProbe1; if (xf86IsOptionSet(FlagOptions, FLAG_PCIPROBE2)) diff --git a/hw/xfree86/common/xf86DoScanPci.c b/hw/xfree86/common/xf86DoScanPci.c deleted file mode 100644 index 51892f041..000000000 --- a/hw/xfree86/common/xf86DoScanPci.c +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (c) 1999-2002 by The XFree86 Project, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name of the copyright holder(s) - * and author(s) shall not be used in advertising or otherwise to promote - * the sale, use or other dealings in this Software without prior written - * authorization from the copyright holder(s) and author(s). - */ - -/* - * Finish setting up the server. - * Call the functions from the scanpci module. - */ - -#ifdef HAVE_XORG_CONFIG_H -#include <xorg-config.h> -#endif - -#include <ctype.h> -#include <stdlib.h> -#include <X11/X.h> -#include <X11/Xmd.h> -#include <pciaccess.h> -#include "os.h" -#include "xf86.h" -#include "xf86Priv.h" -#include "xf86Pci.h" -#include "Pci.h" -#include "xf86_OSproc.h" - -static void ScanPciDisplayPCICardInfo(void); - -void -ScanPciDisplayPCICardInfo(void) -{ - struct pci_id_match match; - struct pci_device_iterator *iter; - const struct pci_device *dev; - - xf86EnableIO(); - - if (! xf86scanpci()) { - xf86MsgVerb(X_NONE, 0, "No PCI info available\n"); - return; - } - xf86MsgVerb(X_NONE, 0, - "Probing for PCI devices (Bus:Device:Function)\n\n"); - - iter = pci_id_match_iterator_create(NULL); - while ((dev = pci_device_next(iter)) != NULL) { - const char *svendorname = NULL, *subsysname = NULL; - const char *vendorname = NULL, *devicename = NULL; - - - xf86MsgVerb(X_NONE, 0, "(%d:%d:%d) ", - PCI_MAKE_BUS(dev->domain, dev->bus), dev->dev, dev->func); - - /* - * Lookup as much as we can about the device. - */ - match.vendor_id = dev->vendor_id; - match.device_id = dev->device_id; - match.subvendor_id = (dev->subvendor_id != 0) - ? dev->subvendor_id : PCI_MATCH_ANY; - match.subdevice_id = (dev->subdevice_id != 0) - ? dev->subdevice_id : PCI_MATCH_ANY; - match.device_class = 0; - match.device_class_mask = 0; - - pci_get_strings(& match, & vendorname, & devicename, - & svendorname, & subsysname); - - if ((dev->subvendor_id != 0) || (dev->subdevice_id != 0)) { - xf86MsgVerb(X_NONE, 0, "%s %s (0x%04x / 0x%04x) using ", - (svendorname == NULL) ? "unknown vendor" : svendorname, - (subsysname == NULL) ? "unknown card" : subsysname, - dev->subvendor_id, dev->subdevice_id); - } - - xf86MsgVerb(X_NONE, 0, "%s %s (0x%04x / 0x%04x)\n", - (vendorname == NULL) ? "unknown vendor" : vendorname, - (devicename == NULL) ? "unknown chip" : devicename, - dev->vendor_id, dev->device_id); - } - - pci_iterator_destroy(iter); -} - - -void DoScanPci(int argc, char **argv, int i) -{ - int j,skip,globalVerbose; - - /* - * first we need to finish setup of the OS so that we can call other - * functions in the server - */ - OsInit(); - - /* - * The old verbosity processing that was here isn't useful anymore, but - * for compatibility purposes, ignore verbosity changes after the -scanpci - * flag. - */ - globalVerbose = xf86Verbose; - - /* - * next we process the arguments that are remaining on the command line, - * so that things like the module path can be set there - */ - for ( j = i+1; j < argc; j++ ) { - if ((skip = ddxProcessArgument(argc, argv, j))) - j += (skip - 1); - } - - /* - * Was the verbosity level increased? If so, set it back. - */ - if (xf86Verbose > globalVerbose) - xf86SetVerbosity(globalVerbose); - - ScanPciDisplayPCICardInfo(); - - /* - * That's it; we really should clean things up, but a simple - * exit seems to be all we need. - */ - exit(0); -} diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c index d796d627c..0dc42c66b 100644 --- a/hw/xfree86/common/xf86Globals.c +++ b/hw/xfree86/common/xf86Globals.c @@ -97,7 +97,6 @@ InputInfoPtr xf86InputDevs = NULL; xf86InfoRec xf86Info = { -1, /* consoleFd */ -1, /* vtno */ - NULL, /* vtinit */ FALSE, /* vtSysreq */ SKWhenNeeded, /* ddxSpecialKeys */ NULL, /* pMouse */ @@ -154,8 +153,6 @@ DriverPtr *xf86DriverList = NULL; int xf86NumDrivers = 0; InputDriverPtr *xf86InputDriverList = NULL; int xf86NumInputDrivers = 0; -ModuleInfoPtr *xf86ModuleInfoList = NULL; -int xf86NumModuleInfos = 0; int xf86NumScreens = 0; const char *xf86VisualNames[] = { diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c index ec524e63c..0d2471aa1 100644 --- a/hw/xfree86/common/xf86Helper.c +++ b/hw/xfree86/common/xf86Helper.c @@ -1,4 +1,3 @@ - /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * @@ -170,37 +169,17 @@ xf86LookupInput(const char *name) return NULL; } +/* ABI stubs of despair */ _X_EXPORT void -xf86AddModuleInfo(ModuleInfoPtr info, pointer module) +xf86AddModuleInfo(pointer info, pointer module) { - /* Don't add null entries */ - if (!module) - return; - - if (xf86ModuleInfoList == NULL) - xf86NumModuleInfos = 0; - - xf86NumModuleInfos++; - xf86ModuleInfoList = xnfrealloc(xf86ModuleInfoList, - xf86NumModuleInfos * sizeof(ModuleInfoPtr)); - xf86ModuleInfoList[xf86NumModuleInfos - 1] = xnfalloc(sizeof(ModuleInfoRec)); - *xf86ModuleInfoList[xf86NumModuleInfos - 1] = *info; - xf86ModuleInfoList[xf86NumModuleInfos - 1]->module = module; - xf86ModuleInfoList[xf86NumModuleInfos - 1]->refCount = 0; } _X_EXPORT void xf86DeleteModuleInfo(int idx) { - if (xf86ModuleInfoList[idx]) { - if (xf86ModuleInfoList[idx]->module) - UnloadModule(xf86ModuleInfoList[idx]->module); - xfree(xf86ModuleInfoList[idx]); - xf86ModuleInfoList[idx] = NULL; - } } - /* Allocate a new ScrnInfoRec in xf86Screens */ _X_EXPORT ScrnInfoPtr @@ -1374,7 +1353,7 @@ xf86ErrorF(const char *format, ...) void xf86LogInit() { - char *lf; + char *lf = NULL; #define LOGSUFFIX ".log" #define LOGOLDSUFFIX ".old" @@ -1398,6 +1377,8 @@ xf86LogInit() #undef LOGSUFFIX #undef LOGOLDSUFFIX + + free(lf); } void diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index d12b6bd6a..d1603c081 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -102,7 +102,6 @@ static void xf86PrintBanner(void); static void xf86PrintMarkers(void); static void xf86PrintDefaultModulePath(void); static void xf86PrintDefaultLibraryPath(void); -static void xf86RunVtInit(void); static Bool probe_devices_from_device_sections(DriverPtr drvp); static Bool add_matching_devices_to_configure_list(DriverPtr drvp); @@ -199,13 +198,6 @@ xf86CreateRootWindow(WindowPtr pWin) } -/* - * InitOutput -- - * Initialize screenInfo for all actually accessible framebuffers. - * That includes vt-manager setup, querying all possible devices and - * collecting the pixmap formats. - */ - static void PostConfigInit(void) { @@ -238,9 +230,6 @@ PostConfigInit(void) xf86OSPMClose = xf86OSPMOpen(); #endif - /* Run an external VT Init program if specified in the config file */ - xf86RunVtInit(); - /* Do this after XF86Config is read (it's normally in OsInit()) */ OsInitColors(); } @@ -471,7 +460,12 @@ xf86CallDriverProbe( DriverPtr drv, Bool detect_only ) return foundScreen; } - +/* + * InitOutput -- + * Initialize screenInfo for all actually accessible framebuffers. + * That includes vt-manager setup, querying all possible devices and + * collecting the pixmap formats. + */ void InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) { @@ -1135,12 +1129,6 @@ InitInput(argc, argv) for (pDev = xf86ConfigLayout.inputs; pDev && *pDev; pDev++) { /* Replace obsolete keyboard driver with kbd */ if (!xf86NameCmp((*pDev)->driver, "keyboard")) { - xf86MsgVerb(X_WARNING, 0, - "*** WARNING the legacy keyboard driver \"%s\" has been removed\n", - (*pDev)->driver); - xf86MsgVerb(X_WARNING, 0, - "*** Using the new \"kbd\" driver for \"%s\".\n", - (*pDev)->identifier); strcpy((*pDev)->driver, "kbd"); } @@ -1566,15 +1554,6 @@ ddxProcessArgument(int argc, char **argv, int i) xf86sFlag = TRUE; return 0; } - if (!strcmp(argv[i], "-bpp")) - { - ErrorF("The -bpp option is no longer supported.\n" - "\tUse -depth to set the color depth, and use -fbbpp if you really\n" - "\tneed to force a non-default framebuffer (hardware) pixel format.\n"); - if (++i >= argc) - return 1; - return 2; - } if (!strcmp(argv[i], "-pixmap24")) { xf86Pix24 = Pix24Use24; @@ -1687,10 +1666,6 @@ ddxProcessArgument(int argc, char **argv, int i) return 1; } #endif - if (!strcmp(argv[i], "-scanpci")) - { - DoScanPci(argc, argv, i); - } if (!strcmp(argv[i], "-probe")) { xf86DoProbe = TRUE; @@ -1753,7 +1728,6 @@ ddxUseMsg() ErrorF("-config file specify a configuration file, relative to the\n"); ErrorF(" "__XCONFIGFILE__" search path, only root can use absolute\n"); ErrorF("-probeonly probe for devices, then exit\n"); - ErrorF("-scanpci execute the scanpci module and exit\n"); ErrorF("-verbose [n] verbose startup messages\n"); ErrorF("-logverbose [n] verbose log messages\n"); ErrorF("-quiet minimal startup messages\n"); @@ -1930,44 +1904,6 @@ xf86PrintDefaultLibraryPath(void) ErrorF("%s\n", DEFAULT_LIBRARY_PATH); } -static void -xf86RunVtInit(void) -{ - int i; - - /* - * If VTInit was set, run that program with consoleFd as stdin and stdout - */ - - if (xf86Info.vtinit) { - switch(fork()) { - case -1: - FatalError("xf86RunVtInit: fork failed (%s)\n", strerror(errno)); - break; - case 0: /* child */ - if (setuid(getuid()) == -1) { - xf86Msg(X_ERROR, "xf86RunVtInit: setuid failed (%s)\n", - strerror(errno)); - exit(255); - } - /* set stdin, stdout to the consoleFd */ - for (i = 0; i < 2; i++) { - if (xf86Info.consoleFd != i) { - close(i); - dup(xf86Info.consoleFd); - } - } - execl("/bin/sh", "sh", "-c", xf86Info.vtinit, (void *)NULL); - xf86Msg(X_WARNING, "exec of /bin/sh failed for VTInit (%s)\n", - strerror(errno)); - exit(255); - break; - default: /* parent */ - wait(NULL); - } - } -} - /* * xf86LoadModules iterates over a list that is being passed in. */ diff --git a/hw/xfree86/common/xf86PciInfo.h b/hw/xfree86/common/xf86PciInfo.h index 0630cfa82..356c7db4d 100644 --- a/hw/xfree86/common/xf86PciInfo.h +++ b/hw/xfree86/common/xf86PciInfo.h @@ -40,9 +40,8 @@ * or for non-video devices unless they're needed by a driver or elsewhere. * A comprehensive set of PCI vendor, device and subsystem data is * auto-generated from the ../etc/pci.ids file using the pciids2c.pl script, - * and is used in both the scanpci module and the scanpci utility. Don't - * modify the pci.ids file. If new/corrected entries are required, add them - * to ../etc/extrapci.ids. + * and is used in scanpci utility. Don't modify the pci.ids file. If + * new/corrected entries are required, add them to ../etc/extrapci.ids. */ #ifndef _XF86_PCIINFO_H diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h index 5d650aa4c..30b259f5c 100644 --- a/hw/xfree86/common/xf86Priv.h +++ b/hw/xfree86/common/xf86Priv.h @@ -1,4 +1,3 @@ - /* * Copyright (c) 1997-2002 by The XFree86 Project, Inc. * @@ -98,8 +97,6 @@ extern Bool xf86SupportedMouseTypes[]; extern int xf86NumMouseTypes; extern DriverPtr *xf86DriverList; -extern ModuleInfoPtr *xf86ModuleInfoList; -extern int xf86NumModuleInfos; extern int xf86NumDrivers; extern Bool xf86Resetting; extern Bool xf86Initialising; @@ -159,10 +156,6 @@ Bool xf86PathIsSafe(const char *path); extern DisplayModeRec xf86DefaultModes []; -/* xf86DoScanPci.c */ - -void DoScanPci(int argc, char **argv, int i); - /* xf86DoProbe.c */ void DoProbe(void); void DoConfigure(void); diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h index 92a6305a0..d97ca440e 100644 --- a/hw/xfree86/common/xf86Privstr.h +++ b/hw/xfree86/common/xf86Privstr.h @@ -75,7 +75,6 @@ typedef enum { typedef struct { int consoleFd; int vtno; - char * vtinit; Bool vtSysreq; SpecialKeysInDDX ddxSpecialKeys; diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index d2c05313d..d8e23ee8d 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -142,6 +142,11 @@ xf86ProcessCommonOptions(LocalDevicePtr local, /* Backwards compatibility. */ local->history_size = GetMotionHistorySize(); + /* Preallocate xEvent store */ + if (!xf86Events) + xf86Events = (xEvent *)xcalloc(sizeof(xEvent), GetMaximumEventsNum()); + if (!xf86Events) + FatalError("Couldn't allocate event store\n"); } /*********************************************************************** @@ -495,6 +500,8 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev) * convenient functions to post events */ +#define MAX_VALUATORS 36 /* XXX from comment in dix/getevents.c */ + _X_EXPORT void xf86PostMotionEvent(DeviceIntPtr device, int is_absolute, @@ -504,17 +511,12 @@ xf86PostMotionEvent(DeviceIntPtr device, { va_list var; int i = 0; - static int *valuators = NULL; - static int n_valuators = 0; - - if (num_valuators > n_valuators) { - xfree (valuators); - valuators = NULL; - } + static int valuators[MAX_VALUATORS]; - if (!valuators) { - valuators = xcalloc(sizeof(int), num_valuators); - n_valuators = num_valuators; + if (num_valuators > MAX_VALUATORS) { + xf86Msg(X_ERROR, "xf86PostMotionEvent: num_valuator %d" + " is greater than MAX_VALUATORS\n", num_valuators); + return; } va_start(var, num_valuators); @@ -539,6 +541,12 @@ xf86PostMotionEventP(DeviceIntPtr device, int index; int flags = 0; + if (num_valuators > MAX_VALUATORS) { + xf86Msg(X_ERROR, "xf86PostMotionEvent: num_valuator %d" + " is greater than MAX_VALUATORS\n", num_valuators); + return; + } + if (is_absolute) flags = POINTER_ABSOLUTE; else @@ -592,9 +600,15 @@ xf86PostProximityEvent(DeviceIntPtr device, ...) { va_list var; - int i, nevents, *valuators = NULL; + int i, nevents; + int valuators[MAX_VALUATORS]; - valuators = xcalloc(sizeof(int), num_valuators); + + if (num_valuators > MAX_VALUATORS) { + xf86Msg(X_ERROR, "xf86PostMotionEvent: num_valuator %d" + " is greater than MAX_VALUATORS\n", num_valuators); + return; + } va_start(var, num_valuators); for (i = 0; i < num_valuators; i++) @@ -608,7 +622,6 @@ xf86PostProximityEvent(DeviceIntPtr device, for (i = 0; i < nevents; i++) mieqEnqueue(device, (xf86Events + i)->event); - xfree(valuators); } _X_EXPORT void @@ -621,7 +634,7 @@ xf86PostButtonEvent(DeviceIntPtr device, ...) { va_list var; - int *valuators = NULL; + int valuators[MAX_VALUATORS]; int i = 0, nevents = 0; int index; @@ -632,7 +645,11 @@ xf86PostButtonEvent(DeviceIntPtr device, return; } #endif - valuators = xcalloc(sizeof(int), num_valuators); + if (num_valuators > MAX_VALUATORS) { + xf86Msg(X_ERROR, "xf86PostMotionEvent: num_valuator %d" + " is greater than MAX_VALUATORS\n", num_valuators); + return; + } va_start(var, num_valuators); for (i = 0; i < num_valuators; i++) @@ -648,7 +665,6 @@ xf86PostButtonEvent(DeviceIntPtr device, for (i = 0; i < nevents; i++) mieqEnqueue(device, (xf86Events + i)->event); - xfree(valuators); } _X_EXPORT void @@ -661,15 +677,21 @@ xf86PostKeyEvent(DeviceIntPtr device, ...) { va_list var; - int i = 0, nevents = 0, *valuators = NULL; + int i = 0, nevents = 0; + static int valuators[MAX_VALUATORS]; /* instil confidence in the user */ DebugF("this function has never been tested properly. if things go quite " "badly south after this message, then xf86PostKeyEvent is " "broken.\n"); + if (num_valuators > MAX_VALUATORS) { + xf86Msg(X_ERROR, "xf86PostMotionEvent: num_valuator %d" + " is greater than MAX_VALUATORS\n", num_valuators); + return; + } + if (is_absolute) { - valuators = xcalloc(sizeof(int), num_valuators); va_start(var, num_valuators); for (i = 0; i < num_valuators; i++) valuators[i] = va_arg(var, int); @@ -680,7 +702,6 @@ xf86PostKeyEvent(DeviceIntPtr device, is_down ? KeyPress : KeyRelease, key_code, first_valuator, num_valuators, valuators); - xfree(valuators); } else { nevents = GetKeyboardEvents(xf86Events, device, diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c index 13e13e980..d5ae75b3a 100644 --- a/hw/xfree86/common/xf86pciBus.c +++ b/hw/xfree86/common/xf86pciBus.c @@ -107,127 +107,6 @@ xf86FormatPciBusNumber(int busnum, char *buffer) sprintf(buffer, "%d@%d", busnum & 0x00ff, busnum >> 8); } -static void -FindPCIVideoInfo(void) -{ - int i = 0, k; - int num = 0; - struct pci_device *info; - struct pci_device_iterator *iter; - - - if (!xf86scanpci()) { - xf86PciVideoInfo = NULL; - return; - } - - iter = pci_slot_match_iterator_create(& xf86IsolateDevice); - while ((info = pci_device_next(iter)) != NULL) { - if (PCIINFOCLASSES(info->device_class)) { - num++; - xf86PciVideoInfo = xnfrealloc(xf86PciVideoInfo, - (sizeof(struct pci_device *) - * (num + 1))); - xf86PciVideoInfo[num] = NULL; - xf86PciVideoInfo[num - 1] = info; - - pci_device_probe(info); - info->user_data = 0; - } - } - - - /* If we haven't found a primary device try a different heuristic */ - if (primaryBus.type == BUS_NONE && num) { - for (i = 0; i < num; i++) { - uint16_t command; - - info = xf86PciVideoInfo[i]; - pci_device_cfg_read_u16(info, & command, 4); - - if ((command & PCI_CMD_MEM_ENABLE) - && ((num == 1) || IS_VGA(info->device_class))) { - if (primaryBus.type == BUS_NONE) { - primaryBus.type = BUS_PCI; - primaryBus.id.pci = info; - } else { - xf86Msg(X_NOTICE, - "More than one possible primary device found\n"); - primaryBus.type ^= (BusType)(-1); - } - } - } - } - - /* Print a summary of the video devices found */ - for (k = 0; k < num; k++) { - const char *vendorname = NULL, *chipname = NULL; - const char *prim = " "; - Bool memdone = FALSE, iodone = FALSE; - - - info = xf86PciVideoInfo[k]; - - vendorname = pci_device_get_vendor_name( info ); - chipname = pci_device_get_device_name( info ); - - if ((!vendorname || !chipname) && - !PCIALWAYSPRINTCLASSES(info->device_class)) - continue; - - if (xf86IsPrimaryPci(info)) - prim = "*"; - - xf86Msg( X_PROBED, "PCI:%s(%u@%u:%u:%u) ", prim, info->domain, - info->bus, info->dev, info->func ); - - if (vendorname) - xf86ErrorF("%s ", vendorname); - else - xf86ErrorF("unknown vendor (0x%04x) ", info->vendor_id); - - if (chipname) - xf86ErrorF("%s ", chipname); - else - xf86ErrorF("unknown chipset (0x%04x) ", info->device_id); - - xf86ErrorF("rev %d", info->revision); - - for (i = 0; i < 6; i++) { - struct pci_mem_region * r = & info->regions[i]; - - if ( r->size && ! r->is_IO ) { - if (!memdone) { - xf86ErrorF(", Mem @ "); - memdone = TRUE; - } else - xf86ErrorF(", "); - xf86ErrorF("0x%08lx/%ld", r->base_addr, r->size); - } - } - - for (i = 0; i < 6; i++) { - struct pci_mem_region * r = & info->regions[i]; - - if ( r->size && r->is_IO ) { - if (!iodone) { - xf86ErrorF(", I/O @ "); - iodone = TRUE; - } else - xf86ErrorF(", "); - xf86ErrorF("0x%08lx/%ld", r->base_addr, r->size); - } - } - - if ( info->rom_size ) { - xf86ErrorF(", BIOS @ 0x\?\?\?\?\?\?\?\?/%ld", info->rom_size); - } - - xf86ErrorF("\n"); - } -} - - /* * IO enable/disable related routines for PCI */ @@ -401,10 +280,10 @@ savePciState( struct pci_device * dev, pciSavePtr ptr ) } /* move to OS layer */ +#if 0 static void restorePciState( struct pci_device * dev, pciSavePtr ptr) { -#if 0 int i; /* disable card before setting anything */ @@ -419,8 +298,8 @@ restorePciState( struct pci_device * dev, pciSavePtr ptr) } pci_device_cfg_write_u32(dev, ptr->command, PCI_CMD_STAT_REG); -#endif } +#endif /* move to OS layer */ static void @@ -470,7 +349,121 @@ restorePciBusState(BusAccPtr ptr) void xf86PciProbe(void) { - FindPCIVideoInfo(); + int i = 0, k; + int num = 0; + struct pci_device *info; + struct pci_device_iterator *iter; + + + if (!xf86scanpci()) { + xf86PciVideoInfo = NULL; + return; + } + + iter = pci_slot_match_iterator_create(& xf86IsolateDevice); + while ((info = pci_device_next(iter)) != NULL) { + if (PCIINFOCLASSES(info->device_class)) { + num++; + xf86PciVideoInfo = xnfrealloc(xf86PciVideoInfo, + (sizeof(struct pci_device *) + * (num + 1))); + xf86PciVideoInfo[num] = NULL; + xf86PciVideoInfo[num - 1] = info; + + pci_device_probe(info); + info->user_data = 0; + } + } + + + /* If we haven't found a primary device try a different heuristic */ + if (primaryBus.type == BUS_NONE && num) { + for (i = 0; i < num; i++) { + uint16_t command; + + info = xf86PciVideoInfo[i]; + pci_device_cfg_read_u16(info, & command, 4); + + if ((command & PCI_CMD_MEM_ENABLE) + && ((num == 1) || IS_VGA(info->device_class))) { + if (primaryBus.type == BUS_NONE) { + primaryBus.type = BUS_PCI; + primaryBus.id.pci = info; + } else { + xf86Msg(X_NOTICE, + "More than one possible primary device found\n"); + primaryBus.type ^= (BusType)(-1); + } + } + } + } + + /* Print a summary of the video devices found */ + for (k = 0; k < num; k++) { + const char *vendorname = NULL, *chipname = NULL; + const char *prim = " "; + Bool memdone = FALSE, iodone = FALSE; + + + info = xf86PciVideoInfo[k]; + + vendorname = pci_device_get_vendor_name( info ); + chipname = pci_device_get_device_name( info ); + + if ((!vendorname || !chipname) && + !PCIALWAYSPRINTCLASSES(info->device_class)) + continue; + + if (xf86IsPrimaryPci(info)) + prim = "*"; + + xf86Msg( X_PROBED, "PCI:%s(%u@%u:%u:%u) ", prim, info->domain, + info->bus, info->dev, info->func ); + + if (vendorname) + xf86ErrorF("%s ", vendorname); + else + xf86ErrorF("unknown vendor (0x%04x) ", info->vendor_id); + + if (chipname) + xf86ErrorF("%s ", chipname); + else + xf86ErrorF("unknown chipset (0x%04x) ", info->device_id); + + xf86ErrorF("rev %d", info->revision); + + for (i = 0; i < 6; i++) { + struct pci_mem_region * r = & info->regions[i]; + + if ( r->size && ! r->is_IO ) { + if (!memdone) { + xf86ErrorF(", Mem @ "); + memdone = TRUE; + } else + xf86ErrorF(", "); + xf86ErrorF("0x%08lx/%ld", r->base_addr, r->size); + } + } + + for (i = 0; i < 6; i++) { + struct pci_mem_region * r = & info->regions[i]; + + if ( r->size && r->is_IO ) { + if (!iodone) { + xf86ErrorF(", I/O @ "); + iodone = TRUE; + } else + xf86ErrorF(", "); + xf86ErrorF("0x%08lx/%ld", r->base_addr, r->size); + } + } + + if ( info->rom_size ) { + xf86ErrorF(", BIOS @ 0x\?\?\?\?\?\?\?\?/%ld", info->rom_size); + } + + xf86ErrorF("\n"); + } } void diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h index 2e0213597..fc94284cb 100644 --- a/hw/xfree86/common/xf86str.h +++ b/hw/xfree86/common/xf86str.h @@ -348,7 +348,7 @@ typedef struct _DriverRec { * functions to configuration tools, the Xserver, or any other * application/module interested in such information. */ -typedef struct _ModuleInfoRec { +_X_DEPRECATED typedef struct _ModuleInfoRec { int moduleVersion; char * moduleName; pointer module; diff --git a/hw/xfree86/dixmods/extmod/xf86misc.c b/hw/xfree86/dixmods/extmod/xf86misc.c index 8f4434601..8127afdff 100644 --- a/hw/xfree86/dixmods/extmod/xf86misc.c +++ b/hw/xfree86/dixmods/extmod/xf86misc.c @@ -108,9 +108,9 @@ static unsigned char XF86MiscReqCode = 0; #endif #ifdef DEBUG -# define DEBUG_P(x) ErrorF(x"\n"); +# define DEBUG_P(x) ErrorF x; #else -# define DEBUG_P(x) /**/ +# define DEBUG_P(x) do {} while (0) #endif #define MISCERR(x) (miscErrorBase + x) @@ -120,8 +120,6 @@ XFree86MiscExtensionInit(void) { ExtensionEntry* extEntry; - DEBUG_P("XFree86MiscExtensionInit"); - if (!xf86GetModInDevEnabled()) return; @@ -154,8 +152,6 @@ ProcXF86MiscQueryVersion(client) xXF86MiscQueryVersionReply rep; register int n; - DEBUG_P("XF86MiscQueryVersion"); - REQUEST_SIZE_MATCH(xXF86MiscQueryVersionReq); rep.type = X_Reply; rep.length = 0; @@ -252,8 +248,6 @@ ProcXF86MiscGetMouseSettings(client) register int n; int devnamelen; - DEBUG_P("XF86MiscGetMouseSettings"); - REQUEST_SIZE_MATCH(xXF86MiscGetMouseSettingsReq); rep.type = X_Reply; rep.sequenceNumber = client->sequence; @@ -303,8 +297,6 @@ ProcXF86MiscGetKbdSettings(client) pointer kbd; register int n; - DEBUG_P("XF86MiscGetKbdSettings"); - REQUEST_SIZE_MATCH(xXF86MiscGetKbdSettingsReq); rep.type = X_Reply; rep.length = 0; @@ -338,19 +330,17 @@ ProcXF86MiscSetMouseSettings(client) REQUEST(xXF86MiscSetMouseSettingsReq); - DEBUG_P("XF86MiscSetMouseSettings"); - REQUEST_AT_LEAST_SIZE(xXF86MiscSetMouseSettingsReq); ClientVersion(client, &major, &minor); if (xf86GetVerbosity() > 1) { - ErrorF("SetMouseSettings - type: %d brate: %d srate: %d chdmid: %d\n", + DEBUG_P(("SetMouseSettings - type: %d brate: %d srate: %d chdmid: %d\n", (int)stuff->mousetype, (int)stuff->baudrate, - (int)stuff->samplerate, stuff->chordmiddle); - ErrorF(" em3but: %d em3tim: %d res: %d flags: %ld\n", + (int)stuff->samplerate, stuff->chordmiddle)); + DEBUG_P((" em3but: %d em3tim: %d res: %d flags: %ld\n", stuff->emulate3buttons, (int)stuff->emulate3timeout, - (int)stuff->resolution, (unsigned long)stuff->flags); + (int)stuff->resolution, (unsigned long)stuff->flags)); } if ((mouse = MiscExtCreateStruct(MISC_POINTER)) == (pointer) 0) @@ -376,7 +366,7 @@ ProcXF86MiscSetMouseSettings(client) return BadAlloc; strncpy(devname,(char*)(&stuff[1]),stuff->devnamelen); if (xf86GetVerbosity() > 1) - ErrorF("SetMouseSettings - device: %s\n",devname); + DEBUG_P(("SetMouseSettings - device: %s\n",devname)); MiscExtSetMouseDevice(mouse, devname); } } @@ -395,12 +385,12 @@ ProcXF86MiscSetMouseSettings(client) case MISC_RET_BADCOMBO: return MISCERR(XF86MiscBadMouseCombo); case MISC_RET_NOMODULE: return MISCERR(XF86MiscNoModule); default: - ErrorF("Unexpected return from MiscExtApply(POINTER) = %d\n", ret); + DEBUG_P(("Unexpected return from MiscExtApply(POINTER) = %d\n", ret)); return BadImplementation; } if (xf86GetVerbosity() > 1) - ErrorF("SetMouseSettings - Succeeded\n"); + DEBUG_P(("SetMouseSettings - Succeeded\n")); return (client->noClientException); } @@ -412,14 +402,12 @@ ProcXF86MiscSetKbdSettings(client) pointer kbd; REQUEST(xXF86MiscSetKbdSettingsReq); - DEBUG_P("XF86MiscSetKbdSettings"); - REQUEST_SIZE_MATCH(xXF86MiscSetKbdSettingsReq); if (xf86GetVerbosity() > 1) - ErrorF("SetKbdSettings - type: %d rate: %d delay: %d snumlk: %d\n", + DEBUG_P(("SetKbdSettings - type: %d rate: %d delay: %d snumlk: %d\n", (int)stuff->kbdtype, (int)stuff->rate, - (int)stuff->delay, stuff->servnumlock); + (int)stuff->delay, stuff->servnumlock)); if ((kbd = MiscExtCreateStruct(MISC_KEYBOARD)) == (pointer) 0) return BadAlloc; @@ -434,12 +422,12 @@ ProcXF86MiscSetKbdSettings(client) case MISC_RET_BADVAL: return BadValue; case MISC_RET_BADKBDTYPE: return MISCERR(XF86MiscBadKbdType); default: - ErrorF("Unexpected return from MiscExtApply(KEYBOARD) = %d\n", ret); + DEBUG_P(("Unexpected return from MiscExtApply(KEYBOARD) = %d\n", ret)); return BadImplementation; } if (xf86GetVerbosity() > 1) - ErrorF("SetKbdSettings - Succeeded\n"); + DEBUG_P(("SetKbdSettings - Succeeded\n")); return (client->noClientException); } @@ -451,14 +439,12 @@ ProcXF86MiscSetGrabKeysState(client) xXF86MiscSetGrabKeysStateReply rep; REQUEST(xXF86MiscSetGrabKeysStateReq); - DEBUG_P("XF86MiscSetGrabKeysState"); - REQUEST_SIZE_MATCH(xXF86MiscSetGrabKeysStateReq); if ((status = MiscExtSetGrabKeysState(client, stuff->enable)) == 0) { if (xf86GetVerbosity() > 1) - ErrorF("SetGrabKeysState - %s\n", - stuff->enable ? "enabled" : "disabled"); + DEBUG_P(("SetGrabKeysState - %s\n", + stuff->enable ? "enabled" : "disabled")); } rep.type = X_Reply; @@ -482,8 +468,6 @@ ProcXF86MiscSetClientVersion(ClientPtr client) MiscPrivPtr pPriv; - DEBUG_P("XF86MiscSetClientVersion"); - REQUEST_SIZE_MATCH(xXF86MiscSetClientVersionReq); if ((pPriv = M_GETPRIV(client)) == NULL) { @@ -493,7 +477,7 @@ ProcXF86MiscSetClientVersion(ClientPtr client) M_SETPRIV(client, pPriv); } if (xf86GetVerbosity() > 1) - ErrorF("SetClientVersion: %i %i\n",stuff->major,stuff->minor); + DEBUG_P(("SetClientVersion: %i %i\n",stuff->major,stuff->minor)); pPriv->major = stuff->major; pPriv->minor = stuff->minor; @@ -511,8 +495,6 @@ ProcXF86MiscGetFilePaths(client) register int n; int configlen, modulelen, loglen; - DEBUG_P("XF86MiscGetFilePaths"); - REQUEST_SIZE_MATCH(xXF86MiscGetFilePathsReq); rep.type = X_Reply; rep.sequenceNumber = client->sequence; @@ -559,8 +541,6 @@ ProcXF86MiscPassMessage(client) REQUEST(xXF86MiscPassMessageReq); - DEBUG_P("XF86MiscPassMessage"); - REQUEST_AT_LEAST_SIZE(xXF86MiscPassMessageReq); size = (sizeof(xXF86MiscPassMessageReq) + 3) >> 2; size+= (stuff->typelen + 3) >> 2; diff --git a/hw/xfree86/dixmods/glxmodule.c b/hw/xfree86/dixmods/glxmodule.c index 0ff867de0..a1a088629 100644 --- a/hw/xfree86/dixmods/glxmodule.c +++ b/hw/xfree86/dixmods/glxmodule.c @@ -125,6 +125,9 @@ glxSetup(pointer module, pointer opts, int *errmaj, int *errmin) provider = LoaderSymbol("__glXDRIProvider"); if (provider) GlxPushProvider(provider); + provider = LoaderSymbol("__glXDRI2Provider"); + if (provider) + GlxPushProvider(provider); } switch (xf86Info.glxVisuals) { diff --git a/hw/xfree86/doc/devel/Registry b/hw/xfree86/doc/devel/Registry index d76622157..1fec230e8 100644 --- a/hw/xfree86/doc/devel/Registry +++ b/hw/xfree86/doc/devel/Registry @@ -75,7 +75,6 @@ rendition s3 s3virge savage -scanpci shadow shadowfb siliconmotion diff --git a/hw/xfree86/doc/man/Xorg.man.pre b/hw/xfree86/doc/man/Xorg.man.pre index c950e326b..405efda55 100644 --- a/hw/xfree86/doc/man/Xorg.man.pre +++ b/hw/xfree86/doc/man/Xorg.man.pre @@ -378,13 +378,6 @@ and .B \-ggamma options. .TP 8 -.B \-scanpci -When this option is specified, the -.B __xservername__ -server scans the PCI bus, and prints out some information about each -device that was detected. See also scanpci(__appmansuffix__) -and pcitweak(__appmansuffix__). -.TP 8 .BI \-screen " screen-name" Use the __xconfigfile__(__filemansuffix__) file .B Screen diff --git a/hw/xfree86/doc/man/xorg.conf.man.pre b/hw/xfree86/doc/man/xorg.conf.man.pre index 608ba37ed..9f3980879 100644 --- a/hw/xfree86/doc/man/xorg.conf.man.pre +++ b/hw/xfree86/doc/man/xorg.conf.man.pre @@ -507,17 +507,6 @@ This allows the server to start up even if the mouse device can't be opened/initialised. Default: false. .TP 7 -.BI "Option \*qVTInit\*q \*q" command \*q -Runs -.I command -after the VT used by the server has been opened. -The command string is passed to \*q/bin/sh \-c\*q, and is run with the real -user's id with stdin and stdout set to the VT. -The purpose of this option is to allow system dependent VT initialisation -commands to be run. -This option should rarely be needed. -Default: not set. -.TP 7 .BI "Option \*qVTSysReq\*q \*q" boolean \*q enables the SYSV\-style VT switch sequence for non\-SYSV systems which support VT switching. @@ -1005,10 +994,8 @@ In multi-head configurations, or when using a secondary graphics card in a single-head configuration, this entry is mandatory. Its main purpose is to make an unambiguous connection between the device section and the hardware it is representing. -This information can usually be found by running the __xservername__ server -with the -.B \-scanpci -command line option. +This information can usually be found by running the pciaccess tool +scanpci. .TP 7 .BI "Screen " number This option is mandatory for cards where a single PCI entity can drive more diff --git a/hw/xfree86/dri2/Makefile.am b/hw/xfree86/dri2/Makefile.am new file mode 100644 index 000000000..be3cea48f --- /dev/null +++ b/hw/xfree86/dri2/Makefile.am @@ -0,0 +1,15 @@ +libdri2_la_LTLIBRARIES = libdri2.la +libdri2_la_CFLAGS = \ + -DHAVE_XORG_CONFIG_H \ + -I@MESA_SOURCE@/include \ + @DIX_CFLAGS@ @DRIPROTO_CFLAGS@ @LIBDRM_CFLAGS@ \ + -I$(top_srcdir)/hw/xfree86/common \ + -I$(top_srcdir)/hw/xfree86/os-support/bus + +libdri2_la_LDFLAGS = -module -avoid-version @LIBDRM_LIBS@ +libdri2_ladir = $(moduledir)/extensions +libdri2_la_SOURCES = \ + dri2.c \ + dri2.h + +sdk_HEADERS = dri2.h diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c new file mode 100644 index 000000000..3bc533ede --- /dev/null +++ b/hw/xfree86/dri2/dri2.c @@ -0,0 +1,456 @@ +/* + * Copyright © 2007 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Soft- + * ware"), to deal in the Software without restriction, including without + * limitation the rights to use, copy, modify, merge, publish, distribute, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, provided that the above copyright + * notice(s) and this permission notice appear in all copies of the Soft- + * ware and that both the above copyright notice(s) and this permission + * notice appear in supporting documentation. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- + * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY + * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN + * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE- + * QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR- + * MANCE OF THIS SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall + * not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization of + * the copyright holder. + * + * Authors: + * Kristian Høgsberg (krh@redhat.com) + */ + +#ifdef HAVE_XORG_CONFIG_H +#include <xorg-config.h> +#endif + +#include <xf86drm.h> +#include "xf86Module.h" +#include "scrnintstr.h" +#include "windowstr.h" +#include "dri2.h" +#include <GL/internal/dri_sarea.h> + +#include "xf86.h" + +static DevPrivateKey dri2ScreenPrivateKey = &dri2ScreenPrivateKey; +static DevPrivateKey dri2WindowPrivateKey = &dri2WindowPrivateKey; +static DevPrivateKey dri2PixmapPrivateKey = &dri2PixmapPrivateKey; + +typedef struct _DRI2DrawablePriv { + drm_drawable_t drawable; + unsigned int handle; +} DRI2DrawablePrivRec, *DRI2DrawablePrivPtr; + +typedef struct _DRI2Screen { + int fd; + drmBO sareaBO; + void *sarea; + unsigned int sareaSize; + const char *driverName; + int ddxVersionMajor; + int ddxVersionMinor; + int ddxVersionPatch; + + __DRIEventBuffer *buffer; + int locked; + + DRI2GetPixmapHandleProcPtr getPixmapHandle; + DRI2BeginClipNotifyProcPtr beginClipNotify; + DRI2EndClipNotifyProcPtr endClipNotify; + + ClipNotifyProcPtr ClipNotify; + HandleExposuresProcPtr HandleExposures; +} DRI2ScreenRec, *DRI2ScreenPtr; + +static DRI2ScreenPtr +DRI2GetScreen(ScreenPtr pScreen) +{ + return dixLookupPrivate(&pScreen->devPrivates, dri2ScreenPrivateKey); +} + +static void * +DRI2ScreenAllocEvent(DRI2ScreenPtr ds, size_t size) +{ + unsigned int *pad, mask = ds->buffer->size - 1; + size_t pad_size; + void *p; + + if ((ds->buffer->head & mask) + size > ds->buffer->size) { + /* The requested event size would wrap the buffer, so pad to + * the end and allocate the event from the start. */ + pad_size = ds->buffer->size - (ds->buffer->head & mask); + pad = (unsigned int *) + (ds->buffer->data + (ds->buffer->prealloc & mask)); + *pad = DRI2_EVENT_HEADER(DRI2_EVENT_PAD, pad_size); + ds->buffer->prealloc += pad_size; + } + + p = ds->buffer->data + (ds->buffer->prealloc & mask); + ds->buffer->prealloc += size; + + return p; +} + +static void +DRI2ScreenCommitEvents(DRI2ScreenPtr ds) +{ + ds->buffer->head = ds->buffer->prealloc; +} + +static void +DRI2PostDrawableConfig(DrawablePtr pDraw) +{ + ScreenPtr pScreen = pDraw->pScreen; + DRI2ScreenPtr ds = DRI2GetScreen(pScreen); + DRI2DrawablePrivPtr pPriv; + WindowPtr pWin; + PixmapPtr pPixmap; + BoxPtr pBox; + BoxRec pixmapBox; + int nBox; + int i; + __DRIDrawableConfigEvent *e; + size_t size; + + if (pDraw->type == DRAWABLE_WINDOW) { + pWin = (WindowPtr) pDraw; + pPriv = dixLookupPrivate(&pWin->devPrivates, dri2WindowPrivateKey); + + nBox = REGION_NUM_RECTS(&pWin->clipList); + pBox = REGION_RECTS(&pWin->clipList); + + pPixmap = pScreen->GetWindowPixmap(pWin); + } else { + pPixmap = (PixmapPtr) pDraw; + pPriv = dixLookupPrivate(&pPixmap->devPrivates, dri2PixmapPrivateKey); + + pixmapBox.x1 = 0; + pixmapBox.y1 = 0; + pixmapBox.x2 = pDraw->width; + pixmapBox.y2 = pDraw->height; + nBox = 1; + pBox = &pixmapBox; + } + + if (!pPriv) + return; + + size = sizeof *e + nBox * sizeof e->rects[0]; + + e = DRI2ScreenAllocEvent(ds, size); + e->event_header = DRI2_EVENT_HEADER(DRI2_EVENT_DRAWABLE_CONFIG, size); + e->drawable = pPriv->drawable; + e->x = pDraw->x - pPixmap->screen_x; + e->y = pDraw->y - pPixmap->screen_y; + e->width = pDraw->width; + e->height = pDraw->height; + + e->num_rects = nBox; + for (i = 0; i < nBox; i++) { + e->rects[i].x1 = pBox->x1 - pPixmap->screen_x; + e->rects[i].y1 = pBox->y1 - pPixmap->screen_y; + e->rects[i].x2 = pBox->x2 - pPixmap->screen_x; + e->rects[i].y2 = pBox->y2 - pPixmap->screen_y; + pBox++; + } +} + +static void +DRI2PostBufferAttach(DrawablePtr pDraw) +{ + ScreenPtr pScreen = pDraw->pScreen; + DRI2ScreenPtr ds = DRI2GetScreen(pScreen); + DRI2DrawablePrivPtr pPriv; + WindowPtr pWin; + PixmapPtr pPixmap; + __DRIBufferAttachEvent *e; + size_t size; + unsigned int handle, flags; + + if (pDraw->type == DRAWABLE_WINDOW) { + pWin = (WindowPtr) pDraw; + pPixmap = pScreen->GetWindowPixmap(pWin); + pPriv = dixLookupPrivate(&pWin->devPrivates, dri2WindowPrivateKey); + } else { + pPixmap = (PixmapPtr) pDraw; + pPriv = dixLookupPrivate(&pPixmap->devPrivates, dri2PixmapPrivateKey); + } + + if (!pPriv) + return; + + size = sizeof *e; + + handle = ds->getPixmapHandle(pPixmap, &flags); + if (handle == 0 || handle == pPriv->handle) + return; + + e = DRI2ScreenAllocEvent(ds, size); + e->event_header = DRI2_EVENT_HEADER(DRI2_EVENT_BUFFER_ATTACH, size); + e->drawable = pPriv->drawable; + e->buffer.attachment = DRI_DRAWABLE_BUFFER_FRONT_LEFT; + e->buffer.handle = handle; + e->buffer.pitch = pPixmap->devKind; + e->buffer.cpp = pPixmap->drawable.bitsPerPixel / 8; + e->buffer.flags = flags; + + pPriv->handle = handle; +} + +static void +DRI2ClipNotify(WindowPtr pWin, int dx, int dy) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + DRI2ScreenPtr ds = DRI2GetScreen(pScreen); + + if (!ds->locked) { + ds->beginClipNotify(pScreen); + ds->locked = 1; + } + + if (ds->ClipNotify) { + pScreen->ClipNotify = ds->ClipNotify; + pScreen->ClipNotify(pWin, dx, dy); + pScreen->ClipNotify = DRI2ClipNotify; + } + + DRI2PostDrawableConfig(&pWin->drawable); + DRI2PostBufferAttach(&pWin->drawable); +} + +static void +DRI2HandleExposures(WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + DRI2ScreenPtr ds = DRI2GetScreen(pScreen); + + if (ds->HandleExposures) { + pScreen->HandleExposures = ds->HandleExposures; + pScreen->HandleExposures(pWin); + pScreen->HandleExposures = DRI2HandleExposures; + } + + DRI2ScreenCommitEvents(ds); + + if (ds->locked) { + ds->endClipNotify(pScreen); + ds->locked = 0; + } +} + +void +DRI2CloseScreen(ScreenPtr pScreen) +{ + DRI2ScreenPtr ds = DRI2GetScreen(pScreen); + + pScreen->ClipNotify = ds->ClipNotify; + pScreen->HandleExposures = ds->HandleExposures; + + drmBOUnmap(ds->fd, &ds->sareaBO); + drmBOUnreference(ds->fd, &ds->sareaBO); + + xfree(ds); + dixSetPrivate(&pScreen->devPrivates, dri2ScreenPrivateKey, NULL); +} + +Bool +DRI2CreateDrawable(ScreenPtr pScreen, + DrawablePtr pDraw, drm_drawable_t *pDrmDrawable) +{ + DRI2ScreenPtr ds = DRI2GetScreen(pScreen); + WindowPtr pWin; + PixmapPtr pPixmap; + DRI2DrawablePrivPtr pPriv; + DevPrivateKey key; + PrivateRec **devPrivates; + + if (pDraw->type == DRAWABLE_WINDOW) { + pWin = (WindowPtr) pDraw; + devPrivates = &pWin->devPrivates; + key = dri2WindowPrivateKey; + } else { + pPixmap = (PixmapPtr) pDraw; + devPrivates = &pPixmap->devPrivates; + key = dri2PixmapPrivateKey; + } + + pPriv = dixLookupPrivate(devPrivates, key); + if (pPriv == NULL) { + pPriv = xalloc(sizeof *pPriv); + if (drmCreateDrawable(ds->fd, &pPriv->drawable)) + return FALSE; + + dixSetPrivate(devPrivates, key, pPriv); + } + + *pDrmDrawable = pPriv->drawable; + + DRI2PostDrawableConfig(pDraw); + DRI2PostBufferAttach(pDraw); + DRI2ScreenCommitEvents(ds); + + return TRUE; +} + +void +DRI2DestroyDrawable(ScreenPtr pScreen, DrawablePtr pDraw) +{ + DRI2ScreenPtr ds = DRI2GetScreen(pScreen); + PixmapPtr pPixmap; + WindowPtr pWin; + DRI2DrawablePrivPtr pPriv; + + if (pDraw->type == DRAWABLE_WINDOW) { + pWin = (WindowPtr) pDraw; + pPriv = dixLookupPrivate(&pWin->devPrivates, dri2WindowPrivateKey); + dixSetPrivate(&pWin->devPrivates, dri2WindowPrivateKey, NULL); + } else { + pPixmap = (PixmapPtr) pDraw; + pPriv = dixLookupPrivate(&pPixmap->devPrivates, dri2PixmapPrivateKey); + dixSetPrivate(&pPixmap->devPrivates, dri2PixmapPrivateKey, NULL); + } + + if (pPriv == NULL) + return; + + drmDestroyDrawable(ds->fd, pPriv->drawable); + xfree(pPriv); +} + +Bool +DRI2Connect(ScreenPtr pScreen, int *fd, const char **driverName, + int *ddxMajor, int *ddxMinor, int *ddxPatch, + unsigned int *sareaHandle) +{ + DRI2ScreenPtr ds = DRI2GetScreen(pScreen); + + if (ds == NULL) + return FALSE; + + *fd = ds->fd; + *driverName = ds->driverName; + *ddxMajor = ds->ddxVersionMajor; + *ddxMinor = ds->ddxVersionMinor; + *ddxPatch = ds->ddxVersionPatch; + *sareaHandle = ds->sareaBO.handle; + + return TRUE; +} + +unsigned int +DRI2GetPixmapHandle(PixmapPtr pPixmap, unsigned int *flags) +{ + DRI2ScreenPtr ds = DRI2GetScreen(pPixmap->drawable.pScreen); + + return ds->getPixmapHandle(pPixmap, flags); +} + +static void * +DRI2SetupSAREA(ScreenPtr pScreen, size_t driverSareaSize) +{ + DRI2ScreenPtr ds = DRI2GetScreen(pScreen); + unsigned long mask; + const size_t event_buffer_size = 32 * 1024; + + ds->sareaSize = + sizeof(*ds->buffer) + event_buffer_size + + driverSareaSize + + sizeof (unsigned int); + + mask = DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE | DRM_BO_FLAG_MAPPABLE | + DRM_BO_FLAG_MEM_LOCAL | DRM_BO_FLAG_SHAREABLE; + + if (drmBOCreate(ds->fd, ds->sareaSize, 1, NULL, mask, 0, &ds->sareaBO)) + return NULL; + + if (drmBOMap(ds->fd, &ds->sareaBO, + DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE, 0, &ds->sarea)) { + drmBOUnreference(ds->fd, &ds->sareaBO); + return NULL; + } + + xf86DrvMsg(pScreen->myNum, X_INFO, + "[DRI2] Allocated %d byte SAREA, BO handle 0x%08x\n", + ds->sareaSize, ds->sareaBO.handle); + memset(ds->sarea, 0, ds->sareaSize); + + ds->buffer = ds->sarea; + ds->buffer->block_header = + DRI2_SAREA_BLOCK_HEADER(DRI2_SAREA_BLOCK_EVENT_BUFFER, + sizeof *ds->buffer + event_buffer_size); + ds->buffer->size = event_buffer_size; + + return DRI2_SAREA_BLOCK_NEXT(ds->buffer); +} + +void * +DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info) +{ + DRI2ScreenPtr ds; + void *p; + + ds = xalloc(sizeof *ds); + if (!ds) + return NULL; + + ds->fd = info->fd; + ds->driverName = info->driverName; + ds->ddxVersionMajor = info->ddxVersionMajor; + ds->ddxVersionMinor = info->ddxVersionMinor; + ds->ddxVersionPatch = info->ddxVersionPatch; + + ds->getPixmapHandle = info->getPixmapHandle; + ds->beginClipNotify = info->beginClipNotify; + ds->endClipNotify = info->endClipNotify; + + ds->ClipNotify = pScreen->ClipNotify; + pScreen->ClipNotify = DRI2ClipNotify; + ds->HandleExposures = pScreen->HandleExposures; + pScreen->HandleExposures = DRI2HandleExposures; + + dixSetPrivate(&pScreen->devPrivates, dri2ScreenPrivateKey, ds); + + p = DRI2SetupSAREA(pScreen, info->driverSareaSize); + if (p == NULL) { + xfree(ds); + return NULL; + } + + xf86DrvMsg(pScreen->myNum, X_INFO, "[DRI2] Setup complete\n"); + + return p; +} + +static pointer +DRI2Setup(pointer module, pointer opts, int *errmaj, int *errmin) +{ + return (pointer) 1; +} + +static XF86ModuleVersionInfo DRI2VersRec = +{ + "dri2", + MODULEVENDORSTRING, + MODINFOSTRING1, + MODINFOSTRING2, + XORG_VERSION_CURRENT, + 1, 0, 0, + ABI_CLASS_EXTENSION, + ABI_EXTENSION_VERSION, + MOD_CLASS_NONE, + { 0, 0, 0, 0 } +}; + +_X_EXPORT XF86ModuleData dri2ModuleData = { &DRI2VersRec, DRI2Setup, NULL }; + diff --git a/hw/xfree86/dri2/dri2.h b/hw/xfree86/dri2/dri2.h new file mode 100644 index 000000000..c687a93f6 --- /dev/null +++ b/hw/xfree86/dri2/dri2.h @@ -0,0 +1,80 @@ +/* + * Copyright © 2007 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Soft- + * ware"), to deal in the Software without restriction, including without + * limitation the rights to use, copy, modify, merge, publish, distribute, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, provided that the above copyright + * notice(s) and this permission notice appear in all copies of the Soft- + * ware and that both the above copyright notice(s) and this permission + * notice appear in supporting documentation. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- + * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY + * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN + * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE- + * QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR- + * MANCE OF THIS SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall + * not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization of + * the copyright holder. + * + * Authors: + * Kristian Høgsberg (krh@redhat.com) + */ + +#ifndef _DRI2_H_ +#define _DRI2_H_ + +typedef unsigned int (*DRI2GetPixmapHandleProcPtr)(PixmapPtr p, + unsigned int *flags); +typedef void (*DRI2BeginClipNotifyProcPtr)(ScreenPtr pScreen); +typedef void (*DRI2EndClipNotifyProcPtr)(ScreenPtr pScreen); + +typedef struct { + unsigned int version; /* Version of this struct */ + int fd; + size_t driverSareaSize; + const char *driverName; + int ddxVersionMajor, ddxVersionMinor, ddxVersionPatch; + DRI2GetPixmapHandleProcPtr getPixmapHandle; + DRI2BeginClipNotifyProcPtr beginClipNotify; + DRI2EndClipNotifyProcPtr endClipNotify; +} DRI2InfoRec, *DRI2InfoPtr; + +void *DRI2ScreenInit(ScreenPtr pScreen, + DRI2InfoPtr info); + +void DRI2CloseScreen(ScreenPtr pScreen); + +Bool DRI2Connect(ScreenPtr pScreen, + int *fd, + const char **driverName, + int *ddxMajor, + int *ddxMinor, + int *ddxPatch, + unsigned int *sareaHandle); + +unsigned int DRI2GetPixmapHandle(PixmapPtr pPixmap, + unsigned int *flags); + +void DRI2Lock(ScreenPtr pScreen); +void DRI2Unlock(ScreenPtr pScreen); + +Bool DRI2CreateDrawable(ScreenPtr pScreen, + DrawablePtr pDraw, + drm_drawable_t *pDrmDrawable); + +void DRI2DestroyDrawable(ScreenPtr pScreen, + DrawablePtr pDraw); + +void DRI2ExtensionInit(void); + +#endif diff --git a/hw/xfree86/dummylib/Makefile.am b/hw/xfree86/dummylib/Makefile.am index ad3f1ea12..85a1d03dd 100644 --- a/hw/xfree86/dummylib/Makefile.am +++ b/hw/xfree86/dummylib/Makefile.am @@ -1,6 +1,6 @@ # libdummy.a contains just those bits used in the server itself # libdummy-nonserver.a contains additional routines normally found in the -# server for use in building the utilities like scanpci & the config tools +# server for use in building the utilities like config tools noinst_LIBRARIES = libdummy-nonserver.a diff --git a/hw/xfree86/exa/examodule.c b/hw/xfree86/exa/examodule.c index b8d306eb4..086639cc5 100644 --- a/hw/xfree86/exa/examodule.c +++ b/hw/xfree86/exa/examodule.c @@ -178,8 +178,6 @@ exaDDXDriverInit(ScreenPtr pScreen) } -static MODULESETUPPROTO(exaSetup); - /*ARGSUSED*/ static const OptionInfoRec * EXAAvailableOptions(void *unused) @@ -201,26 +199,4 @@ static XF86ModuleVersionInfo exaVersRec = {0,0,0,0} }; -_X_EXPORT XF86ModuleData exaModuleData = { &exaVersRec, exaSetup, NULL }; - -static ModuleInfoRec EXA = { - 1, - "EXA", - NULL, - 0, - EXAAvailableOptions, -}; - -/*ARGSUSED*/ -static pointer -exaSetup(pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor) -{ - static Bool Initialised = FALSE; - - if (!Initialised) { - Initialised = TRUE; - xf86AddModuleInfo(&EXA, Module); - } - - return (pointer)TRUE; -} +_X_EXPORT XF86ModuleData exaModuleData = { &exaVersRec, NULL, NULL }; diff --git a/hw/xfree86/loader/dlloader.c b/hw/xfree86/loader/dlloader.c index 2afdef789..4caefd071 100644 --- a/hw/xfree86/loader/dlloader.c +++ b/hw/xfree86/loader/dlloader.c @@ -71,15 +71,9 @@ #define DLSYM_PREFIX "" #endif -typedef struct { - int handle; - void *dlhandle; - int flags; -} DLModuleRec, *DLModulePtr; - /* Hooray, yet another open coded linked list! FIXME */ typedef struct DLModuleList { - DLModulePtr module; + void *module; struct DLModuleList *next; } DLModuleList; @@ -88,19 +82,22 @@ static DLModuleList *dlModuleList = NULL; static void * DLFindSymbolLocal(pointer module, const char *name) { - DLModulePtr dlfile = module; void *p; char *n; static const char symPrefix[] = DLSYM_PREFIX; - n = malloc(strlen(symPrefix) + strlen(name) + 1); - if (strlen(symPrefix)) + if (strlen(symPrefix)) { + n = malloc(strlen(symPrefix) + strlen(name) + 1); sprintf(n, "%s%s", symPrefix, name); - else - sprintf(n, "%s", name); - p = dlsym(dlfile->dlhandle, n); - free(n); + } else { + n = name; + } + + p = dlsym(module, n); + + if (strlen(symPrefix)) + free(n); return p; } @@ -127,7 +124,7 @@ DLFindSymbol(const char *name) global_scope = dlopen(NULL, DLOPEN_LAZY | DLOPEN_GLOBAL); if (global_scope) - return dlsym(global_scope, name); + return DLFindSymbolLocal(global_scope, name); return NULL; } @@ -135,23 +132,17 @@ DLFindSymbol(const char *name) void * DLLoadModule(loaderPtr modrec, int flags) { - DLModulePtr dlfile; + void * dlfile; DLModuleList *l; int dlopen_flags; - if ((dlfile = calloc(1, sizeof(DLModuleRec))) == NULL) { - ErrorF("Unable to allocate DLModuleRec\n"); - return NULL; - } - dlfile->handle = modrec->handle; if (flags & LD_FLAG_GLOBAL) dlopen_flags = DLOPEN_LAZY | DLOPEN_GLOBAL; else dlopen_flags = DLOPEN_LAZY; - dlfile->dlhandle = dlopen(modrec->name, dlopen_flags); - if (dlfile->dlhandle == NULL) { + dlfile = dlopen(modrec->name, dlopen_flags); + if (dlfile == NULL) { ErrorF("dlopen: %s\n", dlerror()); - free(dlfile); return NULL; } @@ -166,7 +157,6 @@ DLLoadModule(loaderPtr modrec, int flags) void DLUnloadModule(void *modptr) { - DLModulePtr dlfile = (DLModulePtr) modptr; DLModuleList *l, *p; /* remove it from dlModuleList. */ @@ -185,6 +175,5 @@ DLUnloadModule(void *modptr) p = l; } } - dlclose(dlfile->dlhandle); - free(modptr); + dlclose(modptr); } diff --git a/hw/xfree86/loader/extsym.c b/hw/xfree86/loader/extsym.c index e09e9c084..1bdff9482 100644 --- a/hw/xfree86/loader/extsym.c +++ b/hw/xfree86/loader/extsym.c @@ -44,7 +44,6 @@ extern RESTYPE ShmSegType, ShmPixType; extern Bool noPanoramiXExtension; extern int PanoramiXNumScreens; extern PanoramiXData *panoramiXdataPtr; -extern XID *PanoramiXVisualTable; extern unsigned long XRT_WINDOW; extern unsigned long XRT_PIXMAP; extern unsigned long XRT_GC; @@ -69,7 +68,6 @@ _X_HIDDEN void *extLookupTab[] = { SYMFUNC(XineramaDeleteResource) SYMVAR(PanoramiXNumScreens) SYMVAR(panoramiXdataPtr) - SYMVAR(PanoramiXVisualTable) SYMVAR(XRT_WINDOW) SYMVAR(XRT_PIXMAP) SYMVAR(XRT_GC) diff --git a/hw/xfree86/loader/loaderProcs.h b/hw/xfree86/loader/loaderProcs.h index b71ad4590..9c73db3a6 100644 --- a/hw/xfree86/loader/loaderProcs.h +++ b/hw/xfree86/loader/loaderProcs.h @@ -62,17 +62,11 @@ typedef struct module_desc { struct module_desc *child; struct module_desc *sib; struct module_desc *parent; - struct module_desc *demand_next; char *name; - char *filename; - char *identifier; - XID client_id; - int in_use; int handle; ModuleSetupProc SetupProc; ModuleTearDownProc TearDownProc; void *TearDownData; /* returned from SetupProc */ - const char *path; const XF86ModuleVersionInfo *VersionInfo; } ModuleDesc, *ModuleDescPtr; diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c index 45e9cb374..7f3bbe49c 100644 --- a/hw/xfree86/loader/loadmod.c +++ b/hw/xfree86/loader/loadmod.c @@ -177,6 +177,7 @@ InitPathList(const char *path) } if (list) list[n] = NULL; + xfree(fullpath); return list; } @@ -786,12 +787,7 @@ NewModuleDesc(const char *name) mdp->child = NULL; mdp->sib = NULL; mdp->parent = NULL; - mdp->demand_next = NULL; mdp->name = xstrdup(name); - mdp->filename = NULL; - mdp->identifier = NULL; - mdp->client_id = 0; - mdp->in_use = 0; mdp->handle = -1; mdp->SetupProc = NULL; mdp->TearDownProc = NULL; @@ -816,15 +812,10 @@ DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent) if (LoaderHandleOpen(mod->handle) == -1) return NULL; - ret->filename = xstrdup(mod->filename); - ret->identifier = mod->identifier; - ret->client_id = mod->client_id; - ret->in_use = mod->in_use; ret->handle = mod->handle; ret->SetupProc = mod->SetupProc; ret->TearDownProc = mod->TearDownProc; ret->TearDownData = NULL; - ret->path = mod->path; ret->child = DuplicateModule(mod->child, ret); ret->sib = DuplicateModule(mod->sib, parent); ret->parent = parent; @@ -943,8 +934,6 @@ doLoadModule(const char *module, const char *path, const char **subdirlist, if (ret->handle < 0) goto LoadModule_fail; - ret->filename = xstrdup(found); - /* drop any explicit suffix from the module name */ p = strchr(name, '.'); if (p) @@ -998,7 +987,6 @@ doLoadModule(const char *module, const char *path, const char **subdirlist, ret->SetupProc = setup; if (teardown) ret->TearDownProc = teardown; - ret->path = path; ret->VersionInfo = vers; } else { /* No initdata is OK for external modules */ @@ -1120,7 +1108,6 @@ UnloadModuleOrDriver(ModuleDescPtr mod) if (mod->sib) UnloadModuleOrDriver(mod->sib); TestFree(mod->name); - TestFree(mod->filename); xfree(mod); #ifdef __alpha__ istream_mem_barrier(); @@ -1145,7 +1132,6 @@ UnloadSubModule(ModuleDescPtr mod) UnloadModuleOrDriver(mod->child); TestFree(mod->name); - TestFree(mod->filename); xfree(mod); } @@ -1156,12 +1142,6 @@ FreeModuleDesc(ModuleDescPtr head) if (head == (ModuleDescPtr) 1) return; - /* - * only free it if it's not marked as in use. In use means that it may - * be unloaded someday, and UnloadModule will free it - */ - if (head->in_use) - return; if (head->child) FreeModuleDesc(head->child); sibs = head; diff --git a/hw/xfree86/loader/xf86sym.c b/hw/xfree86/loader/xf86sym.c index 417a3508f..688d2022e 100644 --- a/hw/xfree86/loader/xf86sym.c +++ b/hw/xfree86/loader/xf86sym.c @@ -482,8 +482,6 @@ _X_HIDDEN void *xfree86LookupTab[] = { SYMFUNC(xf86IsScreenPrimary) SYMFUNC(xf86RegisterRootWindowProperty) SYMFUNC(xf86IsUnblank) - SYMFUNC(xf86AddModuleInfo) - SYMFUNC(xf86DeleteModuleInfo) #if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) /* xf86sbusBus.c */ diff --git a/hw/xfree86/modes/Makefile.am b/hw/xfree86/modes/Makefile.am index 1f82068b3..6ee85757a 100644 --- a/hw/xfree86/modes/Makefile.am +++ b/hw/xfree86/modes/Makefile.am @@ -16,7 +16,7 @@ libxf86modes_a_SOURCES = \ INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \ -I$(srcdir)/../loader -I$(srcdir)/../rac -I$(srcdir)/../parser \ - -I$(srcdir)/../scanpci -I$(srcdir)/../vbe -I$(srcdir)/../int10 \ + -I$(srcdir)/../vbe -I$(srcdir)/../int10 \ -I$(srcdir)/../vgahw -I$(srcdir)/../ramdac \ -I$(srcdir)/../dixmods/extmod diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index 10db86267..266e08195 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -236,6 +236,9 @@ xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, int saved_x, saved_y; Rotation saved_rotation; + if (crtc->funcs->set_mode_major) + return crtc->funcs->set_mode_major(crtc, mode, rotation, x, y); + crtc->enabled = xf86CrtcInUse (crtc); if (!crtc->enabled) @@ -1362,8 +1365,8 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY) if (sync_source == sync_default) sync_source = sync_edid; } - if (ranges->max_clock > max_clock) - max_clock = ranges->max_clock; + if (ranges->max_clock * 1000 > max_clock) + max_clock = ranges->max_clock * 1000; } } } @@ -1410,9 +1413,12 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY) /* * Check default modes against monitor max clock */ - if (max_clock) + if (max_clock) { xf86ValidateModesClocks(scrn, default_modes, &min_clock, &max_clock, 1); + xf86ValidateModesClocks(scrn, output_modes, + &min_clock, &max_clock, 1); + } output->probed_modes = NULL; output->probed_modes = xf86ModesAdd (output->probed_modes, config_modes); diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h index 62d85bbc9..cc045b229 100644 --- a/hw/xfree86/modes/xf86Crtc.h +++ b/hw/xfree86/modes/xf86Crtc.h @@ -206,6 +206,13 @@ typedef struct _xf86CrtcFuncs { */ void (*destroy) (xf86CrtcPtr crtc); + + /** + * Less fine-grained mode setting entry point for kernel modesetting + */ + Bool + (*set_mode_major)(xf86CrtcPtr crtc, DisplayModePtr mode, + Rotation rotation, int x, int y); } xf86CrtcFuncsRec, *xf86CrtcFuncsPtr; struct _xf86Crtc { diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c index b865727ef..a1bdb0b99 100644 --- a/hw/xfree86/modes/xf86EdidModes.c +++ b/hw/xfree86/modes/xf86EdidModes.c @@ -110,8 +110,9 @@ static Bool quirk_detailed_h_in_cm (int scrnIndex, xf86MonPtr DDC) { /* Bug #10304: "LGPhilipsLCD LP154W01-A5" */ /* Bug #12784: "LGPhilipsLCD LP154W01-TLA2" */ + /* Red Hat #435216 "LGPhilipsLCD LP154W01-TLAE" */ if (memcmp (DDC->vendor.name, "LPL", 4) == 0 && - DDC->vendor.prod_id == 0) + (DDC->vendor.prod_id == 0 || DDC->vendor.prod_id == 0x2a00)) return TRUE; /* Bug #11603: Funai Electronics PM36B */ diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c index c129d9b92..e2d6295b9 100644 --- a/hw/xfree86/modes/xf86Rotate.c +++ b/hw/xfree86/modes/xf86Rotate.c @@ -580,9 +580,9 @@ xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation) } else { - PictureTransformTranslate (&crtc_to_fb, &fb_to_crtc, crtc->x, crtc->y); + PictureTransformTranslate (&crtc_to_fb, &fb_to_crtc, F(crtc->x), F(crtc->y)); PictureTransformIsInverse ("offset", &crtc_to_fb, &fb_to_crtc); - + /* * these are the size of the shadow pixmap, which * matches the mode, not the pre-rotated copy in the diff --git a/hw/xfree86/os-support/bsd/bsd_apm.c b/hw/xfree86/os-support/bsd/bsd_apm.c index 61779875c..43eda7421 100644 --- a/hw/xfree86/os-support/bsd/bsd_apm.c +++ b/hw/xfree86/os-support/bsd/bsd_apm.c @@ -66,7 +66,7 @@ bsdPMGetEventFromOS(int fd, pmEvent *events, int num) if (ioctl(fd, APM_IOC_NEXTEVENT, &bsdEvent) < 0) { if (errno != EAGAIN) { xf86Msg(X_WARNING, "bsdPMGetEventFromOS: APM_IOC_NEXTEVENT" - " errno = %d\n", errno); + " %s\n", strerror(errno)); } break; } diff --git a/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c b/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c index b0171e2c3..b37070c37 100644 --- a/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c +++ b/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c @@ -102,7 +102,7 @@ bsdPMGetEventFromOS(int kq, pmEvent *events, int num) break; } else if (result < 0) { xf86Msg(X_WARNING, "bsdPMGetEventFromOS: kevent returns" - " errno = %d\n", errno); + " %s\n", strerror(errno)); break; } events[i] = bsdToXF86(APM_EVENT_TYPE(ev.data)); diff --git a/hw/xfree86/os-support/bus/Pci.c b/hw/xfree86/os-support/bus/Pci.c index a34ed99d0..064533c77 100644 --- a/hw/xfree86/os-support/bus/Pci.c +++ b/hw/xfree86/os-support/bus/Pci.c @@ -1,65 +1,4 @@ /* - * Pci.c - New server PCI access functions - * - * The XFree86 server PCI access functions have been reimplemented as a - * framework that allows each supported platform/OS to have their own - * platform/OS specific pci driver. - * - * All of the public PCI access functions exported to the other parts of - * the server are declared in Pci.h and defined herein. These include: - * pciInit() - Initialize PCI access functions - * pciReadLong() - Read a 32 bit value from a device's cfg space - * pciReadWord() - Read a 16 bit value from a device's cfg space - * pciReadByte() - Read an 8 bit value from a device's cfg space - * pciWriteLong() - Write a 32 bit value to a device's cfg space - * pciWriteWord() - Write a 16 bit value to a device's cfg space - * pciWriteByte() - Write an 8 bit value to a device's cfg space - * pciSetBitsLong() - Write a 32 bit value against a mask - * pciSetBitsByte() - Write an 8 bit value against a mask - * pciTag() - Return tag for a given PCI bus, device, & - * function - * pciBusAddrToHostAddr() - Convert a PCI address to a host address - * xf86scanpci() - Return info about all PCI devices - * xf86MapDomainMemory() - Like xf86MapPciMem() but can handle - * domain/host address translation - * xf86MapLegacyIO() - Maps PCI I/O spaces - * - * The actual PCI backend driver is selected by the pciInit() function - * (see below) using either compile time definitions, run-time checks, - * or both. - * - * Certain generic functions are provided that make the implementation - * of certain well behaved platforms (e.g. those supporting PCI config - * mechanism 1 or some thing close to it) very easy. - * - * Less well behaved platforms/OS's can roll their own functions. - * - * To add support for another platform/OS, add a call to fooPciInit() within - * pciInit() below under the correct compile time definition or run-time - * conditional. - * - * The fooPciInit() procedure must do three things: - * 1) Initialize the pciBusTable[] for all primary PCI buses including - * the per domain PCI access functions (readLong, writeLong, - * addrBusToHost, and addrHostToBus). - * - * 2) Add entries to pciBusTable[] for configured secondary buses. This - * step may be skipped if a platform is using the generic findFirst/ - * findNext functions because these procedures will automatically - * discover and add secondary buses dynamically. - * - * 3) Overide default settings for global PCI access functions if - * required. These include pciFindFirstFP, pciFindNextFP, - * Of course, if you choose not to use one of the generic - * functions, you will need to provide a platform specifc replacement. - * - * Gary Barton - * Concurrent Computer Corporation - * garyb@gate.net - * - */ - -/* * Copyright 1998 by Concurrent Computer Corporation * * Permission to use, copy, modify, distribute, and sell this software @@ -197,14 +136,6 @@ #include <pciaccess.h> -#if 0 -#include <stdio.h> -#include <unistd.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#endif - #define PCI_MFDEV_SUPPORT 1 /* Include PCI multifunction device support */ #define PCI_BRIDGE_SUPPORT 1 /* Include support for PCI-to-PCI bridges */ @@ -217,35 +148,11 @@ _X_EXPORT int pciNumBuses = 0; /* Actual number of PCI buses */ int pciMaxBusNum = MAX_PCI_BUSES; -/* - * pciInit - choose correct platform/OS specific PCI init routine - */ -static void -pciInit(void) -{ - static int pciInitialized = 0; - - if (!pciInitialized) { - pciInitialized = 1; - - /* XXX */ -#if defined(DEBUGPCI) - if (DEBUGPCI >= xf86Verbose) { - xf86Verbose = DEBUGPCI; - } -#endif - - ARCH_PCI_INIT(); - } -} - _X_EXPORT ADDRESS pciBusAddrToHostAddr(PCITAG tag, PciAddrType type, ADDRESS addr) { int bus = PCI_BUS_FROM_TAG(tag); - pciInit(); - if ((bus >= 0) && (bus < pciNumBuses) && pciBusInfo[bus] && pciBusInfo[bus]->funcs->pciAddrBusToHost) return (*pciBusInfo[bus]->funcs->pciAddrBusToHost)(tag, type, addr); @@ -268,21 +175,19 @@ pciAddrNOOP(PCITAG tag, PciAddrType type, ADDRESS addr) _X_EXPORT Bool xf86scanpci(void) { - static Bool done = FALSE; - static Bool success = FALSE; + Bool success = FALSE; - /* - * if we haven't found PCI devices checking for pci_devp may - * result in an endless recursion if platform/OS specific PCI - * bus probing code calls this function from with in it. - */ - if (done) - return success; + success = (pci_system_init() == 0); - done = TRUE; + /* XXX */ +#if defined(DEBUGPCI) + if (DEBUGPCI >= xf86Verbose) { + xf86Verbose = DEBUGPCI; + } +#endif - success = (pci_system_init() == 0); - pciInit(); + /* choose correct platform/OS specific PCI init routine */ + ARCH_PCI_INIT(); return success; } diff --git a/hw/xfree86/os-support/linux/lnx_pci.c b/hw/xfree86/os-support/linux/lnx_pci.c index 53818f2dc..8eedfa49f 100644 --- a/hw/xfree86/os-support/linux/lnx_pci.c +++ b/hw/xfree86/os-support/linux/lnx_pci.c @@ -25,8 +25,6 @@ #define PCIADDR_FMT "%lx" #endif -int lnxPciInit(void); - struct pci_dev { unsigned int domain; unsigned int bus; @@ -139,14 +137,6 @@ static struct pci_dev *xf86OSLinuxGetPciDevs(void) { return ret; } -/* not to be confused with linuxPciInit (i.e. ARCH_PCI_INIT), found in - * os-support/bus/linuxPci.c. */ -int lnxPciInit(void) { - if (!xf86OSLinuxPCIDevs) - xf86OSLinuxPCIDevs = xf86OSLinuxGetPciDevs(); - return xf86OSLinuxNumPciDevs; -} - /* Query the kvirt address (64bit) of a BAR range from size for a given TAG */ unsigned long xf86GetOSOffsetFromPCI(PCITAG tag, int space, unsigned long base) diff --git a/hw/xfree86/os-support/solaris/sun_apm.c b/hw/xfree86/os-support/solaris/sun_apm.c index a9657fd55..7decc900f 100644 --- a/hw/xfree86/os-support/solaris/sun_apm.c +++ b/hw/xfree86/os-support/solaris/sun_apm.c @@ -149,7 +149,7 @@ sunPMGetEventFromOS(int fd, pmEvent *events, int num) if (ioctl(fd, APM_IOC_NEXTEVENT, &sunEvent) < 0) { if (errno != EAGAIN) { xf86Msg(X_WARNING, "sunPMGetEventFromOS: APM_IOC_NEXTEVENT" - " errno = %d\n", errno); + " %s\n", strerror(errno)); } break; } @@ -178,7 +178,7 @@ sunPMConfirmEventToOs(int fd, pmEvent event) return PM_CONTINUE; else { xf86Msg(X_WARNING, "sunPMConfirmEventToOs: APM_IOC_SUSPEND" - " errno = %d\n", errno); + " %s\n", strerror(errno)); return PM_FAILED; } case XF86_APM_STANDBY_RESUME: @@ -191,7 +191,7 @@ sunPMConfirmEventToOs(int fd, pmEvent event) return PM_CONTINUE; else { xf86Msg(X_WARNING, "sunPMConfirmEventToOs: APM_IOC_RESUME" - " errno = %d\n", errno); + " %s\n", strerror(errno)); return PM_FAILED; } default: diff --git a/hw/xfree86/parser/xf86tokens.h b/hw/xfree86/parser/xf86tokens.h index 786dac145..6e4fdeab5 100644 --- a/hw/xfree86/parser/xf86tokens.h +++ b/hw/xfree86/parser/xf86tokens.h @@ -208,7 +208,6 @@ typedef enum { XKBVARIANT, XKBOPTIONS, /* The next two have become ServerFlags options */ - VTINIT, VTSYSREQ, /* Obsolete keyboard tokens */ SERVERNUM, diff --git a/hw/xfree86/vbe/vbe.c b/hw/xfree86/vbe/vbe.c index 06559bbd5..8af1727cc 100644 --- a/hw/xfree86/vbe/vbe.c +++ b/hw/xfree86/vbe/vbe.c @@ -1019,7 +1019,7 @@ VBEGetPixelClock(vbeInfoPtr pVbe, int mode, int clock) /* Input: AX := 4F0Bh VBE Get Pixel Clock - BL := 01h Get Pixel Clock + BL := 00h Get Pixel Clock ECX := pixel clock in units of Hz DX := mode number @@ -1030,7 +1030,7 @@ VBEGetPixelClock(vbeInfoPtr pVbe, int mode, int clock) pVbe->pInt10->num = 0x10; pVbe->pInt10->ax = 0x4f0b; - pVbe->pInt10->bx = 0x01; + pVbe->pInt10->bx = 0x00; pVbe->pInt10->cx = clock; pVbe->pInt10->dx = mode; xf86ExecX86int10(pVbe->pInt10); diff --git a/hw/xfree86/x86emu/ops2.c b/hw/xfree86/x86emu/ops2.c index 8c6c53539..324de8ad8 100644 --- a/hw/xfree86/x86emu/ops2.c +++ b/hw/xfree86/x86emu/ops2.c @@ -328,6 +328,20 @@ static void x86emuOp2_pop_FS(u8 X86EMU_UNUSED(op2)) } /**************************************************************************** +REMARKS: CPUID takes EAX/ECX as inputs, writes EAX/EBX/ECX/EDX as output +Handles opcode 0x0f,0xa2 +****************************************************************************/ +static void x86emuOp2_cpuid(u8 X86EMU_UNUSED(op2)) +{ + START_OF_INSTR(); + DECODE_PRINTF("CPUID\n"); + TRACE_AND_STEP(); + cpuid(); + DECODE_CLEAR_SEGOVR(); + END_OF_INSTR(); +} + +/**************************************************************************** REMARKS: Handles opcode 0x0f,0xa3 ****************************************************************************/ @@ -2734,7 +2748,7 @@ void (*x86emu_optab2[256])(u8) = /* 0xa0 */ x86emuOp2_push_FS, /* 0xa1 */ x86emuOp2_pop_FS, -/* 0xa2 */ x86emuOp2_illegal_op, +/* 0xa2 */ x86emuOp2_cpuid, /* 0xa3 */ x86emuOp2_bt_R, /* 0xa4 */ x86emuOp2_shld_IMM, /* 0xa5 */ x86emuOp2_shld_CL, diff --git a/hw/xfree86/x86emu/prim_ops.c b/hw/xfree86/x86emu/prim_ops.c index b9e7257ca..b42cdc0a5 100644 --- a/hw/xfree86/x86emu/prim_ops.c +++ b/hw/xfree86/x86emu/prim_ops.c @@ -102,6 +102,12 @@ #define PRIM_OPS_NO_REDEFINE_ASM #include "x86emu/x86emui.h" +#if defined(__GNUC__) +# if defined (__i386__) || defined(__i386) || defined(__AMD64__) || defined(__x86_64__) || defined(__amd64__) +# include "x86emu/prim_x86_gcc.h" +# endif +#endif + /*------------------------- Global Variables ------------------------------*/ static u32 x86emu_parity_tab[8] = @@ -2654,3 +2660,63 @@ DB( if (CHECK_SP_ACCESS()) return res; } +/**************************************************************************** +REMARKS: +CPUID takes EAX/ECX as inputs, writes EAX/EBX/ECX/EDX as output +****************************************************************************/ +void cpuid (void) +{ + u32 feature = M.x86.R_EAX; + +#ifdef X86EMU_HAS_HW_CPUID + /* If the platform allows it, we will base our values on the real + * results from the CPUID instruction. We limit support to the + * first two features, and the results of those are sanitized. + */ + if (feature <= 1) + hw_cpuid(&M.x86.R_EAX, &M.x86.R_EBX, &M.x86.R_ECX, &M.x86.R_EDX); +#endif + + switch (feature) { + case 0: + /* Regardless if we have real data from the hardware, the emulator + * will only support upto feature 1, which we set in register EAX. + * Registers EBX:EDX:ECX contain a string identifying the CPU. + */ + M.x86.R_EAX = 1; +#ifndef X86EMU_HAS_HW_CPUID + /* EBX:EDX:ECX = "GenuineIntel" */ + M.x86.R_EBX = 0x756e6547; + M.x86.R_EDX = 0x49656e69; + M.x86.R_ECX = 0x6c65746e; +#endif + break; + case 1: +#ifndef X86EMU_HAS_HW_CPUID + /* If we don't have x86 compatible hardware, we return values from an + * Intel 486dx4; which was one of the first processors to have CPUID. + */ + M.x86.R_EAX = 0x00000480; + M.x86.R_EBX = 0x00000000; + M.x86.R_ECX = 0x00000000; + M.x86.R_EDX = 0x00000002; /* VME */ +#else + /* In the case that we have hardware CPUID instruction, we make sure + * that the features reported are limited to TSC and VME. + */ + M.x86.R_EDX &= 0x00000012; +#endif + break; + default: + /* Finally, we don't support any additional features. Most CPUs + * return all zeros when queried for invalid or unsupported feature + * numbers. + */ + M.x86.R_EAX = 0; + M.x86.R_EBX = 0; + M.x86.R_ECX = 0; + M.x86.R_EDX = 0; + break; + } +} + diff --git a/hw/xfree86/x86emu/x86emu/prim_ops.h b/hw/xfree86/x86emu/x86emu/prim_ops.h index bea8357e4..6ac2a29f6 100644 --- a/hw/xfree86/x86emu/x86emu/prim_ops.h +++ b/hw/xfree86/x86emu/x86emu/prim_ops.h @@ -133,6 +133,7 @@ void push_word (u16 w); void push_long (u32 w); u16 pop_word (void); u32 pop_long (void); +void cpuid (void); #ifdef __cplusplus } /* End of "C" linkage for C++ */ diff --git a/hw/xfree86/x86emu/x86emu/prim_x86_gcc.h b/hw/xfree86/x86emu/x86emu/prim_x86_gcc.h new file mode 100644 index 000000000..af61e2023 --- /dev/null +++ b/hw/xfree86/x86emu/x86emu/prim_x86_gcc.h @@ -0,0 +1,79 @@ +/**************************************************************************** +* +* Inline helpers for x86emu +* +* Copyright (C) 2008 Bart Trojanowski, Symbio Technologies, LLC +* +* ======================================================================== +* +* Permission to use, copy, modify, distribute, and sell this software and +* its documentation for any purpose is hereby granted without fee, +* provided that the above copyright notice appear in all copies and that +* both that copyright notice and this permission notice appear in +* supporting documentation, and that the name of the authors not be used +* in advertising or publicity pertaining to distribution of the software +* without specific, written prior permission. The authors makes no +* representations about the suitability of this software for any purpose. +* It is provided "as is" without express or implied warranty. +* +* THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +* EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR +* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF +* USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +* PERFORMANCE OF THIS SOFTWARE. +* +* ======================================================================== +* +* Language: GNU C +* Environment: GCC on i386 or x86-64 +* Developer: Bart Trojanowski +* +* Description: This file defines a few x86 macros that can be used by the +* emulator to execute native instructions. +* +* For PIC vs non-PIC code refer to: +* http://sam.zoy.org/blog/2007-04-13-shlib-with-non-pic-code-have-inline-assembly-and-pic-mix-well +* +****************************************************************************/ +#ifndef __X86EMU_PRIM_X86_GCC_H +#define __X86EMU_PRIM_X86_GCC_H + +#include "x86emu/types.h" + +#if !defined(__GNUC__) || !(defined (__i386__) || defined(__i386) || defined(__AMD64__) || defined(__x86_64__) || defined(__amd64__)) +#error This file is intended to be used by gcc on i386 or x86-64 system +#endif + +#if defined(__PIC__) && defined(__i386__) + +#define X86EMU_HAS_HW_CPUID 1 +static inline void hw_cpuid (u32 *a, u32 *b, u32 *c, u32 *d) +{ + __asm__ __volatile__ ("pushl %%ebx \n\t" + "cpuid \n\t" + "movl %%ebx, %1 \n\t" + "popl %%ebx \n\t" + : "=a" (*a), "=r" (*b), + "=c" (*c), "=d" (*d) + : "a" (*a), "c" (*c) + : "cc"); +} + +#else // ! (__PIC__ && __i386__) + +#define x86EMU_HAS_HW_CPUID 1 +static inline void hw_cpuid (u32 *a, u32 *b, u32 *c, u32 *d) +{ + __asm__ __volatile__ ("cpuid" + : "=a" (*a), "=b" (*b), + "=c" (*c), "=d" (*d) + : "a" (*a), "c" (*c) + : "cc"); +} + +#endif // __PIC__ && __i386__ + + +#endif // __X86EMU_PRIM_X86_GCC_H diff --git a/hw/xfree86/xaa/xaaInitAccel.c b/hw/xfree86/xaa/xaaInitAccel.c index fe0b70a14..1b7c15487 100644 --- a/hw/xfree86/xaa/xaaInitAccel.c +++ b/hw/xfree86/xaa/xaaInitAccel.c @@ -93,8 +93,6 @@ static const OptionInfoRec XAAOptions[] = { OPTV_NONE, {0}, FALSE } }; -static MODULESETUPPROTO(xaaSetup); - static XF86ModuleVersionInfo xaaVersRec = { "xaa", @@ -109,29 +107,7 @@ static XF86ModuleVersionInfo xaaVersRec = {0,0,0,0} }; -_X_EXPORT XF86ModuleData xaaModuleData = { &xaaVersRec, xaaSetup, NULL }; - -ModuleInfoRec XAA = { - 1, - "XAA", - NULL, - 0, - XAAAvailableOptions, -}; - -/*ARGSUSED*/ -static pointer -xaaSetup(pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor) -{ - static Bool Initialised = FALSE; - - if (!Initialised) { - Initialised = TRUE; - xf86AddModuleInfo(&XAA, Module); - } - - return (pointer)TRUE; -} +_X_EXPORT XF86ModuleData xaaModuleData = { &xaaVersRec, NULL, NULL }; /*ARGSUSED*/ static const OptionInfoRec * diff --git a/hw/xgl/glx/xglxorg.c b/hw/xgl/glx/xglxorg.c index 984c50ee2..1d6fc9a30 100644 --- a/hw/xgl/glx/xglxorg.c +++ b/hw/xgl/glx/xglxorg.c @@ -253,8 +253,6 @@ xglxArgRec xorgUidArgs[] = { xglxArgRec xorgArgs[] = { ARG (xglxProcessXorgWaitExitArgument, "-probeonly", " probe for devices, then exit"), - ARG (xglxProcessXorgWaitExitArgument, "-scanpci", - " execute the scanpci module and exit"), XORG_UARG ("-verbose", " [n] verbose startup messages", 2), XORG_UARG ("-logverbose", " [n] verbose log messages", 2), XORG_UARG ("-quiet", " minimal startup messages", 1), diff --git a/hw/xnest/Font.c b/hw/xnest/Font.c index 72edcee9a..9f30085b1 100644 --- a/hw/xnest/Font.c +++ b/hw/xnest/Font.c @@ -44,8 +44,10 @@ xnestRealizeFont(ScreenPtr pScreen, FontPtr pFont) FontSetPrivate(pFont, xnestFontPrivateIndex, NULL); +#ifdef XPRINT if (requestingClient && XpClientIsPrintClient(requestingClient, NULL)) return True; +#endif name_atom = MakeAtom("FONT", 4, True); value_atom = 0L; diff --git a/hw/xprint/ps/psout_ftpstype1.c b/hw/xprint/ps/psout_ftpstype1.c index 2d40c186a..572e13601 100644 --- a/hw/xprint/ps/psout_ftpstype1.c +++ b/hw/xprint/ps/psout_ftpstype1.c @@ -124,7 +124,7 @@ int PsOut_DownloadFreeType1(PsOutPtr self, const char *psfontname, FontPtr pFont switch(childpid) { case -1: - FatalError("PS DDX internal error: Cannot fork() converter child process, errno=%d\n", (int)errno); + FatalError("PS DDX internal error: Cannot fork() converter child process, %s\n", strerror(errno)); break; case 0: /* child */ fclose(self->Fp); diff --git a/hw/xquartz/X11Application.h b/hw/xquartz/X11Application.h index af5aea2ce..86da67f2e 100644 --- a/hw/xquartz/X11Application.h +++ b/hw/xquartz/X11Application.h @@ -98,5 +98,6 @@ extern int quartzHasRoot, quartzEnableRootless; #define PREFS_XP_OPTIONS "xp_options" #define PREFS_ENABLE_STEREO "enable_stereo" #define PREFS_LOGIN_SHELL "login_shell" +#define PREFS_QUARTZ_WM_CLICK_THROUGH "wm_click_through" #endif /* X11APPLICATION_H */ diff --git a/hw/xquartz/X11Controller.h b/hw/xquartz/X11Controller.h index 47f5220e4..64d5cd1ce 100644 --- a/hw/xquartz/X11Controller.h +++ b/hw/xquartz/X11Controller.h @@ -37,29 +37,30 @@ @interface X11Controller : NSObject { - NSPanel *prefs_panel; - - NSButton *fake_buttons; - NSButton *enable_fullscreen; - NSButton *use_sysbeep; - NSButton *enable_keyequivs; - NSButton *sync_keymap; - NSButton *enable_auth; - NSButton *enable_tcp; - NSPopUpButton *depth; - - NSMenuItem *x11_about_item; - NSMenuItem *window_separator; - NSMenuItem *dock_window_separator; - NSMenuItem *apps_separator; - NSMenuItem *toggle_fullscreen_item; - NSMenu *dock_apps_menu; - NSTableView *apps_table; + IBOutlet NSPanel *prefs_panel; + + IBOutlet NSButton *fake_buttons; + IBOutlet NSButton *enable_fullscreen; + IBOutlet NSButton *use_sysbeep; + IBOutlet NSButton *enable_keyequivs; + IBOutlet NSButton *sync_keymap; + IBOutlet NSButton *click_through; + IBOutlet NSButton *enable_auth; + IBOutlet NSButton *enable_tcp; + IBOutlet NSPopUpButton *depth; + + IBOutlet NSMenuItem *x11_about_item; + IBOutlet NSMenuItem *window_separator; + IBOutlet NSMenuItem *dock_window_separator; + IBOutlet NSMenuItem *apps_separator; + IBOutlet NSMenuItem *toggle_fullscreen_item; + IBOutlet NSMenu *dock_apps_menu; + IBOutlet NSTableView *apps_table; NSArray *apps; NSMutableArray *table_apps; - NSMenu *dock_menu; + IBOutlet NSMenu *dock_menu; int checked_window_item; x_list *pending_apps; @@ -74,6 +75,25 @@ - (void) set_can_quit:(BOOL)state; - (void) server_ready; +- (IBAction) apps_table_show:(id)sender; +- (IBAction) apps_table_cancel:(id)sender; +- (IBAction) apps_table_done:(id)sender; +- (IBAction) apps_table_new:(id)sender; +- (IBAction) apps_table_duplicate:(id)sender; +- (IBAction) apps_table_delete:(id)sender; +- (IBAction) bring_to_front:(id)sender; +- (IBAction) close_window:(id)sender; +- (IBAction) minimize_window:(id)sender; +- (IBAction) zoom_window:(id)sender; +- (IBAction) next_window:(id)sender; +- (IBAction) previous_window:(id)sender; +- (IBAction) enable_fullscreen_changed:(id)sender; +- (IBAction) toggle_fullscreen:(id)sender; +- (IBAction) prefs_changed:(id)sender; +- (IBAction) prefs_show:(id)sender; +- (IBAction) quit:(id)sender; +- (IBAction) x11_help:(id)sender; + @end #endif /* __OBJC__ */ diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m index d3f83656c..5111eafc3 100644 --- a/hw/xquartz/X11Controller.m +++ b/hw/xquartz/X11Controller.m @@ -613,7 +613,7 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row quartzUseSysBeep = [use_sysbeep intValue]; X11EnableKeyEquivalents = [enable_keyequivs intValue]; darwinSyncKeymap = [sync_keymap intValue]; - + /* after adding prefs here, also add to [X11Application read_defaults] and below */ @@ -621,6 +621,7 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row [NSApp prefs_set_boolean:@PREFS_SYSBEEP value:quartzUseSysBeep]; [NSApp prefs_set_boolean:@PREFS_KEYEQUIVS value:X11EnableKeyEquivalents]; [NSApp prefs_set_boolean:@PREFS_SYNC_KEYMAP value:darwinSyncKeymap]; + [NSApp prefs_set_boolean:@PREFS_QUARTZ_WM_CLICK_THROUGH value:[click_through intValue]]; [NSApp prefs_set_boolean:@PREFS_NO_AUTH value:![enable_auth intValue]]; [NSApp prefs_set_boolean:@PREFS_NO_TCP value:![enable_tcp intValue]]; [NSApp prefs_set_integer:@PREFS_DEPTH value:[depth selectedTag]]; @@ -635,6 +636,7 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row [enable_keyequivs setIntValue:X11EnableKeyEquivalents]; [sync_keymap setIntValue:darwinSyncKeymap]; [sync_keymap setEnabled:darwinKeymapFile == NULL]; + [click_through setIntValue:[NSApp prefs_get_boolean:@PREFS_QUARTZ_WM_CLICK_THROUGH default:NO]]; [enable_auth setIntValue:![NSApp prefs_get_boolean:@PREFS_NO_AUTH default:NO]]; [enable_tcp setIntValue:![NSApp prefs_get_boolean:@PREFS_NO_TCP default:NO]]; diff --git a/hw/xquartz/bundle/English.lproj/main.nib/classes.nib b/hw/xquartz/bundle/English.lproj/main.nib/classes.nib deleted file mode 100644 index a82159bd5..000000000 --- a/hw/xquartz/bundle/English.lproj/main.nib/classes.nib +++ /dev/null @@ -1,318 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>IBClasses</key> - <array> - <dict> - <key>CLASS</key> - <string>IBLibraryObjectTemplate</string> - <key>LANGUAGE</key> - <string>ObjC</string> - <key>OUTLETS</key> - <dict> - <key>draggedView</key> - <string>NSView</string> - <key>representedObject</key> - <string>NSObject</string> - </dict> - <key>SUPERCLASS</key> - <string>NSView</string> - </dict> - <dict> - <key>CLASS</key> - <string>IBInspector</string> - <key>LANGUAGE</key> - <string>ObjC</string> - <key>OUTLETS</key> - <dict> - <key>inspectorView</key> - <string>NSView</string> - </dict> - <key>SUPERCLASS</key> - <string>NSObject</string> - </dict> - <dict> - <key>CLASS</key> - <string>NSDateFormatter</string> - <key>LANGUAGE</key> - <string>ObjC</string> - <key>SUPERCLASS</key> - <string>NSFormatter</string> - </dict> - <dict> - <key>ACTIONS</key> - <dict> - <key>apps_table_cancel</key> - <string>id</string> - <key>apps_table_delete</key> - <string>id</string> - <key>apps_table_done</key> - <string>id</string> - <key>apps_table_duplicate</key> - <string>id</string> - <key>apps_table_new</key> - <string>id</string> - <key>apps_table_show</key> - <string>id</string> - <key>bring_to_front</key> - <string>id</string> - <key>close_window</key> - <string>id</string> - <key>enable_fullscreen_changed</key> - <string>id</string> - <key>minimize_window</key> - <string>id</string> - <key>next_window</key> - <string>id</string> - <key>prefs_changed</key> - <string>id</string> - <key>prefs_show</key> - <string>id</string> - <key>previous_window</key> - <string>id</string> - <key>toggle_fullscreen</key> - <string>id</string> - <key>x11_help</key> - <string>id</string> - <key>zoom_window</key> - <string>id</string> - </dict> - <key>CLASS</key> - <string>X11Controller</string> - <key>LANGUAGE</key> - <string>ObjC</string> - <key>OUTLETS</key> - <dict> - <key>apps_separator</key> - <string>id</string> - <key>apps_table</key> - <string>id</string> - <key>depth</key> - <string>id</string> - <key>dock_apps_menu</key> - <string>id</string> - <key>dock_menu</key> - <string>id</string> - <key>dock_window_separator</key> - <string>id</string> - <key>enable_auth</key> - <string>id</string> - <key>enable_fullscreen</key> - <string>id</string> - <key>enable_keyequivs</key> - <string>id</string> - <key>enable_tcp</key> - <string>id</string> - <key>fake_buttons</key> - <string>id</string> - <key>prefs_panel</key> - <string>id</string> - <key>sync_keymap</key> - <string>id</string> - <key>toggle_fullscreen_item</key> - <string>id</string> - <key>use_sysbeep</key> - <string>id</string> - <key>window_separator</key> - <string>id</string> - <key>x11_about_item</key> - <string>id</string> - </dict> - <key>SUPERCLASS</key> - <string>NSObject</string> - </dict> - <dict> - <key>CLASS</key> - <string>NSNumberFormatter</string> - <key>LANGUAGE</key> - <string>ObjC</string> - <key>SUPERCLASS</key> - <string>NSFormatter</string> - </dict> - <dict> - <key>CLASS</key> - <string>NSFormatter</string> - <key>LANGUAGE</key> - <string>ObjC</string> - <key>SUPERCLASS</key> - <string>NSObject</string> - </dict> - <dict> - <key>ACTIONS</key> - <dict> - <key>alignCenter:</key> - <string>id</string> - <key>alignJustified:</key> - <string>id</string> - <key>alignLeft:</key> - <string>id</string> - <key>alignRight:</key> - <string>id</string> - <key>arrangeInFront:</key> - <string>id</string> - <key>centerSelectionInVisibleArea:</key> - <string>id</string> - <key>changeFont:</key> - <string>id</string> - <key>checkSpelling:</key> - <string>id</string> - <key>clear:</key> - <string>id</string> - <key>clearRecentDocuments:</key> - <string>id</string> - <key>complete:</key> - <string>id</string> - <key>copy:</key> - <string>id</string> - <key>copyFont:</key> - <string>id</string> - <key>copyRuler:</key> - <string>id</string> - <key>cut:</key> - <string>id</string> - <key>delete:</key> - <string>id</string> - <key>deminiaturize:</key> - <string>id</string> - <key>fax:</key> - <string>id</string> - <key>hide:</key> - <string>id</string> - <key>hideOtherApplications:</key> - <string>id</string> - <key>loosenKerning:</key> - <string>id</string> - <key>lowerBaseline:</key> - <string>id</string> - <key>makeKeyAndOrderFront:</key> - <string>id</string> - <key>miniaturize:</key> - <string>id</string> - <key>newDocument:</key> - <string>id</string> - <key>openDocument:</key> - <string>id</string> - <key>orderBack:</key> - <string>id</string> - <key>orderFront:</key> - <string>id</string> - <key>orderFrontColorPanel:</key> - <string>id</string> - <key>orderFrontHelpPanel:</key> - <string>id</string> - <key>orderOut:</key> - <string>id</string> - <key>outline:</key> - <string>id</string> - <key>paste:</key> - <string>id</string> - <key>pasteAsPlainText:</key> - <string>id</string> - <key>pasteAsRichText:</key> - <string>id</string> - <key>pasteFont:</key> - <string>id</string> - <key>pasteRuler:</key> - <string>id</string> - <key>pause:</key> - <string>id</string> - <key>performClose:</key> - <string>id</string> - <key>performFindPanelAction:</key> - <string>id</string> - <key>performMiniaturize:</key> - <string>id</string> - <key>performZoom:</key> - <string>id</string> - <key>play:</key> - <string>id</string> - <key>print:</key> - <string>id</string> - <key>printDocument:</key> - <string>id</string> - <key>raiseBaseline:</key> - <string>id</string> - <key>record:</key> - <string>id</string> - <key>redo:</key> - <string>id</string> - <key>resume:</key> - <string>id</string> - <key>revertDocumentToSaved:</key> - <string>id</string> - <key>run:</key> - <string>id</string> - <key>runPageLayout:</key> - <string>id</string> - <key>runToolbarCustomizationPalette:</key> - <string>id</string> - <key>saveAllDocuments:</key> - <string>id</string> - <key>saveDocument:</key> - <string>id</string> - <key>saveDocumentAs:</key> - <string>id</string> - <key>saveDocumentTo:</key> - <string>id</string> - <key>selectAll:</key> - <string>id</string> - <key>selectText:</key> - <string>id</string> - <key>showGuessPanel:</key> - <string>id</string> - <key>showHelp:</key> - <string>id</string> - <key>start:</key> - <string>id</string> - <key>startSpeaking:</key> - <string>id</string> - <key>stop:</key> - <string>id</string> - <key>stopSpeaking:</key> - <string>id</string> - <key>subscript:</key> - <string>id</string> - <key>superscript:</key> - <string>id</string> - <key>terminate:</key> - <string>id</string> - <key>tightenKerning:</key> - <string>id</string> - <key>toggleContinuousSpellChecking:</key> - <string>id</string> - <key>toggleRuler:</key> - <string>id</string> - <key>toggleToolbarShown:</key> - <string>id</string> - <key>turnOffKerning:</key> - <string>id</string> - <key>turnOffLigatures:</key> - <string>id</string> - <key>underline:</key> - <string>id</string> - <key>undo:</key> - <string>id</string> - <key>unhideAllApplications:</key> - <string>id</string> - <key>unscript:</key> - <string>id</string> - <key>useAllLigatures:</key> - <string>id</string> - <key>useStandardKerning:</key> - <string>id</string> - <key>useStandardLigatures:</key> - <string>id</string> - </dict> - <key>CLASS</key> - <string>FirstResponder</string> - <key>LANGUAGE</key> - <string>ObjC</string> - <key>SUPERCLASS</key> - <string>NSObject</string> - </dict> - </array> - <key>IBVersion</key> - <integer>1</integer> -</dict> -</plist> diff --git a/hw/xquartz/bundle/English.lproj/main.nib/designable.nib b/hw/xquartz/bundle/English.lproj/main.nib/designable.nib new file mode 100644 index 000000000..ea3a0daa8 --- /dev/null +++ b/hw/xquartz/bundle/English.lproj/main.nib/designable.nib @@ -0,0 +1,3482 @@ +<?xml version="1.0" encoding="UTF-8"?> +<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02"> + <data> + <int key="IBDocument.SystemTarget">1050</int> + <string key="IBDocument.SystemVersion">9C31</string> + <string key="IBDocument.InterfaceBuilderVersion">639</string> + <string key="IBDocument.AppKitVersion">949.26</string> + <string key="IBDocument.HIToolboxVersion">352.00</string> + <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> + <bool key="EncodedWithXMLCoder">YES</bool> + <integer value="57"/> + <integer value="285"/> + </object> + <object class="NSArray" key="IBDocument.PluginDependencies"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + </object> + <object class="NSMutableArray" key="IBDocument.RootObjects" id="904585544"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSCustomObject" id="815810918"> + <object class="NSMutableString" key="NSClassName"> + <characters key="NS.bytes">NSApplication</characters> + </object> + </object> + <object class="NSCustomObject" id="941939442"> + <string key="NSClassName">FirstResponder</string> + </object> + <object class="NSCustomObject" id="951368722"> + <string key="NSClassName">NSApplication</string> + </object> + <object class="NSMenu" id="524015605"> + <string key="NSTitle">MainMenu</string> + <object class="NSMutableArray" key="NSMenuItems"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSMenuItem" id="365880285"> + <reference key="NSMenu" ref="524015605"/> + <string key="NSTitle">X11</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <object class="NSCustomResource" key="NSOnImage" id="531645050"> + <string key="NSClassName">NSImage</string> + <string key="NSResourceName">NSMenuCheckmark</string> + </object> + <object class="NSCustomResource" key="NSMixedImage" id="351811234"> + <string key="NSClassName">NSImage</string> + <string key="NSResourceName">NSMenuMixedState</string> + </object> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="576521955"> + <string key="NSTitle">X11</string> + <object class="NSMutableArray" key="NSMenuItems"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSMenuItem" id="139290918"> + <reference key="NSMenu" ref="576521955"/> + <string key="NSTitle">About X11</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + </object> + <object class="NSMenuItem" id="386173216"> + <reference key="NSMenu" ref="576521955"/> + <string key="NSTitle">Preferences...</string> + <string key="NSKeyEquiv">,</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + </object> + <object class="NSMenuItem" id="272876017"> + <reference key="NSMenu" ref="576521955"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + </object> + <object class="NSMenuItem" id="32285361"> + <reference key="NSMenu" ref="576521955"/> + <string key="NSTitle">Services</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="821388474"> + <object class="NSMutableString" key="NSTitle"> + <characters key="NS.bytes">Services</characters> + </object> + <object class="NSMutableArray" key="NSMenuItems"> + <bool key="EncodedWithXMLCoder">YES</bool> + </object> + <string key="NSName">_NSServicesMenu</string> + </object> + </object> + <object class="NSMenuItem" id="431301145"> + <reference key="NSMenu" ref="576521955"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + </object> + <object class="NSMenuItem" id="6876565"> + <reference key="NSMenu" ref="576521955"/> + <string key="NSTitle">Toggle Full Screen</string> + <string key="NSKeyEquiv">a</string> + <int key="NSKeyEquivModMask">1572864</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + </object> + <object class="NSMenuItem" id="479677589"> + <reference key="NSMenu" ref="576521955"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + </object> + <object class="NSMenuItem" id="301008465"> + <reference key="NSMenu" ref="576521955"/> + <string key="NSTitle">Hide X11</string> + <string key="NSKeyEquiv">h</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + <int key="NSTag">42</int> + </object> + <object class="NSMenuItem" id="206802571"> + <reference key="NSMenu" ref="576521955"/> + <string key="NSTitle">Hide Others</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + </object> + <object class="NSMenuItem" id="1023546148"> + <reference key="NSMenu" ref="576521955"/> + <string key="NSTitle">Show All</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + <int key="NSTag">42</int> + </object> + <object class="NSMenuItem" id="848095279"> + <reference key="NSMenu" ref="576521955"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + </object> + <object class="NSMenuItem" id="274138642"> + <reference key="NSMenu" ref="576521955"/> + <string key="NSTitle">Quit X11</string> + <string key="NSKeyEquiv">q</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + </object> + </object> + <string key="NSName">_NSAppleMenu</string> + </object> + </object> + <object class="NSMenuItem" id="868031522"> + <reference key="NSMenu" ref="524015605"/> + <string key="NSTitle">Applications</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="981161348"> + <string key="NSTitle">Applications</string> + <object class="NSMutableArray" key="NSMenuItems"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSMenuItem" id="390088328"> + <reference key="NSMenu" ref="981161348"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + </object> + <object class="NSMenuItem" id="1065386165"> + <reference key="NSMenu" ref="981161348"/> + <string key="NSTitle">Customize...</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + </object> + </object> + </object> + </object> + <object class="NSMenuItem" id="200491363"> + <reference key="NSMenu" ref="524015605"/> + <string key="NSTitle">Edit</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="526778998"> + <string key="NSTitle">Edit</string> + <object class="NSMutableArray" key="NSMenuItems"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSMenuItem" id="1010221707"> + <reference key="NSMenu" ref="526778998"/> + <string key="NSTitle">Undo</string> + <string key="NSKeyEquiv">z</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + </object> + <object class="NSMenuItem" id="535038564"> + <reference key="NSMenu" ref="526778998"/> + <string key="NSTitle">Redo</string> + <string key="NSKeyEquiv">Z</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + </object> + <object class="NSMenuItem" id="839739619"> + <reference key="NSMenu" ref="526778998"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + </object> + <object class="NSMenuItem" id="581727829"> + <reference key="NSMenu" ref="526778998"/> + <string key="NSTitle">Cut</string> + <string key="NSKeyEquiv">x</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + </object> + <object class="NSMenuItem" id="185296989"> + <reference key="NSMenu" ref="526778998"/> + <string key="NSTitle">Copy</string> + <string key="NSKeyEquiv">c</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + </object> + <object class="NSMenuItem" id="924678073"> + <reference key="NSMenu" ref="526778998"/> + <string key="NSTitle">Paste</string> + <string key="NSKeyEquiv">v</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + </object> + <object class="NSMenuItem" id="994817848"> + <reference key="NSMenu" ref="526778998"/> + <string key="NSTitle">Delete</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + </object> + <object class="NSMenuItem" id="322866464"> + <reference key="NSMenu" ref="526778998"/> + <string key="NSTitle">Select All</string> + <string key="NSKeyEquiv">a</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + </object> + </object> + </object> + </object> + <object class="NSMenuItem" id="931553638"> + <reference key="NSMenu" ref="524015605"/> + <string key="NSTitle">Window</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="96874957"> + <object class="NSMutableString" key="NSTitle"> + <characters key="NS.bytes">Window</characters> + </object> + <object class="NSMutableArray" key="NSMenuItems"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSMenuItem" id="677652931"> + <reference key="NSMenu" ref="96874957"/> + <string key="NSTitle">Minimize</string> + <string key="NSKeyEquiv">m</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + </object> + <object class="NSMenuItem" id="1066447520"> + <reference key="NSMenu" ref="96874957"/> + <string key="NSTitle">Zoom</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + </object> + <object class="NSMenuItem" id="1036389925"> + <reference key="NSMenu" ref="96874957"/> + <string key="NSTitle">Cycle Through Windows</string> + <string key="NSKeyEquiv">`</string> + <int key="NSKeyEquivModMask">1048840</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + </object> + <object class="NSMenuItem" id="369641893"> + <reference key="NSMenu" ref="96874957"/> + <string key="NSTitle">Reverse Cycle Through Windows</string> + <string key="NSKeyEquiv">~</string> + <int key="NSKeyEquivModMask">1179914</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + </object> + <object class="NSMenuItem" id="280172320"> + <reference key="NSMenu" ref="96874957"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + </object> + <object class="NSMenuItem" id="984461797"> + <reference key="NSMenu" ref="96874957"/> + <string key="NSTitle">Close</string> + <string key="NSKeyEquiv">w</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + </object> + <object class="NSMenuItem" id="155085383"> + <reference key="NSMenu" ref="96874957"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + </object> + <object class="NSMenuItem" id="276216762"> + <reference key="NSMenu" ref="96874957"/> + <string key="NSTitle">Bring All to Front</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + </object> + <object class="NSMenuItem" id="444952046"> + <reference key="NSMenu" ref="96874957"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + </object> + </object> + <string key="NSName">_NSWindowsMenu</string> + </object> + </object> + <object class="NSMenuItem" id="551174276"> + <reference key="NSMenu" ref="524015605"/> + <string key="NSTitle">Help</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="511848303"> + <string key="NSTitle">Help</string> + <object class="NSMutableArray" key="NSMenuItems"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSMenuItem" id="504984881"> + <reference key="NSMenu" ref="511848303"/> + <string key="NSTitle">X11 Help</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + </object> + </object> + </object> + </object> + </object> + <string key="NSName">_NSMainMenu</string> + </object> + <object class="NSCustomObject" id="485884620"> + <string key="NSClassName">X11Controller</string> + </object> + <object class="NSWindowTemplate" id="124913468"> + <int key="NSWindowStyleMask">3</int> + <int key="NSWindowBacking">2</int> + <string key="NSWindowRect">{{319, 294}, {481, 345}}</string> + <int key="NSWTFlags">1350041600</int> + <string key="NSWindowTitle">X11 Preferences</string> + <string key="NSWindowClass">NSPanel</string> + <object class="NSMutableString" key="NSViewClass"> + <characters key="NS.bytes">View</characters> + </object> + <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string> + <string key="NSWindowContentMinSize">{213, 107}</string> + <object class="NSView" key="NSWindowView" id="941366957"> + <nil key="NSNextResponder"/> + <int key="NSvFlags">256</int> + <object class="NSMutableArray" key="NSSubviews"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSTabView" id="448510093"> + <reference key="NSNextResponder" ref="941366957"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{10, 10}, {458, 325}}</string> + <reference key="NSSuperview" ref="941366957"/> + <object class="NSMutableArray" key="NSTabViewItems"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSTabViewItem" id="287591690"> + <object class="NSMutableString" key="NSIdentifier"> + <characters key="NS.bytes">1</characters> + </object> + <object class="NSView" key="NSView" id="596750588"> + <reference key="NSNextResponder" ref="448510093"/> + <int key="NSvFlags">256</int> + <object class="NSMutableArray" key="NSSubviews"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSButton" id="119157981"> + <reference key="NSNextResponder" ref="596750588"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{18, 243}, {402, 18}}</string> + <reference key="NSSuperview" ref="596750588"/> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="990762273"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">0</int> + <string key="NSContents">Emulate three button mouse</string> + <object class="NSFont" key="NSSupport" id="463863101"> + <string key="NSName">LucidaGrande</string> + <double key="NSSize">1.300000e+01</double> + <int key="NSfFlags">1044</int> + </object> + <reference key="NSControlView" ref="119157981"/> + <int key="NSButtonFlags">1211912703</int> + <int key="NSButtonFlags2">2</int> + <object class="NSButtonImageSource" key="NSAlternateImage" id="391434389"> + <string key="NSImageName">NSSwitch</string> + </object> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + <object class="NSTextField" id="443008216"> + <reference key="NSNextResponder" ref="596750588"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{36, 93}, {385, 31}}</string> + <reference key="NSSuperview" ref="596750588"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="391919450"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">4194304</int> + <string key="NSContents">When enabled, menu bar key equivalents may interfere with X11 applications that use the Meta modifier.</string> + <object class="NSFont" key="NSSupport" id="26"> + <string key="NSName">LucidaGrande</string> + <double key="NSSize">1.100000e+01</double> + <int key="NSfFlags">3100</int> + </object> + <reference key="NSControlView" ref="443008216"/> + <object class="NSColor" key="NSBackgroundColor" id="57160303"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">controlColor</string> + <object class="NSColor" key="NSColor" id="590688762"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MC42NjY2NjY2OQA</bytes> + </object> + </object> + <object class="NSColor" key="NSTextColor" id="930815747"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">controlTextColor</string> + <object class="NSColor" key="NSColor" id="214098874"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MAA</bytes> + </object> + </object> + </object> + </object> + <object class="NSTextField" id="282885445"> + <reference key="NSNextResponder" ref="596750588"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{36, 208}, {385, 29}}</string> + <reference key="NSSuperview" ref="596750588"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="649334366"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">4194304</int> + <string type="base64-UTF8" key="NSContents">SG9sZCBPcHRpb24gYW5kIENvbW1hbmQgd2hpbGUgY2xpY2tpbmcgdG8gYWN0aXZhdGUgdGhlIG1pZGRs +ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="282885445"/> + <reference key="NSBackgroundColor" ref="57160303"/> + <reference key="NSTextColor" ref="930815747"/> + </object> + </object> + <object class="NSButton" id="842100515"> + <reference key="NSNextResponder" ref="596750588"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{18, 130}, {402, 18}}</string> + <reference key="NSSuperview" ref="596750588"/> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="940564599"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">0</int> + <string key="NSContents">Enable key equivalents under X11</string> + <reference key="NSSupport" ref="463863101"/> + <reference key="NSControlView" ref="842100515"/> + <int key="NSButtonFlags">1211912703</int> + <int key="NSButtonFlags2">2</int> + <reference key="NSAlternateImage" ref="391434389"/> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + <object class="NSTextField" id="31160162"> + <reference key="NSNextResponder" ref="596750588"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{36, 159}, {385, 14}}</string> + <reference key="NSSuperview" ref="596750588"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="666057093"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">4194304</int> + <string key="NSContents">Allows input menu changes to overwrite the current X11 keymap.</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="31160162"/> + <reference key="NSBackgroundColor" ref="57160303"/> + <reference key="NSTextColor" ref="930815747"/> + </object> + </object> + <object class="NSButton" id="179949713"> + <reference key="NSNextResponder" ref="596750588"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{18, 179}, {402, 18}}</string> + <reference key="NSSuperview" ref="596750588"/> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="967619578"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">0</int> + <string key="NSContents">Follow system keyboard layout</string> + <reference key="NSSupport" ref="463863101"/> + <reference key="NSControlView" ref="179949713"/> + <int key="NSButtonFlags">1211912703</int> + <int key="NSButtonFlags2">2</int> + <reference key="NSAlternateImage" ref="391434389"/> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + <object class="NSButton" id="915448994"> + <reference key="NSNextResponder" ref="596750588"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{18, 69}, {402, 18}}</string> + <reference key="NSSuperview" ref="596750588"/> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="117056849"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">0</int> + <string key="NSContents">Click-through Inactive Windows</string> + <reference key="NSSupport" ref="463863101"/> + <reference key="NSControlView" ref="915448994"/> + <int key="NSButtonFlags">1211912703</int> + <int key="NSButtonFlags2">2</int> + <reference key="NSAlternateImage" ref="391434389"/> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + <object class="NSTextField" id="707276799"> + <reference key="NSNextResponder" ref="596750588"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{33, 32}, {385, 31}}</string> + <reference key="NSSuperview" ref="596750588"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="318286890"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">4194304</int> + <string key="NSContents">When enabled, clicking on an inactive window will cause that mouse click to pass through to that window in addition to activating it.</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="707276799"/> + <reference key="NSBackgroundColor" ref="57160303"/> + <reference key="NSTextColor" ref="930815747"/> + </object> + </object> + </object> + <string key="NSFrame">{{10, 33}, {438, 279}}</string> + <reference key="NSSuperview" ref="448510093"/> + </object> + <string key="NSLabel">Input</string> + <reference key="NSColor" ref="57160303"/> + <reference key="NSTabView" ref="448510093"/> + </object> + <object class="NSTabViewItem" id="960678392"> + <object class="NSMutableString" key="NSIdentifier"> + <characters key="NS.bytes">2</characters> + </object> + <object class="NSView" key="NSView" id="515308735"> + <nil key="NSNextResponder"/> + <int key="NSvFlags">256</int> + <object class="NSMutableArray" key="NSSubviews"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSButton" id="418227126"> + <reference key="NSNextResponder" ref="515308735"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{18, 116}, {402, 18}}</string> + <reference key="NSSuperview" ref="515308735"/> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="1016069354"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">0</int> + <string key="NSContents">Use system alert effect</string> + <reference key="NSSupport" ref="463863101"/> + <reference key="NSControlView" ref="418227126"/> + <int key="NSButtonFlags">1211912703</int> + <int key="NSButtonFlags2">2</int> + <reference key="NSAlternateImage" ref="391434389"/> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + <object class="NSTextField" id="1039016593"> + <reference key="NSNextResponder" ref="515308735"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{36, 82}, {385, 28}}</string> + <reference key="NSSuperview" ref="515308735"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="624655599"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">4194304</int> + <string key="NSContents">X11 beeps will use the standard system alert, as defined in the Sound Effects system preferences panel.</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="1039016593"/> + <reference key="NSBackgroundColor" ref="57160303"/> + <reference key="NSTextColor" ref="930815747"/> + </object> + </object> + <object class="NSPopUpButton" id="709074847"> + <reference key="NSNextResponder" ref="515308735"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{74, 235}, {128, 26}}</string> + <reference key="NSSuperview" ref="515308735"/> + <bool key="NSEnabled">YES</bool> + <object class="NSPopUpButtonCell" key="NSCell" id="633115429"> + <int key="NSCellFlags">-2076049856</int> + <int key="NSCellFlags2">1024</int> + <reference key="NSSupport" ref="463863101"/> + <reference key="NSControlView" ref="709074847"/> + <int key="NSButtonFlags">109199615</int> + <int key="NSButtonFlags2">1</int> + <object class="NSFont" key="NSAlternateImage"> + <string key="NSName">LucidaGrande</string> + <double key="NSSize">1.300000e+01</double> + <int key="NSfFlags">16</int> + </object> + <object class="NSMutableString" key="NSAlternateContents"> + <characters key="NS.bytes"/> + </object> + <object class="NSMutableString" key="NSKeyEquivalent"> + <characters key="NS.bytes"/> + </object> + <int key="NSPeriodicDelay">400</int> + <int key="NSPeriodicInterval">75</int> + <object class="NSMenuItem" key="NSMenuItem" id="616492372"> + <reference key="NSMenu" ref="341113515"/> + <string key="NSTitle">From Display</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <int key="NSState">1</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + <string key="NSAction">_popUpItemAction:</string> + <int key="NSTag">-1</int> + <reference key="NSTarget" ref="633115429"/> + </object> + <bool key="NSMenuItemRespectAlignment">YES</bool> + <object class="NSMenu" key="NSMenu" id="341113515"> + <object class="NSMutableString" key="NSTitle"> + <characters key="NS.bytes">OtherViews</characters> + </object> + <object class="NSMutableArray" key="NSMenuItems"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="616492372"/> + <object class="NSMenuItem" id="759499526"> + <reference key="NSMenu" ref="341113515"/> + <string key="NSTitle">256 Colors</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + <string key="NSAction">_popUpItemAction:</string> + <int key="NSTag">8</int> + <reference key="NSTarget" ref="633115429"/> + </object> + <object class="NSMenuItem" id="543935434"> + <reference key="NSMenu" ref="341113515"/> + <string key="NSTitle">Thousands</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + <string key="NSAction">_popUpItemAction:</string> + <int key="NSTag">15</int> + <reference key="NSTarget" ref="633115429"/> + </object> + <object class="NSMenuItem" id="836673018"> + <reference key="NSMenu" ref="341113515"/> + <string key="NSTitle">Millions</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + <string key="NSAction">_popUpItemAction:</string> + <int key="NSTag">24</int> + <reference key="NSTarget" ref="633115429"/> + </object> + </object> + </object> + <int key="NSPreferredEdge">3</int> + <bool key="NSUsesItemFromMenu">YES</bool> + <bool key="NSAltersState">YES</bool> + <int key="NSArrowPosition">1</int> + </object> + </object> + <object class="NSTextField" id="201731424"> + <reference key="NSNextResponder" ref="515308735"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{17, 238}, {55, 20}}</string> + <reference key="NSSuperview" ref="515308735"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="930265681"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">4194304</int> + <string type="base64-UTF8" key="NSContents">Q29sb3JzOgo</string> + <reference key="NSSupport" ref="463863101"/> + <reference key="NSControlView" ref="201731424"/> + <reference key="NSBackgroundColor" ref="57160303"/> + <reference key="NSTextColor" ref="930815747"/> + </object> + </object> + <object class="NSTextField" id="86150604"> + <reference key="NSNextResponder" ref="515308735"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{36, 216}, {392, 14}}</string> + <reference key="NSSuperview" ref="515308735"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="311969422"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">4194304</int> + <string key="NSContents">This option takes effect when X11 is launched again.</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="86150604"/> + <reference key="NSBackgroundColor" ref="57160303"/> + <reference key="NSTextColor" ref="930815747"/> + </object> + </object> + <object class="NSButton" id="477203622"> + <reference key="NSNextResponder" ref="515308735"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{18, 182}, {409, 23}}</string> + <reference key="NSSuperview" ref="515308735"/> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="631531164"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">0</int> + <string key="NSContents">Full screen mode</string> + <reference key="NSSupport" ref="463863101"/> + <reference key="NSControlView" ref="477203622"/> + <int key="NSButtonFlags">1211912703</int> + <int key="NSButtonFlags2">2</int> + <reference key="NSAlternateImage" ref="391434389"/> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + <object class="NSTextField" id="298603383"> + <reference key="NSNextResponder" ref="515308735"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{36, 145}, {385, 31}}</string> + <reference key="NSSuperview" ref="515308735"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="761107402"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">4194304</int> + <string key="NSContents">Enables the X11 root window. Use the Command-Option-A keystroke to enter and leave full screen mode.</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="298603383"/> + <reference key="NSBackgroundColor" ref="57160303"/> + <reference key="NSTextColor" ref="930815747"/> + </object> + </object> + </object> + <string key="NSFrame">{{10, 33}, {438, 279}}</string> + </object> + <string key="NSLabel">Output</string> + <reference key="NSColor" ref="57160303"/> + <reference key="NSTabView" ref="448510093"/> + </object> + <object class="NSTabViewItem" id="348328898"> + <object class="NSView" key="NSView" id="300811574"> + <nil key="NSNextResponder"/> + <int key="NSvFlags">256</int> + <object class="NSMutableArray" key="NSSubviews"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSButton" id="989050925"> + <reference key="NSNextResponder" ref="300811574"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{18, 243}, {402, 18}}</string> + <reference key="NSSuperview" ref="300811574"/> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="189594322"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">0</int> + <string key="NSContents">Authenticate connections</string> + <reference key="NSSupport" ref="463863101"/> + <reference key="NSControlView" ref="989050925"/> + <int key="NSButtonFlags">1211912703</int> + <int key="NSButtonFlags2">2</int> + <reference key="NSAlternateImage" ref="391434389"/> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + <object class="NSButton" id="700826966"> + <reference key="NSNextResponder" ref="300811574"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{18, 166}, {402, 18}}</string> + <reference key="NSSuperview" ref="300811574"/> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="489340979"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">0</int> + <string key="NSContents">Allow connections from network clients</string> + <reference key="NSSupport" ref="463863101"/> + <reference key="NSControlView" ref="700826966"/> + <int key="NSButtonFlags">1211912703</int> + <int key="NSButtonFlags2">2</int> + <reference key="NSAlternateImage" ref="391434389"/> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + <object class="NSTextField" id="168436707"> + <reference key="NSNextResponder" ref="300811574"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{36, 195}, {385, 42}}</string> + <reference key="NSSuperview" ref="300811574"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="53243865"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">4194304</int> + <string type="base64-UTF8" key="NSContents">TGF1bmNoaW5nIFgxMSB3aWxsIGNyZWF0ZSBYYXV0aG9yaXR5IGFjY2Vzcy1jb250cm9sIGtleXMuIElm +IHRoZSBzeXN0ZW0ncyBJUCBhZGRyZXNzIGNoYW5nZXMsIHRoZXNlIGtleXMgYmVjb21lIGludmFsaWQg +d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="168436707"/> + <reference key="NSBackgroundColor" ref="57160303"/> + <reference key="NSTextColor" ref="930815747"/> + </object> + </object> + <object class="NSTextField" id="363817195"> + <reference key="NSNextResponder" ref="300811574"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{36, 118}, {385, 42}}</string> + <reference key="NSSuperview" ref="300811574"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="390084685"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">4194304</int> + <string key="NSContents">If enabled, Authenticate connections must also be enabled to ensure system security. When disabled, connections from remote applications are not allowed.</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="363817195"/> + <reference key="NSBackgroundColor" ref="57160303"/> + <reference key="NSTextColor" ref="930815747"/> + </object> + </object> + <object class="NSTextField" id="223835729"> + <reference key="NSNextResponder" ref="300811574"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{20, 17}, {404, 14}}</string> + <reference key="NSSuperview" ref="300811574"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="283628678"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">4194304</int> + <string key="NSContents">These options take effect when X11 is next launched.</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="223835729"/> + <reference key="NSBackgroundColor" ref="57160303"/> + <reference key="NSTextColor" ref="930815747"/> + </object> + </object> + </object> + <string key="NSFrame">{{10, 33}, {438, 279}}</string> + </object> + <string key="NSLabel">Security</string> + <reference key="NSColor" ref="57160303"/> + <reference key="NSTabView" ref="448510093"/> + </object> + </object> + <reference key="NSSelectedTabViewItem" ref="287591690"/> + <reference key="NSFont" ref="463863101"/> + <int key="NSTvFlags">0</int> + <bool key="NSAllowTruncatedLabels">YES</bool> + <bool key="NSDrawsBackground">YES</bool> + <object class="NSMutableArray" key="NSSubviews"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="596750588"/> + </object> + </object> + </object> + <string key="NSFrameSize">{481, 345}</string> + </object> + <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string> + <string key="NSMinSize">{213, 129}</string> + <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string> + <string key="NSFrameAutosaveName">x11_prefs</string> + </object> + <object class="NSWindowTemplate" id="604417141"> + <int key="NSWindowStyleMask">11</int> + <int key="NSWindowBacking">2</int> + <string key="NSWindowRect">{{361, 362}, {454, 311}}</string> + <int key="NSWTFlags">1350041600</int> + <string key="NSWindowTitle">X11 Application Menu</string> + <string key="NSWindowClass">NSPanel</string> + <object class="NSMutableString" key="NSViewClass"> + <characters key="NS.bytes">View</characters> + </object> + <string key="NSWindowContentMaxSize">{10000, 10000}</string> + <string key="NSWindowContentMinSize">{320, 240}</string> + <object class="NSView" key="NSWindowView" id="85544634"> + <reference key="NSNextResponder"/> + <int key="NSvFlags">256</int> + <object class="NSMutableArray" key="NSSubviews"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSButton" id="671954382"> + <reference key="NSNextResponder" ref="85544634"/> + <int key="NSvFlags">265</int> + <string key="NSFrame">{{340, 231}, {100, 32}}</string> + <reference key="NSSuperview" ref="85544634"/> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="143554520"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">137887744</int> + <string key="NSContents">Duplicate</string> + <reference key="NSSupport" ref="463863101"/> + <reference key="NSControlView" ref="671954382"/> + <int key="NSButtonFlags">-2038284033</int> + <int key="NSButtonFlags2">1</int> + <object class="NSFont" key="NSAlternateImage" id="549406736"> + <string key="NSName">Helvetica</string> + <double key="NSSize">1.300000e+01</double> + <int key="NSfFlags">16</int> + </object> + <object class="NSMutableString" key="NSAlternateContents"> + <characters key="NS.bytes"/> + </object> + <object class="NSMutableString" key="NSKeyEquivalent"> + <characters key="NS.bytes"/> + </object> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + <object class="NSButton" id="492358940"> + <reference key="NSNextResponder" ref="85544634"/> + <int key="NSvFlags">265</int> + <string key="NSFrame">{{340, 199}, {100, 32}}</string> + <reference key="NSSuperview" ref="85544634"/> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="8201128"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">137887744</int> + <string key="NSContents">Remove</string> + <reference key="NSSupport" ref="463863101"/> + <reference key="NSControlView" ref="492358940"/> + <int key="NSButtonFlags">-2038284033</int> + <int key="NSButtonFlags2">1</int> + <reference key="NSAlternateImage" ref="549406736"/> + <object class="NSMutableString" key="NSAlternateContents"> + <characters key="NS.bytes"/> + </object> + <object class="NSMutableString" key="NSKeyEquivalent"> + <characters key="NS.bytes"/> + </object> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + <object class="NSScrollView" id="1063387772"> + <reference key="NSNextResponder" ref="85544634"/> + <int key="NSvFlags">274</int> + <object class="NSMutableArray" key="NSSubviews"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSClipView" id="580565898"> + <reference key="NSNextResponder" ref="1063387772"/> + <int key="NSvFlags">2304</int> + <object class="NSMutableArray" key="NSSubviews"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSTableView" id="905092943"> + <reference key="NSNextResponder" ref="580565898"/> + <int key="NSvFlags">256</int> + <string key="NSFrameSize">{301, 198}</string> + <reference key="NSSuperview" ref="580565898"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTableHeaderView" key="NSHeaderView" id="792419186"> + <reference key="NSNextResponder" ref="672307654"/> + <int key="NSvFlags">256</int> + <string key="NSFrameSize">{301, 17}</string> + <reference key="NSSuperview" ref="672307654"/> + <reference key="NSTableView" ref="905092943"/> + </object> + <object class="_NSCornerView" key="NSCornerView" id="898633680"> + <reference key="NSNextResponder" ref="1063387772"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{302, 0}, {16, 17}}</string> + <reference key="NSSuperview" ref="1063387772"/> + </object> + <object class="NSMutableArray" key="NSTableColumns"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSTableColumn" id="84282687"> + <double key="NSWidth">9.900000e+01</double> + <double key="NSMinWidth">4.000000e+01</double> + <double key="NSMaxWidth">1.000000e+03</double> + <object class="NSTableHeaderCell" key="NSHeaderCell"> + <int key="NSCellFlags">75628032</int> + <int key="NSCellFlags2">0</int> + <string key="NSContents">Name</string> + <reference key="NSSupport" ref="26"/> + <object class="NSColor" key="NSBackgroundColor" id="113872566"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MC4zMzMzMzI5OQA</bytes> + </object> + <object class="NSColor" key="NSTextColor" id="249576247"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">headerTextColor</string> + <reference key="NSColor" ref="214098874"/> + </object> + </object> + <object class="NSTextFieldCell" key="NSDataCell" id="432610585"> + <int key="NSCellFlags">338820672</int> + <int key="NSCellFlags2">1024</int> + <string key="NSContents">Text Cell</string> + <reference key="NSSupport" ref="463863101"/> + <reference key="NSControlView" ref="905092943"/> + <object class="NSColor" key="NSBackgroundColor" id="822946413"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MQA</bytes> + </object> + <reference key="NSTextColor" ref="930815747"/> + </object> + <int key="NSResizingMask">3</int> + <bool key="NSIsResizeable">YES</bool> + <bool key="NSIsEditable">YES</bool> + <reference key="NSTableView" ref="905092943"/> + </object> + <object class="NSTableColumn" id="938444323"> + <double key="NSWidth">1.217310e+02</double> + <double key="NSMinWidth">6.273100e+01</double> + <double key="NSMaxWidth">1.000000e+03</double> + <object class="NSTableHeaderCell" key="NSHeaderCell"> + <int key="NSCellFlags">75628032</int> + <int key="NSCellFlags2">0</int> + <string key="NSContents">Command</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSBackgroundColor" ref="113872566"/> + <reference key="NSTextColor" ref="249576247"/> + </object> + <object class="NSTextFieldCell" key="NSDataCell" id="825378892"> + <int key="NSCellFlags">338820672</int> + <int key="NSCellFlags2">1024</int> + <string key="NSContents">Text Cell</string> + <reference key="NSSupport" ref="463863101"/> + <reference key="NSControlView" ref="905092943"/> + <reference key="NSBackgroundColor" ref="822946413"/> + <reference key="NSTextColor" ref="930815747"/> + </object> + <int key="NSResizingMask">3</int> + <bool key="NSIsResizeable">YES</bool> + <bool key="NSIsEditable">YES</bool> + <reference key="NSTableView" ref="905092943"/> + </object> + <object class="NSTableColumn" id="242608782"> + <double key="NSWidth">7.100000e+01</double> + <double key="NSMinWidth">1.000000e+01</double> + <double key="NSMaxWidth">1.000000e+03</double> + <object class="NSTableHeaderCell" key="NSHeaderCell"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">0</int> + <string key="NSContents">Shortcut</string> + <reference key="NSSupport" ref="26"/> + <object class="NSColor" key="NSBackgroundColor"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">headerColor</string> + <reference key="NSColor" ref="822946413"/> + </object> + <reference key="NSTextColor" ref="249576247"/> + </object> + <object class="NSTextFieldCell" key="NSDataCell" id="34714764"> + <int key="NSCellFlags">338820672</int> + <int key="NSCellFlags2">1024</int> + <string key="NSContents">Text Cell</string> + <object class="NSFont" key="NSSupport"> + <string key="NSName">LucidaGrande</string> + <double key="NSSize">1.200000e+01</double> + <int key="NSfFlags">16</int> + </object> + <reference key="NSControlView" ref="905092943"/> + <bool key="NSDrawsBackground">YES</bool> + <object class="NSColor" key="NSBackgroundColor" id="812484075"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">controlBackgroundColor</string> + <reference key="NSColor" ref="590688762"/> + </object> + <reference key="NSTextColor" ref="930815747"/> + </object> + <int key="NSResizingMask">3</int> + <bool key="NSIsResizeable">YES</bool> + <bool key="NSIsEditable">YES</bool> + <reference key="NSTableView" ref="905092943"/> + </object> + </object> + <double key="NSIntercellSpacingWidth">3.000000e+00</double> + <double key="NSIntercellSpacingHeight">2.000000e+00</double> + <reference key="NSBackgroundColor" ref="822946413"/> + <object class="NSColor" key="NSGridColor"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">gridColor</string> + <object class="NSColor" key="NSColor"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MC41AA</bytes> + </object> + </object> + <double key="NSRowHeight">1.700000e+01</double> + <int key="NSTvFlags">1379958784</int> + <int key="NSColumnAutoresizingStyle">1</int> + <int key="NSDraggingSourceMaskForLocal">-1</int> + <int key="NSDraggingSourceMaskForNonLocal">0</int> + <bool key="NSAllowsTypeSelect">YES</bool> + </object> + </object> + <string key="NSFrame">{{1, 17}, {301, 198}}</string> + <reference key="NSSuperview" ref="1063387772"/> + <reference key="NSNextKeyView" ref="905092943"/> + <reference key="NSDocView" ref="905092943"/> + <reference key="NSBGColor" ref="812484075"/> + <int key="NScvFlags">4</int> + </object> + <object class="NSScroller" id="842897584"> + <reference key="NSNextResponder" ref="1063387772"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{302, 17}, {15, 198}}</string> + <reference key="NSSuperview" ref="1063387772"/> + <reference key="NSTarget" ref="1063387772"/> + <string key="NSAction">_doScroller:</string> + <double key="NSPercent">9.949238e-01</double> + </object> + <object class="NSScroller" id="17278747"> + <reference key="NSNextResponder" ref="1063387772"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{1, 215}, {301, 15}}</string> + <reference key="NSSuperview" ref="1063387772"/> + <int key="NSsFlags">1</int> + <reference key="NSTarget" ref="1063387772"/> + <string key="NSAction">_doScroller:</string> + <double key="NSPercent">6.885246e-01</double> + </object> + <object class="NSClipView" id="672307654"> + <reference key="NSNextResponder" ref="1063387772"/> + <int key="NSvFlags">2304</int> + <object class="NSMutableArray" key="NSSubviews"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="792419186"/> + </object> + <string key="NSFrame">{{1, 0}, {301, 17}}</string> + <reference key="NSSuperview" ref="1063387772"/> + <reference key="NSNextKeyView" ref="792419186"/> + <reference key="NSDocView" ref="792419186"/> + <reference key="NSBGColor" ref="812484075"/> + <int key="NScvFlags">4</int> + </object> + <reference ref="898633680"/> + </object> + <string key="NSFrame">{{20, 60}, {318, 231}}</string> + <reference key="NSSuperview" ref="85544634"/> + <reference key="NSNextKeyView" ref="580565898"/> + <int key="NSsFlags">50</int> + <reference key="NSVScroller" ref="842897584"/> + <reference key="NSHScroller" ref="17278747"/> + <reference key="NSContentView" ref="580565898"/> + <reference key="NSHeaderClipView" ref="672307654"/> + <reference key="NSCornerView" ref="898633680"/> + <bytes key="NSScrollAmts">QSAAAEEgAABBmAAAQZgAAA</bytes> + </object> + <object class="NSButton" id="758204686"> + <reference key="NSNextResponder" ref="85544634"/> + <int key="NSvFlags">265</int> + <string key="NSFrame">{{340, 263}, {100, 32}}</string> + <reference key="NSSuperview" ref="85544634"/> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="1025474039"> + <int key="NSCellFlags">-2080244224</int> + <int key="NSCellFlags2">137887744</int> + <string key="NSContents">Add Item</string> + <reference key="NSSupport" ref="463863101"/> + <reference key="NSControlView" ref="758204686"/> + <int key="NSButtonFlags">-2038284033</int> + <int key="NSButtonFlags2">1</int> + <reference key="NSAlternateImage" ref="549406736"/> + <object class="NSMutableString" key="NSAlternateContents"> + <characters key="NS.bytes"/> + </object> + <object class="NSMutableString" key="NSKeyEquivalent"> + <characters key="NS.bytes"/> + </object> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + <object class="NSButton" id="125703429"> + <reference key="NSNextResponder" ref="85544634"/> + <int key="NSvFlags">257</int> + <string key="NSFrame">{{356, 12}, {84, 32}}</string> + <reference key="NSSuperview" ref="85544634"/> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="892296813"> + <int key="NSCellFlags">-2080244224</int> + <int key="NSCellFlags2">137887744</int> + <string key="NSContents">Cancel</string> + <reference key="NSSupport" ref="463863101"/> + <reference key="NSControlView" ref="125703429"/> + <int key="NSButtonFlags">-2038284033</int> + <int key="NSButtonFlags2">1</int> + <reference key="NSAlternateImage" ref="549406736"/> + <object class="NSMutableString" key="NSAlternateContents"> + <characters key="NS.bytes"/> + </object> + <object class="NSMutableString" key="NSKeyEquivalent"> + <characters key="NS.bytes"/> + </object> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + <object class="NSButton" id="724002248"> + <reference key="NSNextResponder" ref="85544634"/> + <int key="NSvFlags">257</int> + <string key="NSFrame">{{272, 12}, {84, 32}}</string> + <reference key="NSSuperview" ref="85544634"/> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="809610613"> + <int key="NSCellFlags">-2080244224</int> + <int key="NSCellFlags2">137887744</int> + <string key="NSContents">Done</string> + <reference key="NSSupport" ref="463863101"/> + <reference key="NSControlView" ref="724002248"/> + <int key="NSButtonFlags">-2038284033</int> + <int key="NSButtonFlags2">1</int> + <reference key="NSAlternateImage" ref="549406736"/> + <string key="NSAlternateContents"/> + <object class="NSMutableString" key="NSKeyEquivalent"> + <characters key="NS.bytes"/> + </object> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + </object> + <string key="NSFrameSize">{454, 311}</string> + <reference key="NSSuperview"/> + </object> + <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string> + <string key="NSMinSize">{320, 262}</string> + <string key="NSFrameAutosaveName">x11_apps</string> + </object> + <object class="NSMenu" id="294137138"> + <string key="NSTitle">Menu</string> + <object class="NSMutableArray" key="NSMenuItems"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSMenuItem" id="318286212"> + <reference key="NSMenu" ref="294137138"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + </object> + <object class="NSMenuItem" id="511651072"> + <reference key="NSMenu" ref="294137138"/> + <string key="NSTitle">Applications</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="48278059"> + <string key="NSTitle">Applications</string> + <object class="NSMutableArray" key="NSMenuItems"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSMenuItem" id="563798000"> + <reference key="NSMenu" ref="48278059"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + </object> + <object class="NSMenuItem" id="1032342329"> + <reference key="NSMenu" ref="48278059"/> + <string type="base64-UTF8" key="NSTitle">Q3VzdG9taXpl4oCmA</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="531645050"/> + <reference key="NSMixedImage" ref="351811234"/> + </object> + </object> + </object> + </object> + </object> + <string key="NSName"/> + </object> + </object> + <object class="IBObjectContainer" key="IBDocument.Objects"> + <object class="NSMutableArray" key="connectionRecords"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">cut:</string> + <reference key="source" ref="941939442"/> + <reference key="destination" ref="581727829"/> + </object> + <int key="connectionID">175</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">paste:</string> + <reference key="source" ref="941939442"/> + <reference key="destination" ref="924678073"/> + </object> + <int key="connectionID">176</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">redo:</string> + <reference key="source" ref="941939442"/> + <reference key="destination" ref="535038564"/> + </object> + <int key="connectionID">178</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">selectAll:</string> + <reference key="source" ref="941939442"/> + <reference key="destination" ref="322866464"/> + </object> + <int key="connectionID">179</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">undo:</string> + <reference key="source" ref="941939442"/> + <reference key="destination" ref="1010221707"/> + </object> + <int key="connectionID">180</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">copy:</string> + <reference key="source" ref="941939442"/> + <reference key="destination" ref="185296989"/> + </object> + <int key="connectionID">181</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">delete:</string> + <reference key="source" ref="941939442"/> + <reference key="destination" ref="994817848"/> + </object> + <int key="connectionID">195</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">minimize_window:</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="677652931"/> + </object> + <int key="connectionID">202</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">close_window:</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="984461797"/> + </object> + <int key="connectionID">205</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">zoom_window:</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="1066447520"/> + </object> + <int key="connectionID">206</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">bring_to_front:</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="276216762"/> + </object> + <int key="connectionID">207</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">hideOtherApplications:</string> + <reference key="source" ref="815810918"/> + <reference key="destination" ref="206802571"/> + </object> + <int key="connectionID">263</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">apps_separator</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="390088328"/> + </object> + <int key="connectionID">273</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">apps_table</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="905092943"/> + </object> + <int key="connectionID">301</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">apps_table_done:</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="724002248"/> + </object> + <int key="connectionID">302</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">apps_table_delete:</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="492358940"/> + </object> + <int key="connectionID">303</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">apps_table_duplicate:</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="671954382"/> + </object> + <int key="connectionID">304</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">apps_table_show:</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="1065386165"/> + </object> + <int key="connectionID">308</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">apps_table_cancel:</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="125703429"/> + </object> + <int key="connectionID">309</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">apps_table_new:</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="758204686"/> + </object> + <int key="connectionID">311</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">prefs_show:</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="386173216"/> + </object> + <int key="connectionID">318</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">x11_about_item</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="139290918"/> + </object> + <int key="connectionID">321</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">enable_auth</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="989050925"/> + </object> + <int key="connectionID">387</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">enable_tcp</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="700826966"/> + </object> + <int key="connectionID">388</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">depth</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="709074847"/> + </object> + <int key="connectionID">389</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">use_sysbeep</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="418227126"/> + </object> + <int key="connectionID">390</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">fake_buttons</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="119157981"/> + </object> + <int key="connectionID">391</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">sync_keymap</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="179949713"/> + </object> + <int key="connectionID">392</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">enable_keyequivs</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="842100515"/> + </object> + <int key="connectionID">393</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">prefs_changed:</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="119157981"/> + </object> + <int key="connectionID">394</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">prefs_changed:</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="179949713"/> + </object> + <int key="connectionID">395</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">prefs_changed:</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="842100515"/> + </object> + <int key="connectionID">396</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">prefs_changed:</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="418227126"/> + </object> + <int key="connectionID">397</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">prefs_changed:</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="709074847"/> + </object> + <int key="connectionID">398</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">prefs_changed:</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="989050925"/> + </object> + <int key="connectionID">399</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">prefs_changed:</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="700826966"/> + </object> + <int key="connectionID">401</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">prefs_panel</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="124913468"/> + </object> + <int key="connectionID">402</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">x11_help:</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="504984881"/> + </object> + <int key="connectionID">422</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">dockMenu</string> + <reference key="source" ref="815810918"/> + <reference key="destination" ref="294137138"/> + </object> + <int key="connectionID">426</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">dock_menu</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="294137138"/> + </object> + <int key="connectionID">428</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">delegate</string> + <reference key="source" ref="815810918"/> + <reference key="destination" ref="485884620"/> + </object> + <int key="connectionID">429</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">hide:</string> + <reference key="source" ref="815810918"/> + <reference key="destination" ref="301008465"/> + </object> + <int key="connectionID">430</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">unhideAllApplications:</string> + <reference key="source" ref="815810918"/> + <reference key="destination" ref="1023546148"/> + </object> + <int key="connectionID">431</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">orderFrontStandardAboutPanel:</string> + <reference key="source" ref="815810918"/> + <reference key="destination" ref="139290918"/> + </object> + <int key="connectionID">433</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">dock_apps_menu</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="48278059"/> + </object> + <int key="connectionID">530</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">dock_window_separator</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="318286212"/> + </object> + <int key="connectionID">531</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">apps_table_show:</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="1032342329"/> + </object> + <int key="connectionID">534</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">next_window:</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="1036389925"/> + </object> + <int key="connectionID">539</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">previous_window:</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="369641893"/> + </object> + <int key="connectionID">540</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">enable_fullscreen</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="477203622"/> + </object> + <int key="connectionID">546</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">enable_fullscreen_changed:</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="477203622"/> + </object> + <int key="connectionID">547</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggle_fullscreen:</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="6876565"/> + </object> + <int key="connectionID">548</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">toggle_fullscreen_item</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="6876565"/> + </object> + <int key="connectionID">549</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">prefs_changed:</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="915448994"/> + </object> + <int key="connectionID">300300</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">window_separator</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="444952046"/> + </object> + <int key="connectionID">300331</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">click_through</string> + <reference key="source" ref="485884620"/> + <reference key="destination" ref="915448994"/> + </object> + <int key="connectionID">300332</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">menu</string> + <reference key="source" ref="815810918"/> + <reference key="destination" ref="524015605"/> + </object> + <int key="connectionID">300334</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">terminate:</string> + <reference key="source" ref="815810918"/> + <reference key="destination" ref="274138642"/> + </object> + <int key="connectionID">300336</int> + </object> + </object> + <object class="IBMutableOrderedSet" key="objectRecords"> + <object class="NSArray" key="orderedObjects"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="IBObjectRecord"> + <int key="objectID">0</int> + <object class="NSArray" key="object" id="330408435"> + <bool key="EncodedWithXMLCoder">YES</bool> + </object> + <reference key="children" ref="904585544"/> + <nil key="parent"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">-2</int> + <reference key="object" ref="815810918"/> + <reference key="parent" ref="330408435"/> + <string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string> + </object> + <object class="IBObjectRecord"> + <int key="objectID">-1</int> + <reference key="object" ref="941939442"/> + <reference key="parent" ref="330408435"/> + <string key="objectName">First Responder</string> + </object> + <object class="IBObjectRecord"> + <int key="objectID">-3</int> + <reference key="object" ref="951368722"/> + <reference key="parent" ref="330408435"/> + <string key="objectName">Application</string> + </object> + <object class="IBObjectRecord"> + <int key="objectID">29</int> + <reference key="object" ref="524015605"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="931553638"/> + <reference ref="365880285"/> + <reference ref="200491363"/> + <reference ref="868031522"/> + <reference ref="551174276"/> + </object> + <reference key="parent" ref="330408435"/> + <string key="objectName">MainMenu</string> + </object> + <object class="IBObjectRecord"> + <int key="objectID">19</int> + <reference key="object" ref="931553638"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="96874957"/> + </object> + <reference key="parent" ref="524015605"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">24</int> + <reference key="object" ref="96874957"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="677652931"/> + <reference ref="276216762"/> + <reference ref="1066447520"/> + <reference ref="1036389925"/> + <reference ref="280172320"/> + <reference ref="369641893"/> + <reference ref="984461797"/> + <reference ref="155085383"/> + <reference ref="444952046"/> + </object> + <reference key="parent" ref="931553638"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5</int> + <reference key="object" ref="276216762"/> + <reference key="parent" ref="96874957"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">23</int> + <reference key="object" ref="677652931"/> + <reference key="parent" ref="96874957"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">92</int> + <reference key="object" ref="280172320"/> + <reference key="parent" ref="96874957"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">203</int> + <reference key="object" ref="984461797"/> + <reference key="parent" ref="96874957"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">204</int> + <reference key="object" ref="1066447520"/> + <reference key="parent" ref="96874957"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">536</int> + <reference key="object" ref="155085383"/> + <reference key="parent" ref="96874957"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">537</int> + <reference key="object" ref="1036389925"/> + <reference key="parent" ref="96874957"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">538</int> + <reference key="object" ref="369641893"/> + <reference key="parent" ref="96874957"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">56</int> + <reference key="object" ref="365880285"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="576521955"/> + </object> + <reference key="parent" ref="524015605"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">57</int> + <reference key="object" ref="576521955"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="139290918"/> + <reference ref="386173216"/> + <reference ref="32285361"/> + <reference ref="301008465"/> + <reference ref="274138642"/> + <reference ref="272876017"/> + <reference ref="431301145"/> + <reference ref="206802571"/> + <reference ref="848095279"/> + <reference ref="1023546148"/> + <reference ref="6876565"/> + <reference ref="479677589"/> + </object> + <reference key="parent" ref="365880285"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">58</int> + <reference key="object" ref="139290918"/> + <reference key="parent" ref="576521955"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">129</int> + <reference key="object" ref="386173216"/> + <reference key="parent" ref="576521955"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">131</int> + <reference key="object" ref="32285361"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="821388474"/> + </object> + <reference key="parent" ref="576521955"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">130</int> + <reference key="object" ref="821388474"/> + <reference key="parent" ref="32285361"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">134</int> + <reference key="object" ref="301008465"/> + <reference key="parent" ref="576521955"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">136</int> + <reference key="object" ref="274138642"/> + <reference key="parent" ref="576521955"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">143</int> + <reference key="object" ref="272876017"/> + <reference key="parent" ref="576521955"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">144</int> + <reference key="object" ref="431301145"/> + <reference key="parent" ref="576521955"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">145</int> + <reference key="object" ref="206802571"/> + <reference key="parent" ref="576521955"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">149</int> + <reference key="object" ref="848095279"/> + <reference key="parent" ref="576521955"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">150</int> + <reference key="object" ref="1023546148"/> + <reference key="parent" ref="576521955"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">544</int> + <reference key="object" ref="6876565"/> + <reference key="parent" ref="576521955"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">545</int> + <reference key="object" ref="479677589"/> + <reference key="parent" ref="576521955"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">163</int> + <reference key="object" ref="200491363"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="526778998"/> + </object> + <reference key="parent" ref="524015605"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">169</int> + <reference key="object" ref="526778998"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="839739619"/> + <reference ref="185296989"/> + <reference ref="1010221707"/> + <reference ref="581727829"/> + <reference ref="994817848"/> + <reference ref="924678073"/> + <reference ref="322866464"/> + <reference ref="535038564"/> + </object> + <reference key="parent" ref="200491363"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">156</int> + <reference key="object" ref="839739619"/> + <reference key="parent" ref="526778998"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">157</int> + <reference key="object" ref="185296989"/> + <reference key="parent" ref="526778998"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">158</int> + <reference key="object" ref="1010221707"/> + <reference key="parent" ref="526778998"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">160</int> + <reference key="object" ref="581727829"/> + <reference key="parent" ref="526778998"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">164</int> + <reference key="object" ref="994817848"/> + <reference key="parent" ref="526778998"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">171</int> + <reference key="object" ref="924678073"/> + <reference key="parent" ref="526778998"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">172</int> + <reference key="object" ref="322866464"/> + <reference key="parent" ref="526778998"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">173</int> + <reference key="object" ref="535038564"/> + <reference key="parent" ref="526778998"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">269</int> + <reference key="object" ref="868031522"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="981161348"/> + </object> + <reference key="parent" ref="524015605"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">270</int> + <reference key="object" ref="981161348"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="390088328"/> + <reference ref="1065386165"/> + </object> + <reference key="parent" ref="868031522"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">272</int> + <reference key="object" ref="390088328"/> + <reference key="parent" ref="981161348"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">305</int> + <reference key="object" ref="1065386165"/> + <reference key="parent" ref="981161348"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">419</int> + <reference key="object" ref="551174276"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="511848303"/> + </object> + <reference key="parent" ref="524015605"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">420</int> + <reference key="object" ref="511848303"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="504984881"/> + </object> + <reference key="parent" ref="551174276"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">421</int> + <reference key="object" ref="504984881"/> + <reference key="parent" ref="511848303"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">196</int> + <reference key="object" ref="485884620"/> + <reference key="parent" ref="330408435"/> + <string key="objectName">X11Controller</string> + </object> + <object class="IBObjectRecord"> + <int key="objectID">244</int> + <reference key="object" ref="124913468"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="941366957"/> + </object> + <reference key="parent" ref="330408435"/> + <string key="objectName">PrefsPanel</string> + </object> + <object class="IBObjectRecord"> + <int key="objectID">245</int> + <reference key="object" ref="941366957"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="448510093"/> + </object> + <reference key="parent" ref="124913468"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">348</int> + <reference key="object" ref="448510093"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="287591690"/> + <reference ref="960678392"/> + <reference ref="348328898"/> + </object> + <reference key="parent" ref="941366957"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">349</int> + <reference key="object" ref="287591690"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="596750588"/> + </object> + <reference key="parent" ref="448510093"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">351</int> + <reference key="object" ref="596750588"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="119157981"/> + <reference ref="443008216"/> + <reference ref="282885445"/> + <reference ref="842100515"/> + <reference ref="31160162"/> + <reference ref="179949713"/> + <reference ref="915448994"/> + <reference ref="707276799"/> + </object> + <reference key="parent" ref="287591690"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">363</int> + <reference key="object" ref="119157981"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="990762273"/> + </object> + <reference key="parent" ref="596750588"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">364</int> + <reference key="object" ref="443008216"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="391919450"/> + </object> + <reference key="parent" ref="596750588"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">365</int> + <reference key="object" ref="282885445"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="649334366"/> + </object> + <reference key="parent" ref="596750588"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">368</int> + <reference key="object" ref="842100515"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="940564599"/> + </object> + <reference key="parent" ref="596750588"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">369</int> + <reference key="object" ref="31160162"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="666057093"/> + </object> + <reference key="parent" ref="596750588"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">370</int> + <reference key="object" ref="179949713"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="967619578"/> + </object> + <reference key="parent" ref="596750588"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">352</int> + <reference key="object" ref="960678392"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="515308735"/> + </object> + <reference key="parent" ref="448510093"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">350</int> + <reference key="object" ref="515308735"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="418227126"/> + <reference ref="1039016593"/> + <reference ref="709074847"/> + <reference ref="201731424"/> + <reference ref="86150604"/> + <reference ref="477203622"/> + <reference ref="298603383"/> + </object> + <reference key="parent" ref="960678392"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">371</int> + <reference key="object" ref="418227126"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="1016069354"/> + </object> + <reference key="parent" ref="515308735"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">372</int> + <reference key="object" ref="1039016593"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="624655599"/> + </object> + <reference key="parent" ref="515308735"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">382</int> + <reference key="object" ref="709074847"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="633115429"/> + </object> + <reference key="parent" ref="515308735"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">385</int> + <reference key="object" ref="201731424"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="930265681"/> + </object> + <reference key="parent" ref="515308735"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">386</int> + <reference key="object" ref="86150604"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="311969422"/> + </object> + <reference key="parent" ref="515308735"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">541</int> + <reference key="object" ref="477203622"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="631531164"/> + </object> + <reference key="parent" ref="515308735"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">543</int> + <reference key="object" ref="298603383"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="761107402"/> + </object> + <reference key="parent" ref="515308735"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">353</int> + <reference key="object" ref="348328898"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="300811574"/> + </object> + <reference key="parent" ref="448510093"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">354</int> + <reference key="object" ref="300811574"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="989050925"/> + <reference ref="700826966"/> + <reference ref="168436707"/> + <reference ref="363817195"/> + <reference ref="223835729"/> + </object> + <reference key="parent" ref="348328898"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">374</int> + <reference key="object" ref="989050925"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="189594322"/> + </object> + <reference key="parent" ref="300811574"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">375</int> + <reference key="object" ref="700826966"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="489340979"/> + </object> + <reference key="parent" ref="300811574"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">376</int> + <reference key="object" ref="168436707"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="53243865"/> + </object> + <reference key="parent" ref="300811574"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">377</int> + <reference key="object" ref="363817195"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="390084685"/> + </object> + <reference key="parent" ref="300811574"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">379</int> + <reference key="object" ref="223835729"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="283628678"/> + </object> + <reference key="parent" ref="300811574"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">285</int> + <reference key="object" ref="604417141"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="85544634"/> + </object> + <reference key="parent" ref="330408435"/> + <string key="objectName">EditPrograms</string> + </object> + <object class="IBObjectRecord"> + <int key="objectID">286</int> + <reference key="object" ref="85544634"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="1063387772"/> + <reference ref="758204686"/> + <reference ref="671954382"/> + <reference ref="492358940"/> + <reference ref="125703429"/> + <reference ref="724002248"/> + </object> + <reference key="parent" ref="604417141"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">423</int> + <reference key="object" ref="294137138"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="318286212"/> + <reference ref="511651072"/> + </object> + <reference key="parent" ref="330408435"/> + <string key="objectName">DockMenu</string> + </object> + <object class="IBObjectRecord"> + <int key="objectID">524</int> + <reference key="object" ref="318286212"/> + <reference key="parent" ref="294137138"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">526</int> + <reference key="object" ref="511651072"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="48278059"/> + </object> + <reference key="parent" ref="294137138"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">527</int> + <reference key="object" ref="48278059"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="1032342329"/> + <reference ref="563798000"/> + </object> + <reference key="parent" ref="511651072"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">532</int> + <reference key="object" ref="1032342329"/> + <reference key="parent" ref="48278059"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">533</int> + <reference key="object" ref="563798000"/> + <reference key="parent" ref="48278059"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">100363</int> + <reference key="object" ref="990762273"/> + <reference key="parent" ref="119157981"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">100364</int> + <reference key="object" ref="391919450"/> + <reference key="parent" ref="443008216"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">100365</int> + <reference key="object" ref="649334366"/> + <reference key="parent" ref="282885445"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">100368</int> + <reference key="object" ref="940564599"/> + <reference key="parent" ref="842100515"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">100369</int> + <reference key="object" ref="666057093"/> + <reference key="parent" ref="31160162"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">100370</int> + <reference key="object" ref="967619578"/> + <reference key="parent" ref="179949713"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">100371</int> + <reference key="object" ref="1016069354"/> + <reference key="parent" ref="418227126"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">100372</int> + <reference key="object" ref="624655599"/> + <reference key="parent" ref="1039016593"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">100382</int> + <reference key="object" ref="633115429"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="341113515"/> + </object> + <reference key="parent" ref="709074847"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">100385</int> + <reference key="object" ref="930265681"/> + <reference key="parent" ref="201731424"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">100386</int> + <reference key="object" ref="311969422"/> + <reference key="parent" ref="86150604"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">100541</int> + <reference key="object" ref="631531164"/> + <reference key="parent" ref="477203622"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">100543</int> + <reference key="object" ref="761107402"/> + <reference key="parent" ref="298603383"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">100374</int> + <reference key="object" ref="189594322"/> + <reference key="parent" ref="989050925"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">100375</int> + <reference key="object" ref="489340979"/> + <reference key="parent" ref="700826966"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">100376</int> + <reference key="object" ref="53243865"/> + <reference key="parent" ref="168436707"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">100377</int> + <reference key="object" ref="390084685"/> + <reference key="parent" ref="363817195"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">100379</int> + <reference key="object" ref="283628678"/> + <reference key="parent" ref="223835729"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">380</int> + <reference key="object" ref="341113515"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="759499526"/> + <reference ref="616492372"/> + <reference ref="543935434"/> + <reference ref="836673018"/> + </object> + <reference key="parent" ref="633115429"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">435</int> + <reference key="object" ref="759499526"/> + <reference key="parent" ref="341113515"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">384</int> + <reference key="object" ref="616492372"/> + <reference key="parent" ref="341113515"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">383</int> + <reference key="object" ref="543935434"/> + <reference key="parent" ref="341113515"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">381</int> + <reference key="object" ref="836673018"/> + <reference key="parent" ref="341113515"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">300296</int> + <reference key="object" ref="915448994"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="117056849"/> + </object> + <reference key="parent" ref="596750588"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">300297</int> + <reference key="object" ref="117056849"/> + <reference key="parent" ref="915448994"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">300298</int> + <reference key="object" ref="707276799"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="318286890"/> + </object> + <reference key="parent" ref="596750588"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">300299</int> + <reference key="object" ref="318286890"/> + <reference key="parent" ref="707276799"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">295</int> + <reference key="object" ref="1063387772"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="792419186"/> + <reference ref="17278747"/> + <reference ref="842897584"/> + <reference ref="905092943"/> + </object> + <reference key="parent" ref="85544634"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">300295</int> + <reference key="object" ref="792419186"/> + <reference key="parent" ref="1063387772"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">200295</int> + <reference key="object" ref="17278747"/> + <reference key="parent" ref="1063387772"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">100295</int> + <reference key="object" ref="842897584"/> + <reference key="parent" ref="1063387772"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">296</int> + <reference key="object" ref="905092943"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="242608782"/> + <reference ref="938444323"/> + <reference ref="84282687"/> + </object> + <reference key="parent" ref="1063387772"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">535</int> + <reference key="object" ref="242608782"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="34714764"/> + </object> + <reference key="parent" ref="905092943"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">575</int> + <reference key="object" ref="34714764"/> + <reference key="parent" ref="242608782"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">298</int> + <reference key="object" ref="938444323"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="825378892"/> + </object> + <reference key="parent" ref="905092943"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">573</int> + <reference key="object" ref="825378892"/> + <reference key="parent" ref="938444323"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">297</int> + <reference key="object" ref="84282687"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="432610585"/> + </object> + <reference key="parent" ref="905092943"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">574</int> + <reference key="object" ref="432610585"/> + <reference key="parent" ref="84282687"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">310</int> + <reference key="object" ref="758204686"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="1025474039"/> + </object> + <reference key="parent" ref="85544634"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">100310</int> + <reference key="object" ref="1025474039"/> + <reference key="parent" ref="758204686"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">292</int> + <reference key="object" ref="671954382"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="143554520"/> + </object> + <reference key="parent" ref="85544634"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">100292</int> + <reference key="object" ref="143554520"/> + <reference key="parent" ref="671954382"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">293</int> + <reference key="object" ref="492358940"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="8201128"/> + </object> + <reference key="parent" ref="85544634"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">100293</int> + <reference key="object" ref="8201128"/> + <reference key="parent" ref="492358940"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">299</int> + <reference key="object" ref="125703429"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="892296813"/> + </object> + <reference key="parent" ref="85544634"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">100299</int> + <reference key="object" ref="892296813"/> + <reference key="parent" ref="125703429"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">291</int> + <reference key="object" ref="724002248"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="809610613"/> + </object> + <reference key="parent" ref="85544634"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">100291</int> + <reference key="object" ref="809610613"/> + <reference key="parent" ref="724002248"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">300330</int> + <reference key="object" ref="444952046"/> + <reference key="parent" ref="96874957"/> + </object> + </object> + </object> + <object class="NSMutableDictionary" key="flattenedProperties"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSMutableArray" key="dict.sortedKeys"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>-1.IBPluginDependency</string> + <string>-2.IBPluginDependency</string> + <string>-3.IBPluginDependency</string> + <string>-3.ImportedFromIB2</string> + <string>100295.IBShouldRemoveOnLegacySave</string> + <string>129.IBPluginDependency</string> + <string>129.ImportedFromIB2</string> + <string>130.IBPluginDependency</string> + <string>130.ImportedFromIB2</string> + <string>131.IBPluginDependency</string> + <string>131.ImportedFromIB2</string> + <string>134.IBPluginDependency</string> + <string>134.ImportedFromIB2</string> + <string>136.IBPluginDependency</string> + <string>136.ImportedFromIB2</string> + <string>143.IBPluginDependency</string> + <string>143.ImportedFromIB2</string> + <string>144.IBPluginDependency</string> + <string>144.ImportedFromIB2</string> + <string>145.IBPluginDependency</string> + <string>145.ImportedFromIB2</string> + <string>149.IBPluginDependency</string> + <string>149.ImportedFromIB2</string> + <string>150.IBPluginDependency</string> + <string>150.ImportedFromIB2</string> + <string>156.IBPluginDependency</string> + <string>156.ImportedFromIB2</string> + <string>157.IBPluginDependency</string> + <string>157.ImportedFromIB2</string> + <string>158.IBPluginDependency</string> + <string>158.ImportedFromIB2</string> + <string>160.IBPluginDependency</string> + <string>160.ImportedFromIB2</string> + <string>163.IBPluginDependency</string> + <string>163.ImportedFromIB2</string> + <string>164.IBPluginDependency</string> + <string>164.ImportedFromIB2</string> + <string>169.IBPluginDependency</string> + <string>169.ImportedFromIB2</string> + <string>169.editorWindowContentRectSynchronizationRect</string> + <string>171.IBPluginDependency</string> + <string>171.ImportedFromIB2</string> + <string>172.IBPluginDependency</string> + <string>172.ImportedFromIB2</string> + <string>173.IBPluginDependency</string> + <string>173.ImportedFromIB2</string> + <string>19.IBPluginDependency</string> + <string>19.ImportedFromIB2</string> + <string>196.IBPluginDependency</string> + <string>196.ImportedFromIB2</string> + <string>200295.IBShouldRemoveOnLegacySave</string> + <string>203.IBPluginDependency</string> + <string>203.ImportedFromIB2</string> + <string>204.IBPluginDependency</string> + <string>204.ImportedFromIB2</string> + <string>23.IBPluginDependency</string> + <string>23.ImportedFromIB2</string> + <string>24.IBPluginDependency</string> + <string>24.ImportedFromIB2</string> + <string>24.editorWindowContentRectSynchronizationRect</string> + <string>244.IBPluginDependency</string> + <string>244.IBWindowTemplateEditedContentRect</string> + <string>244.ImportedFromIB2</string> + <string>244.editorWindowContentRectSynchronizationRect</string> + <string>244.windowTemplate.hasMaxSize</string> + <string>244.windowTemplate.hasMinSize</string> + <string>244.windowTemplate.maxSize</string> + <string>244.windowTemplate.minSize</string> + <string>245.IBPluginDependency</string> + <string>245.ImportedFromIB2</string> + <string>269.IBPluginDependency</string> + <string>269.ImportedFromIB2</string> + <string>270.IBPluginDependency</string> + <string>270.ImportedFromIB2</string> + <string>270.editorWindowContentRectSynchronizationRect</string> + <string>272.IBPluginDependency</string> + <string>272.ImportedFromIB2</string> + <string>285.IBEditorWindowLastContentRect</string> + <string>285.IBPluginDependency</string> + <string>285.IBViewEditorWindowController.showingBoundsRectangles</string> + <string>285.IBViewEditorWindowController.showingLayoutRectangles</string> + <string>285.IBWindowTemplateEditedContentRect</string> + <string>285.ImportedFromIB2</string> + <string>285.editorWindowContentRectSynchronizationRect</string> + <string>285.lastResizeAction</string> + <string>285.windowTemplate.hasMaxSize</string> + <string>285.windowTemplate.hasMinSize</string> + <string>285.windowTemplate.maxSize</string> + <string>285.windowTemplate.minSize</string> + <string>286.IBPluginDependency</string> + <string>286.ImportedFromIB2</string> + <string>29.IBEditorWindowLastContentRect</string> + <string>29.IBPluginDependency</string> + <string>29.ImportedFromIB2</string> + <string>29.editorWindowContentRectSynchronizationRect</string> + <string>291.IBPluginDependency</string> + <string>291.ImportedFromIB2</string> + <string>292.IBPluginDependency</string> + <string>292.ImportedFromIB2</string> + <string>293.IBPluginDependency</string> + <string>293.ImportedFromIB2</string> + <string>295.IBPluginDependency</string> + <string>295.ImportedFromIB2</string> + <string>296.IBPluginDependency</string> + <string>296.ImportedFromIB2</string> + <string>297.IBPluginDependency</string> + <string>297.ImportedFromIB2</string> + <string>298.IBPluginDependency</string> + <string>298.ImportedFromIB2</string> + <string>299.IBPluginDependency</string> + <string>299.ImportedFromIB2</string> + <string>300295.IBShouldRemoveOnLegacySave</string> + <string>300296.IBPluginDependency</string> + <string>300296.ImportedFromIB2</string> + <string>300298.IBPluginDependency</string> + <string>300298.ImportedFromIB2</string> + <string>300330.IBPluginDependency</string> + <string>300330.ImportedFromIB2</string> + <string>305.IBPluginDependency</string> + <string>305.ImportedFromIB2</string> + <string>310.IBPluginDependency</string> + <string>310.ImportedFromIB2</string> + <string>348.IBPluginDependency</string> + <string>348.ImportedFromIB2</string> + <string>349.IBPluginDependency</string> + <string>349.ImportedFromIB2</string> + <string>350.IBPluginDependency</string> + <string>350.ImportedFromIB2</string> + <string>351.IBPluginDependency</string> + <string>351.ImportedFromIB2</string> + <string>352.IBPluginDependency</string> + <string>352.ImportedFromIB2</string> + <string>353.IBPluginDependency</string> + <string>353.ImportedFromIB2</string> + <string>354.IBPluginDependency</string> + <string>354.ImportedFromIB2</string> + <string>363.IBPluginDependency</string> + <string>363.ImportedFromIB2</string> + <string>364.IBPluginDependency</string> + <string>364.ImportedFromIB2</string> + <string>365.IBPluginDependency</string> + <string>365.ImportedFromIB2</string> + <string>368.IBPluginDependency</string> + <string>368.ImportedFromIB2</string> + <string>369.IBPluginDependency</string> + <string>369.ImportedFromIB2</string> + <string>370.IBPluginDependency</string> + <string>370.ImportedFromIB2</string> + <string>371.IBPluginDependency</string> + <string>371.ImportedFromIB2</string> + <string>372.IBPluginDependency</string> + <string>372.ImportedFromIB2</string> + <string>374.IBPluginDependency</string> + <string>374.ImportedFromIB2</string> + <string>375.IBPluginDependency</string> + <string>375.ImportedFromIB2</string> + <string>376.IBPluginDependency</string> + <string>376.ImportedFromIB2</string> + <string>377.IBPluginDependency</string> + <string>377.ImportedFromIB2</string> + <string>379.IBPluginDependency</string> + <string>379.ImportedFromIB2</string> + <string>380.IBPluginDependency</string> + <string>380.ImportedFromIB2</string> + <string>381.IBPluginDependency</string> + <string>381.ImportedFromIB2</string> + <string>382.IBPluginDependency</string> + <string>382.ImportedFromIB2</string> + <string>383.IBPluginDependency</string> + <string>383.ImportedFromIB2</string> + <string>384.IBPluginDependency</string> + <string>384.ImportedFromIB2</string> + <string>385.IBPluginDependency</string> + <string>385.ImportedFromIB2</string> + <string>386.IBPluginDependency</string> + <string>386.ImportedFromIB2</string> + <string>419.IBPluginDependency</string> + <string>419.ImportedFromIB2</string> + <string>420.IBPluginDependency</string> + <string>420.ImportedFromIB2</string> + <string>421.IBPluginDependency</string> + <string>421.ImportedFromIB2</string> + <string>423.IBPluginDependency</string> + <string>423.ImportedFromIB2</string> + <string>435.IBPluginDependency</string> + <string>435.ImportedFromIB2</string> + <string>5.IBPluginDependency</string> + <string>5.ImportedFromIB2</string> + <string>524.IBPluginDependency</string> + <string>524.ImportedFromIB2</string> + <string>526.IBPluginDependency</string> + <string>526.ImportedFromIB2</string> + <string>527.IBPluginDependency</string> + <string>527.ImportedFromIB2</string> + <string>532.IBPluginDependency</string> + <string>532.ImportedFromIB2</string> + <string>533.IBPluginDependency</string> + <string>533.ImportedFromIB2</string> + <string>535.IBPluginDependency</string> + <string>535.ImportedFromIB2</string> + <string>536.IBPluginDependency</string> + <string>536.ImportedFromIB2</string> + <string>537.IBPluginDependency</string> + <string>537.ImportedFromIB2</string> + <string>538.IBPluginDependency</string> + <string>538.ImportedFromIB2</string> + <string>541.IBPluginDependency</string> + <string>541.ImportedFromIB2</string> + <string>543.IBPluginDependency</string> + <string>543.ImportedFromIB2</string> + <string>544.IBPluginDependency</string> + <string>544.ImportedFromIB2</string> + <string>545.IBPluginDependency</string> + <string>545.ImportedFromIB2</string> + <string>56.IBPluginDependency</string> + <string>56.ImportedFromIB2</string> + <string>57.IBEditorWindowLastContentRect</string> + <string>57.IBPluginDependency</string> + <string>57.ImportedFromIB2</string> + <string>57.editorWindowContentRectSynchronizationRect</string> + <string>573.IBPluginDependency</string> + <string>573.ImportedFromIB2</string> + <string>574.IBPluginDependency</string> + <string>574.ImportedFromIB2</string> + <string>575.IBPluginDependency</string> + <string>575.ImportedFromIB2</string> + <string>58.IBPluginDependency</string> + <string>58.ImportedFromIB2</string> + <string>92.IBPluginDependency</string> + <string>92.ImportedFromIB2</string> + </object> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <integer value="1" id="9"/> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>{{202, 626}, {154, 153}}</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>{{271, 666}, {301, 153}}</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>{{184, 290}, {481, 345}}</string> + <reference ref="9"/> + <string>{{184, 290}, {481, 345}}</string> + <reference ref="9"/> + <reference ref="9"/> + <string>{3.40282e+38, 3.40282e+38}</string> + <string>{213, 107}</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>{{100, 746}, {155, 33}}</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>{{537, 545}, {454, 311}}</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <reference ref="9"/> + <string>{{537, 545}, {454, 311}}</string> + <reference ref="9"/> + <string>{{433, 406}, {486, 327}}</string> + <object class="NSDictionary"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSMutableArray" key="dict.sortedKeys"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>IBResizeActionFinalFrame</string> + <string>IBResizeActionInitialFrame</string> + </object> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>{{537, 554}, {454, 311}}</string> + <string>{{537, 576}, {471, 289}}</string> + </object> + </object> + <integer value="0"/> + <reference ref="9"/> + <string>{3.40282e+38, 3.40282e+38}</string> + <string>{320, 240}</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>{{0, 836}, {336, 20}}</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>{{67, 819}, {336, 20}}</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>{{12, 633}, {218, 203}}</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>{{79, 616}, {218, 203}}</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + </object> + </object> + <object class="NSMutableDictionary" key="unlocalizedProperties"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSArray" key="dict.sortedKeys"> + <bool key="EncodedWithXMLCoder">YES</bool> + </object> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + </object> + </object> + <nil key="activeLocalization"/> + <object class="NSMutableDictionary" key="localizations"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSArray" key="dict.sortedKeys"> + <bool key="EncodedWithXMLCoder">YES</bool> + </object> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + </object> + </object> + <nil key="sourceID"/> + <int key="maxID">300336</int> + </object> + <object class="IBClassDescriber" key="IBDocument.Classes"> + <object class="NSMutableArray" key="referencedPartialClassDescriptions"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="IBPartialClassDescription"> + <string key="className">FirstResponder</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBUserSource</string> + <string key="minorKey"/> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">NSFormatter</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBUserSource</string> + <string key="minorKey"/> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">X11Controller</string> + <string key="superclassName">NSObject</string> + <object class="NSMutableDictionary" key="actions"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSMutableArray" key="dict.sortedKeys"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>apps_table_cancel:</string> + <string>apps_table_delete:</string> + <string>apps_table_done:</string> + <string>apps_table_duplicate:</string> + <string>apps_table_new:</string> + <string>apps_table_show:</string> + <string>bring_to_front:</string> + <string>close_window:</string> + <string>enable_fullscreen_changed:</string> + <string>minimize_window:</string> + <string>next_window:</string> + <string>prefs_changed:</string> + <string>prefs_show:</string> + <string>previous_window:</string> + <string>quit:</string> + <string>toggle_fullscreen:</string> + <string>x11_help:</string> + <string>zoom_window:</string> + </object> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + </object> + </object> + <object class="NSMutableDictionary" key="outlets"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSMutableArray" key="dict.sortedKeys"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>apps_separator</string> + <string>apps_table</string> + <string>click_through</string> + <string>depth</string> + <string>dock_apps_menu</string> + <string>dock_menu</string> + <string>dock_window_separator</string> + <string>enable_auth</string> + <string>enable_fullscreen</string> + <string>enable_keyequivs</string> + <string>enable_tcp</string> + <string>fake_buttons</string> + <string>prefs_panel</string> + <string>sync_keymap</string> + <string>toggle_fullscreen_item</string> + <string>use_sysbeep</string> + <string>window_separator</string> + <string>x11_about_item</string> + </object> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>NSMenuItem</string> + <string>NSTableView</string> + <string>NSButton</string> + <string>NSPopUpButton</string> + <string>NSMenu</string> + <string>NSMenu</string> + <string>NSMenuItem</string> + <string>NSButton</string> + <string>NSButton</string> + <string>NSButton</string> + <string>NSButton</string> + <string>NSButton</string> + <string>NSPanel</string> + <string>NSButton</string> + <string>NSMenuItem</string> + <string>NSButton</string> + <string>NSMenuItem</string> + <string>NSMenuItem</string> + </object> + </object> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBUserSource</string> + <string key="minorKey"/> + </object> + </object> + </object> + </object> + <int key="IBDocument.localizationMode">0</int> + <nil key="IBDocument.LastKnownRelativeProjectPath"/> + <int key="IBDocument.defaultPropertyAccessControl">3</int> + </data> +</archive> diff --git a/hw/xquartz/bundle/English.lproj/main.nib/info.nib b/hw/xquartz/bundle/English.lproj/main.nib/info.nib deleted file mode 100644 index 88bc6260d..000000000 --- a/hw/xquartz/bundle/English.lproj/main.nib/info.nib +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>IBFramework Version</key> - <string>588</string> - <key>IBOpenObjects</key> - <array> - <integer>244</integer> - <integer>29</integer> - <integer>423</integer> - </array> - <key>IBSystem Version</key> - <string>9A356</string> - <key>targetFramework</key> - <string>IBCocoaFramework</string> -</dict> -</plist> diff --git a/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib Binary files differindex 8b31450ff..f60dcbacb 100644 --- a/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib +++ b/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib diff --git a/hw/xquartz/bundle/Makefile.am b/hw/xquartz/bundle/Makefile.am index 00d540fee..801fdc7d8 100644 --- a/hw/xquartz/bundle/Makefile.am +++ b/hw/xquartz/bundle/Makefile.am @@ -15,12 +15,63 @@ resourcedir=$(libdir)/X11/xserver resource_DATA = Xquartz.plist EXTRA_DIST = \ + $(resource_DATA) \ Info.plist \ X11.icns \ bundle-main.c \ + X11.xcodeproj/project.pbxproj \ + Dutch.lproj/InfoPlist.strings \ + Dutch.lproj/Localizable.strings \ + Dutch.lproj/main.nib/keyedobjects.nib \ English.lproj/InfoPlist.strings \ English.lproj/Localizable.strings \ - English.lproj/main.nib/classes.nib \ - English.lproj/main.nib/info.nib \ + English.lproj/main.nib/designable.nib \ English.lproj/main.nib/keyedobjects.nib \ - X11.xcodeproj/project.pbxproj + French.lproj/InfoPlist.strings \ + French.lproj/Localizable.strings \ + French.lproj/main.nib/keyedobjects.nib \ + German.lproj/InfoPlist.strings \ + German.lproj/Localizable.strings \ + German.lproj/main.nib/keyedobjects.nib \ + Italian.lproj/InfoPlist.strings \ + Italian.lproj/Localizable.strings \ + Italian.lproj/main.nib/keyedobjects.nib \ + Japanese.lproj/InfoPlist.strings \ + Japanese.lproj/Localizable.strings \ + Japanese.lproj/main.nib/keyedobjects.nib \ + Spanish.lproj/InfoPlist.strings \ + Spanish.lproj/Localizable.strings \ + Spanish.lproj/main.nib/keyedobjects.nib \ + da.lproj/InfoPlist.strings \ + da.lproj/Localizable.strings \ + da.lproj/main.nib/keyedobjects.nib \ + fi.lproj/InfoPlist.strings \ + fi.lproj/Localizable.strings \ + fi.lproj/main.nib/keyedobjects.nib \ + ko.lproj/InfoPlist.strings \ + ko.lproj/Localizable.strings \ + ko.lproj/main.nib/keyedobjects.nib \ + no.lproj/InfoPlist.strings \ + no.lproj/Localizable.strings \ + no.lproj/main.nib/keyedobjects.nib \ + pl.lproj/InfoPlist.strings \ + pl.lproj/Localizable.strings \ + pl.lproj/main.nib/keyedobjects.nib \ + pt.lproj/InfoPlist.strings \ + pt.lproj/Localizable.strings \ + pt.lproj/main.nib/keyedobjects.nib \ + pt_PT.lproj/InfoPlist.strings \ + pt_PT.lproj/Localizable.strings \ + pt_PT.lproj/main.nib/keyedobjects.nib \ + ru.lproj/InfoPlist.strings \ + ru.lproj/Localizable.strings \ + ru.lproj/main.nib/keyedobjects.nib \ + sv.lproj/InfoPlist.strings \ + sv.lproj/Localizable.strings \ + sv.lproj/main.nib/keyedobjects.nib \ + zh_CN.lproj/InfoPlist.strings \ + zh_CN.lproj/Localizable.strings \ + zh_CN.lproj/main.nib/keyedobjects.nib \ + zh_TW.lproj/InfoPlist.strings \ + zh_TW.lproj/Localizable.strings \ + zh_TW.lproj/main.nib/keyedobjects.nib diff --git a/hw/xquartz/bundle/bundle-main.c b/hw/xquartz/bundle/bundle-main.c index 54d01368d..e97770a55 100644 --- a/hw/xquartz/bundle/bundle-main.c +++ b/hw/xquartz/bundle/bundle-main.c @@ -45,6 +45,7 @@ static char *command_from_prefs(const char *key, const char *default_value); int main(int argc, char **argv) { Display *display; + const char *s; size_t i; fprintf(stderr, "X11.app: main(): argc=%d\n", argc); @@ -72,7 +73,12 @@ int main(int argc, char **argv) { } /* Start the server */ - fprintf(stderr, "X11.app: Could not connect to server. Starting X server."); + if(s = getenv("DISPLAY")) { + fprintf(stderr, "X11.app: Could not connect to server (DISPLAY=\"%s\", unsetting). Starting X server.\n", s); + unsetenv("DISPLAY"); + } else { + fprintf(stderr, "X11.app: Could not connect to server (DISPLAY is not set). Starting X server.\n"); + } return execute(command_from_prefs("startx_script", DEFAULT_STARTX)); } @@ -93,7 +99,7 @@ static int execute(const char *command) { fprintf(stderr, "\targv[%d] = %s\n", s - newargv, *s); } - execvp (newargv[0], (const char **) newargv); + execvp (newargv[0], (char * const *) newargv); perror ("X11.app: Couldn't exec."); return(1); } diff --git a/hw/xquartz/darwinKeyboard.c b/hw/xquartz/darwinKeyboard.c index b368fe9d9..8d1ee8ec9 100644 --- a/hw/xquartz/darwinKeyboard.c +++ b/hw/xquartz/darwinKeyboard.c @@ -344,13 +344,13 @@ static Bool DarwinReadKeymapFile(NXKeyMapping *keyMap) { fref = fopen( darwinKeymapFile, "rb" ); if (fref == NULL) { - ErrorF("Unable to open keymapping file '%s' (errno %d).\n", - darwinKeymapFile, errno); + ErrorF("Unable to open keymapping file '%s' (%s).\n", + darwinKeymapFile, strerror(errno)); return FALSE; } if (fstat(fileno(fref), &st) == -1) { - ErrorF("Could not stat keymapping file '%s' (errno %d).\n", - darwinKeymapFile, errno); + ErrorF("Could not stat keymapping file '%s' (%s).\n", + darwinKeymapFile, strerror(errno)); return FALSE; } @@ -364,8 +364,8 @@ static Bool DarwinReadKeymapFile(NXKeyMapping *keyMap) { inBuffer = (char*) xalloc( st.st_size ); bufferEnd = (int *) (inBuffer + st.st_size); if (fread(inBuffer, st.st_size, 1, fref) != 1) { - ErrorF("Could not read %qd bytes from keymapping file '%s' (errno %d).\n", - st.st_size, darwinKeymapFile, errno); + ErrorF("Could not read %qd bytes from keymapping file '%s' (%s).\n", + st.st_size, darwinKeymapFile, strerror(errno)); return FALSE; } diff --git a/include/dix-config.h.in b/include/dix-config.h.in index 068b55170..38639d684 100644 --- a/include/dix-config.h.in +++ b/include/dix-config.h.in @@ -436,6 +436,9 @@ #undef XEPHYR_DRI +/* Build DRI2 extension */ +#undef DRI2 + /* Build DBE support */ #undef DBE diff --git a/include/dix.h b/include/dix.h index 1ed4af02e..6cdeb84b8 100644 --- a/include/dix.h +++ b/include/dix.h @@ -119,7 +119,9 @@ typedef struct _Client *ClientPtr; /* also in misc.h */ typedef struct _WorkQueue *WorkQueuePtr; +#ifdef XPRINT extern ClientPtr requestingClient; +#endif extern ClientPtr *clients; extern ClientPtr serverClient; extern int currentMaxClients; @@ -550,25 +552,6 @@ typedef struct _CallbackList *CallbackListPtr; /* also in misc.h */ typedef void (*CallbackProcPtr) ( CallbackListPtr *, pointer, pointer); -typedef Bool (*AddCallbackProcPtr) ( - CallbackListPtr *, CallbackProcPtr, pointer); - -typedef Bool (*DeleteCallbackProcPtr) ( - CallbackListPtr *, CallbackProcPtr, pointer); - -typedef void (*CallCallbacksProcPtr) ( - CallbackListPtr *, pointer); - -typedef void (*DeleteCallbackListProcPtr) ( - CallbackListPtr *); - -typedef struct _CallbackProcs { - AddCallbackProcPtr AddCallback; - DeleteCallbackProcPtr DeleteCallback; - CallCallbacksProcPtr CallCallbacks; - DeleteCallbackListProcPtr DeleteCallbackList; -} CallbackFuncsRec, *CallbackFuncsPtr; - extern Bool AddCallback( CallbackListPtr * /*pcbl*/, CallbackProcPtr /*callback*/, diff --git a/include/dixstruct.h b/include/dixstruct.h index aabcf7901..ae144cf73 100644 --- a/include/dixstruct.h +++ b/include/dixstruct.h @@ -189,7 +189,6 @@ typedef struct _CallbackRec { } CallbackRec, *CallbackPtr; typedef struct _CallbackList { - CallbackFuncsRec funcs; int inCallback; Bool deleted; int numDeleted; diff --git a/include/misc.h b/include/misc.h index e6a5e9eb2..0107a302d 100644 --- a/include/misc.h +++ b/include/misc.h @@ -87,10 +87,8 @@ extern unsigned long serverGeneration; #define MAXSCREENS 16 #endif #define MAXCLIENTS 256 -#define MAXDITS 1 -#define MAXEXTENSIONS 128 +#define MAXEXTENSIONS 128 #define MAXFORMATS 8 -#define MAXVISUALS_PER_SCREEN 50 typedef unsigned long PIXEL; typedef unsigned long ATOM; diff --git a/include/site.h b/include/site.h index 279cf2d70..fec87070b 100644 --- a/include/site.h +++ b/include/site.h @@ -52,7 +52,7 @@ SOFTWARE. * server executable. */ #ifndef VENDOR_STRING -#define VENDOR_STRING "The X.Org Group" +#define VENDOR_STRING "The X.Org Foundation" #endif /* diff --git a/include/windowstr.h b/include/windowstr.h index 01952e27d..406087e17 100644 --- a/include/windowstr.h +++ b/include/windowstr.h @@ -186,9 +186,8 @@ typedef struct _Window { unsigned viewable:1; /* realized && InputOutput */ unsigned dontPropagate:3;/* index into DontPropagateMasks */ unsigned forcedBS:1; /* system-supplied backingStore */ -#ifdef COMPOSITE - unsigned redirectDraw:2; /* rendering is redirected from here */ -#endif + unsigned redirectDraw:2; /* COMPOSITE rendering redirect */ + unsigned forcedBG:1; /* must have an opaque background */ } WindowRec; /* diff --git a/include/xkbfile.h b/include/xkbfile.h new file mode 100644 index 000000000..0a6cb18b9 --- /dev/null +++ b/include/xkbfile.h @@ -0,0 +1,436 @@ +/************************************************************ + Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. + + Permission to use, copy, modify, and distribute this + software and its documentation for any purpose and without + fee is hereby granted, provided that the above copyright + notice appear in all copies and that both that copyright + notice and this permission notice appear in supporting + documentation, and that the name of Silicon Graphics not be + used in advertising or publicity pertaining to distribution + of the software without specific prior written permission. + Silicon Graphics makes no representation about the suitability + of this software for any purpose. It is provided "as is" + without any express or implied warranty. + + SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON + GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL + DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH + THE USE OR PERFORMANCE OF THIS SOFTWARE. + + ********************************************************/ + +#ifndef _XKBFILE_H_ +#define _XKBFILE_H_ 1 + +/***====================================================================***/ + +#define XkbXKMFile 0 +#define XkbCFile 1 +#define XkbXKBFile 2 +#define XkbMessage 3 + +#define XkbMapDefined (1<<0) +#define XkbStateDefined (1<<1) + +typedef void (*XkbFileAddOnFunc)( + FILE * /* file */, + XkbDescPtr /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + int /* fileSection */, + void * /* priv */ +); + +/***====================================================================***/ + +#define _XkbSuccess 0 +#define _XkbErrMissingNames 1 +#define _XkbErrMissingTypes 2 +#define _XkbErrMissingReqTypes 3 +#define _XkbErrMissingSymbols 4 +#define _XkbErrMissingVMods 5 +#define _XkbErrMissingIndicators 6 +#define _XkbErrMissingCompatMap 7 +#define _XkbErrMissingSymInterps 8 +#define _XkbErrMissingGeometry 9 +#define _XkbErrIllegalDoodad 10 +#define _XkbErrIllegalTOCType 11 +#define _XkbErrIllegalContents 12 +#define _XkbErrEmptyFile 13 +#define _XkbErrFileNotFound 14 +#define _XkbErrFileCannotOpen 15 +#define _XkbErrBadValue 16 +#define _XkbErrBadMatch 17 +#define _XkbErrBadTypeName 18 +#define _XkbErrBadTypeWidth 19 +#define _XkbErrBadFileType 20 +#define _XkbErrBadFileVersion 21 +#define _XkbErrBadFileFormat 22 +#define _XkbErrBadAlloc 23 +#define _XkbErrBadLength 24 +#define _XkbErrXReqFailure 25 +#define _XkbErrBadImplementation 26 + +extern char * _XkbErrMessages[]; +extern unsigned _XkbErrCode; +extern char * _XkbErrLocation; +extern unsigned _XkbErrData; + +/***====================================================================***/ + +_XFUNCPROTOBEGIN + +extern char * XkbIndentText( + unsigned /* size */ +); + +extern char * XkbAtomText( + Atom /* atm */, + unsigned /* format */ +); + +extern char * XkbKeysymText( + KeySym /* sym */, + unsigned /* format */ +); + +extern char * XkbStringText( + char * /* str */, + unsigned /* format */ +); + +extern char * XkbKeyNameText( + char * /* name */, + unsigned /* format */ +); + +extern char * +XkbModIndexText( + unsigned /* ndx */, + unsigned /* format */ +); + +extern char * +XkbModMaskText( + unsigned /* mask */, + unsigned /* format */ +); + +extern char * XkbVModIndexText( + XkbDescPtr /* xkb */, + unsigned /* ndx */, + unsigned /* format */ +); + +extern char * XkbVModMaskText( + XkbDescPtr /* xkb */, + unsigned /* modMask */, + unsigned /* mask */, + unsigned /* format */ +); + +extern char * XkbConfigText( + unsigned /* config */, + unsigned /* format */ +); + +extern char * XkbSIMatchText( + unsigned /* type */, + unsigned /* format */ +); + +extern char * XkbIMWhichStateMaskText( + unsigned /* use_which */, + unsigned /* format */ +); + +extern char * XkbAccessXDetailText( + unsigned /* state */, + unsigned /* format */ +); + +extern char * XkbNKNDetailMaskText( + unsigned /* detail */, + unsigned /* format */ +); + +extern char * XkbControlsMaskText( + unsigned /* ctrls */, + unsigned /* format */ +); + +extern char * XkbGeomFPText( + int /* val */, + unsigned /* format */ +); + +extern char * XkbDoodadTypeText( + unsigned /* type */, + unsigned /* format */ +); + +extern char * XkbActionTypeText( + unsigned /* type */, + unsigned /* format */ +); + +extern char * XkbActionText( + XkbDescPtr /* xkb */, + XkbAction * /* action */, + unsigned /* format */ +); + +extern char * XkbBehaviorText( + XkbDescPtr /* xkb */, + XkbBehavior * /* behavior */, + unsigned /* format */ +); + +/***====================================================================***/ + +#define _XkbKSLower (1<<0) +#define _XkbKSUpper (1<<1) + +#define XkbKSIsLower(k) (_XkbKSCheckCase(k)&_XkbKSLower) +#define XkbKSIsUpper(k) (_XkbKSCheckCase(k)&_XkbKSUpper) +#define XkbKSIsKeypad(k) (((k)>=XK_KP_Space)&&((k)<=XK_KP_Equal)) +#define XkbKSIsDeadKey(k) \ + (((k)>=XK_dead_grave)&&((k)<=XK_dead_semivoiced_sound)) + +extern unsigned _XkbKSCheckCase( + KeySym /* sym */ +); + +extern int XkbFindKeycodeByName( + XkbDescPtr /* xkb */, + char * /* name */, + Bool /* use_aliases */ +); + +extern Bool XkbLookupGroupAndLevel( + XkbDescPtr /* xkb */, + int /* key */, + int * /* mods_inout */, + int * /* grp_inout */, + int * /* lvl_rtrn */ +); + +/***====================================================================***/ + +extern Atom XkbInternAtom( + char * /* name */, + Bool /* onlyIfExists */ +); + +extern void XkbInitAtoms(void); + +/***====================================================================***/ + +#ifdef _XKBGEOM_H_ + +#define XkbDW_Unknown 0 +#define XkbDW_Doodad 1 +#define XkbDW_Section 2 +typedef struct _XkbDrawable { + int type; + int priority; + union { + XkbDoodadPtr doodad; + XkbSectionPtr section; + } u; + struct _XkbDrawable * next; +} XkbDrawableRec,*XkbDrawablePtr; + +extern XkbDrawablePtr +XkbGetOrderedDrawables( + XkbGeometryPtr /* geom */, + XkbSectionPtr /* section */ +); + +extern void +XkbFreeOrderedDrawables( + XkbDrawablePtr /* draw */ +); + +#endif + +/***====================================================================***/ + +extern unsigned XkbConvertGetByNameComponents( + Bool /* toXkm */, + unsigned /* orig */ +); + +extern unsigned XkbConvertXkbComponents( + Bool /* toXkm */, + unsigned /* orig */ +); + +extern Bool XkbNameMatchesPattern( + char * /* name */, + char * /* pattern */ +); + +/***====================================================================***/ + +extern Bool XkbWriteXKBKeycodes( + FILE * /* file */, + XkbDescPtr /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +); + +extern Bool XkbWriteXKBKeyTypes( + FILE * /* file */, + XkbDescPtr /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +); + +extern Bool XkbWriteXKBCompatMap( + FILE * /* file */, + XkbDescPtr /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +); + +extern Bool XkbWriteXKBSymbols( + FILE * /* file */, + XkbDescPtr /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +); + +extern Bool XkbWriteXKBGeometry( + FILE * /* file */, + XkbDescPtr /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +); + +extern Bool XkbWriteXKBSemantics( + FILE * /* file */, + XkbDescPtr /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +); + +extern Bool XkbWriteXKBLayout( + FILE * /* file */, + XkbDescPtr /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +); + +extern Bool XkbWriteXKBKeymap( + FILE * /* file */, + XkbDescPtr /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +); + +extern Bool XkbWriteXKBFile( + FILE * /* file */, + XkbDescPtr /* result */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +); + +extern Bool XkbWriteCFile( + FILE * /* file */, + char * /* name */, + XkbDescPtr /* info */ +); + +extern Bool XkbWriteXKMFile( + FILE * /* file */, + XkbDescPtr /* result */ +); + +extern Bool XkbWriteToServer( + XkbDescPtr /* result */ +); + +extern void XkbEnsureSafeMapName( + char * /* name */ +); + +extern Bool XkbWriteXKBKeymapForNames( + FILE * /* file */, + XkbComponentNamesPtr /* names */, + XkbDescPtr /* xkb */, + unsigned /* want */, + unsigned /* need */ +); + +extern Status XkbMergeFile( + XkbDescPtr /* xkb */ +); + +/***====================================================================***/ + +extern Bool XkmProbe( + FILE * /* file */ +); + +extern unsigned XkmReadFile( + FILE * /* file */, + unsigned /* need */, + unsigned /* want */, + XkbDescPtr * /* result */ +); + +#ifdef _XKMFORMAT_H_ + +extern Bool XkmReadTOC( + FILE * /* file */, + xkmFileInfo * /* file_info */, + int /* max_toc */, + xkmSectionInfo * /* toc */ +); + +extern xkmSectionInfo *XkmFindTOCEntry( + xkmFileInfo * /* finfo */, + xkmSectionInfo * /* toc */, + unsigned /* type */ +); + +extern Bool XkmReadFileSection( + FILE * /* file */, + xkmSectionInfo * /* toc */, + XkbDescPtr /* result */, + unsigned * /* loaded_rtrn */ +); + +extern char * XkmReadFileSectionName( + FILE * /* file */, + xkmSectionInfo * /* toc */ +); + +#endif /* _XKMFORMAT_H */ + +_XFUNCPROTOEND + +#endif /* _XKBFILE_H_ */ diff --git a/include/xkbsrv.h b/include/xkbsrv.h index 33415dfc8..bda8ce99e 100644 --- a/include/xkbsrv.h +++ b/include/xkbsrv.h @@ -27,7 +27,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifndef _XKBSRV_H_ #define _XKBSRV_H_ -#ifdef XKB_IN_SERVER #define XkbAllocClientMap SrvXkbAllocClientMap #define XkbAllocServerMap SrvXkbAllocServerMap #define XkbChangeTypesOfKey SrvXkbChangeTypesOfKey @@ -52,10 +51,9 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define XkbVirtualModsToReal SrvXkbVirtualModsToReal #define XkbChangeKeycodeRange SrvXkbChangeKeycodeRange #define XkbApplyVirtualModChanges SrvXkbApplyVirtualModChanges -#endif -#include <X11/extensions/XKBstr.h> #include <X11/extensions/XKBproto.h> +#include "xkbstr.h" #include "inputstr.h" typedef struct _XkbInterest { @@ -126,8 +124,6 @@ typedef struct _XkbEventCause { #define _BEEP_LED_CHANGE 14 #define _BEEP_BOUNCE_REJECT 15 -struct _XkbSrvInfo; /* definition see below */ - typedef struct _XkbFilter { CARD16 keycode; CARD8 what; @@ -310,8 +306,7 @@ extern CARD32 xkbDebugFlags; #define _XkbClearElems(a,f,l,t) bzero(&(a)[f],((l)-(f)+1)*sizeof(t)) #define _XkbFree(p) Xfree(p) -#define _XkbLibError(c,l,d) \ - { _XkbErrCode= (c); _XkbErrLocation= (l); _XkbErrData= (d); } +#define _XkbLibError(c,l,d) /* Epoch fail */ #define _XkbErrCode2(a,b) ((XID)((((unsigned int)(a))<<24)|((b)&0xffffff))) #define _XkbErrCode3(a,b,c) _XkbErrCode2(a,(((unsigned int)(b))<<16)|(c)) #define _XkbErrCode4(a,b,c,d) _XkbErrCode3(a,b,((((unsigned int)(c))<<8)|(d))) @@ -320,13 +315,8 @@ extern int DeviceKeyPress,DeviceKeyRelease,DeviceMotionNotify; extern int DeviceButtonPress,DeviceButtonRelease; extern int DeviceEnterNotify,DeviceLeaveNotify; -#ifdef XINPUT #define _XkbIsPressEvent(t) (((t)==KeyPress)||((t)==DeviceKeyPress)) #define _XkbIsReleaseEvent(t) (((t)==KeyRelease)||((t)==DeviceKeyRelease)) -#else -#define _XkbIsPressEvent(t) ((t)==KeyPress) -#define _XkbIsReleaseEvent(t) ((t)==KeyRelease) -#endif #define _XkbCoreKeycodeInRange(c,k) (((k)>=(c)->curKeySyms.minKeyCode)&&\ ((k)<=(c)->curKeySyms.maxKeyCode)) @@ -338,20 +328,10 @@ extern int DeviceEnterNotify,DeviceLeaveNotify; #define IsKeypadKey(s) XkbKSIsKeypad(s) #define Status int -#define XPointer pointer -#define Display struct _XDisplay #ifndef True -#define True 1 -#define False 0 -#endif - -#ifndef PATH_MAX -#ifdef MAXPATHLEN -#define PATH_MAX MAXPATHLEN -#else -#define PATH_MAX 1024 -#endif +#define True TRUE +#define False FALSE #endif _XFUNCPROTOBEGIN @@ -990,10 +970,8 @@ extern void XkbSendNewKeyboardNotify( xkbNewKeyboardNotify * /* pNKN */ ); -#ifdef XKBSRV_NEED_FILE_FUNCS - +#include "xkbfile.h" #include <X11/extensions/XKMformat.h> -#include <X11/extensions/XKBfile.h> #include <X11/extensions/XKBrules.h> #define _XkbListKeymaps 0 @@ -1027,7 +1005,7 @@ extern unsigned int XkbDDXLoadKeymapByNames( XkbComponentNamesPtr /* names */, unsigned int /* want */, unsigned int /* need */, - XkbFileInfoPtr /* finfoRtrn */, + XkbDescPtr * /* finfoRtrn */, char * /* keymapNameRtrn */, int /* keymapNameRtrnLen */ ); @@ -1040,26 +1018,17 @@ extern Bool XkbDDXNamesFromRules( ); extern Bool XkbDDXApplyConfig( - XPointer /* cfg_in */, + void * /* cfg_in */, XkbSrvInfoPtr /* xkbi */ ); -extern XPointer XkbDDXPreloadConfig( - char ** /* rulesFileRtrn */, - XkbRF_VarDefsPtr /* defs */, - XkbComponentNamesPtr /* names */, - DeviceIntPtr /* dev */ -); - extern int _XkbStrCaseCmp( char * /* str1 */, char * /* str2 */ ); -#endif /* XKBSRV_NEED_FILE_FUNCS */ - _XFUNCPROTOEND -#define XkbAtomGetString(d,s) NameForAtom(s) +#define XkbAtomGetString(s) NameForAtom(s) #endif /* _XKBSRV_H_ */ diff --git a/include/xkbstr.h b/include/xkbstr.h new file mode 100644 index 000000000..214a5543c --- /dev/null +++ b/include/xkbstr.h @@ -0,0 +1,613 @@ +/************************************************************ +Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. + +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, provided that the above copyright +notice appear in all copies and that both that copyright +notice and this permission notice appear in supporting +documentation, and that the name of Silicon Graphics not be +used in advertising or publicity pertaining to distribution +of the software without specific prior written permission. +Silicon Graphics makes no representation about the suitability +of this software for any purpose. It is provided "as is" +without any express or implied warranty. + +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON +GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH +THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifndef _XKBSTR_H_ +#define _XKBSTR_H_ + +#include <X11/extensions/XKB.h> + +#define XkbCharToInt(v) ((v)&0x80?(int)((v)|(~0xff)):(int)((v)&0x7f)) +#define XkbIntTo2Chars(i,h,l) (((h)=((i>>8)&0xff)),((l)=((i)&0xff))) + +#if defined(WORD64) && defined(UNSIGNEDBITFIELDS) +#define Xkb2CharsToInt(h,l) ((h)&0x80?(int)(((h)<<8)|(l)|(~0xffff)):\ + (int)(((h)<<8)|(l)&0x7fff)) +#else +#define Xkb2CharsToInt(h,l) ((short)(((h)<<8)|(l))) +#endif + + /* + * Common data structures and access macros + */ + +typedef struct _XkbStateRec { + unsigned char group; + unsigned char locked_group; + unsigned short base_group; + unsigned short latched_group; + unsigned char mods; + unsigned char base_mods; + unsigned char latched_mods; + unsigned char locked_mods; + unsigned char compat_state; + unsigned char grab_mods; + unsigned char compat_grab_mods; + unsigned char lookup_mods; + unsigned char compat_lookup_mods; + unsigned short ptr_buttons; +} XkbStateRec,*XkbStatePtr; +#define XkbModLocks(s) ((s)->locked_mods) +#define XkbStateMods(s) ((s)->base_mods|(s)->latched_mods|XkbModLocks(s)) +#define XkbGroupLock(s) ((s)->locked_group) +#define XkbStateGroup(s) ((s)->base_group+(s)->latched_group+XkbGroupLock(s)) +#define XkbStateFieldFromRec(s) XkbBuildCoreState((s)->lookup_mods,(s)->group) +#define XkbGrabStateFromRec(s) XkbBuildCoreState((s)->grab_mods,(s)->group) + +typedef struct _XkbMods { + unsigned char mask; /* effective mods */ + unsigned char real_mods; + unsigned short vmods; +} XkbModsRec,*XkbModsPtr; + +typedef struct _XkbKTMapEntry { + Bool active; + unsigned char level; + XkbModsRec mods; +} XkbKTMapEntryRec,*XkbKTMapEntryPtr; + +typedef struct _XkbKeyType { + XkbModsRec mods; + unsigned char num_levels; + unsigned char map_count; + XkbKTMapEntryPtr map; + XkbModsPtr preserve; + Atom name; + Atom * level_names; +} XkbKeyTypeRec, *XkbKeyTypePtr; + +#define XkbNumGroups(g) ((g)&0x0f) +#define XkbOutOfRangeGroupInfo(g) ((g)&0xf0) +#define XkbOutOfRangeGroupAction(g) ((g)&0xc0) +#define XkbOutOfRangeGroupNumber(g) (((g)&0x30)>>4) +#define XkbSetGroupInfo(g,w,n) (((w)&0xc0)|(((n)&3)<<4)|((g)&0x0f)) +#define XkbSetNumGroups(g,n) (((g)&0xf0)|((n)&0x0f)) + + /* + * Structures and access macros used primarily by the server + */ + +typedef struct _XkbBehavior { + unsigned char type; + unsigned char data; +} XkbBehavior; + +#define XkbAnyActionDataSize 7 +typedef struct _XkbAnyAction { + unsigned char type; + unsigned char data[XkbAnyActionDataSize]; +} XkbAnyAction; + +typedef struct _XkbModAction { + unsigned char type; + unsigned char flags; + unsigned char mask; + unsigned char real_mods; + unsigned char vmods1; + unsigned char vmods2; +} XkbModAction; +#define XkbModActionVMods(a) \ + ((short)(((a)->vmods1<<8)|((a)->vmods2))) +#define XkbSetModActionVMods(a,v) \ + (((a)->vmods1=(((v)>>8)&0xff)),(a)->vmods2=((v)&0xff)) + +typedef struct _XkbGroupAction { + unsigned char type; + unsigned char flags; + char group_XXX; +} XkbGroupAction; +#define XkbSAGroup(a) (XkbCharToInt((a)->group_XXX)) +#define XkbSASetGroup(a,g) ((a)->group_XXX=(g)) + +typedef struct _XkbISOAction { + unsigned char type; + unsigned char flags; + unsigned char mask; + unsigned char real_mods; + char group_XXX; + unsigned char affect; + unsigned char vmods1; + unsigned char vmods2; +} XkbISOAction; + +typedef struct _XkbPtrAction { + unsigned char type; + unsigned char flags; + unsigned char high_XXX; + unsigned char low_XXX; + unsigned char high_YYY; + unsigned char low_YYY; +} XkbPtrAction; +#define XkbPtrActionX(a) (Xkb2CharsToInt((a)->high_XXX,(a)->low_XXX)) +#define XkbPtrActionY(a) (Xkb2CharsToInt((a)->high_YYY,(a)->low_YYY)) +#define XkbSetPtrActionX(a,x) (XkbIntTo2Chars(x,(a)->high_XXX,(a)->low_XXX)) +#define XkbSetPtrActionY(a,y) (XkbIntTo2Chars(y,(a)->high_YYY,(a)->low_YYY)) + +typedef struct _XkbPtrBtnAction { + unsigned char type; + unsigned char flags; + unsigned char count; + unsigned char button; +} XkbPtrBtnAction; + +typedef struct _XkbPtrDfltAction { + unsigned char type; + unsigned char flags; + unsigned char affect; + char valueXXX; +} XkbPtrDfltAction; +#define XkbSAPtrDfltValue(a) (XkbCharToInt((a)->valueXXX)) +#define XkbSASetPtrDfltValue(a,c) ((a)->valueXXX= ((c)&0xff)) + +typedef struct _XkbSwitchScreenAction { + unsigned char type; + unsigned char flags; + char screenXXX; +} XkbSwitchScreenAction; +#define XkbSAScreen(a) (XkbCharToInt((a)->screenXXX)) +#define XkbSASetScreen(a,s) ((a)->screenXXX= ((s)&0xff)) + +typedef struct _XkbCtrlsAction { + unsigned char type; + unsigned char flags; + unsigned char ctrls3; + unsigned char ctrls2; + unsigned char ctrls1; + unsigned char ctrls0; +} XkbCtrlsAction; +#define XkbActionSetCtrls(a,c) (((a)->ctrls3=(((c)>>24)&0xff)),\ + ((a)->ctrls2=(((c)>>16)&0xff)),\ + ((a)->ctrls1=(((c)>>8)&0xff)),\ + ((a)->ctrls0=((c)&0xff))) +#define XkbActionCtrls(a) ((((unsigned int)(a)->ctrls3)<<24)|\ + (((unsigned int)(a)->ctrls2)<<16)|\ + (((unsigned int)(a)->ctrls1)<<8)|\ + ((unsigned int)((a)->ctrls0))) + +typedef struct _XkbMessageAction { + unsigned char type; + unsigned char flags; + unsigned char message[6]; +} XkbMessageAction; + +typedef struct _XkbRedirectKeyAction { + unsigned char type; + unsigned char new_key; + unsigned char mods_mask; + unsigned char mods; + unsigned char vmods_mask0; + unsigned char vmods_mask1; + unsigned char vmods0; + unsigned char vmods1; +} XkbRedirectKeyAction; + +#define XkbSARedirectVMods(a) ((((unsigned int)(a)->vmods1)<<8)|\ + ((unsigned int)(a)->vmods0)) +#define XkbSARedirectSetVMods(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),\ + ((a)->vmods_mask0=((m)&0xff))) +#define XkbSARedirectVModsMask(a) ((((unsigned int)(a)->vmods_mask1)<<8)|\ + ((unsigned int)(a)->vmods_mask0)) +#define XkbSARedirectSetVModsMask(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),\ + ((a)->vmods_mask0=((m)&0xff))) + +typedef struct _XkbDeviceBtnAction { + unsigned char type; + unsigned char flags; + unsigned char count; + unsigned char button; + unsigned char device; +} XkbDeviceBtnAction; + +typedef struct _XkbDeviceValuatorAction { + unsigned char type; + unsigned char device; + unsigned char v1_what; + unsigned char v1_ndx; + unsigned char v1_value; + unsigned char v2_what; + unsigned char v2_ndx; + unsigned char v2_value; +} XkbDeviceValuatorAction; + +typedef union _XkbAction { + XkbAnyAction any; + XkbModAction mods; + XkbGroupAction group; + XkbISOAction iso; + XkbPtrAction ptr; + XkbPtrBtnAction btn; + XkbPtrDfltAction dflt; + XkbSwitchScreenAction screen; + XkbCtrlsAction ctrls; + XkbMessageAction msg; + XkbRedirectKeyAction redirect; + XkbDeviceBtnAction devbtn; + XkbDeviceValuatorAction devval; + unsigned char type; +} XkbAction; + +typedef struct _XkbControls { + unsigned char mk_dflt_btn; + unsigned char num_groups; + unsigned char groups_wrap; + XkbModsRec internal; + XkbModsRec ignore_lock; + unsigned int enabled_ctrls; + unsigned short repeat_delay; + unsigned short repeat_interval; + unsigned short slow_keys_delay; + unsigned short debounce_delay; + unsigned short mk_delay; + unsigned short mk_interval; + unsigned short mk_time_to_max; + unsigned short mk_max_speed; + short mk_curve; + unsigned short ax_options; + unsigned short ax_timeout; + unsigned short axt_opts_mask; + unsigned short axt_opts_values; + unsigned int axt_ctrls_mask; + unsigned int axt_ctrls_values; + unsigned char per_key_repeat[XkbPerKeyBitArraySize]; +} XkbControlsRec, *XkbControlsPtr; + +#define XkbAX_AnyFeedback(c) ((c)->enabled_ctrls&XkbAccessXFeedbackMask) +#define XkbAX_NeedOption(c,w) ((c)->ax_options&(w)) +#define XkbAX_NeedFeedback(c,w) (XkbAX_AnyFeedback(c)&&XkbAX_NeedOption(c,w)) + +typedef struct _XkbServerMapRec { + unsigned short num_acts; + unsigned short size_acts; + XkbAction *acts; + + XkbBehavior *behaviors; + unsigned short *key_acts; +#if defined(__cplusplus) || defined(c_plusplus) + /* explicit is a C++ reserved word */ + unsigned char *c_explicit; +#else + unsigned char *explicit; +#endif + unsigned char vmods[XkbNumVirtualMods]; + unsigned short *vmodmap; +} XkbServerMapRec, *XkbServerMapPtr; + +#define XkbSMKeyActionsPtr(m,k) (&(m)->acts[(m)->key_acts[k]]) + + /* + * Structures and access macros used primarily by clients + */ + +typedef struct _XkbSymMapRec { + unsigned char kt_index[XkbNumKbdGroups]; + unsigned char group_info; + unsigned char width; + unsigned short offset; +} XkbSymMapRec, *XkbSymMapPtr; + +typedef struct _XkbClientMapRec { + unsigned char size_types; + unsigned char num_types; + XkbKeyTypePtr types; + + unsigned short size_syms; + unsigned short num_syms; + KeySym *syms; + XkbSymMapPtr key_sym_map; + + unsigned char *modmap; +} XkbClientMapRec, *XkbClientMapPtr; + +#define XkbCMKeyGroupInfo(m,k) ((m)->key_sym_map[k].group_info) +#define XkbCMKeyNumGroups(m,k) (XkbNumGroups((m)->key_sym_map[k].group_info)) +#define XkbCMKeyGroupWidth(m,k,g) (XkbCMKeyType(m,k,g)->num_levels) +#define XkbCMKeyGroupsWidth(m,k) ((m)->key_sym_map[k].width) +#define XkbCMKeyTypeIndex(m,k,g) ((m)->key_sym_map[k].kt_index[g&0x3]) +#define XkbCMKeyType(m,k,g) (&(m)->types[XkbCMKeyTypeIndex(m,k,g)]) +#define XkbCMKeyNumSyms(m,k) (XkbCMKeyGroupsWidth(m,k)*XkbCMKeyNumGroups(m,k)) +#define XkbCMKeySymsOffset(m,k) ((m)->key_sym_map[k].offset) +#define XkbCMKeySymsPtr(m,k) (&(m)->syms[XkbCMKeySymsOffset(m,k)]) + + /* + * Compatibility structures and access macros + */ + +typedef struct _XkbSymInterpretRec { + KeySym sym; + unsigned char flags; + unsigned char match; + unsigned char mods; + unsigned char virtual_mod; + XkbAnyAction act; +} XkbSymInterpretRec,*XkbSymInterpretPtr; + +typedef struct _XkbCompatMapRec { + XkbSymInterpretPtr sym_interpret; + XkbModsRec groups[XkbNumKbdGroups]; + unsigned short num_si; + unsigned short size_si; +} XkbCompatMapRec, *XkbCompatMapPtr; + +typedef struct _XkbIndicatorMapRec { + unsigned char flags; + unsigned char which_groups; + unsigned char groups; + unsigned char which_mods; + XkbModsRec mods; + unsigned int ctrls; +} XkbIndicatorMapRec, *XkbIndicatorMapPtr; + +#define XkbIM_IsAuto(i) ((((i)->flags&XkbIM_NoAutomatic)==0)&&\ + (((i)->which_groups&&(i)->groups)||\ + ((i)->which_mods&&(i)->mods.mask)||\ + ((i)->ctrls))) +#define XkbIM_InUse(i) (((i)->flags)||((i)->which_groups)||\ + ((i)->which_mods)||((i)->ctrls)) + + +typedef struct _XkbIndicatorRec { + unsigned long phys_indicators; + XkbIndicatorMapRec maps[XkbNumIndicators]; +} XkbIndicatorRec,*XkbIndicatorPtr; + +typedef struct _XkbKeyNameRec { + char name[XkbKeyNameLength]; +} XkbKeyNameRec,*XkbKeyNamePtr; + +typedef struct _XkbKeyAliasRec { + char real[XkbKeyNameLength]; + char alias[XkbKeyNameLength]; +} XkbKeyAliasRec,*XkbKeyAliasPtr; + + /* + * Names for everything + */ +typedef struct _XkbNamesRec { + Atom keycodes; + Atom geometry; + Atom symbols; + Atom types; + Atom compat; + Atom vmods[XkbNumVirtualMods]; + Atom indicators[XkbNumIndicators]; + Atom groups[XkbNumKbdGroups]; + XkbKeyNamePtr keys; + XkbKeyAliasPtr key_aliases; + Atom *radio_groups; + Atom phys_symbols; + + unsigned char num_keys; + unsigned char num_key_aliases; + unsigned short num_rg; +} XkbNamesRec,*XkbNamesPtr; + +typedef struct _XkbGeometry *XkbGeometryPtr; + /* + * Tie it all together into one big keyboard description + */ +typedef struct _XkbDesc { + unsigned int defined; + unsigned short flags; + unsigned short device_spec; + KeyCode min_key_code; + KeyCode max_key_code; + + XkbControlsPtr ctrls; + XkbServerMapPtr server; + XkbClientMapPtr map; + XkbIndicatorPtr indicators; + XkbNamesPtr names; + XkbCompatMapPtr compat; + XkbGeometryPtr geom; +} XkbDescRec, *XkbDescPtr; +#define XkbKeyKeyTypeIndex(d,k,g) (XkbCMKeyTypeIndex((d)->map,k,g)) +#define XkbKeyKeyType(d,k,g) (XkbCMKeyType((d)->map,k,g)) +#define XkbKeyGroupWidth(d,k,g) (XkbCMKeyGroupWidth((d)->map,k,g)) +#define XkbKeyGroupsWidth(d,k) (XkbCMKeyGroupsWidth((d)->map,k)) +#define XkbKeyGroupInfo(d,k) (XkbCMKeyGroupInfo((d)->map,(k))) +#define XkbKeyNumGroups(d,k) (XkbCMKeyNumGroups((d)->map,(k))) +#define XkbKeyNumSyms(d,k) (XkbCMKeyNumSyms((d)->map,(k))) +#define XkbKeySymsPtr(d,k) (XkbCMKeySymsPtr((d)->map,(k))) +#define XkbKeySym(d,k,n) (XkbKeySymsPtr(d,k)[n]) +#define XkbKeySymEntry(d,k,sl,g) \ + (XkbKeySym(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl)))) +#define XkbKeyAction(d,k,n) \ + (XkbKeyHasActions(d,k)?&XkbKeyActionsPtr(d,k)[n]:NULL) +#define XkbKeyActionEntry(d,k,sl,g) \ + (XkbKeyHasActions(d,k)?\ + XkbKeyAction(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl))):NULL) + +#define XkbKeyHasActions(d,k) ((d)->server->key_acts[k]!=0) +#define XkbKeyNumActions(d,k) (XkbKeyHasActions(d,k)?XkbKeyNumSyms(d,k):1) +#define XkbKeyActionsPtr(d,k) (XkbSMKeyActionsPtr((d)->server,k)) +#define XkbKeycodeInRange(d,k) (((k)>=(d)->min_key_code)&&\ + ((k)<=(d)->max_key_code)) +#define XkbNumKeys(d) ((d)->max_key_code-(d)->min_key_code+1) + + + /* + * The following structures can be used to track changes + * to a keyboard device + */ +typedef struct _XkbMapChanges { + unsigned short changed; + KeyCode min_key_code; + KeyCode max_key_code; + unsigned char first_type; + unsigned char num_types; + KeyCode first_key_sym; + unsigned char num_key_syms; + KeyCode first_key_act; + unsigned char num_key_acts; + KeyCode first_key_behavior; + unsigned char num_key_behaviors; + KeyCode first_key_explicit; + unsigned char num_key_explicit; + KeyCode first_modmap_key; + unsigned char num_modmap_keys; + KeyCode first_vmodmap_key; + unsigned char num_vmodmap_keys; + unsigned char pad; + unsigned short vmods; +} XkbMapChangesRec,*XkbMapChangesPtr; + +typedef struct _XkbControlsChanges { + unsigned int changed_ctrls; + unsigned int enabled_ctrls_changes; + Bool num_groups_changed; +} XkbControlsChangesRec,*XkbControlsChangesPtr; + +typedef struct _XkbIndicatorChanges { + unsigned int state_changes; + unsigned int map_changes; +} XkbIndicatorChangesRec,*XkbIndicatorChangesPtr; + +typedef struct _XkbNameChanges { + unsigned int changed; + unsigned char first_type; + unsigned char num_types; + unsigned char first_lvl; + unsigned char num_lvls; + unsigned char num_aliases; + unsigned char num_rg; + unsigned char first_key; + unsigned char num_keys; + unsigned short changed_vmods; + unsigned long changed_indicators; + unsigned char changed_groups; +} XkbNameChangesRec,*XkbNameChangesPtr; + +typedef struct _XkbCompatChanges { + unsigned char changed_groups; + unsigned short first_si; + unsigned short num_si; +} XkbCompatChangesRec,*XkbCompatChangesPtr; + +typedef struct _XkbChanges { + unsigned short device_spec; + unsigned short state_changes; + XkbMapChangesRec map; + XkbControlsChangesRec ctrls; + XkbIndicatorChangesRec indicators; + XkbNameChangesRec names; + XkbCompatChangesRec compat; +} XkbChangesRec, *XkbChangesPtr; + + /* + * These data structures are used to construct a keymap from + * a set of components or to list components in the server + * database. + */ +typedef struct _XkbComponentNames { + char * keymap; + char * keycodes; + char * types; + char * compat; + char * symbols; + char * geometry; +} XkbComponentNamesRec, *XkbComponentNamesPtr; + +typedef struct _XkbComponentName { + unsigned short flags; + char * name; +} XkbComponentNameRec,*XkbComponentNamePtr; + +typedef struct _XkbComponentList { + int num_keymaps; + int num_keycodes; + int num_types; + int num_compat; + int num_symbols; + int num_geometry; + XkbComponentNamePtr keymaps; + XkbComponentNamePtr keycodes; + XkbComponentNamePtr types; + XkbComponentNamePtr compat; + XkbComponentNamePtr symbols; + XkbComponentNamePtr geometry; +} XkbComponentListRec, *XkbComponentListPtr; + + /* + * The following data structures describe and track changes to a + * non-keyboard extension device + */ +typedef struct _XkbDeviceLedInfo { + unsigned short led_class; + unsigned short led_id; + unsigned int phys_indicators; + unsigned int maps_present; + unsigned int names_present; + unsigned int state; + Atom names[XkbNumIndicators]; + XkbIndicatorMapRec maps[XkbNumIndicators]; +} XkbDeviceLedInfoRec,*XkbDeviceLedInfoPtr; + +typedef struct _XkbDeviceInfo { + char * name; + Atom type; + unsigned short device_spec; + Bool has_own_state; + unsigned short supported; + unsigned short unsupported; + + unsigned short num_btns; + XkbAction * btn_acts; + + unsigned short sz_leds; + unsigned short num_leds; + unsigned short dflt_kbd_fb; + unsigned short dflt_led_fb; + XkbDeviceLedInfoPtr leds; +} XkbDeviceInfoRec,*XkbDeviceInfoPtr; + +#define XkbXI_DevHasBtnActs(d) (((d)->num_btns>0)&&((d)->btn_acts!=NULL)) +#define XkbXI_LegalDevBtn(d,b) (XkbXI_DevHasBtnActs(d)&&((b)<(d)->num_btns)) +#define XkbXI_DevHasLeds(d) (((d)->num_leds>0)&&((d)->leds!=NULL)) + +typedef struct _XkbDeviceLedChanges { + unsigned short led_class; + unsigned short led_id; + unsigned int defined; /* names or maps changed */ + struct _XkbDeviceLedChanges *next; +} XkbDeviceLedChangesRec,*XkbDeviceLedChangesPtr; + +typedef struct _XkbDeviceChanges { + unsigned int changed; + unsigned short first_btn; + unsigned short num_btns; + XkbDeviceLedChangesRec leds; +} XkbDeviceChangesRec,*XkbDeviceChangesPtr; + +#endif /* _XKBSTR_H_ */ diff --git a/include/xorg-config.h.in b/include/xorg-config.h.in index b91ea9260..0603eab67 100644 --- a/include/xorg-config.h.in +++ b/include/xorg-config.h.in @@ -54,6 +54,9 @@ /* Building DRI-capable DDX. */ #undef XF86DRI +/* Build DRI2 extension */ +#undef DRI2 + /* Solaris 8 or later? */ #undef __SOL8__ diff --git a/include/xorg-server.h.in b/include/xorg-server.h.in index dc6f1b31f..1d41b4ce6 100644 --- a/include/xorg-server.h.in +++ b/include/xorg-server.h.in @@ -142,6 +142,9 @@ /* Build DRI extension */ #undef XF86DRI +/* Build DRI2 extension */ +#undef DRI2 + /* Build Xorg server */ #undef XORGSERVER diff --git a/mi/miinitext.c b/mi/miinitext.c index 0c1b8da72..b2113fee3 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -745,16 +745,6 @@ InitExtensions(argc, argv) /* Sort the extensions according the init dependencies. */ LoaderSortExtensions(); listInitialised = TRUE; - } else { - /* Call the setup functions on subsequent server resets as well */ - for (i = 0; ExtensionModuleList[i].name != NULL; i++) { - ext = &ExtensionModuleList[i]; - if (ext->setupFunc != NULL && - (ext->disablePtr == NULL || - (ext->disablePtr != NULL && !*ext->disablePtr))) { - (ext->setupFunc)(); - } - } } for (i = 0; ExtensionModuleList[i].name != NULL; i++) { diff --git a/mi/mipointer.c b/mi/mipointer.c index 5706ef406..42d38c084 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -348,7 +348,7 @@ miPointerWarpCursor (pDev, pScreen, x, y) { miPointerPtr pPointer; BOOL changedScreen = FALSE; - + if (!pDev->isMaster && !pDev->u.master) return; pPointer = MIPOINTER(pDev); @@ -379,6 +379,7 @@ miPointerWarpCursor (pDev, pScreen, x, y) pPointer->y = y; pPointer->pScreen = pScreen; } + if (changedScreen) UpdateSpriteForScreen (pDev, pScreen) ; } diff --git a/os/WaitFor.c b/os/WaitFor.c index c58f24888..36e01ca38 100644 --- a/os/WaitFor.c +++ b/os/WaitFor.c @@ -254,13 +254,13 @@ WaitForSomething(int *pClientsReady) } else if (selecterr == EINVAL) { - FatalError("WaitForSomething(): select: errno=%d\n", - selecterr); + FatalError("WaitForSomething(): select: %s\n", + strerror(selecterr)); } else if (selecterr != EINTR && selecterr != EAGAIN) { - ErrorF("WaitForSomething(): select: errno=%d\n", - selecterr); + ErrorF("WaitForSomething(): select: %s\n", + strerror(selecterr)); } } #ifdef SMART_SCHEDULE diff --git a/os/utils.c b/os/utils.c index 0cb583157..3f4355f46 100644 --- a/os/utils.c +++ b/os/utils.c @@ -2004,18 +2004,6 @@ enum BadCode { #define BUGADDRESS "xorg@freedesktop.org" #endif -#define ARGMSG \ - "\nIf the arguments used are valid, and have been rejected incorrectly\n" \ - "please send details of the arguments and why they are valid to\n" \ - "%s. In the meantime, you can start the Xserver as\n" \ - "the \"super user\" (root).\n" - -#define ENVMSG \ - "\nIf the environment is valid, and have been rejected incorrectly\n" \ - "please send details of the environment and why it is valid to\n" \ - "%s. In the meantime, you can start the Xserver as\n" \ - "the \"super user\" (root).\n" - void CheckUserParameters(int argc, char **argv, char **envp) { @@ -2062,10 +2050,6 @@ CheckUserParameters(int argc, char **argv, char **envp) /* Check for bad environment variables and values */ #if REMOVE_ENV_LD while (envp[i] && (strncmp(envp[i], "LD", 2) == 0)) { -#ifdef ENVDEBUG - ErrorF("CheckUserParameters: removing %s from the " - "environment\n", strtok(envp[i], "=")); -#endif for (j = i; envp[j]; j++) { envp[j] = envp[j+1]; } @@ -2073,10 +2057,6 @@ CheckUserParameters(int argc, char **argv, char **envp) #endif if (envp[i] && (strlen(envp[i]) > MAX_ENV_LENGTH)) { #if REMOVE_LONG_ENV -#ifdef ENVDEBUG - ErrorF("CheckUserParameters: removing %s from the " - "environment\n", strtok(envp[i], "=")); -#endif for (j = i; envp[j]; j++) { envp[j] = envp[j+1]; } @@ -2129,20 +2109,16 @@ CheckUserParameters(int argc, char **argv, char **envp) return; case UnsafeArg: ErrorF("Command line argument number %d is unsafe\n", i); - ErrorF(ARGMSG, BUGADDRESS); break; case ArgTooLong: ErrorF("Command line argument number %d is too long\n", i); - ErrorF(ARGMSG, BUGADDRESS); break; case UnprintableArg: ErrorF("Command line argument number %d contains unprintable" " characters\n", i); - ErrorF(ARGMSG, BUGADDRESS); break; case EnvTooLong: ErrorF("Environment variable `%s' is too long\n", e); - ErrorF(ENVMSG, BUGADDRESS); break; case OutputIsPipe: ErrorF("Stdout and/or stderr is a pipe\n"); @@ -2152,8 +2128,6 @@ CheckUserParameters(int argc, char **argv, char **envp) break; default: ErrorF("Unknown error\n"); - ErrorF(ARGMSG, BUGADDRESS); - ErrorF(ENVMSG, BUGADDRESS); break; } FatalError("X server aborted because of unsafe environment\n"); diff --git a/xfixes/cursor.c b/xfixes/cursor.c index fd75df7b9..0834d8820 100755 --- a/xfixes/cursor.c +++ b/xfixes/cursor.c @@ -708,7 +708,8 @@ SProcXFixesChangeCursor (ClientPtr client) static Bool TestForCursorName (CursorPtr pCursor, pointer closure) { - return (pCursor->name == (Atom) closure); + Atom *pName = closure; + return (pCursor->name == *pName); } int @@ -725,7 +726,7 @@ ProcXFixesChangeCursorByName (ClientPtr client) tchar = (char *) &stuff[1]; name = MakeAtom (tchar, stuff->nbytes, FALSE); if (name) - ReplaceCursor (pSource, TestForCursorName, (pointer) name); + ReplaceCursor (pSource, TestForCursorName, &name); return (client->noClientException); } diff --git a/xfixes/saveset.c b/xfixes/saveset.c index e6e297638..31664ab65 100755 --- a/xfixes/saveset.c +++ b/xfixes/saveset.c @@ -72,5 +72,5 @@ SProcXFixesChangeSaveSet(ClientPtr client) swaps(&stuff->length, n); swapl(&stuff->window, n); - return ProcXFixesChangeSaveSet(client); + return (*ProcXFixesVector[stuff->xfixesReqType])(client); } diff --git a/xfixes/select.c b/xfixes/select.c index 415257ec1..12a165fd0 100755 --- a/xfixes/select.c +++ b/xfixes/select.c @@ -224,7 +224,7 @@ SProcXFixesSelectSelectionInput (ClientPtr client) swapl(&stuff->window, n); swapl(&stuff->selection, n); swapl(&stuff->eventMask, n); - return ProcXFixesSelectSelectionInput(client); + return (*ProcXFixesVector[stuff->xfixesReqType])(client); } void diff --git a/xkb/Makefile.am b/xkb/Makefile.am index 78cdf7196..e750d6098 100644 --- a/xkb/Makefile.am +++ b/xkb/Makefile.am @@ -32,7 +32,6 @@ XKBFILE_SRCS = \ xkmread.c \ xkbtext.c \ xkbfmisc.c \ - xkberrs.c \ xkbout.c X11_SRCS = \ diff --git a/xkb/XKBAlloc.c b/xkb/XKBAlloc.c index f0a1f890e..790aede92 100644 --- a/xkb/XKBAlloc.c +++ b/xkb/XKBAlloc.c @@ -36,7 +36,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "misc.h" #include "inputstr.h" #include <xkbsrv.h> -#include <X11/extensions/XKBgeom.h> +#include "xkbgeom.h" /***===================================================================***/ diff --git a/xkb/XKBGAlloc.c b/xkb/XKBGAlloc.c index 815cc95f5..c37f49a55 100644 --- a/xkb/XKBGAlloc.c +++ b/xkb/XKBGAlloc.c @@ -37,13 +37,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "misc.h" #include "inputstr.h" #include <xkbsrv.h> -#include <X11/extensions/XKBgeom.h> - -#ifdef X_NOT_POSIX -#define Size_t unsigned int -#else -#define Size_t size_t -#endif +#include "xkbgeom.h" /***====================================================================***/ @@ -461,11 +455,11 @@ XkbFreeGeometry(XkbGeometryPtr geom,unsigned which,Bool freeMap) /***====================================================================***/ static Status -_XkbGeomAlloc( XPointer * old, +_XkbGeomAlloc( void ** old, unsigned short * num, unsigned short * total, int num_new, - Size_t sz_elem) + size_t sz_elem) { if (num_new<1) return Success; @@ -477,8 +471,8 @@ _XkbGeomAlloc( XPointer * old, *total= (*num)+num_new; if ((*old)!=NULL) - (*old)= (XPointer)_XkbRealloc((*old),(*total)*sz_elem); - else (*old)= (XPointer)_XkbCalloc((*total),sz_elem); + (*old)= _XkbRealloc((*old),(*total)*sz_elem); + else (*old)= _XkbCalloc((*total),sz_elem); if ((*old)==NULL) { *total= *num= 0; return BadAlloc; @@ -491,44 +485,44 @@ _XkbGeomAlloc( XPointer * old, return Success; } -#define _XkbAllocProps(g,n) _XkbGeomAlloc((XPointer *)&(g)->properties,\ +#define _XkbAllocProps(g,n) _XkbGeomAlloc((void *)&(g)->properties,\ &(g)->num_properties,&(g)->sz_properties,\ (n),sizeof(XkbPropertyRec)) -#define _XkbAllocColors(g,n) _XkbGeomAlloc((XPointer *)&(g)->colors,\ +#define _XkbAllocColors(g,n) _XkbGeomAlloc((void *)&(g)->colors,\ &(g)->num_colors,&(g)->sz_colors,\ (n),sizeof(XkbColorRec)) -#define _XkbAllocShapes(g,n) _XkbGeomAlloc((XPointer *)&(g)->shapes,\ +#define _XkbAllocShapes(g,n) _XkbGeomAlloc((void *)&(g)->shapes,\ &(g)->num_shapes,&(g)->sz_shapes,\ (n),sizeof(XkbShapeRec)) -#define _XkbAllocSections(g,n) _XkbGeomAlloc((XPointer *)&(g)->sections,\ +#define _XkbAllocSections(g,n) _XkbGeomAlloc((void *)&(g)->sections,\ &(g)->num_sections,&(g)->sz_sections,\ (n),sizeof(XkbSectionRec)) -#define _XkbAllocDoodads(g,n) _XkbGeomAlloc((XPointer *)&(g)->doodads,\ +#define _XkbAllocDoodads(g,n) _XkbGeomAlloc((void *)&(g)->doodads,\ &(g)->num_doodads,&(g)->sz_doodads,\ (n),sizeof(XkbDoodadRec)) -#define _XkbAllocKeyAliases(g,n) _XkbGeomAlloc((XPointer *)&(g)->key_aliases,\ +#define _XkbAllocKeyAliases(g,n) _XkbGeomAlloc((void *)&(g)->key_aliases,\ &(g)->num_key_aliases,&(g)->sz_key_aliases,\ (n),sizeof(XkbKeyAliasRec)) -#define _XkbAllocOutlines(s,n) _XkbGeomAlloc((XPointer *)&(s)->outlines,\ +#define _XkbAllocOutlines(s,n) _XkbGeomAlloc((void *)&(s)->outlines,\ &(s)->num_outlines,&(s)->sz_outlines,\ (n),sizeof(XkbOutlineRec)) -#define _XkbAllocRows(s,n) _XkbGeomAlloc((XPointer *)&(s)->rows,\ +#define _XkbAllocRows(s,n) _XkbGeomAlloc((void *)&(s)->rows,\ &(s)->num_rows,&(s)->sz_rows,\ (n),sizeof(XkbRowRec)) -#define _XkbAllocPoints(o,n) _XkbGeomAlloc((XPointer *)&(o)->points,\ +#define _XkbAllocPoints(o,n) _XkbGeomAlloc((void *)&(o)->points,\ &(o)->num_points,&(o)->sz_points,\ (n),sizeof(XkbPointRec)) -#define _XkbAllocKeys(r,n) _XkbGeomAlloc((XPointer *)&(r)->keys,\ +#define _XkbAllocKeys(r,n) _XkbGeomAlloc((void *)&(r)->keys,\ &(r)->num_keys,&(r)->sz_keys,\ (n),sizeof(XkbKeyRec)) -#define _XkbAllocOverlays(s,n) _XkbGeomAlloc((XPointer *)&(s)->overlays,\ +#define _XkbAllocOverlays(s,n) _XkbGeomAlloc((void *)&(s)->overlays,\ &(s)->num_overlays,&(s)->sz_overlays,\ (n),sizeof(XkbOverlayRec)) -#define _XkbAllocOverlayRows(o,n) _XkbGeomAlloc((XPointer *)&(o)->rows,\ +#define _XkbAllocOverlayRows(o,n) _XkbGeomAlloc((void *)&(o)->rows,\ &(o)->num_rows,&(o)->sz_rows,\ (n),sizeof(XkbOverlayRowRec)) -#define _XkbAllocOverlayKeys(r,n) _XkbGeomAlloc((XPointer *)&(r)->keys,\ +#define _XkbAllocOverlayKeys(r,n) _XkbGeomAlloc((void *)&(r)->keys,\ &(r)->num_keys,&(r)->sz_keys,\ (n),sizeof(XkbOverlayKeyRec)) diff --git a/xkb/XKBMAlloc.c b/xkb/XKBMAlloc.c index 9feaf8e93..178b5b89a 100644 --- a/xkb/XKBMAlloc.c +++ b/xkb/XKBMAlloc.c @@ -55,10 +55,8 @@ XkbClientMapPtr map; ((!XkbIsLegalKeycode(xkb->min_key_code))|| (!XkbIsLegalKeycode(xkb->max_key_code))|| (xkb->max_key_code<xkb->min_key_code))) { -#ifdef DEBUG -fprintf(stderr,"bad keycode (%d,%d) in XkbAllocClientMap\n", + DebugF("bad keycode (%d,%d) in XkbAllocClientMap\n", xkb->min_key_code,xkb->max_key_code); -#endif return BadValue; } diff --git a/xkb/XKBMisc.c b/xkb/XKBMisc.c index 0404108a2..85415a4c9 100644 --- a/xkb/XKBMisc.c +++ b/xkb/XKBMisc.c @@ -416,10 +416,7 @@ unsigned changed,tmp; if (((explicit&XkbExplicitAutoRepeatMask)==0)&&(xkb->ctrls)) { CARD8 old; old= xkb->ctrls->per_key_repeat[key/8]; -#ifdef RETURN_SHOULD_REPEAT - if (*XkbKeySymsPtr(xkb,key) != XK_Return) -#endif - xkb->ctrls->per_key_repeat[key/8]|= (1<<(key%8)); + xkb->ctrls->per_key_repeat[key/8]|= (1<<(key%8)); if (changes && (old!=xkb->ctrls->per_key_repeat[key/8])) changes->ctrls.changed_ctrls|= XkbPerKeyRepeatMask; } diff --git a/xkb/ddxBeep.c b/xkb/ddxBeep.c index 2fab4ed78..74d868c0e 100644 --- a/xkb/ddxBeep.c +++ b/xkb/ddxBeep.c @@ -139,10 +139,6 @@ Atom name; next= 0; pitch= oldPitch= ctrl->bell_pitch; duration= oldDuration= ctrl->bell_duration; -#ifdef DEBUG - if (xkbDebugFlags>1) - ErrorF("[xkb] beep: %d (count= %d)\n",xkbInfo->beepType,xkbInfo->beepCount); -#endif name= None; switch (xkbInfo->beepType) { default: diff --git a/xkb/ddxCtrls.c b/xkb/ddxCtrls.c index 73a5e03ac..34ea0bd3f 100644 --- a/xkb/ddxCtrls.c +++ b/xkb/ddxCtrls.c @@ -47,12 +47,6 @@ int realRepeat; realRepeat= ctrl->autoRepeat; if ((dev->kbdfeed)&&(XkbDDXUsesSoftRepeat(dev))) ctrl->autoRepeat= 0; -#ifdef DEBUG -if (xkbDebugFlags&0x4) { - ErrorF("[xkb] XkbDDXKeybdCtrlProc: setting repeat to %d (real repeat is %d)\n", - ctrl->autoRepeat,realRepeat); -} -#endif if (dev->key && dev->key->xkbInfo && dev->key->xkbInfo->kbdProc) (*dev->key->xkbInfo->kbdProc)(dev,ctrl); ctrl->autoRepeat= realRepeat; @@ -93,23 +87,6 @@ unsigned changed, i; unsigned char *rep_old, *rep_new, *rep_fb; changed= new->enabled_ctrls^old->enabled_ctrls; -#ifdef NOTDEF - if (changed&XkbRepeatKeysMask) { - if (dev->kbdfeed) { - int realRepeat; - - if (new->enabled_ctrls&XkbRepeatKeysMask) - dev->kbdfeed->ctrl.autoRepeat= realRepeat= 1; - else dev->kbdfeed->ctrl.autoRepeat= realRepeat= 0; - - if (XkbDDXUsesSoftRepeat(dev)) - dev->kbdfeed->ctrl.autoRepeat= FALSE; - if (dev->kbdfeed->CtrlProc) - (*dev->kbdfeed->CtrlProc)(dev,&dev->kbdfeed->ctrl); - dev->kbdfeed->ctrl.autoRepeat= realRepeat; - } - } -#endif for (rep_old = old->per_key_repeat, rep_new = new->per_key_repeat, rep_fb = dev->kbdfeed->ctrl.autoRepeats, diff --git a/xkb/ddxKeyClick.c b/xkb/ddxKeyClick.c index 10f3f38c0..51d78f56d 100644 --- a/xkb/ddxKeyClick.c +++ b/xkb/ddxKeyClick.c @@ -42,9 +42,5 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. void XkbDDXKeyClick(DeviceIntPtr pXDev,int keycode,int synthetic) { -#ifdef DEBUG - if (xkbDebugFlags) - ErrorF("[xkb] Click.\n"); -#endif return; } diff --git a/xkb/ddxList.c b/xkb/ddxList.c index 2baf65248..ae3a7f7e0 100644 --- a/xkb/ddxList.c +++ b/xkb/ddxList.c @@ -43,14 +43,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include <xkbsrv.h> #include <X11/extensions/XI.h> -#ifndef PATH_MAX -#ifdef MAXPATHLEN -#define PATH_MAX MAXPATHLEN -#else -#define PATH_MAX 1024 -#endif -#endif - #ifdef WIN32 /* from ddxLoad.c */ extern const char* Win32TempDir(); @@ -199,9 +191,8 @@ char tmpname[PATH_MAX]; #ifndef WIN32 in= Popen(buf,"r"); #else -#ifdef DEBUG_CMD - ErrorF("[xkb] xkb executes: %s\n",buf); -#endif + if (xkbDebugFlags) + DebugF("[xkb] xkbList executes: %s\n",buf); if (System(buf) < 0) ErrorF("[xkb] Could not invoke keymap compiler\n"); else diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c index a0fa6061e..ee64c3be7 100644 --- a/xkb/ddxLoad.c +++ b/xkb/ddxLoad.c @@ -52,14 +52,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include <paths.h> #endif -#ifndef PATH_MAX -#ifdef MAXPATHLEN -#define PATH_MAX MAXPATHLEN -#else -#define PATH_MAX 1024 -#endif -#endif - /* * If XKM_OUTPUT_DIR specifies a path without a leading slash, it is * relative to the top-level XKB configuration directory. @@ -161,44 +153,19 @@ Win32System(const char *cmdline) #define System(x) Win32System(x) #endif -#ifdef MAKE_XKM_OUTPUT_DIR -/* Borrow trans_mkdir from Xtransutil.c to more safely make directories */ -# undef X11_t -# define TRANS_SERVER -# define PRMSG(lvl,x,a,b,c) \ - if (lvl <= 1) { LogMessage(X_ERROR,x,a,b,c); } else ((void)0) -# include <X11/Xtrans/Xtransutil.c> -# ifndef XKM_OUTPUT_DIR_MODE -# define XKM_OUTPUT_DIR_MODE 0755 -# endif -#endif - static void OutputDirectory( char* outdir, size_t size) { #ifndef WIN32 - if (getuid() == 0 && (strlen(XKM_OUTPUT_DIR) < size) -#ifdef MAKE_XKM_OUTPUT_DIR - && (trans_mkdir(XKM_OUTPUT_DIR, XKM_OUTPUT_DIR_MODE) == 0) -#endif - ) + if (getuid() == 0 && (strlen(XKM_OUTPUT_DIR) < size)) { /* if server running as root it *may* be able to write */ /* FIXME: check whether directory is writable at all */ (void) strcpy (outdir, XKM_OUTPUT_DIR); } else -#endif -#ifdef _PATH_VARTMP - if ((strlen(_PATH_VARTMP) + 1) < size) - { - (void) strcpy (outdir, _PATH_VARTMP); - if (outdir[strlen(outdir) - 1] != '/') /* Hi IBM, Digital */ - (void) strcat (outdir, "/"); - } else -#endif -#ifdef WIN32 +#else if (strlen(Win32TempDir()) + 1 < size) { (void) strcpy(outdir, Win32TempDir()); @@ -211,81 +178,6 @@ OutputDirectory( } } -static Bool -XkbDDXCompileNamedKeymap( XkbDescPtr xkb, - XkbComponentNamesPtr names, - char * nameRtrn, - int nameRtrnLen) -{ -char *cmd = NULL,file[PATH_MAX],xkm_output_dir[PATH_MAX],*map,*outFile; - - if (names->keymap==NULL) - return False; - strncpy(file,names->keymap,PATH_MAX); file[PATH_MAX-1]= '\0'; - if ((map= strrchr(file,'('))!=NULL) { - char *tmp; - if ((tmp= strrchr(map,')'))!=NULL) { - *map++= '\0'; - *tmp= '\0'; - } - else { - map= NULL; - } - } - if ((outFile= strrchr(file,'/'))!=NULL) - outFile= _XkbDupString(&outFile[1]); - else outFile= _XkbDupString(file); - XkbEnsureSafeMapName(outFile); - OutputDirectory(xkm_output_dir, sizeof(xkm_output_dir)); - - if (XkbBaseDirectory!=NULL) { - char *xkbbasedir = XkbBaseDirectory; - char *xkbbindir = XkbBinDirectory; - - cmd = Xprintf("\"%s" PATHSEPARATOR "xkbcomp\" -w %d \"-R%s\" -xkm %s%s -em1 %s -emp %s -eml %s keymap/%s \"%s%s.xkm\"", - xkbbindir, - ((xkbDebugFlags<2)?1:((xkbDebugFlags>10)?10:(int)xkbDebugFlags)), - xkbbasedir,(map?"-m ":""),(map?map:""), - PRE_ERROR_MSG,ERROR_PREFIX,POST_ERROR_MSG1,file, - xkm_output_dir,outFile); - } - else { - cmd = Xprintf("xkbcomp -w %d -xkm %s%s -em1 %s -emp %s -eml %s keymap/%s \"%s%s.xkm\"", - ((xkbDebugFlags<2)?1:((xkbDebugFlags>10)?10:(int)xkbDebugFlags)), - (map?"-m ":""),(map?map:""), - PRE_ERROR_MSG,ERROR_PREFIX,POST_ERROR_MSG1,file, - xkm_output_dir,outFile); - } -#ifdef DEBUG - if (xkbDebugFlags) { - ErrorF("[xkb] XkbDDXCompileNamedKeymap compiling keymap using:\n"); - ErrorF("[xkb] \"cmd\"\n"); - } -#endif -#ifdef DEBUG_CMD - ErrorF("[xkb] xkb executes: %s\n",cmd); -#endif - if (System(cmd)==0) { - if (nameRtrn) { - strncpy(nameRtrn,outFile,nameRtrnLen); - nameRtrn[nameRtrnLen-1]= '\0'; - } - if (outFile!=NULL) - _XkbFree(outFile); - if (cmd!=NULL) - xfree(cmd); - return True; - } -#ifdef DEBUG - ErrorF("[xkb] Error compiling keymap (%s)\n",names->keymap); -#endif - if (outFile!=NULL) - _XkbFree(outFile); - if (cmd!=NULL) - xfree(cmd); - return False; -} - static Bool XkbDDXCompileKeymapByNames( XkbDescPtr xkb, XkbComponentNamesPtr names, @@ -361,22 +253,18 @@ char tmpname[PATH_MAX]; #ifdef DEBUG if (xkbDebugFlags) { ErrorF("[xkb] XkbDDXCompileKeymapByNames compiling keymap:\n"); - XkbWriteXKBKeymapForNames(stderr,names,NULL,xkb,want,need); + XkbWriteXKBKeymapForNames(stderr,names,xkb,want,need); } #endif - XkbWriteXKBKeymapForNames(out,names,NULL,xkb,want,need); + XkbWriteXKBKeymapForNames(out,names,xkb,want,need); #ifndef WIN32 if (Pclose(out)==0) #else if (fclose(out)==0 && System(buf) >= 0) #endif { -#ifdef DEBUG_CMD - ErrorF("[xkb] xkb executes: %s\n",buf); - ErrorF("[xkb] xkbcomp input:\n"); - XkbWriteXKBKeymapForNames(stderr,names,NULL,xkb,want,need); - ErrorF("[xkb] end xkbcomp input\n"); -#endif + if (xkbDebugFlags) + DebugF("[xkb] xkb executes: %s\n",buf); if (nameRtrn) { strncpy(nameRtrn,keymap,nameRtrnLen); nameRtrn[nameRtrnLen-1]= '\0'; @@ -385,24 +273,20 @@ char tmpname[PATH_MAX]; xfree (buf); return True; } -#ifdef DEBUG else - ErrorF("[xkb] Error compiling keymap (%s)\n",keymap); -#endif + DebugF("[xkb] Error compiling keymap (%s)\n",keymap); #ifdef WIN32 /* remove the temporary file */ unlink(tmpname); #endif } -#ifdef DEBUG else { #ifndef WIN32 - ErrorF("[xkb] Could not invoke keymap compiler\n"); + DebugF("[xkb] Could not invoke keymap compiler\n"); #else - ErrorF("[xkb] Could not open file %s\n", tmpname); + DebugF("[xkb] Could not open file %s\n", tmpname); #endif } -#endif if (nameRtrn) nameRtrn[0]= '\0'; if (buf != NULL) @@ -450,44 +334,27 @@ XkbDDXLoadKeymapByNames( DeviceIntPtr keybd, XkbComponentNamesPtr names, unsigned want, unsigned need, - XkbFileInfo * finfoRtrn, + XkbDescPtr * xkbRtrn, char * nameRtrn, int nameRtrnLen) { -XkbDescPtr xkb; +XkbDescPtr xkb; FILE * file; char fileName[PATH_MAX]; unsigned missing; - bzero(finfoRtrn,sizeof(XkbFileInfo)); + *xkbRtrn = NULL; if ((keybd==NULL)||(keybd->key==NULL)||(keybd->key->xkbInfo==NULL)) xkb= NULL; else xkb= keybd->key->xkbInfo->desc; if ((names->keycodes==NULL)&&(names->types==NULL)&& (names->compat==NULL)&&(names->symbols==NULL)&& (names->geometry==NULL)) { - if (names->keymap==NULL) { - bzero(finfoRtrn,sizeof(XkbFileInfo)); - if (xkb && XkbDetermineFileType(finfoRtrn,XkbXKMFile,NULL) && - ((finfoRtrn->defined&need)==need) ) { - finfoRtrn->xkb= xkb; - nameRtrn[0]= '\0'; - return finfoRtrn->defined; - } - return 0; - } - else if (!XkbDDXCompileNamedKeymap(xkb,names,nameRtrn,nameRtrnLen)) { -#ifdef NOISY - ErrorF("[xkb] Couldn't compile keymap file\n"); -#endif - return 0; - } + return 0; } else if (!XkbDDXCompileKeymapByNames(xkb,names,want,need, - nameRtrn,nameRtrnLen)){ -#ifdef NOISY - ErrorF("[xkb] Couldn't compile keymap file\n"); -#endif + nameRtrn,nameRtrnLen)){ + DebugF("[xkb] Couldn't compile keymap file\n"); return 0; } file= XkbDDXOpenConfigFile(nameRtrn,fileName,PATH_MAX); @@ -495,18 +362,16 @@ unsigned missing; LogMessage(X_ERROR, "Couldn't open compiled keymap file %s\n",fileName); return 0; } - missing= XkmReadFile(file,need,want,finfoRtrn); - if (finfoRtrn->xkb==NULL) { + missing= XkmReadFile(file,need,want,xkbRtrn); + if (*xkbRtrn==NULL) { LogMessage(X_ERROR, "Error loading keymap %s\n",fileName); fclose(file); (void) unlink (fileName); return 0; } -#ifdef DEBUG else if (xkbDebugFlags) { - ErrorF("[xkb] Loaded %s, defined=0x%x\n",fileName,finfoRtrn->defined); + DebugF("[xkb] Loaded XKB keymap %s, defined=0x%x\n",fileName,(*xkbRtrn)->defined); } -#endif fclose(file); (void) unlink (fileName); return (need|want)&(~missing); diff --git a/xkb/maprules.c b/xkb/maprules.c index 0fa356ee5..4c947f004 100644 --- a/xkb/maprules.c +++ b/xkb/maprules.c @@ -46,20 +46,10 @@ #include "misc.h" #include "inputstr.h" #include "dix.h" -#include <X11/extensions/XKBstr.h> +#include "xkbstr.h" #define XKBSRV_NEED_FILE_FUNCS #include <xkbsrv.h> -#ifdef DEBUG -#define PR_DEBUG(s) fprintf(stderr,s) -#define PR_DEBUG1(s,a) fprintf(stderr,s,a) -#define PR_DEBUG2(s,a,b) fprintf(stderr,s,a,b) -#else -#define PR_DEBUG(s) -#define PR_DEBUG1(s,a) -#define PR_DEBUG2(s,a,b) -#endif - /***====================================================================***/ #define DFLT_LINE_SIZE 128 @@ -171,8 +161,8 @@ Bool endOfFile,spacePending,slashPending,inComment; } if (checkbang && ch=='!') { if (line->num_line!=0) { - PR_DEBUG("The '!' legal only at start of line\n"); - PR_DEBUG("Line containing '!' ignored\n"); + DebugF("The '!' legal only at start of line\n"); + DebugF("Line containing '!' ignored\n"); line->num_line= 0; inComment= 0; break; @@ -273,9 +263,7 @@ unsigned present, l_ndx_present, v_ndx_present; register int i; int len, ndx; _Xstrtokparams strtok_buf; -#ifdef DEBUG Bool found; -#endif l_ndx_present = v_ndx_present = present= 0; @@ -284,9 +272,7 @@ Bool found; bzero((char *)remap,sizeof(RemapSpec)); remap->number = len; while ((tok=_XStrtok(str," ",strtok_buf))!=NULL) { -#ifdef DEBUG found= False; -#endif str= NULL; if (strcmp(tok,"=")==0) continue; @@ -299,22 +285,20 @@ Bool found; *end != '\0' || ndx == -1) break; if (ndx < 1 || ndx > XkbNumKbdGroups) { - PR_DEBUG2("Illegal %s index: %d\n", cname[i], ndx); - PR_DEBUG1("Index must be in range 1..%d\n", + DebugF("Illegal %s index: %d\n", cname[i], ndx); + DebugF("Index must be in range 1..%d\n", XkbNumKbdGroups); break; } } else { ndx = 0; } -#ifdef DEBUG found= True; -#endif if (present&(1<<i)) { if ((i == LAYOUT && l_ndx_present&(1<<ndx)) || (i == VARIANT && v_ndx_present&(1<<ndx)) ) { - PR_DEBUG1("Component \"%s\" listed twice\n",tok); - PR_DEBUG("Second definition ignored\n"); + DebugF("Component \"%s\" listed twice\n",tok); + DebugF("Second definition ignored\n"); break; } } @@ -328,38 +312,34 @@ Bool found; break; } } -#ifdef DEBUG if (!found) { fprintf(stderr,"Unknown component \"%s\" ignored\n",tok); } -#endif } if ((present&PART_MASK)==0) { -#ifdef DEBUG unsigned mask= PART_MASK; - fprintf(stderr,"Mapping needs at least one of "); + ErrorF("Mapping needs at least one of "); for (i=0; (i<MAX_WORDS); i++) { if ((1L<<i)&mask) { mask&= ~(1L<<i); - if (mask) fprintf(stderr,"\"%s,\" ",cname[i]); - else fprintf(stderr,"or \"%s\"\n",cname[i]); + if (mask) DebugF("\"%s,\" ",cname[i]); + else DebugF("or \"%s\"\n",cname[i]); } } - fprintf(stderr,"Illegal mapping ignored\n"); -#endif + DebugF("Illegal mapping ignored\n"); remap->num_remap= 0; return; } if ((present&COMPONENT_MASK)==0) { - PR_DEBUG("Mapping needs at least one component\n"); - PR_DEBUG("Illegal mapping ignored\n"); + DebugF("Mapping needs at least one component\n"); + DebugF("Illegal mapping ignored\n"); remap->num_remap= 0; return; } if (((present&COMPONENT_MASK)&(1<<KEYMAP))&& ((present&COMPONENT_MASK)!=(1<<KEYMAP))) { - PR_DEBUG("Keymap cannot appear with other components\n"); - PR_DEBUG("Illegal mapping ignored\n"); + DebugF("Keymap cannot appear with other components\n"); + DebugF("Illegal mapping ignored\n"); remap->num_remap= 0; return; } @@ -434,8 +414,8 @@ Bool append = False; } if (remap->num_remap==0) { - PR_DEBUG("Must have a mapping before first line of data\n"); - PR_DEBUG("Illegal line of data ignored\n"); + DebugF("Must have a mapping before first line of data\n"); + DebugF("Illegal line of data ignored\n"); return False; } bzero((char *)&tmp,sizeof(FileSpec)); @@ -447,8 +427,8 @@ Bool append = False; continue; } if (nread>remap->num_remap) { - PR_DEBUG("Too many words on a line\n"); - PR_DEBUG1("Extra word \"%s\" ignored\n",tok); + DebugF("Too many words on a line\n"); + DebugF("Extra word \"%s\" ignored\n",tok); continue; } tmp.name[remap->remap[nread].word]= tok; @@ -456,8 +436,8 @@ Bool append = False; append = True; } if (nread<remap->num_remap) { - PR_DEBUG1("Too few words on a line: %s\n", line->line); - PR_DEBUG("line ignored\n"); + DebugF("Too few words on a line: %s\n", line->line); + DebugF("line ignored\n"); return False; } @@ -479,7 +459,7 @@ Bool append = False; rule->types= _XkbDupString(tmp.name[TYPES]); rule->compat= _XkbDupString(tmp.name[COMPAT]); rule->geometry= _XkbDupString(tmp.name[GEOMETRY]); - rule->keymap= _XkbDupString(tmp.name[KEYMAP]); + rule->keymap= NULL; rule->layout_num = rule->variant_num = 0; for (i = 0; i < nread; i++) { @@ -609,7 +589,6 @@ XkbRF_ApplyRule( XkbRF_RulePtr rule, Apply(rule->types, &names->types); Apply(rule->compat, &names->compat); Apply(rule->geometry, &names->geometry); - Apply(rule->keymap, &names->keymap); } static Bool @@ -903,9 +882,7 @@ XkbRF_AddRule(XkbRF_RulesPtr rules) } if (!rules->rules) { rules->sz_rules= rules->num_rules= 0; -#ifdef DEBUG - fprintf(stderr,"Allocation failure in XkbRF_AddRule\n"); -#endif + DebugF("Allocation failure in XkbRF_AddRule\n"); return NULL; } bzero((char *)&rules->rules[rules->num_rules],sizeof(XkbRF_RuleRec)); @@ -1022,7 +999,7 @@ XkbRF_AddVarDesc(XkbRF_DescribeVarsPtr vars) } if (!vars->desc) { vars->sz_desc= vars->num_desc= 0; - PR_DEBUG("Allocation failure in XkbRF_AddVarDesc\n"); + DebugF("Allocation failure in XkbRF_AddVarDesc\n"); return NULL; } vars->desc[vars->num_desc].name= NULL; @@ -1059,7 +1036,7 @@ XkbRF_AddVarToDescribe(XkbRF_RulesPtr rules,char *name) XkbRF_DescribeVarsRec); } if ((!rules->extra_names)||(!rules->extra)) { - PR_DEBUG("allocation error in extra parts\n"); + DebugF("allocation error in extra parts\n"); rules->sz_extra= rules->num_extra= 0; rules->extra_names= NULL; rules->extra= NULL; @@ -1102,7 +1079,7 @@ int len,headingtype,extra_ndx = 0; } if (extra_ndx<0) { XkbRF_DescribeVarsPtr var; - PR_DEBUG1("Extra heading \"%s\" encountered\n",tok); + DebugF("Extra heading \"%s\" encountered\n",tok); var= XkbRF_AddVarToDescribe(rules,tok); if (var) extra_ndx= var-rules->extra; @@ -1113,20 +1090,20 @@ int len,headingtype,extra_ndx = 0; } if (headingtype == HEAD_NONE) { - PR_DEBUG("Must have a heading before first line of data\n"); - PR_DEBUG("Illegal line of data ignored\n"); + DebugF("Must have a heading before first line of data\n"); + DebugF("Illegal line of data ignored\n"); continue; } len = strlen(line.line); if ((tmp.name= strtok(line.line, " \t")) == NULL) { - PR_DEBUG("Huh? No token on line\n"); - PR_DEBUG("Illegal line of data ignored\n"); + DebugF("Huh? No token on line\n"); + DebugF("Illegal line of data ignored\n"); continue; } if (strlen(tmp.name) == len) { - PR_DEBUG("No description found\n"); - PR_DEBUG("Illegal line of data ignored\n"); + DebugF("No description found\n"); + DebugF("Illegal line of data ignored\n"); continue; } @@ -1134,8 +1111,8 @@ int len,headingtype,extra_ndx = 0; while ((*tok!='\n')&&isspace(*tok)) tok++; if (*tok == '\0') { - PR_DEBUG("No description found\n"); - PR_DEBUG("Illegal line of data ignored\n"); + DebugF("No description found\n"); + DebugF("Illegal line of data ignored\n"); continue; } tmp.desc= tok; @@ -1301,7 +1278,6 @@ XkbRF_GroupPtr group; if (rule->types) _XkbFree(rule->types); if (rule->compat) _XkbFree(rule->compat); if (rule->geometry) _XkbFree(rule->geometry); - if (rule->keymap) _XkbFree(rule->keymap); bzero((char *)rule,sizeof(XkbRF_RuleRec)); } _XkbFree(rules->rules); @@ -211,7 +211,7 @@ ProcXkbSelectEvents(ClientPtr client) if (!(client->xkbClientFlags&_XkbClientInitialized)) return BadAccess; - CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixReadAccess); + CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixUseAccess); if (((stuff->affectWhich&XkbMapNotifyMask)!=0)&&(stuff->affectMap)) { client->mapNotifyMask&= ~stuff->affectMap; @@ -694,7 +694,7 @@ ProcXkbSetControls(ClientPtr client) if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; - CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess); + CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess); CHK_MASK_LEGAL(0x01, stuff->changeCtrls, XkbAllControlsMask); for (tmpd = inputInfo.keyboard; tmpd; tmpd = tmpd->next) { @@ -2304,7 +2304,7 @@ ProcXkbSetMap(ClientPtr client) if (!(client->xkbClientFlags&_XkbClientInitialized)) return BadAccess; - CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess); + CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess); CHK_MASK_LEGAL(0x01,stuff->present,XkbAllMapComponentsMask); XkbSetCauseXkbReq(&cause,X_kbSetMap,client); @@ -2618,7 +2618,7 @@ ProcXkbSetCompatMap(ClientPtr client) if (!(client->xkbClientFlags&_XkbClientInitialized)) return BadAccess; - CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess); + CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess); data = (char *)&stuff[1]; xkbi = dev->key->xkbInfo; @@ -3545,7 +3545,7 @@ ProcXkbSetNames(ClientPtr client) if (!(client->xkbClientFlags&_XkbClientInitialized)) return BadAccess; - CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixUnknownAccess); + CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess); CHK_MASK_LEGAL(0x01,stuff->which,XkbAllNamesMask); xkb = dev->key->xkbInfo->desc; @@ -3870,7 +3870,7 @@ ProcXkbSetNames(ClientPtr client) /***====================================================================***/ -#include <X11/extensions/XKBgeom.h> +#include "xkbgeom.h" #define XkbSizeCountedString(s) ((s)?((((2+strlen(s))+3)/4)*4):4) @@ -4844,7 +4844,7 @@ ProcXkbSetGeometry(ClientPtr client) if (!(client->xkbClientFlags&_XkbClientInitialized)) return BadAccess; - CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess); + CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess); CHK_ATOM_OR_NONE(stuff->name); xkb= dev->key->xkbInfo->desc; @@ -5109,7 +5109,6 @@ ProcXkbGetKbdByName(ClientPtr client) { DeviceIntPtr dev; DeviceIntPtr tmpd; - XkbFileInfo finfo; xkbGetKbdByNameReply rep; xkbGetMapReply mrep; xkbGetCompatMapReply crep; @@ -5117,7 +5116,7 @@ ProcXkbGetKbdByName(ClientPtr client) xkbGetNamesReply nrep; xkbGetGeometryReply grep; XkbComponentNamesRec names; - XkbDescPtr xkb; + XkbDescPtr xkb, new; unsigned char * str; char mapFile[PATH_MAX]; unsigned len; @@ -5126,7 +5125,7 @@ ProcXkbGetKbdByName(ClientPtr client) Bool geom_changed; XkbSrvLedInfoPtr old_sli; XkbSrvLedInfoPtr sli; - Mask access_mode = DixGetAttrAccess | DixSetAttrAccess; + Mask access_mode = DixGetAttrAccess | DixManageAccess; REQUEST(xkbGetKbdByNameReq); REQUEST_AT_LEAST_SIZE(xkbGetKbdByNameReq); @@ -5157,25 +5156,20 @@ ProcXkbGetKbdByName(ClientPtr client) if (stuff->load) fwant= XkbGBN_AllComponentsMask; else fwant= stuff->want|stuff->need; - if (!names.keymap) { - if ((!names.compat)&& - (fwant&(XkbGBN_CompatMapMask|XkbGBN_IndicatorMapMask))) { - names.compat= _XkbDupString("%"); - } - if ((!names.types)&&(fwant&(XkbGBN_TypesMask))) { - names.types= _XkbDupString("%"); - } - if ((!names.symbols)&&(fwant&XkbGBN_SymbolsMask)) { - names.symbols= _XkbDupString("%"); - } - geom_changed= ((names.geometry!=NULL)&&(strcmp(names.geometry,"%")!=0)); - if ((!names.geometry)&&(fwant&XkbGBN_GeometryMask)) { - names.geometry= _XkbDupString("%"); - geom_changed= False; - } + if ((!names.compat)&& + (fwant&(XkbGBN_CompatMapMask|XkbGBN_IndicatorMapMask))) { + names.compat= _XkbDupString("%"); } - else { - geom_changed= True; + if ((!names.types)&&(fwant&(XkbGBN_TypesMask))) { + names.types= _XkbDupString("%"); + } + if ((!names.symbols)&&(fwant&XkbGBN_SymbolsMask)) { + names.symbols= _XkbDupString("%"); + } + geom_changed= ((names.geometry!=NULL)&&(strcmp(names.geometry,"%")!=0)); + if ((!names.geometry)&&(fwant&XkbGBN_GeometryMask)) { + names.geometry= _XkbDupString("%"); + geom_changed= False; } bzero(mapFile,PATH_MAX); @@ -5199,35 +5193,35 @@ ProcXkbGetKbdByName(ClientPtr client) } /* We pass dev in here so we can get the old names out if needed. */ - rep.found = XkbDDXLoadKeymapByNames(dev,&names,fwant,fneed,&finfo, + rep.found = XkbDDXLoadKeymapByNames(dev,&names,fwant,fneed,&new, mapFile,PATH_MAX); rep.newKeyboard= False; rep.pad1= rep.pad2= rep.pad3= rep.pad4= 0; stuff->want|= stuff->need; - if (finfo.xkb==NULL) + if (new==NULL) rep.reported= 0; else { if (stuff->load) rep.loaded= True; if (stuff->load || - ((rep.reported&XkbGBN_SymbolsMask) && (finfo.xkb->compat))) { + ((rep.reported&XkbGBN_SymbolsMask) && (new->compat))) { XkbChangesRec changes; bzero(&changes,sizeof(changes)); - XkbUpdateDescActions(finfo.xkb, - finfo.xkb->min_key_code,XkbNumKeys(finfo.xkb), + XkbUpdateDescActions(new, + new->min_key_code,XkbNumKeys(new), &changes); } - if (finfo.xkb->map==NULL) + if (new->map==NULL) rep.reported&= ~(XkbGBN_SymbolsMask|XkbGBN_TypesMask); else if (rep.reported&(XkbGBN_SymbolsMask|XkbGBN_TypesMask)) { mrep.type= X_Reply; mrep.deviceID = dev->id; mrep.sequenceNumber= client->sequence; mrep.length = ((SIZEOF(xkbGetMapReply)-SIZEOF(xGenericReply))>>2); - mrep.minKeyCode = finfo.xkb->min_key_code; - mrep.maxKeyCode = finfo.xkb->max_key_code; + mrep.minKeyCode = new->min_key_code; + mrep.maxKeyCode = new->max_key_code; mrep.present = 0; mrep.totalSyms = mrep.totalActs = mrep.totalKeyBehaviors= mrep.totalKeyExplicit= @@ -5235,7 +5229,7 @@ ProcXkbGetKbdByName(ClientPtr client) if (rep.reported&(XkbGBN_TypesMask|XkbGBN_ClientSymbolsMask)) { mrep.present|= XkbKeyTypesMask; mrep.firstType = 0; - mrep.nTypes = mrep.totalTypes= finfo.xkb->map->num_types; + mrep.nTypes = mrep.totalTypes= new->map->num_types; } else { mrep.firstType = mrep.nTypes= 0; @@ -5243,8 +5237,8 @@ ProcXkbGetKbdByName(ClientPtr client) } if (rep.reported&XkbGBN_ClientSymbolsMask) { mrep.present|= (XkbKeySymsMask|XkbModifierMapMask); - mrep.firstKeySym = mrep.firstModMapKey= finfo.xkb->min_key_code; - mrep.nKeySyms = mrep.nModMapKeys= XkbNumKeys(finfo.xkb); + mrep.firstKeySym = mrep.firstModMapKey= new->min_key_code; + mrep.nKeySyms = mrep.nModMapKeys= XkbNumKeys(new); } else { mrep.firstKeySym= mrep.firstModMapKey= 0; @@ -5254,9 +5248,9 @@ ProcXkbGetKbdByName(ClientPtr client) mrep.present|= XkbAllServerInfoMask; mrep.virtualMods= ~0; mrep.firstKeyAct = mrep.firstKeyBehavior = - mrep.firstKeyExplicit = finfo.xkb->min_key_code; + mrep.firstKeyExplicit = new->min_key_code; mrep.nKeyActs = mrep.nKeyBehaviors = - mrep.nKeyExplicit = XkbNumKeys(finfo.xkb); + mrep.nKeyExplicit = XkbNumKeys(new); } else { mrep.virtualMods= 0; @@ -5264,10 +5258,10 @@ ProcXkbGetKbdByName(ClientPtr client) mrep.firstKeyExplicit = 0; mrep.nKeyActs= mrep.nKeyBehaviors= mrep.nKeyExplicit= 0; } - XkbComputeGetMapReplySize(finfo.xkb,&mrep); + XkbComputeGetMapReplySize(new,&mrep); rep.length+= SIZEOF(xGenericReply)/4+mrep.length; } - if (finfo.xkb->compat==NULL) + if (new->compat==NULL) rep.reported&= ~XkbGBN_CompatMapMask; else if (rep.reported&XkbGBN_CompatMapMask) { crep.type= X_Reply; @@ -5276,11 +5270,11 @@ ProcXkbGetKbdByName(ClientPtr client) crep.length= 0; crep.groups= XkbAllGroupsMask; crep.firstSI= 0; - crep.nSI= crep.nTotalSI= finfo.xkb->compat->num_si; - XkbComputeGetCompatMapReplySize(finfo.xkb->compat,&crep); + crep.nSI= crep.nTotalSI= new->compat->num_si; + XkbComputeGetCompatMapReplySize(new->compat,&crep); rep.length+= SIZEOF(xGenericReply)/4+crep.length; } - if (finfo.xkb->indicators==NULL) + if (new->indicators==NULL) rep.reported&= ~XkbGBN_IndicatorMapMask; else if (rep.reported&XkbGBN_IndicatorMapMask) { irep.type= X_Reply; @@ -5288,28 +5282,28 @@ ProcXkbGetKbdByName(ClientPtr client) irep.sequenceNumber= client->sequence; irep.length= 0; irep.which= XkbAllIndicatorsMask; - XkbComputeGetIndicatorMapReplySize(finfo.xkb->indicators,&irep); + XkbComputeGetIndicatorMapReplySize(new->indicators,&irep); rep.length+= SIZEOF(xGenericReply)/4+irep.length; } - if (finfo.xkb->names==NULL) + if (new->names==NULL) rep.reported&= ~(XkbGBN_OtherNamesMask|XkbGBN_KeyNamesMask); else if (rep.reported&(XkbGBN_OtherNamesMask|XkbGBN_KeyNamesMask)) { nrep.type= X_Reply; nrep.deviceID= dev->id; nrep.sequenceNumber= client->sequence; nrep.length= 0; - nrep.minKeyCode= finfo.xkb->min_key_code; - nrep.maxKeyCode= finfo.xkb->max_key_code; + nrep.minKeyCode= new->min_key_code; + nrep.maxKeyCode= new->max_key_code; if (rep.reported&XkbGBN_OtherNamesMask) { nrep.which= XkbAllNamesMask; - if (finfo.xkb->map!=NULL) - nrep.nTypes= finfo.xkb->map->num_types; + if (new->map!=NULL) + nrep.nTypes= new->map->num_types; else nrep.nTypes= 0; nrep.nKTLevels= 0; nrep.groupNames= XkbAllGroupsMask; nrep.virtualMods= XkbAllVirtualModsMask; nrep.indicators= XkbAllIndicatorsMask; - nrep.nRadioGroups= finfo.xkb->names->num_rg; + nrep.nRadioGroups= new->names->num_rg; } else { nrep.which= 0; @@ -5322,9 +5316,9 @@ ProcXkbGetKbdByName(ClientPtr client) } if (rep.reported&XkbGBN_KeyNamesMask) { nrep.which|= XkbKeyNamesMask; - nrep.firstKey= finfo.xkb->min_key_code; - nrep.nKeys= XkbNumKeys(finfo.xkb); - nrep.nKeyAliases= finfo.xkb->names->num_key_aliases; + nrep.firstKey= new->min_key_code; + nrep.nKeys= XkbNumKeys(new); + nrep.nKeyAliases= new->names->num_key_aliases; if (nrep.nKeyAliases) nrep.which|= XkbKeyAliasesMask; } @@ -5333,10 +5327,10 @@ ProcXkbGetKbdByName(ClientPtr client) nrep.firstKey= nrep.nKeys= 0; nrep.nKeyAliases= 0; } - XkbComputeGetNamesReplySize(finfo.xkb,&nrep); + XkbComputeGetNamesReplySize(new,&nrep); rep.length+= SIZEOF(xGenericReply)/4+nrep.length; } - if (finfo.xkb->geom==NULL) + if (new->geom==NULL) rep.reported&= ~XkbGBN_GeometryMask; else if (rep.reported&XkbGBN_GeometryMask) { grep.type= X_Reply; @@ -5349,7 +5343,7 @@ ProcXkbGetKbdByName(ClientPtr client) grep.nProperties= grep.nColors= grep.nShapes= 0; grep.nSections= grep.nDoodads= 0; grep.baseColorNdx= grep.labelColorNdx= 0; - XkbComputeGetGeometryReplySize(finfo.xkb->geom,&grep,None); + XkbComputeGetGeometryReplySize(new->geom,&grep,None); rep.length+= SIZEOF(xGenericReply)/4+grep.length; } } @@ -5364,23 +5358,23 @@ ProcXkbGetKbdByName(ClientPtr client) } WriteToClient(client,SIZEOF(xkbGetKbdByNameReply), (char *)&rep); if (reported&(XkbGBN_SymbolsMask|XkbGBN_TypesMask)) - XkbSendMap(client,finfo.xkb,&mrep); + XkbSendMap(client,new,&mrep); if (reported&XkbGBN_CompatMapMask) - XkbSendCompatMap(client,finfo.xkb->compat,&crep); + XkbSendCompatMap(client,new->compat,&crep); if (reported&XkbGBN_IndicatorMapMask) - XkbSendIndicatorMap(client,finfo.xkb->indicators,&irep); + XkbSendIndicatorMap(client,new->indicators,&irep); if (reported&(XkbGBN_KeyNamesMask|XkbGBN_OtherNamesMask)) - XkbSendNames(client,finfo.xkb,&nrep); + XkbSendNames(client,new,&nrep); if (reported&XkbGBN_GeometryMask) - XkbSendGeometry(client,finfo.xkb->geom,&grep,False); + XkbSendGeometry(client,new->geom,&grep,False); if (rep.loaded) { XkbDescPtr old_xkb; xkbNewKeyboardNotify nkn; int i,nG,nTG; old_xkb= xkb; - xkb= finfo.xkb; + xkb= new; dev->key->xkbInfo->desc= xkb; - finfo.xkb= old_xkb; /* so it'll get freed automatically */ + new= old_xkb; /* so it'll get freed automatically */ *xkb->ctrls= *old_xkb->ctrls; for (nG=nTG=0,i=xkb->min_key_code;i<=xkb->max_key_code;i++) { @@ -5424,8 +5418,8 @@ ProcXkbGetKbdByName(ClientPtr client) /* this should be either a MN or an NKN, depending on whether or not * the keycode range changed? */ nkn.deviceID= nkn.oldDeviceID= dev->id; - nkn.minKeyCode= finfo.xkb->min_key_code; - nkn.maxKeyCode= finfo.xkb->max_key_code; + nkn.minKeyCode= new->min_key_code; + nkn.maxKeyCode= new->max_key_code; nkn.oldMinKeyCode= xkb->min_key_code; nkn.oldMaxKeyCode= xkb->max_key_code; nkn.requestMajor= XkbReqCode; @@ -5435,9 +5429,9 @@ ProcXkbGetKbdByName(ClientPtr client) nkn.changed|= XkbNKN_GeometryMask; XkbSendNewKeyboardNotify(dev,&nkn); } - if ((finfo.xkb!=NULL)&&(finfo.xkb!=xkb)) { - XkbFreeKeyboard(finfo.xkb,XkbAllComponentsMask,True); - finfo.xkb= NULL; + if ((new!=NULL)&&(new!=xkb)) { + XkbFreeKeyboard(new,XkbAllComponentsMask,True); + new= NULL; } if (names.keymap) { _XkbFree(names.keymap); names.keymap= NULL; } if (names.keycodes) { _XkbFree(names.keycodes); names.keycodes= NULL; } @@ -5784,10 +5778,8 @@ char * str; return status; } else if (length!=0) { -#ifdef DEBUG ErrorF("[xkb] Internal Error! BadLength in ProcXkbGetDeviceInfo\n"); ErrorF("[xkb] Wrote %d fewer bytes than expected\n",length); -#endif return BadLength; } if (stuff->wanted&(~supported)) { @@ -5997,7 +5989,7 @@ xkbExtensionDeviceNotify ed; change= stuff->change; - CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess); + CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess); CHK_MASK_LEGAL(0x01,change,XkbXI_AllFeaturesMask); wire= (char *)&stuff[1]; @@ -1,4 +1,5 @@ -/* #include "XKBfile.h" */ +#ifndef _XKB_H +#define _XKB_H extern int ProcXkbUseExtension(ClientPtr client); extern int ProcXkbSelectEvents(ClientPtr client); @@ -35,3 +36,5 @@ extern Bool XkbCopyKeymap( XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies); + +#endif diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c index 975b2eb5f..28107d05d 100644 --- a/xkb/xkbAccessX.c +++ b/xkb/xkbAccessX.c @@ -130,11 +130,9 @@ xEvent xE; xE.u.u.type = type; xE.u.u.detail = keyCode; xE.u.keyButtonPointer.time = GetTimeInMillis(); -#ifdef DEBUG if (xkbDebugFlags&0x8) { - ErrorF("[xkb] AXKE: Key %d %s\n",keyCode,(xE.u.u.type==KeyPress?"down":"up")); + DebugF("[xkb] AXKE: Key %d %s\n",keyCode,(xE.u.u.type==KeyPress?"down":"up")); } -#endif if (_XkbIsPressEvent(type)) XkbDDXKeyClick(keybd,keyCode,TRUE); @@ -532,10 +530,8 @@ KeySym * sym = XkbKeySymsPtr(xkbi->desc,key); ((ctrls->enabled_ctrls&(XkbSlowKeysMask|XkbRepeatKeysMask))== XkbRepeatKeysMask)) { if (BitIsOn(keybd->kbdfeed->ctrl.autoRepeats,key)) { -#ifdef DEBUG if (xkbDebugFlags&0x10) - ErrorF("[xkb] Starting software autorepeat...\n"); -#endif + DebugF("Starting software autorepeat...\n"); xkbi->repeatKey = key; xkbi->repeatKeyTimer= TimerSet(xkbi->repeatKeyTimer, 0, ctrls->repeat_delay, diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c index 00165be33..ab0802d59 100644 --- a/xkb/xkbActions.c +++ b/xkb/xkbActions.c @@ -843,7 +843,7 @@ _XkbFilterRedirectKey( XkbSrvInfoPtr xkbi, unsigned keycode, XkbAction * pAction) { -unsigned realMods; +unsigned realMods = 0; xEvent ev; int x,y; XkbStateRec old; @@ -1137,7 +1137,7 @@ void XkbHandleActions(DeviceIntPtr dev,DeviceIntPtr kbd,xEvent *xE,int count) { int key,bit,i; -CARD8 realMods; +CARD8 realMods = 0; XkbSrvInfoPtr xkbi; KeyClassPtr keyc; int changed,sendEvent; diff --git a/xkb/xkbEvents.c b/xkb/xkbEvents.c index 351a3280e..6389b906f 100644 --- a/xkb/xkbEvents.c +++ b/xkb/xkbEvents.c @@ -813,23 +813,21 @@ XkbSrvInfoPtr xkbi; xkbi= pXDev->key->xkbInfo; if ( pClient->xkbClientFlags & _XkbClientInitialized ) { -#ifdef DEBUG if ((xkbDebugFlags&0x10)&& ((xE[0].u.u.type==KeyPress)||(xE[0].u.u.type==KeyRelease)|| (xE[0].u.u.type==DeviceKeyPress)|| (xE[0].u.u.type == DeviceKeyRelease))) { - ErrorF("[xkb] XKbFilterWriteEvents:\n"); - ErrorF("[xkb] Event state= 0x%04x\n",xE[0].u.keyButtonPointer.state); - ErrorF("[xkb] XkbLastRepeatEvent!=xE (0x%p!=0x%p) %s\n", + DebugF("[xkb] XKbFilterWriteEvents:\n"); + DebugF("[xkb] Event state= 0x%04x\n",xE[0].u.keyButtonPointer.state); + DebugF("[xkb] XkbLastRepeatEvent!=xE (0x%p!=0x%p) %s\n", XkbLastRepeatEvent,xE, ((XkbLastRepeatEvent!=(pointer)xE)?"True":"False")); - ErrorF("[xkb] (xkbClientEventsFlags&XWDA)==0 (0x%x) %s\n", + DebugF("[xkb] (xkbClientEventsFlags&XWDA)==0 (0x%x) %s\n", pClient->xkbClientFlags, (_XkbWantsDetectableAutoRepeat(pClient)?"True":"False")); - ErrorF("[xkb] !IsRelease(%d) %s\n",xE[0].u.u.type, + DebugF("[xkb] !IsRelease(%d) %s\n",xE[0].u.u.type, (!_XkbIsReleaseEvent(xE[0].u.u.type))?"True":"False"); } -#endif /* DEBUG */ if ( (XkbLastRepeatEvent==(pointer)xE) && (_XkbWantsDetectableAutoRepeat(pClient)) && (_XkbIsReleaseEvent(xE[0].u.u.type)) ) { @@ -867,13 +865,11 @@ XkbSrvInfoPtr xkbi; if (xE[0].u.u.type == ButtonPress && ((xE[0].u.keyButtonPointer.state >> 7) & button_mask) == button_mask && (xkbi->lockedPtrButtons & button_mask) == button_mask) { -#ifdef DEBUG /* If the MouseKeys is pressed, and the "real" mouse is also pressed * when the mouse is released, the server does not behave properly. * Faking a release of the button here solves the problem. */ - ErrorF("[xkb] Faking release of button %d\n", xE[0].u.u.detail); -#endif + DebugF("[xkb] Faking release of button %d\n", xE[0].u.u.detail); XkbDDXFakePointerButton(ButtonRelease, xE[0].u.u.detail); } } @@ -882,21 +878,19 @@ XkbSrvInfoPtr xkbi; for (i=0;i<nEvents;i++) { type= xE[i].u.u.type; -#ifdef DEBUG if ((xkbDebugFlags&0x4)&& ((xE[i].u.u.type==KeyPress)||(xE[i].u.u.type==KeyRelease)|| (xE[i].u.u.type==DeviceKeyPress)|| (xE[i].u.u.type == DeviceKeyRelease))) { XkbStatePtr s= &xkbi->state; - ErrorF("[xkb] XKbFilterWriteEvents (non-XKB):\n"); - ErrorF("[xkb] event= 0x%04x\n",xE[i].u.keyButtonPointer.state); - ErrorF("[xkb] lookup= 0x%02x, grab= 0x%02x\n",s->lookup_mods, + DebugF("[xkb] XKbFilterWriteEvents (non-XKB):\n"); + DebugF("[xkb] event= 0x%04x\n",xE[i].u.keyButtonPointer.state); + DebugF("[xkb] lookup= 0x%02x, grab= 0x%02x\n",s->lookup_mods, s->grab_mods); - ErrorF("[xkb] compat lookup= 0x%02x, grab= 0x%02x\n", + DebugF("[xkb] compat lookup= 0x%02x, grab= 0x%02x\n", s->compat_lookup_mods, s->compat_grab_mods); } -#endif if ( (type>=KeyPress)&&(type<=MotionNotify) ) { CARD16 old,new; @@ -929,16 +923,12 @@ XkbSrvInfoPtr xkbi; if (type == ButtonPress && ((xE[i].u.keyButtonPointer.state >> 7) & button_mask) == button_mask && (xkbi->lockedPtrButtons & button_mask) == button_mask) { -#ifdef DEBUG - ErrorF("[xkb] Faking release of button %d\n", xE[i].u.u.detail); -#endif + DebugF("[xkb] Faking release of button %d\n", xE[i].u.u.detail); XkbDDXFakePointerButton(ButtonRelease, xE[i].u.u.detail); } else if (type == DeviceButtonPress && ((((deviceKeyButtonPointer*)&xE[i])->state >> 7) & button_mask) == button_mask && (xkbi->lockedPtrButtons & button_mask) == button_mask) { -#ifdef DEBUG - ErrorF("[xkb] Faking release of button %d\n", ((deviceKeyButtonPointer*)&xE[i])->state); -#endif + DebugF("[xkb] Faking release of button %d\n", ((deviceKeyButtonPointer*)&xE[i])->state); XkbDDXFakePointerButton(DeviceButtonRelease, ((deviceKeyButtonPointer*)&xE[i])->state); } } diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c index 0682cc44d..09317e943 100644 --- a/xkb/xkbInit.c +++ b/xkb/xkbInit.c @@ -48,9 +48,9 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "property.h" #define XKBSRV_NEED_FILE_FUNCS #include <xkbsrv.h> -#include <X11/extensions/XKBgeom.h> +#include "xkbgeom.h" #include <X11/extensions/XKMformat.h> -#include <X11/extensions/XKBfile.h> +#include "xkbfile.h" #include "xkb.h" #define CREATE_ATOM(s) MakeAtom(s,sizeof(s)-1,1) @@ -88,7 +88,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. typedef struct _SrvXkmInfo { DeviceIntPtr dev; FILE * file; - XkbFileInfo xkbinfo; + XkbDescPtr xkb; } SrvXkmInfo; @@ -125,7 +125,6 @@ typedef struct _SrvXkmInfo { char * XkbBaseDirectory= XKB_BASE_DIRECTORY; char * XkbBinDirectory= XKB_BIN_DIRECTORY; static int XkbWantAccessX= 0; -static XkbFileInfo * _XkbInitFileInfo= NULL; static Bool rulesDefined= False; static char * XkbRulesFile= NULL; @@ -139,6 +138,8 @@ static char * XkbLayoutUsed= NULL; static char * XkbVariantUsed= NULL; static char * XkbOptionsUsed= NULL; +static XkbDescPtr xkb_cached_map = NULL; + _X_EXPORT Bool noXkbExtension= XKB_DFLT_DISABLED; static Bool XkbWantRulesProp= XKB_DFLT_RULES_PROP; @@ -280,17 +281,14 @@ XkbSetRulesDflts(char *rulesFile,char *model,char *layout, /***====================================================================***/ -#if defined(luna) -#define XKB_DDX_PERMANENT_LOCK 1 -#endif - #include "xkbDflts.h" static Bool -XkbInitKeyTypes(XkbDescPtr xkb,SrvXkmInfo *file) +XkbInitKeyTypes(XkbDescPtr xkb) { - if (file->xkbinfo.defined&XkmTypesMask) - return True; + if (xkb->defined & XkmTypesMask) + return True; + initTypeNames(NULL); if (XkbAllocClientMap(xkb,XkbKeyTypesMask,num_dflt_types)!=Success) return False; @@ -303,7 +301,7 @@ XkbInitKeyTypes(XkbDescPtr xkb,SrvXkmInfo *file) } static void -XkbInitRadioGroups(XkbSrvInfoPtr xkbi,SrvXkmInfo *file) +XkbInitRadioGroups(XkbSrvInfoPtr xkbi) { xkbi->nRadioGroups = 0; xkbi->radioGroups = NULL; @@ -312,13 +310,14 @@ XkbInitRadioGroups(XkbSrvInfoPtr xkbi,SrvXkmInfo *file) static Status -XkbInitCompatStructs(XkbDescPtr xkb,SrvXkmInfo *file) +XkbInitCompatStructs(XkbDescPtr xkb) { register int i; XkbCompatMapPtr compat; - if (file->xkbinfo.defined&XkmCompatMapMask) - return Success; + if (xkb->defined & XkmCompatMapMask) + return True; + if (XkbAllocCompatMap(xkb,XkbAllCompatMask,num_dfltSI)!=Success) return BadAlloc; compat = xkb->compat; @@ -339,17 +338,17 @@ XkbCompatMapPtr compat; } static void -XkbInitSemantics(XkbDescPtr xkb,SrvXkmInfo *file) +XkbInitSemantics(XkbDescPtr xkb) { - XkbInitKeyTypes(xkb,file); - XkbInitCompatStructs(xkb,file); + XkbInitKeyTypes(xkb); + XkbInitCompatStructs(xkb); return; } /***====================================================================***/ static Status -XkbInitNames(XkbSrvInfoPtr xkbi,SrvXkmInfo *file) +XkbInitNames(XkbSrvInfoPtr xkbi) { XkbDescPtr xkb; XkbNamesPtr names; @@ -367,46 +366,38 @@ Atom unknown; if (names->symbols==None) names->symbols= unknown; if (names->types==None) names->types= unknown; if (names->compat==None) names->compat= unknown; - if ((file->xkbinfo.defined&XkmVirtualModsMask)==0) { - if (names->vmods[vmod_NumLock]==None) - names->vmods[vmod_NumLock]= CREATE_ATOM("NumLock"); - if (names->vmods[vmod_Alt]==None) - names->vmods[vmod_Alt]= CREATE_ATOM("Alt"); - if (names->vmods[vmod_AltGr]==None) - names->vmods[vmod_AltGr]= CREATE_ATOM("ModeSwitch"); - } - - if (((file->xkbinfo.defined&XkmIndicatorsMask)==0)|| - ((file->xkbinfo.defined&XkmGeometryMask)==0)) { - initIndicatorNames(NULL,xkb); - if (names->indicators[LED_CAPS-1]==None) - names->indicators[LED_CAPS-1] = CREATE_ATOM("Caps Lock"); - if (names->indicators[LED_NUM-1]==None) - names->indicators[LED_NUM-1] = CREATE_ATOM("Num Lock"); - if (names->indicators[LED_SCROLL-1]==None) - names->indicators[LED_SCROLL-1] = CREATE_ATOM("Scroll Lock"); + if (!(xkb->defined & XkmVirtualModsMask)) { + if (names->vmods[vmod_NumLock]==None) + names->vmods[vmod_NumLock]= CREATE_ATOM("NumLock"); + if (names->vmods[vmod_Alt]==None) + names->vmods[vmod_Alt]= CREATE_ATOM("Alt"); + if (names->vmods[vmod_AltGr]==None) + names->vmods[vmod_AltGr]= CREATE_ATOM("ModeSwitch"); + } + + if (!(xkb->defined & XkmIndicatorsMask)) { + initIndicatorNames(NULL,xkb); + if (names->indicators[LED_CAPS-1]==None) + names->indicators[LED_CAPS-1] = CREATE_ATOM("Caps Lock"); + if (names->indicators[LED_NUM-1]==None) + names->indicators[LED_NUM-1] = CREATE_ATOM("Num Lock"); + if (names->indicators[LED_SCROLL-1]==None) + names->indicators[LED_SCROLL-1] = CREATE_ATOM("Scroll Lock"); #ifdef LED_COMPOSE - if (names->indicators[LED_COMPOSE-1]==None) - names->indicators[LED_COMPOSE-1] = CREATE_ATOM("Compose"); + if (names->indicators[LED_COMPOSE-1]==None) + names->indicators[LED_COMPOSE-1] = CREATE_ATOM("Compose"); #endif } -#ifdef DEBUG_RADIO_GROUPS - if (names->num_rg<1) { - names->radio_groups= (Atom *)_XkbCalloc(RG_COUNT, sizeof(Atom)); - if (names->radio_groups) { - names->num_rg = RG_COUNT; - names->radio_groups[RG_BOGUS_FUNCTION_GROUP]= CREATE_ATOM("BOGUS"); - } - } -#endif + if (xkb->geom!=NULL) names->geometry= xkb->geom->name; else names->geometry= unknown; + return Success; } static Status -XkbInitIndicatorMap(XkbSrvInfoPtr xkbi,SrvXkmInfo *file) +XkbInitIndicatorMap(XkbSrvInfoPtr xkbi) { XkbDescPtr xkb; XkbIndicatorPtr map; @@ -415,35 +406,36 @@ XkbSrvLedInfoPtr sli; xkb= xkbi->desc; if (XkbAllocIndicatorMaps(xkb)!=Success) return BadAlloc; - if ((file->xkbinfo.defined&XkmIndicatorsMask)==0) { - map= xkb->indicators; - map->phys_indicators = PHYS_LEDS; - map->maps[LED_CAPS-1].flags= XkbIM_NoExplicit; - map->maps[LED_CAPS-1].which_mods= XkbIM_UseLocked; - map->maps[LED_CAPS-1].mods.mask= LockMask; - map->maps[LED_CAPS-1].mods.real_mods= LockMask; - - map->maps[LED_NUM-1].flags= XkbIM_NoExplicit; - map->maps[LED_NUM-1].which_mods= XkbIM_UseLocked; - map->maps[LED_NUM-1].mods.mask= 0; - map->maps[LED_NUM-1].mods.real_mods= 0; - map->maps[LED_NUM-1].mods.vmods= vmod_NumLockMask; - -/* Metro Link */ - map->maps[LED_SCROLL-1].flags= XkbIM_NoExplicit; - map->maps[LED_SCROLL-1].which_mods= XkbIM_UseLocked; - map->maps[LED_SCROLL-1].mods.mask= Mod3Mask; - map->maps[LED_SCROLL-1].mods.real_mods= Mod3Mask; -/* Metro Link */ + + if (!(xkb->defined & XkmIndicatorsMask)) { + map= xkb->indicators; + map->phys_indicators = PHYS_LEDS; + map->maps[LED_CAPS-1].flags= XkbIM_NoExplicit; + map->maps[LED_CAPS-1].which_mods= XkbIM_UseLocked; + map->maps[LED_CAPS-1].mods.mask= LockMask; + map->maps[LED_CAPS-1].mods.real_mods= LockMask; + + map->maps[LED_NUM-1].flags= XkbIM_NoExplicit; + map->maps[LED_NUM-1].which_mods= XkbIM_UseLocked; + map->maps[LED_NUM-1].mods.mask= 0; + map->maps[LED_NUM-1].mods.real_mods= 0; + map->maps[LED_NUM-1].mods.vmods= vmod_NumLockMask; + + map->maps[LED_SCROLL-1].flags= XkbIM_NoExplicit; + map->maps[LED_SCROLL-1].which_mods= XkbIM_UseLocked; + map->maps[LED_SCROLL-1].mods.mask= Mod3Mask; + map->maps[LED_SCROLL-1].mods.real_mods= Mod3Mask; } + sli= XkbFindSrvLedInfo(xkbi->device,XkbDfltXIClass,XkbDfltXIId,0); if (sli) XkbCheckIndicatorMaps(xkbi->device,sli,XkbAllIndicatorsMask); + return Success; } static Status -XkbInitControls(DeviceIntPtr pXDev,XkbSrvInfoPtr xkbi,SrvXkmInfo *file) +XkbInitControls(DeviceIntPtr pXDev,XkbSrvInfoPtr xkbi) { XkbDescPtr xkb; XkbControlsPtr ctrls; @@ -453,8 +445,8 @@ XkbControlsPtr ctrls; if (XkbAllocControls(xkb,XkbAllControlsMask)!=Success) FatalError("Couldn't allocate keyboard controls\n"); ctrls= xkb->ctrls; - if ((file->xkbinfo.defined&XkmSymbolsMask)==0) - ctrls->num_groups = 1; + if (!(xkb->defined & XkmSymbolsMask)) + ctrls->num_groups = 1; ctrls->groups_wrap = XkbSetGroupInfo(1,XkbWrapIntoRange,0); ctrls->internal.mask = 0; ctrls->internal.real_mods = 0; @@ -477,29 +469,25 @@ XkbInitDevice(DeviceIntPtr pXDev) int i; XkbSrvInfoPtr xkbi; XkbChangesRec changes; -SrvXkmInfo file; unsigned check; XkbEventCauseRec cause; - file.dev= pXDev; - file.file=NULL; - bzero(&file.xkbinfo,sizeof(XkbFileInfo)); bzero(&changes,sizeof(XkbChangesRec)); pXDev->key->xkbInfo= xkbi= _XkbTypedCalloc(1,XkbSrvInfoRec); if ( xkbi ) { XkbDescPtr xkb; - if ((_XkbInitFileInfo!=NULL)&&(_XkbInitFileInfo->xkb!=NULL)) { - file.xkbinfo= *_XkbInitFileInfo; - xkbi->desc= _XkbInitFileInfo->xkb; - _XkbInitFileInfo= NULL; - } - else { - xkbi->desc= XkbAllocKeyboard(); - if (!xkbi->desc) - FatalError("Couldn't allocate keyboard description\n"); - xkbi->desc->min_key_code = pXDev->key->curKeySyms.minKeyCode; - xkbi->desc->max_key_code = pXDev->key->curKeySyms.maxKeyCode; - } + + if (xkb_cached_map) { + xkbi->desc = xkb_cached_map; + xkb_cached_map = NULL; + } + else { + xkbi->desc= XkbAllocKeyboard(); + if (!xkbi->desc) + FatalError("Couldn't allocate keyboard description\n"); + xkbi->desc->min_key_code = pXDev->key->curKeySyms.minKeyCode; + xkbi->desc->max_key_code = pXDev->key->curKeySyms.maxKeyCode; + } xkb= xkbi->desc; if (xkb->min_key_code == 0) xkb->min_key_code = pXDev->key->curKeySyms.minKeyCode; @@ -522,32 +510,32 @@ XkbEventCauseRec cause; xkbi->dfltPtrDelta=1; xkbi->device = pXDev; - file.xkbinfo.xkb= xkb; - XkbInitSemantics(xkb,&file); - XkbInitNames(xkbi,&file); - XkbInitRadioGroups(xkbi,&file); + XkbInitSemantics(xkb); + XkbInitNames(xkbi); + XkbInitRadioGroups(xkbi); /* 12/31/94 (ef) -- XXX! Should check if state loaded from file */ bzero(&xkbi->state,sizeof(XkbStateRec)); - XkbInitControls(pXDev,xkbi,&file); + XkbInitControls(pXDev,xkbi); - if (file.xkbinfo.defined&XkmSymbolsMask) - memcpy(pXDev->key->modifierMap,xkb->map->modmap,xkb->max_key_code+1); - else - memcpy(xkb->map->modmap,pXDev->key->modifierMap,xkb->max_key_code+1); + if (xkb->defined & XkmSymbolsMask) + memcpy(pXDev->key->modifierMap, xkb->map->modmap, + xkb->max_key_code + 1); + else + memcpy(xkb->map->modmap, pXDev->key->modifierMap, + xkb->max_key_code + 1); - XkbInitIndicatorMap(xkbi,&file); + XkbInitIndicatorMap(xkbi); XkbDDXInitDevice(pXDev); - if (!(file.xkbinfo.defined&XkmSymbolsMask)) { - XkbUpdateKeyTypesFromCore(pXDev,xkb->min_key_code,XkbNumKeys(xkb), - &changes); - } - else { - XkbUpdateCoreDescription(pXDev,True); - } + if (xkb->defined & XkmSymbolsMask) + XkbUpdateKeyTypesFromCore(pXDev, xkb->min_key_code, + XkbNumKeys(xkb), &changes); + else + XkbUpdateCoreDescription(pXDev, True); + XkbSetCauseUnknown(&cause); XkbUpdateActions(pXDev,xkb->min_key_code, XkbNumKeys(xkb),&changes, &check,&cause); @@ -559,8 +547,6 @@ XkbEventCauseRec cause; pXDev->key->curKeySyms.minKeyCode = xkb->min_key_code; pXDev->key->curKeySyms.maxKeyCode = xkb->max_key_code; } - if (file.file!=NULL) - fclose(file.file); return; } @@ -584,12 +570,12 @@ XkbInitKeyboardDeviceStruct( DeviceIntPtr /*device*/, KeybdCtrl * /*ctrl*/)) { -XkbFileInfo finfo; KeySymsRec tmpSyms,*pSyms; CARD8 tmpMods[XkbMaxLegalKeyCode+1],*pMods; char name[PATH_MAX],*rules; Bool ok=False; XkbRF_VarDefsRec defs; +XkbDescPtr xkb; if ((dev->key!=NULL)||(dev->kbdfeed!=NULL)) return False; @@ -604,7 +590,7 @@ XkbRF_VarDefsRec defs; * generation. Eventually they will be freed at the end of this * function. */ - if (names->keymap) names->keymap = _XkbDupString(names->keymap); + names->keymap = NULL; if (names->keycodes) names->keycodes = _XkbDupString(names->keycodes); if (names->types) names->types = _XkbDupString(names->types); if (names->compat) names->compat = _XkbDupString(names->compat); @@ -615,11 +601,6 @@ XkbRF_VarDefsRec defs; XkbComponentNamesRec rNames; bzero(&rNames,sizeof(XkbComponentNamesRec)); if (XkbDDXNamesFromRules(dev,rules,&defs,&rNames)) { - if (rNames.keymap) { - if (!names->keymap) - names->keymap = rNames.keymap; - else _XkbFree(rNames.keymap); - } if (rNames.keycodes) { if (!names->keycodes) names->keycodes = rNames.keycodes; @@ -650,22 +631,12 @@ XkbRF_VarDefsRec defs; } } - if (names->keymap) { - XkbComponentNamesRec tmpNames; - bzero(&tmpNames,sizeof(XkbComponentNamesRec)); - tmpNames.keymap = names->keymap; - ok = (Bool) XkbDDXLoadKeymapByNames(dev,&tmpNames,XkmAllIndicesMask,0, - &finfo,name,PATH_MAX); - } - if (!(ok && (finfo.xkb!=NULL))) - ok = (Bool) XkbDDXLoadKeymapByNames(dev,names,XkmAllIndicesMask,0, - &finfo,name,PATH_MAX); + ok = (Bool) XkbDDXLoadKeymapByNames(dev,names,XkmAllIndicesMask,0, + &xkb,name,PATH_MAX); - if (ok && (finfo.xkb!=NULL)) { - XkbDescPtr xkb; + if (ok && (xkb!=NULL)) { KeyCode minKC,maxKC; - xkb= finfo.xkb; minKC= xkb->min_key_code; maxKC= xkb->max_key_code; if (XkbIsLegalKeycode(minKC)&&XkbIsLegalKeycode(maxKC)&&(minKC<=maxKC)&& @@ -695,20 +666,20 @@ XkbRF_VarDefsRec defs; pMods= tmpMods; } } - _XkbInitFileInfo= &finfo; + /* Store the map here so we can pick it back up in XkbInitDevice. + * Sigh. */ + xkb_cached_map = xkb; } else { LogMessage(X_WARNING, "Couldn't load XKB keymap, falling back to pre-XKB keymap\n"); } ok= InitKeyboardDeviceStruct((DevicePtr)dev,pSyms,pMods,bellProc,ctrlProc); - _XkbInitFileInfo= NULL; + xkb_cached_map = NULL; if ((pSyms==&tmpSyms)&&(pSyms->map!=NULL)) { _XkbFree(pSyms->map); pSyms->map= NULL; } - if (names->keymap) _XkbFree(names->keymap); - names->keymap = NULL; if (names->keycodes) _XkbFree(names->keycodes); names->keycodes = NULL; if (names->types) _XkbFree(names->types); @@ -771,9 +742,7 @@ XkbSrvLedInfoPtr sli; sli= XkbFindSrvLedInfo(pXDev,XkbDfltXIClass,XkbDfltXIId,0); if (sli && xkbi) XkbCheckIndicatorMaps(xkbi->device,sli,XkbAllIndicatorsMask); -#ifdef DEBUG - else ErrorF("[xkb] No indicator feedback in XkbFinishInit (shouldn't happen)!\n"); -#endif + else DebugF("[xkb] No indicator feedback in XkbFinishInit (shouldn't happen)!\n"); return softRepeat; } diff --git a/xkb/xkbPrKeyEv.c b/xkb/xkbPrKeyEv.c index f007f75f2..74d02c608 100644 --- a/xkb/xkbPrKeyEv.c +++ b/xkb/xkbPrKeyEv.c @@ -56,11 +56,9 @@ int xiEvent; xkbi= keyc->xkbInfo; key= xE->u.u.detail; xiEvent= (xE->u.u.type & EXTENSION_EVENT_BASE); -#ifdef DEBUG if (xkbDebugFlags&0x8) { - ErrorF("[xkb] XkbPKE: Key %d %s\n",key,(xE->u.u.type==KeyPress?"down":"up")); + DebugF("[xkb] XkbPKE: Key %d %s\n",key,(xE->u.u.type==KeyPress?"down":"up")); } -#endif if ( (xkbi->repeatKey==key) && (xE->u.u.type==KeyRelease) && ((xkbi->desc->ctrls->enabled_ctrls&XkbRepeatKeysMask)==0) ) { diff --git a/xkb/xkbPrOtherEv.c b/xkb/xkbPrOtherEv.c index d65107cdc..8017903be 100644 --- a/xkb/xkbPrOtherEv.c +++ b/xkb/xkbPrOtherEv.c @@ -36,7 +36,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include <X11/keysym.h> #include "misc.h" #include "inputstr.h" -#include <X11/extensions/XKBsrv.h> +#include "xkbsrv.h" #include <X11/extensions/XI.h> #include <X11/extensions/XIproto.h> diff --git a/xkb/xkbSwap.c b/xkb/xkbSwap.c index bbb2a91f7..1a513b35c 100644 --- a/xkb/xkbSwap.c +++ b/xkb/xkbSwap.c @@ -36,7 +36,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "misc.h" #include "inputstr.h" #include <xkbsrv.h> -#include <X11/extensions/XKBstr.h> +#include "xkbstr.h" #include "extnsionst.h" #include "xkb.h" diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c index 91aee18c4..045b962d4 100644 --- a/xkb/xkbUtils.c +++ b/xkb/xkbUtils.c @@ -42,7 +42,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define XKBSRV_NEED_FILE_FUNCS #include <xkbsrv.h> -#include <X11/extensions/XKBgeom.h> +#include "xkbgeom.h" #include "xkb.h" int XkbDisableLockActions = 0; @@ -211,16 +211,6 @@ KeySym tsyms[XkbMaxSymsPerKey],*syms; XkbMapChangesPtr mc; xkb= pXDev->key->xkbInfo->desc; -#ifdef NOTYET - if (first<xkb->min_key_code) { - if (first>=XkbMinLegalKeyCode) { - xkb->min_key_code= first; - /* 1/12/95 (ef) -- XXX! should zero out the new maps */ - changes->map.changed|= XkbKeycodesMask; -/* generate a NewKeyboard notify here? */ - } - } -#endif if (first+num-1>xkb->max_key_code) { /* 1/12/95 (ef) -- XXX! should allow XKB structures to grow */ num= xkb->max_key_code-first+1; @@ -1519,10 +1509,12 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) /* properties */ if (src->geom->num_properties) { if (src->geom->num_properties != dst->geom->sz_properties) { + /* If we've got more properties in the destination than + * the source, run through and free all the excess ones + * first. */ if (src->geom->num_properties < dst->geom->sz_properties) { for (i = src->geom->num_properties, - dprop = dst->geom->properties + - src->geom->num_properties; + dprop = dst->geom->properties + i; i < dst->geom->num_properties; i++, dprop++) { xfree(dprop->name); @@ -1542,6 +1534,8 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) dst->geom->properties = tmp; } + /* We don't set num_properties as we need it to try and avoid + * too much reallocing. */ dst->geom->sz_properties = src->geom->num_properties; if (dst->geom->sz_properties > dst->geom->num_properties) { @@ -1577,6 +1571,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) } } + /* ... which is already src->geom->num_properties. */ dst->geom->num_properties = dst->geom->sz_properties; } else { @@ -1600,8 +1595,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) if (src->geom->num_colors != dst->geom->sz_colors) { if (src->geom->num_colors < dst->geom->sz_colors) { for (i = src->geom->num_colors, - dcolor = dst->geom->colors + - src->geom->num_colors; + dcolor = dst->geom->colors + i; i < dst->geom->num_colors; i++, dcolor++) { xfree(dcolor->spec); @@ -1719,7 +1713,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) } doutline->num_points = soutline->num_points; - doutline->sz_points = soutline->sz_points; + doutline->sz_points = soutline->num_points; } } @@ -1798,6 +1792,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) memset(tmp, 0, src->geom->num_sections * sizeof(XkbSectionRec)); dst->geom->sections = tmp; dst->geom->num_sections = src->geom->num_sections; + dst->geom->sz_sections = src->geom->num_sections; for (i = 0, ssection = src->geom->sections, @@ -1811,6 +1806,8 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) dsection->rows = tmp; } dsection->num_rows = ssection->num_rows; + dsection->sz_rows = ssection->num_rows; + for (j = 0, srow = ssection->rows, drow = dsection->rows; j < ssection->num_rows; j++, srow++, drow++) { diff --git a/xkb/xkberrs.c b/xkb/xkberrs.c deleted file mode 100644 index 3534356c6..000000000 --- a/xkb/xkberrs.c +++ /dev/null @@ -1,37 +0,0 @@ -/************************************************************ - Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. - - Permission to use, copy, modify, and distribute this - software and its documentation for any purpose and without - fee is hereby granted, provided that the above copyright - notice appear in all copies and that both that copyright - notice and this permission notice appear in supporting - documentation, and that the name of Silicon Graphics not be - used in advertising or publicity pertaining to distribution - of the software without specific prior written permission. - Silicon Graphics makes no representation about the suitability - of this software for any purpose. It is provided "as is" - without any express or implied warranty. - - SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH - THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ********************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include <dix-config.h> -#endif - -#include <stdio.h> -#include <ctype.h> -#include <stdlib.h> - -unsigned _XkbErrCode; -char * _XkbErrLocation= NULL; -unsigned _XkbErrData; diff --git a/xkb/xkbfmisc.c b/xkb/xkbfmisc.c index 05344b475..866b4b154 100644 --- a/xkb/xkbfmisc.c +++ b/xkb/xkbfmisc.c @@ -42,10 +42,10 @@ #include "misc.h" #include "inputstr.h" #include "dix.h" -#include <X11/extensions/XKBstr.h> +#include "xkbstr.h" #define XKBSRV_NEED_FILE_FUNCS 1 #include <xkbsrv.h> -#include <X11/extensions/XKBgeom.h> +#include "xkbgeom.h" #include "xkb.h" unsigned @@ -146,7 +146,7 @@ XkbWriteSectionFromName(FILE *file,char *sectionName,char *name) /* ARGSUSED */ static void _AddIncl( FILE * file, - XkbFileInfo * result, + XkbDescPtr xkb, Bool topLevel, Bool showImplicit, int index, @@ -160,7 +160,6 @@ _AddIncl( FILE * file, Bool XkbWriteXKBKeymapForNames( FILE * file, XkbComponentNamesPtr names, - Display * dpy, XkbDescPtr xkb, unsigned want, unsigned need) @@ -170,9 +169,6 @@ unsigned complete; XkbNamesPtr old_names; int multi_section; unsigned wantNames,wantConfig,wantDflts; -XkbFileInfo finfo; - - bzero(&finfo,sizeof(XkbFileInfo)); complete= 0; if ((name=names->keymap)==NULL) name= "default"; @@ -188,14 +184,8 @@ XkbFileInfo finfo; if (want==0) return False; - if (xkb!=NULL) { + if (xkb!=NULL) old_names= xkb->names; - finfo.type= 0; - finfo.defined= 0; - finfo.xkb= xkb; - if (!XkbDetermineFileType(&finfo,XkbXKBFile,NULL)) - return False; - } else old_names= NULL; wantConfig= want&(~complete); @@ -233,7 +223,7 @@ XkbFileInfo finfo; if ((xkb!=NULL) && (old_names!=NULL)) { if (wantNames&XkmTypesMask) { if (old_names->types!=None) { - tmp= XkbAtomGetString(dpy,old_names->types); + tmp= XkbAtomGetString(old_names->types); names->types= _XkbDupString(tmp); } else { @@ -243,7 +233,7 @@ XkbFileInfo finfo; } if (wantNames&XkmCompatMapMask) { if (old_names->compat!=None) { - tmp= XkbAtomGetString(dpy,old_names->compat); + tmp= XkbAtomGetString(old_names->compat); names->compat= _XkbDupString(tmp); } else wantDflts|= XkmCompatMapMask; @@ -252,13 +242,13 @@ XkbFileInfo finfo; if (wantNames&XkmSymbolsMask) { if (old_names->symbols==None) return False; - tmp= XkbAtomGetString(dpy,old_names->symbols); + tmp= XkbAtomGetString(old_names->symbols); names->symbols= _XkbDupString(tmp); complete|= XkmSymbolsMask; } if (wantNames&XkmKeyNamesMask) { if (old_names->keycodes!=None) { - tmp= XkbAtomGetString(dpy,old_names->keycodes); + tmp= XkbAtomGetString(old_names->keycodes); names->keycodes= _XkbDupString(tmp); } else wantDflts|= XkmKeyNamesMask; @@ -267,7 +257,7 @@ XkbFileInfo finfo; if (wantNames&XkmGeometryMask) { if (old_names->geometry==None) return False; - tmp= XkbAtomGetString(dpy,old_names->geometry); + tmp= XkbAtomGetString(old_names->geometry); names->geometry= _XkbDupString(tmp); complete|= XkmGeometryMask; wantNames&= ~XkmGeometryMask; @@ -305,7 +295,7 @@ XkbFileInfo finfo; wantNames= complete&(~(wantConfig|wantDflts)); name= names->keycodes; if (wantConfig&XkmKeyNamesMask) - XkbWriteXKBKeycodes(file,&finfo,False,False,_AddIncl,name); + XkbWriteXKBKeycodes(file,xkb,False,False,_AddIncl,name); else if (wantDflts&XkmKeyNamesMask) fprintf(stderr,"Default symbols not implemented yet!\n"); else if (wantNames&XkmKeyNamesMask) @@ -313,7 +303,7 @@ XkbFileInfo finfo; name= names->types; if (wantConfig&XkmTypesMask) - XkbWriteXKBKeyTypes(file,&finfo,False,False,_AddIncl,name); + XkbWriteXKBKeyTypes(file,xkb,False,False,_AddIncl,name); else if (wantDflts&XkmTypesMask) fprintf(stderr,"Default types not implemented yet!\n"); else if (wantNames&XkmTypesMask) @@ -321,7 +311,7 @@ XkbFileInfo finfo; name= names->compat; if (wantConfig&XkmCompatMapMask) - XkbWriteXKBCompatMap(file,&finfo,False,False,_AddIncl,name); + XkbWriteXKBCompatMap(file,xkb,False,False,_AddIncl,name); else if (wantDflts&XkmCompatMapMask) fprintf(stderr,"Default interps not implemented yet!\n"); else if (wantNames&XkmCompatMapMask) @@ -329,13 +319,13 @@ XkbFileInfo finfo; name= names->symbols; if (wantConfig&XkmSymbolsMask) - XkbWriteXKBSymbols(file,&finfo,False,False,_AddIncl,name); + XkbWriteXKBSymbols(file,xkb,False,False,_AddIncl,name); else if (wantNames&XkmSymbolsMask) XkbWriteSectionFromName(file,"symbols",name); name= names->geometry; if (wantConfig&XkmGeometryMask) - XkbWriteXKBGeometry(file,&finfo,False,False,_AddIncl,name); + XkbWriteXKBGeometry(file,xkb,False,False,_AddIncl,name); else if (wantNames&XkmGeometryMask) XkbWriteSectionFromName(file,"geometry",name); @@ -405,81 +395,6 @@ unsigned rtrn; return rtrn; } -Bool -XkbDetermineFileType(XkbFileInfoPtr finfo,int format,int *opts_missing) -{ -unsigned present; -XkbDescPtr xkb; - - if ((!finfo)||(!finfo->xkb)) - return False; - if (opts_missing) - *opts_missing= 0; - xkb= finfo->xkb; - present= 0; - if ((xkb->names)&&(xkb->names->keys)) present|= XkmKeyNamesMask; - if ((xkb->map)&&(xkb->map->types)) present|= XkmTypesMask; - if (xkb->compat) present|= XkmCompatMapMask; - if ((xkb->map)&&(xkb->map->num_syms>1)) present|= XkmSymbolsMask; - if (xkb->indicators) present|= XkmIndicatorsMask; - if (xkb->geom) present|= XkmGeometryMask; - if (!present) - return False; - else switch (present) { - case XkmKeyNamesMask: - finfo->type= XkmKeyNamesIndex; - finfo->defined= present; - return True; - case XkmTypesMask: - finfo->type= XkmTypesIndex; - finfo->defined= present; - return True; - case XkmCompatMapMask: - finfo->type= XkmCompatMapIndex; - finfo->defined= present; - return True; - case XkmSymbolsMask: - if (format!=XkbXKMFile) { - finfo->type= XkmSymbolsIndex; - finfo->defined= present; - return True; - } - break; - case XkmGeometryMask: - finfo->type= XkmGeometryIndex; - finfo->defined= present; - return True; - } - if ((present&(~XkmSemanticsLegal))==0) { - if ((XkmSemanticsRequired&present)==XkmSemanticsRequired) { - if (opts_missing) - *opts_missing= XkmSemanticsOptional&(~present); - finfo->type= XkmSemanticsFile; - finfo->defined= present; - return True; - } - } - else if ((present&(~XkmLayoutLegal))==0) { - if ((XkmLayoutRequired&present)==XkmLayoutRequired) { - if (opts_missing) - *opts_missing= XkmLayoutOptional&(~present); - finfo->type= XkmLayoutFile; - finfo->defined= present; - return True; - } - } - else if ((present&(~XkmKeymapLegal))==0) { - if ((XkmKeymapRequired&present)==XkmKeymapRequired) { - if (opts_missing) - *opts_missing= XkmKeymapOptional&(~present); - finfo->type= XkmKeymapFile; - finfo->defined= present; - return True; - } - } - return False; -} - /* all latin-1 alphanumerics, plus parens, slash, minus, underscore and */ /* wildcards */ diff --git a/xkb/xkbgeom.h b/xkb/xkbgeom.h new file mode 100644 index 000000000..173affee9 --- /dev/null +++ b/xkb/xkbgeom.h @@ -0,0 +1,635 @@ +/************************************************************ +Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. + +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, provided that the above copyright +notice appear in all copies and that both that copyright +notice and this permission notice appear in supporting +documentation, and that the name of Silicon Graphics not be +used in advertising or publicity pertaining to distribution +of the software without specific prior written permission. +Silicon Graphics makes no representation about the suitability +of this software for any purpose. It is provided "as is" +without any express or implied warranty. + +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON +GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH +THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifndef _XKBGEOM_H_ +#define _XKBGEOM_H_ + +#include "xkbstr.h" + +#define XkbAddGeomKeyAlias SrvXkbAddGeomKeyAlias +#define XkbAddGeomColor SrvXkbAddGeomColor +#define XkbAddGeomDoodad SrvXkbAddGeomDoodad +#define XkbAddGeomKey SrvXkbAddGeomKey +#define XkbAddGeomOutline SrvXkbAddGeomOutline +#define XkbAddGeomOverlay SrvXkbAddGeomOverlay +#define XkbAddGeomOverlayRow SrvXkbAddGeomOverlayRow +#define XkbAddGeomOverlayKey SrvXkbAddGeomOverlayKey +#define XkbAddGeomProperty SrvXkbAddGeomProperty +#define XkbAddGeomRow SrvXkbAddGeomRow +#define XkbAddGeomSection SrvXkbAddGeomSection +#define XkbAddGeomShape SrvXkbAddGeomShape +#define XkbAllocGeomKeyAliases SrvXkbAllocGeomKeyAliases +#define XkbAllocGeomColors SrvXkbAllocGeomColors +#define XkbAllocGeomDoodads SrvXkbAllocGeomDoodads +#define XkbAllocGeomKeys SrvXkbAllocGeomKeys +#define XkbAllocGeomOutlines SrvXkbAllocGeomOutlines +#define XkbAllocGeomPoints SrvXkbAllocGeomPoints +#define XkbAllocGeomProps SrvXkbAllocGeomProps +#define XkbAllocGeomRows SrvXkbAllocGeomRows +#define XkbAllocGeomSectionDoodads SrvXkbAllocGeomSectionDoodads +#define XkbAllocGeomSections SrvXkbAllocGeomSections +#define XkbAllocGeomOverlays SrvXkbAllocGeomOverlays +#define XkbAllocGeomOverlayRows SrvXkbAllocGeomOverlayRows +#define XkbAllocGeomOverlayKeys SrvXkbAllocGeomOverlayKeys +#define XkbAllocGeomShapes SrvXkbAllocGeomShapes +#define XkbAllocGeometry SrvXkbAllocGeometry +#define XkbFreeGeomKeyAliases SrvXkbFreeGeomKeyAliases +#define XkbFreeGeomColors SrvXkbFreeGeomColors +#define XkbFreeGeomDoodads SrvXkbFreeGeomDoodads +#define XkbFreeGeomProperties SrvXkbFreeGeomProperties +#define XkbFreeGeomOverlayKeys SrvXkbFreeGeomOverlayKeys +#define XkbFreeGeomOverlayRows SrvXkbFreeGeomOverlayRows +#define XkbFreeGeomOverlays SrvXkbFreeGeomOverlays +#define XkbFreeGeomKeys SrvXkbFreeGeomKeys +#define XkbFreeGeomRows SrvXkbFreeGeomRows +#define XkbFreeGeomSections SrvXkbFreeGeomSections +#define XkbFreeGeomPoints SrvXkbFreeGeomPoints +#define XkbFreeGeomOutlines SrvXkbFreeGeomOutlines +#define XkbFreeGeomShapes SrvXkbFreeGeomShapes +#define XkbFreeGeometry SrvXkbFreeGeometry + +typedef struct _XkbProperty { + char *name; + char *value; +} XkbPropertyRec,*XkbPropertyPtr; + +typedef struct _XkbColor { + unsigned int pixel; + char * spec; +} XkbColorRec,*XkbColorPtr; + +typedef struct _XkbPoint { + short x; + short y; +} XkbPointRec, *XkbPointPtr; + +typedef struct _XkbBounds { + short x1,y1; + short x2,y2; +} XkbBoundsRec, *XkbBoundsPtr; +#define XkbBoundsWidth(b) (((b)->x2)-((b)->x1)) +#define XkbBoundsHeight(b) (((b)->y2)-((b)->y1)) + +typedef struct _XkbOutline { + unsigned short num_points; + unsigned short sz_points; + unsigned short corner_radius; + XkbPointPtr points; +} XkbOutlineRec, *XkbOutlinePtr; + +typedef struct _XkbShape { + Atom name; + unsigned short num_outlines; + unsigned short sz_outlines; + XkbOutlinePtr outlines; + XkbOutlinePtr approx; + XkbOutlinePtr primary; + XkbBoundsRec bounds; +} XkbShapeRec, *XkbShapePtr; +#define XkbOutlineIndex(s,o) ((int)((o)-&(s)->outlines[0])) + +typedef struct _XkbShapeDoodad { + Atom name; + unsigned char type; + unsigned char priority; + short top; + short left; + short angle; + unsigned short color_ndx; + unsigned short shape_ndx; +} XkbShapeDoodadRec, *XkbShapeDoodadPtr; +#define XkbShapeDoodadColor(g,d) (&(g)->colors[(d)->color_ndx]) +#define XkbShapeDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx]) +#define XkbSetShapeDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0]) +#define XkbSetShapeDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0]) + +typedef struct _XkbTextDoodad { + Atom name; + unsigned char type; + unsigned char priority; + short top; + short left; + short angle; + short width; + short height; + unsigned short color_ndx; + char * text; + char * font; +} XkbTextDoodadRec, *XkbTextDoodadPtr; +#define XkbTextDoodadColor(g,d) (&(g)->colors[(d)->color_ndx]) +#define XkbSetTextDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0]) + +typedef struct _XkbIndicatorDoodad { + Atom name; + unsigned char type; + unsigned char priority; + short top; + short left; + short angle; + unsigned short shape_ndx; + unsigned short on_color_ndx; + unsigned short off_color_ndx; +} XkbIndicatorDoodadRec, *XkbIndicatorDoodadPtr; +#define XkbIndicatorDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx]) +#define XkbIndicatorDoodadOnColor(g,d) (&(g)->colors[(d)->on_color_ndx]) +#define XkbIndicatorDoodadOffColor(g,d) (&(g)->colors[(d)->off_color_ndx]) +#define XkbSetIndicatorDoodadOnColor(g,d,c) \ + ((d)->on_color_ndx= (c)-&(g)->colors[0]) +#define XkbSetIndicatorDoodadOffColor(g,d,c) \ + ((d)->off_color_ndx= (c)-&(g)->colors[0]) +#define XkbSetIndicatorDoodadShape(g,d,s) \ + ((d)->shape_ndx= (s)-&(g)->shapes[0]) + +typedef struct _XkbLogoDoodad { + Atom name; + unsigned char type; + unsigned char priority; + short top; + short left; + short angle; + unsigned short color_ndx; + unsigned short shape_ndx; + char * logo_name; +} XkbLogoDoodadRec, *XkbLogoDoodadPtr; +#define XkbLogoDoodadColor(g,d) (&(g)->colors[(d)->color_ndx]) +#define XkbLogoDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx]) +#define XkbSetLogoDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0]) +#define XkbSetLogoDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0]) + +typedef struct _XkbAnyDoodad { + Atom name; + unsigned char type; + unsigned char priority; + short top; + short left; + short angle; +} XkbAnyDoodadRec, *XkbAnyDoodadPtr; + +typedef union _XkbDoodad { + XkbAnyDoodadRec any; + XkbShapeDoodadRec shape; + XkbTextDoodadRec text; + XkbIndicatorDoodadRec indicator; + XkbLogoDoodadRec logo; +} XkbDoodadRec, *XkbDoodadPtr; + +#define XkbUnknownDoodad 0 +#define XkbOutlineDoodad 1 +#define XkbSolidDoodad 2 +#define XkbTextDoodad 3 +#define XkbIndicatorDoodad 4 +#define XkbLogoDoodad 5 + +typedef struct _XkbKey { + XkbKeyNameRec name; + short gap; + unsigned char shape_ndx; + unsigned char color_ndx; +} XkbKeyRec, *XkbKeyPtr; +#define XkbKeyShape(g,k) (&(g)->shapes[(k)->shape_ndx]) +#define XkbKeyColor(g,k) (&(g)->colors[(k)->color_ndx]) +#define XkbSetKeyShape(g,k,s) ((k)->shape_ndx= (s)-&(g)->shapes[0]) +#define XkbSetKeyColor(g,k,c) ((k)->color_ndx= (c)-&(g)->colors[0]) + +typedef struct _XkbRow { + short top; + short left; + unsigned short num_keys; + unsigned short sz_keys; + int vertical; + XkbKeyPtr keys; + XkbBoundsRec bounds; +} XkbRowRec, *XkbRowPtr; + +typedef struct _XkbSection { + Atom name; + unsigned char priority; + short top; + short left; + unsigned short width; + unsigned short height; + short angle; + unsigned short num_rows; + unsigned short num_doodads; + unsigned short num_overlays; + unsigned short sz_rows; + unsigned short sz_doodads; + unsigned short sz_overlays; + XkbRowPtr rows; + XkbDoodadPtr doodads; + XkbBoundsRec bounds; + struct _XkbOverlay *overlays; +} XkbSectionRec, *XkbSectionPtr; + +typedef struct _XkbOverlayKey { + XkbKeyNameRec over; + XkbKeyNameRec under; +} XkbOverlayKeyRec,*XkbOverlayKeyPtr; + +typedef struct _XkbOverlayRow { + unsigned short row_under; + unsigned short num_keys; + unsigned short sz_keys; + XkbOverlayKeyPtr keys; +} XkbOverlayRowRec,*XkbOverlayRowPtr; + +typedef struct _XkbOverlay { + Atom name; + XkbSectionPtr section_under; + unsigned short num_rows; + unsigned short sz_rows; + XkbOverlayRowPtr rows; + XkbBoundsPtr bounds; +} XkbOverlayRec,*XkbOverlayPtr; + +typedef struct _XkbGeometry { + Atom name; + unsigned short width_mm; + unsigned short height_mm; + char * label_font; + XkbColorPtr label_color; + XkbColorPtr base_color; + unsigned short sz_properties; + unsigned short sz_colors; + unsigned short sz_shapes; + unsigned short sz_sections; + unsigned short sz_doodads; + unsigned short sz_key_aliases; + unsigned short num_properties; + unsigned short num_colors; + unsigned short num_shapes; + unsigned short num_sections; + unsigned short num_doodads; + unsigned short num_key_aliases; + XkbPropertyPtr properties; + XkbColorPtr colors; + XkbShapePtr shapes; + XkbSectionPtr sections; + XkbDoodadPtr doodads; + XkbKeyAliasPtr key_aliases; +} XkbGeometryRec; +#define XkbGeomColorIndex(g,c) ((int)((c)-&(g)->colors[0])) + +#define XkbGeomPropertiesMask (1<<0) +#define XkbGeomColorsMask (1<<1) +#define XkbGeomShapesMask (1<<2) +#define XkbGeomSectionsMask (1<<3) +#define XkbGeomDoodadsMask (1<<4) +#define XkbGeomKeyAliasesMask (1<<5) +#define XkbGeomAllMask (0x3f) + +typedef struct _XkbGeometrySizes { + unsigned int which; + unsigned short num_properties; + unsigned short num_colors; + unsigned short num_shapes; + unsigned short num_sections; + unsigned short num_doodads; + unsigned short num_key_aliases; +} XkbGeometrySizesRec,*XkbGeometrySizesPtr; + +_XFUNCPROTOBEGIN + +extern XkbPropertyPtr +XkbAddGeomProperty( + XkbGeometryPtr /* geom */, + char * /* name */, + char * /* value */ +); + +extern XkbKeyAliasPtr +XkbAddGeomKeyAlias( + XkbGeometryPtr /* geom */, + char * /* alias */, + char * /* real */ +); + +extern XkbColorPtr +XkbAddGeomColor( + XkbGeometryPtr /* geom */, + char * /* spec */, + unsigned int /* pixel */ +); + +extern XkbOutlinePtr +XkbAddGeomOutline( + XkbShapePtr /* shape */, + int /* sz_points */ +); + +extern XkbShapePtr +XkbAddGeomShape( + XkbGeometryPtr /* geom */, + Atom /* name */, + int /* sz_outlines */ +); + +extern XkbKeyPtr +XkbAddGeomKey( + XkbRowPtr /* row */ +); + +extern XkbRowPtr +XkbAddGeomRow( + XkbSectionPtr /* section */, + int /* sz_keys */ +); + +extern XkbSectionPtr +XkbAddGeomSection( + XkbGeometryPtr /* geom */, + Atom /* name */, + int /* sz_rows */, + int /* sz_doodads */, + int /* sz_overlays */ +); + +extern XkbOverlayPtr +XkbAddGeomOverlay( + XkbSectionPtr /* section */, + Atom /* name */, + int /* sz_rows */ +); + +extern XkbOverlayRowPtr +XkbAddGeomOverlayRow( + XkbOverlayPtr /* overlay */, + int /* row_under */, + int /* sz_keys */ +); + +extern XkbOverlayKeyPtr +XkbAddGeomOverlayKey( + XkbOverlayPtr /* overlay */, + XkbOverlayRowPtr /* row */, + char * /* over */, + char * /* under */ +); + +extern XkbDoodadPtr +XkbAddGeomDoodad( + XkbGeometryPtr /* geom */, + XkbSectionPtr /* section */, + Atom /* name */ +); + + +extern void +XkbFreeGeomKeyAliases( + XkbGeometryPtr /* geom */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeomColors( + XkbGeometryPtr /* geom */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeomDoodads( + XkbDoodadPtr /* doodads */, + int /* nDoodads */, + Bool /* freeAll */ +); + + +extern void +XkbFreeGeomProperties( + XkbGeometryPtr /* geom */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeomOverlayKeys( + XkbOverlayRowPtr /* row */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeomOverlayRows( + XkbOverlayPtr /* overlay */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeomOverlays( + XkbSectionPtr /* section */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeomKeys( + XkbRowPtr /* row */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeomRows( + XkbSectionPtr /* section */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeomSections( + XkbGeometryPtr /* geom */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + + +extern void +XkbFreeGeomPoints( + XkbOutlinePtr /* outline */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeomOutlines( + XkbShapePtr /* shape */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeomShapes( + XkbGeometryPtr /* geom */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeometry( + XkbGeometryPtr /* geom */, + unsigned int /* which */, + Bool /* freeMap */ +); + +extern Status +XkbAllocGeomProps( + XkbGeometryPtr /* geom */, + int /* nProps */ +); + +extern Status +XkbAllocGeomKeyAliases( + XkbGeometryPtr /* geom */, + int /* nAliases */ +); + +extern Status +XkbAllocGeomColors( + XkbGeometryPtr /* geom */, + int /* nColors */ +); + +extern Status +XkbAllocGeomShapes( + XkbGeometryPtr /* geom */, + int /* nShapes */ +); + +extern Status +XkbAllocGeomSections( + XkbGeometryPtr /* geom */, + int /* nSections */ +); + +extern Status +XkbAllocGeomOverlays( + XkbSectionPtr /* section */, + int /* num_needed */ +); + +extern Status +XkbAllocGeomOverlayRows( + XkbOverlayPtr /* overlay */, + int /* num_needed */ +); + +extern Status +XkbAllocGeomOverlayKeys( + XkbOverlayRowPtr /* row */, + int /* num_needed */ +); + +extern Status +XkbAllocGeomDoodads( + XkbGeometryPtr /* geom */, + int /* nDoodads */ +); + +extern Status +XkbAllocGeomSectionDoodads( + XkbSectionPtr /* section */, + int /* nDoodads */ +); + +extern Status +XkbAllocGeomOutlines( + XkbShapePtr /* shape */, + int /* nOL */ +); + +extern Status +XkbAllocGeomRows( + XkbSectionPtr /* section */, + int /* nRows */ +); + +extern Status +XkbAllocGeomPoints( + XkbOutlinePtr /* ol */, + int /* nPts */ +); + +extern Status +XkbAllocGeomKeys( + XkbRowPtr /* row */, + int /* nKeys */ +); + +extern Status +XkbAllocGeometry( + XkbDescPtr /* xkb */, + XkbGeometrySizesPtr /* sizes */ +); + +extern Bool +XkbComputeShapeTop( + XkbShapePtr /* shape */, + XkbBoundsPtr /* bounds */ +); + +extern Bool +XkbComputeShapeBounds( + XkbShapePtr /* shape */ +); + +extern Bool +XkbComputeRowBounds( + XkbGeometryPtr /* geom */, + XkbSectionPtr /* section */, + XkbRowPtr /* row */ +); + +extern Bool +XkbComputeSectionBounds( + XkbGeometryPtr /* geom */, + XkbSectionPtr /* section */ +); + +extern char * +XkbFindOverlayForKey( + XkbGeometryPtr /* geom */, + XkbSectionPtr /* wanted */, + char * /* under */ +); + +_XFUNCPROTOEND + +#endif /* _XKBGEOM_H_ */ diff --git a/xkb/xkbout.c b/xkb/xkbout.c index 8905ef4d3..229cc9258 100644 --- a/xkb/xkbout.c +++ b/xkb/xkbout.c @@ -40,19 +40,19 @@ #include "misc.h" #include "inputstr.h" #include "dix.h" -#include <X11/extensions/XKBstr.h> +#include "xkbstr.h" #define XKBSRV_NEED_FILE_FUNCS 1 #include <xkbsrv.h> -#include <X11/extensions/XKBgeom.h> -#include <X11/extensions/XKBfile.h> +#include "xkbgeom.h" +#include "xkbfile.h" #define VMOD_HIDE_VALUE 0 #define VMOD_SHOW_VALUE 1 #define VMOD_COMMENT_VALUE 2 static Bool -WriteXKBVModDecl(FILE *file,Display *dpy,XkbDescPtr xkb,int showValue) +WriteXKBVModDecl(FILE *file,XkbDescPtr xkb,int showValue) { register int i,nMods; Atom * vmodNames; @@ -67,7 +67,7 @@ Atom * vmodNames; if ((vmodNames!=NULL)&&(vmodNames[i]!=None)) { if (nMods==0) fprintf(file," virtual_modifiers "); else fprintf(file,","); - fprintf(file,"%s",XkbAtomText(dpy,vmodNames[i],XkbXKBFile)); + fprintf(file,"%s",XkbAtomText(vmodNames[i],XkbXKBFile)); if ((showValue!=VMOD_HIDE_VALUE)&& (xkb->server)&&(xkb->server->vmods[i]!=XkbNoModifierMask)) { if (showValue==VMOD_COMMENT_VALUE) { @@ -90,14 +90,9 @@ Atom * vmodNames; /***====================================================================***/ static Bool -WriteXKBAction(FILE *file,XkbFileInfo *result,XkbAnyAction *action) +WriteXKBAction(FILE *file,XkbDescPtr xkb,XkbAnyAction *action) { -XkbDescPtr xkb; -Display * dpy; - - xkb= result->xkb; - dpy= xkb->dpy; - fprintf(file,"%s",XkbActionText(dpy,xkb,(XkbAction *)action,XkbXKBFile)); + fprintf(file,"%s",XkbActionText(xkb,(XkbAction *)action,XkbXKBFile)); return True; } @@ -105,7 +100,7 @@ Display * dpy; Bool XkbWriteXKBKeycodes( FILE * file, - XkbFileInfo * result, + XkbDescPtr xkb, Bool topLevel, Bool showImplicit, XkbFileAddOnFunc addOn, @@ -113,12 +108,8 @@ XkbWriteXKBKeycodes( FILE * file, { Atom kcName; register unsigned i; -XkbDescPtr xkb; -Display * dpy; char * alternate; - xkb= result->xkb; - dpy= xkb->dpy; if ((!xkb)||(!xkb->names)||(!xkb->names->keys)) { _XkbLibError(_XkbErrMissingNames,"XkbWriteXKBKeycodes",0); return False; @@ -126,7 +117,7 @@ char * alternate; kcName= xkb->names->keycodes; if (kcName!=None) fprintf(file,"xkb_keycodes \"%s\" {\n", - XkbAtomText(dpy,kcName,XkbXKBFile)); + XkbAtomText(kcName,XkbXKBFile)); else fprintf(file,"xkb_keycodes {\n"); fprintf(file," minimum = %d;\n",xkb->min_key_code); fprintf(file," maximum = %d;\n",xkb->max_key_code); @@ -148,7 +139,7 @@ char * alternate; else type= " virtual "; if (xkb->names->indicators[i]!=None) { fprintf(file,"%sindicator %d = \"%s\";\n",type,i+1, - XkbAtomText(dpy,xkb->names->indicators[i],XkbXKBFile)); + XkbAtomText(xkb->names->indicators[i],XkbXKBFile)); } } } @@ -162,27 +153,23 @@ char * alternate; } } if (addOn) - (*addOn)(file,result,topLevel,showImplicit,XkmKeyNamesIndex,priv); + (*addOn)(file,xkb,topLevel,showImplicit,XkmKeyNamesIndex,priv); fprintf(file,"};\n\n"); return True; } Bool XkbWriteXKBKeyTypes( FILE * file, - XkbFileInfo * result, + XkbDescPtr xkb, Bool topLevel, Bool showImplicit, XkbFileAddOnFunc addOn, void * priv) { -Display * dpy; register unsigned i,n; XkbKeyTypePtr type; XkbKTMapEntryPtr entry; -XkbDescPtr xkb; - xkb= result->xkb; - dpy= xkb->dpy; if ((!xkb)||(!xkb->map)||(!xkb->map->types)) { _XkbLibError(_XkbErrMissingTypes,"XkbWriteXKBKeyTypes",0); return False; @@ -194,27 +181,27 @@ XkbDescPtr xkb; if ((xkb->names==NULL)||(xkb->names->types==None)) fprintf(file,"xkb_types {\n\n"); else fprintf(file,"xkb_types \"%s\" {\n\n", - XkbAtomText(dpy,xkb->names->types,XkbXKBFile)); - WriteXKBVModDecl(file,dpy,xkb, + XkbAtomText(xkb->names->types,XkbXKBFile)); + WriteXKBVModDecl(file,xkb, (showImplicit?VMOD_COMMENT_VALUE:VMOD_HIDE_VALUE)); type= xkb->map->types; for (i=0;i<xkb->map->num_types;i++,type++) { fprintf(file," type \"%s\" {\n", - XkbAtomText(dpy,type->name,XkbXKBFile)); + XkbAtomText(type->name,XkbXKBFile)); fprintf(file," modifiers= %s;\n", - XkbVModMaskText(dpy,xkb,type->mods.real_mods,type->mods.vmods, + XkbVModMaskText(xkb,type->mods.real_mods,type->mods.vmods, XkbXKBFile)); entry= type->map; for (n=0;n<type->map_count;n++,entry++) { char *str; - str=XkbVModMaskText(dpy,xkb,entry->mods.real_mods,entry->mods.vmods, + str=XkbVModMaskText(xkb,entry->mods.real_mods,entry->mods.vmods, XkbXKBFile); fprintf(file," map[%s]= Level%d;\n",str,entry->level+1); if ((type->preserve)&&((type->preserve[n].real_mods)|| (type->preserve[n].vmods))) { fprintf(file," preserve[%s]= ",str); - fprintf(file,"%s;\n",XkbVModMaskText(dpy,xkb, + fprintf(file,"%s;\n",XkbVModMaskText(xkb, type->preserve[n].real_mods, type->preserve[n].vmods, XkbXKBFile)); @@ -226,29 +213,27 @@ XkbDescPtr xkb; if ((*name)==None) continue; fprintf(file," level_name[Level%d]= \"%s\";\n",n+1, - XkbAtomText(dpy,*name,XkbXKBFile)); + XkbAtomText(*name,XkbXKBFile)); } } fprintf(file," };\n"); } if (addOn) - (*addOn)(file,result,topLevel,showImplicit,XkmTypesIndex,priv); + (*addOn)(file,xkb,topLevel,showImplicit,XkmTypesIndex,priv); fprintf(file,"};\n\n"); return True; } static Bool WriteXKBIndicatorMap( FILE * file, - XkbFileInfo * result, + XkbDescPtr xkb, Atom name, XkbIndicatorMapPtr led, XkbFileAddOnFunc addOn, void * priv) { -XkbDescPtr xkb; - xkb= result->xkb; - fprintf(file," indicator \"%s\" {\n",XkbAtomGetString(xkb->dpy,name)); + fprintf(file," indicator \"%s\" {\n",XkbAtomGetString(name)); if (led->flags&XkbIM_NoExplicit) fprintf(file," !allowExplicit;\n"); if (led->flags&XkbIM_LEDDrivesKB) @@ -266,7 +251,7 @@ XkbDescPtr xkb; XkbIMWhichStateMaskText(led->which_mods,XkbXKBFile)); } fprintf(file," modifiers= %s;\n", - XkbVModMaskText(xkb->dpy,xkb, + XkbVModMaskText(xkb, led->mods.real_mods,led->mods.vmods, XkbXKBFile)); } @@ -275,26 +260,22 @@ XkbDescPtr xkb; XkbControlsMaskText(led->ctrls,XkbXKBFile)); } if (addOn) - (*addOn)(file,result,False,True,XkmIndicatorsIndex,priv); + (*addOn)(file,xkb,False,True,XkmIndicatorsIndex,priv); fprintf(file," };\n"); return True; } Bool XkbWriteXKBCompatMap( FILE * file, - XkbFileInfo * result, + XkbDescPtr xkb, Bool topLevel, Bool showImplicit, XkbFileAddOnFunc addOn, void * priv) { -Display * dpy; register unsigned i; XkbSymInterpretPtr interp; -XkbDescPtr xkb; - xkb= result->xkb; - dpy= xkb->dpy; if ((!xkb)||(!xkb->compat)||(!xkb->compat->sym_interpret)) { _XkbLibError(_XkbErrMissingCompatMap,"XkbWriteXKBCompatMap",0); return False; @@ -302,8 +283,8 @@ XkbDescPtr xkb; if ((xkb->names==NULL)||(xkb->names->compat==None)) fprintf(file,"xkb_compatibility {\n\n"); else fprintf(file,"xkb_compatibility \"%s\" {\n\n", - XkbAtomText(dpy,xkb->names->compat,XkbXKBFile)); - WriteXKBVModDecl(file,dpy,xkb, + XkbAtomText(xkb->names->compat,XkbXKBFile)); + WriteXKBVModDecl(file,xkb, (showImplicit?VMOD_COMMENT_VALUE:VMOD_HIDE_VALUE)); fprintf(file," interpret.useModMapMods= AnyLevel;\n"); @@ -318,7 +299,7 @@ XkbDescPtr xkb; XkbModMaskText(interp->mods,XkbXKBFile)); if (interp->virtual_mod!=XkbNoModifier) { fprintf(file," virtualModifier= %s;\n", - XkbVModIndexText(dpy,xkb,interp->virtual_mod,XkbXKBFile)); + XkbVModIndexText(xkb,interp->virtual_mod,XkbXKBFile)); } if (interp->match&XkbSI_LevelOneOnly) fprintf(file," useModMapMods=level1;\n"); @@ -327,7 +308,7 @@ XkbDescPtr xkb; if (interp->flags&XkbSI_AutoRepeat) fprintf(file," repeat= True;\n"); fprintf(file," action= "); - WriteXKBAction(file,result,&interp->act); + WriteXKBAction(file,xkb,&interp->act); fprintf(file,";\n"); fprintf(file," };\n"); } @@ -337,7 +318,7 @@ XkbDescPtr xkb; gc= &xkb->compat->groups[i]; if ((gc->real_mods==0)&&(gc->vmods==0)) continue; - fprintf(file," group %d = %s;\n",i+1,XkbVModMaskText(xkb->dpy,xkb, + fprintf(file," group %d = %s;\n",i+1,XkbVModMaskText(xkb, gc->real_mods,gc->vmods, XkbXKBFile)); } @@ -348,36 +329,32 @@ XkbDescPtr xkb; (map->which_mods!=0)|| (map->mods.real_mods!=0)||(map->mods.vmods!=0)|| (map->ctrls!=0)) { - WriteXKBIndicatorMap(file,result,xkb->names->indicators[i],map, + WriteXKBIndicatorMap(file,xkb,xkb->names->indicators[i],map, addOn,priv); } } } if (addOn) - (*addOn)(file,result,topLevel,showImplicit,XkmCompatMapIndex,priv); + (*addOn)(file,xkb,topLevel,showImplicit,XkmCompatMapIndex,priv); fprintf(file,"};\n\n"); return True; } Bool XkbWriteXKBSymbols( FILE * file, - XkbFileInfo * result, + XkbDescPtr xkb, Bool topLevel, Bool showImplicit, XkbFileAddOnFunc addOn, void * priv) { -Display * dpy; register unsigned i,tmp; -XkbDescPtr xkb; XkbClientMapPtr map; XkbServerMapPtr srv; Bool showActions; - xkb= result->xkb; map= xkb->map; srv= xkb->server; - dpy= xkb->dpy; if ((!xkb)||(!map)||(!map->syms)||(!map->key_sym_map)) { _XkbLibError(_XkbErrMissingSymbols,"XkbWriteXKBSymbols",0); return False; @@ -389,11 +366,11 @@ Bool showActions; if ((xkb->names==NULL)||(xkb->names->symbols==None)) fprintf(file,"xkb_symbols {\n\n"); else fprintf(file,"xkb_symbols \"%s\" {\n\n", - XkbAtomText(dpy,xkb->names->symbols,XkbXKBFile)); + XkbAtomText(xkb->names->symbols,XkbXKBFile)); for (tmp=i=0;i<XkbNumKbdGroups;i++) { if (xkb->names->groups[i]!=None) { fprintf(file," name[group%d]=\"%s\";\n",i+1, - XkbAtomText(dpy,xkb->names->groups[i],XkbXKBFile)); + XkbAtomText(xkb->names->groups[i],XkbXKBFile)); tmp++; } } @@ -429,19 +406,19 @@ Bool showActions; if (srv->explicit[i]&(1<<g)) { fprintf(file,"\n%s type[group%d]= \"%s\",", comment,g+1, - XkbAtomText(dpy,map->types[typeNdx].name, + XkbAtomText(map->types[typeNdx].name, XkbXKBFile)); } else if (showImplicit) { fprintf(file,"\n// type[group%d]= \"%s\",",g+1, - XkbAtomText(dpy,map->types[typeNdx].name, + XkbAtomText(map->types[typeNdx].name, XkbXKBFile)); } } } else { fprintf(file,"\n%s type= \"%s\",",comment, - XkbAtomText(dpy,map->types[typeNdx].name, + XkbAtomText(map->types[typeNdx].name, XkbXKBFile)); } simple= False; @@ -457,13 +434,13 @@ Bool showActions; (xkb->server->vmodmap[i]!=0)) { if ((srv->explicit[i]&XkbExplicitVModMapMask)!=0) { fprintf(file,"\n virtualMods= %s,", - XkbVModMaskText(dpy,xkb,0, + XkbVModMaskText(xkb,0, xkb->server->vmodmap[i], XkbXKBFile)); } else if (showImplicit) { fprintf(file,"\n// virtualMods= %s,", - XkbVModMaskText(dpy,xkb,0, + XkbVModMaskText(xkb,0, xkb->server->vmodmap[i], XkbXKBFile)); } @@ -530,7 +507,7 @@ Bool showActions; for (s=0;s<XkbKeyGroupWidth(xkb,i,g);s++) { if (s!=0) fprintf(file,", "); - WriteXKBAction(file,result,(XkbAnyAction *)&acts[s]); + WriteXKBAction(file,xkb,(XkbAnyAction *)&acts[s]); } fprintf(file," ]"); acts+= XkbKeyGroupsWidth(xkb,i); @@ -556,7 +533,7 @@ Bool showActions; } } if (addOn) - (*addOn)(file,result,topLevel,showImplicit,XkmSymbolsIndex,priv); + (*addOn)(file,xkb,topLevel,showImplicit,XkmSymbolsIndex,priv); fprintf(file,"};\n\n"); return True; } @@ -603,7 +580,6 @@ char * iStr; static Bool WriteXKBDoodad( FILE * file, - Display * dpy, unsigned indent, XkbGeometryPtr geom, XkbDoodadPtr doodad) @@ -615,7 +591,7 @@ XkbColorPtr color; i_str= XkbIndentText(indent); fprintf(file,"%s%s \"%s\" {\n",i_str, XkbDoodadTypeText(doodad->any.type,XkbMessage), - XkbAtomText(dpy,doodad->any.name,XkbMessage)); + XkbAtomText(doodad->any.name,XkbMessage)); fprintf(file,"%s top= %s;\n",i_str, XkbGeomFPText(doodad->any.top,XkbXKBFile)); fprintf(file,"%s left= %s;\n",i_str, @@ -634,7 +610,7 @@ XkbColorPtr color; } shape= XkbShapeDoodadShape(geom,&doodad->shape); fprintf(file,"%s shape= \"%s\";\n",i_str, - XkbAtomText(dpy,shape->name,XkbXKBFile)); + XkbAtomText(shape->name,XkbXKBFile)); break; case XkbTextDoodad: if (doodad->text.angle!=0) { @@ -670,7 +646,7 @@ XkbColorPtr color; fprintf(file,"%s offColor= \"%s\";\n",i_str, XkbStringText(color->spec,XkbXKBFile)); fprintf(file,"%s shape= \"%s\";\n",i_str, - XkbAtomText(dpy,shape->name,XkbXKBFile)); + XkbAtomText(shape->name,XkbXKBFile)); break; case XkbLogoDoodad: fprintf(file,"%s logoName= \"%s\";\n",i_str, @@ -685,7 +661,7 @@ XkbColorPtr color; } shape= XkbLogoDoodadShape(geom,&doodad->logo); fprintf(file,"%s shape= \"%s\";\n",i_str, - XkbAtomText(dpy,shape->name,XkbXKBFile)); + XkbAtomText(shape->name,XkbXKBFile)); break; } fprintf(file,"%s};\n",i_str); @@ -695,7 +671,6 @@ XkbColorPtr color; /*ARGSUSED*/ static Bool WriteXKBOverlay( FILE * file, - Display * dpy, unsigned indent, XkbGeometryPtr geom, XkbOverlayPtr ol) @@ -708,7 +683,7 @@ XkbOverlayKeyPtr key; i_str= XkbIndentText(indent); if (ol->name!=None) { fprintf(file,"%soverlay \"%s\" {\n",i_str, - XkbAtomText(dpy,ol->name,XkbMessage)); + XkbAtomText(ol->name,XkbMessage)); } else fprintf(file,"%soverlay {\n",i_str); for (nOut=r=0,row=ol->rows;r<ol->num_rows;r++,row++) { @@ -730,7 +705,6 @@ XkbOverlayKeyPtr key; static Bool WriteXKBSection( FILE * file, - Display * dpy, XkbSectionPtr s, XkbGeometryPtr geom) { @@ -739,7 +713,7 @@ XkbRowPtr row; int dfltKeyColor = 0; fprintf(file," section \"%s\" {\n", - XkbAtomText(dpy,s->name,XkbXKBFile)); + XkbAtomText(s->name,XkbXKBFile)); if (s->rows&&(s->rows->num_keys>0)) { dfltKeyColor= s->rows->keys[0].color_ndx; fprintf(file," key.color= \"%s\";\n", @@ -788,7 +762,7 @@ int dfltKeyColor = 0; shape= XkbKeyShape(geom,key); fprintf(file,"{ %6s, \"%s\", %3s", XkbKeyNameText(key->name.name,XkbXKBFile), - XkbAtomText(dpy,shape->name,XkbXKBFile), + XkbAtomText(shape->name,XkbXKBFile), XkbGeomFPText(key->gap,XkbXKBFile)); if (key->color_ndx!=dfltKeyColor) { fprintf(file,", color=\"%s\"",XkbKeyColor(geom,key)->spec); @@ -803,44 +777,40 @@ int dfltKeyColor = 0; if (s->doodads!=NULL) { XkbDoodadPtr doodad; for (i=0,doodad=s->doodads;i<s->num_doodads;i++,doodad++) { - WriteXKBDoodad(file,dpy,8,geom,doodad); + WriteXKBDoodad(file,8,geom,doodad); } } if (s->overlays!=NULL) { XkbOverlayPtr ol; for (i=0,ol=s->overlays;i<s->num_overlays;i++,ol++) { - WriteXKBOverlay(file,dpy,8,geom,ol); + WriteXKBOverlay(file,8,geom,ol); } } fprintf(file," }; // End of \"%s\" section\n\n", - XkbAtomText(dpy,s->name,XkbXKBFile)); + XkbAtomText(s->name,XkbXKBFile)); return True; } Bool XkbWriteXKBGeometry( FILE * file, - XkbFileInfo * result, + XkbDescPtr xkb, Bool topLevel, Bool showImplicit, XkbFileAddOnFunc addOn, void * priv) { -Display * dpy; register unsigned i,n; -XkbDescPtr xkb; XkbGeometryPtr geom; - xkb= result->xkb; if ((!xkb)||(!xkb->geom)) { _XkbLibError(_XkbErrMissingGeometry,"XkbWriteXKBGeometry",0); return False; } - dpy= xkb->dpy; geom= xkb->geom; if (geom->name==None) fprintf(file,"xkb_geometry {\n\n"); else fprintf(file,"xkb_geometry \"%s\" {\n\n", - XkbAtomText(dpy,geom->name,XkbXKBFile)); + XkbAtomText(geom->name,XkbXKBFile)); fprintf(file," width= %s;\n", XkbGeomFPText(geom->width_mm,XkbXKBFile)); fprintf(file," height= %s;\n\n", @@ -889,7 +859,7 @@ XkbGeometryPtr geom; for (shape=geom->shapes,i=0;i<geom->num_shapes;i++,shape++) { lastR=0; fprintf(file," shape \"%s\" {", - XkbAtomText(dpy,shape->name,XkbXKBFile)); + XkbAtomText(shape->name,XkbXKBFile)); outline= shape->outlines; if (shape->num_outlines>1) { for (n=0;n<shape->num_outlines;n++,outline++) { @@ -909,17 +879,17 @@ XkbGeometryPtr geom; if (geom->num_sections>0) { XkbSectionPtr section; for (section=geom->sections,i=0;i<geom->num_sections;i++,section++){ - WriteXKBSection(file,dpy,section,geom); + WriteXKBSection(file,section,geom); } } if (geom->num_doodads>0) { XkbDoodadPtr doodad; for (i=0,doodad=geom->doodads;i<geom->num_doodads;i++,doodad++) { - WriteXKBDoodad(file,dpy,4,geom,doodad); + WriteXKBDoodad(file,4,geom,doodad); } } if (addOn) - (*addOn)(file,result,topLevel,showImplicit,XkmGeometryIndex,priv); + (*addOn)(file,xkb,topLevel,showImplicit,XkmGeometryIndex,priv); fprintf(file,"};\n\n"); return True; } diff --git a/xkb/xkbtext.c b/xkb/xkbtext.c index 4983e2b9e..d08c91589 100644 --- a/xkb/xkbtext.c +++ b/xkb/xkbtext.c @@ -40,10 +40,10 @@ #include "misc.h" #include "inputstr.h" #include "dix.h" -#include <X11/extensions/XKBstr.h> +#include "xkbstr.h" #define XKBSRV_NEED_FILE_FUNCS 1 #include <xkbsrv.h> -#include <X11/extensions/XKBgeom.h> +#include "xkbgeom.h" /***====================================================================***/ @@ -69,11 +69,11 @@ char *rtrn; /***====================================================================***/ char * -XkbAtomText(Display *dpy,Atom atm,unsigned format) +XkbAtomText(Atom atm,unsigned format) { char *rtrn,*tmp; - tmp= XkbAtomGetString(dpy,atm); + tmp= XkbAtomGetString(atm); if (tmp!=NULL) { int len; len= strlen(tmp)+1; @@ -101,7 +101,7 @@ char *rtrn,*tmp; /***====================================================================***/ char * -XkbVModIndexText(Display *dpy,XkbDescPtr xkb,unsigned ndx,unsigned format) +XkbVModIndexText(XkbDescPtr xkb,unsigned ndx,unsigned format) { register int len; register Atom *vmodNames; @@ -116,7 +116,7 @@ char numBuf[20]; if (ndx>=XkbNumVirtualMods) tmp= "illegal"; else if (vmodNames&&(vmodNames[ndx]!=None)) - tmp= XkbAtomGetString(dpy,vmodNames[ndx]); + tmp= XkbAtomGetString(vmodNames[ndx]); if (tmp==NULL) sprintf(tmp=numBuf,"%d",ndx); @@ -135,8 +135,7 @@ char numBuf[20]; } char * -XkbVModMaskText( Display * dpy, - XkbDescPtr xkb, +XkbVModMaskText( XkbDescPtr xkb, unsigned modMask, unsigned mask, unsigned format) @@ -163,7 +162,7 @@ char *str,buf[BUFFER_SIZE]; char *tmp; for (i=0,bit=1;i<XkbNumVirtualMods;i++,bit<<=1) { if (mask&bit) { - tmp= XkbVModIndexText(dpy,xkb,i,format); + tmp= XkbVModIndexText(xkb,i,format); len= strlen(tmp)+1+(str==buf?0:1); if (format==XkbCFile) len+= 4; @@ -667,13 +666,13 @@ register int len; /*ARGSUSED*/ static Bool -CopyNoActionArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int*sz) +CopyNoActionArgs(XkbDescPtr xkb,XkbAction *action,char *buf,int*sz) { return True; } static Bool -CopyModActionArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf, +CopyModActionArgs(XkbDescPtr xkb,XkbAction *action,char *buf, int* sz) { XkbModAction * act; @@ -686,7 +685,7 @@ unsigned tmp; TryCopyStr(buf,"modMapMods",sz); else if (act->real_mods || tmp) { TryCopyStr(buf, - XkbVModMaskText(dpy,xkb,act->real_mods,tmp,XkbXKBFile), + XkbVModMaskText(xkb,act->real_mods,tmp,XkbXKBFile), sz); } else TryCopyStr(buf,"none",sz); @@ -701,7 +700,7 @@ unsigned tmp; /*ARGSUSED*/ static Bool -CopyGroupActionArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf, +CopyGroupActionArgs(XkbDescPtr xkb,XkbAction *action,char *buf, int *sz) { XkbGroupAction * act; @@ -726,7 +725,7 @@ char tbuf[32]; /*ARGSUSED*/ static Bool -CopyMovePtrArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int *sz) +CopyMovePtrArgs(XkbDescPtr xkb,XkbAction *action,char *buf,int *sz) { XkbPtrAction * act; int x,y; @@ -751,7 +750,7 @@ char tbuf[32]; /*ARGSUSED*/ static Bool -CopyPtrBtnArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int *sz) +CopyPtrBtnArgs(XkbDescPtr xkb,XkbAction *action,char *buf,int *sz) { XkbPtrBtnAction * act; char tbuf[32]; @@ -785,7 +784,7 @@ char tbuf[32]; /*ARGSUSED*/ static Bool -CopySetPtrDfltArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf, +CopySetPtrDfltArgs(XkbDescPtr xkb,XkbAction *action,char *buf, int *sz) { XkbPtrDfltAction * act; @@ -803,7 +802,7 @@ char tbuf[32]; } static Bool -CopyISOLockArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int *sz) +CopyISOLockArgs(XkbDescPtr xkb,XkbAction *action,char *buf,int *sz) { XkbISOAction * act; char tbuf[64]; @@ -831,7 +830,7 @@ char tbuf[64]; TryCopyStr(buf,"+",sz); } if (tmp) - TryCopyStr(buf,XkbVModMaskText(dpy,xkb,0,tmp,XkbXKBFile),sz); + TryCopyStr(buf,XkbVModMaskText(xkb,0,tmp,XkbXKBFile),sz); } else TryCopyStr(buf,"none",sz); } @@ -865,7 +864,7 @@ char tbuf[64]; /*ARGSUSED*/ static Bool -CopySwitchScreenArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf, +CopySwitchScreenArgs(XkbDescPtr xkb,XkbAction *action,char *buf, int *sz) { XkbSwitchScreenAction * act; @@ -884,7 +883,7 @@ char tbuf[32]; /*ARGSUSED*/ static Bool -CopySetLockControlsArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action, +CopySetLockControlsArgs(XkbDescPtr xkb,XkbAction *action, char *buf,int *sz) { XkbCtrlsAction * act; @@ -971,7 +970,7 @@ char tbuf[32]; /*ARGSUSED*/ static Bool -CopyActionMessageArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf, +CopyActionMessageArgs(XkbDescPtr xkb,XkbAction *action,char *buf, int *sz) { XkbMessageAction * act; @@ -998,7 +997,7 @@ char tbuf[32]; } static Bool -CopyRedirectKeyArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf, +CopyRedirectKeyArgs(XkbDescPtr xkb,XkbAction *action,char *buf, int *sz) { XkbRedirectKeyAction * act; @@ -1022,19 +1021,19 @@ unsigned vmods,vmods_mask; return True; if ((act->mods_mask==XkbAllModifiersMask)&& (vmods_mask==XkbAllVirtualModsMask)) { - tmp= XkbVModMaskText(dpy,xkb,act->mods,vmods,XkbXKBFile); + tmp= XkbVModMaskText(xkb,act->mods,vmods,XkbXKBFile); TryCopyStr(buf,",mods=",sz); TryCopyStr(buf,tmp,sz); } else { if ((act->mods_mask&act->mods)||(vmods_mask&vmods)) { - tmp= XkbVModMaskText(dpy,xkb,act->mods_mask&act->mods, + tmp= XkbVModMaskText(xkb,act->mods_mask&act->mods, vmods_mask&vmods,XkbXKBFile); TryCopyStr(buf,",mods= ",sz); TryCopyStr(buf,tmp,sz); } if ((act->mods_mask&(~act->mods))||(vmods_mask&(~vmods))) { - tmp= XkbVModMaskText(dpy,xkb,act->mods_mask&(~act->mods), + tmp= XkbVModMaskText(xkb,act->mods_mask&(~act->mods), vmods_mask&(~vmods),XkbXKBFile); TryCopyStr(buf,",clearMods= ",sz); TryCopyStr(buf,tmp,sz); @@ -1045,7 +1044,7 @@ unsigned vmods,vmods_mask; /*ARGSUSED*/ static Bool -CopyDeviceBtnArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf, +CopyDeviceBtnArgs(XkbDescPtr xkb,XkbAction *action,char *buf, int *sz) { XkbDeviceBtnAction * act; @@ -1078,7 +1077,7 @@ char tbuf[32]; /*ARGSUSED*/ static Bool -CopyOtherArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int *sz) +CopyOtherArgs(XkbDescPtr xkb,XkbAction *action,char *buf,int *sz) { XkbAnyAction * act; char tbuf[32]; @@ -1096,7 +1095,6 @@ char tbuf[32]; } typedef Bool (*actionCopy)( - Display * /* dpy */, XkbDescPtr /* xkb */, XkbAction * /* action */, char * /* buf */, @@ -1128,7 +1126,7 @@ static actionCopy copyActionArgs[XkbSA_NumActions] = { #define ACTION_SZ 256 char * -XkbActionText(Display *dpy,XkbDescPtr xkb,XkbAction *action,unsigned format) +XkbActionText(XkbDescPtr xkb,XkbAction *action,unsigned format) { char buf[ACTION_SZ],*tmp; int sz; @@ -1145,8 +1143,8 @@ int sz; sprintf(buf,"%s(",XkbActionTypeText(action->type,XkbXKBFile)); sz= ACTION_SZ-strlen(buf)+2; /* room for close paren and NULL */ if (action->type<(unsigned)XkbSA_NumActions) - (*copyActionArgs[action->type])(dpy,xkb,action,buf,&sz); - else CopyOtherArgs(dpy,xkb,action,buf,&sz); + (*copyActionArgs[action->type])(xkb,action,buf,&sz); + else CopyOtherArgs(xkb,action,buf,&sz); TryCopyStr(buf,")",&sz); } tmp= tbGetBuffer(strlen(buf)+1); diff --git a/xkb/xkmread.c b/xkb/xkmread.c index c6c18422d..b14a5beda 100644 --- a/xkb/xkmread.c +++ b/xkb/xkmread.c @@ -39,23 +39,18 @@ #include <X11/keysym.h> #include "misc.h" #include "inputstr.h" -#include <X11/extensions/XKBstr.h> -#define XKBSRV_NEED_FILE_FUNCS -#include <xkbsrv.h> -#include <X11/extensions/XKBgeom.h> +#include "xkbstr.h" +#include "xkbsrv.h" +#include "xkbgeom.h" Atom -XkbInternAtom(Display *dpy,char *str,Bool only_if_exists) +XkbInternAtom(char *str,Bool only_if_exists) { if (str==NULL) return None; return MakeAtom(str,strlen(str),!only_if_exists); } -#ifndef SEEK_SET -#define SEEK_SET 0 -#endif - char * _XkbDupString(char *str) { @@ -71,18 +66,18 @@ char *new; /***====================================================================***/ -static XPointer -XkmInsureSize(XPointer oldPtr,int oldCount,int *newCountRtrn,int elemSize) +static void * +XkmInsureSize(void *oldPtr,int oldCount,int *newCountRtrn,int elemSize) { int newCount= *newCountRtrn; if (oldPtr==NULL) { if (newCount==0) return NULL; - oldPtr= (XPointer)_XkbCalloc(newCount,elemSize); + oldPtr= _XkbCalloc(newCount,elemSize); } else if (oldCount<newCount) { - oldPtr= (XPointer)_XkbRealloc(oldPtr,newCount*elemSize); + oldPtr= _XkbRealloc(oldPtr,newCount*elemSize); if (oldPtr!=NULL) { char *tmp= (char *)oldPtr; bzero(&tmp[oldCount*elemSize],(newCount-oldCount)*elemSize); @@ -170,14 +165,12 @@ int count,nRead=0; /***====================================================================***/ static int -ReadXkmVirtualMods(FILE *file,XkbFileInfo *result,XkbChangesPtr changes) +ReadXkmVirtualMods(FILE *file,XkbDescPtr xkb,XkbChangesPtr changes) { register unsigned int i,bit; unsigned int bound,named,tmp; int nRead=0; -XkbDescPtr xkb; - xkb= result->xkb; if (XkbAllocServerMap(xkb,XkbVirtualModsMask,0)!=Success) { _XkbLibError(_XkbErrBadAlloc,"ReadXkmVirtualMods",0); return -1; @@ -202,7 +195,7 @@ XkbDescPtr xkb; char name[100]; if (named&bit) { if (nRead+=XkmGetCountedString(file,name,100)) { - xkb->names->vmods[i]= XkbInternAtom(xkb->dpy,name,False); + xkb->names->vmods[i]= XkbInternAtom(name,False); if (changes) changes->names.changed_vmods|= bit; } @@ -214,16 +207,14 @@ XkbDescPtr xkb; /***====================================================================***/ static int -ReadXkmKeycodes(FILE *file,XkbFileInfo *result,XkbChangesPtr changes) +ReadXkmKeycodes(FILE *file,XkbDescPtr xkb,XkbChangesPtr changes) { register int i; unsigned minKC,maxKC,nAl; int nRead=0; char name[100]; XkbKeyNamePtr pN; -XkbDescPtr xkb; - xkb= result->xkb; name[0]= '\0'; nRead+= XkmGetCountedString(file,name,100); minKC= XkmGetCARD8(file,&nRead); @@ -249,7 +240,7 @@ XkbDescPtr xkb; return -1; } if (name[0]!='\0') { - xkb->names->keycodes= XkbInternAtom(xkb->dpy,name,False); + xkb->names->keycodes= XkbInternAtom(name,False); } for (pN=&xkb->names->keys[minKC],i=minKC;i<=(int)maxKC;i++,pN++) { @@ -281,7 +272,7 @@ XkbDescPtr xkb; /***====================================================================***/ static int -ReadXkmKeyTypes(FILE *file,XkbFileInfo *result,XkbChangesPtr changes) +ReadXkmKeyTypes(FILE *file,XkbDescPtr xkb,XkbChangesPtr changes) { register unsigned i,n; unsigned num_types; @@ -292,9 +283,7 @@ xkmKeyTypeDesc wire; XkbKTMapEntryPtr entry; xkmKTMapEntryDesc wire_entry; char buf[100]; -XkbDescPtr xkb; - xkb= result->xkb; if ((tmp= XkmGetCountedString(file,buf,100))<1) { _XkbLibError(_XkbErrBadLength,"ReadXkmKeyTypes",0); return -1; @@ -305,7 +294,7 @@ XkbDescPtr xkb; _XkbLibError(_XkbErrBadAlloc,"ReadXkmKeyTypes",0); return -1; } - xkb->names->types= XkbInternAtom(xkb->dpy,buf,False); + xkb->names->types= XkbInternAtom(buf,False); } num_types= XkmGetCARD16(file,&nRead); nRead+= XkmSkipPadding(file,2); @@ -360,7 +349,7 @@ XkbDescPtr xkb; return -1; } if (buf[0]!='\0') { - type->name= XkbInternAtom(xkb->dpy,buf,False); + type->name= XkbInternAtom(buf,False); } else type->name= None; @@ -398,7 +387,7 @@ XkbDescPtr xkb; nRead+= tmp; if (strlen(buf)==0) type->level_names[n]= None; - else type->level_names[n]= XkbInternAtom(xkb->dpy,buf,0); + else type->level_names[n]= XkbInternAtom(buf,0); } } } @@ -419,7 +408,7 @@ XkbDescPtr xkb; /***====================================================================***/ static int -ReadXkmCompatMap(FILE *file,XkbFileInfo *result,XkbChangesPtr changes) +ReadXkmCompatMap(FILE *file,XkbDescPtr xkb,XkbChangesPtr changes) { register int i; unsigned num_si,groups; @@ -428,10 +417,8 @@ XkbSymInterpretPtr interp; xkmSymInterpretDesc wire; unsigned tmp; int nRead=0; -XkbDescPtr xkb; XkbCompatMapPtr compat; - xkb= result->xkb; if ((tmp= XkmGetCountedString(file,name,100))<1) { _XkbLibError(_XkbErrBadLength,"ReadXkmCompatMap",0); return -1; @@ -442,7 +429,7 @@ XkbCompatMapPtr compat; _XkbLibError(_XkbErrBadAlloc,"ReadXkmCompatMap",0); return -1; } - xkb->names->compat= XkbInternAtom(xkb->dpy,name,False); + xkb->names->compat= XkbInternAtom(name,False); } num_si= XkmGetCARD16(file,&nRead); groups= XkmGetCARD8(file,&nRead); @@ -497,16 +484,14 @@ XkbCompatMapPtr compat; } static int -ReadXkmIndicators(FILE *file,XkbFileInfo *result,XkbChangesPtr changes) +ReadXkmIndicators(FILE *file,XkbDescPtr xkb,XkbChangesPtr changes) { register unsigned nLEDs; xkmIndicatorMapDesc wire; char buf[100]; unsigned tmp; int nRead=0; -XkbDescPtr xkb; - xkb= result->xkb; if ((xkb->indicators==NULL)&&(XkbAllocIndicatorMaps(xkb)!=Success)) { _XkbLibError(_XkbErrBadAlloc,"indicator rec",0); return -1; @@ -528,7 +513,7 @@ XkbDescPtr xkb; } nRead+= tmp; if (buf[0]!='\0') - name= XkbInternAtom(xkb->dpy,buf,False); + name= XkbInternAtom(buf,False); else name= None; if ((tmp=fread(&wire,SIZEOF(xkmIndicatorMapDesc),1,file))<1) { _XkbLibError(_XkbErrBadLength,"ReadXkmIndicators",0); @@ -562,10 +547,8 @@ FindTypeForKey(XkbDescPtr xkb,Atom name,unsigned width,KeySym *syms) register unsigned i; for (i=0;i<xkb->map->num_types;i++) { if (xkb->map->types[i].name==name) { -#ifdef DEBUG if (xkb->map->types[i].num_levels!=width) - fprintf(stderr,"Group width mismatch between key and type\n"); -#endif + DebugF("Group width mismatch between key and type\n"); return &xkb->map->types[i]; } } @@ -582,16 +565,14 @@ FindTypeForKey(XkbDescPtr xkb,Atom name,unsigned width,KeySym *syms) } static int -ReadXkmSymbols(FILE *file,XkbFileInfo *result) +ReadXkmSymbols(FILE *file,XkbDescPtr xkb) { register int i,g,s,totalVModMaps; xkmKeySymMapDesc wireMap; char buf[100]; unsigned minKC,maxKC,groupNames,tmp; int nRead=0; -XkbDescPtr xkb; - xkb= result->xkb; if ((tmp=XkmGetCountedString(file,buf,100))<1) return -1; nRead+= tmp; @@ -607,7 +588,7 @@ XkbDescPtr xkb; } if ((buf[0]!='\0')&&(xkb->names)) { Atom name; - name= XkbInternAtom(xkb->dpy,buf,0); + name= XkbInternAtom(buf,0); xkb->names->symbols= name; xkb->names->phys_symbols= name; } @@ -618,7 +599,7 @@ XkbDescPtr xkb; nRead+= tmp; if ((buf[0]!='\0')&&(xkb->names)) { Atom name; - name= XkbInternAtom(xkb->dpy,buf,0); + name= XkbInternAtom(buf,0); xkb->names->groups[i]= name; } else xkb->names->groups[i]= None; @@ -661,7 +642,7 @@ XkbDescPtr xkb; for (g=0;g<XkbNumKbdGroups;g++) { if ((wireMap.flags&(1<<g))&& ((tmp=XkmGetCountedString(file,buf,100))>0)) { - typeName[g]= XkbInternAtom(xkb->dpy,buf,1); + typeName[g]= XkbInternAtom(buf,1); nRead+= tmp; } type[g]=FindTypeForKey(xkb,typeName[g],wireMap.width,NULL); @@ -739,7 +720,6 @@ XkbDescPtr xkb; static int ReadXkmGeomDoodad( FILE * file, - Display * dpy, XkbGeometryPtr geom, XkbSectionPtr section) { @@ -752,7 +732,7 @@ int nRead=0; nRead+= XkmGetCountedString(file,buf,100); tmp= fread(&doodadWire,SIZEOF(xkmDoodadDesc),1,file); nRead+= SIZEOF(xkmDoodadDesc)*tmp; - doodad= XkbAddGeomDoodad(geom,section,XkbInternAtom(dpy,buf,False)); + doodad= XkbAddGeomDoodad(geom,section,XkbInternAtom(buf,False)); if (!doodad) return nRead; doodad->any.type= doodadWire.any.type; @@ -797,7 +777,6 @@ int nRead=0; static int ReadXkmGeomOverlay( FILE * file, - Display * dpy, XkbGeometryPtr geom, XkbSectionPtr section) { @@ -813,7 +792,7 @@ register int r; nRead+= XkmGetCountedString(file,buf,100); tmp= fread(&olWire,SIZEOF(xkmOverlayDesc),1,file); nRead+= tmp*SIZEOF(xkmOverlayDesc); - ol= XkbAddGeomOverlay(section,XkbInternAtom(dpy,buf,False), + ol= XkbAddGeomOverlay(section,XkbInternAtom(buf,False), olWire.num_rows); if (!ol) return nRead; @@ -840,7 +819,6 @@ register int r; static int ReadXkmGeomSection( FILE * file, - Display * dpy, XkbGeometryPtr geom) { register int i; @@ -852,7 +830,7 @@ char buf[100]; Atom nameAtom; nRead+= XkmGetCountedString(file,buf,100); - nameAtom= XkbInternAtom(dpy,buf,False); + nameAtom= XkbInternAtom(buf,False); tmp= fread(§ionWire,SIZEOF(xkmSectionDesc),1,file); nRead+= SIZEOF(xkmSectionDesc)*tmp; section= XkbAddGeomSection(geom,nameAtom,sectionWire.num_rows, @@ -903,7 +881,7 @@ Atom nameAtom; } if (sectionWire.num_doodads>0) { for (i=0;i<sectionWire.num_doodads;i++) { - tmp= ReadXkmGeomDoodad(file,dpy,geom,section); + tmp= ReadXkmGeomDoodad(file,geom,section); nRead+= tmp; if (tmp<1) return nRead; @@ -911,7 +889,7 @@ Atom nameAtom; } if (sectionWire.num_overlays>0) { for (i=0;i<sectionWire.num_overlays;i++) { - tmp= ReadXkmGeomOverlay(file,dpy,geom,section); + tmp= ReadXkmGeomOverlay(file,geom,section); nRead+= tmp; if (tmp<1) return nRead; @@ -921,7 +899,7 @@ Atom nameAtom; } static int -ReadXkmGeometry(FILE *file,XkbFileInfo *result) +ReadXkmGeometry(FILE *file,XkbDescPtr xkb) { register int i; char buf[100]; @@ -941,12 +919,12 @@ XkbGeometrySizesRec sizes; sizes.num_sections= wireGeom.num_sections; sizes.num_doodads= wireGeom.num_doodads; sizes.num_key_aliases= wireGeom.num_key_aliases; - if (XkbAllocGeometry(result->xkb,&sizes)!=Success) { + if (XkbAllocGeometry(xkb,&sizes)!=Success) { _XkbLibError(_XkbErrBadAlloc,"ReadXkmGeometry",0); return nRead; } - geom= result->xkb->geom; - geom->name= XkbInternAtom(result->xkb->dpy,buf,False); + geom= xkb->geom; + geom->name= XkbInternAtom(buf,False); geom->width_mm= wireGeom.width_mm; geom->height_mm= wireGeom.height_mm; nRead+= XkmGetCountedString(file,buf,100); @@ -982,7 +960,7 @@ XkbGeometrySizesRec sizes; XkbOutlinePtr ol; xkmOutlineDesc olWire; nRead+= XkmGetCountedString(file,buf,100); - nameAtom= XkbInternAtom(result->xkb->dpy,buf,False); + nameAtom= XkbInternAtom(buf,False); tmp= fread(&shapeWire,SIZEOF(xkmShapeDesc),1,file); nRead+= tmp*SIZEOF(xkmShapeDesc); shape= XkbAddGeomShape(geom,nameAtom,shapeWire.num_outlines); @@ -1021,7 +999,7 @@ XkbGeometrySizesRec sizes; } if (wireGeom.num_sections>0) { for (i=0;i<wireGeom.num_sections;i++) { - tmp= ReadXkmGeomSection(file,result->xkb->dpy,geom); + tmp= ReadXkmGeomSection(file,geom); nRead+= tmp; if (tmp==0) return nRead; @@ -1029,7 +1007,7 @@ XkbGeometrySizesRec sizes; } if (wireGeom.num_doodads>0) { for (i=0;i<wireGeom.num_doodads;i++) { - tmp= ReadXkmGeomDoodad(file,result->xkb->dpy,geom,NULL); + tmp= ReadXkmGeomDoodad(file,geom,NULL); nRead+= tmp; if (tmp==0) return nRead; @@ -1065,7 +1043,7 @@ int nRead=0; return 1; } -Bool +static Bool XkmReadTOC(FILE *file,xkmFileInfo* file_info,int max_toc,xkmSectionInfo *toc) { unsigned hdr,tmp; @@ -1086,10 +1064,8 @@ unsigned i,size_toc; fread(file_info,SIZEOF(xkmFileInfo),1,file); size_toc= file_info->num_toc; if (size_toc>max_toc) { -#ifdef DEBUG - fprintf(stderr,"Warning! Too many TOC entries; last %d ignored\n", + DebugF("Warning! Too many TOC entries; last %d ignored\n", size_toc-max_toc); -#endif size_toc= max_toc; } for (i=0;i<size_toc;i++) { @@ -1098,117 +1074,11 @@ unsigned i,size_toc; return 1; } -Bool -XkmReadFileSection( FILE * file, - xkmSectionInfo * toc, - XkbFileInfo * result, - unsigned * loaded_rtrn) -{ -xkmSectionInfo tmpTOC; -int nRead; - - if ((!result)||(!result->xkb)) { - _XkbLibError(_XkbErrBadMatch,"XkmReadFileSection",0); - return 0; - } - fseek(file,toc->offset,SEEK_SET); - fread(&tmpTOC,SIZEOF(xkmSectionInfo),1,file); - nRead= SIZEOF(xkmSectionInfo); - if ((tmpTOC.type!=toc->type)||(tmpTOC.format!=toc->format)|| - (tmpTOC.size!=toc->size)||(tmpTOC.offset!=toc->offset)) { - _XkbLibError(_XkbErrIllegalContents,"XkmReadFileSection",0); - return 0; - } - switch (tmpTOC.type) { - case XkmVirtualModsIndex: - nRead+= ReadXkmVirtualMods(file,result,NULL); - if ((loaded_rtrn)&&(nRead>=0)) - *loaded_rtrn|= XkmVirtualModsMask; - break; - case XkmTypesIndex: - nRead+= ReadXkmKeyTypes(file,result,NULL); - if ((loaded_rtrn)&&(nRead>=0)) - *loaded_rtrn|= XkmTypesMask; - break; - case XkmCompatMapIndex: - nRead+= ReadXkmCompatMap(file,result,NULL); - if ((loaded_rtrn)&&(nRead>=0)) - *loaded_rtrn|= XkmCompatMapMask; - break; - case XkmKeyNamesIndex: - nRead+= ReadXkmKeycodes(file,result,NULL); - if ((loaded_rtrn)&&(nRead>=0)) - *loaded_rtrn|= XkmKeyNamesMask; - break; - case XkmSymbolsIndex: - nRead+= ReadXkmSymbols(file,result); - if ((loaded_rtrn)&&(nRead>=0)) - *loaded_rtrn|= XkmSymbolsMask; - break; - case XkmIndicatorsIndex: - nRead+= ReadXkmIndicators(file,result,NULL); - if ((loaded_rtrn)&&(nRead>=0)) - *loaded_rtrn|= XkmIndicatorsMask; - break; - case XkmGeometryIndex: - nRead+= ReadXkmGeometry(file,result); - if ((loaded_rtrn)&&(nRead>=0)) - *loaded_rtrn|= XkmGeometryMask; - break; - default: - _XkbLibError(_XkbErrBadImplementation, - XkbConfigText(tmpTOC.type,XkbMessage),0); - nRead= 0; - break; - } - if (nRead!=tmpTOC.size) { - _XkbLibError(_XkbErrBadLength,XkbConfigText(tmpTOC.type,XkbMessage), - nRead-tmpTOC.size); - return 0; - } - return (nRead>=0); -} - -char * -XkmReadFileSectionName(FILE *file,xkmSectionInfo *toc) -{ -xkmSectionInfo tmpTOC; -char name[100]; - - if ((!file)||(!toc)) - return 0; - switch (toc->type) { - case XkmVirtualModsIndex: - case XkmIndicatorsIndex: - break; - case XkmTypesIndex: - case XkmCompatMapIndex: - case XkmKeyNamesIndex: - case XkmSymbolsIndex: - case XkmGeometryIndex: - fseek(file,toc->offset,SEEK_SET); - fread(&tmpTOC,SIZEOF(xkmSectionInfo),1,file); - if ((tmpTOC.type!=toc->type)||(tmpTOC.format!=toc->format)|| - (tmpTOC.size!=toc->size)||(tmpTOC.offset!=toc->offset)) { - _XkbLibError(_XkbErrIllegalContents,"XkmReadFileSectionName",0); - return 0; - } - if (XkmGetCountedString(file,name,100)>0) - return _XkbDupString(name); - break; - default: - _XkbLibError(_XkbErrBadImplementation, - XkbConfigText(tmpTOC.type,XkbMessage),0); - break; - } - return NULL; -} - /***====================================================================***/ #define MAX_TOC 16 unsigned -XkmReadFile(FILE *file,unsigned need,unsigned want,XkbFileInfo *result) +XkmReadFile(FILE *file,unsigned need,unsigned want,XkbDescPtr *xkb) { register unsigned i; xkmSectionInfo toc[MAX_TOC],tmpTOC; @@ -1223,15 +1093,10 @@ unsigned which= need|want; need&(~fileInfo.present)); return which; } - result->type= fileInfo.type; - if (result->xkb==NULL) - result->xkb= XkbAllocKeyboard(); + if (*xkb==NULL) + *xkb= XkbAllocKeyboard(); for (i=0;i<fileInfo.num_toc;i++) { -#ifdef SEEK_SET fseek(file,toc[i].offset,SEEK_SET); -#else - fseek(file,toc[i].offset,0); -#endif tmp= fread(&tmpTOC,SIZEOF(xkmSectionInfo),1,file); nRead= tmp*SIZEOF(xkmSectionInfo); if ((tmpTOC.type!=toc[i].type)||(tmpTOC.format!=toc[i].format)|| @@ -1243,25 +1108,25 @@ unsigned which= need|want; } switch (tmpTOC.type) { case XkmVirtualModsIndex: - tmp= ReadXkmVirtualMods(file,result,NULL); + tmp= ReadXkmVirtualMods(file,*xkb,NULL); break; case XkmTypesIndex: - tmp= ReadXkmKeyTypes(file,result,NULL); + tmp= ReadXkmKeyTypes(file,*xkb,NULL); break; case XkmCompatMapIndex: - tmp= ReadXkmCompatMap(file,result,NULL); + tmp= ReadXkmCompatMap(file,*xkb,NULL); break; case XkmKeyNamesIndex: - tmp= ReadXkmKeycodes(file,result,NULL); + tmp= ReadXkmKeycodes(file,*xkb,NULL); break; case XkmIndicatorsIndex: - tmp= ReadXkmIndicators(file,result,NULL); + tmp= ReadXkmIndicators(file,*xkb,NULL); break; case XkmSymbolsIndex: - tmp= ReadXkmSymbols(file,result); + tmp= ReadXkmSymbols(file,*xkb); break; case XkmGeometryIndex: - tmp= ReadXkmGeometry(file,result); + tmp= ReadXkmGeometry(file,*xkb); break; default: _XkbLibError(_XkbErrBadImplementation, @@ -1272,7 +1137,7 @@ unsigned which= need|want; if (tmp>0) { nRead+= tmp; which&= ~(1<<toc[i].type); - result->defined|= (1<<toc[i].type); + (*xkb)->defined|= (1<<toc[i].type); } if (nRead!=tmpTOC.size) { _XkbLibError(_XkbErrBadLength,XkbConfigText(tmpTOC.type,XkbMessage), |