diff options
Diffstat (limited to 'xc/lib')
85 files changed, 3471 insertions, 1081 deletions
diff --git a/xc/lib/GL/Imakefile b/xc/lib/GL/Imakefile index 6de10bb32..a185089e4 100644 --- a/xc/lib/GL/Imakefile +++ b/xc/lib/GL/Imakefile @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/Imakefile,v 1.15 2000/02/16 17:26:30 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/Imakefile,v 1.16 2000/03/02 16:07:30 martin Exp $ #include <Threads.tmpl> @@ -42,11 +42,30 @@ DependSubdirs($(SUBDIRS)) #if !GlxUseSGISI #if GlxBuiltInGamma - DRVOBJS = mesa/src/drv/gamma/?*.o - DRVUOBJS = mesa/src/drv/gamma/unshared/?*.o - DRVDOBJS = mesa/src/drv/gamma/debugger/?*.o - DRVPOBJS = mesa/src/drv/gamma/profiled/?*.o - DRVDONES = mesa/src/drv/gamma/DONE + DRMOBJS = dri/drm/?*.o + DRMUOBJS = dri/drm/unshared/?*.o + DRMDOBJS = dri/drm/debugger/?*.o + DRMPOBJS = dri/drm/profiled/?*.o + DRMDONES = dri/drm/DONE + + GAMMAOBJS = mesa/src/drv/gamma/?*.o + GAMMAUOBJS = mesa/src/drv/gamma/unshared/?*.o + GAMMADOBJS = mesa/src/drv/gamma/debugger/?*.o + GAMMAPOBJS = mesa/src/drv/gamma/profiled/?*.o + GAMMADONES = mesa/src/drv/gamma/DONE + + DRIMESAOBJS = mesa/dri/?*.o +DRIMESAUOBJS = mesa/dri/unshared/?*.o +DRIMESADOBJS = mesa/dri/debugger/?*.o +DRIMESAPOBJS = mesa/dri/profiled/?*.o +DRIMESADONES = mesa/dri/DONE + + DRVOBJS = $(GAMMAOBJS) $(MESAOBJS) $(DRIMESAOBJS) $(DRMOBJS) + DRVUOBJS = $(GAMMAUOBJS) $(MESAUOBJS) $(DRIMESAUOBJS) $(DRMUOBJS) + DRVDOBJS = $(GAMMADOBJS) $(MESADOBJS) $(DRIMESADOBJS) $(DRMDOBJS) + DRVPOBJS = $(GAMMAPOBJS) $(MESAPOBJS) $(DRIMESAPOBJS) $(DRMPOBJS) + DRVDONES = $(GAMMADONES) $(MESADONES) $(DRIMESADONES) $(DRMDONES) + #elif GlxBuiltInTdfx DRMOBJS = dri/drm/?*.o DRMUOBJS = dri/drm/unshared/?*.o diff --git a/xc/lib/GL/dri/XF86dri.c b/xc/lib/GL/dri/XF86dri.c index 2d4bf56ff..a0f2f2d6f 100644 --- a/xc/lib/GL/dri/XF86dri.c +++ b/xc/lib/GL/dri/XF86dri.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/dri/XF86dri.c,v 1.4 2000/02/14 06:27:11 martin Exp $ */ +/* $XFree86: xc/lib/GL/dri/XF86dri.c,v 1.5 2000/02/23 04:46:33 martin Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -31,7 +31,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * Kevin E. Martin <kevin@precisioninsight.com> * Jens Owen <jens@precisioninsight.com> * - * $PI: xc/lib/GL/dri/XF86dri.c,v 1.14 1999/06/16 20:08:33 faith Exp $ */ /* THIS IS NOT AN X CONSORTIUM STANDARD */ diff --git a/xc/lib/GL/dri/dri_glx.c b/xc/lib/GL/dri/dri_glx.c index ac12eb368..48cdb8437 100644 --- a/xc/lib/GL/dri/dri_glx.c +++ b/xc/lib/GL/dri/dri_glx.c @@ -54,15 +54,15 @@ typedef void *(*CreateScreenFunc)(Display *dpy, int scrn, __DRIscreen *psc, #ifdef BUILT_IN_DRI_DRIVER -extern void *driCreateScreen(Display *dpy, int scrn, __DRIscreen *psc, - int numConfigs, __GLXvisualConfig *config); +extern void *__driCreateScreen(Display *dpy, int scrn, __DRIscreen *psc, + int numConfigs, __GLXvisualConfig *config); #else /* BUILT_IN_DRI_DRIVER */ #ifndef DEFAULT_DRIVER_DIR -/* this should be defined in the Imakefile */ +/* this is normally defined in the Imakefile */ #define DEFAULT_DRIVER_DIR "/usr/X11R6/lib/modules/dri" #endif @@ -95,12 +95,8 @@ static void *DummyCreateScreen(Display *dpy, int scrn, __DRIscreen *psc, * Initialize two arrays: an array of createScreen function pointers * and an array of dlopen library handles. Arrays are indexed by * screen number. - * We use the DRI in order to find the driCreateScreen function + * We use the DRI in order to find the __driCreateScreen function * exported by each screen on a display. - * - * Also, this function calls the driver's _register_gl_extensions() - * function in order to let the driver hook new extension functions - * into the libGL dispatcher. */ static void Find_CreateScreenFuncs(Display *dpy, CreateScreenFunc *createFuncs, @@ -109,6 +105,8 @@ static void Find_CreateScreenFuncs(Display *dpy, const int numScreens = ScreenCount(dpy); int scrn; + __glXRegisterExtensions(); + for (scrn = 0; scrn < numScreens; scrn++) { int directCapable; Bool b; @@ -141,7 +139,7 @@ static void Find_CreateScreenFuncs(Display *dpy, /* * dlopen the driver module and save the pointer to its - * driCreateScreen function. + * __driCreateScreen function. */ { char realDriverName[100]; @@ -150,8 +148,8 @@ static void Find_CreateScreenFuncs(Display *dpy, char *libDir = NULL; if (geteuid() == getuid()) { - /* don't allow setuid apps to use DRI_MODULES_DIR */ - libDir = getenv("DRI_MODULES_DIR"); + /* don't allow setuid apps to use LIBGL_DRIVERS_DIR */ + libDir = getenv("LIBGL_DRIVERS_DIR"); } if (!libDir) libDir = DEFAULT_DRIVER_DIR; @@ -166,7 +164,7 @@ static void Find_CreateScreenFuncs(Display *dpy, continue; } - createScreenFunc = (CreateScreenFunc) dlsym(handle, "driCreateScreen"); + createScreenFunc = (CreateScreenFunc) dlsym(handle, "__driCreateScreen"); if (createScreenFunc) { /* success! */ createFuncs[scrn] = createScreenFunc; @@ -178,19 +176,6 @@ static void Find_CreateScreenFuncs(Display *dpy, ErrorMessage(message); dlclose(handle); } - - /* Find the driver's _register_gl_extensions() function and - * call it if present. This will let the driver tell libGL.so - * about any extension functions it wants to export. - */ - { - typedef void *(*RegisterExtFunc)(void); - RegisterExtFunc registerExtFunc = (RegisterExtFunc) dlsym(handle, "_register_gl_extensions"); - if (registerExtFunc) { - (*registerExtFunc)(); - } - } - } } } @@ -254,11 +239,11 @@ void *driCreateDisplay(Display *dpy, __DRIdisplay *pdisp) } #ifdef BUILT_IN_DRI_DRIVER - /* we'll statically bind to the driCreateScreen function */ + /* we'll statically bind to the __driCreateScreen function */ { int i; for (i = 0; i < numScreens; i++) { - pdisp->createScreen[i] = driCreateScreen; + pdisp->createScreen[i] = __driCreateScreen; pdpyp->libraryHandles[i] = NULL; } } @@ -270,4 +255,139 @@ void *driCreateDisplay(Display *dpy, __DRIdisplay *pdisp) } +#ifndef BUILT_IN_DRI_DRIVER +/* + * Use the DRI and dlopen/dlsym facilities to find the GL extensions + * possible on the given display and screen. + */ +static void +register_extensions_on_screen(Display *dpy, int scrNum) +{ + GLboolean verbose = GL_FALSE; /* for debugging only */ + int eventBase, errorBase; + Bool b, b2; + int driMajor, driMinor, driPatch; + int driverMajor, driverMinor, driverPatch; + char *driverName = NULL; + + /* + * Check if the DRI extension is available, check the DRI version, + * determine the 3D driver for the screen. + */ + b = XF86DRIQueryExtension(dpy, &eventBase, &errorBase); + if (!b) { + if (verbose) + fprintf(stderr, "XF86DRIQueryExtension failed\n"); + return; + } + + b = XF86DRIQueryDirectRenderingCapable(dpy, scrNum, &b2); + if (!b || !b2) { + if (verbose) + fprintf(stderr, "XF86DRIQueryDirectRenderingCapable failed\n"); + return; + } + + b = XF86DRIQueryVersion(dpy, &driMajor, &driMinor, &driPatch); + if (!b) { + if (verbose) + fprintf(stderr, "XF86DRIQueryVersion failed\n"); + return; + } + + b = XF86DRIGetClientDriverName(dpy, scrNum, &driverMajor, &driverMinor, + &driverPatch, &driverName); + if (!b) { + if (verbose) + fprintf(stderr, "XF86DRIGetClientDriverName failed\n"); + return; + } + else if (verbose) { + printf("XF86DRIGetClientDriverName: %d.%d.%d %s\n", driverMajor, + driverMinor, driverPatch, driverName); + } + + /* + * OK, now we know the name of the relevant driver for this screen. + * dlopen() the driver library file, get a pointer to the driver's + * __driRegisterExtensions() function, and call it if it exists. + */ + { + char realDriverName[100]; + char *libDir = NULL; + void *handle; + + if (geteuid() == getuid()) { + /* don't allow setuid apps to use LIBGL_DRIVERS_DIR */ + libDir = getenv("LIBGL_DRIVERS_DIR"); + } + if (!libDir) + libDir = DEFAULT_DRIVER_DIR; + + sprintf(realDriverName, "%s/%s_dri.so", libDir, driverName); + /*printf("OPEN %s\n", realDriverName);*/ + handle = dlopen(realDriverName, RTLD_LAZY); + if (handle) { + typedef void *(*RegisterExtFunc)(void); + RegisterExtFunc registerExtFunc = (RegisterExtFunc) dlsym(handle, "__driRegisterExtensions"); + if (registerExtFunc) { + (*registerExtFunc)(); + } + dlclose(handle); + } + } +} +#endif /* !BUILT_IN_DRI_DRIVER */ + + + +/* +** Here we'll query the DRI driver for each screen and let each +** driver register its GL extension functions. We only have to +** do this once. But it MUST be done before we create any contexts +** (i.e. before any dispatch tables are created) and before +** glXGetProcAddressARB() returns. +** +** Currently called by glXGetProcAddress(), __glXInitialize(), and +** __glXNewIndirectAPI(). +*/ +void +__glXRegisterExtensions(void) +{ + static GLboolean alreadyCalled = GL_FALSE; + if (alreadyCalled) + return; + +#ifdef BUILT_IN_DRI_DRIVER + __driRegisterExtensions(); +#else + { + int displayNum; + for (displayNum = 0; ; displayNum++) { + char displayName[200]; + Display *dpy; + snprintf(displayName, 199, ":%d.0", displayNum); + dpy = XOpenDisplay(displayName); + if (dpy) { + const int numScreens = ScreenCount(dpy); + int screenNum; + for (screenNum = 0; screenNum < numScreens; screenNum++) { + register_extensions_on_screen(dpy, screenNum); + } + XCloseDisplay(dpy); + } + else { + break; + } + } + } +#endif + + alreadyCalled = GL_TRUE; +} + + #endif /* GLX_DIRECT_RENDERING */ + + + diff --git a/xc/lib/GL/dri/dri_tmm.c b/xc/lib/GL/dri/dri_tmm.c index b0644d3a8..3df4c309b 100644 --- a/xc/lib/GL/dri/dri_tmm.c +++ b/xc/lib/GL/dri/dri_tmm.c @@ -24,8 +24,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * - * $PI: xc/lib/GL/dri/dri_tmm.c,v 1.5 1999/05/18 06:46:11 martin Exp $ - * $XFree86: xc/lib/GL/dri/dri_tmm.c,v 1.1 1999/06/14 07:23:32 dawes Exp $ + * $XFree86: xc/lib/GL/dri/dri_tmm.c,v 1.2 2000/02/23 04:46:34 martin Exp $ * * * DESCRIPTION diff --git a/xc/lib/GL/dri/dri_tmm.h b/xc/lib/GL/dri/dri_tmm.h index bcd6335e9..1eb56a7c1 100644 --- a/xc/lib/GL/dri/dri_tmm.h +++ b/xc/lib/GL/dri/dri_tmm.h @@ -24,8 +24,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * - * $PI: xc/lib/GL/dri/dri_tmm.h,v 1.2 1999/05/18 06:46:11 martin Exp $ - * $XFree86: xc/lib/GL/dri/dri_tmm.h,v 1.1 1999/06/14 07:23:32 dawes Exp $ + * $XFree86: xc/lib/GL/dri/dri_tmm.h,v 1.2 2000/02/23 04:46:34 martin Exp $ * */ diff --git a/xc/lib/GL/dri/drm/Imakefile b/xc/lib/GL/dri/drm/Imakefile index 115871f41..18619461b 100644 --- a/xc/lib/GL/dri/drm/Imakefile +++ b/xc/lib/GL/dri/drm/Imakefile @@ -1,5 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/dri/drm/Imakefile,v 1.3 1999/09/25 14:36:37 dawes Exp $ -XCOMM $PI: xc/lib/GL/dri/drm/Imakefile,v 1.12 1999/09/16 18:43:48 faith Exp $ +XCOMM $XFree86: xc/lib/GL/dri/drm/Imakefile,v 1.4 2000/02/23 04:46:35 martin Exp $ #define DoNormalLib NormalLibGlx #define DoSharedLib SharedLibGlx diff --git a/xc/lib/GL/dri/xf86dri.h b/xc/lib/GL/dri/xf86dri.h index e299d30e3..828d9b771 100644 --- a/xc/lib/GL/dri/xf86dri.h +++ b/xc/lib/GL/dri/xf86dri.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/dri/xf86dri.h,v 1.4 2000/02/14 06:27:11 martin Exp $ */ +/* $XFree86: xc/lib/GL/dri/xf86dri.h,v 1.5 2000/02/23 04:46:34 martin Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -32,7 +32,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * Jens Owen <jens@precisioninsight.com> * Rickard E. Faith <faith@precisioninsight.com> * - * $PI: xc/lib/GL/dri/xf86dri.h,v 1.12 1999/06/16 20:08:34 faith Exp $ */ #ifndef _XF86DRI_H_ diff --git a/xc/lib/GL/dri/xf86dristr.h b/xc/lib/GL/dri/xf86dristr.h index 10de1297a..ea8bad041 100644 --- a/xc/lib/GL/dri/xf86dristr.h +++ b/xc/lib/GL/dri/xf86dristr.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/dri/xf86dristr.h,v 1.4 2000/02/14 06:27:11 martin Exp $ */ +/* $XFree86: xc/lib/GL/dri/xf86dristr.h,v 1.5 2000/02/23 04:46:34 martin Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -31,7 +31,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * Kevin E. Martin <kevin@precisioninsight.com> * Jens Owen <jens@precisioninsight.com> * - * $PI: xc/lib/GL/dri/xf86dristr.h,v 1.11 1999/06/22 03:09:44 jens Exp $ */ #ifndef _XF86DRISTR_H_ diff --git a/xc/lib/GL/glx/glxclient.h b/xc/lib/GL/glx/glxclient.h index 1e2185f4d..0f0bc9e63 100644 --- a/xc/lib/GL/glx/glxclient.h +++ b/xc/lib/GL/glx/glxclient.h @@ -537,6 +537,10 @@ extern void __glXSendLargeCommand(__GLXcontext *, const GLvoid *, GLint, /* Initialize the GLX extension for dpy */ extern __GLXdisplayPrivate *__glXInitialize(Display*); +/* Query drivers for dynamically registered extensions */ +extern void __glXRegisterExtensions(void); + + /************************************************************************/ extern int __glXDebug; diff --git a/xc/lib/GL/glx/glxcmds.c b/xc/lib/GL/glx/glxcmds.c index 79e453af2..935f9b155 100644 --- a/xc/lib/GL/glx/glxcmds.c +++ b/xc/lib/GL/glx/glxcmds.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/glx/glxcmds.c,v 1.7 2000/02/21 18:05:33 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/glxcmds.c,v 1.8 2000/03/02 16:07:32 martin Exp $ */ /* ** The contents of this file are subject to the GLX Public License Version 1.0 ** (the "License"). You may not use this file except in compliance with the @@ -67,7 +67,8 @@ GLXContext CreateContext(Display *dpy, XVisualInfo *vis, __GLXdisplayPrivate *priv; #endif - if (getenv("DRI_ALWAYS_INDIRECT")) allowDirect = GL_FALSE; + if (getenv("LIBGL_ALWAYS_INDIRECT")) + allowDirect = GL_FALSE; opcode = __glXSetupForCommand(dpy); if (!opcode) { return NULL; @@ -397,7 +398,7 @@ void glXUseXFont(Font font, int first, int count, int listBase) ** attribute "mask". */ void glXCopyContext(Display *dpy, GLXContext source, GLXContext dest, - GLuint mask) + unsigned long mask) { xGLXCopyContextReq *req; GLXContext gc = __glXGetCurrentContext(); @@ -1492,11 +1493,156 @@ void glXFreeContextEXT(Display *dpy, GLXContext ctx) } + +/* + * GLX 1.3 functions - these are just stubs for now! + */ + +GLXFBConfig glXChooseFBConfig(Display *dpy, int screen, const int *attribList, int *nitems) +{ + (void) dpy; + (void) screen; + (void) attribList; + (void) nitems; + return 0; +} + + +GLXContext glXCreateNewContext(Display *dpy, GLXFBConfig config, int renderType, GLXContext shareList, Bool direct) +{ + (void) dpy; + (void) config; + (void) renderType; + (void) shareList; + (void) direct; + return 0; +} + + +GLXPbuffer glXCreatePbuffer(Display *dpy, GLXFBConfig config, const int *attribList) +{ + (void) dpy; + (void) config; + (void) attribList; + return 0; +} + + +GLXPixmap glXCreatePixmap(Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attribList) +{ + (void) dpy; + (void) config; + (void) pixmap; + (void) attribList; + return 0; +} + + +GLXWindow glXCreateWindow(Display *dpy, GLXFBConfig config, Window win, const int *attribList) +{ + (void) dpy; + (void) config; + (void) win; + (void) attribList; + return 0; +} + + +void glXDestroyPbuffer(Display *dpy, GLXPbuffer pbuf) +{ + (void) dpy; + (void) pbuf; +} + + +void glXDestroyPixmap(Display *dpy, GLXPixmap pixmap) +{ + (void) dpy; + (void) pixmap; +} + + +void glXDestroyWindow(Display *dpy, GLXWindow window) +{ + (void) dpy; + (void) window; +} + + +GLXDrawable glXGetCurrentReadDrawable(void) +{ + return 0; +} + + +int glXGetFBConfigAttrib(Display *dpy, GLXFBConfig config, int attribute, int *value) +{ + (void) dpy; + (void) config; + (void) attribute; + (void) value; + return 0; +} + + +void glXGetSelectedEvent(Display *dpy, GLXDrawable drawable, unsigned long *mask) +{ + (void) dpy; + (void) drawable; + (void) mask; +} + + +XVisualInfo *glXGetVisualFromFBConfig(Display *dpy, GLXFBConfig config) +{ + (void) dpy; + (void) config; + return 0; +} + + +Bool glXMakeContextCurrent(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx) +{ + (void) dpy; + (void) draw; + (void) read; + (void) ctx; + return 0; +} + + +int glXQueryContext(Display *dpy, GLXContext ctx, int attribute, int *value) +{ + (void) dpy; + (void) ctx; + (void) attribute; + (void) value; + return 0; +} + + +void glXQueryDrawable(Display *dpy, GLXDrawable draw, int attribute, unsigned int *value) +{ + (void) dpy; + (void) draw; + (void) attribute; + (void) value; +} + + +void glXSelectEvent(Display *dpy, GLXDrawable drawable, unsigned long mask) +{ + (void) dpy; + (void) drawable; + (void) mask; +} + + + /* ** glXGetProcAddress support */ - struct name_address_pair { const char *Name; GLvoid *Address; @@ -1527,7 +1673,6 @@ static struct name_address_pair GLX_functions[] = { { "glXGetCurrentDisplay", (GLvoid *) glXGetCurrentDisplay }, -#if 0 /* enable this when GLX 1.3 is implemented */ { "glXChooseFBConfig", (GLvoid *) glXChooseFBConfig }, { "glXCreateNewContext", (GLvoid *) glXCreateNewContext }, { "glXCreatePbuffer", (GLvoid *) glXCreatePbuffer }, @@ -1544,7 +1689,6 @@ static struct name_address_pair GLX_functions[] = { { "glXQueryContext", (GLvoid *) glXQueryContext }, { "glXQueryDrawable", (GLvoid *) glXQueryDrawable }, { "glXSelectEvent", (GLvoid *) glXSelectEvent }, -#endif /* extension functions */ { "glXGetContextIDEXT", (GLvoid *) glXGetContextIDEXT }, @@ -1575,6 +1719,10 @@ void (*glXGetProcAddressARB(const GLubyte *procName))() typedef void (*gl_function)(); gl_function f; +#if defined(GLX_DIRECT_RENDERING) + __glXRegisterExtensions(); +#endif + f = (gl_function) get_glx_proc_address((const char *) procName); if (f) { return f; diff --git a/xc/lib/GL/glx/indirect_init.c b/xc/lib/GL/glx/indirect_init.c index 8c8227a5b..3d631bee6 100644 --- a/xc/lib/GL/glx/indirect_init.c +++ b/xc/lib/GL/glx/indirect_init.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/glx/indirect_init.c,v 1.4 2000/02/15 19:19:19 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/indirect_init.c,v 1.5 2000/03/02 16:07:32 martin Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -49,8 +49,16 @@ static int NoOp(void) __GLapi *__glXNewIndirectAPI(void) { __GLapi *glAPI; - const GLuint entries = _glapi_get_dispatch_table_size(); + GLuint entries; + /* Have to register dynamic extensions before allocating any + * dispatch tables. + */ +#if defined(GLX_DIRECT_RENDERING) + __glXRegisterExtensions(); +#endif + + entries = _glapi_get_dispatch_table_size(); glAPI = (__GLapi *) Xmalloc(entries * sizeof(void *)); /* first, set all entries to point to no-op functions */ diff --git a/xc/lib/GL/glx/xfont.c b/xc/lib/GL/glx/xfont.c index 0172a2d05..29963289a 100644 --- a/xc/lib/GL/glx/xfont.c +++ b/xc/lib/GL/glx/xfont.c @@ -1,5 +1,3 @@ -/* $Id: xfont.c,v 1.1.1.2 2000/02/22 15:39:24 kem Exp $ */ - /* * Mesa 3-D graphics library * Version: 3.1 diff --git a/xc/lib/GL/mesa/dri/Imakefile b/xc/lib/GL/mesa/dri/Imakefile index f927089d2..23e4ea50e 100644 --- a/xc/lib/GL/mesa/dri/Imakefile +++ b/xc/lib/GL/mesa/dri/Imakefile @@ -1,5 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/dri/Imakefile,v 1.1 2000/02/08 17:18:35 dawes Exp $ -XCOMM $PI$ +XCOMM $XFree86: xc/lib/GL/mesa/dri/Imakefile,v 1.2 2000/02/23 04:46:36 martin Exp $ #define DoNormalLib NormalLibGlx #define DoSharedLib SharedLibGlx diff --git a/xc/lib/GL/mesa/dri/dri_mesa.c b/xc/lib/GL/mesa/dri/dri_mesa.c index 0e814b78c..08f3dfcfd 100644 --- a/xc/lib/GL/mesa/dri/dri_mesa.c +++ b/xc/lib/GL/mesa/dri/dri_mesa.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/dri/dri_mesa.c,v 1.4 2000/02/15 07:13:28 martin Exp $ */ +/* $XFree86: xc/lib/GL/mesa/dri/dri_mesa.c,v 1.6 2000/03/02 16:07:33 martin Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -29,8 +29,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. /* * Authors: * Kevin E. Martin <kevin@precisioninsight.com> - * - * $PI: xc/lib/GL/dri/dri_mesa.c,v 1.18 1999/08/04 18:13:27 faith Exp $ + * Brian Paul <brian@precisioninsight.com> */ #ifdef GLX_DIRECT_RENDERING @@ -45,9 +44,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "sarea.h" #include "dri_mesaint.h" #include "dri_xmesaapi.h" -#ifdef BRIAN -#include <dlfcn.h> -#endif #if XMESA_MAJOR_VERSION != 3 || XMESA_MINOR_VERSION != 3 @@ -735,8 +731,8 @@ static void driMesaDestroyScreen(Display *dpy, int scrn, void *private) * This is the entrypoint into the driver. * The driCreateScreen name is the symbol that libGL.so fetches. */ -void *driCreateScreen(Display *dpy, int scrn, __DRIscreen *psc, - int numConfigs, __GLXvisualConfig *config) +void *__driCreateScreen(Display *dpy, int scrn, __DRIscreen *psc, + int numConfigs, __GLXvisualConfig *config) { return driMesaCreateScreen(dpy, scrn, psc, numConfigs, config); } diff --git a/xc/lib/GL/mesa/dri/dri_mesa.h b/xc/lib/GL/mesa/dri/dri_mesa.h index 8b421eff0..4a6870801 100644 --- a/xc/lib/GL/mesa/dri/dri_mesa.h +++ b/xc/lib/GL/mesa/dri/dri_mesa.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/dri/dri_mesa.h,v 1.1 2000/02/08 17:18:36 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/dri/dri_mesa.h,v 1.3 2000/03/02 16:07:33 martin Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -29,8 +29,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. /* * Authors: * Kevin E. Martin <kevin@precisioninsight.com> - * - * $PI: xc/lib/GL/dri/dri_mesa.h,v 1.5 1999/04/05 05:24:31 martin Exp $ + * Brian Paul <brian@precisioninsight.com> */ #ifndef _DRI_MESA_H_ diff --git a/xc/lib/GL/mesa/dri/dri_mesaint.h b/xc/lib/GL/mesa/dri/dri_mesaint.h index d77d7cd63..6b64114d0 100644 --- a/xc/lib/GL/mesa/dri/dri_mesaint.h +++ b/xc/lib/GL/mesa/dri/dri_mesaint.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/dri/dri_mesaint.h,v 1.5 2000/02/15 07:13:28 martin Exp $ */ +/* $XFree86: xc/lib/GL/mesa/dri/dri_mesaint.h,v 1.6 2000/02/23 04:46:38 martin Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -30,7 +30,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * Authors: * Kevin E. Martin <kevin@precisioninsight.com> * - * $PI: xc/lib/GL/dri/dri_mesaint.h,v 1.8 1999/06/14 21:10:35 faith Exp $ */ #ifndef _DRI_MESAINT_H_ diff --git a/xc/lib/GL/mesa/dri/dri_xmesaapi.h b/xc/lib/GL/mesa/dri/dri_xmesaapi.h index 0db1d1296..18aa3db8d 100644 --- a/xc/lib/GL/mesa/dri/dri_xmesaapi.h +++ b/xc/lib/GL/mesa/dri/dri_xmesaapi.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/dri/dri_xmesaapi.h,v 1.2 2000/02/15 07:13:29 martin Exp $ */ +/* $XFree86: xc/lib/GL/mesa/dri/dri_xmesaapi.h,v 1.3 2000/02/23 04:46:38 martin Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -30,7 +30,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * Authors: * Kevin E. Martin <kevin@precisioninsight.com> * - * $PI: xc/lib/GL/dri/dri_xmesaapi.h,v 1.4 1999/04/05 05:24:31 martin Exp $ */ #ifndef _DRI_XMESAAPI_H_ diff --git a/xc/lib/GL/mesa/include/GL/Imakefile b/xc/lib/GL/mesa/include/GL/Imakefile index fec9e3354..bc6730a85 100644 --- a/xc/lib/GL/mesa/include/GL/Imakefile +++ b/xc/lib/GL/mesa/include/GL/Imakefile @@ -1,5 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/include/GL/Imakefile,v 1.1 2000/02/08 17:18:37 dawes Exp $ -XCOMM $PI: xc/programs/Xserver/GL/mesa/include/GL/Imakefile,v 1.6 1999/03/15 21:36:09 martin Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/include/GL/Imakefile,v 1.3 2000/03/02 16:07:33 martin Exp $ #define IHaveModules #include <Server.tmpl> @@ -7,6 +6,7 @@ XCOMM $PI: xc/programs/Xserver/GL/mesa/include/GL/Imakefile,v 1.6 1999/03/15 21: DEFINES = $(GLX_DEFINES) LinkSourceFile(gl.h, ../../../../../extras/Mesa/include/GL) +LinkSourceFile(glext.h, ../../../../../extras/Mesa/include/GL) LinkSourceFile(glx.h, ../../../../../extras/Mesa/include/GL) LinkSourceFile(xmesa.h, ../../../../../extras/Mesa/include/GL) LinkSourceFile(xmesa_x.h, ../../../../../extras/Mesa/include/GL) diff --git a/xc/lib/GL/mesa/src/Imakefile b/xc/lib/GL/mesa/src/Imakefile index b3dade36c..d93aa3f7e 100644 --- a/xc/lib/GL/mesa/src/Imakefile +++ b/xc/lib/GL/mesa/src/Imakefile @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/Imakefile,v 1.9 2000/02/15 07:13:29 martin Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/Imakefile,v 1.10 2000/03/02 16:07:34 martin Exp $ #include <Threads.tmpl> @@ -335,7 +335,7 @@ LinkSourceFile(zoom.h, ../../../../extras/Mesa/src) #ifdef i386Architecture ASM_SRCS = ASM_OBJS = - ASM_DEFS = -DUSE_MMX_ASM -DUSE_X86_ASM -DUSE_3DNOW_ASM + ASM_DEFS = -DUSE_MMX_ASM -DUSE_X86_ASM #endif DEFINES = $(ALLOC_DEFINES) GlxDefines $(TDFX_DEFS) $(ASM_DEFS) diff --git a/xc/lib/GL/mesa/src/X/Imakefile b/xc/lib/GL/mesa/src/X/Imakefile index b01a469e9..27f799a65 100644 --- a/xc/lib/GL/mesa/src/X/Imakefile +++ b/xc/lib/GL/mesa/src/X/Imakefile @@ -1,5 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/X/Imakefile,v 1.4 2000/02/08 17:18:40 dawes Exp $ -XCOMM $PI: xc/lib/GL/mesa/src/X/Imakefile,v 1.4 1999/06/21 05:13:55 martin Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/X/Imakefile,v 1.5 2000/02/23 04:46:39 martin Exp $ #define DoNormalLib NormalLibGlx #define DoSharedLib SharedLibGlx diff --git a/xc/lib/GL/mesa/src/X86/Imakefile b/xc/lib/GL/mesa/src/X86/Imakefile index 99dfd8ea8..858f0cd73 100644 --- a/xc/lib/GL/mesa/src/X86/Imakefile +++ b/xc/lib/GL/mesa/src/X86/Imakefile @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/X86/Imakefile,v 1.4 2000/02/18 16:23:10 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/X86/Imakefile,v 1.5 2000/03/02 16:07:34 martin Exp $ #define DoNormalLib NormalLibGlx #define DoSharedLib SharedLibGlx @@ -76,7 +76,7 @@ XCOMM Disabling 3DNow code for the time being #endif DEFINES = $(ALLOC_DEFINES) GlxDefines -DFX $(X86_DEFS) $(MMX_DEFS) $(3DNOW_DEFS) - INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) -I../include -I../../dri -I.. + INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) -I../include -I../../include -I../../dri -I.. SRCS = $(X86_SRCS) $(MMX_SRCS) $(3DNOW_SRCS) OBJS = $(X86_OBJS) $(MMX_OBJS) $(3DNOW_OBJS) diff --git a/xc/lib/GL/mesa/src/drv/Imakefile b/xc/lib/GL/mesa/src/drv/Imakefile index 471021749..fadb29bb2 100644 --- a/xc/lib/GL/mesa/src/drv/Imakefile +++ b/xc/lib/GL/mesa/src/drv/Imakefile @@ -1,5 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/Imakefile,v 1.6 2000/02/14 06:27:12 martin Exp $ -XCOMM $PI: xc/lib/GL/mesa/src/drv/Imakefile,v 1.3 1999/06/14 21:10:41 faith Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/Imakefile,v 1.8 2000/03/07 14:31:38 dawes Exp $ #define DoNormalLib NormalLibGlx #define DoSharedLib SharedLibGlx @@ -21,7 +20,7 @@ DRIVER += tdfx SUBDIRS = $(DRIVER) #else SUBDIRS += gamma -#if HasGlide +#if HasGlide3 SUBDIRS += tdfx #endif #endif diff --git a/xc/lib/GL/mesa/src/drv/common/Imakefile b/xc/lib/GL/mesa/src/drv/common/Imakefile index 2bd674ffd..5c3d40dd7 100644 --- a/xc/lib/GL/mesa/src/drv/common/Imakefile +++ b/xc/lib/GL/mesa/src/drv/common/Imakefile @@ -1,4 +1,3 @@ -XCOMM $PI:$ #define DoNormalLib NormalLibGlx #define DoSharedLib SharedLibGlx diff --git a/xc/lib/GL/mesa/src/drv/gamma/Imakefile b/xc/lib/GL/mesa/src/drv/gamma/Imakefile index 98caebf5d..05e35561e 100644 --- a/xc/lib/GL/mesa/src/drv/gamma/Imakefile +++ b/xc/lib/GL/mesa/src/drv/gamma/Imakefile @@ -1,5 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/gamma/Imakefile,v 1.6 2000/02/15 07:13:30 martin Exp $ -XCOMM $PI: xc/lib/GL/mesa/src/drv/gamma/Imakefile,v 1.6 1999/06/21 05:13:55 martin Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/gamma/Imakefile,v 1.8 2000/03/02 16:07:35 martin Exp $ #define DoNormalLib NormalLibGlx #define DoSharedLib SharedLibGlx @@ -7,6 +6,10 @@ XCOMM $PI: xc/lib/GL/mesa/src/drv/gamma/Imakefile,v 1.6 1999/06/21 05:13:55 mart #define DoDebugLib DebugLibGlx #define DoProfileLib ProfileLibGlx +LinkSourceFile(xmesaP.h, ../../../../../../extras/Mesa/src/X) +LinkSourceFile(glapi.h, ../../../../../../extras/Mesa/src) + + #if Malloc0ReturnsNull ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL #endif @@ -48,7 +51,10 @@ MESA_INCLUDES = -I. -I.. -I../../include GAMMAOBJS = gamma_gl.o gamma_xmesa.o gamma_init.o gamma_matrix.o \ gamma_inithw.o gamma_texture.o - SRCS = $(DRISRCS) $(DRMSRCS) $(GAMMASRCS) +XCOMM SRCS = $(DRISRCS) $(DRMSRCS) $(GAMMASRCS) +XCOMM OBJS = $(DRIOBJS) $(DRMOBJS) $(GAMMAOBJS) + + SRCS = $(GAMMASRCS) OBJS = $(DRIOBJS) $(DRMOBJS) $(GAMMAOBJS) diff --git a/xc/lib/GL/mesa/src/drv/gamma/gamma_client.h b/xc/lib/GL/mesa/src/drv/gamma/gamma_client.h index 0d03b2518..36521c9ab 100644 --- a/xc/lib/GL/mesa/src/drv/gamma/gamma_client.h +++ b/xc/lib/GL/mesa/src/drv/gamma/gamma_client.h @@ -31,8 +31,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * - * $PI: xc/lib/GL/mesa/src/drv/gamma/gamma_client.h,v 1.1 1999/04/05 05:24:34 martin Exp $ - * $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_client.h,v 1.1 1999/06/14 07:31:12 dawes Exp $ + * $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_client.h,v 1.2 2000/02/23 04:46:41 martin Exp $ * */ diff --git a/xc/lib/GL/mesa/src/drv/gamma/gamma_gl.c b/xc/lib/GL/mesa/src/drv/gamma/gamma_gl.c index d7df75883..3bd2fd0f3 100644 --- a/xc/lib/GL/mesa/src/drv/gamma/gamma_gl.c +++ b/xc/lib/GL/mesa/src/drv/gamma/gamma_gl.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_gl.c,v 1.2 1999/06/27 14:07:29 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_gl.c,v 1.4 2000/03/02 16:07:35 martin Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -29,8 +29,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. /* * Authors: * Kevin E. Martin <kevin@precisioninsight.com> - * - * $PI: xc/lib/GL/mesa/src/drv/gamma/gamma_gl.c,v 1.24 1999/06/14 21:10:43 faith Exp $ + * Brian Paul <brian@precisioninsight.com> */ #ifdef GLX_DIRECT_RENDERING @@ -42,12 +41,12 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <stdlib.h> #endif -void glAccum(GLenum op, GLfloat value) +void _gamma_Accum(GLenum op, GLfloat value) { DEBUG_GLCMDS(("Accum: %d %f\n", (int)op, value)); } -void glAlphaFunc(GLenum func, GLclampf ref) +void _gamma_AlphaFunc(GLenum func, GLclampf ref) { unsigned char r = ref * 255.0; @@ -91,7 +90,7 @@ void glAlphaFunc(GLenum func, GLclampf ref) WRITE(gCCPriv->buf, AlphaTestMode, gCCPriv->AlphaTestMode); } -GLboolean glAreTexturesResident(GLsizei n, const GLuint *textures, GLboolean *residences) +GLboolean _gamma_AreTexturesResident(GLsizei n, const GLuint *textures, GLboolean *residences) { DEBUG_GLCMDS(("AreTexturesResident: %d\n", (int)n)); #ifdef DEBUG_VERBOSE_EXTRA @@ -105,12 +104,12 @@ GLboolean glAreTexturesResident(GLsizei n, const GLuint *textures, GLboolean *re return GL_TRUE; } -void glArrayElement(GLint i) +void _gamma_ArrayElement(GLint i) { DEBUG_GLCMDS(("ArrayElement: %d\n", (int)i)); } -void glBegin(GLenum mode) +void _gamma_Begin(GLenum mode) { DEBUG_GLCMDS(("Begin: %04x\n", (int)mode)); @@ -160,7 +159,7 @@ void glBegin(GLenum mode) WRITE(gCCPriv->buf, Begin, gCCPriv->Begin); } -void glBindTexture(GLenum target, GLuint texture) +void _gamma_BindTexture(GLenum target, GLuint texture) { unsigned long addrs[MIPMAP_LEVELS]; int i; @@ -244,12 +243,12 @@ void glBindTexture(GLenum target, GLuint texture) WRITE(gCCPriv->buf, TextureCacheControl, (TCC_Enable | TCC_Invalidate)); } -void glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap) +void _gamma_Bitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap) { DEBUG_GLCMDS(("Bitmap: \n")); } -void glBlendFunc(GLenum sfactor, GLenum dfactor) +void _gamma_BlendFunc(GLenum sfactor, GLenum dfactor) { DEBUG_GLCMDS(("BlendFunc: %04x %04x\n", (int)sfactor, (int)dfactor)); @@ -347,17 +346,17 @@ void glBlendFunc(GLenum sfactor, GLenum dfactor) } } -void glCallList(GLuint list) +void _gamma_CallList(GLuint list) { DEBUG_GLCMDS(("CallList: %d\n", (unsigned int)list)); } -void glCallLists(GLsizei n, GLenum type, const GLvoid *lists) +void _gamma_CallLists(GLsizei n, GLenum type, const GLvoid *lists) { DEBUG_GLCMDS(("CallLists: %d %04x\n", (int)n, (int)type)); } -void glClear(GLbitfield mask) +void _gamma_Clear(GLbitfield mask) { unsigned int depth = 0; int do_clear = 0; @@ -587,12 +586,12 @@ void glClear(GLbitfield mask) #endif } -void glClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) +void _gamma_ClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) { DEBUG_GLCMDS(("ClearAccum: %f %f %f %f\n", red, green, blue, alpha)); } -void glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) +void _gamma_ClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { DEBUG_GLCMDS(("ClearColor: %f %f %f %f\n", (float)red, (float)green, (float)blue, (float)alpha)); @@ -603,50 +602,50 @@ void glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) gCCPriv->ClearColor[3] = alpha; } -void glClearDepth(GLclampd depth) +void _gamma_ClearDepth(GLclampd depth) { DEBUG_GLCMDS(("ClearDepth: %f\n", (float)depth)); gCCPriv->ClearDepth = depth; } -void glClearIndex(GLfloat c) +void _gamma_ClearIndex(GLfloat c) { DEBUG_GLCMDS(("ClearIndex: %f\n", c)); } -void glClearStencil(GLint s) +void _gamma_ClearStencil(GLint s) { DEBUG_GLCMDS(("ClearStencil: %d\n", (int)s)); } -void glClipPlane(GLenum plane, const GLdouble *equation) +void _gamma_ClipPlane(GLenum plane, const GLdouble *equation) { DEBUG_GLCMDS(("ClipPlane: %04x %f %f %f %f\n", (int)plane, equation[0], equation[1], equation[2], equation[3])); } -void glColor3b(GLbyte red, GLbyte green, GLbyte blue) +void _gamma_Color3b(GLbyte red, GLbyte green, GLbyte blue) { DEBUG_GLCMDS(("Color3b: %d %d %d\n", red, green, blue)); } -void glColor3bv(const GLbyte *v) +void _gamma_Color3bv(const GLbyte *v) { DEBUG_GLCMDS(("Color3bv: %d %d %d\n", v[0], v[1], v[2])); } -void glColor3d(GLdouble red, GLdouble green, GLdouble blue) +void _gamma_Color3d(GLdouble red, GLdouble green, GLdouble blue) { DEBUG_GLCMDS(("Color3d: %f %f %f\n", red, green, blue)); } -void glColor3dv(const GLdouble *v) +void _gamma_Color3dv(const GLdouble *v) { DEBUG_GLCMDS(("Color3dv: %f %f %f\n", v[0], v[1], v[2])); } -void glColor3f(GLfloat red, GLfloat green, GLfloat blue) +void _gamma_Color3f(GLfloat red, GLfloat green, GLfloat blue) { DEBUG_GLCMDS(("Color3f: %f %f %f\n", red, green, blue)); @@ -662,7 +661,7 @@ void glColor3f(GLfloat red, GLfloat green, GLfloat blue) WRITEF(gCCPriv->buf, Cr3, red); } -void glColor3fv(const GLfloat *v) +void _gamma_Color3fv(const GLfloat *v) { DEBUG_GLCMDS(("Color3fv: %f %f %f\n", v[0], v[1], v[2])); @@ -685,79 +684,79 @@ void glColor3fv(const GLfloat *v) #endif } -void glColor3i(GLint red, GLint green, GLint blue) +void _gamma_Color3i(GLint red, GLint green, GLint blue) { DEBUG_GLCMDS(("Color3i: %d %d %d\n", (int)red, (int)green, (int)blue)); } -void glColor3iv(const GLint *v) +void _gamma_Color3iv(const GLint *v) { DEBUG_GLCMDS(("Color3iv: %d %d %d\n", (int)v[0], (int)v[1], (int)v[2])); } -void glColor3s(GLshort red, GLshort green, GLshort blue) +void _gamma_Color3s(GLshort red, GLshort green, GLshort blue) { DEBUG_GLCMDS(("Color3s: %d %d %d\n", red, green, blue)); } -void glColor3sv(const GLshort *v) +void _gamma_Color3sv(const GLshort *v) { DEBUG_GLCMDS(("Color3sv: %d %d %d\n", v[0], v[1], v[2])); } -void glColor3ub(GLubyte red, GLubyte green, GLubyte blue) +void _gamma_Color3ub(GLubyte red, GLubyte green, GLubyte blue) { DEBUG_GLCMDS(("Color3ub: %d %d %d\n", red, green, blue)); } -void glColor3ubv(const GLubyte *v) +void _gamma_Color3ubv(const GLubyte *v) { DEBUG_GLCMDS(("Color3ubv: %d %d %d\n", v[0], v[1], v[2])); } -void glColor3ui(GLuint red, GLuint green, GLuint blue) +void _gamma_Color3ui(GLuint red, GLuint green, GLuint blue) { DEBUG_GLCMDS(("Color3ui: %d %d %d\n", (unsigned int)red, (unsigned int)green, (unsigned int)blue)); } -void glColor3uiv(const GLuint *v) +void _gamma_Color3uiv(const GLuint *v) { DEBUG_GLCMDS(("Color3uiv: %d %d %d\n", (unsigned int)v[0], (unsigned int)v[1], (unsigned int)v[2])); } -void glColor3us(GLushort red, GLushort green, GLushort blue) +void _gamma_Color3us(GLushort red, GLushort green, GLushort blue) { DEBUG_GLCMDS(("Color3us: %d %d %d\n", red, green, blue)); } -void glColor3usv(const GLushort *v) +void _gamma_Color3usv(const GLushort *v) { DEBUG_GLCMDS(("Color3usv: %d %d %d\n", v[0], v[1], v[2])); } -void glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha) +void _gamma_Color4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha) { DEBUG_GLCMDS(("Color4b: %d %d %d %d\n", red, green, blue, alpha)); } -void glColor4bv(const GLbyte *v) +void _gamma_Color4bv(const GLbyte *v) { DEBUG_GLCMDS(("Color4bv: %d %d %d %d\n", v[0], v[1], v[2], v[3])); } -void glColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha) +void _gamma_Color4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha) { DEBUG_GLCMDS(("Color4d: %f %f %f %f\n", red, green, blue, alpha)); } -void glColor4dv(const GLdouble *v) +void _gamma_Color4dv(const GLdouble *v) { DEBUG_GLCMDS(("Color4dv: %f %f %f %f\n", v[0], v[1], v[2], v[3])); } -void glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) +void _gamma_Color4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) { DEBUG_GLCMDS(("Color4f: %f %f %f %f\n", red, green, blue, alpha)); @@ -774,7 +773,7 @@ void glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) WRITEF(gCCPriv->buf, Cr4, red); } -void glColor4fv(const GLfloat *v) +void _gamma_Color4fv(const GLfloat *v) { DEBUG_GLCMDS(("Color4fv: %f %f %f %f\n", v[0], v[1], v[2], v[3])); @@ -799,29 +798,29 @@ void glColor4fv(const GLfloat *v) #endif } -void glColor4i(GLint red, GLint green, GLint blue, GLint alpha) +void _gamma_Color4i(GLint red, GLint green, GLint blue, GLint alpha) { DEBUG_GLCMDS(("Color4i: %d %d %d %d\n", (int)red, (int)green, (int)blue, (int)alpha)); } -void glColor4iv(const GLint *v) +void _gamma_Color4iv(const GLint *v) { DEBUG_GLCMDS(("Color4iv: %d %d %d %d\n", (int)v[0], (int)v[1], (int)v[2], (int)v[3])); } -void glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha) +void _gamma_Color4s(GLshort red, GLshort green, GLshort blue, GLshort alpha) { DEBUG_GLCMDS(("Color4s: %d %d %d %d\n", red, green, blue, alpha)); } -void glColor4sv(const GLshort *v) +void _gamma_Color4sv(const GLshort *v) { DEBUG_GLCMDS(("Color4sv: %d %d %d %d\n", v[0], v[1], v[2], v[3])); } -void glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) +void _gamma_Color4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) { GLuint c; @@ -837,7 +836,7 @@ void glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) WRITE(gCCPriv->buf, PackedColor4, c); } -void glColor4ubv(const GLubyte *v) +void _gamma_Color4ubv(const GLubyte *v) { GLuint c; @@ -859,81 +858,81 @@ void glColor4ubv(const GLubyte *v) WRITE(gCCPriv->buf, PackedColor4, c); } -void glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha) +void _gamma_Color4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha) { DEBUG_GLCMDS(("Color4ui: %d %d %d %d\n", (unsigned int)red, (unsigned int)green, (unsigned int)blue, (unsigned int)alpha)); } -void glColor4uiv(const GLuint *v) +void _gamma_Color4uiv(const GLuint *v) { DEBUG_GLCMDS(("Color4uiv: %d %d %d %d\n", (unsigned int)v[0], (unsigned int)v[1], (unsigned int)v[2], (unsigned int)v[3])); } -void glColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha) +void _gamma_Color4us(GLushort red, GLushort green, GLushort blue, GLushort alpha) { DEBUG_GLCMDS(("Color4us: %d %d %d %d\n", red, green, blue, alpha)); } -void glColor4usv(const GLushort *v) +void _gamma_Color4usv(const GLushort *v) { DEBUG_GLCMDS(("Color4usv: %d %d %d %d\n", v[0], v[1], v[2], v[3])); } -void glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) +void _gamma_ColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) { DEBUG_GLCMDS(("ColorMask: %d %d %d %d\n", red, green, blue, alpha)); } -void glColorMaterial(GLenum face, GLenum mode) +void _gamma_ColorMaterial(GLenum face, GLenum mode) { DEBUG_GLCMDS(("ColorMaterial: %04x %04x\n", (int)face, (int)mode)); } -void glColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) +void _gamma_ColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) { DEBUG_GLCMDS(("ColorPointer: %d %04x %d\n", (int)size, (int)type, (int)stride)); } -void glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type) +void _gamma_CopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type) { DEBUG_GLCMDS(("CopyPixels: %d %d %d %d %04x\n", (int)x, (int)y, (int)width, (int)height, (int)type)); } -void glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) +void _gamma_CopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) { DEBUG_GLCMDS(("CopyTexImage1D: %04x %d %04x %d %d %d %d\n", (int)target, (int)level, (int)internalformat, (int)x, (int)y, (int)width, (int)border)); } -void glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) +void _gamma_CopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) { DEBUG_GLCMDS(("CopyTexImage2D: %04x %d %04x %d %d %d %d %d\n", (int)target, (int)level, (int)internalformat, (int)x, (int)y, (int)width, (int)height, (int)border)); } -void glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) +void _gamma_CopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) { DEBUG_GLCMDS(("CopyTexSubImage1D: %04x %d %d %d %d %d\n", (int)target, (int)level, (int)xoffset, (int)x, (int)y, (int)width)); } -void glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) +void _gamma_CopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) { DEBUG_GLCMDS(("CopyTexSubImage2D: %04x %d %d %d %d %d %d %d\n", (int)target, (int)level, (int)xoffset, (int)yoffset, (int)x, (int)y, (int)width, (int)height)); } -void glCullFace(GLenum mode) +void _gamma_CullFace(GLenum mode) { DEBUG_GLCMDS(("CullFace: %04x\n", (int)mode)); @@ -961,12 +960,12 @@ void glCullFace(GLenum mode) WRITE(gCCPriv->buf, GeometryMode, gCCPriv->GeometryMode); } -void glDeleteLists(GLuint list, GLsizei range) +void _gamma_DeleteLists(GLuint list, GLsizei range) { DEBUG_GLCMDS(("DeleteLists: %d %d\n", (unsigned int)list, (int)range)); } -void glDeleteTextures(GLsizei n, const GLuint *textures) +void _gamma_DeleteTextures(GLsizei n, const GLuint *textures) { int i; @@ -992,7 +991,7 @@ void glDeleteTextures(GLsizei n, const GLuint *textures) gCCPriv->curTexObj2D = gCCPriv->curTexObj; } -void glDepthFunc(GLenum func) +void _gamma_DepthFunc(GLenum func) { DEBUG_GLCMDS(("DepthFunc: %04x\n", (int)func)); @@ -1032,7 +1031,7 @@ void glDepthFunc(GLenum func) WRITE(gCCPriv->buf, DepthMode, gCCPriv->DepthMode); } -void glDepthMask(GLboolean flag) +void _gamma_DepthMask(GLboolean flag) { DEBUG_GLCMDS(("DepthMask: %d\n", flag)); @@ -1046,7 +1045,7 @@ void glDepthMask(GLboolean flag) WRITE(gCCPriv->buf, DepthMode, gCCPriv->DepthMode); } -void glDepthRange(GLclampd zNear, GLclampd zFar) +void _gamma_DepthRange(GLclampd zNear, GLclampd zFar) { GLfloat sz, oz; @@ -1063,7 +1062,7 @@ void glDepthRange(GLclampd zNear, GLclampd zFar) WRITEF(gCCPriv->buf, ViewPortOffsetZ, oz); } -void glDisable(GLenum cap) +void _gamma_Disable(GLenum cap) { DEBUG_GLCMDS(("Disable %04x\n", (int)cap)); @@ -1134,50 +1133,50 @@ void glDisable(GLenum cap) } } -void glDisableClientState(GLenum array) +void _gamma_DisableClientState(GLenum array) { DEBUG_GLCMDS(("DisableClientState: %04x\n", (int)array)); } -void glDrawArrays(GLenum mode, GLint first, GLsizei count) +void _gamma_DrawArrays(GLenum mode, GLint first, GLsizei count) { DEBUG_GLCMDS(("DrawArrays: %04x %d %d\n", (int)mode, (int)first, (int)count)); } -void glDrawBuffer(GLenum mode) +void _gamma_DrawBuffer(GLenum mode) { DEBUG_GLCMDS(("DrawBuffer: %04x\n", (int)mode)); } -void glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices) +void _gamma_DrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices) { DEBUG_GLCMDS(("DrawElements: %04x %d %04x\n", (int)mode, (int)count, (int)type)); } -void glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image) +void _gamma_DrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image) { DEBUG_GLCMDS(("DrawPixels: %d %d %04x %04x\n", (int)width, (int)height, (int)format, (int)type)); } -void glEdgeFlag(GLboolean flag) +void _gamma_EdgeFlag(GLboolean flag) { DEBUG_GLCMDS(("EdgeFlag: %d\n", flag)); } -void glEdgeFlagPointer(GLsizei stride, const GLvoid *pointer) +void _gamma_EdgeFlagPointer(GLsizei stride, const GLvoid *pointer) { DEBUG_GLCMDS(("EdgeFlagPointer: %d\n", (int)stride)); } -void glEdgeFlagv(const GLboolean *flag) +void _gamma_EdgeFlagv(const GLboolean *flag) { DEBUG_GLCMDS(("EdgeFlagv: \n")); } -void glEnable(GLenum cap) +void _gamma_Enable(GLenum cap) { DEBUG_GLCMDS(("Enable %04x\n", (int)cap)); @@ -1257,12 +1256,12 @@ void glEnable(GLenum cap) } } -void glEnableClientState(GLenum array) +void _gamma_EnableClientState(GLenum array) { DEBUG_GLCMDS(("EnableClientState: %04x\n", (int)array)); } -void glEnd(void) +void _gamma_End(void) { DEBUG_GLCMDS(("End\n")); @@ -1283,105 +1282,105 @@ void glEnd(void) #endif } -void glEndList(void) +void _gamma_EndList(void) { DEBUG_GLCMDS(("EndList\n")); } -void glEvalCoord1d(GLdouble u) +void _gamma_EvalCoord1d(GLdouble u) { DEBUG_GLCMDS(("EvalCoord1d: %f\n", u)); } -void glEvalCoord1dv(const GLdouble *u) +void _gamma_EvalCoord1dv(const GLdouble *u) { } -void glEvalCoord1f(GLfloat u) +void _gamma_EvalCoord1f(GLfloat u) { } -void glEvalCoord1fv(const GLfloat *u) +void _gamma_EvalCoord1fv(const GLfloat *u) { } -void glEvalCoord2d(GLdouble u, GLdouble v) +void _gamma_EvalCoord2d(GLdouble u, GLdouble v) { } -void glEvalCoord2dv(const GLdouble *u) +void _gamma_EvalCoord2dv(const GLdouble *u) { } -void glEvalCoord2f(GLfloat u, GLfloat v) +void _gamma_EvalCoord2f(GLfloat u, GLfloat v) { } -void glEvalCoord2fv(const GLfloat *u) +void _gamma_EvalCoord2fv(const GLfloat *u) { } -void glEvalMesh1(GLenum mode, GLint i1, GLint i2) +void _gamma_EvalMesh1(GLenum mode, GLint i1, GLint i2) { } -void glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2) +void _gamma_EvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2) { } -void glEvalPoint1(GLint i) +void _gamma_EvalPoint1(GLint i) { } -void glEvalPoint2(GLint i, GLint j) +void _gamma_EvalPoint2(GLint i, GLint j) { } -void glFeedbackBuffer(GLsizei size, GLenum type, GLfloat *buffer) +void _gamma_FeedbackBuffer(GLsizei size, GLenum type, GLfloat *buffer) { DEBUG_GLCMDS(("FeedbackBuffer: %d %04x\n", (int)size, (int)type)); } -void glFinish(void) +void _gamma_Finish(void) { DEBUG_GLCMDS(("Finish\n")); FLUSH_DMA_BUFFER(gCC,gCCPriv); } -void glFlush(void) +void _gamma_Flush(void) { DEBUG_GLCMDS(("Flush\n")); FLUSH_DMA_BUFFER(gCC,gCCPriv); } -void glFogf(GLenum pname, GLfloat param) +void _gamma_Fogf(GLenum pname, GLfloat param) { DEBUG_GLCMDS(("Fogf: %04x %f\n", (int)pname, param)); } -void glFogfv(GLenum pname, const GLfloat *params) +void _gamma_Fogfv(GLenum pname, const GLfloat *params) { DEBUG_GLCMDS(("Fogfv: %04x %f\n", (int)pname, *params)); } -void glFogi(GLenum pname, GLint param) +void _gamma_Fogi(GLenum pname, GLint param) { DEBUG_GLCMDS(("Fogi: %04x %d\n", (int)pname, (int)param)); } -void glFogiv(GLenum pname, const GLint *params) +void _gamma_Fogiv(GLenum pname, const GLint *params) { DEBUG_GLCMDS(("Fogiv: %04x %d\n", (int)pname, (int)*params)); } -void glFrontFace(GLenum mode) +void _gamma_FrontFace(GLenum mode) { DEBUG_GLCMDS(("FrontFace: %04x\n", (int)mode)); } -void glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) +void _gamma_Frustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) { #define FRUSTUM_X() ((GLfloat)((2.0*zNear)/(right-left))) #define FRUSTUM_Y() ((GLfloat)((2.0*zNear)/(top-bottom))) @@ -1411,41 +1410,41 @@ void glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLd gammaLoadHWMatrix(); } -GLuint glGenLists(GLsizei range) +GLuint _gamma_GenLists(GLsizei range) { DEBUG_GLCMDS(("GenLists: %d\n", (int)range)); return GL_TRUE; } -void glGenTextures(GLsizei n, GLuint *textures) +void _gamma_GenTextures(GLsizei n, GLuint *textures) { DEBUG_GLCMDS(("GenTextures: %d\n", (int)n)); } -void glGetBooleanv(GLenum val, GLboolean *b) +void _gamma_GetBooleanv(GLenum val, GLboolean *b) { DEBUG_GLCMDS(("GetBooleanv: %04x\n", (int)val)); } -void glGetClipPlane(GLenum plane, GLdouble *equation) +void _gamma_GetClipPlane(GLenum plane, GLdouble *equation) { DEBUG_GLCMDS(("GetClipPlane: %04x %f %f %f %f\n", (int)plane, equation[0], equation[1], equation[2], equation[3])); } -void glGetDoublev(GLenum val, GLdouble *d) +void _gamma_GetDoublev(GLenum val, GLdouble *d) { DEBUG_GLCMDS(("GetDoublev: %04x\n", (int)val)); } -GLenum glGetError(void) +GLenum _gamma_GetError(void) { DEBUG_GLCMDS(("GetError\n")); return 0; } -void glGetFloatv(GLenum val, GLfloat *f) +void _gamma_GetFloatv(GLenum val, GLfloat *f) { int i; @@ -1461,64 +1460,64 @@ void glGetFloatv(GLenum val, GLfloat *f) } } -void glGetIntegerv(GLenum val, GLint *i) +void _gamma_GetIntegerv(GLenum val, GLint *i) { DEBUG_GLCMDS(("GetIntegerv: %04x\n", (int)val)); } -void glGetLightfv(GLenum light, GLenum pname, GLfloat *params) +void _gamma_GetLightfv(GLenum light, GLenum pname, GLfloat *params) { } -void glGetLightiv(GLenum light, GLenum pname, GLint *params) +void _gamma_GetLightiv(GLenum light, GLenum pname, GLint *params) { } -void glGetMapdv(GLenum target, GLenum query, GLdouble *v) +void _gamma_GetMapdv(GLenum target, GLenum query, GLdouble *v) { } -void glGetMapfv(GLenum target, GLenum query, GLfloat *v) +void _gamma_GetMapfv(GLenum target, GLenum query, GLfloat *v) { } -void glGetMapiv(GLenum target, GLenum query, GLint *v) +void _gamma_GetMapiv(GLenum target, GLenum query, GLint *v) { } -void glGetMaterialfv(GLenum face, GLenum pname, GLfloat *params) +void _gamma_GetMaterialfv(GLenum face, GLenum pname, GLfloat *params) { } -void glGetMaterialiv(GLenum face, GLenum pname, GLint *params) +void _gamma_GetMaterialiv(GLenum face, GLenum pname, GLint *params) { } -void glGetPixelMapfv(GLenum map, GLfloat *values) +void _gamma_GetPixelMapfv(GLenum map, GLfloat *values) { } -void glGetPixelMapuiv(GLenum map, GLuint *values) +void _gamma_GetPixelMapuiv(GLenum map, GLuint *values) { } -void glGetPixelMapusv(GLenum map, GLushort *values) +void _gamma_GetPixelMapusv(GLenum map, GLushort *values) { } -void glGetPointerv(GLenum pname, void **params) +void _gamma_GetPointerv(GLenum pname, void **params) { DEBUG_GLCMDS(("GetPointerv: %04x\n", (int)pname)); } -void glGetPolygonStipple(GLubyte *mask) +void _gamma_GetPolygonStipple(GLubyte *mask) { } -const GLubyte *glGetString(GLenum name) +const GLubyte *_gamma_GetString(GLenum name) { - static unsigned char vendor[] = "vendor"; - static unsigned char renderer[] = "renderer"; + static unsigned char vendor[] = "Precision Insight, Inc."; + static unsigned char renderer[] = "DRI Glint-Gamma 20000228"; static unsigned char version[] = "1.1"; static unsigned char ext[] = ""; @@ -1536,190 +1535,190 @@ const GLubyte *glGetString(GLenum name) return NULL; } -void glGetTexEnvfv(GLenum target, GLenum pname, GLfloat *params) +void _gamma_GetTexEnvfv(GLenum target, GLenum pname, GLfloat *params) { } -void glGetTexEnviv(GLenum target, GLenum pname, GLint *params) +void _gamma_GetTexEnviv(GLenum target, GLenum pname, GLint *params) { } -void glGetTexGendv(GLenum coord, GLenum pname, GLdouble *params) +void _gamma_GetTexGendv(GLenum coord, GLenum pname, GLdouble *params) { } -void glGetTexGenfv(GLenum coord, GLenum pname, GLfloat *params) +void _gamma_GetTexGenfv(GLenum coord, GLenum pname, GLfloat *params) { } -void glGetTexGeniv(GLenum coord, GLenum pname, GLint *params) +void _gamma_GetTexGeniv(GLenum coord, GLenum pname, GLint *params) { } -void glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *texels) +void _gamma_GetTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *texels) { } -void glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params) +void _gamma_GetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params) { } -void glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params) +void _gamma_GetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params) { } -void glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params) +void _gamma_GetTexParameterfv(GLenum target, GLenum pname, GLfloat *params) { } -void glGetTexParameteriv(GLenum target, GLenum pname, GLint *params) +void _gamma_GetTexParameteriv(GLenum target, GLenum pname, GLint *params) { } -void glHint(GLenum target, GLenum mode) +void _gamma_Hint(GLenum target, GLenum mode) { DEBUG_GLCMDS(("Hint: %04x %04x\n", (int)target, (int)mode)); } -void glIndexMask(GLuint mask) +void _gamma_IndexMask(GLuint mask) { DEBUG_GLCMDS(("Hint: %d\n", (unsigned int)mask)); } -void glIndexPointer(GLenum type, GLsizei stride, const GLvoid *pointer) +void _gamma_IndexPointer(GLenum type, GLsizei stride, const GLvoid *pointer) { DEBUG_GLCMDS(("IndexPointer: %04x %d\n", (int)type, (int)stride)); } -void glIndexd(GLdouble c) +void _gamma_Indexd(GLdouble c) { DEBUG_GLCMDS(("Indexd: %f\n", c)); } -void glIndexdv(const GLdouble *c) +void _gamma_Indexdv(const GLdouble *c) { DEBUG_GLCMDS(("Indexdv: %f\n", *c)); } -void glIndexf(GLfloat c) +void _gamma_Indexf(GLfloat c) { DEBUG_GLCMDS(("Indexf: %f\n", c)); } -void glIndexfv(const GLfloat *c) +void _gamma_Indexfv(const GLfloat *c) { DEBUG_GLCMDS(("Indexdv: %f\n", *c)); } -void glIndexi(GLint c) +void _gamma_Indexi(GLint c) { DEBUG_GLCMDS(("Indexi: %d\n", (int)c)); } -void glIndexiv(const GLint *c) +void _gamma_Indexiv(const GLint *c) { DEBUG_GLCMDS(("Indexiv: %d\n", (int)*c)); } -void glIndexs(GLshort c) +void _gamma_Indexs(GLshort c) { DEBUG_GLCMDS(("Indexs: %d\n", c)); } -void glIndexsv(const GLshort *c) +void _gamma_Indexsv(const GLshort *c) { DEBUG_GLCMDS(("Indexsv: %d\n", *c)); } -void glIndexub(GLubyte c) +void _gamma_Indexub(GLubyte c) { DEBUG_GLCMDS(("Indexub: %d\n", c)); } -void glIndexubv(const GLubyte *c) +void _gamma_Indexubv(const GLubyte *c) { DEBUG_GLCMDS(("Indexubv: %d\n", *c)); } -void glInitNames(void) +void _gamma_InitNames(void) { DEBUG_GLCMDS(("InitNames\n")); } -void glInterleavedArrays(GLenum format, GLsizei stride, const GLvoid *pointer) +void _gamma_InterleavedArrays(GLenum format, GLsizei stride, const GLvoid *pointer) { DEBUG_GLCMDS(("InterleavedArrays: %04x %d\n", (int)format, (int)stride)); } -GLboolean glIsEnabled(GLenum cap) +GLboolean _gamma_IsEnabled(GLenum cap) { DEBUG_GLCMDS(("IsEnabled: %04x\n", (int)cap)); return GL_TRUE; } -GLboolean glIsList(GLuint list) +GLboolean _gamma_IsList(GLuint list) { DEBUG_GLCMDS(("IsList: %04x\n", (unsigned int)list)); return GL_TRUE; } -GLboolean glIsTexture(GLuint texture) +GLboolean _gamma_IsTexture(GLuint texture) { DEBUG_GLCMDS(("IsTexture: %04x\n", (unsigned int)texture)); return GL_TRUE; } -void glLightModelf(GLenum pname, GLfloat param) +void _gamma_LightModelf(GLenum pname, GLfloat param) { } -void glLightModelfv(GLenum pname, const GLfloat *params) +void _gamma_LightModelfv(GLenum pname, const GLfloat *params) { } -void glLightModeli(GLenum pname, GLint param) +void _gamma_LightModeli(GLenum pname, GLint param) { } -void glLightModeliv(GLenum pname, const GLint *params) +void _gamma_LightModeliv(GLenum pname, const GLint *params) { } -void glLightf(GLenum light, GLenum pname, GLfloat param) +void _gamma_Lightf(GLenum light, GLenum pname, GLfloat param) { } -void glLightfv(GLenum light, GLenum pname, const GLfloat *params) +void _gamma_Lightfv(GLenum light, GLenum pname, const GLfloat *params) { } -void glLighti(GLenum light, GLenum pname, GLint param) +void _gamma_Lighti(GLenum light, GLenum pname, GLint param) { } -void glLightiv(GLenum light, GLenum pname, const GLint *params) +void _gamma_Lightiv(GLenum light, GLenum pname, const GLint *params) { } -void glLineStipple(GLint factor, GLushort pattern) +void _gamma_LineStipple(GLint factor, GLushort pattern) { DEBUG_GLCMDS(("LineStipple: %d %d\n", (int)factor, pattern)); } -void glLineWidth(GLfloat width) +void _gamma_LineWidth(GLfloat width) { DEBUG_GLCMDS(("LineWidth: %f\n", width)); } -void glListBase(GLuint base) +void _gamma_ListBase(GLuint base) { DEBUG_GLCMDS(("ListBase: %d\n", (unsigned int)base)); } -void glLoadIdentity(void) +void _gamma_LoadIdentity(void) { DEBUG_GLCMDS(("LoadIdentity: %04x\n", gCCPriv->MatrixMode)); @@ -1727,7 +1726,7 @@ void glLoadIdentity(void) gammaLoadHWMatrix(); } -void glLoadMatrixd(const GLdouble *m) +void _gamma_LoadMatrixd(const GLdouble *m) { GLfloat f[16]; int i; @@ -1739,7 +1738,7 @@ void glLoadMatrixd(const GLdouble *m) gammaLoadHWMatrix(); } -void glLoadMatrixf(const GLfloat *m) +void _gamma_LoadMatrixf(const GLfloat *m) { DEBUG_GLCMDS(("LoadMatrixf: %04x\n", gCCPriv->MatrixMode)); @@ -1747,29 +1746,29 @@ void glLoadMatrixf(const GLfloat *m) gammaLoadHWMatrix(); } -void glLoadName(GLuint name) +void _gamma_LoadName(GLuint name) { DEBUG_GLCMDS(("LoadName: %d\n", (unsigned int)name)); } -void glLogicOp(GLenum opcode) +void _gamma_LogicOp(GLenum opcode) { DEBUG_GLCMDS(("LogicOp: %04x\n", (int)opcode)); } -void glMap1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *pnts) +void _gamma_Map1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *pnts) { DEBUG_GLCMDS(("Map1d: %04x %f %f %d %d\n", (int)target, u1, u2, (int)stride, (int)order)); } -void glMap1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *pnts) +void _gamma_Map1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *pnts) { DEBUG_GLCMDS(("Map1f: %04x %f %f %d %d\n", (int)target, u1, u2, (int)stride, (int)order)); } -void glMap2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustr, GLint uord, GLdouble v1, GLdouble v2, GLint vstr, GLint vord, const GLdouble *pnts) +void _gamma_Map2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustr, GLint uord, GLdouble v1, GLdouble v2, GLint vstr, GLint vord, const GLdouble *pnts) { DEBUG_GLCMDS(("Map2d: %04x %f %f %d %d %f %f %d %d\n", (int)target, @@ -1777,7 +1776,7 @@ void glMap2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustr, GLint uord, GL v1, v2, (int)vstr, (int)vord)); } -void glMap2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustr, GLint uord, GLfloat v1, GLfloat v2, GLint vstr, GLint vord, const GLfloat *pnts) +void _gamma_Map2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustr, GLint uord, GLfloat v1, GLfloat v2, GLint vstr, GLint vord, const GLfloat *pnts) { DEBUG_GLCMDS(("Map2f: %04x %f %f %d %d %f %f %d %d\n", (int)target, @@ -1785,54 +1784,54 @@ void glMap2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustr, GLint uord, GLfl v1, v2, (int)vstr, (int)vord)); } -void glMapGrid1d(GLint un, GLdouble u1, GLdouble u2) +void _gamma_MapGrid1d(GLint un, GLdouble u1, GLdouble u2) { DEBUG_GLCMDS(("MapGrid1d: %d %f %f\n", (int)un, u1, u2)); } -void glMapGrid1f(GLint un, GLfloat u1, GLfloat u2) +void _gamma_MapGrid1f(GLint un, GLfloat u1, GLfloat u2) { DEBUG_GLCMDS(("MapGrid1f: %d %f %f\n", (int)un, u1, u2)); } -void glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2) +void _gamma_MapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2) { DEBUG_GLCMDS(("MapGrid2d: %d %f %f %d %f %f\n", (int)un, u1, u2, (int)vn, v1, v2)); } -void glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2) +void _gamma_MapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2) { DEBUG_GLCMDS(("MapGrid2f: %d %f %f %d %f %f\n", (int)un, u1, u2, (int)vn, v1, v2)); } -void glMaterialf(GLenum face, GLenum pname, GLfloat param) +void _gamma_Materialf(GLenum face, GLenum pname, GLfloat param) { DEBUG_GLCMDS(("Materialf: %04x %04x %f\n", (int)face, (int)pname, param)); } -void glMaterialfv(GLenum face, GLenum pname, const GLfloat *params) +void _gamma_Materialfv(GLenum face, GLenum pname, const GLfloat *params) { DEBUG_GLCMDS(("Materialfv: %04x %04x %f\n", (int)face, (int)pname, *params)); } -void glMateriali(GLenum face, GLenum pname, GLint param) +void _gamma_Materiali(GLenum face, GLenum pname, GLint param) { DEBUG_GLCMDS(("Materiali: %04x %04x %d\n", (int)face, (int)pname, (int)param)); } -void glMaterialiv(GLenum face, GLenum pname, const GLint *params) +void _gamma_Materialiv(GLenum face, GLenum pname, const GLint *params) { DEBUG_GLCMDS(("Materialiv: %04x %04x %d\n", (int)face, (int)pname, (int)*params)); } -void glMatrixMode(GLenum mode) +void _gamma_MatrixMode(GLenum mode) { DEBUG_GLCMDS(("MatrixMode: %04x\n", (int)mode)); @@ -1852,7 +1851,7 @@ void glMatrixMode(GLenum mode) } -void glMultMatrixd(const GLdouble *m) +void _gamma_MultMatrixd(const GLdouble *m) { GLfloat f[16]; int i; @@ -1864,7 +1863,7 @@ void glMultMatrixd(const GLdouble *m) gammaLoadHWMatrix(); } -void glMultMatrixf(const GLfloat *m) +void _gamma_MultMatrixf(const GLfloat *m) { DEBUG_GLCMDS(("MatrixMultf\n")); @@ -1872,67 +1871,67 @@ void glMultMatrixf(const GLfloat *m) gammaLoadHWMatrix(); } -void glNewList(GLuint list, GLenum mode) +void _gamma_NewList(GLuint list, GLenum mode) { DEBUG_GLCMDS(("NewList: %d %04x\n", (unsigned int)list, (int)mode)); } -void glNormal3b(GLbyte nx, GLbyte ny, GLbyte nz) +void _gamma_Normal3b(GLbyte nx, GLbyte ny, GLbyte nz) { DEBUG_GLCMDS(("Normal3b: %d %d %d\n", nx, ny, nz)); } -void glNormal3bv(const GLbyte *v) +void _gamma_Normal3bv(const GLbyte *v) { DEBUG_GLCMDS(("Normal3bv: %d %d %d\n", v[0], v[1], v[2])); } -void glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz) +void _gamma_Normal3d(GLdouble nx, GLdouble ny, GLdouble nz) { DEBUG_GLCMDS(("Normal3d: %f %f %f\n", nx, ny, nz)); } -void glNormal3dv(const GLdouble *v) +void _gamma_Normal3dv(const GLdouble *v) { DEBUG_GLCMDS(("Normal3dv: %f %f %f\n", v[0], v[1], v[2])); } -void glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz) +void _gamma_Normal3f(GLfloat nx, GLfloat ny, GLfloat nz) { DEBUG_GLCMDS(("Normal3f: %f %f %f\n", nx, ny, nz)); } -void glNormal3fv(const GLfloat *v) +void _gamma_Normal3fv(const GLfloat *v) { DEBUG_GLCMDS(("Normal3fv: %f %f %f\n", v[0], v[1], v[2])); } -void glNormal3i(GLint nx, GLint ny, GLint nz) +void _gamma_Normal3i(GLint nx, GLint ny, GLint nz) { DEBUG_GLCMDS(("Normal3i: %d %d %d\n", (int)nx, (int)ny, (int)nz)); } -void glNormal3iv(const GLint *v) +void _gamma_Normal3iv(const GLint *v) { DEBUG_GLCMDS(("Normal3iv: %d %d %d\n", (int)v[0], (int)v[1], (int)v[2])); } -void glNormal3s(GLshort nx, GLshort ny, GLshort nz) +void _gamma_Normal3s(GLshort nx, GLshort ny, GLshort nz) { DEBUG_GLCMDS(("Normal3s: %d %d %d\n", nx, ny, nz)); } -void glNormal3sv(const GLshort *v) +void _gamma_Normal3sv(const GLshort *v) { DEBUG_GLCMDS(("Normal3sv: %d %d %d\n", v[0], v[1], v[2])); } -void glNormalPointer(GLenum type, GLsizei stride, const GLvoid *pointer) +void _gamma_NormalPointer(GLenum type, GLsizei stride, const GLvoid *pointer) { DEBUG_GLCMDS(("NormalPointer: %04x %d\n", (int)type, (int)stride)); } -void glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) +void _gamma_Ortho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) { #define ORTHO_X() ((GLfloat)( 2.0/(right-left))) #define ORTHO_Y() ((GLfloat)( 2.0/(top-bottom))) @@ -1962,52 +1961,52 @@ void glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdou gammaLoadHWMatrix(); } -void glPassThrough(GLfloat token) +void _gamma_PassThrough(GLfloat token) { DEBUG_GLCMDS(("PassThrough: %f\n", token)); } -void glPixelMapfv(GLenum map, GLint mapsize, const GLfloat *values) +void _gamma_PixelMapfv(GLenum map, GLint mapsize, const GLfloat *values) { DEBUG_GLCMDS(("PixelMapfv: %04x %d\n", (int)map, (int)mapsize)); } -void glPixelMapuiv(GLenum map, GLint mapsize, const GLuint *values) +void _gamma_PixelMapuiv(GLenum map, GLint mapsize, const GLuint *values) { DEBUG_GLCMDS(("PixelMapiv: %04x %d\n", (int)map, (int)mapsize)); } -void glPixelMapusv(GLenum map, GLint mapsize, const GLushort *values) +void _gamma_PixelMapusv(GLenum map, GLint mapsize, const GLushort *values) { DEBUG_GLCMDS(("PixelMapusv: %04x %d\n", (int)map, (int)mapsize)); } -void glPixelStoref(GLenum pname, GLfloat param) +void _gamma_PixelStoref(GLenum pname, GLfloat param) { DEBUG_GLCMDS(("PixelStoref: %04x %f\n", (int)pname, param)); } -void glPixelStorei(GLenum pname, GLint param) +void _gamma_PixelStorei(GLenum pname, GLint param) { DEBUG_GLCMDS(("PixelStorei: %04x %d\n", (int)pname, (int)param)); } -void glPixelTransferf(GLenum pname, GLfloat param) +void _gamma_PixelTransferf(GLenum pname, GLfloat param) { DEBUG_GLCMDS(("PixelTransferf: %04x %f\n", (int)pname, param)); } -void glPixelTransferi(GLenum pname, GLint param) +void _gamma_PixelTransferi(GLenum pname, GLint param) { DEBUG_GLCMDS(("PixelTransferi: %04x %d\n", (int)pname, (int)param)); } -void glPixelZoom(GLfloat xfactor, GLfloat yfactor) +void _gamma_PixelZoom(GLfloat xfactor, GLfloat yfactor) { DEBUG_GLCMDS(("PixelZoom: %f %f\n", xfactor, yfactor)); } -void glPointSize(GLfloat size) +void _gamma_PointSize(GLfloat size) { unsigned char s = size; @@ -2018,32 +2017,32 @@ void glPointSize(GLfloat size) WRITE(gCCPriv->buf, PointSize, s); } -void glPolygonMode(GLenum face, GLenum mode) +void _gamma_PolygonMode(GLenum face, GLenum mode) { DEBUG_GLCMDS(("PolygonMode: %04x %04x\n", (int)face, (int)mode)); } -void glPolygonOffset(GLfloat factor, GLfloat units) +void _gamma_PolygonOffset(GLfloat factor, GLfloat units) { DEBUG_GLCMDS(("PolygonOffset: %f %f\n", factor, units)); } -void glPolygonStipple(const GLubyte *mask) +void _gamma_PolygonStipple(const GLubyte *mask) { DEBUG_GLCMDS(("PolygonStipple: \n")); } -void glPopAttrib(void) +void _gamma_PopAttrib(void) { DEBUG_GLCMDS(("PopAttrib\n")); } -void glPopClientAttrib(void) +void _gamma_PopClientAttrib(void) { DEBUG_GLCMDS(("PopClientAttrib\n")); } -void glPopMatrix(void) +void _gamma_PopMatrix(void) { DEBUG_GLCMDS(("PopMatrix: %04x\n", gCCPriv->MatrixMode)); @@ -2087,27 +2086,27 @@ void glPopMatrix(void) } } -void glPopName(void) +void _gamma_PopName(void) { DEBUG_GLCMDS(("PopName\n")); } -void glPrioritizeTextures(GLsizei n, const GLuint *textures, const GLclampf *priorities) +void _gamma_PrioritizeTextures(GLsizei n, const GLuint *textures, const GLclampf *priorities) { DEBUG_GLCMDS(("PrioritizeTextures: %d\n", (int)n)); } -void glPushAttrib(GLbitfield mask) +void _gamma_PushAttrib(GLbitfield mask) { DEBUG_GLCMDS(("PushAttrib: %04x\n", (int)mask)); } -void glPushClientAttrib(GLuint mask) +void _gamma_PushClientAttrib(GLuint mask) { DEBUG_GLCMDS(("PushClientAttrib: %04x\n", (unsigned int)mask)); } -void glPushMatrix(void) +void _gamma_PushMatrix(void) { DEBUG_GLCMDS(("PushMatrix: %04x\n", gCCPriv->MatrixMode)); @@ -2148,167 +2147,167 @@ void glPushMatrix(void) } } -void glPushName(GLuint name) +void _gamma_PushName(GLuint name) { DEBUG_GLCMDS(("PushName: %d\n", (int)name)); } -void glRasterPos2d(GLdouble x, GLdouble y) +void _gamma_RasterPos2d(GLdouble x, GLdouble y) { } -void glRasterPos2dv(const GLdouble *v) +void _gamma_RasterPos2dv(const GLdouble *v) { } -void glRasterPos2f(GLfloat x, GLfloat y) +void _gamma_RasterPos2f(GLfloat x, GLfloat y) { } -void glRasterPos2fv(const GLfloat *v) +void _gamma_RasterPos2fv(const GLfloat *v) { } -void glRasterPos2i(GLint x, GLint y) +void _gamma_RasterPos2i(GLint x, GLint y) { } -void glRasterPos2iv(const GLint *v) +void _gamma_RasterPos2iv(const GLint *v) { } -void glRasterPos2s(GLshort x, GLshort y) +void _gamma_RasterPos2s(GLshort x, GLshort y) { } -void glRasterPos2sv(const GLshort *v) +void _gamma_RasterPos2sv(const GLshort *v) { } -void glRasterPos3d(GLdouble x, GLdouble y, GLdouble z) +void _gamma_RasterPos3d(GLdouble x, GLdouble y, GLdouble z) { } -void glRasterPos3dv(const GLdouble *v) +void _gamma_RasterPos3dv(const GLdouble *v) { } -void glRasterPos3f(GLfloat x, GLfloat y, GLfloat z) +void _gamma_RasterPos3f(GLfloat x, GLfloat y, GLfloat z) { } -void glRasterPos3fv(const GLfloat *v) +void _gamma_RasterPos3fv(const GLfloat *v) { } -void glRasterPos3i(GLint x, GLint y, GLint z) +void _gamma_RasterPos3i(GLint x, GLint y, GLint z) { } -void glRasterPos3iv(const GLint *v) +void _gamma_RasterPos3iv(const GLint *v) { } -void glRasterPos3s(GLshort x, GLshort y, GLshort z) +void _gamma_RasterPos3s(GLshort x, GLshort y, GLshort z) { } -void glRasterPos3sv(const GLshort *v) +void _gamma_RasterPos3sv(const GLshort *v) { } -void glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w) +void _gamma_RasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w) { } -void glRasterPos4dv(const GLdouble *v) +void _gamma_RasterPos4dv(const GLdouble *v) { } -void glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w) +void _gamma_RasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w) { } -void glRasterPos4fv(const GLfloat *v) +void _gamma_RasterPos4fv(const GLfloat *v) { } -void glRasterPos4i(GLint x, GLint y, GLint z, GLint w) +void _gamma_RasterPos4i(GLint x, GLint y, GLint z, GLint w) { } -void glRasterPos4iv(const GLint *v) +void _gamma_RasterPos4iv(const GLint *v) { } -void glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w) +void _gamma_RasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w) { } -void glRasterPos4sv(const GLshort *v) +void _gamma_RasterPos4sv(const GLshort *v) { } -void glReadBuffer(GLenum mode) +void _gamma_ReadBuffer(GLenum mode) { DEBUG_GLCMDS(("ReadBuffer: %04x\n", (int)mode)); } -void glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels) +void _gamma_ReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels) { DEBUG_GLCMDS(("ReadPixels: %d %d %d %d %04x %04x\n", (int)x, (int)y, (int)width, (int)height, (int)format, (int)type)); } -void glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2) +void _gamma_Rectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2) { DEBUG_GLCMDS(("Rectd: %f %f %f %f\n", x1, y1, x2, y2)); } -void glRectdv(const GLdouble *v1, const GLdouble *v2) +void _gamma_Rectdv(const GLdouble *v1, const GLdouble *v2) { DEBUG_GLCMDS(("Rectdv: %f %f %f %f\n", v1[0], v1[1], v2[0], v2[1])); } -void glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2) +void _gamma_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2) { DEBUG_GLCMDS(("Rectf: %f %f %f %f\n", x1, y1, x2, y2)); } -void glRectfv(const GLfloat *v1, const GLfloat *v2) +void _gamma_Rectfv(const GLfloat *v1, const GLfloat *v2) { DEBUG_GLCMDS(("Rectfv: %f %f %f %f\n", v1[0], v1[1], v2[0], v2[1])); } -void glRecti(GLint x1, GLint y1, GLint x2, GLint y2) +void _gamma_Recti(GLint x1, GLint y1, GLint x2, GLint y2) { DEBUG_GLCMDS(("Recti: %d %d %d %d\n", (int)x1, (int)y1, (int)x2, (int)y2)); } -void glRectiv(const GLint *v1, const GLint *v2) +void _gamma_Rectiv(const GLint *v1, const GLint *v2) { DEBUG_GLCMDS(("Rectiv: %d %d %d %d\n", (int)v1[0], (int)v1[1], (int)v2[0], (int)v2[1])); } -void glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2) +void _gamma_Rects(GLshort x1, GLshort y1, GLshort x2, GLshort y2) { DEBUG_GLCMDS(("Rects: %d %d %d %d\n", x1, y1, x2, y2)); } -void glRectsv(const GLshort *v1, const GLshort *v2) +void _gamma_Rectsv(const GLshort *v1, const GLshort *v2) { DEBUG_GLCMDS(("Rectsv: %d %d %d %d\n", v1[0], v1[1], v2[0], v2[1])); } -GLint glRenderMode(GLenum mode) +GLint _gamma_RenderMode(GLenum mode) { DEBUG_GLCMDS(("RenderMode: %04x\n", (int)mode)); return GL_TRUE; } -void glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z) +void _gamma_Rotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z) { GLfloat m[16]; GLfloat l, c, s; @@ -2345,7 +2344,7 @@ void glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z) gammaLoadHWMatrix(); } -void glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) +void _gamma_Rotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) { GLfloat m[16]; GLfloat l, c, s; @@ -2382,7 +2381,7 @@ void glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) gammaLoadHWMatrix(); } -void glScaled(GLdouble x, GLdouble y, GLdouble z) +void _gamma_Scaled(GLdouble x, GLdouble y, GLdouble z) { GLfloat m[16]; int i; @@ -2400,7 +2399,7 @@ void glScaled(GLdouble x, GLdouble y, GLdouble z) gammaLoadHWMatrix(); } -void glScalef(GLfloat x, GLfloat y, GLfloat z) +void _gamma_Scalef(GLfloat x, GLfloat y, GLfloat z) { GLfloat m[16]; int i; @@ -2418,18 +2417,18 @@ void glScalef(GLfloat x, GLfloat y, GLfloat z) gammaLoadHWMatrix(); } -void glScissor(GLint x, GLint y, GLsizei width, GLsizei height) +void _gamma_Scissor(GLint x, GLint y, GLsizei width, GLsizei height) { DEBUG_GLCMDS(("Scissor: %d %d %d %d\n", (int)x, (int)y, (int)width, (int)height)); } -void glSelectBuffer(GLsizei numnames, GLuint *buffer) +void _gamma_SelectBuffer(GLsizei numnames, GLuint *buffer) { DEBUG_GLCMDS(("SelectBuffer: %d\n", (int)numnames)); } -void glShadeModel(GLenum mode) +void _gamma_ShadeModel(GLenum mode) { DEBUG_GLCMDS(("ShadeModel: %04x\n", (int)mode)); @@ -2455,74 +2454,74 @@ void glShadeModel(GLenum mode) WRITE(gCCPriv->buf, ColorDDAMode, gCCPriv->ColorDDAMode); } -void glStencilFunc(GLenum func, GLint ref, GLuint mask) +void _gamma_StencilFunc(GLenum func, GLint ref, GLuint mask) { DEBUG_GLCMDS(("StencilFunc: %04x %d %d\n", (int)func, (int)ref, (unsigned int)mask)); } -void glStencilMask(GLuint mask) +void _gamma_StencilMask(GLuint mask) { DEBUG_GLCMDS(("StencilMask: %d\n", (unsigned int)mask)); } -void glStencilOp(GLenum fail, GLenum zfail, GLenum zpass) +void _gamma_StencilOp(GLenum fail, GLenum zfail, GLenum zpass) { DEBUG_GLCMDS(("StencilOp: %04x %04x %04x\n", (int)fail, (int)zfail, (int)zpass)); } -void glTexCoord1d(GLdouble s) +void _gamma_TexCoord1d(GLdouble s) { DEBUG_GLCMDS(("TexCoord1d: %f\n", s)); } -void glTexCoord1dv(const GLdouble *v) +void _gamma_TexCoord1dv(const GLdouble *v) { DEBUG_GLCMDS(("TexCoord1dv: %f\n", *v)); } -void glTexCoord1f(GLfloat s) +void _gamma_TexCoord1f(GLfloat s) { DEBUG_GLCMDS(("TexCoord1f: %f\n", s)); } -void glTexCoord1fv(const GLfloat *v) +void _gamma_TexCoord1fv(const GLfloat *v) { DEBUG_GLCMDS(("TexCoord1fv: %f\n", *v)); } -void glTexCoord1i(GLint s) +void _gamma_TexCoord1i(GLint s) { DEBUG_GLCMDS(("TexCoord1i: %d\n", (int)s)); } -void glTexCoord1iv(const GLint *v) +void _gamma_TexCoord1iv(const GLint *v) { DEBUG_GLCMDS(("TexCoord1iv: %d\n", (int)*v)); } -void glTexCoord1s(GLshort s) +void _gamma_TexCoord1s(GLshort s) { DEBUG_GLCMDS(("TexCoord1s: %d\n", s)); } -void glTexCoord1sv(const GLshort *v) +void _gamma_TexCoord1sv(const GLshort *v) { DEBUG_GLCMDS(("TexCoord1sv: %d\n", *v)); } -void glTexCoord2d(GLdouble s, GLdouble t) +void _gamma_TexCoord2d(GLdouble s, GLdouble t) { DEBUG_GLCMDS(("TexCoord2d: %f %f\n", s, t)); } -void glTexCoord2dv(const GLdouble *v) +void _gamma_TexCoord2dv(const GLdouble *v) { DEBUG_GLCMDS(("TexCoord2dv: %f %f\n", v[0], v[1])); } -void glTexCoord2f(GLfloat s, GLfloat t) +void _gamma_TexCoord2f(GLfloat s, GLfloat t) { DEBUG_GLCMDS(("TexCoord2f: %f %f\n", s, t)); @@ -2531,119 +2530,119 @@ void glTexCoord2f(GLfloat s, GLfloat t) WRITEF(gCCPriv->buf, Ts2, s); } -void glTexCoord2fv(const GLfloat *v) +void _gamma_TexCoord2fv(const GLfloat *v) { DEBUG_GLCMDS(("TexCoord2fv: %f %f\n", v[0], v[1])); } -void glTexCoord2i(GLint s, GLint t) +void _gamma_TexCoord2i(GLint s, GLint t) { DEBUG_GLCMDS(("TexCoord2i: %d %d\n", (int)s, (int)t)); } -void glTexCoord2iv(const GLint *v) +void _gamma_TexCoord2iv(const GLint *v) { DEBUG_GLCMDS(("TexCoord2iv: %d %d\n", (int)v[0], (int)v[1])); } -void glTexCoord2s(GLshort s, GLshort t) +void _gamma_TexCoord2s(GLshort s, GLshort t) { DEBUG_GLCMDS(("TexCoord2s: %d %d\n", s, t)); } -void glTexCoord2sv(const GLshort *v) +void _gamma_TexCoord2sv(const GLshort *v) { DEBUG_GLCMDS(("TexCoord2sv: %d %d\n", v[0], v[1])); } -void glTexCoord3d(GLdouble s, GLdouble t, GLdouble r) +void _gamma_TexCoord3d(GLdouble s, GLdouble t, GLdouble r) { DEBUG_GLCMDS(("TexCoord3d: %f %f %f\n", s, t, r)); } -void glTexCoord3dv(const GLdouble *v) +void _gamma_TexCoord3dv(const GLdouble *v) { DEBUG_GLCMDS(("TexCoord3dv: %f %f %f\n", v[0], v[1], v[2])); } -void glTexCoord3f(GLfloat s, GLfloat t, GLfloat r) +void _gamma_TexCoord3f(GLfloat s, GLfloat t, GLfloat r) { DEBUG_GLCMDS(("TexCoord3f: %f %f %f\n", s, t, r)); } -void glTexCoord3fv(const GLfloat *v) +void _gamma_TexCoord3fv(const GLfloat *v) { DEBUG_GLCMDS(("TexCoord3fv: %f %f %f\n", v[0], v[1], v[2])); } -void glTexCoord3i(GLint s, GLint t, GLint r) +void _gamma_TexCoord3i(GLint s, GLint t, GLint r) { DEBUG_GLCMDS(("TexCoord3i: %d %d %d\n", (int)s, (int)t, (int)r)); } -void glTexCoord3iv(const GLint *v) +void _gamma_TexCoord3iv(const GLint *v) { DEBUG_GLCMDS(("TexCoord3iv: %d %d %d\n", (int)v[0], (int)v[1], (int)v[2])); } -void glTexCoord3s(GLshort s, GLshort t, GLshort r) +void _gamma_TexCoord3s(GLshort s, GLshort t, GLshort r) { DEBUG_GLCMDS(("TexCoord3s: %d %d %d\n", s, t, r)); } -void glTexCoord3sv(const GLshort *v) +void _gamma_TexCoord3sv(const GLshort *v) { DEBUG_GLCMDS(("TexCoord3sv: %d %d %d\n", v[0], v[1], v[2])); } -void glTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q) +void _gamma_TexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q) { DEBUG_GLCMDS(("TexCoord4d: %f %f %f %f\n", s, t, r, q)); } -void glTexCoord4dv(const GLdouble *v) +void _gamma_TexCoord4dv(const GLdouble *v) { DEBUG_GLCMDS(("TexCoord4dv: %f %f %f %f\n", v[0], v[1], v[2], v[3])); } -void glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q) +void _gamma_TexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q) { DEBUG_GLCMDS(("TexCoord4f: %f %f %f %f\n", s, t, r, q)); } -void glTexCoord4fv(const GLfloat *v) +void _gamma_TexCoord4fv(const GLfloat *v) { DEBUG_GLCMDS(("TexCoord4fv: %f %f %f %f\n", v[0], v[1], v[2], v[3])); } -void glTexCoord4i(GLint s, GLint t, GLint r, GLint q) +void _gamma_TexCoord4i(GLint s, GLint t, GLint r, GLint q) { DEBUG_GLCMDS(("TexCoord4i: %d %d %d %d\n", (int)s, (int)t, (int)r, (int)q)); } -void glTexCoord4iv(const GLint *v) +void _gamma_TexCoord4iv(const GLint *v) { DEBUG_GLCMDS(("TexCoord4iv: %d %d %d %d\n", (int)v[0], (int)v[1], (int)v[2], (int)v[3])); } -void glTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q) +void _gamma_TexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q) { DEBUG_GLCMDS(("TexCoord4s: %d %d %d %d\n", s, t, r, q)); } -void glTexCoord4sv(const GLshort *v) +void _gamma_TexCoord4sv(const GLshort *v) { DEBUG_GLCMDS(("TexCoord4sv: %d %d %d %d\n", v[0], v[1], v[2], v[3])); } -void glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) +void _gamma_TexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) { DEBUG_GLCMDS(("TexCoordPointer: %d %04x %d\n", (int)size, (int)type, (int)stride)); } -void glTexEnvf(GLenum target, GLenum pname, GLfloat param) +void _gamma_TexEnvf(GLenum target, GLenum pname, GLfloat param) { DEBUG_GLCMDS(("TexEnvf: %04x %04x %f\n", (int)target, (int)pname, param)); @@ -2675,64 +2674,64 @@ void glTexEnvf(GLenum target, GLenum pname, GLfloat param) gCCPriv->curTexObj->TextureColorMode); } -void glTexEnvfv(GLenum target, GLenum pname, const GLfloat *params) +void _gamma_TexEnvfv(GLenum target, GLenum pname, const GLfloat *params) { DEBUG_GLCMDS(("TexEnvfv: %04x %04x %f\n", (int)target, (int)pname, *params)); } -void glTexEnvi(GLenum target, GLenum pname, GLint param) +void _gamma_TexEnvi(GLenum target, GLenum pname, GLint param) { DEBUG_GLCMDS(("TexEnvi: %04x %04x %d\n", (int)target, (int)pname, (int)param)); } -void glTexEnviv(GLenum target, GLenum pname, const GLint *params) +void _gamma_TexEnviv(GLenum target, GLenum pname, const GLint *params) { DEBUG_GLCMDS(("TexEnviv: %04x %04x %d\n", (int)target, (int)pname, (int)*params)); } -void glTexGend(GLenum coord, GLenum pname, GLdouble param) +void _gamma_TexGend(GLenum coord, GLenum pname, GLdouble param) { DEBUG_GLCMDS(("TexGend: %04x %04x %f\n", (int)coord, (int)pname, param)); } -void glTexGendv(GLenum coord, GLenum pname, const GLdouble *params) +void _gamma_TexGendv(GLenum coord, GLenum pname, const GLdouble *params) { DEBUG_GLCMDS(("TexGendv: %04x %04x %f\n", (int)coord, (int)pname, *params)); } -void glTexGenf(GLenum coord, GLenum pname, GLfloat param) +void _gamma_TexGenf(GLenum coord, GLenum pname, GLfloat param) { DEBUG_GLCMDS(("TexGenf: %04x %04x %f\n", (int)coord, (int)pname, param)); } -void glTexGenfv(GLenum coord, GLenum pname, const GLfloat *params) +void _gamma_TexGenfv(GLenum coord, GLenum pname, const GLfloat *params) { DEBUG_GLCMDS(("TexGenfv: %04x %04x %f\n", (int)coord, (int)pname, *params)); } -void glTexGeni(GLenum coord, GLenum pname, GLint param) +void _gamma_TexGeni(GLenum coord, GLenum pname, GLint param) { DEBUG_GLCMDS(("TexGeni: %04x %04x %d\n", (int)coord, (int)pname, (int)param)); } -void glTexGeniv(GLenum coord, GLenum pname, const GLint *params) +void _gamma_TexGeniv(GLenum coord, GLenum pname, const GLint *params) { DEBUG_GLCMDS(("TexGeniv: %04x %04x %d\n", (int)coord, (int)pname, (int)*params)); } -void glTexImage1D(GLenum target, GLint level, GLint components, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *image) +void _gamma_TexImage1D(GLenum target, GLint level, GLint components, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *image) { DEBUG_GLCMDS(("TexImage1D: %04x %d %d %d %d %04x %04x\n", (int)target, (int)level, (int)components, (int)width, (int)border, (int)format, (int)type)); } -void glTexImage2D(GLenum target, GLint level, GLint components, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *image) +void _gamma_TexImage2D(GLenum target, GLint level, GLint components, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *image) { unsigned long addrs[MIPMAP_LEVELS]; int l2w, l2h, l2d; @@ -2884,7 +2883,7 @@ void glTexImage2D(GLenum target, GLint level, GLint components, GLsizei width, G } } -void glTexParameterf(GLenum target, GLenum pname, GLfloat param) +void _gamma_TexParameterf(GLenum target, GLenum pname, GLfloat param) { DEBUG_GLCMDS(("TexParameterf: %04x %04x %f\n", (int)target, (int)pname, param)); @@ -3007,32 +3006,32 @@ void glTexParameterf(GLenum target, GLenum pname, GLfloat param) } } -void glTexParameterfv(GLenum target, GLenum pname, const GLfloat *params) +void _gamma_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params) { DEBUG_GLCMDS(("TexParameterfv: %04x %04x %f\n", (int)target, (int)pname, *params)); } -void glTexParameteri(GLenum target, GLenum pname, GLint param) +void _gamma_TexParameteri(GLenum target, GLenum pname, GLint param) { DEBUG_GLCMDS(("TexParameteri: %04x %04x %d\n", (int)target, (int)pname, (int)param)); } -void glTexParameteriv(GLenum target, GLenum pname, const GLint *params) +void _gamma_TexParameteriv(GLenum target, GLenum pname, const GLint *params) { DEBUG_GLCMDS(("TexParameteriv: %04x %04x %d\n", (int)target, (int)pname, (int)*params)); } -void glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *image) +void _gamma_TexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *image) { DEBUG_GLCMDS(("TexSubImage1D: %04x %d %d %d %04x %04x\n", (int)target, (int)level, (int)xoffset, (int)width, (int)format, (int)type)); } -void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image) +void _gamma_TexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image) { DEBUG_GLCMDS(("TexSubImage2D: %04x %d %d %d %d %d %04x %04x\n", (int)target, (int)level, @@ -3064,7 +3063,7 @@ void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, G } } -void glTranslated(GLdouble x, GLdouble y, GLdouble z) +void _gamma_Translated(GLdouble x, GLdouble y, GLdouble z) { GLfloat m[16]; int i; @@ -3085,7 +3084,7 @@ void glTranslated(GLdouble x, GLdouble y, GLdouble z) gammaLoadHWMatrix(); } -void glTranslatef(GLfloat x, GLfloat y, GLfloat z) +void _gamma_Translatef(GLfloat x, GLfloat y, GLfloat z) { GLfloat m[16]; int i; @@ -3106,17 +3105,17 @@ void glTranslatef(GLfloat x, GLfloat y, GLfloat z) gammaLoadHWMatrix(); } -void glVertex2d(GLdouble x, GLdouble y) +void _gamma_Vertex2d(GLdouble x, GLdouble y) { DEBUG_GLCMDS(("Vertex2d: %f %f\n", x, y)); } -void glVertex2dv(const GLdouble *v) +void _gamma_Vertex2dv(const GLdouble *v) { DEBUG_GLCMDS(("Vertex2dv: %f %f\n", v[0], v[1])); } -void glVertex2f(GLfloat x, GLfloat y) +void _gamma_Vertex2f(GLfloat x, GLfloat y) { DEBUG_GLCMDS(("Vertex2f: %f %f\n", x, y)); @@ -3134,42 +3133,42 @@ void glVertex2f(GLfloat x, GLfloat y) WRITEF(gCCPriv->buf, Vx2, x); } -void glVertex2fv(const GLfloat *v) +void _gamma_Vertex2fv(const GLfloat *v) { DEBUG_GLCMDS(("Vertex2fv: %f %f\n", v[0], v[1])); } -void glVertex2i(GLint x, GLint y) +void _gamma_Vertex2i(GLint x, GLint y) { DEBUG_GLCMDS(("Vertex2i: %d %d\n", (int)x, (int)y)); } -void glVertex2iv(const GLint *v) +void _gamma_Vertex2iv(const GLint *v) { DEBUG_GLCMDS(("Vertex2iv: %d %d\n", (int)v[0], (int)v[1])); } -void glVertex2s(GLshort x, GLshort y) +void _gamma_Vertex2s(GLshort x, GLshort y) { DEBUG_GLCMDS(("Vertex2s: %d %d\n", x, y)); } -void glVertex2sv(const GLshort *v) +void _gamma_Vertex2sv(const GLshort *v) { DEBUG_GLCMDS(("Vertex2sv: %d %d\n", v[0], v[1])); } -void glVertex3d(GLdouble x, GLdouble y, GLdouble z) +void _gamma_Vertex3d(GLdouble x, GLdouble y, GLdouble z) { DEBUG_GLCMDS(("Vertex3d: %f %f %f\n", x, y, z)); } -void glVertex3dv(const GLdouble *v) +void _gamma_Vertex3dv(const GLdouble *v) { DEBUG_GLCMDS(("Vertex2fv: %f %f %f\n", v[0], v[1], v[2])); } -void glVertex3f(GLfloat x, GLfloat y, GLfloat z) +void _gamma_Vertex3f(GLfloat x, GLfloat y, GLfloat z) { DEBUG_GLCMDS(("Vertex3f: %f %f %f\n", x, y, z)); @@ -3188,7 +3187,7 @@ void glVertex3f(GLfloat x, GLfloat y, GLfloat z) WRITEF(gCCPriv->buf, Vx3, x); } -void glVertex3fv(const GLfloat *v) +void _gamma_Vertex3fv(const GLfloat *v) { DEBUG_GLCMDS(("Vertex3fv: %f %f %f\n", v[0], v[1], v[2])); @@ -3207,74 +3206,74 @@ void glVertex3fv(const GLfloat *v) WRITEF(gCCPriv->buf, Vx3, v[0]); } -void glVertex3i(GLint x, GLint y, GLint z) +void _gamma_Vertex3i(GLint x, GLint y, GLint z) { DEBUG_GLCMDS(("Vertex3i: %d %d %d\n", (int)x, (int)y, (int)z)); } -void glVertex3iv(const GLint *v) +void _gamma_Vertex3iv(const GLint *v) { DEBUG_GLCMDS(("Vertex3iv: %d %d %d\n", (int)v[0], (int)v[1], (int)v[2])); } -void glVertex3s(GLshort x, GLshort y, GLshort z) +void _gamma_Vertex3s(GLshort x, GLshort y, GLshort z) { DEBUG_GLCMDS(("Vertex3s: %d %d %d\n", x, y, z)); } -void glVertex3sv(const GLshort *v) +void _gamma_Vertex3sv(const GLshort *v) { DEBUG_GLCMDS(("Vertex3sv: %d %d %d\n", v[0], v[1], v[2])); } -void glVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w) +void _gamma_Vertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w) { DEBUG_GLCMDS(("Vertex4d: %f %f %f %f\n", x, y, z, w)); } -void glVertex4dv(const GLdouble *v) +void _gamma_Vertex4dv(const GLdouble *v) { DEBUG_GLCMDS(("Vertex4dv: %f %f %f %f\n", v[0], v[1], v[2], v[3])); } -void glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w) +void _gamma_Vertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w) { DEBUG_GLCMDS(("Vertex4f: %f %f %f %f\n", x, y, z, w)); } -void glVertex4fv(const GLfloat *v) +void _gamma_Vertex4fv(const GLfloat *v) { DEBUG_GLCMDS(("Vertex4fv: %f %f %f %f\n", v[0], v[1], v[2], v[3])); } -void glVertex4i(GLint x, GLint y, GLint z, GLint w) +void _gamma_Vertex4i(GLint x, GLint y, GLint z, GLint w) { DEBUG_GLCMDS(("Vertex4i: %d %d %d %d\n", (int)x, (int)y, (int)z, (int)w)); } -void glVertex4iv(const GLint *v) +void _gamma_Vertex4iv(const GLint *v) { DEBUG_GLCMDS(("Vertex4iv: %d %d %d %d\n", (int)v[0], (int)v[1], (int)v[2], (int)v[3])); } -void glVertex4s(GLshort x, GLshort y, GLshort z, GLshort w) +void _gamma_Vertex4s(GLshort x, GLshort y, GLshort z, GLshort w) { DEBUG_GLCMDS(("Vertex4s: %d %d %d %d\n", x, y, z, w)); } -void glVertex4sv(const GLshort *v) +void _gamma_Vertex4sv(const GLshort *v) { DEBUG_GLCMDS(("Vertex4sv: %d %d %d %d\n", v[0], v[1], v[2], v[3])); } -void glVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) +void _gamma_VertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) { DEBUG_GLCMDS(("VertexPointer: %d %04x %d\n", (int)size, (int)type, (int)stride)); } -void glViewport(GLint x, GLint y, GLsizei width, GLsizei height) +void _gamma_Viewport(GLint x, GLint y, GLsizei width, GLsizei height) { GLfloat sx, sy, ox, oy; @@ -3303,4 +3302,377 @@ void glViewport(GLint x, GLint y, GLsizei width, GLsizei height) WRITEF(gCCPriv->buf, ViewPortScaleY, sy); } + +static GLint +generic_noop(void) +{ + return 0; +} + + +static void +init_no_op_table(struct _glapi_table *table) +{ + /* Check to be sure the dispatcher's table is at least as big as Mesa's. */ + const GLuint size = sizeof(struct _glapi_table) / sizeof(void *); + assert(_glapi_get_dispatch_table_size() >= size); + + { + const GLuint n = _glapi_get_dispatch_table_size(); + GLuint i; + void **dispatch = (void **) table; + for (i = 0; i < n; i++) { + dispatch[i] = (void *) generic_noop; + } + } +} + + +void +_gamma_init_dispatch(struct _glapi_table *dispatch) +{ + init_no_op_table(dispatch); + + /* 1.0 */ + dispatch->Accum = _gamma_Accum; + dispatch->AlphaFunc = _gamma_AlphaFunc; + dispatch->Begin = _gamma_Begin; + dispatch->Bitmap = _gamma_Bitmap; + dispatch->BlendFunc = _gamma_BlendFunc; + dispatch->CallList = _gamma_CallList; + dispatch->CallLists = _gamma_CallLists; + dispatch->Clear = _gamma_Clear; + dispatch->ClearAccum = _gamma_ClearAccum; + dispatch->ClearColor = _gamma_ClearColor; + dispatch->ClearDepth = _gamma_ClearDepth; + dispatch->ClearIndex = _gamma_ClearIndex; + dispatch->ClearStencil = _gamma_ClearStencil; + dispatch->ClipPlane = _gamma_ClipPlane; + dispatch->Color3b = _gamma_Color3b; + dispatch->Color3bv = _gamma_Color3bv; + dispatch->Color3d = _gamma_Color3d; + dispatch->Color3dv = _gamma_Color3dv; + dispatch->Color3f = _gamma_Color3f; + dispatch->Color3fv = _gamma_Color3fv; + dispatch->Color3i = _gamma_Color3i; + dispatch->Color3iv = _gamma_Color3iv; + dispatch->Color3s = _gamma_Color3s; + dispatch->Color3sv = _gamma_Color3sv; + dispatch->Color3ub = _gamma_Color3ub; + dispatch->Color3ubv = _gamma_Color3ubv; + dispatch->Color3ui = _gamma_Color3ui; + dispatch->Color3uiv = _gamma_Color3uiv; + dispatch->Color3us = _gamma_Color3us; + dispatch->Color3usv = _gamma_Color3usv; + dispatch->Color4b = _gamma_Color4b; + dispatch->Color4bv = _gamma_Color4bv; + dispatch->Color4d = _gamma_Color4d; + dispatch->Color4dv = _gamma_Color4dv; + dispatch->Color4f = _gamma_Color4f; + dispatch->Color4fv = _gamma_Color4fv; + dispatch->Color4i = _gamma_Color4i; + dispatch->Color4iv = _gamma_Color4iv; + dispatch->Color4s = _gamma_Color4s; + dispatch->Color4sv = _gamma_Color4sv; + dispatch->Color4ub = _gamma_Color4ub; + dispatch->Color4ubv = _gamma_Color4ubv; + dispatch->Color4ui = _gamma_Color4ui; + dispatch->Color4uiv = _gamma_Color4uiv; + dispatch->Color4us = _gamma_Color4us; + dispatch->Color4usv = _gamma_Color4usv; + dispatch->ColorMask = _gamma_ColorMask; + dispatch->ColorMaterial = _gamma_ColorMaterial; + dispatch->CopyPixels = _gamma_CopyPixels; + dispatch->CullFace = _gamma_CullFace; + dispatch->DeleteLists = _gamma_DeleteLists; + dispatch->DepthFunc = _gamma_DepthFunc; + dispatch->DepthMask = _gamma_DepthMask; + dispatch->DepthRange = _gamma_DepthRange; + dispatch->Disable = _gamma_Disable; + dispatch->DrawBuffer = _gamma_DrawBuffer; + dispatch->DrawPixels = _gamma_DrawPixels; + dispatch->EdgeFlag = _gamma_EdgeFlag; + dispatch->EdgeFlagv = _gamma_EdgeFlagv; + dispatch->Enable = _gamma_Enable; + dispatch->End = _gamma_End; + dispatch->EndList = _gamma_EndList; + dispatch->EvalCoord1d = _gamma_EvalCoord1d; + dispatch->EvalCoord1dv = _gamma_EvalCoord1dv; + dispatch->EvalCoord1f = _gamma_EvalCoord1f; + dispatch->EvalCoord1fv = _gamma_EvalCoord1fv; + dispatch->EvalCoord2d = _gamma_EvalCoord2d; + dispatch->EvalCoord2dv = _gamma_EvalCoord2dv; + dispatch->EvalCoord2f = _gamma_EvalCoord2f; + dispatch->EvalCoord2fv = _gamma_EvalCoord2fv; + dispatch->EvalMesh1 = _gamma_EvalMesh1; + dispatch->EvalMesh2 = _gamma_EvalMesh2; + dispatch->EvalPoint1 = _gamma_EvalPoint1; + dispatch->EvalPoint2 = _gamma_EvalPoint2; + dispatch->FeedbackBuffer = _gamma_FeedbackBuffer; + dispatch->Finish = _gamma_Finish; + dispatch->Flush = _gamma_Flush; + dispatch->Fogf = _gamma_Fogf; + dispatch->Fogfv = _gamma_Fogfv; + dispatch->Fogi = _gamma_Fogi; + dispatch->Fogiv = _gamma_Fogiv; + dispatch->FrontFace = _gamma_FrontFace; + dispatch->Frustum = _gamma_Frustum; + dispatch->GenLists = _gamma_GenLists; + dispatch->GetBooleanv = _gamma_GetBooleanv; + dispatch->GetClipPlane = _gamma_GetClipPlane; + dispatch->GetDoublev = _gamma_GetDoublev; + dispatch->GetError = _gamma_GetError; + dispatch->GetFloatv = _gamma_GetFloatv; + dispatch->GetIntegerv = _gamma_GetIntegerv; + dispatch->GetLightfv = _gamma_GetLightfv; + dispatch->GetLightiv = _gamma_GetLightiv; + dispatch->GetMapdv = _gamma_GetMapdv; + dispatch->GetMapfv = _gamma_GetMapfv; + dispatch->GetMapiv = _gamma_GetMapiv; + dispatch->GetMaterialfv = _gamma_GetMaterialfv; + dispatch->GetMaterialiv = _gamma_GetMaterialiv; + dispatch->GetPixelMapfv = _gamma_GetPixelMapfv; + dispatch->GetPixelMapuiv = _gamma_GetPixelMapuiv; + dispatch->GetPixelMapusv = _gamma_GetPixelMapusv; + dispatch->GetPolygonStipple = _gamma_GetPolygonStipple; + dispatch->GetString = _gamma_GetString; + dispatch->GetTexEnvfv = _gamma_GetTexEnvfv; + dispatch->GetTexEnviv = _gamma_GetTexEnviv; + dispatch->GetTexGendv = _gamma_GetTexGendv; + dispatch->GetTexGenfv = _gamma_GetTexGenfv; + dispatch->GetTexGeniv = _gamma_GetTexGeniv; + dispatch->GetTexImage = _gamma_GetTexImage; + dispatch->GetTexLevelParameterfv = _gamma_GetTexLevelParameterfv; + dispatch->GetTexLevelParameteriv = _gamma_GetTexLevelParameteriv; + dispatch->GetTexParameterfv = _gamma_GetTexParameterfv; + dispatch->GetTexParameteriv = _gamma_GetTexParameteriv; + dispatch->Hint = _gamma_Hint; + dispatch->IndexMask = _gamma_IndexMask; + dispatch->Indexd = _gamma_Indexd; + dispatch->Indexdv = _gamma_Indexdv; + dispatch->Indexf = _gamma_Indexf; + dispatch->Indexfv = _gamma_Indexfv; + dispatch->Indexi = _gamma_Indexi; + dispatch->Indexiv = _gamma_Indexiv; + dispatch->Indexs = _gamma_Indexs; + dispatch->Indexsv = _gamma_Indexsv; + dispatch->InitNames = _gamma_InitNames; + dispatch->IsEnabled = _gamma_IsEnabled; + dispatch->IsList = _gamma_IsList; + dispatch->LightModelf = _gamma_LightModelf; + dispatch->LightModelfv = _gamma_LightModelfv; + dispatch->LightModeli = _gamma_LightModeli; + dispatch->LightModeliv = _gamma_LightModeliv; + dispatch->Lightf = _gamma_Lightf; + dispatch->Lightfv = _gamma_Lightfv; + dispatch->Lighti = _gamma_Lighti; + dispatch->Lightiv = _gamma_Lightiv; + dispatch->LineStipple = _gamma_LineStipple; + dispatch->LineWidth = _gamma_LineWidth; + dispatch->ListBase = _gamma_ListBase; + dispatch->LoadIdentity = _gamma_LoadIdentity; + dispatch->LoadMatrixd = _gamma_LoadMatrixd; + dispatch->LoadMatrixf = _gamma_LoadMatrixf; + dispatch->LoadName = _gamma_LoadName; + dispatch->LogicOp = _gamma_LogicOp; + dispatch->Map1d = _gamma_Map1d; + dispatch->Map1f = _gamma_Map1f; + dispatch->Map2d = _gamma_Map2d; + dispatch->Map2f = _gamma_Map2f; + dispatch->MapGrid1d = _gamma_MapGrid1d; + dispatch->MapGrid1f = _gamma_MapGrid1f; + dispatch->MapGrid2d = _gamma_MapGrid2d; + dispatch->MapGrid2f = _gamma_MapGrid2f; + dispatch->Materialf = _gamma_Materialf; + dispatch->Materialfv = _gamma_Materialfv; + dispatch->Materiali = _gamma_Materiali; + dispatch->Materialiv = _gamma_Materialiv; + dispatch->MatrixMode = _gamma_MatrixMode; + dispatch->MultMatrixd = _gamma_MultMatrixd; + dispatch->MultMatrixf = _gamma_MultMatrixf; + dispatch->NewList = _gamma_NewList; + dispatch->Normal3b = _gamma_Normal3b; + dispatch->Normal3bv = _gamma_Normal3bv; + dispatch->Normal3d = _gamma_Normal3d; + dispatch->Normal3dv = _gamma_Normal3dv; + dispatch->Normal3f = _gamma_Normal3f; + dispatch->Normal3fv = _gamma_Normal3fv; + dispatch->Normal3i = _gamma_Normal3i; + dispatch->Normal3iv = _gamma_Normal3iv; + dispatch->Normal3s = _gamma_Normal3s; + dispatch->Normal3sv = _gamma_Normal3sv; + dispatch->Ortho = _gamma_Ortho; + dispatch->PassThrough = _gamma_PassThrough; + dispatch->PixelMapfv = _gamma_PixelMapfv; + dispatch->PixelMapuiv = _gamma_PixelMapuiv; + dispatch->PixelMapusv = _gamma_PixelMapusv; + dispatch->PixelStoref = _gamma_PixelStoref; + dispatch->PixelStorei = _gamma_PixelStorei; + dispatch->PixelTransferf = _gamma_PixelTransferf; + dispatch->PixelTransferi = _gamma_PixelTransferi; + dispatch->PixelZoom = _gamma_PixelZoom; + dispatch->PointSize = _gamma_PointSize; + dispatch->PolygonMode = _gamma_PolygonMode; + dispatch->PolygonOffset = _gamma_PolygonOffset; + dispatch->PolygonStipple = _gamma_PolygonStipple; + dispatch->PopAttrib = _gamma_PopAttrib; + dispatch->PopMatrix = _gamma_PopMatrix; + dispatch->PopName = _gamma_PopName; + dispatch->PushAttrib = _gamma_PushAttrib; + dispatch->PushMatrix = _gamma_PushMatrix; + dispatch->PushName = _gamma_PushName; + dispatch->RasterPos2d = _gamma_RasterPos2d; + dispatch->RasterPos2dv = _gamma_RasterPos2dv; + dispatch->RasterPos2f = _gamma_RasterPos2f; + dispatch->RasterPos2fv = _gamma_RasterPos2fv; + dispatch->RasterPos2i = _gamma_RasterPos2i; + dispatch->RasterPos2iv = _gamma_RasterPos2iv; + dispatch->RasterPos2s = _gamma_RasterPos2s; + dispatch->RasterPos2sv = _gamma_RasterPos2sv; + dispatch->RasterPos3d = _gamma_RasterPos3d; + dispatch->RasterPos3dv = _gamma_RasterPos3dv; + dispatch->RasterPos3f = _gamma_RasterPos3f; + dispatch->RasterPos3fv = _gamma_RasterPos3fv; + dispatch->RasterPos3i = _gamma_RasterPos3i; + dispatch->RasterPos3iv = _gamma_RasterPos3iv; + dispatch->RasterPos3s = _gamma_RasterPos3s; + dispatch->RasterPos3sv = _gamma_RasterPos3sv; + dispatch->RasterPos4d = _gamma_RasterPos4d; + dispatch->RasterPos4dv = _gamma_RasterPos4dv; + dispatch->RasterPos4f = _gamma_RasterPos4f; + dispatch->RasterPos4fv = _gamma_RasterPos4fv; + dispatch->RasterPos4i = _gamma_RasterPos4i; + dispatch->RasterPos4iv = _gamma_RasterPos4iv; + dispatch->RasterPos4s = _gamma_RasterPos4s; + dispatch->RasterPos4sv = _gamma_RasterPos4sv; + dispatch->ReadBuffer = _gamma_ReadBuffer; + dispatch->ReadPixels = _gamma_ReadPixels; + dispatch->Rectd = _gamma_Rectd; + dispatch->Rectdv = _gamma_Rectdv; + dispatch->Rectf = _gamma_Rectf; + dispatch->Rectfv = _gamma_Rectfv; + dispatch->Recti = _gamma_Recti; + dispatch->Rectiv = _gamma_Rectiv; + dispatch->Rects = _gamma_Rects; + dispatch->Rectsv = _gamma_Rectsv; + dispatch->RenderMode = _gamma_RenderMode; + dispatch->Rotated = _gamma_Rotated; + dispatch->Rotatef = _gamma_Rotatef; + dispatch->Scaled = _gamma_Scaled; + dispatch->Scalef = _gamma_Scalef; + dispatch->Scissor = _gamma_Scissor; + dispatch->SelectBuffer = _gamma_SelectBuffer; + dispatch->ShadeModel = _gamma_ShadeModel; + dispatch->StencilFunc = _gamma_StencilFunc; + dispatch->StencilMask = _gamma_StencilMask; + dispatch->StencilOp = _gamma_StencilOp; + dispatch->TexCoord1d = _gamma_TexCoord1d; + dispatch->TexCoord1dv = _gamma_TexCoord1dv; + dispatch->TexCoord1f = _gamma_TexCoord1f; + dispatch->TexCoord1fv = _gamma_TexCoord1fv; + dispatch->TexCoord1i = _gamma_TexCoord1i; + dispatch->TexCoord1iv = _gamma_TexCoord1iv; + dispatch->TexCoord1s = _gamma_TexCoord1s; + dispatch->TexCoord1sv = _gamma_TexCoord1sv; + dispatch->TexCoord2d = _gamma_TexCoord2d; + dispatch->TexCoord2dv = _gamma_TexCoord2dv; + dispatch->TexCoord2f = _gamma_TexCoord2f; + dispatch->TexCoord2fv = _gamma_TexCoord2fv; + dispatch->TexCoord2i = _gamma_TexCoord2i; + dispatch->TexCoord2iv = _gamma_TexCoord2iv; + dispatch->TexCoord2s = _gamma_TexCoord2s; + dispatch->TexCoord2sv = _gamma_TexCoord2sv; + dispatch->TexCoord3d = _gamma_TexCoord3d; + dispatch->TexCoord3dv = _gamma_TexCoord3dv; + dispatch->TexCoord3f = _gamma_TexCoord3f; + dispatch->TexCoord3fv = _gamma_TexCoord3fv; + dispatch->TexCoord3i = _gamma_TexCoord3i; + dispatch->TexCoord3iv = _gamma_TexCoord3iv; + dispatch->TexCoord3s = _gamma_TexCoord3s; + dispatch->TexCoord3sv = _gamma_TexCoord3sv; + dispatch->TexCoord4d = _gamma_TexCoord4d; + dispatch->TexCoord4dv = _gamma_TexCoord4dv; + dispatch->TexCoord4f = _gamma_TexCoord4f; + dispatch->TexCoord4fv = _gamma_TexCoord4fv; + dispatch->TexCoord4i = _gamma_TexCoord4i; + dispatch->TexCoord4iv = _gamma_TexCoord4iv; + dispatch->TexCoord4s = _gamma_TexCoord4s; + dispatch->TexCoord4sv = _gamma_TexCoord4sv; + dispatch->TexEnvf = _gamma_TexEnvf; + dispatch->TexEnvfv = _gamma_TexEnvfv; + dispatch->TexEnvi = _gamma_TexEnvi; + dispatch->TexEnviv = _gamma_TexEnviv; + dispatch->TexGend = _gamma_TexGend; + dispatch->TexGendv = _gamma_TexGendv; + dispatch->TexGenf = _gamma_TexGenf; + dispatch->TexGenfv = _gamma_TexGenfv; + dispatch->TexGeni = _gamma_TexGeni; + dispatch->TexGeniv = _gamma_TexGeniv; + dispatch->TexImage1D = _gamma_TexImage1D; + dispatch->TexImage2D = _gamma_TexImage2D; + dispatch->TexParameterf = _gamma_TexParameterf; + dispatch->TexParameterfv = _gamma_TexParameterfv; + dispatch->TexParameteri = _gamma_TexParameteri; + dispatch->TexParameteriv = _gamma_TexParameteriv; + dispatch->Translated = _gamma_Translated; + dispatch->Translatef = _gamma_Translatef; + dispatch->Vertex2d = _gamma_Vertex2d; + dispatch->Vertex2dv = _gamma_Vertex2dv; + dispatch->Vertex2f = _gamma_Vertex2f; + dispatch->Vertex2fv = _gamma_Vertex2fv; + dispatch->Vertex2i = _gamma_Vertex2i; + dispatch->Vertex2iv = _gamma_Vertex2iv; + dispatch->Vertex2s = _gamma_Vertex2s; + dispatch->Vertex2sv = _gamma_Vertex2sv; + dispatch->Vertex3d = _gamma_Vertex3d; + dispatch->Vertex3dv = _gamma_Vertex3dv; + dispatch->Vertex3f = _gamma_Vertex3f; + dispatch->Vertex3fv = _gamma_Vertex3fv; + dispatch->Vertex3i = _gamma_Vertex3i; + dispatch->Vertex3iv = _gamma_Vertex3iv; + dispatch->Vertex3s = _gamma_Vertex3s; + dispatch->Vertex3sv = _gamma_Vertex3sv; + dispatch->Vertex4d = _gamma_Vertex4d; + dispatch->Vertex4dv = _gamma_Vertex4dv; + dispatch->Vertex4f = _gamma_Vertex4f; + dispatch->Vertex4fv = _gamma_Vertex4fv; + dispatch->Vertex4i = _gamma_Vertex4i; + dispatch->Vertex4iv = _gamma_Vertex4iv; + dispatch->Vertex4s = _gamma_Vertex4s; + dispatch->Vertex4sv = _gamma_Vertex4sv; + dispatch->Viewport = _gamma_Viewport; + + /* 1.1 */ + dispatch->AreTexturesResident = _gamma_AreTexturesResident; + dispatch->ArrayElement = _gamma_ArrayElement; + dispatch->BindTexture = _gamma_BindTexture; + dispatch->ColorPointer = _gamma_ColorPointer; + dispatch->CopyTexImage1D = _gamma_CopyTexImage1D; + dispatch->CopyTexImage2D = _gamma_CopyTexImage2D; + dispatch->CopyTexSubImage1D = _gamma_CopyTexSubImage1D; + dispatch->CopyTexSubImage2D = _gamma_CopyTexSubImage2D; + dispatch->DeleteTextures = _gamma_DeleteTextures; + dispatch->DisableClientState = _gamma_DisableClientState; + dispatch->DrawArrays = _gamma_DrawArrays; + dispatch->DrawElements = _gamma_DrawElements; + dispatch->EdgeFlagPointer = _gamma_EdgeFlagPointer; + dispatch->EnableClientState = _gamma_EnableClientState; + dispatch->GenTextures = _gamma_GenTextures; + dispatch->GetPointerv = _gamma_GetPointerv; + dispatch->IndexPointer = _gamma_IndexPointer; + dispatch->Indexub = _gamma_Indexub; + dispatch->Indexubv = _gamma_Indexubv; + dispatch->InterleavedArrays = _gamma_InterleavedArrays; + dispatch->IsTexture = _gamma_IsTexture; + dispatch->NormalPointer = _gamma_NormalPointer; + dispatch->PopClientAttrib = _gamma_PopClientAttrib; + dispatch->PrioritizeTextures = _gamma_PrioritizeTextures; + dispatch->PushClientAttrib = _gamma_PushClientAttrib; + dispatch->TexCoordPointer = _gamma_TexCoordPointer; + dispatch->TexSubImage1D = _gamma_TexSubImage1D; + dispatch->TexSubImage2D = _gamma_TexSubImage2D; + dispatch->VertexPointer = _gamma_VertexPointer; +} + + #endif diff --git a/xc/lib/GL/mesa/src/drv/gamma/gamma_gl.h b/xc/lib/GL/mesa/src/drv/gamma/gamma_gl.h index 42cad1114..37fd75eca 100644 --- a/xc/lib/GL/mesa/src/drv/gamma/gamma_gl.h +++ b/xc/lib/GL/mesa/src/drv/gamma/gamma_gl.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_gl.h,v 1.2 1999/06/27 14:07:30 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_gl.h,v 1.4 2000/03/02 16:07:36 martin Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -29,20 +29,353 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. /* * Authors: * Kevin E. Martin <kevin@precisioninsight.com> - * - * $PI: xc/lib/GL/mesa/src/drv/gamma/gamma_gl.h,v 1.4 1999/06/21 05:13:55 martin Exp $ + * Brian Paul <brian@precisioninsight.com> */ #ifndef _GAMMA_GL_H_ #define _GAMMA_GL_H_ -#ifdef GLX_DIRECT_RENDERING +#include "GL/gl.h" +#include "glapi.h" -#ifndef GLX_USE_DLOPEN -#define NEED_MESA_FUNCS_WRAPPED -#include "mesa_api.h" -#endif +extern void _gamma_Accum(GLenum op, GLfloat value); +extern void _gamma_AlphaFunc(GLenum func, GLclampf ref); +extern GLboolean _gamma_AreTexturesResident(GLsizei n, const GLuint *textures, GLboolean *residences); +extern void _gamma_ArrayElement(GLint i); +extern void _gamma_Begin(GLenum mode); +extern void _gamma_BindTexture(GLenum target, GLuint texture); +extern void _gamma_Bitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap); +extern void _gamma_BlendFunc(GLenum sfactor, GLenum dfactor); +extern void _gamma_CallList(GLuint list); +extern void _gamma_CallLists(GLsizei n, GLenum type, const GLvoid *lists); +extern void _gamma_Clear(GLbitfield mask); +extern void _gamma_ClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +extern void _gamma_ClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +extern void _gamma_ClearDepth(GLclampd depth); +extern void _gamma_ClearIndex(GLfloat c); +extern void _gamma_ClearStencil(GLint s); +extern void _gamma_ClipPlane(GLenum plane, const GLdouble *equation); +extern void _gamma_Color3b(GLbyte red, GLbyte green, GLbyte blue); +extern void _gamma_Color3bv(const GLbyte *v); +extern void _gamma_Color3d(GLdouble red, GLdouble green, GLdouble blue); +extern void _gamma_Color3dv(const GLdouble *v); +extern void _gamma_Color3f(GLfloat red, GLfloat green, GLfloat blue); +extern void _gamma_Color3fv(const GLfloat *v); +extern void _gamma_Color3i(GLint red, GLint green, GLint blue); +extern void _gamma_Color3iv(const GLint *v); +extern void _gamma_Color3s(GLshort red, GLshort green, GLshort blue); +extern void _gamma_Color3sv(const GLshort *v); +extern void _gamma_Color3ub(GLubyte red, GLubyte green, GLubyte blue); +extern void _gamma_Color3ubv(const GLubyte *v); +extern void _gamma_Color3ui(GLuint red, GLuint green, GLuint blue); +extern void _gamma_Color3uiv(const GLuint *v); +extern void _gamma_Color3us(GLushort red, GLushort green, GLushort blue); +extern void _gamma_Color3usv(const GLushort *v); +extern void _gamma_Color4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha); +extern void _gamma_Color4bv(const GLbyte *v); +extern void _gamma_Color4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha); +extern void _gamma_Color4dv(const GLdouble *v); +extern void _gamma_Color4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +extern void _gamma_Color4fv(const GLfloat *v); +extern void _gamma_Color4i(GLint red, GLint green, GLint blue, GLint alpha); +extern void _gamma_Color4iv(const GLint *v); +extern void _gamma_Color4s(GLshort red, GLshort green, GLshort blue, GLshort alpha); +extern void _gamma_Color4sv(const GLshort *v); +extern void _gamma_Color4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); +extern void _gamma_Color4ubv(const GLubyte *v); +extern void _gamma_Color4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha); +extern void _gamma_Color4uiv(const GLuint *v); +extern void _gamma_Color4us(GLushort red, GLushort green, GLushort blue, GLushort alpha); +extern void _gamma_Color4usv(const GLushort *v); +extern void _gamma_ColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +extern void _gamma_ColorMaterial(GLenum face, GLenum mode); +extern void _gamma_ColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +extern void _gamma_CopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type); +extern void _gamma_CopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +extern void _gamma_CopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +extern void _gamma_CopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +extern void _gamma_CopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +extern void _gamma_CullFace(GLenum mode); +extern void _gamma_DeleteLists(GLuint list, GLsizei range); +extern void _gamma_DeleteTextures(GLsizei n, const GLuint *textures); +extern void _gamma_DepthFunc(GLenum func); +extern void _gamma_DepthMask(GLboolean flag); +extern void _gamma_DepthRange(GLclampd zNear, GLclampd zFar); +extern void _gamma_Disable(GLenum cap); +extern void _gamma_DisableClientState(GLenum array); +extern void _gamma_DrawArrays(GLenum mode, GLint first, GLsizei count); +extern void _gamma_DrawBuffer(GLenum mode); +extern void _gamma_DrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices); +extern void _gamma_DrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); +extern void _gamma_EdgeFlag(GLboolean flag); +extern void _gamma_EdgeFlagPointer(GLsizei stride, const GLvoid *pointer); +extern void _gamma_EdgeFlagv(const GLboolean *flag); +extern void _gamma_Enable(GLenum cap); +extern void _gamma_EnableClientState(GLenum array); +extern void _gamma_End(void); +extern void _gamma_EndList(void); +extern void _gamma_EvalCoord1d(GLdouble u); +extern void _gamma_EvalCoord1dv(const GLdouble *u); +extern void _gamma_EvalCoord1f(GLfloat u); +extern void _gamma_EvalCoord1fv(const GLfloat *u); +extern void _gamma_EvalCoord2d(GLdouble u, GLdouble v); +extern void _gamma_EvalCoord2dv(const GLdouble *u); +extern void _gamma_EvalCoord2f(GLfloat u, GLfloat v); +extern void _gamma_EvalCoord2fv(const GLfloat *u); +extern void _gamma_EvalMesh1(GLenum mode, GLint i1, GLint i2); +extern void _gamma_EvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2); +extern void _gamma_EvalPoint1(GLint i); +extern void _gamma_EvalPoint2(GLint i, GLint j); +extern void _gamma_FeedbackBuffer(GLsizei size, GLenum type, GLfloat *buffer); +extern void _gamma_Finish(void); +extern void _gamma_Flush(void); +extern void _gamma_Fogf(GLenum pname, GLfloat param); +extern void _gamma_Fogfv(GLenum pname, const GLfloat *params); +extern void _gamma_Fogi(GLenum pname, GLint param); +extern void _gamma_Fogiv(GLenum pname, const GLint *params); +extern void _gamma_FrontFace(GLenum mode); +extern void _gamma_Frustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +extern GLuint _gamma_GenLists(GLsizei range); +extern void _gamma_GenTextures(GLsizei n, GLuint *textures); +extern void _gamma_GetBooleanv(GLenum val, GLboolean *b); +extern void _gamma_GetClipPlane(GLenum plane, GLdouble *equation); +extern void _gamma_GetDoublev(GLenum val, GLdouble *d); +extern GLenum _gamma_GetError(void); +extern void _gamma_GetFloatv(GLenum val, GLfloat *f); +extern void _gamma_GetIntegerv(GLenum val, GLint *i); +extern void _gamma_GetLightfv(GLenum light, GLenum pname, GLfloat *params); +extern void _gamma_GetLightiv(GLenum light, GLenum pname, GLint *params); +extern void _gamma_GetMapdv(GLenum target, GLenum query, GLdouble *v); +extern void _gamma_GetMapfv(GLenum target, GLenum query, GLfloat *v); +extern void _gamma_GetMapiv(GLenum target, GLenum query, GLint *v); +extern void _gamma_GetMaterialfv(GLenum face, GLenum pname, GLfloat *params); +extern void _gamma_GetMaterialiv(GLenum face, GLenum pname, GLint *params); +extern void _gamma_GetPixelMapfv(GLenum map, GLfloat *values); +extern void _gamma_GetPixelMapuiv(GLenum map, GLuint *values); +extern void _gamma_GetPixelMapusv(GLenum map, GLushort *values); +extern void _gamma_GetPointerv(GLenum pname, void **params); +extern void _gamma_GetPolygonStipple(GLubyte *mask); +extern const GLubyte *_gamma_GetString(GLenum name); +extern void _gamma_GetTexEnvfv(GLenum target, GLenum pname, GLfloat *params); +extern void _gamma_GetTexEnviv(GLenum target, GLenum pname, GLint *params); +extern void _gamma_GetTexGendv(GLenum coord, GLenum pname, GLdouble *params); +extern void _gamma_GetTexGenfv(GLenum coord, GLenum pname, GLfloat *params); +extern void _gamma_GetTexGeniv(GLenum coord, GLenum pname, GLint *params); +extern void _gamma_GetTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *texels); +extern void _gamma_GetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params); +extern void _gamma_GetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params); +extern void _gamma_GetTexParameterfv(GLenum target, GLenum pname, GLfloat *params); +extern void _gamma_GetTexParameteriv(GLenum target, GLenum pname, GLint *params); +extern void _gamma_Hint(GLenum target, GLenum mode); +extern void _gamma_IndexMask(GLuint mask); +extern void _gamma_IndexPointer(GLenum type, GLsizei stride, const GLvoid *pointer); +extern void _gamma_Indexd(GLdouble c); +extern void _gamma_Indexdv(const GLdouble *c); +extern void _gamma_Indexf(GLfloat c); +extern void _gamma_Indexfv(const GLfloat *c); +extern void _gamma_Indexi(GLint c); +extern void _gamma_Indexiv(const GLint *c); +extern void _gamma_Indexs(GLshort c); +extern void _gamma_Indexsv(const GLshort *c); +extern void _gamma_Indexub(GLubyte c); +extern void _gamma_Indexubv(const GLubyte *c); +extern void _gamma_InitNames(void); +extern void _gamma_InterleavedArrays(GLenum format, GLsizei stride, const GLvoid *pointer); +extern GLboolean _gamma_IsEnabled(GLenum cap); +extern GLboolean _gamma_IsList(GLuint list); +extern GLboolean _gamma_IsTexture(GLuint texture); +extern void _gamma_LightModelf(GLenum pname, GLfloat param); +extern void _gamma_LightModelfv(GLenum pname, const GLfloat *params); +extern void _gamma_LightModeli(GLenum pname, GLint param); +extern void _gamma_LightModeliv(GLenum pname, const GLint *params); +extern void _gamma_Lightf(GLenum light, GLenum pname, GLfloat param); +extern void _gamma_Lightfv(GLenum light, GLenum pname, const GLfloat *params); +extern void _gamma_Lighti(GLenum light, GLenum pname, GLint param); +extern void _gamma_Lightiv(GLenum light, GLenum pname, const GLint *params); +extern void _gamma_LineStipple(GLint factor, GLushort pattern); +extern void _gamma_LineWidth(GLfloat width); +extern void _gamma_ListBase(GLuint base); +extern void _gamma_LoadIdentity(void); +extern void _gamma_LoadMatrixd(const GLdouble *m); +extern void _gamma_LoadMatrixf(const GLfloat *m); +extern void _gamma_LoadName(GLuint name); +extern void _gamma_LogicOp(GLenum opcode); +extern void _gamma_Map1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *pnts); +extern void _gamma_Map1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *pnts); +extern void _gamma_Map2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustr, GLint uord, GLdouble v1, GLdouble v2, GLint vstr, GLint vord, const GLdouble *pnts); +extern void _gamma_Map2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustr, GLint uord, GLfloat v1, GLfloat v2, GLint vstr, GLint vord, const GLfloat *pnts); +extern void _gamma_MapGrid1d(GLint un, GLdouble u1, GLdouble u2); +extern void _gamma_MapGrid1f(GLint un, GLfloat u1, GLfloat u2); +extern void _gamma_MapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2); +extern void _gamma_MapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2); +extern void _gamma_Materialf(GLenum face, GLenum pname, GLfloat param); +extern void _gamma_Materialfv(GLenum face, GLenum pname, const GLfloat *params); +extern void _gamma_Materiali(GLenum face, GLenum pname, GLint param); +extern void _gamma_Materialiv(GLenum face, GLenum pname, const GLint *params); +extern void _gamma_MatrixMode(GLenum mode); +extern void _gamma_MultMatrixd(const GLdouble *m); +extern void _gamma_MultMatrixf(const GLfloat *m); +extern void _gamma_NewList(GLuint list, GLenum mode); +extern void _gamma_Normal3b(GLbyte nx, GLbyte ny, GLbyte nz); +extern void _gamma_Normal3bv(const GLbyte *v); +extern void _gamma_Normal3d(GLdouble nx, GLdouble ny, GLdouble nz); +extern void _gamma_Normal3dv(const GLdouble *v); +extern void _gamma_Normal3f(GLfloat nx, GLfloat ny, GLfloat nz); +extern void _gamma_Normal3fv(const GLfloat *v); +extern void _gamma_Normal3i(GLint nx, GLint ny, GLint nz); +extern void _gamma_Normal3iv(const GLint *v); +extern void _gamma_Normal3s(GLshort nx, GLshort ny, GLshort nz); +extern void _gamma_Normal3sv(const GLshort *v); +extern void _gamma_NormalPointer(GLenum type, GLsizei stride, const GLvoid *pointer); +extern void _gamma_Ortho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +extern void _gamma_PassThrough(GLfloat token); +extern void _gamma_PixelMapfv(GLenum map, GLint mapsize, const GLfloat *values); +extern void _gamma_PixelMapuiv(GLenum map, GLint mapsize, const GLuint *values); +extern void _gamma_PixelMapusv(GLenum map, GLint mapsize, const GLushort *values); +extern void _gamma_PixelStoref(GLenum pname, GLfloat param); +extern void _gamma_PixelStorei(GLenum pname, GLint param); +extern void _gamma_PixelTransferf(GLenum pname, GLfloat param); +extern void _gamma_PixelTransferi(GLenum pname, GLint param); +extern void _gamma_PixelZoom(GLfloat xfactor, GLfloat yfactor); +extern void _gamma_PointSize(GLfloat size); +extern void _gamma_PolygonMode(GLenum face, GLenum mode); +extern void _gamma_PolygonOffset(GLfloat factor, GLfloat units); +extern void _gamma_PolygonStipple(const GLubyte *mask); +extern void _gamma_PopAttrib(void); +extern void _gamma_PopClientAttrib(void); +extern void _gamma_PopMatrix(void); +extern void _gamma_PopName(void); +extern void _gamma_PrioritizeTextures(GLsizei n, const GLuint *textures, const GLclampf *priorities); +extern void _gamma_PushAttrib(GLbitfield mask); +extern void _gamma_PushClientAttrib(GLuint mask); +extern void _gamma_PushMatrix(void); +extern void _gamma_PushName(GLuint name); +extern void _gamma_RasterPos2d(GLdouble x, GLdouble y); +extern void _gamma_RasterPos2dv(const GLdouble *v); +extern void _gamma_RasterPos2f(GLfloat x, GLfloat y); +extern void _gamma_RasterPos2fv(const GLfloat *v); +extern void _gamma_RasterPos2i(GLint x, GLint y); +extern void _gamma_RasterPos2iv(const GLint *v); +extern void _gamma_RasterPos2s(GLshort x, GLshort y); +extern void _gamma_RasterPos2sv(const GLshort *v); +extern void _gamma_RasterPos3d(GLdouble x, GLdouble y, GLdouble z); +extern void _gamma_RasterPos3dv(const GLdouble *v); +extern void _gamma_RasterPos3f(GLfloat x, GLfloat y, GLfloat z); +extern void _gamma_RasterPos3fv(const GLfloat *v); +extern void _gamma_RasterPos3i(GLint x, GLint y, GLint z); +extern void _gamma_RasterPos3iv(const GLint *v); +extern void _gamma_RasterPos3s(GLshort x, GLshort y, GLshort z); +extern void _gamma_RasterPos3sv(const GLshort *v); +extern void _gamma_RasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w); +extern void _gamma_RasterPos4dv(const GLdouble *v); +extern void _gamma_RasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w); +extern void _gamma_RasterPos4fv(const GLfloat *v); +extern void _gamma_RasterPos4i(GLint x, GLint y, GLint z, GLint w); +extern void _gamma_RasterPos4iv(const GLint *v); +extern void _gamma_RasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w); +extern void _gamma_RasterPos4sv(const GLshort *v); +extern void _gamma_ReadBuffer(GLenum mode); +extern void _gamma_ReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels); +extern void _gamma_Rectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2); +extern void _gamma_Rectdv(const GLdouble *v1, const GLdouble *v2); +extern void _gamma_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2); +extern void _gamma_Rectfv(const GLfloat *v1, const GLfloat *v2); +extern void _gamma_Recti(GLint x1, GLint y1, GLint x2, GLint y2); +extern void _gamma_Rectiv(const GLint *v1, const GLint *v2); +extern void _gamma_Rects(GLshort x1, GLshort y1, GLshort x2, GLshort y2); +extern void _gamma_Rectsv(const GLshort *v1, const GLshort *v2); +extern GLint _gamma_RenderMode(GLenum mode); +extern void _gamma_Rotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z); +extern void _gamma_Rotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +extern void _gamma_Scaled(GLdouble x, GLdouble y, GLdouble z); +extern void _gamma_Scalef(GLfloat x, GLfloat y, GLfloat z); +extern void _gamma_Scissor(GLint x, GLint y, GLsizei width, GLsizei height); +extern void _gamma_SelectBuffer(GLsizei numnames, GLuint *buffer); +extern void _gamma_ShadeModel(GLenum mode); +extern void _gamma_StencilFunc(GLenum func, GLint ref, GLuint mask); +extern void _gamma_StencilMask(GLuint mask); +extern void _gamma_StencilOp(GLenum fail, GLenum zfail, GLenum zpass); +extern void _gamma_TexCoord1d(GLdouble s); +extern void _gamma_TexCoord1dv(const GLdouble *v); +extern void _gamma_TexCoord1f(GLfloat s); +extern void _gamma_TexCoord1fv(const GLfloat *v); +extern void _gamma_TexCoord1i(GLint s); +extern void _gamma_TexCoord1iv(const GLint *v); +extern void _gamma_TexCoord1s(GLshort s); +extern void _gamma_TexCoord1sv(const GLshort *v); +extern void _gamma_TexCoord2d(GLdouble s, GLdouble t); +extern void _gamma_TexCoord2dv(const GLdouble *v); +extern void _gamma_TexCoord2f(GLfloat s, GLfloat t); +extern void _gamma_TexCoord2fv(const GLfloat *v); +extern void _gamma_TexCoord2i(GLint s, GLint t); +extern void _gamma_TexCoord2iv(const GLint *v); +extern void _gamma_TexCoord2s(GLshort s, GLshort t); +extern void _gamma_TexCoord2sv(const GLshort *v); +extern void _gamma_TexCoord3d(GLdouble s, GLdouble t, GLdouble r); +extern void _gamma_TexCoord3dv(const GLdouble *v); +extern void _gamma_TexCoord3f(GLfloat s, GLfloat t, GLfloat r); +extern void _gamma_TexCoord3fv(const GLfloat *v); +extern void _gamma_TexCoord3i(GLint s, GLint t, GLint r); +extern void _gamma_TexCoord3iv(const GLint *v); +extern void _gamma_TexCoord3s(GLshort s, GLshort t, GLshort r); +extern void _gamma_TexCoord3sv(const GLshort *v); +extern void _gamma_TexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q); +extern void _gamma_TexCoord4dv(const GLdouble *v); +extern void _gamma_TexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q); +extern void _gamma_TexCoord4fv(const GLfloat *v); +extern void _gamma_TexCoord4i(GLint s, GLint t, GLint r, GLint q); +extern void _gamma_TexCoord4iv(const GLint *v); +extern void _gamma_TexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q); +extern void _gamma_TexCoord4sv(const GLshort *v); +extern void _gamma_TexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +extern void _gamma_TexEnvf(GLenum target, GLenum pname, GLfloat param); +extern void _gamma_TexEnvfv(GLenum target, GLenum pname, const GLfloat *params); +extern void _gamma_TexEnvi(GLenum target, GLenum pname, GLint param); +extern void _gamma_TexEnviv(GLenum target, GLenum pname, const GLint *params); +extern void _gamma_TexGend(GLenum coord, GLenum pname, GLdouble param); +extern void _gamma_TexGendv(GLenum coord, GLenum pname, const GLdouble *params); +extern void _gamma_TexGenf(GLenum coord, GLenum pname, GLfloat param); +extern void _gamma_TexGenfv(GLenum coord, GLenum pname, const GLfloat *params); +extern void _gamma_TexGeni(GLenum coord, GLenum pname, GLint param); +extern void _gamma_TexGeniv(GLenum coord, GLenum pname, const GLint *params); +extern void _gamma_TexImage1D(GLenum target, GLint level, GLint components, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *image); +extern void _gamma_TexImage2D(GLenum target, GLint level, GLint components, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *image); +extern void _gamma_TexParameterf(GLenum target, GLenum pname, GLfloat param); +extern void _gamma_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params); +extern void _gamma_TexParameteri(GLenum target, GLenum pname, GLint param); +extern void _gamma_TexParameteriv(GLenum target, GLenum pname, const GLint *params); +extern void _gamma_TexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *image); +extern void _gamma_TexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); +extern void _gamma_Translated(GLdouble x, GLdouble y, GLdouble z); +extern void _gamma_Translatef(GLfloat x, GLfloat y, GLfloat z); +extern void _gamma_Vertex2d(GLdouble x, GLdouble y); +extern void _gamma_Vertex2dv(const GLdouble *v); +extern void _gamma_Vertex2f(GLfloat x, GLfloat y); +extern void _gamma_Vertex2fv(const GLfloat *v); +extern void _gamma_Vertex2i(GLint x, GLint y); +extern void _gamma_Vertex2iv(const GLint *v); +extern void _gamma_Vertex2s(GLshort x, GLshort y); +extern void _gamma_Vertex2sv(const GLshort *v); +extern void _gamma_Vertex3d(GLdouble x, GLdouble y, GLdouble z); +extern void _gamma_Vertex3dv(const GLdouble *v); +extern void _gamma_Vertex3f(GLfloat x, GLfloat y, GLfloat z); +extern void _gamma_Vertex3fv(const GLfloat *v); +extern void _gamma_Vertex3i(GLint x, GLint y, GLint z); +extern void _gamma_Vertex3iv(const GLint *v); +extern void _gamma_Vertex3s(GLshort x, GLshort y, GLshort z); +extern void _gamma_Vertex3sv(const GLshort *v); +extern void _gamma_Vertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w); +extern void _gamma_Vertex4dv(const GLdouble *v); +extern void _gamma_Vertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w); +extern void _gamma_Vertex4fv(const GLfloat *v); +extern void _gamma_Vertex4i(GLint x, GLint y, GLint z, GLint w); +extern void _gamma_Vertex4iv(const GLint *v); +extern void _gamma_Vertex4s(GLshort x, GLshort y, GLshort z, GLshort w); +extern void _gamma_Vertex4sv(const GLshort *v); +extern void _gamma_VertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +extern void _gamma_Viewport(GLint x, GLint y, GLsizei width, GLsizei height); -#endif + +extern void _gamma_init_dispatch(struct _glapi_table *dispatch); #endif /* _GAMMA_GL_H_ */ diff --git a/xc/lib/GL/mesa/src/drv/gamma/gamma_init.c b/xc/lib/GL/mesa/src/drv/gamma/gamma_init.c index 7609ea4e9..1bb9e2361 100644 --- a/xc/lib/GL/mesa/src/drv/gamma/gamma_init.c +++ b/xc/lib/GL/mesa/src/drv/gamma/gamma_init.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_init.c,v 1.1 1999/06/14 07:31:15 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_init.c,v 1.2 2000/02/23 04:46:43 martin Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -30,7 +30,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * Authors: * Kevin E. Martin <kevin@precisioninsight.com> * - * $PI: xc/lib/GL/mesa/src/drv/gamma/gamma_init.c,v 1.4 1999/04/19 06:38:49 martin Exp $ */ #ifdef GLX_DIRECT_RENDERING diff --git a/xc/lib/GL/mesa/src/drv/gamma/gamma_init.h b/xc/lib/GL/mesa/src/drv/gamma/gamma_init.h index d64f7cfb1..ce804d018 100644 --- a/xc/lib/GL/mesa/src/drv/gamma/gamma_init.h +++ b/xc/lib/GL/mesa/src/drv/gamma/gamma_init.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_init.h,v 1.1 1999/06/14 07:31:15 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_init.h,v 1.2 2000/02/23 04:46:43 martin Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -30,7 +30,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * Authors: * Kevin E. Martin <kevin@precisioninsight.com> * - * $PI: xc/lib/GL/mesa/src/drv/gamma/gamma_init.h,v 1.15 1999/06/07 02:20:06 martin Exp $ */ #ifndef _GAMMA_INIT_H_ diff --git a/xc/lib/GL/mesa/src/drv/gamma/gamma_inithw.c b/xc/lib/GL/mesa/src/drv/gamma/gamma_inithw.c index 0047f22a0..edb1d3da0 100644 --- a/xc/lib/GL/mesa/src/drv/gamma/gamma_inithw.c +++ b/xc/lib/GL/mesa/src/drv/gamma/gamma_inithw.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_inithw.c,v 1.2 1999/06/27 14:07:30 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_inithw.c,v 1.3 2000/02/23 04:46:44 martin Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -30,7 +30,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * Authors: * Kevin E. Martin <kevin@precisioninsight.com> * - * $PI: xc/lib/GL/mesa/src/drv/gamma/gamma_inithw.c,v 1.13 1999/06/23 22:16:31 martin Exp $ */ #ifdef GLX_DIRECT_RENDERING diff --git a/xc/lib/GL/mesa/src/drv/gamma/gamma_macros.h b/xc/lib/GL/mesa/src/drv/gamma/gamma_macros.h index e37c6dcf9..ae923c7bf 100644 --- a/xc/lib/GL/mesa/src/drv/gamma/gamma_macros.h +++ b/xc/lib/GL/mesa/src/drv/gamma/gamma_macros.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_macros.h,v 1.2 1999/06/27 14:07:31 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_macros.h,v 1.3 2000/02/23 04:46:44 martin Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -30,7 +30,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * Authors: * Kevin E. Martin <kevin@precisioninsight.com> * - * $PI: xc/lib/GL/mesa/src/drv/gamma/gamma_macros.h,v 1.18 1999/06/14 21:10:44 faith Exp $ */ #ifndef _GAMMA_MACROS_H_ diff --git a/xc/lib/GL/mesa/src/drv/gamma/gamma_matrix.c b/xc/lib/GL/mesa/src/drv/gamma/gamma_matrix.c index 133228725..f6c166609 100644 --- a/xc/lib/GL/mesa/src/drv/gamma/gamma_matrix.c +++ b/xc/lib/GL/mesa/src/drv/gamma/gamma_matrix.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_matrix.c,v 1.1 1999/06/14 07:31:16 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_matrix.c,v 1.2 2000/02/23 04:46:44 martin Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -30,7 +30,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * Authors: * Kevin E. Martin <kevin@precisioninsight.com> * - * $PI: xc/lib/GL/mesa/src/drv/gamma/gamma_matrix.c,v 1.2 1999/06/07 02:20:06 martin Exp $ */ #ifdef GLX_DIRECT_RENDERING diff --git a/xc/lib/GL/mesa/src/drv/gamma/gamma_region.h b/xc/lib/GL/mesa/src/drv/gamma/gamma_region.h index 9f38a0008..f7a7826ce 100644 --- a/xc/lib/GL/mesa/src/drv/gamma/gamma_region.h +++ b/xc/lib/GL/mesa/src/drv/gamma/gamma_region.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_region.h,v 1.1 1999/06/14 07:31:16 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_region.h,v 1.2 2000/02/23 04:46:45 martin Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -31,7 +31,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * Rik Faith <faith@precisioninsight.com> * Kevin E. Martin <kevin@precisioninsight.com> * - * $PI: xc/lib/GL/mesa/src/drv/gamma/gamma_region.h,v 1.1 1999/04/05 05:24:36 martin Exp $ */ #ifndef _GAMMA_REGION_H_ diff --git a/xc/lib/GL/mesa/src/drv/gamma/gamma_regs.h b/xc/lib/GL/mesa/src/drv/gamma/gamma_regs.h index c703c517f..3dd4b8783 100644 --- a/xc/lib/GL/mesa/src/drv/gamma/gamma_regs.h +++ b/xc/lib/GL/mesa/src/drv/gamma/gamma_regs.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_regs.h,v 1.1 1999/06/14 07:31:16 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_regs.h,v 1.2 2000/02/23 04:46:45 martin Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -30,7 +30,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * Authors: * Kevin E. Martin <kevin@precisioninsight.com> * - * $PI: xc/lib/GL/mesa/src/drv/gamma/gamma_regs.h,v 1.6 1999/05/18 06:43:46 martin Exp $ */ #ifndef _GAMMA_REGS_H_ diff --git a/xc/lib/GL/mesa/src/drv/gamma/gamma_texture.c b/xc/lib/GL/mesa/src/drv/gamma/gamma_texture.c index 8f0227b9c..14a993969 100644 --- a/xc/lib/GL/mesa/src/drv/gamma/gamma_texture.c +++ b/xc/lib/GL/mesa/src/drv/gamma/gamma_texture.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_texture.c,v 1.1 1999/06/14 07:31:16 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_texture.c,v 1.2 2000/02/23 04:46:45 martin Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -30,7 +30,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * Authors: * Kevin E. Martin <kevin@precisioninsight.com> * - * $PI: xc/lib/GL/mesa/src/drv/gamma/gamma_texture.c,v 1.11 1999/06/07 02:20:06 martin Exp $ */ #ifdef GLX_DIRECT_RENDERING diff --git a/xc/lib/GL/mesa/src/drv/gamma/gamma_texture.h b/xc/lib/GL/mesa/src/drv/gamma/gamma_texture.h index fbfc70d3b..83f754884 100644 --- a/xc/lib/GL/mesa/src/drv/gamma/gamma_texture.h +++ b/xc/lib/GL/mesa/src/drv/gamma/gamma_texture.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_texture.h,v 1.1 1999/06/14 07:31:17 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_texture.h,v 1.2 2000/02/23 04:46:45 martin Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -30,7 +30,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * Authors: * Kevin E. Martin <kevin@precisioninsight.com> * - * $PI: xc/lib/GL/mesa/src/drv/gamma/gamma_texture.h,v 1.7 1999/05/18 06:43:46 martin Exp $ */ #ifndef _GAMMA_TEXTURE_H_ diff --git a/xc/lib/GL/mesa/src/drv/gamma/gamma_xmesa.c b/xc/lib/GL/mesa/src/drv/gamma/gamma_xmesa.c index abcb08fc1..1f968e39b 100644 --- a/xc/lib/GL/mesa/src/drv/gamma/gamma_xmesa.c +++ b/xc/lib/GL/mesa/src/drv/gamma/gamma_xmesa.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_xmesa.c,v 1.2 1999/06/27 14:07:31 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_xmesa.c,v 1.4 2000/03/02 16:07:36 martin Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -29,19 +29,22 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. /* * Authors: * Kevin E. Martin <kevin@precisioninsight.com> - * - * $PI: xc/lib/GL/mesa/src/drv/gamma/gamma_xmesa.c,v 1.24 1999/06/23 22:16:31 martin Exp $ + * Brian Paul <brian@precisioninsight.com> */ #ifdef GLX_DIRECT_RENDERING #include <X11/Xlibint.h> #include "gamma_init.h" +#include "glapi.h" + XMesaContext nullCC = NULL; XMesaContext gCC = NULL; gammaContextPrivate *gCCPriv = NULL; +static struct _glapi_table *Dispatch = NULL; + static int count_bits(unsigned int n) { int bits = 0; @@ -153,6 +156,12 @@ XMesaContext XMesaCreateContext(XMesaVisual v, XMesaContext share_list, __DRIscreenPrivate *driScrnPriv = driContextPriv->driScreenPriv; gammaScreenPrivate *gPriv = (gammaScreenPrivate *)driScrnPriv->private; + if (!Dispatch) { + GLuint size = _glapi_get_dispatch_table_size() * sizeof(GLvoid *); + Dispatch = (struct _glapi_table *) malloc(size); + _gamma_init_dispatch(Dispatch); + } + c = (XMesaContext)Xmalloc(sizeof(struct xmesa_context)); if (!c) { return NULL; @@ -489,6 +498,8 @@ GLboolean XMesaMakeCurrent(XMesaContext c, XMesaBuffer b) CHECK_DMA_BUFFER(gCC, gCCPriv, 1); WRITE(gCCPriv->buf, GLINTWindow, gCCPriv->Window); + + _glapi_set_dispatch(Dispatch); } else { gCC = NULL; gCCPriv = NULL; @@ -496,4 +507,18 @@ GLboolean XMesaMakeCurrent(XMesaContext c, XMesaBuffer b) return GL_TRUE; } + +GLboolean XMesaUnbindContext( XMesaContext c ) +{ + /* XXX not 100% sure what's supposed to be done here */ + return GL_TRUE; +} + + +void __driRegisterExtensions(void) +{ + /* No extensions */ +} + + #endif diff --git a/xc/lib/GL/mesa/src/drv/i810/Imakefile b/xc/lib/GL/mesa/src/drv/i810/Imakefile index 4212adbd6..7260846fd 100644 --- a/xc/lib/GL/mesa/src/drv/i810/Imakefile +++ b/xc/lib/GL/mesa/src/drv/i810/Imakefile @@ -1,4 +1,3 @@ -XCOMM $PI:$ #define DoNormalLib NormalLibGlx #define DoSharedLib SharedLibGlx diff --git a/xc/lib/GL/mesa/src/drv/i810/i810_init.h b/xc/lib/GL/mesa/src/drv/i810/i810_init.h index f676a204f..f6aa8bd30 100644 --- a/xc/lib/GL/mesa/src/drv/i810/i810_init.h +++ b/xc/lib/GL/mesa/src/drv/i810/i810_init.h @@ -30,7 +30,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * Keith Whitwell <keithw@precisioninsight.com> * Daryll Strauss <daryll@precisioninsight.com> (Origninal tdfx driver). * - * $PI: $ */ #ifndef _I810_INIT_H_ diff --git a/xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c b/xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c index cdac028b5..50b7e0689 100644 --- a/xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c +++ b/xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c @@ -29,7 +29,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * Authors: * Keith Whitwell <keithw@precisioninsight.com> * - * $PI: $ */ #ifdef GLX_DIRECT_RENDERING diff --git a/xc/lib/GL/mesa/src/drv/mga/Imakefile b/xc/lib/GL/mesa/src/drv/mga/Imakefile index 9ff1203ee..e4e39b747 100644 --- a/xc/lib/GL/mesa/src/drv/mga/Imakefile +++ b/xc/lib/GL/mesa/src/drv/mga/Imakefile @@ -1,4 +1,3 @@ -XCOMM $PI:$ #define DoNormalLib NormalLibGlx #define DoSharedLib SharedLibGlx diff --git a/xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c b/xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c index 8c42d0842..496c29a05 100644 --- a/xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c +++ b/xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c @@ -29,7 +29,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * Authors: * Daryll Strauss <daryll@precisioninsight.com> * - * $PI: $ */ #ifdef GLX_DIRECT_RENDERING diff --git a/xc/lib/GL/mesa/src/drv/mga/mga_xmesa.h b/xc/lib/GL/mesa/src/drv/mga/mga_xmesa.h index c24e982d0..d563bd429 100644 --- a/xc/lib/GL/mesa/src/drv/mga/mga_xmesa.h +++ b/xc/lib/GL/mesa/src/drv/mga/mga_xmesa.h @@ -30,7 +30,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * Keith Whitwell <keithw@precisioninsight.com> * Daryll Strauss <daryll@precisioninsight.com> (Origninal tdfx driver). * - * $PI: $ */ #ifndef _MGA_INIT_H_ diff --git a/xc/lib/GL/mesa/src/drv/tdfx/Imakefile b/xc/lib/GL/mesa/src/drv/tdfx/Imakefile index d221dc5cd..c159a8e76 100644 --- a/xc/lib/GL/mesa/src/drv/tdfx/Imakefile +++ b/xc/lib/GL/mesa/src/drv/tdfx/Imakefile @@ -51,7 +51,7 @@ LinkSourceFile(fxvs_tmp.h, ../../../../../../extras/Mesa/src/FX) DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) $(MESA_INCLUDES) $(DRI_INCLUDES) \ - -I/usr/include/glide3 + -I$(GLIDE3INCDIR) DRISRCS = ../../../dri/dri_mesa.c \ ../../../../dri/dri_tmm.c diff --git a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_init.c b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_init.c index 3fc44b59d..70e7bbbb8 100644 --- a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_init.c +++ b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_init.c @@ -29,7 +29,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * Authors: * Daryll Strauss <daryll@precisioninsight.com> * - * $PI: # */ #ifdef GLX_DIRECT_RENDERING diff --git a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_init.h b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_init.h index ead84e61a..3759512ee 100644 --- a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_init.h +++ b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_init.h @@ -29,7 +29,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * Authors: * Daryll Strauss <daryll@precisioninsight.com> * - * $PI: $ */ #ifndef _TDFX_INIT_H_ diff --git a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_inithw.c b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_inithw.c index 7b08f9766..a225fec89 100644 --- a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_inithw.c +++ b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_inithw.c @@ -29,7 +29,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * Authors: * Daryll Strauss <daryll@precisioninsight.com> * - * $PI: $ */ #ifdef GLX_DIRECT_RENDERING diff --git a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c index 38772c95d..7fc55cb16 100644 --- a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c +++ b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c @@ -29,7 +29,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * Authors: * Daryll Strauss <daryll@precisioninsight.com> * - * $PI: $ */ #ifdef GLX_DIRECT_RENDERING @@ -390,17 +389,22 @@ void XMesaSetSAREA() { } -extern void _register_gl_extensions(void); /* silence compiler warning */ +extern void __driRegisterExtensions(void); /* silence compiler warning */ -void _register_gl_extensions(void) +/* This function is called by libGL.so as soon as libGL.so is loaded. + * This is where we'd register new extension functions with the dispatcher. + */ +void __driRegisterExtensions(void) { - /* Here is where the 3Dfx driver would register new extensions - * with libGL.so. - * This function is called as soon as the driver object is dlopened. - */ #if 0 - /* really, the return code should be checked */ - _glapi_add_entrypoint("glFooBarEXT", _gloffset_FooBarEXT); + /* Example. Also look in fxdd.c for more details. */ + { + const int _gloffset_FooBarEXT = 555; /* just an example number! */ + if (_glapi_add_entrypoint("glFooBarEXT", _gloffset_FooBarEXT)) { + void *f = glXGetProcAddressARB("glFooBarEXT"); + assert(f); + } + } #endif } diff --git a/xc/lib/Imakefile b/xc/lib/Imakefile index bda6a32b1..f0d83cb4e 100644 --- a/xc/lib/Imakefile +++ b/xc/lib/Imakefile @@ -1,5 +1,5 @@ XCOMM $TOG: Imakefile /main/39 1997/02/26 18:09:44 kaleb $ -XCOMM $XFree86: xc/lib/Imakefile,v 3.33 2000/02/13 06:15:22 dawes Exp $ +XCOMM $XFree86: xc/lib/Imakefile,v 3.36 2000/03/01 12:52:01 tsi Exp $ #define IHaveSubdirs #define PassCDebugFlags @@ -24,54 +24,59 @@ XKBUILIBDIR = xkbui #endif #if BuildThreadStubLibrary -THRSTUBLIB = XThrStub +THRSTUBLIBDIR = XThrStub #endif #if BuildScreenSaverLibrary -SSLIB = Xss +SSLIBDIR = Xss #endif #if BuildXF86MiscLibrary -XF86MISCLIB = Xxf86misc +XF86MISCLIBDIR = Xxf86misc #endif #if BuildXF86VidModeLibrary -XF86VMLIB = Xxf86vm +XF86VMLIBDIR = Xxf86vm #endif #if BuildXF86DGALibrary -XF86DGALIB = Xxf86dga +XF86DGALIBDIR = Xxf86dga #endif #if BuildXF86RushLibrary -XF86RUSHLIB = Xxf86rush +XF86RUSHLIBDIR = Xxf86rush #endif #if BuildXvLibrary -XVLIB = Xv +XVLIBDIR = Xv +#endif + +#if BuildXineramaLibrary +XINERAMADIR=Xinerama #endif #if BuildXantiLibrary -XANTILIB = Xanti +XANTILIBDIR = Xanti #endif #if BuildGLXLibrary -GLXLIB = GL +GLXLIBDIR = GL #endif #if BuildDPSLibrary -DPSLIB = dps +DPSLIBDIR = dps #endif #if BuildDPSTkLibrary -DPSTKLIB = dpstk +DPSTKLIBDIR = dpstk #endif #if BuildPSResLibrary -PSRESLIB = psres +PSRESLIBDIR = psres #endif -XF86EXTLIBS = $(XF86MISCLIB) $(XF86VMLIB) $(XF86DGALIB) $(XF86RUSHLIB) +XF86EXTLIBS = $(XF86MISCLIBDIR) $(XF86VMLIBDIR) \ + $(XF86DGALIBDIR) $(XF86RUSHLIBDIR) #if BuildLBX LBXUTILDIR = lbxutil @@ -96,20 +101,21 @@ FONTCACHELIBDIR = Xfontcache FONTSUBDIR = font #if !BuildServersOnly -LINTSUBDIRS = Xau Xdmcp $(THRSTUBLIB) X11 oldX ICE SM Xext Xt \ - $(SSLIB) $(XF86MISCLIB) $(XF86VMLIB) $(XF86DGALIB) $(XF86RUSHLIB) \ - Xmu Xpm Xaw $(XAW6LIBDIR) XIE Xi Xtst FS \ +LINTSUBDIRS = Xau Xdmcp $(THRSTUBLIBDIR) X11 oldX ICE SM Xext Xt \ + $(SSLIBDIR) $(XF86MISCLIBDIR) $(XF86VMLIBDIR) $(XF86DGALIBDIR) \ + $(XF86RUSHLIBDIR) Xmu Xpm Xaw $(XAW6LIBDIR) XIE Xi Xtst FS \ PEX5 $(XKBLIBDIR) $(XKBUILIBDIR) $(LBXUTILDIR) $(XALIBDIR) \ - Xp $(XVLIB) $(XANTILIB) $(GLXLIB) $(DPSLIB) $(DPSTKLIB) \ - $(PSRESLIB) $(ZLIBDIR) $(REGEXDIR) + Xp $(XVLIBDIR) $(XANTILIBDIR) $(GLXLIBDIR) $(DPSLIBDIR) \ + $(DPSTKLIBDIR) $(PSRESLIBDIR) $(XINERAMADIR) \ + $(ZLIBDIR) $(REGEXDIR) #else #if XnestServer || BuildGLXLibrary XEXTDIR = Xext #endif -LINTSUBDIRS = Xau Xdmcp X11 $(XEXTDIR) $(XKBLIBDIR) $(XKBUILIBDIR) \ - $(LBXUTILDIR) $(XF86EXTLIBS) $(XVLIB) $(GLXLIB) $(ZLIBDIR) \ - $(REGEXDIR) +LINTSUBDIRS = Xau Xdmcp X11 $(XINERAMADIR) $(XEXTDIR) $(XKBLIBDIR) \ + $(XKBUILIBDIR) $(LBXUTILDIR) $(XF86EXTLIBS) $(XVLIBDIR) \ + $(GLXLIBDIR) $(ZLIBDIR) $(REGEXDIR) #endif SUBDIRS = $(BERKDIR) xtrans $(LINTSUBDIRS) $(FONTSUBDIR) $(FONTCACHELIBDIR) diff --git a/xc/lib/X11/Font.c b/xc/lib/X11/Font.c index 1949f7975..0bb5834ff 100644 --- a/xc/lib/X11/Font.c +++ b/xc/lib/X11/Font.c @@ -28,7 +28,7 @@ sale, use or other dealings in this Software without prior written authorization from the X Consortium and the XFree86 Project. */ -/* $XFree86: xc/lib/X11/Font.c,v 1.5 2000/02/08 17:18:42 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Font.c,v 1.6 2000/02/29 03:09:03 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" @@ -58,7 +58,17 @@ static XFontStruct *_XQueryFont( #ifdef USE_XF86BIGFONT -static XExtCodes *_XF86BigfontCodes( +/* Private data for this extension. */ +typedef struct { + XExtCodes *codes; + CARD32 serverSignature; + CARD32 serverCapabilities; +} XF86BigfontCodes; + +/* Additional bit masks that can be set in serverCapabilities */ +#define CAP_VerifiedLocal 256 + +static XF86BigfontCodes *_XF86BigfontCodes( #if NeedFunctionPrototypes Display* /* dpy */ #endif @@ -67,7 +77,7 @@ static XExtCodes *_XF86BigfontCodes( static XFontStruct *_XF86BigfontQueryFont( #if NeedFunctionPrototypes Display* /* dpy */, - XExtCodes* /* extcodes */, + XF86BigfontCodes* /* extcodes */, Font /* fid */, unsigned long /* seq */ #endif @@ -98,7 +108,7 @@ XFontStruct *XLoadQueryFont(dpy, name) xOpenFontReq *req; unsigned long seq; #ifdef USE_XF86BIGFONT - XExtCodes *extcodes = _XF86BigfontCodes(dpy); + XF86BigfontCodes *extcodes = _XF86BigfontCodes(dpy); #endif LockDisplay(dpy); @@ -128,7 +138,7 @@ XFontStruct *XQueryFont (dpy, fid) { XFontStruct *font_result; #ifdef USE_XF86BIGFONT - XExtCodes *extcodes = _XF86BigfontCodes(dpy); + XF86BigfontCodes *extcodes = _XF86BigfontCodes(dpy); #endif LockDisplay(dpy); @@ -326,18 +336,20 @@ static int _XF86BigfontFreeCodes (extension) XExtData *extension; { - /* Don't Xfree(extension->private_data) because this is shared with the - display's ext_procs list. */ + /* Don't Xfree(extension->private_data) because it is on the same malloc + chunk as extension. */ + /* Don't Xfree(extension->private_data->codes) because this is shared with + the display's ext_procs list. */ return 0; } -static XExtCodes * +static XF86BigfontCodes * _XF86BigfontCodes (dpy) register Display *dpy; { XEDataObject dpy_union; XExtData *pData; - XExtCodes *pCodes; + XF86BigfontCodes *pCodes; char *envval; dpy_union.display = dpy; @@ -349,20 +361,27 @@ _XF86BigfontCodes (dpy) pData = XFindOnExtensionList(XEHeadOfExtensionList(dpy_union), XF86BigfontNumber); if (pData) - return (XExtCodes *) pData->private_data; + return (XF86BigfontCodes *) pData->private_data; - pData = (XExtData *) Xmalloc(sizeof(XExtData)); + pData = (XExtData *) Xmalloc(sizeof(XExtData) + sizeof(XF86BigfontCodes)); if (!pData) { /* Out of luck. */ - return (XExtCodes *) NULL; + return (XF86BigfontCodes *) NULL; } /* See if the server supports the XF86Bigfont extension. */ envval = getenv("XF86BIGFONT_DISABLE"); /* Let the user disable it. */ if (envval != NULL && envval[0] != '\0') pCodes = NULL; - else - pCodes = XInitExtension(dpy, XF86BIGFONTNAME); + else { + XExtCodes *codes = XInitExtension(dpy, XF86BIGFONTNAME); + if (codes == NULL) + pCodes = NULL; + else { + pCodes = (XF86BigfontCodes *) &pData[1]; + pCodes->codes = codes; + } + } pData->number = XF86BigfontNumber; pData->private_data = (XPointer) pCodes; pData->free_private = _XF86BigfontFreeCodes; @@ -374,18 +393,31 @@ _XF86BigfontCodes (dpy) register xXF86BigfontQueryVersionReq *req; GetReq(XF86BigfontQueryVersion, req); - req->reqType = pCodes->major_opcode; + req->reqType = pCodes->codes->major_opcode; req->xf86bigfontReqType = X_XF86BigfontQueryVersion; if (!(_XReply (dpy, (xReply *) &reply, (SIZEOF(xXF86BigfontQueryVersionReply) - SIZEOF(xReply)) >> 2, - xFalse))) { - /* No need to Xfree(pCodes), see _XF86BigfontFreeCodes comment. */ - pCodes = (XExtCodes *) NULL; - pData->private_data = (XPointer) pCodes; - } + xFalse))) + goto ignore_extension; + + /* No need to provide backward compatibility with version 1.0. It + was never widely distributed. */ + if (!(reply.majorVersion > 1 + || (reply.majorVersion == 1 && reply.minorVersion >= 1))) + goto ignore_extension; + + pCodes->serverSignature = reply.signature; + pCodes->serverCapabilities = reply.capabilities; } return pCodes; + + ignore_extension: + /* No need to Xfree(pCodes) or Xfree(pCodes->codes), see + _XF86BigfontFreeCodes comment. */ + pCodes = (XF86BigfontCodes *) NULL; + pData->private_data = (XPointer) pCodes; + return pCodes; } static int @@ -398,7 +430,7 @@ _XF86BigfontFreeNop (extension) static XFontStruct * _XF86BigfontQueryFont (dpy, extcodes, fid, seq) register Display *dpy; - XExtCodes *extcodes; + XF86BigfontCodes *extcodes; Font fid; unsigned long seq; { @@ -426,9 +458,11 @@ _XF86BigfontQueryFont (dpy, extcodes, fid, seq) } GetReq(XF86BigfontQueryFont, req); - req->reqType = extcodes->major_opcode; + req->reqType = extcodes->codes->major_opcode; req->xf86bigfontReqType = X_XF86BigfontQueryFont; req->id = fid; + req->flags = (extcodes->serverCapabilities & XF86Bigfont_CAP_LocalShm + ? XF86Bigfont_FLAGS_Shm : 0); /* The function _XQueryFont benefits from a "magic" error handler for BadFont coming from a X_QueryFont request. (See function _XReply.) @@ -436,7 +470,7 @@ _XF86BigfontQueryFont (dpy, extcodes, fid, seq) async2_state.min_sequence_number = dpy->request; async2_state.max_sequence_number = dpy->request; async2_state.error_code = BadFont; - async2_state.major_opcode = extcodes->major_opcode; + async2_state.major_opcode = extcodes->codes->major_opcode; async2_state.minor_opcode = X_XF86BigfontQueryFont; async2_state.error_count = 0; async2.next = dpy->async_handlers; @@ -553,14 +587,44 @@ _XF86BigfontQueryFont (dpy, extcodes, fid, seq) return (XFontStruct *)NULL; } + /* In some cases (e.g. an ssh daemon forwarding an X session to + a remote machine) it is possible that the X server thinks we + are running on the same machine (because getpeername() and + LocalClient() cannot know about the forwarding) but we are + not really local. Therefore, when we attach the first shared + memory segment, we verify that we are on the same machine as + the X server by checking that 1. shmat() succeeds, 2. the + segment has a sufficient size, 3. it contains the X server's + signature. Then we set the CAP_VerifiedLocal bit to indicate + the verification was successful. */ + if ((addr = shmat(reply.shmid, 0, SHM_RDONLY)) == (char *)-1) { - fprintf(stderr, "_XF86BigfontQueryFont: could not attach shm segment\n"); + if (extcodes->serverCapabilities & CAP_VerifiedLocal) + fprintf(stderr, "_XF86BigfontQueryFont: could not attach shm segment\n"); Xfree((char *) pData); if (fs->properties) Xfree((char *) fs->properties); Xfree((char *) fs); + /* Stop requesting shared memory transport from now on. */ + extcodes->serverCapabilities &= ~ XF86Bigfont_CAP_LocalShm; return (XFontStruct *)NULL; } + if (!(extcodes->serverCapabilities & CAP_VerifiedLocal)) { + struct shmid_ds buf; + if (!(shmctl(reply.shmid, IPC_STAT, &buf) >= 0 + && buf.shm_segsz >= reply.shmsegoffset + reply.nCharInfos * sizeof(XCharStruct) + sizeof(CARD32) + && *(CARD32 *)(addr + reply.shmsegoffset + reply.nCharInfos * sizeof(XCharStruct)) == extcodes->serverSignature)) { + shmdt(addr); + Xfree((char *) pData); + if (fs->properties) Xfree((char *) fs->properties); + Xfree((char *) fs); + /* Stop requesting shared memory transport from now on. */ + extcodes->serverCapabilities &= ~ XF86Bigfont_CAP_LocalShm; + return (XFontStruct *)NULL; + } + extcodes->serverCapabilities |= CAP_VerifiedLocal; + } + pData->number = XF86BigfontNumber; pData->private_data = (XPointer) addr; pData->free_private = _XF86BigfontFreeNop; @@ -572,6 +636,8 @@ _XF86BigfontQueryFont (dpy, extcodes, fid, seq) fprintf(stderr, "_XF86BigfontQueryFont: try recompiling libX11 with HasShm, Xserver has shm support\n"); if (fs->properties) Xfree((char *) fs->properties); Xfree((char *) fs); + /* Stop requesting shared memory transport from now on. */ + extcodes->serverCapabilities &= ~ XF86Bigfont_CAP_LocalShm; return (XFontStruct *)NULL; #endif } diff --git a/xc/lib/X11/XErrorDB b/xc/lib/X11/XErrorDB index 41e3a7577..5ecc858bc 100644 --- a/xc/lib/X11/XErrorDB +++ b/xc/lib/X11/XErrorDB @@ -19,7 +19,7 @@ ! other dealings in this Software without prior written authorization ! from The Open Group. ! -! $XFree86: xc/lib/X11/XErrorDB,v 3.30 2000/02/10 22:33:22 dawes Exp $ +! $XFree86: xc/lib/X11/XErrorDB,v 3.32 2000/02/29 18:29:01 dawes Exp $ ! ! these are used in XGetErrorMessage. XlibMessage.XError: X Error of failed request @@ -759,13 +759,21 @@ XRequest.XINERAMA.0: XINERAMAQueryVersion XRequest.XINERAMA.1: XINERAMAGetState XRequest.XINERAMA.2: XINERAMAGetScreenCount XRequest.XINERAMA.3: XINERAMAGetScreenSize +XRequest.XINERAMA.4: XINERAMAIsActive +XRequest.XINERAMA.5: XINERAMAQueryScreens ! XF86Rush extension, not a standard spec Xrequest.XFree86-Rush.0: XF86RushQueryVersion Xrequest.XFree86-Rush.1: XF86RushLockPixmap Xrequest.XFree86-Rush.2: XF86RushUnlockPixmap Xrequest.XFree86-Rush.3: XF86RushUnlockAllPixmaps -Xrequest.XFree86-Rush.4: XF86RushSetCopyMode -Xrequest.XFree86-Rush.5: XF86RushSetPixelStride +Xrequest.XFree86-Rush.4: XF86RushGetCopyMode +Xrequest.XFree86-Rush.5: XF86RushSetCopyMode +Xrequest.XFree86-Rush.6: XF86RushGetPixelStride +Xrequest.XFree86-Rush.7: XF86RushSetPixelStride +Xrequest.XFree86-Rush.8: XF86RushOverlayPixmap +Xrequest.XFree86-Rush.9: XF86RushStatusRegOffset +Xrequest.XFree86-Rush.10: XF86RushAT3DEnableRegs +Xrequest.XFree86-Rush.11: XF86RushAT3DDisableRegs ! XVideo Xrequest.XVideo.0: XvQueryExtension Xrequest.XVideo.1: XvQueryAdaptors diff --git a/xc/lib/X11/XlcGeneric.h b/xc/lib/X11/XlcGeneric.h index dbc874298..f8992a541 100644 --- a/xc/lib/X11/XlcGeneric.h +++ b/xc/lib/X11/XlcGeneric.h @@ -31,6 +31,7 @@ * Modifier: Takanori Tateno FUJITSU LIMITED * */ +/* $XFree86: xc/lib/X11/XlcGeneric.h,v 1.2 2000/02/25 18:27:53 dawes Exp $ */ #ifndef _XLCGENERIC_H_ #define _XLCGENERIC_H_ @@ -93,6 +94,7 @@ typedef struct _CodeSetRec { ExtdSegment ctextseg; ParseInfo parse_info; unsigned long wc_encoding; + Bool string_encoding; } CodeSetRec, *CodeSet; typedef enum { diff --git a/xc/lib/X11/XlcPublic.h b/xc/lib/X11/XlcPublic.h index b403c7378..36842a314 100644 --- a/xc/lib/X11/XlcPublic.h +++ b/xc/lib/X11/XlcPublic.h @@ -31,7 +31,7 @@ * Modifier: Takanori Tateno FUJITSU LIMITED * */ -/* $XFree86: xc/lib/X11/XlcPublic.h,v 1.3 2000/02/12 02:54:07 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XlcPublic.h,v 1.5 2000/02/29 03:09:03 dawes Exp $ */ /* * Most of this API is documented in i18n/Framework.PS */ @@ -79,6 +79,8 @@ typedef char* (*XlcGetCSValuesProc)( #endif ); +typedef enum {CSsrcUndef = 0, CSsrcStd, CSsrcXLC} CSSrc; + typedef struct _XlcCharSetRec { char *name; /* character set name */ XrmQuark xrm_name; @@ -93,6 +95,8 @@ typedef struct _XlcCharSetRec { Bool string_encoding; UDCArea udc_area; int udc_area_num; + /* CS description source */ + CSSrc source; } XlcCharSetRec; /* @@ -186,6 +190,13 @@ extern XlcCharSet _XlcGetCharSet( #endif ); +extern XlcCharSet _XlcGetCharSetWithSide( +#if NeedFunctionPrototypes + _Xconst char* /* encoding_name */, + XlcSide /* side */ +#endif +); + extern Bool _XlcAddCharSet( #if NeedFunctionPrototypes XlcCharSet /* charset */ diff --git a/xc/lib/X11/lcCT.c b/xc/lib/X11/lcCT.c index 0ce9ba588..e91bab3b2 100644 --- a/xc/lib/X11/lcCT.c +++ b/xc/lib/X11/lcCT.c @@ -36,7 +36,7 @@ * Modifier: Ivan Pascal The XFree86 Project * Modifier: Bruno Haible The XFree86 Project */ -/* $XFree86: xc/lib/X11/lcCT.c,v 3.15 2000/02/12 02:54:08 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcCT.c,v 3.16 2000/02/25 18:27:54 dawes Exp $ */ #include "Xlibint.h" #include "XlcPubI.h" @@ -130,18 +130,6 @@ static CTDataRec default_ct_data[] = #endif }; -CTDataRec *default_ct_data_list() -{ - return(default_ct_data); -} - -size_t default_ct_data_list_num() -{ - size_t num = sizeof(default_ct_data) / sizeof(CTDataRec); - return(num); -} - - /* ======================= Parsing ESC Sequences ======================= */ #define XctC0 0x0000 @@ -661,7 +649,7 @@ cstoct(conv, from, from_left, to, to_left, args, num_args) charset != state->GL_charset) ) { /* output esc-sequence */ - if ((ct_info->type == XctExtSeg) && (length >= 7)) { + if ((ct_info->type == XctExtSeg) && (length < 7)) { int comp_len = length + strlen(ct_info->ext_segment) + 3; if (ct_len < comp_len) @@ -918,13 +906,17 @@ _XlcInitCTInfo() if (ct_list == NULL) { CTData ct_data; int num; + XlcCharSet charset; /* Initialize ct_list. */ num = sizeof(default_ct_data) / sizeof(CTDataRec); - for (ct_data = default_ct_data; num > 0; ct_data++, num--) - _XlcAddCT(ct_data->name, ct_data->encoding); - + for (ct_data = default_ct_data; num > 0; ct_data++, num--) { + charset = _XlcAddCT(ct_data->name, ct_data->encoding); + if (charset == NULL) + continue; + charset->source = CSsrcStd; + } /* Register CompoundText and CharSet converters. */ _XlcSetConverter((XLCd) NULL, XlcNCompoundText, diff --git a/xc/lib/X11/lcCharSet.c b/xc/lib/X11/lcCharSet.c index 7816e3a2e..4ee9c3413 100644 --- a/xc/lib/X11/lcCharSet.c +++ b/xc/lib/X11/lcCharSet.c @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/lcCharSet.c,v 3.4 2000/02/12 02:54:09 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcCharSet.c,v 3.5 2000/02/29 03:09:04 dawes Exp $ */ #include <stdio.h> #include "Xlibint.h" @@ -97,6 +97,25 @@ _XlcGetCharSet(name) return (XlcCharSet) NULL; } +XlcCharSet +_XlcGetCharSetWithSide(encoding_name, side) + _Xconst char *encoding_name; + XlcSide side; +{ + XlcCharSetList list; + XrmQuark xrm_encoding_name; + + xrm_encoding_name = XrmStringToQuark(encoding_name); + + for (list = charset_list; list; list = list->next) { + if (list->charset->xrm_encoding_name == xrm_encoding_name + && (list->charset->side == XlcGLGR || list->charset->side == side)) + return (XlcCharSet) list->charset; + } + + return (XlcCharSet) NULL; +} + Bool _XlcAddCharSet(charset) XlcCharSet charset; diff --git a/xc/lib/X11/lcDefConv.c b/xc/lib/X11/lcDefConv.c index de69e5e46..cbf7679fd 100644 --- a/xc/lib/X11/lcDefConv.c +++ b/xc/lib/X11/lcDefConv.c @@ -23,17 +23,25 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/lcDefConv.c,v 1.3 2000/02/12 02:54:10 dawes Exp $ */ +/* + * 2000 + * Modifier: Ivan Pascal The XFree86 Project + */ +/* $XFree86: xc/lib/X11/lcDefConv.c,v 1.4 2000/02/25 18:27:54 dawes Exp $ */ /* * The default locale loader. - * Supports: only the "C" locale. + * Supports: one byte per char (iso8859 like) locales. * How: converts bytes to wide characters in a 1:1 manner. * Platforms: all systems. */ #include "Xlibint.h" -#include "XlcPubI.h" +#include "XlcGeneric.h" + +#ifndef MB_LEN_MAX +#define MB_LEN_MAX 6 +#endif extern void _XlcAddUtf8Converters( #if NeedFunctionPrototypes @@ -41,16 +49,103 @@ extern void _XlcAddUtf8Converters( #endif ); +#if !defined(X_NOT_STDC_ENV) && !defined(macII) && !defined(Lynx_22) && !defined(X_LOCALE) +#define STDCVT +#endif + +#define GR 0x80 +#define GL 0x7f + typedef struct _StateRec { - XlcCharSet charset; - XlcCharSet GL_charset; - XlcCharSet GR_charset; - XlcConv ct_conv; - int (*to_converter)(); + CodeSet GL_codeset; + CodeSet GR_codeset; + wchar_t wc_mask; + wchar_t wc_encode_mask; + Bool (*MBtoWC)(); + Bool (*WCtoMB)(); } StateRec, *State; +static +Bool MBtoWCdef(state, ch, wc) + State state; + char *ch; + wchar_t *wc; +{ + wchar_t wc_encoding; + CodeSet codeset = (*ch & GR) ? state->GR_codeset : + state->GL_codeset; + if (!codeset) + return False; + wc_encoding = codeset->wc_encoding; + *wc = ((wchar_t) * ch & state->wc_mask) | wc_encoding; + return True; +} + +#ifdef STDCVT +static +Bool MBtoWCstd(state, ch, wc) + State state; + char *ch; + wchar_t *wc; +{ + return (mbtowc(wc, ch, 1) == 1); +} +#endif + +static +Bool WCtoMBdef(state, wc, ch) + State state; + wchar_t wc; + char *ch; +{ + wchar_t wc_encoding = wc & state->wc_encode_mask; + CodeSet codeset; + + codeset = state->GL_codeset; + if (codeset && (wc_encoding == codeset->wc_encoding)) { + *ch = wc & state->wc_mask; + return True; + } + codeset = state->GR_codeset; + if (codeset && (wc_encoding == codeset->wc_encoding)) { + *ch = (wc & state->wc_mask) | GR; + return True; + } + return False; +} + +#ifdef STDCVT +static +Bool WCtoMBstd(state, wc, ch) + State state; + wchar_t wc; + char *ch; +{ + return (wctomb(ch, wc) == 1); +} +#endif + +static +XlcCharSet get_charset(state, side) + State state; + char side; +{ + CodeSet codeset = side ? state->GR_codeset : state->GL_codeset; + if (codeset) { + int i; + XlcCharSet charset; + for (i = 0; i < codeset->num_charsets; i++) { + charset = codeset->charset_list[i]; + if (*charset->ct_sequence != '\0') + return charset; + } + return *(codeset->charset_list); + } + return (XlcCharSet) NULL; +} + static int -strtostr(conv, from, from_left, to, to_left, args, num_args) +def_mbstowcs(conv, from, from_left, to, to_left, args, num_args) XlcConv conv; XPointer *from; int *from_left; @@ -59,39 +154,96 @@ strtostr(conv, from, from_left, to, to_left, args, num_args) XPointer *args; int num_args; { - register char *src, *dst; - unsigned char side; - register int length; + register char *src = (char *) *from; + register wchar_t *dst = (wchar_t *) * to; + State state = (State) conv->state; + int unconv = 0; if (from == NULL || *from == NULL) return 0; - src = (char *) *from; - dst = (char *) *to; + while (*from_left && *to_left) { + (*from_left)--; + if ((state->MBtoWC) (state, src++, dst)) { + dst++; + (*to_left)--; + } else { + unconv++; + } + } + *from = (XPointer) src; + *to = (XPointer) dst; + return unconv; +} - length = min(*from_left, *to_left); +static int +def_wcstombs(conv, from, from_left, to, to_left, args, num_args) + XlcConv conv; + XPointer *from; + int *from_left; + XPointer *to; + int *to_left; + XPointer *args; + int num_args; +{ + register wchar_t *src = (wchar_t *) * from; + register char *dst = (char *) *to; + State state = (State) conv->state; + char ch[MB_LEN_MAX]; + int unconv = 0; - if (num_args > 0) { - side = (length > 0) ? *((unsigned char *) src) & 0x80 : 0; - while (length-- > 0 && side == (*((unsigned char *) src) & 0x80)) - *dst++ = *src++; - } else { - while (length-- > 0) - *dst++ = *src++; + if (from == NULL || *from == NULL) + return 0; + + while (*from_left && *to_left) { + (*from_left)--; + if ((state->WCtoMB) (state, *src++, ch)) { + *dst++ = *ch; + (*to_left)--; + } else { + unconv++; + } } - - *from_left -= src - (char *) *from; *from = (XPointer) src; - *to_left -= dst - (char *) *to; *to = (XPointer) dst; + return unconv; +} - if (num_args > 0) { - State state = (State) conv->state; +static int +mbstostr(conv, from, from_left, to, to_left, args, num_args) + XlcConv conv; + XPointer *from; + int *from_left; + XPointer *to; + int *to_left; + XPointer *args; + int num_args; +{ + register char *src = (char *) *from; + register char *dst = (char *) *to; + CodeSet codeset; + State state = (State) conv->state; + char ch; + int unconv = 0; - *((XlcCharSet *)args[0]) = side ? state->GR_charset : state->GL_charset; - } + if (from == NULL || *from == NULL) + return 0; - return 0; + while (*from_left && *to_left) { + ch = *src++; + (*from_left)--; + + codeset = (ch & GR) ? state->GR_codeset : state->GL_codeset; + if (codeset && codeset->string_encoding) { + *dst++ = ch; + (*to_left)--; + } else { + unconv++; + } + } + *from = (XPointer) src; + *to = (XPointer) dst; + return unconv; } static int @@ -104,43 +256,145 @@ wcstostr(conv, from, from_left, to, to_left, args, num_args) XPointer *args; int num_args; { - register wchar_t *src, side; - register char *dst; - register int length; + register wchar_t *src = (wchar_t *) * from; + register char *dst = (char *) *to; + CodeSet codeset; + State state = (State) conv->state; + char ch[MB_LEN_MAX]; + int unconv = 0; if (from == NULL || *from == NULL) return 0; - src = (wchar_t *) *from; - dst = (char *) *to; + while (*from_left && *to_left) { + (*from_left)--; + if ((state->WCtoMB) (state, *src++, ch)) { + codeset = (*ch & GR) ? state->GR_codeset : state->GL_codeset; + if (codeset && codeset->string_encoding) { + *dst++ = *ch; + (*to_left)--; + } else { + unconv++; + } + } else { + unconv++; + } + } + *from = (XPointer) src; + *to = (XPointer) dst; + return unconv; +} + +static int +mbstocs(conv, from, from_left, to, to_left, args, num_args) + XlcConv conv; + XPointer *from; + int *from_left; + XPointer *to; + int *to_left; + XPointer *args; + int num_args; +{ + register char *src = (char *) *from; + register char *dst = (char *) *to; + register int length; + State state = (State) conv->state; + char cur_side; + int unconv = 0; + + if (from == NULL || *from == NULL) + return 0; length = min(*from_left, *to_left); + cur_side = *src & GR; + while (length) { + if ((char) (*src & GR) != cur_side) + break; + *dst++ = *src++; + length--; + } + if (num_args > 0) { - side = (length > 0) ? *src & 0x80 : 0; - while (length-- > 0 && side == (*src & 0x80)) - *dst++ = *src++; - } else { - while (length-- > 0) - *dst++ = *src++; + XlcCharSet charset = get_charset(state, cur_side); + if (charset) { + *((XlcCharSet *) args[0]) = charset; + } else { + dst = *to; + unconv = -1; + } } - - *from_left -= src - (wchar_t *) *from; - *from = (XPointer) src; + *from_left -= src - (char *) *from; *to_left -= dst - (char *) *to; + *from = (XPointer) src; *to = (XPointer) dst; + return unconv; +} - if (num_args > 0) { - State state = (State) conv->state; +static int +wcstocs(conv, from, from_left, to, to_left, args, num_args) + XlcConv conv; + XPointer *from; + int *from_left; + XPointer *to; + int *to_left; + XPointer *args; + int num_args; +{ + register wchar_t *src = (wchar_t *) * from; + register char *dst = (char *) *to; + State state = (State) conv->state; + char cur_side = 0, ch[MB_LEN_MAX]; + int unconv = 0; + Bool found = False; + + if (from == NULL || *from == NULL) + return 0; - *((XlcCharSet *)args[0]) = side ? state->GR_charset : state->GL_charset; + while (*from_left) { + if (found = (state->WCtoMB)(state, *src, ch)) + break; + unconv++; + src++; + (*from_left)--; } - return 0; + if (found) { + cur_side = *ch & GR; + while (*from_left && *to_left) { + (*from_left)--; + if ((state->WCtoMB)(state, *src++, ch)) { + if ((char) (*ch & GR) != cur_side) { + src--; + (*from_left)++; + break; + } else { + *dst++ = *ch; + (*to_left)--; + } + } else { + unconv++; + } + } + } else { + unconv++; + } + + if (num_args > 0) { + XlcCharSet charset = get_charset(state, cur_side); + if (charset) { + *((XlcCharSet *) args[0]) = charset; + } else { + unconv = -1; + } + } + *from = (XPointer) src; + *to = (XPointer) dst; + return unconv; } static int -cstostr(conv, from, from_left, to, to_left, args, num_args) +cstombs(conv, from, from_left, to, to_left, args, num_args) XlcConv conv; XPointer *from; int *from_left; @@ -149,51 +403,67 @@ cstostr(conv, from, from_left, to, to_left, args, num_args) XPointer *args; int num_args; { - register char *src, *dst; - unsigned char side; - register int length; + register char *src = (char *) *from; + register char *dst = (char *) *to; + CodeSet codeset; + XlcCharSet charset; + State state = (State) conv->state; + unsigned char cur_side = 0; + int i; + Bool found = False; if (from == NULL || *from == NULL) return 0; if (num_args > 0) { - State state = (State) conv->state; - XlcCharSet charset = (XlcCharSet) args[0]; - - if (charset != state->GL_charset && charset != state->GR_charset) + charset = (XlcCharSet) args[0]; + if (charset == NULL) return -1; + } else { + return -1; } - src = (char *) *from; - dst = (char *) *to; - - length = min(*from_left, *to_left); - - if (num_args > 0) { - side = (length > 0) ? *((unsigned char *) src) & 0x80 : 0; - while (length-- > 0 && side == (*((unsigned char *) src) & 0x80)) - *dst++ = *src++; + if ((charset->side == XlcGL) || (charset->side == XlcGLGR)) { + codeset = state->GL_codeset; + if (codeset) { + for (i = 0; i < codeset->num_charsets; i++) + if (charset == codeset->charset_list[i]) { + found = True; + cur_side = 0; + break; + } + } + } + if (!found && ((charset->side == XlcGR) || (charset->side == XlcGLGR))) { + codeset = state->GR_codeset; + if (codeset) { + for (i = 0; i < codeset->num_charsets; i++) + if (charset == codeset->charset_list[i]) { + found = True; + cur_side = GR; + break; + } + } + } + if (found) { + register int length = min(*from_left, *to_left); + while (length) { + *dst++ = *src++ | cur_side; + length--; + } } else { - while (length-- > 0) - *dst++ = *src++; + return -1; } - + *from_left -= src - (char *) *from; - *from = (XPointer) src; *to_left -= dst - (char *) *to; + *from = (XPointer) src; *to = (XPointer) dst; - - if (num_args > 0) { - State state = (State) conv->state; - - *((XlcCharSet *)args[0]) = side ? state->GR_charset : state->GL_charset; - } - return 0; } static int -strtowcs(conv, from, from_left, to, to_left, args, num_args) +cstowcs(conv, from, from_left, to, to_left, args, num_args) XlcConv conv; XPointer *from; int *from_left; @@ -202,38 +472,98 @@ strtowcs(conv, from, from_left, to, to_left, args, num_args) XPointer *args; int num_args; { - register char *src; - register wchar_t *dst; - register int length; + register char *src = (char *) *from; + register wchar_t *dst = (wchar_t *) * to; + CodeSet codeset; + XlcCharSet charset; + State state = (State) conv->state; + Bool found = False; + int i, unconv = 0; + unsigned char cur_side = 0; if (from == NULL || *from == NULL) return 0; if (num_args > 0) { - State state = (State) conv->state; - XlcCharSet charset = (XlcCharSet) args[0]; - - if (charset != state->GL_charset && charset != state->GR_charset) + charset = (XlcCharSet) args[0]; + if (charset == NULL) return -1; + } else { + return -1; } - src = (char *) *from; - dst = (wchar_t *) *to; + if ((charset->side == XlcGL) || (charset->side == XlcGLGR)) { + codeset = state->GL_codeset; + if (codeset) { + for (i = 0; i < codeset->num_charsets; i++) + if (charset == codeset->charset_list[i]) { + found = True; + cur_side = 0; + break; + } + } + } + if (!found && ((charset->side == XlcGR) || (charset->side == XlcGLGR))) { + codeset = state->GR_codeset; + if (codeset) { + for (i = 0; i < codeset->num_charsets; i++) + if (charset == codeset->charset_list[i]) { + found = True; + cur_side = GR; + break; + } + } + } + if (found) { + char ch; + while (*from_left && *to_left) { + ch = *src++ | cur_side; + (*from_left)--; + if ((state->MBtoWC) (state, &ch, dst)) { + dst++; + (*to_left)--; + } else { + unconv++; + } + } + } else { + return -1; + } + *from = (XPointer) src; + *to = (XPointer) dst; + return unconv; +} + +static int +strtombs(conv, from, from_left, to, to_left, args, num_args) + XlcConv conv; + XPointer *from; + int *from_left; + XPointer *to; + int *to_left; + XPointer *args; + int num_args; +{ + register char *src = (char *) *from; + register char *dst = (char *) *to; + register int length; + + if (from == NULL || *from == NULL) + return 0; length = min(*from_left, *to_left); + while (length) { + *dst++ = *src++; + length--; + } - while (length-- > 0) - *dst++ = (wchar_t) *src++; - *from_left -= src - (char *) *from; + *to_left -= dst - (char *) *to; *from = (XPointer) src; - *to_left -= dst - (wchar_t *) *to; *to = (XPointer) dst; - return 0; } - static void close_converter(conv) XlcConv conv; @@ -245,62 +575,116 @@ close_converter(conv) } static XlcConv -create_conv(methods) +create_conv(lcd, methods) + XLCd lcd; XlcConvMethods methods; { register XlcConv conv; State state; - static XlcCharSet GL_charset = NULL; - static XlcCharSet GR_charset = NULL; - - if (GL_charset == NULL) { - GL_charset = _XlcGetCharSet("ISO8859-1:GL"); - GR_charset = _XlcGetCharSet("ISO8859-1:GR"); - } conv = (XlcConv) Xmalloc(sizeof(XlcConvRec)); if (conv == NULL) return (XlcConv) NULL; state = (State) Xmalloc(sizeof(StateRec)); - if (state == NULL) - goto err; - - state->GL_charset = state->charset = GL_charset; - state->GR_charset = GR_charset; + if (state == NULL) { + close_converter(conv); + return (XlcConv) NULL; + } + state->GL_codeset = XLC_GENERIC(lcd, initial_state_GL); + state->GR_codeset = XLC_GENERIC(lcd, initial_state_GR); + state->wc_mask = (1 << XLC_GENERIC(lcd, wc_shift_bits)) - 1; + state->wc_encode_mask = XLC_GENERIC(lcd, wc_encode_mask); + +#ifdef STDCVT + if (XLC_GENERIC(lcd, use_stdc_env) == True) + state->MBtoWC = &MBtoWCstd; + else +#endif + state->MBtoWC = &MBtoWCdef; + +#ifdef STDCVT + if (XLC_GENERIC(lcd, use_stdc_env) == True) + state->WCtoMB = &WCtoMBstd; + else +#endif + state->WCtoMB = &WCtoMBdef; conv->methods = methods; conv->state = (XPointer) state; return conv; +} + +static XlcConvMethodsRec mbstowcs_methods = { + close_converter, + def_mbstowcs, + NULL +}; + +static XlcConv +open_mbstowcs(from_lcd, from_type, to_lcd, to_type) + XLCd from_lcd; + char *from_type; + XLCd to_lcd; + char *to_type; +{ + return create_conv(from_lcd, &mbstowcs_methods); +} + +static XlcConvMethodsRec mbstostr_methods = { + close_converter, + mbstostr, + NULL +}; + +static XlcConv +open_mbstostr(from_lcd, from_type, to_lcd, to_type) + XLCd from_lcd; + char *from_type; + XLCd to_lcd; + char *to_type; +{ + return create_conv(from_lcd, &mbstostr_methods); +} -err: - close_converter(conv); +static XlcConvMethodsRec mbstocs_methods = { + close_converter, + mbstocs, + NULL +}; - return (XlcConv) NULL; +static XlcConv +open_mbstocs(from_lcd, from_type, to_lcd, to_type) + XLCd from_lcd; + char *from_type; + XLCd to_lcd; + char *to_type; +{ + return create_conv(from_lcd, &mbstocs_methods); } -static XlcConvMethodsRec strtostr_methods = { +static XlcConvMethodsRec wcstombs_methods = { close_converter, - strtostr, + def_wcstombs, NULL -} ; +}; static XlcConv -open_strtostr(from_lcd, from_type, to_lcd, to_type) +open_wcstombs(from_lcd, from_type, to_lcd, to_type) XLCd from_lcd; char *from_type; XLCd to_lcd; char *to_type; { - return create_conv(&strtostr_methods); + return create_conv(from_lcd, &wcstombs_methods); } static XlcConvMethodsRec wcstostr_methods = { close_converter, wcstostr, NULL -} ; +}; static XlcConv open_wcstostr(from_lcd, from_type, to_lcd, to_type) @@ -309,39 +693,71 @@ open_wcstostr(from_lcd, from_type, to_lcd, to_type) XLCd to_lcd; char *to_type; { - return create_conv(&wcstostr_methods); + return create_conv(from_lcd, &wcstostr_methods); +} + +static XlcConvMethodsRec wcstocs_methods = { + close_converter, + wcstocs, + NULL +}; + +static XlcConv +open_wcstocs(from_lcd, from_type, to_lcd, to_type) + XLCd from_lcd; + char *from_type; + XLCd to_lcd; + char *to_type; +{ + return create_conv(from_lcd, &wcstocs_methods); } -static XlcConvMethodsRec cstostr_methods = { +static XlcConvMethodsRec strtombs_methods = { close_converter, - cstostr, + strtombs, NULL -} ; +}; static XlcConv -open_cstostr(from_lcd, from_type, to_lcd, to_type) +open_strtombs(from_lcd, from_type, to_lcd, to_type) XLCd from_lcd; char *from_type; XLCd to_lcd; char *to_type; { - return create_conv(&cstostr_methods); + return create_conv(from_lcd, &strtombs_methods); } -static XlcConvMethodsRec strtowcs_methods = { +static XlcConvMethodsRec cstombs_methods = { close_converter, - strtowcs, + cstombs, NULL -} ; +}; static XlcConv -open_strtowcs(from_lcd, from_type, to_lcd, to_type) +open_cstombs(from_lcd, from_type, to_lcd, to_type) XLCd from_lcd; char *from_type; XLCd to_lcd; char *to_type; { - return create_conv(&strtowcs_methods); + return create_conv(from_lcd, &cstombs_methods); +} + +static XlcConvMethodsRec cstowcs_methods = { + close_converter, + cstowcs, + NULL +}; + +static XlcConv +open_cstowcs(from_lcd, from_type, to_lcd, to_type) + XLCd from_lcd; + char *from_type; + XLCd to_lcd; + char *to_type; +{ + return create_conv(from_lcd, &cstowcs_methods); } XLCd @@ -350,29 +766,29 @@ _XlcDefaultLoader(name) { XLCd lcd; - if (strcmp(name, "C")) - return (XLCd) NULL; - - lcd = _XlcCreateLC(name, _XlcPublicMethods); - if (lcd == (XLCd) NULL) + lcd = _XlcCreateLC(name, _XlcGenericMethods); + if (lcd == NULL) return lcd; - _XlcSetConverter(lcd, XlcNMultiByte, lcd, XlcNWideChar, open_strtowcs); - _XlcSetConverter(lcd, XlcNMultiByte, lcd, XlcNCompoundText, open_strtostr); - _XlcSetConverter(lcd, XlcNMultiByte, lcd, XlcNString, open_strtostr); - _XlcSetConverter(lcd, XlcNMultiByte, lcd, XlcNCharSet, open_strtostr); - _XlcSetConverter(lcd, XlcNMultiByte, lcd, XlcNChar, open_strtostr);/* XXX */ + if (XLC_PUBLIC(lcd, mb_cur_max) != 1){ + _XlcDestroyLC(lcd); + return (XLCd) NULL; + } + + _XlcSetConverter(lcd, XlcNMultiByte, lcd, XlcNWideChar, open_mbstowcs); + _XlcSetConverter(lcd, XlcNMultiByte, lcd, XlcNString, open_mbstostr); + _XlcSetConverter(lcd, XlcNMultiByte, lcd, XlcNCharSet, open_mbstocs); + _XlcSetConverter(lcd, XlcNMultiByte, lcd, XlcNChar, open_mbstocs); - _XlcSetConverter(lcd, XlcNWideChar, lcd, XlcNMultiByte, open_wcstostr); - _XlcSetConverter(lcd, XlcNWideChar, lcd, XlcNCompoundText, open_wcstostr); + _XlcSetConverter(lcd, XlcNWideChar, lcd, XlcNMultiByte, open_wcstombs); _XlcSetConverter(lcd, XlcNWideChar, lcd, XlcNString, open_wcstostr); - _XlcSetConverter(lcd, XlcNWideChar, lcd, XlcNCharSet, open_wcstostr); + _XlcSetConverter(lcd, XlcNWideChar, lcd, XlcNCharSet, open_wcstocs); - _XlcSetConverter(lcd, XlcNString, lcd, XlcNMultiByte, open_strtostr); - _XlcSetConverter(lcd, XlcNString, lcd, XlcNWideChar, open_strtowcs); + _XlcSetConverter(lcd, XlcNString, lcd, XlcNMultiByte, open_strtombs); + _XlcSetConverter(lcd, XlcNString, lcd, XlcNWideChar, open_mbstowcs); - _XlcSetConverter(lcd, XlcNCharSet, lcd, XlcNMultiByte, open_cstostr); - _XlcSetConverter(lcd, XlcNCharSet, lcd, XlcNWideChar, open_strtowcs); + _XlcSetConverter(lcd, XlcNCharSet, lcd, XlcNMultiByte, open_cstombs); + _XlcSetConverter(lcd, XlcNCharSet, lcd, XlcNWideChar, open_cstowcs); _XlcAddUtf8Converters(lcd); diff --git a/xc/lib/X11/lcGenConv.c b/xc/lib/X11/lcGenConv.c index cc3c3ce09..0bbf3eba9 100644 --- a/xc/lib/X11/lcGenConv.c +++ b/xc/lib/X11/lcGenConv.c @@ -31,7 +31,11 @@ * Modifier: Masayoshi Shimamura FUJITSU LIMITED * */ -/* $XFree86: xc/lib/X11/lcGenConv.c,v 3.13 2000/02/12 02:54:12 dawes Exp $ */ +/* + * 2000 + * Modifier: Ivan Pascal The XFree86 Project + */ +/* $XFree86: xc/lib/X11/lcGenConv.c,v 3.14 2000/02/25 18:27:55 dawes Exp $ */ /* * A generic locale loader for all kinds of ISO-2022 based codesets. @@ -63,9 +67,6 @@ typedef struct _CTDataRec { char *encoding; /* Compound Text encoding */ } CTDataRec, *CTData; -extern CTDataRec *default_ct_data_list(); -extern size_t default_ct_data_list_num(); - static CTDataRec directionality_data[] = { { "BEGIN_LEFT-TO-RIGHT_TEXT", "\2331]" }, @@ -75,9 +76,13 @@ static CTDataRec directionality_data[] = typedef struct _StateRec { XLCd lcd; + /* CT state */ XlcCharSet charset; /* charset of current state */ XlcCharSet GL_charset; /* charset of initial state in GL */ XlcCharSet GR_charset; /* charset of initial state in GR */ + /* MB shift state */ + CodeSet GL_codeset; + CodeSet GR_codeset; } StateRec, *State; #define GR 0x80 /* begins right-side (non-ascii) region */ @@ -86,14 +91,13 @@ typedef struct _StateRec { #define CSI 0x9b #define STX 0x02 -#define isleftside(c) (((c) & GR) ? 0 : 1) -#define isrightside(c) (!isleftside(c)) - +#define isrightside(c) ((c) & GR) +#define isleftside(c) (!isrightside(c)) /* Forward declarations for local routines. */ static int mbstocts(); static int ctstombs(); - +static int cstombs(); /* ------------------------------------------------------------------------- */ /* Misc */ @@ -162,17 +166,16 @@ conv_to_source(conv, code) convlist = conv->convlist; for (i = 0; i < conv_num; i++) { - start_p = convlist[i].start + convlist[i].shift; - start_m = convlist[i].start - convlist[i].shift; - end_p = convlist[i].end + convlist[i].shift; - end_m = convlist[i].end - convlist[i].shift; - switch (convlist[i].shift_direction) { case '+': + start_p = convlist[i].start + convlist[i].shift; + end_p = convlist[i].end + convlist[i].shift; if (start_p <= code && code <= end_p) return(code - convlist[i].shift); break; case '-': + start_m = convlist[i].start - convlist[i].shift; + end_m = convlist[i].end - convlist[i].shift; if (start_m <= code && code <= end_m) return(code + convlist[i].shift); break; @@ -238,11 +241,10 @@ gi_to_wc(lcd, glyph_index, codeset, wc) { unsigned char mask = 0; unsigned long wc_encoding = codeset->wc_encoding; - int i, length = codeset->length; + int length = codeset->length; unsigned long wc_shift_bits = XLC_GENERIC(lcd, wc_shift_bits); - for (i = wc_shift_bits; i > 0; i--) - mask = (mask << 1) | 0x01; + mask = (1 << wc_shift_bits) - 1 ; for (*wc = 0, length--; length >= 0; length--) *wc = (*wc << wc_shift_bits) | ((glyph_index >> (length * 8 )) & mask); @@ -277,8 +279,7 @@ wc_to_gi(lcd, wc, glyph_index, codeset) if (*codeset == NULL) return(False); - for (i = wc_shift_bits; i > 0; i--) - mask = (mask << 1) | 0x01; + mask = (1 << wc_shift_bits) - 1 ; wc = wc & ~wc_encode_mask; for (*glyph_index = 0, i = (*codeset)->length - 1; i >= 0; i--) @@ -289,6 +290,37 @@ wc_to_gi(lcd, wc, glyph_index, codeset) } static CodeSet +mb_parse_codeset(state, num, inbufptr, from_left) + State state; + int num; + char **inbufptr; + int *from_left; +{ + int len; + int from_len = (*from_left) + 1; + char *src = (*inbufptr) - 1; + ParseInfo *mb_parse_list = XLC_GENERIC(state->lcd, mb_parse_list); + ParseInfo parse_info; + CodeSet codeset; + + for (--num ; parse_info = mb_parse_list[num]; num++) { + len = compare(src, parse_info->encoding, from_len); + if (len > 0) { + codeset = parse_info->codeset; + if (parse_info->type == E_LSL) + state->GL_codeset = codeset; + else if (parse_info->type == E_LSR) + state->GR_codeset = codeset; + --len; + *inbufptr += len; + *from_left -= len; + return codeset; + } + } + return (CodeSet) NULL; +} + +static CodeSet byteM_parse_codeset(lcd, inbufptr) XLCd lcd; XPointer inbufptr; @@ -335,36 +367,9 @@ byteM_parse_codeset(lcd, inbufptr) return(NULL); } -static CodeSet -GLGR_parse_codeset(lcd, ch) - XLCd lcd; - unsigned char ch; -{ - int i; - CodeSet initial_state_GL = XLC_GENERIC(lcd, initial_state_GL); - CodeSet initial_state_GR = XLC_GENERIC(lcd, initial_state_GR); - CodeSet *codeset_list = XLC_GENERIC(lcd, codeset_list); - int codeset_num = XLC_GENERIC(lcd, codeset_num); - - XlcSide side = XlcGL; - CodeSet codeset = initial_state_GL; - - if (isrightside(ch)) { - side = XlcGR; - codeset = initial_state_GR; - } - - if (codeset) - return(codeset); - - for (i = 0; i < codeset_num; i++) { - codeset = codeset_list[i]; - if (codeset->side == side) - return(codeset); - } - - return(NULL); -} +#define GLGR_parse_codeset(ch) \ + (isrightside(ch) ? (state->GR_codeset) : \ + (state->GL_codeset) ) static XlcCharSet gi_parse_charset(glyph_index, codeset) @@ -378,8 +383,6 @@ gi_parse_charset(glyph_index, codeset) XlcCharSet charset; int area_num; FontScope area; - CTDataRec *default_ct_data = default_ct_data_list(); - size_t table_size = default_ct_data_list_num(); /* lockup ct sequence */ for (i = 0; i < num_charsets; i++) { @@ -390,15 +393,9 @@ gi_parse_charset(glyph_index, codeset) if (i >= num_charsets) return(NULL); - /* Standard Character Set Encoding ? */ - for (i = 0; i < table_size; i++) - if (compare(charset->ct_sequence, - default_ct_data[i].encoding, strlen(charset->ct_sequence))) - goto check_extended_seg; - - return(charset); + if (charset->source != CSsrcStd) + return (charset); -check_extended_seg: if (!ctextseg) return(charset); @@ -442,15 +439,14 @@ ct_parse_csi(inbufptr, ctr_seq_len) } static int -cmp_esc_sequence(inbufptr, ct_sequence, encoding_name) +cmp_esc_sequence(inbufptr, charset) XPointer inbufptr; - char *ct_sequence; - char *encoding_name; + XlcCharSet charset; { - int i, seq_len, name_len, total_len; + int seq_len, name_len, total_len; unsigned char byte_m, byte_l; - CTDataRec *default_ct_data = default_ct_data_list(); - size_t table_size = default_ct_data_list_num(); + char *ct_sequence = charset->ct_sequence; + char *encoding_name = charset->encoding_name; /* check esc sequence */ if ( !(seq_len = strlen(ct_sequence) ) ) @@ -459,11 +455,8 @@ cmp_esc_sequence(inbufptr, ct_sequence, encoding_name) return(0); /* Standard Character Set Encoding ? */ - for (i = 0; i < table_size; i++) { - if (compare(ct_sequence, - default_ct_data[i].encoding, strlen(ct_sequence))) - return(seq_len); - } + if(charset->source == CSsrcStd) + return(seq_len); /* * Non-Standard Character Set Encoding @@ -525,15 +518,13 @@ ct_parse_charset(lcd, inbufptr, charset, ctr_seq_len) for (j = 0; j < num_charsets; j++) { *charset = charset_list[j]; - if (( *ctr_seq_len = cmp_esc_sequence(inbufptr, - (*charset)->ct_sequence, (*charset)->encoding_name) )) + if ( *ctr_seq_len = cmp_esc_sequence(inbufptr, *charset) ) return(True); } if (ctextseg) { *charset = ctextseg->charset; - if (( *ctr_seq_len = cmp_esc_sequence(inbufptr, - (*charset)->ct_sequence, (*charset)->encoding_name) )) + if ( *ctr_seq_len = cmp_esc_sequence(inbufptr, *charset) ) return(True); } } @@ -545,15 +536,13 @@ ct_parse_charset(lcd, inbufptr, charset, ctr_seq_len) for (i = 0; i < segment_conv_num; i++) { *charset = segment_conv[i].source; - if (( *ctr_seq_len = cmp_esc_sequence(inbufptr, - (*charset)->ct_sequence, (*charset)->encoding_name) )) + if ( *ctr_seq_len = cmp_esc_sequence(inbufptr, *charset) ) return(True); *charset = segment_conv[i].dest; - if (( *ctr_seq_len = cmp_esc_sequence(inbufptr, - (*charset)->ct_sequence, (*charset)->encoding_name) )) + if ( *ctr_seq_len = cmp_esc_sequence(inbufptr, *charset) ) return(True); } - + return(False); } @@ -632,15 +621,13 @@ _XlcGetCodeSetFromCharSet(lcd, charset, codeset, glyph_index) CodeSet *codeset; unsigned long *glyph_index; { - int i, j, num; + int j, num; CodeSet *codeset_list = XLC_GENERIC(lcd, codeset_list); XlcCharSet *charset_list; int codeset_num, num_charsets; Conversion ctconv; unsigned long glyph_index_tmp; ExtdSegment ctextseg; - CTDataRec *default_ct_data = default_ct_data_list(); - size_t table_size = default_ct_data_list_num(); codeset_num = XLC_GENERIC(lcd, codeset_num); @@ -654,14 +641,7 @@ _XlcGetCodeSetFromCharSet(lcd, charset, codeset, glyph_index) glyph_index_tmp = conv_to_source(ctconv, *glyph_index); - /* Standard Character Set Encoding ? */ - for (i = 0; i < table_size; i++) { - if (compare(charset->ct_sequence, - default_ct_data[i].encoding, strlen(charset->ct_sequence))) - break; - } - - if (i < table_size) { + if(charset->source == CSsrcStd) { /* Standard Character Set Encoding */ if (glyph_index_tmp == *glyph_index) { @@ -700,24 +680,7 @@ end_loop: return(False); } -static Bool -check_string_encoding(codeset) - CodeSet codeset; -{ - int i; - XlcCharSet charset; - XlcCharSet *charset_list = codeset->charset_list; - int num_charsets = codeset->num_charsets; - - for (i = 0; i < num_charsets; i++) { - charset = charset_list[i]; - if ( strcmp(charset->encoding_name, "ISO8859-1") == 0 || - charset->string_encoding) - return(True); - } - - return(False); -} +#define check_string_encoding(codeset) (codeset->string_encoding) static void output_ulong_value(outbufptr, code, length, side) @@ -727,10 +690,9 @@ output_ulong_value(outbufptr, code, length, side) XlcSide side; { int i; - unsigned long mask = 0xff; - for (i = 0; i < length; i++) { - *outbufptr = ( code >> (8 * (length - i - 1)) ) & mask; + for (i = (length - 1) * 8; i >= 0; i -= 8) { + *outbufptr = ( code >> i) & 0xff; if (side == XlcC0 || side == XlcGL) { *outbufptr = *outbufptr & GL; @@ -746,6 +708,9 @@ output_ulong_value(outbufptr, code, length, side) /* Init */ /* -------------------------------------------------------------------------- */ +static XlcCharSet default_GL_charset = 0; +static XlcCharSet default_GR_charset = 0; + static void init_state(conv) XlcConv conv; @@ -754,8 +719,12 @@ init_state(conv) /* for CT */ state->charset = NULL; - state->GL_charset = _XlcGetCharSet("ISO8859-1:GL"); - state->GR_charset = _XlcGetCharSet("ISO8859-1:GR"); + state->GL_charset = default_GL_charset; + state->GR_charset = default_GR_charset; + + /* for MB shift state */ + state->GL_codeset = XLC_GENERIC(state->lcd, initial_state_GL); + state->GR_codeset = XLC_GENERIC(state->lcd, initial_state_GR); } /* -------------------------------------------------------------------------- */ @@ -782,18 +751,19 @@ mbstowcs_org(conv, from, from_left, to, to_left, args, num_args) int length = 0, len_left = 0; int unconv_num = 0; int num; - Bool ss_flag = 0; CodeSet codeset = NULL; - ParseInfo parse_info; XPointer inbufptr = *from; wchar_t *outbufptr = (wchar_t *) *to; int from_size = *from_left; unsigned char *mb_parse_table = XLC_GENERIC(lcd, mb_parse_table); - ParseInfo *mb_parse_list = XLC_GENERIC(lcd, mb_parse_list); + if (from == NULL || *from == NULL) { + _XlcResetConverter(conv); + return( 0 ); + } if (*from_left > *to_left) *from_left = *to_left; @@ -822,25 +792,20 @@ mbstowcs_org(conv, from, from_left, to, to_left, args, num_args) goto output_one_wc; /* next mb char data for single shift ? */ - if (mb_parse_table) { - if ((num = mb_parse_table[ch]) > 0) { - parse_info = mb_parse_list[num - 1]; - - codeset = parse_info->codeset; + if (mb_parse_table && (num = mb_parse_table[ch]) ) { + if( codeset = mb_parse_codeset(state, num, &inbufptr, from_left)) { length = len_left = codeset->length; mb = 0; - ss_flag = 1; - continue; } - } + } /* next mb char data for byteM ? */ if ((codeset = byteM_parse_codeset(lcd, (inbufptr - 1)))) goto next_mb_char; /* next mb char data for GL or GR side ? */ - if ((codeset = GLGR_parse_codeset(lcd, ch))) + if ((codeset = GLGR_parse_codeset(ch))) goto next_mb_char; /* can't find codeset for the ch */ @@ -850,7 +815,6 @@ mbstowcs_org(conv, from, from_left, to, to_left, args, num_args) next_mb_char: length = len_left = codeset->length; mb = 0; - ss_flag = 0; output_one_wc: mb = (mb << 8) | ch; /* 1 byte left shift */ @@ -867,9 +831,9 @@ output_one_wc: /* error check on last char */ if (len_left) { - inbufptr -= (length - len_left + ss_flag); - (*from_left) += (length - len_left + ss_flag); - unconv_num += (length - len_left + ss_flag); + inbufptr -= (length - len_left); + (*from_left) += (length - len_left); + unconv_num += (length - len_left); } *from = *from + from_size; @@ -979,9 +943,10 @@ wcstombs_org(conv, from, from_left, to, to_left, args, num_args) /* output default_string of XDefaultString() */ if (*to_left < defstr_len) break; - if (outbufptr) {strncpy((char *)outbufptr, default_string, defstr_len);} - - if (outbufptr) {outbufptr += defstr_len;} + if (outbufptr) { + strncpy((char *)outbufptr, default_string, defstr_len); + outbufptr += defstr_len; + } (*to_left) -= defstr_len; unconv_num++; @@ -989,16 +954,37 @@ wcstombs_org(conv, from, from_left, to, to_left, args, num_args) } else { mb = gi_to_mb(glyph_index, codeset); if (codeset->parse_info) { + Bool need_shift = False; + switch (codeset->parse_info->type) { + case E_LSL : + if (codeset != state->GL_codeset) { + need_shift = True; + state->GL_codeset = codeset; + } + break; + case E_LSR : + if (codeset != state->GR_codeset) { + need_shift = True; + state->GR_codeset = codeset; + } + break; + /* case E_SS */ + default: + need_shift = True; + } /* output shift sequence */ - encoding = codeset->parse_info->encoding; - length = strlen(encoding); - if (*to_left < length) - break; - if (outbufptr) {strncpy((char *)outbufptr, encoding, length);} - - if (outbufptr) {outbufptr += length;} - (*to_left) -= length; + if (need_shift) { + encoding = codeset->parse_info->encoding; + length = strlen(encoding); + if (*to_left < length) + break; + if (outbufptr) { + strncpy((char *)outbufptr, encoding, length); + outbufptr += length; + } + (*to_left) -= length; + } } /* output characters */ @@ -1076,13 +1062,11 @@ wcstocts(conv, from, from_left, to, to_left, args, num_args) { State state = (State) conv->state; XLCd lcd = state->lcd; - CTDataRec *default_ct_data = default_ct_data_list(); - size_t table_size = default_ct_data_list_num(); unsigned long glyph_index; wchar_t wc; - int i, total_len, seq_len, name_len; + int total_len, seq_len, name_len; int unconv_num = 0; Bool first_flag = True, standard_flag; XlcSide side; @@ -1125,11 +1109,7 @@ wcstocts(conv, from, from_left, to, to_left, args, num_args) } /* Standard Character Set Encoding ? */ - standard_flag = False; - for (i = 0; i < table_size; i++) - if (compare(charset->ct_sequence, - default_ct_data[i].encoding, strlen(charset->ct_sequence))) - standard_flag = True; + standard_flag = charset->source == CSsrcStd ? True : False; /* * Non-Standard Character Set Encoding @@ -1157,7 +1137,7 @@ wcstocts(conv, from, from_left, to, to_left, args, num_args) /* output escape sequence of CT */ if ( (charset != old_charset) && - !(first_flag && (strcmp(charset->encoding_name,"ISO8859-1")==0))) { + !(first_flag && charset->string_encoding) ){ if (*to_left < total_len + 1) { unconv_num++; @@ -1271,10 +1251,10 @@ ctstowcs(conv, from, from_left, to, to_left, args, num_args) int from_size = *from_left; - init_state(conv); + _XlcResetConverter(conv); /* ??? */ if (from == NULL || *from == NULL) { - init_state(conv); + _XlcResetConverter(conv); return( 0 ); } @@ -1381,10 +1361,7 @@ output_one_wc: /* segment conversion */ charset_tmp = state->charset; - if ( !segment_conversion(lcd, &charset_tmp, &glyph_index) ) { - unconv_num += gi_len; - continue; - } + segment_conversion(lcd, &charset_tmp, &glyph_index); /* get codeset */ if ( !_XlcGetCodeSetFromCharSet(lcd, charset_tmp, @@ -1436,6 +1413,105 @@ skip_the_seg: } static int +cstowcs(conv, from, from_left, to, to_left, args, num_args) + XlcConv conv; + XPointer *from; + int *from_left; + XPointer *to; + int *to_left; + XPointer *args; + int num_args; +{ + State state = (State) conv->state; + XLCd lcd = state->lcd; + + unsigned char ch; + unsigned long glyph_index = 0; + wchar_t wc; + int gi_len_left = 0, gi_len = 0; + + int unconv_num = 0; + + CodeSet codeset = NULL; + XlcCharSet charset, charset_tmp; + + XPointer inbufptr = *from; + wchar_t *outbufptr = (wchar_t *) *to; + int from_size = *from_left; + + if (from == NULL || *from == NULL) { + return( 0 ); + } + + charset = (XlcCharSet) args[0]; + + while (*from_left && *to_left) { + + if (!gi_len_left) { + gi_len_left = gi_len = charset->char_size; + glyph_index = 0; + } + + ch = *inbufptr++; + (*from_left)--; + + /* null ? */ + if (!ch) { + if (outbufptr) {*outbufptr++ = L'\0';} + (*to_left)--; + + /* error check */ + if (gi_len_left) { + unconv_num += (gi_len - gi_len_left); + gi_len_left = 0; + } + continue; + } + + if (charset->side == XlcC1 || charset->side == XlcGR) + glyph_index = (glyph_index << 8) | (ch & GL); + else + glyph_index = (glyph_index << 8) | ch; + + gi_len_left--; + + /* last of one glyph_index data */ + if (!gi_len_left) { + + /* segment conversion */ + charset_tmp = charset; + segment_conversion(lcd, &charset_tmp, &glyph_index); + + /* get codeset */ + if ( !_XlcGetCodeSetFromCharSet(lcd, charset_tmp, + &codeset, &glyph_index) ) { + unconv_num += gi_len; + continue; + } + + /* convert glyph index to wicd char */ + gi_to_wc(lcd, glyph_index, codeset, &wc); + if (outbufptr) {*outbufptr++ = wc;} + (*to_left)--; + } + + } /* end of while */ + + /* error check on last char */ + if (gi_len_left) { + inbufptr -= (gi_len - gi_len_left); + (*from_left) += (gi_len - gi_len_left); + unconv_num += (gi_len - gi_len_left); + } + + *from = *from + from_size; + *from_left = 0; + *to = (XPointer)outbufptr; + + return unconv_num; +} + +static int stdc_ctstowcs(conv, from, from_left, to, to_left, args, num_args) XlcConv conv; XPointer *from; @@ -1472,6 +1548,42 @@ ret: } static int +stdc_cstowcs(conv, from, from_left, to, to_left, args, num_args) + XlcConv conv; + XPointer *from; + int *from_left; + XPointer *to; + int *to_left; + XPointer *args; + int num_args; +{ + XPointer buf = Xmalloc((*from_left) * MB_CUR_MAX); + XPointer buf_ptr1 = buf; + int buf_left1 = (*from_left) * MB_CUR_MAX; + XPointer buf_ptr2 = buf_ptr1; + int buf_left2; + int unconv_num1 = 0, unconv_num2 = 0; + + unconv_num1 = cstombs(conv, + from, from_left, &buf_ptr1, &buf_left1, args, num_args); + if (unconv_num1 < 0) + goto ret; + + buf_left2 = buf_ptr1 - buf_ptr2; + + unconv_num2 = stdc_mbstowcs(conv, + &buf_ptr2, &buf_left2, to, to_left, args, num_args); + if (unconv_num2 < 0) + goto ret; + +ret: + if (buf) + Xfree((char *)buf); + + return (unconv_num1 + unconv_num2); +} + +static int mbstocts(conv, from, from_left, to, to_left, args, num_args) XlcConv conv; XPointer *from; @@ -1523,22 +1635,22 @@ mbstostr(conv, from, from_left, to, to_left, args, num_args) unsigned char ch; unsigned long mb = 0; - int length = 0, len_left = 0; int unconv_num = 0; int num; - Bool ss_flag = 0; CodeSet codeset = NULL; - ParseInfo parse_info; XPointer inbufptr = *from; XPointer outbufptr = *to; int from_size = *from_left; unsigned char *mb_parse_table = XLC_GENERIC(lcd, mb_parse_table); - ParseInfo *mb_parse_list = XLC_GENERIC(lcd, mb_parse_list); + if (from == NULL || *from == NULL) { + _XlcResetConverter(conv); + return( 0 ); + } if (*from_left > *to_left) *from_left = *to_left; @@ -1567,25 +1679,20 @@ mbstostr(conv, from, from_left, to, to_left, args, num_args) goto output_one_mb; /* next mb char data for single shift ? */ - if (mb_parse_table) { - if ((num = mb_parse_table[ch]) > 0) { - parse_info = mb_parse_list[num - 1]; - - codeset = parse_info->codeset; - length = len_left = codeset->length; - mb = 0; - ss_flag = 1; - - continue; + if (mb_parse_table && (num = mb_parse_table[ch]) ) { + if( codeset = mb_parse_codeset(state, num, &inbufptr, from_left)) { + length = len_left = codeset->length; + mb = 0; + continue; } - } - + } + /* next char data : byteM ? */ if ((codeset = byteM_parse_codeset(lcd, (inbufptr - 1)))) goto next_mb_char; /* next char data : GL or GR side ? */ - if ((codeset = GLGR_parse_codeset(lcd, ch))) + if ((codeset = GLGR_parse_codeset(ch))) goto next_mb_char; /* can't find codeset for the ch */ @@ -1595,7 +1702,6 @@ mbstostr(conv, from, from_left, to, to_left, args, num_args) next_mb_char: length = len_left = codeset->length; mb = 0; - ss_flag = 0; output_one_mb: mb = (mb << 8) | ch; /* 1 byte left shift */ @@ -1615,9 +1721,9 @@ output_one_mb: /* error check on last char */ if (len_left) { - inbufptr -= (length - len_left + ss_flag); - (*from_left) += (length - len_left + ss_flag); - unconv_num += (length - len_left + ss_flag); + inbufptr -= (length - len_left); + (*from_left) += (length - len_left); + unconv_num += (length - len_left); } *from = *from + from_size; @@ -1651,16 +1757,17 @@ mbtocs(conv, from, from_left, to, to_left, args, num_args) CodeSet codeset = NULL; XlcCharSet charset; - ParseInfo parse_info; XPointer inbufptr = *from; XPointer outbufptr = *to; int from_size = *from_left; - unsigned char *mb_parse_table = XLC_GENERIC(lcd, mb_parse_table); - ParseInfo *mb_parse_list = XLC_GENERIC(lcd, mb_parse_list); + if (from == NULL || *from == NULL) { + _XlcResetConverter(conv); + return( 0 ); + } if (*from_left > *to_left) *from_left = *to_left; @@ -1683,24 +1790,20 @@ mbtocs(conv, from, from_left, to, to_left, args, num_args) goto output; /* next mb char data for single shift ? */ - if (mb_parse_table) { - if ((num = mb_parse_table[ch]) > 0) { - parse_info = mb_parse_list[num - 1]; - - codeset = parse_info->codeset; + if (mb_parse_table && (num = mb_parse_table[ch]) ) { + if( codeset = mb_parse_codeset(state, num, &inbufptr, from_left)) { length = len_left = codeset->length; mb = 0; - continue; } - } - + } + /* next mb char data for byteM ? */ if ((codeset = byteM_parse_codeset(lcd, (inbufptr - 1)))) goto next_mb_char; /* next mb char data for GL or GR side ? */ - if ((codeset = GLGR_parse_codeset(lcd, ch))) + if ((codeset = GLGR_parse_codeset(ch))) goto next_mb_char; /* can't find codeset for the ch */ @@ -1785,7 +1888,7 @@ mbstocs(conv, from, from_left, to, to_left, args, num_args) ret = mbtocs(conv, from, from_left, to, to_left, tmp_args, 1); charset_old = charset; - + while ( ret == 0 && *from_left && *to_left) { inbufptr = *from; in_left = *from_left; @@ -1863,34 +1966,57 @@ wcstostr(conv, from, from_left, to, to_left, args, num_args) /* output default_string of XDefaultString() */ if (*to_left < defstr_len) break; - if (outbufptr) {strncpy((char *)outbufptr, default_string, defstr_len);} - - if (outbufptr) {outbufptr += defstr_len;} + if (outbufptr) { + strncpy((char *)outbufptr, default_string, defstr_len); + outbufptr += defstr_len; + } (*to_left) -= defstr_len; unconv_num++; } else { mb = gi_to_mb(glyph_index, codeset); - if (codeset->parse_info) { - /* output shift sequence */ - encoding = codeset->parse_info->encoding; - length = strlen(encoding); - if (*to_left < length) - break; - if (check_string_encoding(codeset)) { - if (outbufptr) {strncpy((char *)outbufptr, encoding, length);} - if (outbufptr) {outbufptr += length;} - (*to_left) -= length; + if (check_string_encoding(codeset)) { + if (codeset->parse_info) { + Bool need_shift = False; + switch (codeset->parse_info->type) { + case E_LSL : + if (codeset != state->GL_codeset) { + need_shift = True; + state->GL_codeset = codeset; + } + break; + case E_LSR : + if (codeset != state->GR_codeset) { + need_shift = True; + state->GR_codeset = codeset; + } + break; + /* case E_SS */ + default: + need_shift = True; + } + + /* output shift sequence */ + if (need_shift) { + encoding = codeset->parse_info->encoding; + length = strlen(encoding); + if (*to_left < length) + break; + + if (outbufptr) { + strncpy((char *)outbufptr, encoding, length); + outbufptr += length; + } + (*to_left) -= length; + } } - } - /* output characters */ - length = codeset->length; - if (*to_left < length) - break; - if (check_string_encoding(codeset)) { + /* output characters */ + length = codeset->length; + if (*to_left < length) + break; if (outbufptr) { output_ulong_value(outbufptr, mb, length, XlcNONE); @@ -1975,8 +2101,6 @@ wctocs(conv, from, from_left, to, to_left, args, num_args) XPointer outbufptr = *to; int from_size = *from_left; - - if (*from_left > *to_left) *from_left = *to_left; @@ -2224,6 +2348,42 @@ ret: } static int +cstombs(conv, from, from_left, to, to_left, args, num_args) + XlcConv conv; + XPointer *from; + int *from_left; + XPointer *to; + int *to_left; + XPointer *args; + int num_args; +{ + XPointer buf = Xmalloc((*from_left) * sizeof(wchar_t)); + XPointer buf_ptr1 = buf; + int buf_left1 = (*from_left); + XPointer buf_ptr2 = buf_ptr1; + int buf_left2; + int unconv_num1 = 0, unconv_num2 = 0; + + unconv_num1 = cstowcs(conv, + from, from_left, &buf_ptr1, &buf_left1, args, num_args); + if (unconv_num1 < 0) + goto ret; + + buf_left2 = (buf_ptr1 - buf_ptr2) / sizeof(wchar_t); + + unconv_num2 += wcstombs_org(conv, + &buf_ptr2, &buf_left2, to, to_left, args, num_args); + if (unconv_num2 < 0) + goto ret; + +ret: + if (buf) + Xfree((char *)buf); + + return (unconv_num1 + unconv_num2); +} + +static int strtombs(conv, from, from_left, to, to_left, args, num_args) XlcConv conv; XPointer *from; @@ -2281,16 +2441,37 @@ strtombs(conv, from, from_left, to, to_left, args, num_args) mb = gi_to_mb(glyph_index, codeset); if (codeset->parse_info) { + Bool need_shift = False; + switch (codeset->parse_info->type) { + case E_LSL : + if (codeset != state->GL_codeset) { + need_shift = True; + state->GL_codeset = codeset; + } + break; + case E_LSR : + if (codeset != state->GR_codeset) { + need_shift = True; + state->GR_codeset = codeset; + } + break; + /* case E_SS */ + default: + need_shift = True; + } /* output shift sequence */ - encoding = codeset->parse_info->encoding; - length = strlen(encoding); - if (*to_left < length) - break; - if (outbufptr) {strncpy((char *)outbufptr, encoding, length);} - - if (outbufptr) {outbufptr += length;} - (*to_left) -= length; + if (need_shift) { + encoding = codeset->parse_info->encoding; + length = strlen(encoding); + if (*to_left < length) + break; + if (outbufptr) { + strncpy((char *)outbufptr, encoding, length); + outbufptr += length; + } + (*to_left) -= length; + } } /* output characters */ @@ -2456,8 +2637,7 @@ create_conv(lcd, methods) if (conv->methods == NULL) goto err; *conv->methods = *methods; - if (XLC_PUBLIC(lcd, is_state_depend)) - conv->methods->reset = init_state; + conv->methods->reset = init_state; conv->state = (XPointer) Xmalloc(sizeof(StateRec)); if (conv->state == NULL) @@ -2466,7 +2646,8 @@ create_conv(lcd, methods) state = (State) conv->state; state->lcd = lcd; - init_state(conv); + + _XlcResetConverter(conv); return conv; @@ -2556,6 +2737,22 @@ open_ctstombs(from_lcd, from_type, to_lcd, to_type) return create_conv(from_lcd, &ctstombs_methods); } +static XlcConvMethodsRec cstombs_methods = { + close_converter, + cstombs, + NULL +} ; + +static XlcConv +open_cstombs(from_lcd, from_type, to_lcd, to_type) + XLCd from_lcd; + char *from_type; + XLCd to_lcd; + char *to_type; +{ + return create_conv(from_lcd, &cstombs_methods); +} + static XlcConvMethodsRec strtombs_methods = { close_converter, strtombs, @@ -2686,6 +2883,22 @@ open_stdc_ctstowcs(from_lcd, from_type, to_lcd, to_type) return create_conv(from_lcd, &stdc_ctstowcs_methods); } +static XlcConvMethodsRec stdc_cstowcs_methods = { + close_converter, + stdc_cstowcs, + NULL +} ; + +static XlcConv +open_stdc_cstowcs(from_lcd, from_type, to_lcd, to_type) + XLCd from_lcd; + char *from_type; + XLCd to_lcd; + char *to_type; +{ + return create_conv(from_lcd, &stdc_cstowcs_methods); +} + static XlcConvMethodsRec stdc_strtowcs_methods = { close_converter, stdc_strtowcs, @@ -2816,6 +3029,22 @@ open_ctstowcs(from_lcd, from_type, to_lcd, to_type) return create_conv(from_lcd, &ctstowcs_methods); } +static XlcConvMethodsRec cstowcs_methods = { + close_converter, + cstowcs, + NULL +} ; + +static XlcConv +open_cstowcs(from_lcd, from_type, to_lcd, to_type) + XLCd from_lcd; + char *from_type; + XLCd to_lcd; + char *to_type; +{ + return create_conv(from_lcd, &cstowcs_methods); +} + static XlcConvMethodsRec strtowcs_methods = { close_converter, strtowcs, @@ -2847,13 +3076,17 @@ _XlcGenericLoader(name) if (lcd == NULL) return lcd; + default_GL_charset = _XlcGetCharSet("ISO8859-1:GL"); + default_GR_charset = _XlcGetCharSet("ISO8859-1:GR"); + _XlcSetConverter(lcd, XlcNMultiByte, lcd, XlcNCompoundText, open_mbstocts); _XlcSetConverter(lcd, XlcNMultiByte, lcd, XlcNString, open_mbstostr); _XlcSetConverter(lcd, XlcNMultiByte, lcd, XlcNCharSet, open_mbstocs); _XlcSetConverter(lcd, XlcNMultiByte, lcd, XlcNChar, open_mbtocs); _XlcSetConverter(lcd, XlcNCompoundText, lcd, XlcNMultiByte, open_ctstombs); _XlcSetConverter(lcd, XlcNString, lcd, XlcNMultiByte, open_strtombs); - + _XlcSetConverter(lcd, XlcNCharSet, lcd, XlcNMultiByte, open_cstombs); + #ifdef STDCVT gen = XLC_GENERIC_PART(lcd); @@ -2867,6 +3100,7 @@ _XlcGenericLoader(name) _XlcSetConverter(lcd, XlcNWideChar, lcd, XlcNChar, open_wctocs); _XlcSetConverter(lcd, XlcNCompoundText, lcd, XlcNWideChar, open_ctstowcs); _XlcSetConverter(lcd, XlcNString, lcd, XlcNWideChar, open_strtowcs); + _XlcSetConverter(lcd, XlcNCharSet, lcd, XlcNWideChar, open_cstowcs); #ifdef STDCVT } #endif @@ -2881,6 +3115,7 @@ _XlcGenericLoader(name) _XlcSetConverter(lcd, XlcNWideChar, lcd, XlcNChar, open_stdc_wctocs); _XlcSetConverter(lcd, XlcNCompoundText, lcd, XlcNWideChar, open_stdc_ctstowcs); _XlcSetConverter(lcd, XlcNString, lcd, XlcNWideChar, open_stdc_strtowcs); + _XlcSetConverter(lcd, XlcNCharSet, lcd, XlcNWideChar, open_stdc_cstowcs); } #endif @@ -2888,4 +3123,3 @@ _XlcGenericLoader(name) return lcd; } - diff --git a/xc/lib/X11/lcGeneric.c b/xc/lib/X11/lcGeneric.c index 22f849d07..0713adc79 100644 --- a/xc/lib/X11/lcGeneric.c +++ b/xc/lib/X11/lcGeneric.c @@ -28,7 +28,7 @@ * This is source code modified by FUJITSU LIMITED under the Joint * Development Agreement for the CDE/Motif PST. */ -/* $XFree86: xc/lib/X11/lcGeneric.c,v 3.8 2000/02/08 17:18:45 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcGeneric.c,v 3.9 2000/02/25 18:27:56 dawes Exp $ */ #include <stdio.h> #include "Xlibint.h" @@ -405,6 +405,7 @@ int *new; (charset = _XlcCreateDefaultCharSet(name, ""))) { _XlcAddCharSet(charset); *new = 1; + charset->source = CSsrcXLC; } return(charset); } @@ -733,6 +734,7 @@ load_generic(lcd) unsigned long l; int i; int M,ii; + XlcCharSet charset; gen->codeset_num = 0; @@ -861,7 +863,6 @@ load_generic(lcd) sprintf(name, "%s.%s", cs, "ct_encoding"); _XlcGetResource(lcd, "XLC_XLOCALE", name, &value, &num); if (num > 0) { - XlcCharSet charset; char *encoding; if (codeset == NULL && (codeset = add_codeset(gen)) == NULL) @@ -981,6 +982,34 @@ load_generic(lcd) read_charset_define(lcd,gen); /* For VW/UDC */ read_segmentconversion(lcd,gen); /* For VW/UDC */ + if (gen->initial_state_GL == NULL) { + CodeSetRec *codeset; + for (i = 0; i < gen->codeset_num; i++){ + codeset = gen->codeset_list[i]; + if (codeset->side == XlcGL) + gen->initial_state_GL = codeset; + } + } + + if (gen->initial_state_GR == NULL) { + CodeSetRec *codeset; + for (i = 0; i < gen->codeset_num; i++){ + codeset = gen->codeset_list[i]; + if (codeset->side == XlcGR) + gen->initial_state_GR = codeset; + } + } + + for (i = 0; i < gen->codeset_num; i++){ + CodeSetRec *codeset = gen->codeset_list[i]; + for (ii = 0; ii < codeset->num_charsets; ii++){ + charset = codeset->charset_list[ii]; + if (! strcmp(charset->encoding_name, "ISO8859-1")) + charset->string_encoding = True; + if ( charset->string_encoding ) + codeset->string_encoding = True; + } + } return True; err: diff --git a/xc/lib/X11/lcUTF8.c b/xc/lib/X11/lcUTF8.c index 65d81793a..994580e4d 100644 --- a/xc/lib/X11/lcUTF8.c +++ b/xc/lib/X11/lcUTF8.c @@ -24,7 +24,7 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/lcUTF8.c,v 1.1 2000/02/12 02:54:15 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcUTF8.c,v 1.2 2000/02/29 03:09:04 dawes Exp $ */ /* * This file contains: @@ -124,7 +124,8 @@ typedef wchar_t original_wchar_t; #define conv_t XlcConv typedef struct _Utf8ConvRec { - char *name; + const char *name; + XrmQuark xrm_name; #if NeedFunctionPrototypes int (* cstowc) (XlcConv, wchar_t *, unsigned char const *, int); #else @@ -205,92 +206,92 @@ typedef struct { #endif static Utf8ConvRec all_charsets[] = { - { "ISO8859-1", + { "ISO8859-1", NULLQUARK, iso8859_1_mbtowc, iso8859_1_wctomb }, - { "ISO8859-2", + { "ISO8859-2", NULLQUARK, iso8859_2_mbtowc, iso8859_2_wctomb }, - { "ISO8859-3", + { "ISO8859-3", NULLQUARK, iso8859_3_mbtowc, iso8859_3_wctomb }, - { "ISO8859-4", + { "ISO8859-4", NULLQUARK, iso8859_4_mbtowc, iso8859_4_wctomb }, - { "ISO8859-5", + { "ISO8859-5", NULLQUARK, iso8859_5_mbtowc, iso8859_5_wctomb }, - { "ISO8859-6", + { "ISO8859-6", NULLQUARK, iso8859_6_mbtowc, iso8859_6_wctomb }, - { "ISO8859-7", + { "ISO8859-7", NULLQUARK, iso8859_7_mbtowc, iso8859_7_wctomb }, - { "ISO8859-8", + { "ISO8859-8", NULLQUARK, iso8859_8_mbtowc, iso8859_8_wctomb }, - { "ISO8859-9", + { "ISO8859-9", NULLQUARK, iso8859_9_mbtowc, iso8859_9_wctomb }, - { "ISO8859-10", + { "ISO8859-10", NULLQUARK, iso8859_10_mbtowc, iso8859_10_wctomb }, - { "ISO8859-14", + { "ISO8859-14", NULLQUARK, iso8859_14_mbtowc, iso8859_14_wctomb }, - { "ISO8859-15", + { "ISO8859-15", NULLQUARK, iso8859_15_mbtowc, iso8859_15_wctomb }, - { "ISO8859-16", + { "ISO8859-16", NULLQUARK, iso8859_16_mbtowc, iso8859_16_wctomb }, - { "JISX0201.1976-0", + { "JISX0201.1976-0", NULLQUARK, jisx0201_mbtowc, jisx0201_wctomb }, - { "GB2312.1980-0", + { "GB2312.1980-0", NULLQUARK, gb2312_mbtowc, gb2312_wctomb }, - { "JISX0208.1983-0", + { "JISX0208.1983-0", NULLQUARK, jisx0208_mbtowc, jisx0208_wctomb }, - { "JISX0212.1990-0", + { "JISX0212.1990-0", NULLQUARK, jisx0212_mbtowc, jisx0212_wctomb }, - { "KSC5601.1987-0", + { "KSC5601.1987-0", NULLQUARK, ksc5601_mbtowc, ksc5601_wctomb }, - { "TIS620.2533-1", + { "TIS620.2533-1", NULLQUARK, tis620_mbtowc, tis620_wctomb }, - { "KOI8-R", + { "KOI8-R", NULLQUARK, koi8_r_mbtowc, koi8_r_wctomb }, - { "KOI8-U", + { "KOI8-U", NULLQUARK, koi8_u_mbtowc, koi8_u_wctomb }, - { "ARMSCII-8", + { "ARMSCII-8", NULLQUARK, armscii_8_mbtowc, armscii_8_wctomb }, - { "IBM-CP1133", + { "IBM-CP1133", NULLQUARK, cp1133_mbtowc, cp1133_wctomb }, - { "MULELAO-1", + { "MULELAO-1", NULLQUARK, mulelao_mbtowc, mulelao_wctomb }, - { "VISCII1.1-1", + { "VISCII1.1-1", NULLQUARK, viscii_mbtowc, viscii_wctomb }, - { "TCVN-5712", + { "TCVN-5712", NULLQUARK, tcvn_mbtowc, tcvn_wctomb }, - { "GEORGIAN-ACADEMY", + { "GEORGIAN-ACADEMY", NULLQUARK, georgian_academy_mbtowc, georgian_academy_wctomb }, - { "GEORGIAN-PS", + { "GEORGIAN-PS", NULLQUARK, georgian_ps_mbtowc, georgian_ps_wctomb }, #ifdef notdef - { "BIG-5", + { "BIG-5", NULLQUARK, big5_mbtowc, big5_wctomb }, #endif @@ -298,6 +299,22 @@ static Utf8ConvRec all_charsets[] = { #define all_charsets_count (sizeof(all_charsets)/sizeof(all_charsets[0])) +static void +init_all_charsets() +{ + Utf8Conv convptr; + int i; + + for (convptr = all_charsets, i = all_charsets_count; i > 0; convptr++, i--) + convptr->xrm_name = XrmStringToQuark(convptr->name); +} + +#define lazy_init_all_charsets() \ + do { \ + if (all_charsets[0].xrm_name == NULLQUARK) \ + init_all_charsets(); \ + } while (0) + /* * UTF-8 itself */ @@ -500,6 +517,7 @@ open_cstoutf8(from_lcd, from_type, to_lcd, to_type) XLCd to_lcd; char *to_type; { + lazy_init_all_charsets(); return create_conv(from_lcd, &methods_cstoutf8); } @@ -521,6 +539,8 @@ create_tocs_conv(lcd, methods) if (conv == (XlcConv) NULL) return (XlcConv) NULL; + lazy_init_all_charsets(); + codeset_list = XLC_GENERIC(lcd, codeset_list); codeset_num = XLC_GENERIC(lcd, codeset_num); @@ -575,12 +595,14 @@ close_tocs_converter(conv) /* * Converts a Unicode character to an appropriate character set. The NULL * terminated array of preferred character sets is passed as first argument. - * If successful, *charsetp is set to the character set that was used. + * If successful, *charsetp is set to the character set that was used, and + * *sidep is set to the character set side (XlcGL or XlcGR). */ static int -charset_wctocs(preferred, charsetp, conv, r, wc, n) +charset_wctocs(preferred, charsetp, sidep, conv, r, wc, n) Utf8Conv *preferred; Utf8Conv *charsetp; + XlcSide *sidep; XlcConv conv; unsigned char *r; wchar_t wc; @@ -597,6 +619,7 @@ charset_wctocs(preferred, charsetp, conv, r, wc, n) return 0; if (count > 0) { *charsetp = convptr; + *sidep = (*r < 0x80 ? XlcGL : XlcGR); return count; } } @@ -606,6 +629,7 @@ charset_wctocs(preferred, charsetp, conv, r, wc, n) return 0; if (count > 0) { *charsetp = convptr; + *sidep = (*r < 0x80 ? XlcGL : XlcGR); return count; } } @@ -623,7 +647,7 @@ utf8tocs(conv, from, from_left, to, to_left, args, num_args) int num_args; { Utf8Conv *preferred_charsets; - Utf8Conv last_charset = NULL; + XlcCharSet last_charset = NULL; unsigned char const *src; unsigned char const *srcend; unsigned char *dst; @@ -641,7 +665,8 @@ utf8tocs(conv, from, from_left, to, to_left, args, num_args) unconv_num = 0; while (src < srcend && dst < dstend) { - Utf8Conv chosen_charset = NULL; /* FIXME: side */ + Utf8Conv chosen_charset = NULL; + XlcSide chosen_side = XlcNONE; wchar_t wc; int consumed; int count; @@ -655,7 +680,7 @@ utf8tocs(conv, from, from_left, to, to_left, args, num_args) continue; } - count = charset_wctocs(preferred_charsets, &chosen_charset, conv, dst, wc, dstend-dst); + count = charset_wctocs(preferred_charsets, &chosen_charset, &chosen_side, conv, dst, wc, dstend-dst); if (count == 0) break; if (count < 0) { @@ -664,11 +689,22 @@ utf8tocs(conv, from, from_left, to, to_left, args, num_args) continue; } - if (last_charset != NULL && chosen_charset != last_charset) - break; + if (last_charset == NULL) { + last_charset = + _XlcGetCharSetWithSide(chosen_charset->name, chosen_side); + if (last_charset == NULL) { + src += consumed; + unconv_num++; + continue; + } + } else { + if (!(last_charset->xrm_encoding_name == chosen_charset->xrm_name + && (last_charset->side == XlcGLGR + || last_charset->side == chosen_side))) + break; + } src += consumed; dst += count; - last_charset = chosen_charset; } if (last_charset == NULL) @@ -680,7 +716,7 @@ utf8tocs(conv, from, from_left, to, to_left, args, num_args) *to_left = dstend - dst; if (num_args >= 1) - *((XlcCharSet *)args[0]) = _XlcGetCharSet(last_charset->name); + *((XlcCharSet *)args[0]) = last_charset; return unconv_num; } @@ -714,7 +750,7 @@ utf8tocs1(conv, from, from_left, to, to_left, args, num_args) int num_args; { Utf8Conv *preferred_charsets; - Utf8Conv last_charset = NULL; + XlcCharSet last_charset = NULL; unsigned char const *src; unsigned char const *srcend; unsigned char *dst; @@ -732,7 +768,8 @@ utf8tocs1(conv, from, from_left, to, to_left, args, num_args) unconv_num = 0; while (src < srcend && dst < dstend) { - Utf8Conv chosen_charset = NULL; /* FIXME: side */ + Utf8Conv chosen_charset = NULL; + XlcSide chosen_side = XlcNONE; wchar_t wc; int consumed; int count; @@ -746,7 +783,7 @@ utf8tocs1(conv, from, from_left, to, to_left, args, num_args) continue; } - count = charset_wctocs(preferred_charsets, &chosen_charset, conv, dst, wc, dstend-dst); + count = charset_wctocs(preferred_charsets, &chosen_charset, &chosen_side, conv, dst, wc, dstend-dst); if (count == 0) break; if (count < 0) { @@ -755,11 +792,22 @@ utf8tocs1(conv, from, from_left, to, to_left, args, num_args) continue; } - if (last_charset != NULL && chosen_charset != last_charset) - break; + if (last_charset == NULL) { + last_charset = + _XlcGetCharSetWithSide(chosen_charset->name, chosen_side); + if (last_charset == NULL) { + src += consumed; + unconv_num++; + continue; + } + } else { + if (!(last_charset->xrm_encoding_name == chosen_charset->xrm_name + && (last_charset->side == XlcGLGR + || last_charset->side == chosen_side))) + break; + } src += consumed; dst += count; - last_charset = chosen_charset; break; } @@ -772,7 +820,7 @@ utf8tocs1(conv, from, from_left, to, to_left, args, num_args) *to_left = dstend - dst; if (num_args >= 1) - *((XlcCharSet *)args[0]) = _XlcGetCharSet(last_charset->name); + *((XlcCharSet *)args[0]) = last_charset; return unconv_num; } @@ -1267,6 +1315,7 @@ open_cstowcs(from_lcd, from_type, to_lcd, to_type) XLCd to_lcd; char *to_type; { + lazy_init_all_charsets(); return create_conv(from_lcd, &methods_cstowcs); } @@ -1283,7 +1332,7 @@ wcstocs(conv, from, from_left, to, to_left, args, num_args) int num_args; { Utf8Conv *preferred_charsets; - Utf8Conv last_charset = NULL; + XlcCharSet last_charset = NULL; wchar_t const *src; wchar_t const *srcend; unsigned char *dst; @@ -1301,11 +1350,12 @@ wcstocs(conv, from, from_left, to, to_left, args, num_args) unconv_num = 0; while (src < srcend && dst < dstend) { - Utf8Conv chosen_charset = NULL; /* FIXME: side */ + Utf8Conv chosen_charset = NULL; + XlcSide chosen_side = XlcNONE; wchar_t wc = *src; int count; - count = charset_wctocs(preferred_charsets, &chosen_charset, conv, dst, wc, dstend-dst); + count = charset_wctocs(preferred_charsets, &chosen_charset, &chosen_side, conv, dst, wc, dstend-dst); if (count == 0) break; if (count < 0) { @@ -1314,11 +1364,22 @@ wcstocs(conv, from, from_left, to, to_left, args, num_args) continue; } - if (last_charset != NULL && chosen_charset != last_charset) - break; + if (last_charset == NULL) { + last_charset = + _XlcGetCharSetWithSide(chosen_charset->name, chosen_side); + if (last_charset == NULL) { + src++; + unconv_num++; + continue; + } + } else { + if (!(last_charset->xrm_encoding_name == chosen_charset->xrm_name + && (last_charset->side == XlcGLGR + || last_charset->side == chosen_side))) + break; + } src++; dst += count; - last_charset = chosen_charset; } if (last_charset == NULL) @@ -1330,7 +1391,7 @@ wcstocs(conv, from, from_left, to, to_left, args, num_args) *to_left = dstend - dst; if (num_args >= 1) - *((XlcCharSet *)args[0]) = _XlcGetCharSet(last_charset->name); + *((XlcCharSet *)args[0]) = last_charset; return unconv_num; } @@ -1364,7 +1425,7 @@ wcstocs1(conv, from, from_left, to, to_left, args, num_args) int num_args; { Utf8Conv *preferred_charsets; - Utf8Conv last_charset = NULL; + XlcCharSet last_charset = NULL; wchar_t const *src; wchar_t const *srcend; unsigned char *dst; @@ -1382,11 +1443,12 @@ wcstocs1(conv, from, from_left, to, to_left, args, num_args) unconv_num = 0; while (src < srcend && dst < dstend) { - Utf8Conv chosen_charset = NULL; /* FIXME: side */ + Utf8Conv chosen_charset = NULL; + XlcSide chosen_side = XlcNONE; wchar_t wc = *src; int count; - count = charset_wctocs(preferred_charsets, &chosen_charset, conv, dst, wc, dstend-dst); + count = charset_wctocs(preferred_charsets, &chosen_charset, &chosen_side, conv, dst, wc, dstend-dst); if (count == 0) break; if (count < 0) { @@ -1395,11 +1457,22 @@ wcstocs1(conv, from, from_left, to, to_left, args, num_args) continue; } - if (last_charset != NULL && chosen_charset != last_charset) - break; + if (last_charset == NULL) { + last_charset = + _XlcGetCharSetWithSide(chosen_charset->name, chosen_side); + if (last_charset == NULL) { + src++; + unconv_num++; + continue; + } + } else { + if (!(last_charset->xrm_encoding_name == chosen_charset->xrm_name + && (last_charset->side == XlcGLGR + || last_charset->side == chosen_side))) + break; + } src++; dst += count; - last_charset = chosen_charset; break; } @@ -1412,7 +1485,7 @@ wcstocs1(conv, from, from_left, to, to_left, args, num_args) *to_left = dstend - dst; if (num_args >= 1) - *((XlcCharSet *)args[0]) = _XlcGetCharSet(last_charset->name); + *((XlcCharSet *)args[0]) = last_charset; return unconv_num; } diff --git a/xc/lib/X11/omGeneric.c b/xc/lib/X11/omGeneric.c index d982b534b..d2caa395f 100644 --- a/xc/lib/X11/omGeneric.c +++ b/xc/lib/X11/omGeneric.c @@ -31,7 +31,7 @@ * Modifier: Takanori Tateno FUJITSU LIMITED * */ -/* $XFree86: xc/lib/X11/omGeneric.c,v 3.13 2000/02/12 02:54:16 dawes Exp $ */ +/* $XFree86: xc/lib/X11/omGeneric.c,v 3.14 2000/02/29 03:09:04 dawes Exp $ */ /* * Fixed the algorithms in parse_fontname() and parse_fontdata() @@ -466,6 +466,7 @@ init_core_part(oc) continue; length += strlen(font_set->font_name) + 1; + count++; } if (count == 0) @@ -490,7 +491,7 @@ init_core_part(oc) font_set = gen->font_set; font_set_num = gen->font_set_num; - for (count = 0; font_set_num-- > 0; font_set++, count++) { + for (count = 0; font_set_num-- > 0; font_set++) { if (font_set->font_name == NULL) continue; @@ -503,6 +504,8 @@ init_core_part(oc) Xfree(font_set->font_name); *font_name_list++ = font_set->font_name = font_name_buf; font_name_buf += strlen(font_name_buf) + 1; + + count++; } set_fontset_extents(oc); diff --git a/xc/lib/XThrStub/UIThrStubs.c b/xc/lib/XThrStub/UIThrStubs.c index a22709148..6c764d2b5 100644 --- a/xc/lib/XThrStub/UIThrStubs.c +++ b/xc/lib/XThrStub/UIThrStubs.c @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/XThrStub/UIThrStubs.c,v 3.0 1995/11/02 00:27:07 dawes Exp $ + * $XFree86: xc/lib/XThrStub/UIThrStubs.c,v 3.1 2000/02/29 03:09:06 dawes Exp $ * * Copyright (c) 1995 David E. Wexelblat. All rights reserved * @@ -37,89 +37,149 @@ * specificies the thread library on the link line. */ -#include <thread.h> -#include <synch.h> +/* + * Modifications by Carlos A M dos Santos, XFree86 Project, November 1999. + * + * Explanation from <X11/Xos_r.h>: + * The structure below is complicated, mostly because P1003.1c (the + * IEEE POSIX Threads spec) went through lots of drafts, and some + * vendors shipped systems based on draft API that were changed later. + * Unfortunately POSIX did not provide a feature-test macro for + * distinguishing each of the drafts. + */ +#ifdef CTHREADS +#include <cthreads.h> +typedef cthread_t xthread_t; +#define xthread_self cthread_self +#pragma weak cthread_self = _Xthr_self_stub_ +#define xmutex_init mutex_init +#pragma weak mutex_init = _Xmutex_init_stub_ +#pragma weak mutex_clear = _Xmutex_destroy_stub_ +#pragma weak mutex_lock = _Xmutex_lock_stub_ +#pragma weak mutex_unlock = _Xmutex_unlock_stub_ +#pragma weak condition_init = _Xcond_init_stub_ +#pragma weak condition_clear = _Xcond_destroy_stub_ +#pragma weak condition_wait = _Xcond_wait_stub_ +#pragma weak condition_signal = _Xcond_signal_stub_ +#pragma weak condition_broadcast = _Xcond_signal_stub_ +#else /* !CTHREADS */ +#if defined(SVR4) && !defined(__sgi) +#include <thread.h> +typedef thread_t xthread_t; #pragma weak thr_self = _Xthr_self_stub_ -thread_t +#pragma weak mutex_init = _Xmutex_init_stub_ +#pragma weak mutex_destroy = _Xmutex_destroy_stub_ +#pragma weak mutex_lock = _Xmutex_lock_stub_ +#pragma weak mutex_unlock = _Xmutex_unlock_stub_ +#pragma weak cond_init = _Xcond_init_stub_ +#pragma weak cond_destroy = _Xcond_destroy_stub_ +#pragma weak cond_wait = _Xcond_wait_stub_ +#pragma weak cond_signal = _Xcond_signal_stub_ +#pragma weak cond_broadcast = _Xcond_signal_stub_ +#else /* !SVR4 */ +#ifdef WIN32 + /* + * Don't know what to do here. Is there something do be done at all? + */ +#else /* !WIN32 */ +#ifdef USE_TIS_SUPPORT +#include <tis.h> +typedef pthread_t xthread_t; +#pragma weak tis_self = _Xthr_self_stub_ +#pragma weak tis_mutex_init = _Xmutex_init_stub_ +#pragma weak tis_mutex_destroy = _Xmutex_destroy_stub_ +#pragma weak tis_mutex_lock = _Xmutex_lock_stub_ +#pragma weak tis_mutex_unlock = _Xmutex_unlock_stub_ +#pragma weak tis_cond_init = _Xcond_init_stub_ +#pragma weak tis_cond_destroy = _Xcond_destroy_stub_ +#pragma weak tis_cond_wait = _Xcond_wait_stub_ +#pragma weak tis_cond_signal = _Xcond_signal_stub_ +#pragma weak tis_cond_broadcast = _Xcond_signal_stub_ +#else +#include <pthread.h> +typedef pthread_t xthread_t; +#pragma weak pthread_self = _Xthr_self_stub_ +#pragma weak pthread_mutex_init = _Xmutex_init_stub_ +#pragma weak pthread_mutex_destroy = _Xmutex_destroy_stub_ +#pragma weak pthread_mutex_lock = _Xmutex_lock_stub_ +#pragma weak pthread_mutex_unlock = _Xmutex_unlock_stub_ +#pragma weak pthread_cond_init = _Xcond_init_stub_ +#pragma weak pthread_cond_destroy = _Xcond_destroy_stub_ +#pragma weak pthread_cond_wait = _Xcond_wait_stub_ +#pragma weak pthread_cond_signal = _Xcond_signal_stub_ +#pragma weak pthread_cond_broadcast = _Xcond_broadcast_stub_ +#if defined(_DECTHREADS_) || defined(linux) +#pragma weak pthread_equal = _Xthr_equal_stub_ /* See Xthreads.h! */ +int +_Xthr_equal_stub_() +{ + return(1); +} +#endif /* _DECTHREADS_ || linux */ +#endif /* USE_TIS_SUPPORT */ +#endif /* WIN32 */ +#endif /* SVR4 */ +#endif /* CTHREADS */ + +xthread_t _Xthr_self_stub_() { - return((thread_t)0); + static xthread_t _X_no_thread_id; + + return(_X_no_thread_id); /* defined by <X11/Xthreads.h> */ } -#pragma weak mutex_init = _Xmutex_init_stub_ int -_Xmutex_init_stub_(m, t, a) - mutex_t *m; - int t; - void *a; +_Xmutex_init_stub_() { return(0); } -#pragma weak mutex_destroy = _Xmutex_destroy_stub_ int -_Xmutex_destroy_stub_(m) - mutex_t *m; +_Xmutex_destroy_stub_() { return(0); } -#pragma weak mutex_lock = _Xmutex_lock_stub_ int -_Xmutex_lock_stub_(m) - mutex_t *m; +_Xmutex_lock_stub_() { return(0); } -#pragma weak mutex_unlock = _Xmutex_unlock_stub_ int -_Xmutex_unlock_stub_(m) - mutex_t *m; +_Xmutex_unlock_stub_() { return(0); } -#pragma weak cond_init = _Xcond_init_stub_ int -_Xcond_init_stub_(c, t, a) - cond_t *c; - int t; - void *a; +_Xcond_init_stub_() { return(0); } -#pragma weak cond_destroy = _Xcond_destroy_stub_ int -_Xcond_destroy_stub_(c) - cond_t *c; +_Xcond_destroy_stub_() { return(0); } -#pragma weak cond_wait = _Xcond_wait_stub_ int -_Xcond_wait_stub_(c,m) - cond_t *c; - mutex_t *m; +_Xcond_wait_stub_() { return(0); } -#pragma weak cond_signal = _Xcond_signal_stub_ int -_Xcond_signal_stub_(c) - cond_t *c; +_Xcond_signal_stub_() { return(0); } -#pragma weak cond_broadcast = _Xcond_broadcast_stub_ int -_Xcond_broadcast_stub_(c) - cond_t *c; +_Xcond_broadcast_stub_() { return(0); } diff --git a/xc/lib/Xaw/List.c b/xc/lib/Xaw/List.c index b82da0d0c..a0026fdc8 100644 --- a/xc/lib/Xaw/List.c +++ b/xc/lib/Xaw/List.c @@ -19,7 +19,7 @@ Except as contained in this notice, the name of The Open Group 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 Open Group. */ -/* $XFree86: xc/lib/Xaw/List.c,v 1.12 1999/12/30 02:12:50 robin Exp $ */ +/* $XFree86: xc/lib/Xaw/List.c,v 1.14 2000/02/25 23:20:46 dawes Exp $ */ /* * List.c - List widget @@ -242,6 +242,17 @@ static XtResource resources[] = { XtRCallback, NULL }, +#ifndef OLDXAW + { + XtNshowCurrent, + XtCBoolean, + XtRBoolean, + sizeof(Boolean), + offset(list.show_current), + XtRImmediate, + (XtPointer)False + }, +#endif }; #undef offset @@ -971,7 +982,14 @@ Notify(Widget w, XEvent *event, String *params, Cardinal *num_params) */ if ((CvtToItem(w, event->xbutton.x, event->xbutton.y, &item) == OUT_OF_RANGE) || lw->list.highlight != item) { +#ifndef OLDXAW + if (!lw->list.show_current || lw->list.selected == NO_HIGHLIGHT) + XawListUnhighlight(w); + else + XawListHighlight(w, lw->list.selected); +#else XawListUnhighlight(w); +#endif return; } @@ -980,6 +998,9 @@ Notify(Widget w, XEvent *event, String *params, Cardinal *num_params) if (lw->list.paste) /* if XtNpasteBuffer set then paste it */ XStoreBytes(XtDisplay(w), lw->list.list[item], item_len); +#ifndef OLDXAW + lw->list.selected = item; +#endif /* * Call Callback function */ @@ -1009,6 +1030,9 @@ Set(Widget w, XEvent *event, String *params, Cardinal *num_params) int item; ListWidget lw = (ListWidget)w; +#ifndef OLDXAW + lw->list.selected = lw->list.highlight; +#endif if (CvtToItem(w, event->xbutton.x, event->xbutton.y, &item) == OUT_OF_RANGE) XawListUnhighlight(w); /* Unhighlight current item */ else if (lw->list.is_highlighted != item) /* If this item is not */ diff --git a/xc/lib/Xaw/List.h b/xc/lib/Xaw/List.h index 642fd5926..3c695a18e 100644 --- a/xc/lib/Xaw/List.h +++ b/xc/lib/Xaw/List.h @@ -19,7 +19,7 @@ Except as contained in this notice, the name of The Open Group 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 Open Group. */ -/* $XFree86: xc/lib/Xaw/List.h,v 1.5 1999/05/03 12:15:40 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/List.h,v 1.6 2000/02/25 18:27:58 dawes Exp $ */ /* This is the List widget, it is useful to display a list, without the * overhead of having a widget for each item in the list. It allows @@ -122,6 +122,7 @@ in this Software without prior written authorization from The Open Group. #define XtNpasteBuffer "pasteBuffer" #define XtNrowSpacing "rowSpacing" #define XtNverticalList "verticalList" +#define XtNshowCurrent "showCurrent" #ifndef XtNfontSet #define XtNfontSet "fontSet" diff --git a/xc/lib/Xaw/ListP.h b/xc/lib/Xaw/ListP.h index a5ca1c56c..ad68726ac 100644 --- a/xc/lib/Xaw/ListP.h +++ b/xc/lib/Xaw/ListP.h @@ -19,7 +19,7 @@ Except as contained in this notice, the name of The Open Group 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 Open Group. */ -/* $XFree86: xc/lib/Xaw/ListP.h,v 1.6 1999/06/20 08:41:02 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/ListP.h,v 1.7 2000/02/25 18:27:58 dawes Exp $ */ /* @@ -95,7 +95,11 @@ typedef struct { int freedoms; /* flags for resizing height and width */ #ifndef OLDXAW - XtPointer pad[4]; /* for future use and keep binary compatability */ + int selected; + Boolean show_current; + char pad1[(sizeof(XtPointer) - sizeof(Boolean)) + + (sizeof(XtPointer) - sizeof(int))]; + XtPointer pad2[2]; /* for future use and keep binary compatability */ #endif } ListPart; diff --git a/xc/lib/Xext/Imakefile b/xc/lib/Xext/Imakefile index 4d5f93651..67b86be21 100644 --- a/xc/lib/Xext/Imakefile +++ b/xc/lib/Xext/Imakefile @@ -1,5 +1,5 @@ XCOMM $TOG: Imakefile /main/62 1997/11/24 16:48:16 kaleb $ -XCOMM $XFree86: xc/lib/Xext/Imakefile,v 1.9 1998/12/20 22:18:56 dawes Exp $ +XCOMM $XFree86: xc/lib/Xext/Imakefile,v 1.10 2000/02/27 23:10:03 mvojkovi Exp $ #define DoNormalLib NormalLibXext #define DoSharedLib SharedLibXext #define DoExtraLib SharedLibXext @@ -28,10 +28,10 @@ ALLOC_DEFINES = Malloc0ReturnsNullDefines INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) SRCS = globals.c extutil.c XMultibuf.c XShape.c $(SHMSRCS) \ MITMisc.c XTestExt1.c XSync.c Xdbe.c XLbx.c \ - XSecurity.c XAppgroup.c Xcup.c XPanoramiX.c DPMS.c XEVI.c + XSecurity.c XAppgroup.c Xcup.c DPMS.c XEVI.c OBJS = globals.o extutil.o XMultibuf.o XShape.o $(SHMOBJS) \ MITMisc.o XTestExt1.o XSync.o Xdbe.o XLbx.o \ - XSecurity.o XAppgroup.o Xcup.o XPanoramiX.o DPMS.o XEVI.o + XSecurity.o XAppgroup.o Xcup.o DPMS.o XEVI.o LINTLIBS = $(LINTXLIB) #include <Library.tmpl> diff --git a/xc/lib/Xfontcache/FontCache.c b/xc/lib/Xfontcache/FontCache.c index 0bf971feb..19cc66b3e 100644 --- a/xc/lib/Xfontcache/FontCache.c +++ b/xc/lib/Xfontcache/FontCache.c @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: FontCache.c,v 1.1.1.1 2000/02/22 15:40:07 kem Exp $ + * Id: FontCache.c,v 1.8 1999/01/31 12:52:49 akiyama Exp $ */ /* THIS IS NOT AN X CONSORTIUM STANDARD */ diff --git a/xc/lib/Xfontcache/Imakefile b/xc/lib/Xfontcache/Imakefile index f3aaa07be..8e534f12f 100644 --- a/xc/lib/Xfontcache/Imakefile +++ b/xc/lib/Xfontcache/Imakefile @@ -1,4 +1,4 @@ -XCOMM $Id: Imakefile,v 1.1.1.1 2000/02/22 15:40:07 kem Exp $ +XCOMM Id: Imakefile,v 1.3 1999/01/31 12:54:33 akiyama Exp $ #define DoNormalLib NormalLibXfontcache #define DoSharedLib SharedLibXfontcache diff --git a/xc/lib/Xinerama/Imakefile b/xc/lib/Xinerama/Imakefile new file mode 100644 index 000000000..1c4854f34 --- /dev/null +++ b/xc/lib/Xinerama/Imakefile @@ -0,0 +1,29 @@ +XCOMM $XFree86: xc/lib/Xinerama/Imakefile,v 1.2 2000/02/29 18:38:42 dawes Exp $ + +#define DoNormalLib NormalLibXinerama +#define DoSharedLib SharedLibXinerama +#define DoDebugLib DebugLibXinerama +#define DoProfileLib ProfileLibXinerama +#define LibName Xinerama +#define SoRev SOXINERAMAREV +#define LibHeaders NO + +#include <Threads.tmpl> + +#ifdef SharedXineramaReqs +REQUIREDLIBS = SharedXineramaReqs +#endif + +#if Malloc0ReturnsNull +ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL +#endif + + DEFINES = $(ALLOC_DEFINES) + INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) + SRCS = Xinerama.c + OBJS = Xinerama.o + LINTLIBS = $(LINTXLIB) + +#include <Library.tmpl> + +DependTarget() diff --git a/xc/lib/Xinerama/Xinerama.c b/xc/lib/Xinerama/Xinerama.c new file mode 100644 index 000000000..72970c613 --- /dev/null +++ b/xc/lib/Xinerama/Xinerama.c @@ -0,0 +1,315 @@ +/* $TOG: XPanoramiX.c /main/2 1997/11/16 08:45:41 kaleb $ */ +/**************************************************************** +* * +* Copyright (c) Digital Equipment Corporation, 1991, 1997 * +* * +* All Rights Reserved. Unpublished rights reserved under * +* the copyright laws of the United States. * +* * +* The software contained on this media is proprietary to * +* and embodies the confidential technology of Digital * +* Equipment Corporation. Possession, use, duplication or * +* dissemination of the software and media is authorized only * +* pursuant to a valid written license from Digital Equipment * +* Corporation. * +* * +* RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure * +* by the U.S. Government is subject to restrictions as set * +* forth in Subparagraph (c)(1)(ii) of DFARS 252.227-7013, * +* or in FAR 52.227-19, as applicable. * +* * +*****************************************************************/ +/* $XFree86: xc/lib/Xinerama/Xinerama.c,v 1.1 2000/02/27 23:10:04 mvojkovi Exp $ */ + +#define NEED_EVENTS +#define NEED_REPLIES +#include <X11/Xlibint.h> +#include <X11/Xutil.h> +#include "Xext.h" /* in ../include */ +#include "extutil.h" /* in ../include */ +#include "panoramiXext.h" +#include "panoramiXproto.h" /* in ../include */ +#include "Xinerama.h" + + +static XExtensionInfo _panoramiX_ext_info_data; +static XExtensionInfo *panoramiX_ext_info = &_panoramiX_ext_info_data; +static /* const */ char *panoramiX_extension_name = PANORAMIX_PROTOCOL_NAME; + +#define PanoramiXCheckExtension(dpy,i,val) \ + XextCheckExtension (dpy, i, panoramiX_extension_name, val) +#define PanoramiXSimpleCheckExtension(dpy,i) \ + XextSimpleCheckExtension (dpy, i, panoramiX_extension_name) + +static int close_display(); +static /* const */ XExtensionHooks panoramiX_extension_hooks = { + NULL, /* create_gc */ + NULL, /* copy_gc */ + NULL, /* flush_gc */ + NULL, /* free_gc */ + NULL, /* create_font */ + NULL, /* free_font */ + close_display, /* close_display */ + NULL, /* wire_to_event */ + NULL, /* event_to_wire */ + NULL, /* error */ + NULL, /* error_string */ +}; + +static XEXT_GENERATE_FIND_DISPLAY (find_display, panoramiX_ext_info, + panoramiX_extension_name, + &panoramiX_extension_hooks, + 0, NULL) + +static XEXT_GENERATE_CLOSE_DISPLAY (close_display, panoramiX_ext_info) + + + +/**************************************************************************** + * * + * PanoramiX public interfaces * + * * + ****************************************************************************/ + +Bool XPanoramiXQueryExtension ( + Display *dpy, + int *event_basep, + int *error_basep +) +{ + XExtDisplayInfo *info = find_display (dpy); + + if (XextHasExtension(info)) { + *event_basep = info->codes->first_event; + *error_basep = info->codes->first_error; + return True; + } else { + return False; + } +} + + +Status XPanoramiXQueryVersion( + Display *dpy, + int *major_versionp, + int *minor_versionp +) +{ + XExtDisplayInfo *info = find_display (dpy); + xPanoramiXQueryVersionReply rep; + register xPanoramiXQueryVersionReq *req; + + PanoramiXCheckExtension (dpy, info, 0); + + LockDisplay (dpy); + GetReq (PanoramiXQueryVersion, req); + req->reqType = info->codes->major_opcode; + req->panoramiXReqType = X_PanoramiXQueryVersion; + req->clientMajor = PANORAMIX_MAJOR_VERSION; + req->clientMinor = PANORAMIX_MINOR_VERSION; + if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { + UnlockDisplay (dpy); + SyncHandle (); + return 0; + } + *major_versionp = rep.majorVersion; + *minor_versionp = rep.minorVersion; + UnlockDisplay (dpy); + SyncHandle (); + return 1; +} + +XPanoramiXInfo *XPanoramiXAllocInfo(void) +{ + return (XPanoramiXInfo *) Xmalloc (sizeof (XPanoramiXInfo)); +} + +Status XPanoramiXGetState ( + Display *dpy, + Drawable drawable, + XPanoramiXInfo *panoramiX_info +) +{ + XExtDisplayInfo *info = find_display (dpy); + xPanoramiXGetStateReply rep; + register xPanoramiXGetStateReq *req; + + PanoramiXCheckExtension (dpy, info, 0); + + LockDisplay (dpy); + GetReq (PanoramiXGetState, req); + req->reqType = info->codes->major_opcode; + req->panoramiXReqType = X_PanoramiXGetState; + req->window = drawable; + if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { + UnlockDisplay (dpy); + SyncHandle (); + return 0; + } + UnlockDisplay (dpy); + SyncHandle (); + panoramiX_info->window = rep.window; + panoramiX_info->State = rep.state; + return 1; +} + +Status XPanoramiXGetScreenCount ( + Display *dpy, + Drawable drawable, + XPanoramiXInfo *panoramiX_info +) +{ + XExtDisplayInfo *info = find_display (dpy); + xPanoramiXGetScreenCountReply rep; + register xPanoramiXGetScreenCountReq *req; + + PanoramiXCheckExtension (dpy, info, 0); + + LockDisplay (dpy); + GetReq (PanoramiXGetScreenCount, req); + req->reqType = info->codes->major_opcode; + req->panoramiXReqType = X_PanoramiXGetScreenCount; + req->window = drawable; + if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { + UnlockDisplay (dpy); + SyncHandle (); + return 0; + } + UnlockDisplay (dpy); + SyncHandle (); + panoramiX_info->window = rep.window; + panoramiX_info->ScreenCount = rep.ScreenCount; + return 1; +} + +Status XPanoramiXGetScreenSize ( + Display *dpy, + Drawable drawable, + int screen_num, + XPanoramiXInfo *panoramiX_info +) +{ + XExtDisplayInfo *info = find_display (dpy); + xPanoramiXGetScreenSizeReply rep; + register xPanoramiXGetScreenSizeReq *req; + + PanoramiXCheckExtension (dpy, info, 0); + + LockDisplay (dpy); + GetReq (PanoramiXGetScreenSize, req); + req->reqType = info->codes->major_opcode; + req->panoramiXReqType = X_PanoramiXGetScreenSize; + req->window = drawable; + req->screen = screen_num; /* need to define */ + if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { + UnlockDisplay (dpy); + SyncHandle (); + return 0; + } + UnlockDisplay (dpy); + SyncHandle (); + panoramiX_info->window = rep.window; + panoramiX_info->screen = rep.screen; + panoramiX_info->width = rep.width; + panoramiX_info->height = rep.height; + return 1; +} + +/*******************************************************************\ + Alternate interface to make up for shortcomings in the original, + namely, the omission of the screen origin. The new interface is + in the "Xinerama" namespace instead of "PanoramiX". +\*******************************************************************/ + +Bool XineramaQueryExtension ( + Display *dpy, + int *event_base, + int *error_base +) +{ + return XPanoramiXQueryExtension(dpy, event_base, error_base); +} + +Status XineramaQueryVersion( + Display *dpy, + int *major, + int *minor +) +{ + return XPanoramiXQueryVersion(dpy, major, minor); +} + +Bool XineramaIsActive(Display *dpy) +{ + xXineramaIsActiveReply rep; + xXineramaIsActiveReq *req; + XExtDisplayInfo *info = find_display (dpy); + + if(!XextHasExtension(info)) + return False; /* server doesn't even have the extension */ + + LockDisplay (dpy); + GetReq (XineramaIsActive, req); + req->reqType = info->codes->major_opcode; + req->panoramiXReqType = X_XineramaIsActive; + if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { + UnlockDisplay (dpy); + SyncHandle (); + return False; + } + UnlockDisplay (dpy); + SyncHandle (); + return rep.state; +} + +#include <stdio.h> + +XineramaScreenInfo * +XineramaQueryScreens( + Display *dpy, + int *number +) +{ + XExtDisplayInfo *info = find_display (dpy); + xXineramaQueryScreensReply rep; + xXineramaQueryScreensReq *req; + XineramaScreenInfo *scrnInfo = NULL; + + PanoramiXCheckExtension (dpy, info, 0); + + LockDisplay (dpy); + GetReq (XineramaQueryScreens, req); + req->reqType = info->codes->major_opcode; + req->panoramiXReqType = X_XineramaQueryScreens; + if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) { + UnlockDisplay (dpy); + SyncHandle (); + return NULL; + } + + if(rep.number) { + if((scrnInfo = Xmalloc(sizeof(XineramaScreenInfo) * rep.number))) { + xXineramaScreenInfo scratch; + int i; + + for(i = 0; i < rep.number; i++) { + _XRead(dpy, (char*)(&scratch), sz_XineramaScreenInfo); + scrnInfo[i].screen_number = i; + scrnInfo[i].x_org = scratch.x_org; + scrnInfo[i].y_org = scratch.y_org; + scrnInfo[i].width = scratch.width; + scrnInfo[i].height = scratch.height; + } + + *number = rep.number; + } else + _XEatData(dpy, rep.length << 2); + } + + UnlockDisplay (dpy); + SyncHandle (); + return scrnInfo; +} + + + diff --git a/xc/lib/Xv/Xv.c b/xc/lib/Xv/Xv.c index deed9b077..45f56d36b 100644 --- a/xc/lib/Xv/Xv.c +++ b/xc/lib/Xv/Xv.c @@ -21,7 +21,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xv/Xv.c,v 1.11 2000/01/26 22:05:46 tsi Exp $ */ +/* $XFree86: xc/lib/Xv/Xv.c,v 1.12 2000/03/03 20:51:09 mvojkovi Exp $ */ /* ** File: ** @@ -91,10 +91,9 @@ XvQueryExtension( /* READ THE REPLY */ - if (_XReply(dpy, (xReply *)&rep, 0, xFalse) == 0) + if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); + POSTAMBLE; return(XvBadExtension); } @@ -104,6 +103,8 @@ XvQueryExtension( *p_eventBase = _XvCodes->first_event; *p_errorBase = _XvCodes->first_error; + POSTAMBLE; + return Success; } @@ -138,16 +139,14 @@ XvQueryAdaptors( if (_XReply(dpy, (xReply *)&rep, 0, xFalse) == 0) { - UnlockDisplay(dpy); - SyncHandle(); + POSTAMBLE; return(XvBadReply); } size = rep.length << 2; if ( (buffer = (char *)Xmalloc ((unsigned) size)) == NULL) { - UnlockDisplay(dpy); - SyncHandle(); + POSTAMBLE; return(XvBadAlloc); } _XRead (dpy, buffer, size); @@ -160,8 +159,7 @@ XvQueryAdaptors( if ((pas=(XvAdaptorInfo *)Xmalloc(size))==NULL) { Xfree(buffer); - UnlockDisplay(dpy); - SyncHandle(); + POSTAMBLE; return(XvBadAlloc); } @@ -193,8 +191,7 @@ XvQueryAdaptors( { XvFreeAdaptorInfo(pas); Xfree(buffer); - UnlockDisplay(dpy); - SyncHandle(); + POSTAMBLE; return(XvBadAlloc); } (void)strncpy(name, u.string, size); @@ -210,8 +207,7 @@ XvQueryAdaptors( { XvFreeAdaptorInfo(pas); Xfree(buffer); - UnlockDisplay(dpy); - SyncHandle(); + POSTAMBLE; return(XvBadAlloc); } @@ -295,16 +291,14 @@ XvQueryEncodings( if (_XReply(dpy, (xReply *)&rep, 0, xFalse) == 0) { - UnlockDisplay(dpy); - SyncHandle(); + POSTAMBLE; return(XvBadReply); } size = rep.length << 2; if ( (buffer = (char *)Xmalloc ((unsigned) size)) == NULL) { - UnlockDisplay(dpy); - SyncHandle(); + POSTAMBLE; return(XvBadAlloc); } _XRead (dpy, buffer, size); @@ -317,8 +311,7 @@ XvQueryEncodings( if ( (pes = (XvEncodingInfo *)Xmalloc(size)) == NULL) { Xfree(buffer); - UnlockDisplay(dpy); - SyncHandle(); + POSTAMBLE; return(XvBadAlloc); } @@ -348,8 +341,7 @@ XvQueryEncodings( if ( (name = (char *)Xmalloc(size+1)) == NULL) { Xfree(buffer); - UnlockDisplay(dpy); - SyncHandle(); + POSTAMBLE; return(XvBadAlloc); } strncpy(name, u.string, size); @@ -673,8 +665,7 @@ XvGetPortAttribute (dpy, port, attribute, p_value) if (_XReply(dpy, (xReply *)&rep, 0, xFalse) == 0) { - UnlockDisplay(dpy); - SyncHandle(); + POSTAMBLE; return(XvBadReply); } @@ -712,8 +703,7 @@ XvQueryBestSize(dpy, port, motion, vid_w, vid_h, drw_w, drw_h, if (_XReply(dpy, (xReply *)&rep, 0, xFalse) == 0) { - UnlockDisplay(dpy); - SyncHandle(); + POSTAMBLE; return(XvBadReply); } @@ -743,8 +733,7 @@ XvQueryPortAttributes(Display *dpy, XvPortID port, int *num) /* READ THE REPLY */ if (_XReply(dpy, (xReply *)&rep, 0, xFalse) == 0) { - UnlockDisplay(dpy); - SyncHandle(); + POSTAMBLE; return ret; } @@ -794,8 +783,7 @@ XvImageFormatValues * XvListImageFormats ( /* READ THE REPLY */ if (_XReply(dpy, (xReply *)&rep, 0, xFalse) == 0) { - UnlockDisplay(dpy); - SyncHandle(); + POSTAMBLE; return NULL; } @@ -863,9 +851,8 @@ XvImage * XvCreateImage ( /* READ THE REPLY */ - if (_XReply(dpy, (xReply *)&rep, 0, xFalse) == 0) { - UnlockDisplay(dpy); - SyncHandle(); + if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { + POSTAMBLE; return NULL; } diff --git a/xc/lib/Xxf86rush/XF86Rush.c b/xc/lib/Xxf86rush/XF86Rush.c index 6281b1742..5caba014d 100644 --- a/xc/lib/Xxf86rush/XF86Rush.c +++ b/xc/lib/Xxf86rush/XF86Rush.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/Xxf86rush/XF86Rush.c,v 1.3 2000/02/11 22:35:45 dawes Exp $ */ +/* $XFree86: xc/lib/Xxf86rush/XF86Rush.c,v 1.4 2000/02/29 03:09:06 dawes Exp $ */ /* Copyright (c) 1998 Daryll Strauss @@ -221,3 +221,71 @@ int XF86RushOverlayPixmap (Display *dpy, XvPortID port, Drawable d, SyncHandle(); return Success; } + +int XF86RushStatusRegOffset (Display *dpy, int screen) +{ + XExtDisplayInfo *info = find_display(dpy); + xXF86RushStatusRegOffsetReq *req; + xXF86RushStatusRegOffsetReply rep; + + XF86RushCheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(XF86RushStatusRegOffset, req); + + req->reqType = info->codes->major_opcode; + req->rushReqType = X_XF86RushStatusRegOffset; + req->screen = screen; + + if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { + UnlockDisplay(dpy); + SyncHandle(); + return False; + } + + UnlockDisplay(dpy); + SyncHandle(); + return rep.offset; +} + +Bool XF86RushAT3DEnableRegs (Display *dpy, int screen) +{ + XExtDisplayInfo *info = find_display(dpy); + xXF86RushAT3DEnableRegsReq *req; + + XF86RushCheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(XF86RushAT3DEnableRegs, req); + + req->reqType = info->codes->major_opcode; + req->rushReqType = X_XF86RushAT3DEnableRegs; + req->screen = screen; + + UnlockDisplay(dpy); + SyncHandle(); + /* + * The request has to be processed to stay in sync... + */ + XSync(dpy, False); + return Success; +} + +Bool XF86RushAT3DDisableRegs (Display *dpy, int screen) +{ + XExtDisplayInfo *info = find_display(dpy); + xXF86RushAT3DDisableRegsReq *req; + + XF86RushCheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(XF86RushAT3DDisableRegs, req); + + req->reqType = info->codes->major_opcode; + req->rushReqType = X_XF86RushAT3DDisableRegs; + req->screen = screen; + + UnlockDisplay(dpy); + SyncHandle(); + return Success; +} diff --git a/xc/lib/dps/Imakefile b/xc/lib/dps/Imakefile index d2d003921..17dfefceb 100644 --- a/xc/lib/dps/Imakefile +++ b/xc/lib/dps/Imakefile @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/dps/Imakefile,v 1.6 2000/02/16 15:34:27 dawes Exp $ +XCOMM $XFree86: xc/lib/dps/Imakefile,v 1.7 2000/02/24 05:36:39 tsi Exp $ #define DoNormalLib NormalLibDps #define DoSharedLib SharedLibDps @@ -276,7 +276,8 @@ ProgramTargetName($(PSWRAP)): HEADERS = psops.h dpsops.h -all :: psops.h dpsops.h +all :: $(HEADERS) +depend :: $(HEADERS) psops.h : $(PSOPSHEADERFILES) $(PSOPSANSIHEADERFILES) $(RM) $@ diff --git a/xc/lib/font/FreeType/ftfuncs.c b/xc/lib/font/FreeType/ftfuncs.c index 77550c101..a84fa6371 100644 --- a/xc/lib/font/FreeType/ftfuncs.c +++ b/xc/lib/font/FreeType/ftfuncs.c @@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/* $XFree86: xc/lib/font/FreeType/ftfuncs.c,v 1.12 1999/10/13 04:20:49 dawes Exp $ */ +/* $XFree86: xc/lib/font/FreeType/ftfuncs.c,v 1.13 2000/02/25 18:27:59 dawes Exp $ */ #include <string.h> @@ -860,7 +860,7 @@ FreeTypeAddProperties(TTFFont *font, FontScalablePtr vals, FontInfoPtr info, 3+ /* from `name' table */ (os2Props?6:0)+ /* from `os/2' table */ (postProps?3:0)+ /* from `post' table */ - 1; /* type */ + 2; /* type */ if ((info->props = (FontPropPtr)xalloc(maxprops * sizeof(FontPropRec))) == 0) @@ -1052,6 +1052,10 @@ FreeTypeAddProperties(TTFFont *font, FontScalablePtr vals, FontInfoPtr info, info->props[i].value = MakeAtom("TrueType", 8, TRUE); i++; + info->props[i].name = MakeAtom("RASTERIZER_NAME", 15, TRUE); + info->props[i].value = MakeAtom("FreeType", 8, TRUE); + i++; + info->nprops=i; return Successful; } diff --git a/xc/lib/font/Speedo/spinfo.c b/xc/lib/font/Speedo/spinfo.c index 718e783cd..e816f30ec 100644 --- a/xc/lib/font/Speedo/spinfo.c +++ b/xc/lib/font/Speedo/spinfo.c @@ -45,7 +45,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/Speedo/spinfo.c,v 1.8 1999/03/14 11:17:43 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/spinfo.c,v 1.9 2000/02/25 18:28:00 dawes Exp $ */ #include "fntfilst.h" #include "fontutil.h" @@ -97,7 +97,9 @@ static fontProp extraProps[] = { { "RAW_POINT_SIZE", 0, }, { "RAW_ASCENT", 0, }, { "RAW_DESCENT", 0, }, - { "RAW_AVERAGE_WIDTH", 0, } + { "RAW_AVERAGE_WIDTH", 0, }, + { "FONT_TYPE", 0, }, + { "RASTERIZER_NAME", 0, } }; /* this is a bit kludgy */ @@ -108,7 +110,8 @@ static fontProp extraProps[] = { #define RAWASCENTPROP 4 #define RAWDESCENTPROP 5 #define RAWWIDTHPROP 6 - +#define FONT_TYPEPROP 7 +#define RASTERIZER_NAMEPROP 8 #define NNAMEPROPS (sizeof(fontNamePropTable) / sizeof(fontProp)) #define NEXTRAPROPS (sizeof(extraProps) / sizeof(fontProp)) @@ -418,6 +421,16 @@ sp_compute_props( pp->value = MakeAtom(spf->master->copyright, strlen(spf->master->copyright), TRUE); break; + case FONT_TYPEPROP: + *is_str = TRUE; + pp->value = MakeAtom("Speedo", strlen("Speedo"), TRUE); + break; + case RASTERIZER_NAMEPROP: + *is_str = TRUE; + pp->value = MakeAtom("X Consortium Speedo Rasterizer", + strlen("X Consortium Speedo Rasterizer"), + TRUE); + break; case RAWPIXELPROP: *is_str = FALSE; pp->value = 1000; diff --git a/xc/lib/font/Type1/t1info.c b/xc/lib/font/Type1/t1info.c index f8d48a50e..57d671999 100644 --- a/xc/lib/font/Type1/t1info.c +++ b/xc/lib/font/Type1/t1info.c @@ -95,7 +95,7 @@ from The Open Group. * The Original Software is CID font code that was developed by Silicon * Graphics, Inc. */ -/* $XFree86: xc/lib/font/Type1/t1info.c,v 1.13 1999/08/21 13:47:48 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/t1info.c,v 1.14 2000/02/25 18:28:00 dawes Exp $ */ #include "fntfilst.h" #include "fontutil.h" @@ -195,7 +195,9 @@ static fontProp extraProps[] = { { "RAW_ASCENT", 0, }, { "RAW_DESCENT", 0, }, { "RAW_AVERAGE_WIDTH", 0, }, - { "FACE_NAME", 0, } + { "FACE_NAME", 0, }, + { "FONT_TYPE", 0, }, + { "RASTERIZER_NAME", 0, } }; /* this is a bit kludgy */ @@ -207,6 +209,8 @@ static fontProp extraProps[] = { #define RAWDESCENTPROP 5 #define RAWWIDTHPROP 6 #define FACE_NAMEPROP 7 +#define FONT_TYPEPROP 8 +#define RASTERIZER_NAMEPROP 9 #define NNAMEPROPS (sizeof(fontNamePropTable) / sizeof(fontProp)) #define NEXTRAPROPS (sizeof(extraProps) / sizeof(fontProp)) @@ -690,6 +694,16 @@ CIDComputeStdProps(FontInfoPtr pInfo, FontScalablePtr Vals, } pp->value = MakeAtom(infostrP, strlen(infostrP), TRUE); break; + case FONT_TYPEPROP: + *is_str = TRUE; + infostrP = "CIDFont"; + pp->value = MakeAtom(infostrP, strlen(infostrP), TRUE); + break; + case RASTERIZER_NAMEPROP: + *is_str = TRUE; + infostrP = "X Consortium Type 1 Rasterizer"; + pp->value = MakeAtom(infostrP, strlen(infostrP), TRUE); + break; case RAWPIXELPROP: *is_str = FALSE; pp->value = 1000; @@ -818,6 +832,16 @@ ComputeStdProps(FontInfoPtr pInfo, FontScalablePtr Vals, } pp->value = MakeAtom(infostrP, strlen(infostrP), TRUE); break; + case FONT_TYPEPROP: + *is_str = TRUE; + infostrP = "Type 1"; + pp->value = MakeAtom(infostrP, strlen(infostrP), TRUE); + break; + case RASTERIZER_NAMEPROP: + *is_str = TRUE; + infostrP = "X Consortium Type 1 Rasterizer"; + pp->value = MakeAtom(infostrP, strlen(infostrP), TRUE); + break; case RAWPIXELPROP: *is_str = FALSE; pp->value = 1000; diff --git a/xc/lib/font/builtins/builtin.h b/xc/lib/font/builtins/builtin.h index bac99a43b..caee81caa 100644 --- a/xc/lib/font/builtins/builtin.h +++ b/xc/lib/font/builtins/builtin.h @@ -1,5 +1,5 @@ /* - * $Id: builtin.h,v 1.1.1.1 2000/01/06 12:44:21 faith Exp $ + * Id: builtin.h,v 1.2 1999/11/02 06:16:47 keithp Exp $ * * Copyright 1999 SuSE, Inc. * @@ -22,7 +22,7 @@ * * Author: Keith Packard, SuSE, Inc. */ -/* $XFree86: xc/lib/font/builtins/builtin.h,v 1.3 1999/12/30 02:29:49 robin Exp $ */ +/* $XFree86: xc/lib/font/builtins/builtin.h,v 1.4 2000/02/23 20:29:33 dawes Exp $ */ #include <X11/Xdefs.h> #include <font.h> diff --git a/xc/lib/font/builtins/dir.c b/xc/lib/font/builtins/dir.c index f998aced6..c657710a3 100644 --- a/xc/lib/font/builtins/dir.c +++ b/xc/lib/font/builtins/dir.c @@ -1,5 +1,5 @@ /* - * $Id: dir.c,v 1.1.1.1 2000/01/06 12:44:21 faith Exp $ + * Id: dir.c,v 1.2 1999/11/02 06:16:47 keithp Exp $ * * Copyright 1999 SuSE, Inc. * @@ -22,7 +22,7 @@ * * Author: Keith Packard, SuSE, Inc. */ -/* $XFree86: xc/lib/font/builtins/dir.c,v 1.3 1999/12/30 02:29:49 robin Exp $ */ +/* $XFree86: xc/lib/font/builtins/dir.c,v 1.4 2000/02/23 20:29:33 dawes Exp $ */ #include "builtin.h" diff --git a/xc/lib/font/builtins/file.c b/xc/lib/font/builtins/file.c index c80f730ac..6fcaa79e3 100644 --- a/xc/lib/font/builtins/file.c +++ b/xc/lib/font/builtins/file.c @@ -1,5 +1,5 @@ /* - * $Id: file.c,v 1.1.1.1 2000/01/06 12:44:21 faith Exp $ + * Id: file.c,v 1.2 1999/11/02 06:16:47 keithp Exp $ * * Copyright 1999 SuSE, Inc. * @@ -22,7 +22,7 @@ * * Author: Keith Packard, SuSE, Inc. */ -/* $XFree86: xc/lib/font/builtins/file.c,v 1.3 1999/12/30 02:29:49 robin Exp $ */ +/* $XFree86: xc/lib/font/builtins/file.c,v 1.4 2000/02/23 20:29:33 dawes Exp $ */ #include "builtin.h" diff --git a/xc/lib/font/builtins/fonts.c b/xc/lib/font/builtins/fonts.c index e98e26fc7..cc7928eb5 100644 --- a/xc/lib/font/builtins/fonts.c +++ b/xc/lib/font/builtins/fonts.c @@ -1,5 +1,5 @@ /* - * $Id: fonts.c,v 1.1.1.1 2000/01/06 12:44:24 faith Exp $ + * Id: fonts.c,v 1.2 1999/11/02 06:16:47 keithp Exp $ * * Copyright 1999 SuSE, Inc. * @@ -22,7 +22,7 @@ * * Author: Keith Packard, SuSE, Inc. */ -/* $XFree86: xc/lib/font/builtins/fonts.c,v 1.3 1999/12/30 02:29:49 robin Exp $ */ +/* $XFree86: xc/lib/font/builtins/fonts.c,v 1.4 2000/02/23 20:29:34 dawes Exp $ */ #include "builtin.h" diff --git a/xc/lib/font/builtins/fpe.c b/xc/lib/font/builtins/fpe.c index 7ed3121e5..d96fc3d5b 100644 --- a/xc/lib/font/builtins/fpe.c +++ b/xc/lib/font/builtins/fpe.c @@ -1,5 +1,5 @@ /* - * $Id: fpe.c,v 1.1.1.1 2000/01/06 12:44:24 faith Exp $ + * Id: fpe.c,v 1.2 1999/11/02 06:16:48 keithp Exp $ * * Copyright 1999 SuSE, Inc. * @@ -22,7 +22,7 @@ * * Author: Keith Packard, SuSE, Inc. */ -/* $XFree86: xc/lib/font/builtins/fpe.c,v 1.3 1999/12/30 02:29:51 robin Exp $ */ +/* $XFree86: xc/lib/font/builtins/fpe.c,v 1.4 2000/02/23 20:29:36 dawes Exp $ */ #include "fntfilst.h" diff --git a/xc/lib/font/builtins/render.c b/xc/lib/font/builtins/render.c index 04752dbb6..5f63c66ee 100644 --- a/xc/lib/font/builtins/render.c +++ b/xc/lib/font/builtins/render.c @@ -1,5 +1,5 @@ /* - * $Id: render.c,v 1.1.1.1 2000/01/06 12:44:24 faith Exp $ + * Id: render.c,v 1.2 1999/11/02 06:16:48 keithp Exp $ * * Copyright 1999 SuSE, Inc. * @@ -22,7 +22,7 @@ * * Author: Keith Packard, SuSE, Inc. */ -/* $XFree86: xc/lib/font/builtins/render.c,v 1.3 1999/12/30 02:29:51 robin Exp $ */ +/* $XFree86: xc/lib/font/builtins/render.c,v 1.4 2000/02/23 20:29:36 dawes Exp $ */ #include "fntfilst.h" #include "builtin.h" diff --git a/xc/lib/font/fontcache/Imakefile b/xc/lib/font/fontcache/Imakefile index d840fe597..733a435e0 100644 --- a/xc/lib/font/fontcache/Imakefile +++ b/xc/lib/font/fontcache/Imakefile @@ -1,4 +1,4 @@ -XCOMM $Id: Imakefile,v 1.1.1.1 2000/02/22 15:40:33 kem Exp $ +XCOMM Id: Imakefile,v 1.2 1999/01/31 13:02:46 akiyama Exp $ #include <Server.tmpl> #if BuildFontCache diff --git a/xc/lib/font/fontcache/fcqueue.h b/xc/lib/font/fontcache/fcqueue.h index 898a95873..58ba6dfa1 100644 --- a/xc/lib/font/fontcache/fcqueue.h +++ b/xc/lib/font/fontcache/fcqueue.h @@ -40,7 +40,7 @@ * /usr/include/sys/queue.h, modified for X-TrueType Server by * Shunsuke Akiyama <akiyama@jp.FreeBSD.org>. * - * $Id: fcqueue.h,v 1.1.1.1 2000/02/22 15:40:34 kem Exp $ + * Id: fcqueue.h,v 1.1 1999/01/06 13:36:42 akiyama Exp $ */ #ifndef _FCQUEUE_H_ diff --git a/xc/lib/font/fontcache/fontcache.c b/xc/lib/font/fontcache/fontcache.c index b1a559da0..98160f49f 100644 --- a/xc/lib/font/fontcache/fontcache.c +++ b/xc/lib/font/fontcache/fontcache.c @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: fontcache.c,v 1.1.1.1 2000/02/22 15:40:34 kem Exp $ + * Id: fontcache.c,v 1.19 1999/01/31 13:06:00 akiyama Exp $ */ #include <stdio.h> diff --git a/xc/lib/font/fontcache/fontcache.h b/xc/lib/font/fontcache/fontcache.h index cfee98d86..06093f4c0 100644 --- a/xc/lib/font/fontcache/fontcache.h +++ b/xc/lib/font/fontcache/fontcache.h @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: fontcache.h,v 1.1.1.1 2000/02/22 15:40:34 kem Exp $ + * Id: fontcache.h,v 1.12 1999/01/09 06:24:30 akiyama Exp $ */ #ifndef _FONTCACHE_H_ |