summaryrefslogtreecommitdiff
path: root/xc
diff options
context:
space:
mode:
authorjhartmann <jhartmann>2000-03-15 21:31:47 +0000
committerjhartmann <jhartmann>2000-03-15 21:31:47 +0000
commitdc1f830cec321077c6323a297db166a05af620d7 (patch)
treebded38a2cbc6d2f9e8dc8cfe55af3274b2b1a456 /xc
parent3033c9bfc1f7d29d3c87214d33cb9c5a5bbd22f9 (diff)
Import of XFree86 4.0
Diffstat (limited to 'xc')
-rw-r--r--xc/config/cf/Imake.rules14
-rw-r--r--xc/config/cf/Imake.tmpl39
-rw-r--r--xc/config/cf/NetBSD.cf3
-rw-r--r--xc/config/cf/OpenBSD.cf26
-rw-r--r--xc/config/cf/X11.tmpl42
-rw-r--r--xc/config/cf/gnu.cf4
-rw-r--r--xc/config/cf/linux.cf45
-rw-r--r--xc/config/cf/lnxdoc.rules4
-rw-r--r--xc/config/cf/svr3.cf6
-rw-r--r--xc/config/cf/xf86site.def53
-rw-r--r--xc/config/cf/xfree86.cf154
-rw-r--r--xc/config/pswrap/pswrap.man2
-rw-r--r--xc/include/GL/Imakefile8
-rw-r--r--xc/include/GL/glx.h28
-rw-r--r--xc/include/Xmd.h4
-rw-r--r--xc/include/extensions/Imakefile11
-rw-r--r--xc/include/extensions/Xinerama.h44
-rw-r--r--xc/include/extensions/fontcache.h2
-rw-r--r--xc/include/extensions/fontcacheP.h5
-rw-r--r--xc/include/extensions/fontcachstr.h2
-rw-r--r--xc/include/extensions/panoramiXext.h3
-rw-r--r--xc/include/extensions/panoramiXproto.h58
-rw-r--r--xc/include/extensions/xf86bigfstr.h15
-rw-r--r--xc/include/extensions/xf86rush.h26
-rw-r--r--xc/include/extensions/xf86rushstr.h43
-rw-r--r--xc/lib/GL/Imakefile31
-rw-r--r--xc/lib/GL/dri/XF86dri.c3
-rw-r--r--xc/lib/GL/dri/dri_glx.c174
-rw-r--r--xc/lib/GL/dri/dri_tmm.c3
-rw-r--r--xc/lib/GL/dri/dri_tmm.h3
-rw-r--r--xc/lib/GL/dri/drm/Imakefile3
-rw-r--r--xc/lib/GL/dri/xf86dri.h3
-rw-r--r--xc/lib/GL/dri/xf86dristr.h3
-rw-r--r--xc/lib/GL/glx/glxclient.h4
-rw-r--r--xc/lib/GL/glx/glxcmds.c160
-rw-r--r--xc/lib/GL/glx/indirect_init.c12
-rw-r--r--xc/lib/GL/glx/xfont.c2
-rw-r--r--xc/lib/GL/mesa/dri/Imakefile3
-rw-r--r--xc/lib/GL/mesa/dri/dri_mesa.c12
-rw-r--r--xc/lib/GL/mesa/dri/dri_mesa.h5
-rw-r--r--xc/lib/GL/mesa/dri/dri_mesaint.h3
-rw-r--r--xc/lib/GL/mesa/dri/dri_xmesaapi.h3
-rw-r--r--xc/lib/GL/mesa/include/GL/Imakefile4
-rw-r--r--xc/lib/GL/mesa/src/Imakefile4
-rw-r--r--xc/lib/GL/mesa/src/X/Imakefile3
-rw-r--r--xc/lib/GL/mesa/src/X86/Imakefile4
-rw-r--r--xc/lib/GL/mesa/src/drv/Imakefile5
-rw-r--r--xc/lib/GL/mesa/src/drv/common/Imakefile1
-rw-r--r--xc/lib/GL/mesa/src/drv/gamma/Imakefile12
-rw-r--r--xc/lib/GL/mesa/src/drv/gamma/gamma_client.h3
-rw-r--r--xc/lib/GL/mesa/src/drv/gamma/gamma_gl.c1054
-rw-r--r--xc/lib/GL/mesa/src/drv/gamma/gamma_gl.h351
-rw-r--r--xc/lib/GL/mesa/src/drv/gamma/gamma_init.c3
-rw-r--r--xc/lib/GL/mesa/src/drv/gamma/gamma_init.h3
-rw-r--r--xc/lib/GL/mesa/src/drv/gamma/gamma_inithw.c3
-rw-r--r--xc/lib/GL/mesa/src/drv/gamma/gamma_macros.h3
-rw-r--r--xc/lib/GL/mesa/src/drv/gamma/gamma_matrix.c3
-rw-r--r--xc/lib/GL/mesa/src/drv/gamma/gamma_region.h3
-rw-r--r--xc/lib/GL/mesa/src/drv/gamma/gamma_regs.h3
-rw-r--r--xc/lib/GL/mesa/src/drv/gamma/gamma_texture.c3
-rw-r--r--xc/lib/GL/mesa/src/drv/gamma/gamma_texture.h3
-rw-r--r--xc/lib/GL/mesa/src/drv/gamma/gamma_xmesa.c31
-rw-r--r--xc/lib/GL/mesa/src/drv/i810/Imakefile1
-rw-r--r--xc/lib/GL/mesa/src/drv/i810/i810_init.h1
-rw-r--r--xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c1
-rw-r--r--xc/lib/GL/mesa/src/drv/mga/Imakefile1
-rw-r--r--xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c1
-rw-r--r--xc/lib/GL/mesa/src/drv/mga/mga_xmesa.h1
-rw-r--r--xc/lib/GL/mesa/src/drv/tdfx/Imakefile2
-rw-r--r--xc/lib/GL/mesa/src/drv/tdfx/tdfx_init.c1
-rw-r--r--xc/lib/GL/mesa/src/drv/tdfx/tdfx_init.h1
-rw-r--r--xc/lib/GL/mesa/src/drv/tdfx/tdfx_inithw.c1
-rw-r--r--xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c22
-rw-r--r--xc/lib/Imakefile50
-rw-r--r--xc/lib/X11/Font.c114
-rw-r--r--xc/lib/X11/XErrorDB14
-rw-r--r--xc/lib/X11/XlcGeneric.h2
-rw-r--r--xc/lib/X11/XlcPublic.h13
-rw-r--r--xc/lib/X11/lcCT.c26
-rw-r--r--xc/lib/X11/lcCharSet.c21
-rw-r--r--xc/lib/X11/lcDefConv.c700
-rw-r--r--xc/lib/X11/lcGenConv.c678
-rw-r--r--xc/lib/X11/lcGeneric.c33
-rw-r--r--xc/lib/X11/lcUTF8.c195
-rw-r--r--xc/lib/X11/omGeneric.c7
-rw-r--r--xc/lib/XThrStub/UIThrStubs.c134
-rw-r--r--xc/lib/Xaw/List.c26
-rw-r--r--xc/lib/Xaw/List.h3
-rw-r--r--xc/lib/Xaw/ListP.h8
-rw-r--r--xc/lib/Xext/Imakefile6
-rw-r--r--xc/lib/Xfontcache/FontCache.c2
-rw-r--r--xc/lib/Xfontcache/Imakefile2
-rw-r--r--xc/lib/Xinerama/Imakefile29
-rw-r--r--xc/lib/Xinerama/Xinerama.c315
-rw-r--r--xc/lib/Xv/Xv.c53
-rw-r--r--xc/lib/Xxf86rush/XF86Rush.c70
-rw-r--r--xc/lib/dps/Imakefile5
-rw-r--r--xc/lib/font/FreeType/ftfuncs.c8
-rw-r--r--xc/lib/font/Speedo/spinfo.c19
-rw-r--r--xc/lib/font/Type1/t1info.c28
-rw-r--r--xc/lib/font/builtins/builtin.h4
-rw-r--r--xc/lib/font/builtins/dir.c4
-rw-r--r--xc/lib/font/builtins/file.c4
-rw-r--r--xc/lib/font/builtins/fonts.c4
-rw-r--r--xc/lib/font/builtins/fpe.c4
-rw-r--r--xc/lib/font/builtins/render.c4
-rw-r--r--xc/lib/font/fontcache/Imakefile2
-rw-r--r--xc/lib/font/fontcache/fcqueue.h2
-rw-r--r--xc/lib/font/fontcache/fontcache.c2
-rw-r--r--xc/lib/font/fontcache/fontcache.h2
-rw-r--r--xc/programs/Imakefile25
-rw-r--r--xc/programs/Xserver/GL/Imakefile3
-rw-r--r--xc/programs/Xserver/GL/dri/Imakefile3
-rw-r--r--xc/programs/Xserver/GL/dri/dri.c163
-rw-r--r--xc/programs/Xserver/GL/dri/dri.h34
-rw-r--r--xc/programs/Xserver/GL/dri/drimodule.c3
-rw-r--r--xc/programs/Xserver/GL/dri/dristruct.h27
-rw-r--r--xc/programs/Xserver/GL/dri/sarea.h3
-rw-r--r--xc/programs/Xserver/GL/dri/xf86dri.c3
-rw-r--r--xc/programs/Xserver/GL/glx/Imakefile3
-rw-r--r--xc/programs/Xserver/GL/glxmodule.c3
-rw-r--r--xc/programs/Xserver/GL/include/GL/xf86glx.h3
-rw-r--r--xc/programs/Xserver/GL/mesa/Imakefile3
-rw-r--r--xc/programs/Xserver/GL/mesa/include/GL/Imakefile3
-rw-r--r--xc/programs/Xserver/GL/mesa/include/Imakefile3
-rw-r--r--xc/programs/Xserver/GL/mesa/src/GLcoremodule.c3
-rw-r--r--xc/programs/Xserver/GL/mesa/src/Imakefile9
-rw-r--r--xc/programs/Xserver/GL/mesa/src/X/Imakefile3
-rw-r--r--xc/programs/Xserver/GL/mesa/src/X/xf86glx.c3
-rw-r--r--xc/programs/Xserver/GL/mesa/src/X/xf86glx_util.c11
-rw-r--r--xc/programs/Xserver/GL/mesa/src/X/xf86glx_util.h7
-rw-r--r--xc/programs/Xserver/GL/mesa/src/X/xf86glxint.h3
-rw-r--r--xc/programs/Xserver/Imakefile29
-rw-r--r--xc/programs/Xserver/Xext/fontcache.c4
-rw-r--r--xc/programs/Xserver/Xext/panoramiX.c106
-rw-r--r--xc/programs/Xserver/Xext/panoramiXSwap.c82
-rw-r--r--xc/programs/Xserver/Xext/panoramiXprocs.c9
-rw-r--r--xc/programs/Xserver/Xext/panoramiXsrv.h4
-rw-r--r--xc/programs/Xserver/Xext/shape.c38
-rw-r--r--xc/programs/Xserver/Xext/shm.c3
-rw-r--r--xc/programs/Xserver/Xext/xf86bigfont.c53
-rw-r--r--xc/programs/Xserver/fb/Imakefile4
-rw-r--r--xc/programs/Xserver/fb/fb.h10
-rw-r--r--xc/programs/Xserver/fb/fballpriv.c4
-rw-r--r--xc/programs/Xserver/fb/fbarc.c4
-rw-r--r--xc/programs/Xserver/fb/fbbits.c4
-rw-r--r--xc/programs/Xserver/fb/fbbits.h205
-rw-r--r--xc/programs/Xserver/fb/fbblt.c4
-rw-r--r--xc/programs/Xserver/fb/fbbltone.c4
-rw-r--r--xc/programs/Xserver/fb/fbbstore.c4
-rw-r--r--xc/programs/Xserver/fb/fbcopy.c4
-rw-r--r--xc/programs/Xserver/fb/fbfill.c4
-rw-r--r--xc/programs/Xserver/fb/fbfillrect.c4
-rw-r--r--xc/programs/Xserver/fb/fbfillsp.c4
-rw-r--r--xc/programs/Xserver/fb/fbgc.c4
-rw-r--r--xc/programs/Xserver/fb/fbgetsp.c4
-rw-r--r--xc/programs/Xserver/fb/fbglyph.c4
-rw-r--r--xc/programs/Xserver/fb/fbimage.c4
-rw-r--r--xc/programs/Xserver/fb/fbline.c58
-rw-r--r--xc/programs/Xserver/fb/fbpixmap.c4
-rw-r--r--xc/programs/Xserver/fb/fbpoint.c17
-rw-r--r--xc/programs/Xserver/fb/fbpush.c4
-rw-r--r--xc/programs/Xserver/fb/fbrop.h4
-rw-r--r--xc/programs/Xserver/fb/fbscreen.c4
-rw-r--r--xc/programs/Xserver/fb/fbseg.c4
-rw-r--r--xc/programs/Xserver/fb/fbsetsp.c4
-rw-r--r--xc/programs/Xserver/fb/fbsolid.c4
-rw-r--r--xc/programs/Xserver/fb/fbstipple.c4
-rw-r--r--xc/programs/Xserver/fb/fbtile.c4
-rw-r--r--xc/programs/Xserver/fb/fbutil.c4
-rw-r--r--xc/programs/Xserver/fb/fbwindow.c4
171 files changed, 4676 insertions, 1560 deletions
diff --git a/xc/config/cf/Imake.rules b/xc/config/cf/Imake.rules
index ee1466d20..642945a57 100644
--- a/xc/config/cf/Imake.rules
+++ b/xc/config/cf/Imake.rules
@@ -5,7 +5,7 @@ XCOMM
XCOMM
XCOMM
XCOMM
-XCOMM rules: $XFree86: xc/config/cf/Imake.rules,v 3.64 2000/02/13 06:15:16 dawes Exp $
+XCOMM rules: $XFree86: xc/config/cf/Imake.rules,v 3.65 2000/03/05 16:59:00 dawes Exp $
/*
* MACHINE-INDEPENDENT RULES; DO NOT MODIFY
@@ -1944,11 +1944,13 @@ LintLibReferences(varname,libname,libsource)
#if HasGcc || HasGcc2
#define LibObjCompile(dir,options) RemoveFiles($@ dir/$@) @@\
ClearmakeOSName \
- $(CC) -c $(CCOPTIONS) $(ALLDEFINES) options $*.c -o dir/$@
+ $(CC) -c $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES) \
+ options $*.c -o dir/$@
#else
#define LibObjCompile(dir,options) RemoveFiles($@ dir/$@) @@\
ClearmakeOSName \
- $(CC) -c $(CCOPTIONS) $(ALLDEFINES) options $*.c @@\
+ $(CC) -c $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES) \
+ options $*.c @@\
$(MV) $@ dir/$@
#endif
#endif
@@ -1957,11 +1959,13 @@ LintLibReferences(varname,libname,libsource)
#if HasGcc || HasGcc2
#define LibObjCplusplusCompile(dir,options) RemoveFiles($@ dir/$@) @@\
ClearmakeOSName \
- $(CXX) -c $(CXXOPTIONS) $(CXXDEFINES) options $*.CCsuf -o dir/$@
+ $(CXX) -c $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES) \
+ options $*.CCsuf -o dir/$@
#else
#define LibObjCplusplusCompile(dir,options) RemoveFiles($@ dir/$@) @@\
ClearmakeOSName \
- $(CXX) -c $(CXXOPTIONS) $(CXXDEFINES) options $*.CCsuf @@\
+ $(CXX) -c $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES) \
+ options $*.CCsuf @@\
$(MV) $@ dir/$@
#endif
#endif
diff --git a/xc/config/cf/Imake.tmpl b/xc/config/cf/Imake.tmpl
index e002473c0..d4bf580c8 100644
--- a/xc/config/cf/Imake.tmpl
+++ b/xc/config/cf/Imake.tmpl
@@ -5,7 +5,7 @@ XCOMM
XCOMM
XCOMM
XCOMM
-XCOMM $XFree86: xc/config/cf/Imake.tmpl,v 3.65 2000/01/31 19:33:18 dawes Exp $
+XCOMM $XFree86: xc/config/cf/Imake.tmpl,v 3.70 2000/03/07 14:31:34 dawes Exp $
XCOMM ----------------------------------------------------------------------
/*
@@ -132,6 +132,12 @@ XCOMM the platform-specific parameters - edit site.def to change
#ifndef HasGnuMake
#define HasGnuMake NO
#endif
+/*
+ * The following fixes a glitch with GNU make -j
+ */
+#ifndef ForceServerRemake
+#define ForceServerRemake HasGnuMake
+#endif
#ifndef HasBsdMake
#define HasBsdMake NO
#endif
@@ -295,6 +301,8 @@ XCOMM the platform-specific parameters - edit site.def to change
#define ByteOrder X_BIG_ENDIAN
#elif defined(i386Architecture)
#define ByteOrder X_LITTLE_ENDIAN
+#elif defined(ia64Architecture)
+#define ByteOrder X_LITTLE_ENDIAN
#elif defined(SparcArchitecture)
#define ByteOrder X_BIG_ENDIAN
#elif defined(AlphaArchitecture)
@@ -331,7 +339,7 @@ XCOMM the platform-specific parameters - edit site.def to change
#define HasKrb5 NO /* if you have Kerberos V5 */
#endif
#ifndef HasLatex
-#define HasLatex YES
+#define HasLatex NO
#endif
#ifndef HasShm
#if SystemV || SystemV4
@@ -407,17 +415,28 @@ NCURSESLIBDIR = NCursesLibDir
#ifdef NCursesIncDir
NCURSESINCDIR = NCursesIncDir
#endif
-#ifndef HasGlide
-#define HasGlide NO
+#ifndef HasGlide2
+#define HasGlide2 NO
+#endif
+#ifndef Glide2IncDir
+#if HasGlide2
+#define Glide2IncDir /usr/include/glide
+#else
+#define Glide2IncDir
+#endif
+#endif
+GLIDE2INCDIR = Glide2IncDir
+#ifndef HasGlide3
+#define HasGlide3 NO
#endif
-#ifndef GlideIncDir
-#if HasGlide
-#define GlideIncDir /usr/include/glide
+#ifndef Glide3IncDir
+#if HasGlide3
+#define Glide3IncDir /usr/include/glide3
#else
-#define GlideIncDir
+#define Glide3IncDir
#endif
#endif
-GLIDEINCDIR = GlideIncDir
+GLIDE3INCDIR = Glide3IncDir
#ifndef HasTk
#define HasTk NO
#endif
@@ -610,7 +629,7 @@ TCLIBDIR = TclLibDir
#define DriverManDefs -D__drivermansuffix__=$(DRIVERMANSUFFIX)
#endif
#ifndef ExtraManDefs
-#define ExtraManDefs /**/
+#define ExtraManDefs -D__projectroot__=$(PROJECTROOT)
#endif
#ifndef LogDirectory
diff --git a/xc/config/cf/NetBSD.cf b/xc/config/cf/NetBSD.cf
index 9198ce454..fdbfa4183 100644
--- a/xc/config/cf/NetBSD.cf
+++ b/xc/config/cf/NetBSD.cf
@@ -2,7 +2,7 @@ XCOMM platform: $XConsortium: NetBSD.cf /main/16 1996/10/31 14:47:14 kaleb $
-XCOMM platform: $XFree86: xc/config/cf/NetBSD.cf,v 3.79 2000/02/21 18:05:30 dawes Exp $
+XCOMM platform: $XFree86: xc/config/cf/NetBSD.cf,v 3.80 2000/02/29 03:08:55 dawes Exp $
#ifndef OSName
@@ -242,7 +242,6 @@ XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVe
* Make & install Features
*/
#define HasBsdMake YES
-#define StripInstalledPrograms YES
#define CompressAllFonts YES
#define GzipFontCompression YES
#define DefaultUserPath /bin:/usr/bin:/usr/local/bin:$(BINDIR)
diff --git a/xc/config/cf/OpenBSD.cf b/xc/config/cf/OpenBSD.cf
index e23ce866e..8c00d3ba1 100644
--- a/xc/config/cf/OpenBSD.cf
+++ b/xc/config/cf/OpenBSD.cf
@@ -1,4 +1,4 @@
-XCOMM platform: $XFree86: xc/config/cf/OpenBSD.cf,v 3.27 2000/02/11 18:06:37 dawes Exp $
+XCOMM platform: $XFree86: xc/config/cf/OpenBSD.cf,v 3.30 2000/03/07 01:30:40 dawes Exp $
XCOMM
XCOMM $OpenBSD: OpenBSD.cf,v 1.33 1998/09/27 04:52:48 rahnds Exp $
XCOMM
@@ -48,6 +48,20 @@ XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVe
#define HasVarDb YES
/*
+ * Multi-thread safe libs
+ */
+#if OSMajorVersion == 2 && OSMinorVersion >= 6 || OSMajorVersion >= 3
+#define HasPosixThreads YES
+#define ThreadedX YES
+#define BuildThreadStubLibrary YES
+#define NeedUIThrStubs YES
+#define HasThreadSafeAPI YES
+#define SystemMTDefines -D_REENTRANT
+#define ThreadsCompileFlags -pthread
+#define ThreadsLibraries -lc_r
+#endif
+
+/*
* Compiler Features
*/
#undef HasGcc
@@ -142,7 +156,6 @@ XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVe
#define HasBsdMake YES
-#define StripInstalledPrograms YES
#define BuildCyrillicFonts YES
#define GzipFontCompression YES
#define DefaultUserPath /bin:/usr/bin:/usr/local/bin:$(BINDIR)
@@ -265,13 +278,6 @@ install:: fonts.alias @@\
$(RM) _fonts.alias
#endif /* InstallFontAliasesNoComment */
-/* We now only use the XFree86 tree - thus we can define this
- * independent of the architecture
- */
-#ifndef XF86Contrib
-#define XF86Contrib
-#endif
-
/*
* Architecture specific sections - put all architecture dependent
* options and setting here into the correct section
@@ -329,7 +335,7 @@ install:: fonts.alias @@\
/* 2.7 and later will have support for setting MTRRs */
#ifndef HasMTRRSupport
-#if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 6)
+#if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 6)
#define HasMTRRSupport YES
#else
#define HasMTRRSupport NO
diff --git a/xc/config/cf/X11.tmpl b/xc/config/cf/X11.tmpl
index 7f8251799..2e2fbf4cf 100644
--- a/xc/config/cf/X11.tmpl
+++ b/xc/config/cf/X11.tmpl
@@ -5,7 +5,7 @@ XCOMM
XCOMM
XCOMM
XCOMM
-XCOMM $XFree86: xc/config/cf/X11.tmpl,v 1.59 2000/02/18 16:23:07 dawes Exp $
+XCOMM $XFree86: xc/config/cf/X11.tmpl,v 1.62 2000/03/02 17:52:50 dawes Exp $
/***************************************************************************
* *
@@ -206,6 +206,9 @@ XCOMM $XFree86: xc/config/cf/X11.tmpl,v 1.59 2000/02/18 16:23:07 dawes Exp $
#ifndef BuildXinerama
#define BuildXinerama NO
#endif
+#ifndef BuildXineramaLibrary
+#define BuildXineramaLibrary BuildXinerama
+#endif
#ifndef BuildXCSecurity
#define BuildXCSecurity YES
#endif
@@ -1338,6 +1341,22 @@ ProjectUnsharedLibReferences(XTHRSTUB,XThrStub,$(XTHRSTUBSRC),XBuildLibDir)
#endif
#endif
+#if BuildXineramaLibrary
+#ifndef SharedLibXinerama
+#define SharedLibXinerama NO
+#endif
+#ifndef NormalLibXinerama
+#define NormalLibXinerama YES
+#endif
+#ifndef DebugLibXinerama
+#define DebugLibXinerama NO
+#endif
+#ifndef ProfileLibXinerama
+#define ProfileLibXinerama NO
+#endif
+#endif
+
+
#if BuildDPSLibrary
#ifndef SharedLibDps
#define SharedLibDps HasSharedLibraries
@@ -1513,6 +1532,18 @@ ProjectUnsharedLibReferences(XV,Xv,$(XVLIBSRC),XBuildLibDir)
#endif
#endif
+#if BuildXineramaLibrary
+ XINERAMALIBSRC = $(LIBSRC)/Xinerama
+#if SharedLibXinerama
+#ifndef SharedXineramaRev
+#define SharedXineramaRev 1.0
+#endif
+SharedLibReferences(XINERAMA,Xinerama,$(XINERAMALIBSRC),SOXINERAMAREV,SharedXineramaRev)
+#else
+ProjectUnsharedLibReferences(XINERAMA,Xinerama,$(XINERAMALIBSRC),XBuildLibDir)
+#endif
+#endif
+
#if BuildDPSLibrary
DPSLIBSRC = $(LIBSRC)/dps
#if SharedLibDps
@@ -2373,7 +2404,7 @@ clean:: @@\
#ifndef MakeSimpleDoc
#define MakeSimpleDoc(file,srcs) @@\
-all:: file.PS @@\
+all:: file.PS file.txt @@\
.PRECIOUS: file.PS @@\
@@\
file.PS: srcs @@\
@@ -2390,7 +2421,7 @@ clean:: @@\
#ifndef MakeTblDoc
#define MakeTblDoc(file,srcs) @@\
-all:: file.PS @@\
+all:: file.PS file.txt @@\
.PRECIOUS: file.PS @@\
@@\
file.PS: srcs @@\
@@ -2407,7 +2438,7 @@ clean:: @@\
#ifndef MakeEqnDoc
#define MakeEqnDoc(file,srcs) @@\
-all:: file.PS @@\
+all:: file.PS file.txt @@\
.PRECIOUS: file.PS @@\
@@\
file.PS: srcs @@\
@@ -2460,7 +2491,7 @@ file.PS: src @@\
#endif /* MakeLatexDoc */
#ifndef InstallDoc
-#define InstallDoc(name,deps) @@\
+#define InstallDoc(name,deps) @@\
install:: deps @@\
MakeDir($(DESTDIR)$(DOCPSDIR)) @@\
@if [ -f name.PS ]; then set -x; \ @@\
@@ -2473,5 +2504,6 @@ install:: deps @@\
#endif
#ifndef InstallRoffDoc
+
#define InstallRoffDoc(name) InstallDoc(name,name.PS name.txt)
#endif
diff --git a/xc/config/cf/gnu.cf b/xc/config/cf/gnu.cf
index 10128de1b..cfc4117aa 100644
--- a/xc/config/cf/gnu.cf
+++ b/xc/config/cf/gnu.cf
@@ -1,4 +1,4 @@
-XCOMM platform: $XFree86: xc/config/cf/gnu.cf,v 1.4 1999/03/21 01:44:58 dawes Exp $
+XCOMM platform: $XFree86: xc/config/cf/gnu.cf,v 1.6 2000/02/29 15:24:13 tsi Exp $
#ifndef OSName
#define OSName GNU
@@ -97,7 +97,6 @@ XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVe
#define NeedNestedPrototypes YES
#define NeedVarargsPrototypes YES
#define NeedWidePrototypes NO
-#define StripInstalledPrograms YES
#ifndef HasLibCrypt
# define HasLibCrypt YES
#endif
@@ -121,7 +120,6 @@ XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVe
#endif
#define BuildXTrueType NO
-#define BuildXTT NO
#ifdef i386Architecture
# include <xfree86.cf>
diff --git a/xc/config/cf/linux.cf b/xc/config/cf/linux.cf
index 31a05aa48..d51ba9785 100644
--- a/xc/config/cf/linux.cf
+++ b/xc/config/cf/linux.cf
@@ -1,5 +1,5 @@
XCOMM platform: $TOG: linux.cf /main/47 1998/04/17 11:32:51 mgreess
-XCOMM platform: $XFree86: xc/config/cf/linux.cf,v 3.115 2000/02/21 18:05:31 dawes Exp $
+XCOMM platform: $XFree86: xc/config/cf/linux.cf,v 3.119 2000/03/03 01:11:05 mvojkovi Exp $
#ifndef LinuxElfDefault
#define LinuxElfDefault YES
@@ -119,11 +119,13 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion)
LinuxAdditionalIncludes LinuxGnuSourceDefines \
LinuxLocaleDefines
#define XawI18nDefines -DHAS_WCHAR_H -DHAS_WCTYPE_H -DNO_WIDEC_H
+#ifndef ia64Architecture
#define HasPosixThreads YES
#define ThreadedX YES
#define HasThreadSafeAPI YES
#define ThreadsLibraries -lpthread
#define SystemMTDefines -D_REENTRANT
+#endif /* ia64Architecture */
#ifndef HasLibCrypt
#define HasLibCrypt YES
#endif
@@ -159,6 +161,9 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion)
#ifndef XF86INT10_BUILD
# ifdef i386Architecture
# define XF86INT10_BUILD X86VM
+# elif defined(ia64Architecture)
+# define UseX86Emu NO
+# define XF86INT10_BUILD XF86INT10_STUB
# elif defined(X86EMU_LIBPATH)
# define XF86INT10_BUILD X86EMU_GENERIC
# endif
@@ -207,6 +212,16 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion)
# endif
#endif
+#ifndef HasAgpGart
+# ifdef i386Architecture
+ /* The AGPGART header file is included in os-support/linux, which
+ allows all drivers that depend on AGP to build properly. */
+# define HasAgpGart YES
+# else
+# define HasAgpGart NO
+# endif
+#endif
+
/*
* The Rush extension support.
*/
@@ -256,7 +271,6 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion)
#define AvoidNullMakeCommand YES
#define DebuggableLibraries YES
-#define StripInstalledPrograms YES
#define CompressAllFonts YES
#define Malloc0ReturnsNull YES
#define NeedConstPrototypes YES
@@ -316,6 +330,14 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion)
#define LdCmd /usr/alpha-linuxecoff/bin/ld -m alpha
#define AsmDefines -DUSE_GAS -U__ELF__
#endif /* AlphaArchitecture */
+#ifdef ia64Architecture
+#define CcCmd gcc
+#define CplusplusCmd g++
+#define AsCmd as
+#define LdCmd ld
+#define AsmDefines -DUSE_GAS -U__ELF__
+#define HasSharedLibraries NO
+#endif /* ia64Architecture */
#ifdef i386Architecture
#define CcCmd gcc -b i486-linuxaout
#define CplusplusCmd g++ -b i486-linuxaout
@@ -340,6 +362,14 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion)
#define AsmDefines -D__ELF__
#define CplusplusCmd c++ -b alpha-linux
#endif /* AlphaArchitecture */
+#ifdef ia64Architecture
+#define CcCmd gcc
+#define CplusplusCmd g++
+#define AsCmd as
+#define LdCmd ld
+#define AsmDefines -D__ELF__
+#define HasSharedLibraries NO
+#endif /* ia64Architecture */
#ifdef i386Architecture
#define CcCmd gcc -b i486-linux
#define AsCmd /usr/i486-linux/bin/as
@@ -384,10 +414,6 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion)
#define HasVarRun YES
#define VarDbDirectory /var/state
-#ifndef HasAgpGart
-#define HasAgpGart NO
-#endif
-
#ifndef XF86ExtraCardDrivers
#define XF86ExtraCardDrivers v4l
#endif
@@ -410,6 +436,13 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion)
#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
#endif /* AlphaArchitecture */
+#ifdef ia64Architecture
+#define OptimizedCDebugFlags -O2
+#define LinuxMachineDefines -D__ia64__
+#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET
+#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
+#endif /* ia64Architecture */
+
#ifdef Mc68020Architecture
#define OptimizedCDebugFlags -O2
#define LinuxMachineDefines -D__mc68000__
diff --git a/xc/config/cf/lnxdoc.rules b/xc/config/cf/lnxdoc.rules
index 26b099815..3b63ccbaa 100644
--- a/xc/config/cf/lnxdoc.rules
+++ b/xc/config/cf/lnxdoc.rules
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/config/cf/lnxdoc.rules,v 3.18 2000/01/25 01:36:53 dawes Exp $
+XCOMM $XFree86: xc/config/cf/lnxdoc.rules,v 3.19 2000/02/26 05:19:44 dawes Exp $
XCOMM
XCOMM Rules for formatting Linuxdoc-SGML documentation
XCOMM
@@ -83,7 +83,7 @@ clean:: @@\
#ifndef UpdateFormattedDoc
#define UpdateFormattedDoc(textfile) @@\
update.docs:: textfile @@\
- @if [ -f $(FORMATTEDDIR)/textfile ]; then \ @@\
+ -@if [ -f $(FORMATTEDDIR)/textfile ]; then \ @@\
if [ "$(FORCEUPDATE)" = yes ]; then set -x; \ @@\
cp textfile $(FORMATTEDDIR)/textfile; \ @@\
echo "" >> $(FORMATTEDDIR)/textfile; \ @@\
diff --git a/xc/config/cf/svr3.cf b/xc/config/cf/svr3.cf
index 0d4b0b529..f048b773f 100644
--- a/xc/config/cf/svr3.cf
+++ b/xc/config/cf/svr3.cf
@@ -2,7 +2,7 @@ XCOMM $XConsortium: svr3.cf /main/1 1996/10/31 14:47:37 kaleb $
-XCOMM $XFree86: xc/config/cf/svr3.cf,v 3.11 2000/01/25 18:37:30 dawes Exp $
+XCOMM $XFree86: xc/config/cf/svr3.cf,v 3.12 2000/02/29 03:08:56 dawes Exp $
#ifndef HasGcc
#define HasGcc YES
@@ -61,10 +61,6 @@ XCOMM $XFree86: xc/config/cf/svr3.cf,v 3.11 2000/01/25 18:37:30 dawes Exp $
# define HasSymLinks NO
#endif
-#ifndef StripInstalledPrograms
-# define StripInstalledPrograms YES
-#endif
-
#ifndef MotifBC
# define MotifBC YES
#endif
diff --git a/xc/config/cf/xf86site.def b/xc/config/cf/xf86site.def
index 13f08dc6b..a666fbdc9 100644
--- a/xc/config/cf/xf86site.def
+++ b/xc/config/cf/xf86site.def
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.153 1999/12/03 19:17:17 eich Exp $
+XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.159 2000/03/07 15:23:00 dawes Exp $
/******************************************************************************/
/*
* This file is to provide a quick method for most people to change the
@@ -26,6 +26,13 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.153 1999/12/03 19:17:17 eich Exp $
*/
/*
+ * If you want to enable some developer settings, like more verbose
+ * compiler warnings, uncomment this.
+ *
+#define XFree86Devel YES
+*/
+
+/*
* If using GCC 2.x on a system where it isn't the default, uncomment
* the following
*
@@ -327,7 +334,7 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.153 1999/12/03 19:17:17 eich Exp $
* To disable support for TrueType fonts, uncomment these.
*
#define BuildFreeType NO
-#define BuildXTT NO
+#define BuildXTrueType NO
*/
/*
@@ -402,8 +409,8 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.153 1999/12/03 19:17:17 eich Exp $
/*
* Select the XInput devices you want by uncommenting this.
*
-#define XInputDrivers dynapro elo2300 elographics magellan microtouch \
- mutouch spaceorb wacom
+#define XInputDrivers mouse dynapro elo2300 elographics magellan microtouch \
+ mutouch spaceorb wacom void
*/
/*
@@ -628,25 +635,45 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.153 1999/12/03 19:17:17 eich Exp $
*/
/*
- * By default, XF86Contrib is defined so build only those parts of
- * of the contrib distribution supported by XFree86. To prevent this
- * from being defined, uncomment the following.
+ * To build/install X specs docs, uncomment the following.
+ * The SpecsDocDirs setting here is recommended because it covers
+ * the docs that XFree86 has changed or added.
+ *
+#define BuildSpecsDocs YES
+#define SpecsDocDirs GL Xext Xv xterm
+ */
+
+/*
+ * To build all specs docs, not just those listed in SpecsDocDirs, uncomment
+ * the following.
*
-#define DontDefineXF86Contrib
+#define BuildAllSpecsDocs YES
*/
/*
* To enable building the glide driver, you need to define
- * HasGlide to YES and set the GlideIncDir variable.
- * HasGlide is per default NO.
+ * HasGlide2 to YES and set the Glide2IncDir variable.
+ * HasGlide2 is per default NO.
*
-#define HasGlide YES
+#define HasGlide2 YES
*/
/*
* Set the path to your Glide include files.
*
-#define GlideIncDir /usr/include/glide
+#define Glide2IncDir /usr/include/glide
+ */
+
+/*
+ * The 3Dfx 3D DRI driver requires glide 3.
+ *
+#define HasGlide3 YES
+ */
+
+/*
+ * Set the path to your Glide 3 include files.
+ *
+#define Glide3IncDir /usr/include/glide3
*/
/*
@@ -655,3 +682,5 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.153 1999/12/03 19:17:17 eich Exp $
*
#define X86EMU_LIBPATH /usr/local/lib
*/
+
+
diff --git a/xc/config/cf/xfree86.cf b/xc/config/cf/xfree86.cf
index ac71d41ce..77e5e454d 100644
--- a/xc/config/cf/xfree86.cf
+++ b/xc/config/cf/xfree86.cf
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/config/cf/xfree86.cf,v 3.269 2000/02/17 13:50:02 dawes Exp $
+XCOMM $XFree86: xc/config/cf/xfree86.cf,v 3.282 2000/03/07 14:31:36 dawes Exp $
/*
* This configuration file contains all of the configuration
* information for the XFree86 based X Servers.
@@ -9,6 +9,14 @@ XCOMM $XFree86: xc/config/cf/xfree86.cf,v 3.269 2000/02/17 13:50:02 dawes Exp $
XCOMM $TOG: xfree86.cf /main/38 1997/10/22 13:01:59 kaleb $
/*
+ * This enables some settings for developers.
+ */
+
+#ifndef XFree86Devel
+# define XFree86Devel NO
+#endif
+
+/*
* settings for the config file parser
*/
@@ -26,10 +34,10 @@ XCOMM $TOG: xfree86.cf /main/38 1997/10/22 13:01:59 kaleb $
/* XInput drivers */
#ifndef XInputDrivers
#if 1
-#define XInputDrivers dynapro microtouch wacom
+#define XInputDrivers mouse dynapro microtouch wacom void
#else
-#define XInputDrivers dynapro elo2300 elographics magellan \
- microtouch mutouch spaceorb wacom
+#define XInputDrivers mouse dynapro elo2300 elographics magellan \
+ microtouch mutouch spaceorb wacom void
#endif
#endif
@@ -38,8 +46,13 @@ XCOMM $TOG: xfree86.cf /main/38 1997/10/22 13:01:59 kaleb $
#define XF86ExtraCardDrivers /**/
#endif
+/* OS.cf files may set this for OS-specific drivers */
+#ifndef HasAgpGart
+#define HasAgpGart NO
+#endif
+
/* The glide driver only works for the loadable server at the moment */
-#if HasGlide && DoLoadableServer
+#if HasGlide2 && DoLoadableServer
#define GlideDriver glide
#else
#define GlideDriver /**/
@@ -140,6 +153,86 @@ XCOMM $TOG: xfree86.cf /main/38 1997/10/22 13:01:59 kaleb $
# endif
#endif
+/* IA-64 */
+
+#ifdef ia64Architecture
+# ifndef XF86Server
+# define XF86Server YES
+# endif
+/* 1bpp module */
+# ifndef XF1Bpp
+# define XF1Bpp YES
+# endif
+/* 4bpp module */
+# ifndef XF4Bpp
+# define XF4Bpp YES
+# endif
+/* 8/32bpp overlay module */
+# ifndef XF8_32Bpp
+# define XF8_32Bpp YES
+# endif
+/* 8/16bpp dual fb module */
+# ifndef XF8_16Bpp
+# define XF8_16Bpp YES
+# endif
+/* 24/32bpp conversion module */
+# ifndef XF24_32Bpp
+# define XF24_32Bpp YES
+# endif
+/* shadow fb module */
+# ifndef XFShadowFB
+# define XFShadowFB YES
+# endif
+/* vgahw module */
+# ifndef XF86VgaHw
+# define XF86VgaHw YES
+# endif
+/* fbdevhw module */
+# ifndef XF86FBDevHw
+# define XF86FBDevHw YES
+# endif
+/* XAA module */
+# ifndef XF86XAA
+# define XF86XAA YES
+# endif
+/* ramdac module */
+# ifndef XF86Ramdac
+# define XF86Ramdac YES
+# endif
+/* I2C module */
+# ifndef XF86I2C
+# define XF86I2C YES
+# endif
+/* DDC module */
+# ifndef XF86DDC
+# define XF86DDC YES
+# endif
+/* RAC (Resource Access Control) module */
+# ifndef XF86RAC
+# define XF86RAC YES
+# endif
+
+/* int10 module */
+# ifndef XF86Int10
+# define XF86Int10 YES
+# endif
+
+/*
+ * XXX Should change this to allow such drivers to be built without agpgart
+ * support (when it is useful to do so).
+ */
+# if HasAgpGart
+# define AgpGartDrivers i810
+# else
+# define AgpGartDrivers /**/
+# endif
+
+/* Pure PCI drivers should go first */
+# ifndef XF86CardDrivers
+# define XF86CardDrivers mga vga
+# endif
+#endif
+
/* Sparc drivers */
#if defined(SparcArchitecture) && !defined(LynxOSArchitecture)
@@ -317,7 +410,7 @@ XCOMM $TOG: xfree86.cf /main/38 1997/10/22 13:01:59 kaleb $
/* Pure PCI drivers should go first */
# ifndef XF86CardDrivers
-# define XF86CardDrivers mga glint s3virge sis cirrus tseng \
+# define XF86CardDrivers r128 mga glint s3virge sis cirrus tseng \
trident chips fbdev vga XF86ExtraCardDrivers
# endif
#endif
@@ -773,8 +866,9 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8
# define GzipFontCompression YES
#endif
+/* Disable stripping installed programs for this release. */
#ifndef StripInstalledPrograms
-# define StripInstalledPrograms YES
+# define StripInstalledPrograms NO
#endif
#ifndef InstallJapaneseDocs
@@ -797,7 +891,7 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8
# define DlopenHack -DDLOPEN_HACK
#endif
-#ifndef LoaderDefines
+#ifndef ExtraLoaderDefines
# if MakeDllModules
# define ExtraLoaderDefines DlopenHack
# else
@@ -901,33 +995,11 @@ DRIVERSDKINCLUDEDIR = DriverSDKIncludeDir
*/
XF86SRC = $(SERVERSRC)/hw/xfree86
- XF86ACCELSRC = $(XF86SRC)/accel
XF86COMSRC = $(XF86SRC)/common
XF86PARSERSRC = $(XF86SRC)/parser
XF86OSSRC = $(XF86SRC)/os-support
XF86DRIVERSRC = $(XF86SRC)/drivers
DRIVERSRC = $(XF86DRIVERSRC)
- S3DRIVERSRC = $(XF86SRC)/accel/s3/drivers
- S3VDRIVERSRC = $(XF86SRC)/accel/s3_virge/drivers
-
- XF68SRC = $(SERVERSRC)/hw/xfree68
- XF68COMSRC = $(XF68SRC)/common
- XF68PARSERSRC = $(XF68SRC)/parser
- XF68OSSRC = $(XF68SRC)/os-support
-
- XF98SRC = $(SERVERSRC)/hw/xfree98
- XF98ACCELSRC = $(XF98SRC)/accel
- XF98COMSRC = $(XF98SRC)/common
- XF98OSSRC = $(XF98SRC)/os-support
- XF98DRIVERSRC = $(XF98SRC)/drivers
- XF98VGADRIVERSRC = $(XF98SRC)/vga256/drivers
-XF98VGA16DRIVERSRC = $(XF98SRC)/vga16/drivers
- XF98VGA2DRIVERSRC = $(XF98SRC)/vga2/drivers
- XF98MONODRIVERSRC = $(XF98SRC)/mono/drivers
-XF98NECS3DRIVERSRC = $(XF98SRC)/accel/s3nec/drivers
-XF98PWSKBDRIVERSRC = $(XF98SRC)/accel/s3pwskb/drivers
- XF98PWLBDRIVERSRC = $(XF98SRC)/accel/s3pwlb/drivers
-XF98GA968DRIVERSRC = $(XF98SRC)/accel/s3ga968/drivers
/*
* Installed location of the XFree86 documentation
@@ -951,7 +1023,7 @@ XFREE86JAPANESEDOCDIR = $(DOCDIR)/Japanese
#endif
#ifndef XFree86Version
-# define XFree86Version 3918
+# define XFree86Version 4000
#endif
#ifndef XVendorString
@@ -985,9 +1057,13 @@ XFREE86JAPANESEDOCDIR = $(DOCDIR)/Japanese
#if HasGcc
# ifndef GccWarningOptions
-# define GccWarningOptions -Wall -Wpointer-arith -Wstrict-prototypes \
+# if XFree86Devel
+# define GccWarningOptions -Wall -Wpointer-arith -Wstrict-prototypes \
-Wmissing-prototypes -Wmissing-declarations \
-Wredundant-decls -Wnested-externs
+# else
+# define GccWarningOptions -Wall -Wpointer-arith
+# endif
# endif
# ifndef DefaultCCOptions
# if defined(UseInstalled)
@@ -1023,8 +1099,18 @@ XFREE86JAPANESEDOCDIR = $(DOCDIR)/Japanese
# define LibraryDebugOpt DefaultGcc2DebugOpt
#endif
-#ifndef DontDefineXF86Contrib
-# define XF86Contrib
+/*
+ * Some versions of gcc have optimisation bugs that cause problems building
+ * some files. The definitions here cover those.
+ */
+
+#ifndef Egcs112Bug
+# if HasGcc2 && defined(i386Architecture)
+# define Egcs112Bug YES
+# else
+# define Egcs112Bug NO
+# endif
#endif
#include <xf86.rules>
+
diff --git a/xc/config/pswrap/pswrap.man b/xc/config/pswrap/pswrap.man
index 59b9b33ae..17d7f05f7 100644
--- a/xc/config/pswrap/pswrap.man
+++ b/xc/config/pswrap/pswrap.man
@@ -1,4 +1,4 @@
-.\" $Id: pswrap.man,v 1.1.1.1 2000/02/22 15:38:03 kem Exp $
+.\" Id: pswrap.man,v 6.1 1994/05/18 23:21:11 asente Exp $
.na
.nh
.TH PSWRAP 1 "4 Apr 1994" "Adobe Systems"
diff --git a/xc/include/GL/Imakefile b/xc/include/GL/Imakefile
index e77cffacb..2e18a43cb 100644
--- a/xc/include/GL/Imakefile
+++ b/xc/include/GL/Imakefile
@@ -1,9 +1,11 @@
-XCOMM $XFree86: xc/include/GL/Imakefile,v 1.6 1999/08/14 10:49:14 dawes Exp $
-XCOMM $PI: xc/include/GL/Imakefile,v 1.7 1999/06/24 03:11:32 faith Exp $
+XCOMM $XFree86: xc/include/GL/Imakefile,v 1.8 2000/03/02 16:07:29 martin Exp $
+
+LinkSourceFile(gl.h, ../../extras/Mesa/include/GL)
+LinkSourceFile(glext.h, ../../extras/Mesa/include/GL)
#if BuildGLXLibrary
-GLXHEADERS = gl.h glx.h glxint.h glxmd.h glxproto.h glxtokens.h
+GLXHEADERS = gl.h glext.h glx.h glxint.h glxmd.h glxproto.h glxtokens.h
#endif
HEADERS = $(GLXHEADERS)
diff --git a/xc/include/GL/glx.h b/xc/include/GL/glx.h
index 54c4abf4c..367ce0a51 100644
--- a/xc/include/GL/glx.h
+++ b/xc/include/GL/glx.h
@@ -1,7 +1,7 @@
#ifndef __GLX_glx_h__
#define __GLX_glx_h__
-/* $XFree86: xc/include/GL/glx.h,v 1.4 2000/02/15 07:13:24 martin Exp $ */
+/* $XFree86: xc/include/GL/glx.h,v 1.5 2000/03/02 16:07:29 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
@@ -39,6 +39,13 @@ extern "C" {
typedef XID GLXContextID;
typedef XID GLXPixmap;
typedef XID GLXDrawable;
+/* GLX 1.3 */
+typedef XID GLXFBConfigID;
+typedef XID GLXPfuffer;
+typedef XID GLXWindow;
+typedef XID GLXPbuffer;
+typedef XID GLXFBConfig;
+
/*
** GLXContext is a pointer to opaque data.
@@ -69,6 +76,25 @@ extern const char * glXGetClientString (Display *dpy, int name );
extern const char * glXQueryServerString (Display *dpy, int screen, int name );
extern const char * glXQueryExtensionsString (Display *dpy, int screen );
+/* GLX 1.3 */
+extern GLXFBConfig glXChooseFBConfig (Display *dpy, int screen, const int *attribList, int *nitems);
+extern int glXGetFBConfigAttrib (Display *dpy, GLXFBConfig config, int attribute, int *value);
+extern XVisualInfo * glXGetVisualFromFBConfig (Display *dpy, GLXFBConfig config);
+extern GLXWindow glXCreateWindow (Display *dpy, GLXFBConfig config, Window win, const int *attribList);
+extern void glXDestroyWindow (Display *dpy, GLXWindow window);
+extern GLXPixmap glXCreatePixmap (Display *dpy, GLXFBConfig config,Pixmap pixmap, const int *attribList);
+extern void glXDestroyPixmap (Display *dpy, GLXPixmap pixmap);
+extern GLXPbuffer glXCreatePbuffer (Display *dpy, GLXFBConfig config, const int *attribList);
+extern void glXDestroyPbuffer (Display *dpy, GLXPbuffer pbuf);
+extern void glXQueryDrawable (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
+extern GLXContext glXCreateNewContext (Display *dpy, GLXFBConfig config, int renderType, GLXContext shareList, Bool direct);
+extern Bool glXMakeContextCurrent (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
+extern GLXDrawable glXGetCurrentReadDrawable (void);
+extern int glXQueryContext (Display *dpy, GLXContext ctx, int attribute, int *value);
+extern void glXSelectEvent (Display *dpy, GLXDrawable drawable, unsigned long mask);
+extern void glXGetSelectedEvent (Display *dpy, GLXDrawable drawable, unsigned long *mask);
+
+/* Extensions */
extern Display * glXGetCurrentDisplay (void);
extern GLXContextID glXGetContextIDEXT (const GLXContext ctx);
extern GLXDrawable glXGetCurrentDrawableEXT (void);
diff --git a/xc/include/Xmd.h b/xc/include/Xmd.h
index 45ddad391..0df56e05d 100644
--- a/xc/include/Xmd.h
+++ b/xc/include/Xmd.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/include/Xmd.h,v 3.5 1998/10/02 07:38:50 dawes Exp $ */
+/* $XFree86: xc/include/Xmd.h,v 3.6 2000/02/22 00:59:40 mvojkovi Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -54,7 +54,7 @@ SOFTWARE.
#ifdef CRAY
#define WORD64 /* 64-bit architecture */
#endif
-#if defined(__alpha) || defined(__alpha__)
+#if defined(__alpha) || defined(__alpha__) || defined(__ia64__)
#define LONG64 /* 32/64-bit architecture */
#endif
#ifdef __sgi
diff --git a/xc/include/extensions/Imakefile b/xc/include/extensions/Imakefile
index de3aa3234..55beb40f6 100644
--- a/xc/include/extensions/Imakefile
+++ b/xc/include/extensions/Imakefile
@@ -1,5 +1,5 @@
XCOMM $TOG: Imakefile /main/50 1997/11/24 16:47:55 kaleb $
-XCOMM $XFree86: xc/include/extensions/Imakefile,v 3.31 2000/02/13 06:15:21 dawes Exp $
+XCOMM $XFree86: xc/include/extensions/Imakefile,v 3.33 2000/02/29 03:09:00 dawes Exp $
#if BuildScreenSaverLibrary
SCREENSAVERHEADERS = saver.h saverproto.h scrnsaver.h
@@ -29,10 +29,14 @@ XF86RUSHHEADERS = xf86rush.h xf86rushstr.h
#if BuildFontCache
FONTCACHEHEADERS = fontcache.h fontcacheP.h fontcachstr.h
#endif
+#if BuildXinerama
+XINERAMAHEADERS = panoramiXext.h panoramiXproto.h Xinerama.h
+#endif
EXTRAHEADERS = $(SCREENSAVERHEADERS) $(XF86MISCHEADERS) $(XF86BIGFONTHEADERS) \
- $(XF86VIDMODEHEADERS) $(XF86DGAHEADERS) \
- $(LBXHEADERS) $(XVHEADERS) $(FONTCACHEHEADERS)
+ $(XF86VIDMODEHEADERS) $(XF86DGAHEADERS) $(XINERAMAHEADERS) \
+ $(LBXHEADERS) $(XVHEADERS) $(XF86RUSHHEADERS) \
+ $(FONTCACHEHEADERS)
@@ -50,7 +54,6 @@ HEADERS = Xext.h multibuf.h shape.h sync.h XShm.h MITMisc.h \
security.h securstr.h \
Print.h Printstr.h \
Xcup.h Xcupstr.h \
- panoramiXext.h panoramiXproto.h \
dpms.h dpmsstr.h \
XEVI.h XEVIstr.h
diff --git a/xc/include/extensions/Xinerama.h b/xc/include/extensions/Xinerama.h
new file mode 100644
index 000000000..c0b369f57
--- /dev/null
+++ b/xc/include/extensions/Xinerama.h
@@ -0,0 +1,44 @@
+/* $XFree86: xc/include/extensions/Xinerama.h,v 3.2 2000/03/01 01:04:20 dawes Exp $ */
+
+#ifndef _Xinerama_h
+#define _Xinerama_h
+
+typedef struct {
+ int screen_number;
+ short x_org;
+ short y_org;
+ short width;
+ short height;
+} XineramaScreenInfo;
+
+Bool XineramaQueryExtension (
+ Display *dpy,
+ int *event_base,
+ int *error_base
+);
+
+Status XineramaQueryVersion(
+ Display *dpy,
+ int *major,
+ int *minor
+);
+
+Bool XineramaIsActive(Display *dpy);
+
+
+/*
+ Returns the number of heads and a pointer to an array of
+ structures describing the position and size of the individual
+ heads. Returns NULL and number = 0 if Xinerama is not active.
+
+ Returned array should be freed with XFree().
+*/
+
+XineramaScreenInfo *
+XineramaQueryScreens(
+ Display *dpy,
+ int *number
+);
+
+#endif /* _Xinerama_h */
+
diff --git a/xc/include/extensions/fontcache.h b/xc/include/extensions/fontcache.h
index 611073ae6..8f87077e0 100644
--- a/xc/include/extensions/fontcache.h
+++ b/xc/include/extensions/fontcache.h
@@ -25,7 +25,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:39:20 kem Exp $
+ * Id: fontcache.h,v 1.6 1999/01/31 12:41:32 akiyama Exp $
*/
/* THIS IS NOT AN X CONSORTIUM STANDARD */
diff --git a/xc/include/extensions/fontcacheP.h b/xc/include/extensions/fontcacheP.h
index e2dc37a3b..141f71412 100644
--- a/xc/include/extensions/fontcacheP.h
+++ b/xc/include/extensions/fontcacheP.h
@@ -24,8 +24,9 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: fontcacheP.h,v 1.1.1.1 2000/02/22 15:39:20 kem Exp $
+ * Id: fontcacheP.h,v 1.6 1999/01/31 12:43:53 akiyama Exp $
*/
+/* $XFree86: xc/include/extensions/fontcacheP.h,v 1.4 2000/03/01 01:04:21 dawes Exp $ */
#ifndef _FONTCACHEP_H_
#define _FONTCACHEP_H_
@@ -54,7 +55,7 @@ struct fc_cache_statistics {
typedef struct fc_cache_settings FontCacheSettings, *FontCacheSettingsPtr;
typedef struct fc_cache_statistics FontCacheStatistics, *FontCacheStatisticsPtr;
-int FontCahceChangeSettings(FontCacheSettingsPtr /* cinfo */);
+int FontCacheChangeSettings(FontCacheSettingsPtr /* cinfo */);
void FontCacheGetSettings(FontCacheSettingsPtr /* cinfo */);
void FontCacheGetStatistics(FontCacheStatisticsPtr /* cstats */);
diff --git a/xc/include/extensions/fontcachstr.h b/xc/include/extensions/fontcachstr.h
index 0ab42e50f..7a6b732cf 100644
--- a/xc/include/extensions/fontcachstr.h
+++ b/xc/include/extensions/fontcachstr.h
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: fontcachstr.h,v 1.1.1.1 2000/02/22 15:39:20 kem Exp $
+ * Id: fontcachstr.h,v 1.7 1999/01/31 14:58:40 akiyama Exp $
*/
/* THIS IS NOT AN X CONSORTIUM STANDARD */
diff --git a/xc/include/extensions/panoramiXext.h b/xc/include/extensions/panoramiXext.h
index 0956a9d46..10444b822 100644
--- a/xc/include/extensions/panoramiXext.h
+++ b/xc/include/extensions/panoramiXext.h
@@ -22,11 +22,12 @@
/*
* PanoramiX definitions
*/
+/* $XFree86: xc/include/extensions/panoramiXext.h,v 3.5 2000/03/01 01:04:21 dawes Exp $ */
/* THIS IS NOT AN X PROJECT TEAM SPECIFICATION */
#define PANORAMIX_MAJOR_VERSION 1 /* current version number */
-#define PANORAMIX_MINOR_VERSION 0
+#define PANORAMIX_MINOR_VERSION 1
typedef struct {
Window window; /* PanoramiX window - may not exist */
diff --git a/xc/include/extensions/panoramiXproto.h b/xc/include/extensions/panoramiXproto.h
index ad8ea2d23..577c9fa50 100644
--- a/xc/include/extensions/panoramiXproto.h
+++ b/xc/include/extensions/panoramiXproto.h
@@ -19,6 +19,7 @@
* or in FAR 52.227-19, as applicable. *
* *
*****************************************************************/
+/* $XFree86: xc/include/extensions/panoramiXproto.h,v 3.5 2000/03/01 01:04:21 dawes Exp $ */
/* THIS IS NOT AN X PROJECT TEAM SPECIFICATION */
@@ -32,6 +33,9 @@
#define X_PanoramiXGetScreenCount 2
#define X_PanoramiXGetScreenSize 3
+#define X_XineramaIsActive 4
+#define X_XineramaQueryScreens 5
+
typedef struct _PanoramiXQueryVersion {
CARD8 reqType; /* always PanoramiXReqCode */
CARD8 panoramiXReqType; /* always X_PanoramiXQueryVersion */
@@ -128,13 +132,57 @@ typedef struct {
} xPanoramiXGetScreenSizeReply;
#define sz_panoramiXGetScreenSizeReply 32
-/* define any errors specific to this extension */
+/************ Alternate protocol ******************/
-/* If a client asks for ScreenCount when PanoramiX
- is not in use */
+typedef struct {
+ CARD8 reqType;
+ CARD8 panoramiXReqType;
+ CARD16 length B16;
+} xXineramaIsActiveReq;
+#define sz_xXineramaIsActiveReq 4
+
+typedef struct {
+ BYTE type;
+ CARD8 pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 state B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xXineramaIsActiveReply;
+#define sz_XineramaIsActiveReply 32
-/* If a client asks for Screen Size of a screen when
- PanoramiX is not in use */
+typedef struct {
+ CARD8 reqType;
+ CARD8 panoramiXReqType;
+ CARD16 length B16;
+} xXineramaQueryScreensReq;
+#define sz_xXineramaQueryScreensReq 4
+
+typedef struct {
+ BYTE type;
+ CARD8 pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 number B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xXineramaQueryScreensReply;
+#define sz_XineramaQueryScreensReply 32
+
+typedef struct {
+ INT16 x_org B16;
+ INT16 y_org B16;
+ CARD16 width B16;
+ CARD16 height B16;
+} xXineramaScreenInfo;
+#define sz_XineramaScreenInfo 8
#endif
diff --git a/xc/include/extensions/xf86bigfstr.h b/xc/include/extensions/xf86bigfstr.h
index 7152c0a7c..9e9c9e6eb 100644
--- a/xc/include/extensions/xf86bigfstr.h
+++ b/xc/include/extensions/xf86bigfstr.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/include/extensions/xf86bigfstr.h,v 1.1 2000/02/08 17:18:25 dawes Exp $ */
+/* $XFree86: xc/include/extensions/xf86bigfstr.h,v 1.2 2000/02/29 03:09:00 dawes Exp $ */
/*
* Declarations of request structures for the BIGFONT extension.
*
@@ -16,7 +16,7 @@
#define XF86BIGFONTNAME "XFree86-Bigfont"
#define XF86BIGFONT_MAJOR_VERSION 1 /* current version numbers */
-#define XF86BIGFONT_MINOR_VERSION 0
+#define XF86BIGFONT_MINOR_VERSION 1
typedef struct _XF86BigfontQueryVersion {
CARD8 reqType; /* always XF86BigfontReqCode */
@@ -34,19 +34,23 @@ typedef struct {
CARD16 minorVersion B16; /* minor version of XFree86-Bigfont */
CARD32 uid B32;
CARD32 gid B32;
+ CARD32 signature B32;
CARD32 pad1 B32;
CARD32 pad2 B32;
- CARD32 pad3 B32;
} xXF86BigfontQueryVersionReply;
#define sz_xXF86BigfontQueryVersionReply 32
+/* Bit masks that can be set in the capabilities */
+#define XF86Bigfont_CAP_LocalShm 1
+
typedef struct _XF86BigfontQueryFont {
CARD8 reqType; /* always XF86BigfontReqCode */
CARD8 xf86bigfontReqType; /* always X_XF86BigfontQueryFont */
CARD16 length B16;
CARD32 id B32;
+ CARD32 flags B32;
} xXF86BigfontQueryFontReq;
-#define sz_xXF86BigfontQueryFontReq 8
+#define sz_xXF86BigfontQueryFontReq 12
typedef struct {
BYTE type; /* X_Reply */
@@ -83,4 +87,7 @@ typedef struct {
} xXF86BigfontQueryFontReply;
#define sz_xXF86BigfontQueryFontReply 72
+/* Bit masks that can be set in the flags */
+#define XF86Bigfont_FLAGS_Shm 1
+
#endif /* _XF86BIGFSTR_H_ */
diff --git a/xc/include/extensions/xf86rush.h b/xc/include/extensions/xf86rush.h
index 346069086..32628b464 100644
--- a/xc/include/extensions/xf86rush.h
+++ b/xc/include/extensions/xf86rush.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/include/extensions/xf86rush.h,v 1.3 2000/02/11 22:35:44 dawes Exp $ */
+/* $XFree86: xc/include/extensions/xf86rush.h,v 1.4 2000/02/29 03:09:00 dawes Exp $ */
/*
Copyright (c) 1998 Daryll Strauss
@@ -20,6 +20,9 @@ Copyright (c) 1998 Daryll Strauss
#define X_XF86RushGetPixelStride 6
#define X_XF86RushSetPixelStride 7
#define X_XF86RushOverlayPixmap 8
+#define X_XF86RushStatusRegOffset 9
+#define X_XF86RushAT3DEnableRegs 10
+#define X_XF86RushAT3DDisableRegs 11
#define XF86RushNumberEvents 0
@@ -104,6 +107,27 @@ Bool XF86RushOverlayPixmap(
#endif
);
+int XF86RushStatusRegOffset(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ int /* screen */
+#endif
+);
+
+Bool XF86RushAT3DEnableRegs(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ int /* screen */
+#endif
+);
+
+Bool XF86RushAT3DDisableRegs(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ int /* screen */
+#endif
+);
+
_XFUNCPROTOEND
#endif /* _XF86RUSH_SERVER_ */
diff --git a/xc/include/extensions/xf86rushstr.h b/xc/include/extensions/xf86rushstr.h
index f38233d9d..e59478362 100644
--- a/xc/include/extensions/xf86rushstr.h
+++ b/xc/include/extensions/xf86rushstr.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/include/extensions/xf86rushstr.h,v 1.3 2000/02/11 22:35:44 dawes Exp $ */
+/* $XFree86: xc/include/extensions/xf86rushstr.h,v 1.4 2000/02/29 03:09:02 dawes Exp $ */
/*
Copyright (c) 1998 Daryll Strauss
@@ -119,4 +119,45 @@ typedef struct {
} xXF86RushOverlayPixmapReq;
#define sz_xXF86RushOverlayPixmapReq 40
+typedef struct _XF86RushStatusRegOffset {
+ CARD8 reqType; /* always RushReqCode */
+ CARD8 rushReqType; /* always X_RushStatusRegOffset */
+ CARD16 length B16;
+ CARD16 screen B16;
+ CARD16 pad B16;
+} xXF86RushStatusRegOffsetReq;
+#define sz_xXF86RushStatusRegOffsetReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 offset B32; /* Offset of Rush status reg in mem */
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xXF86RushStatusRegOffsetReply;
+#define sz_xXF86RushStatusRegOffsetReply 32
+
+typedef struct _XF86RushAT3DEnableRegs {
+ CARD8 reqType; /* always RushReqCode */
+ CARD8 rushReqType; /* always X_RushAT3DEnableRegs */
+ CARD16 length B16;
+ CARD16 screen B16;
+ CARD16 pad B16;
+} xXF86RushAT3DEnableRegsReq;
+#define sz_xXF86RushAT3DEnableRegsReq 8
+
+typedef struct _XF86RushAT3DDisableRegs {
+ CARD8 reqType; /* always RushReqCode */
+ CARD8 rushReqType; /* always X_RushAT3DDisableRegs */
+ CARD16 length B16;
+ CARD16 screen B16;
+ CARD16 pad B16;
+} xXF86RushAT3DDisableRegsReq;
+#define sz_xXF86RushAT3DDisableRegsReq 8
+
#endif /* _XF86RUSHSTR_H_ */
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_
diff --git a/xc/programs/Imakefile b/xc/programs/Imakefile
index 24415a90e..324ba930d 100644
--- a/xc/programs/Imakefile
+++ b/xc/programs/Imakefile
@@ -2,7 +2,7 @@ XCOMM $TOG: Imakefile /main/85 1998/02/26 17:14:44 kaleb $
XCOMM
XCOMM
XCOMM
-XCOMM $XFree86: xc/programs/Imakefile,v 3.23 1999/05/04 09:35:24 dawes Exp $
+XCOMM $XFree86: xc/programs/Imakefile,v 3.28 2000/02/26 05:35:07 dawes Exp $
#define IHaveSubdirs
#define PassCDebugFlags CDEBUGFLAGS="$(CDEBUGFLAGS)"
@@ -56,6 +56,10 @@ XFINDPROXYSRCDIR = xfindproxy
MKCFMSRCDIR = mkcfm
#endif
+#if BuildDPSLibraries
+ MAKEPSRESDIR = makepsres
+#endif
+
XPMCLIENTDIRS = cxpm sxpm
#if BuildServersOnly
@@ -64,15 +68,18 @@ SUBDIRS = $(XSSRCDIR)
SUBDIRS = \
appres bdftopcf bitmap \
$(SCREENSAVESRCDIR) editres fsinfo fslsfonts fstobdf iceauth \
- $(MKCFMSRCDIR) \
+ ico listres \
+ $(MAKEPSRESDIR) $(MKCFMSRCDIR) \
mkfontdir oclock $(PROXYMGRSRCDIR) $(RGBSRCDIR) $(RSTARTSRCDIR) \
- setxkbmap \
- $(SMPROXYSRCDIR) $(TWMSRCDIR) x11perf xauth xclipboard xclock \
- xcmsdb $(XCONSOLESRCDIR) $(XDMSRCDIR) xdpyinfo \
- $(XF86DGASRCDIR) xedit xfd $(XFSSRCDIR) \
- $(XFINDPROXYSRCDIR) $(XFWPSRCDIR) $(XGAMMASRCDIR) $(XHOSTSRCDIR) \
- xieperf $(XINITSRCDIR) $(XKBSRCDIRS) xkill xlogo xlsatoms xlsclients \
- xlsfonts xmag xmodmap xprop xrdb xrefresh $(XRXSRCDIR) xset \
+ setxkbmap showfont \
+ $(SMPROXYSRCDIR) $(TWMSRCDIR) viewres x11perf xauth xbiff xcalc \
+ xclipboard xclock \
+ xcmsdb $(XCONSOLESRCDIR) xditview $(XDMSRCDIR) xdpyinfo \
+ $(XF86DGASRCDIR) xedit xev xeyes xfd xfontsel $(XFSSRCDIR) \
+ $(XFINDPROXYSRCDIR) $(XFWPSRCDIR) $(XGAMMASRCDIR) xgc $(XHOSTSRCDIR) \
+ xieperf $(XINITSRCDIR) $(XKBSRCDIRS) xkill xload xlogo xlsatoms \
+ xlsclients xlsfonts xmag xman xmessage xmodmap xprop xrdb \
+ xrefresh $(XRXSRCDIR) xset \
xsetroot $(XSMSRCDIR) xstdcmap xsetmode xsetpointer \
$(XTERMSRCDIR) $(XVIDTUNESRCDIR) xwd xwininfo xwud \
$(XPMCLIENTDIRS) \
diff --git a/xc/programs/Xserver/GL/Imakefile b/xc/programs/Xserver/GL/Imakefile
index 34b3dd0ef..e757143f6 100644
--- a/xc/programs/Xserver/GL/Imakefile
+++ b/xc/programs/Xserver/GL/Imakefile
@@ -1,5 +1,4 @@
-XCOMM $XFree86: xc/programs/Xserver/GL/Imakefile,v 1.5 1999/08/14 10:49:22 dawes Exp $
-XCOMM $PI: xc/programs/Xserver/GL/Imakefile,v 1.14 1999/06/07 12:56:02 faith Exp $
+XCOMM $XFree86: xc/programs/Xserver/GL/Imakefile,v 1.6 2000/02/23 04:46:51 martin Exp $
#define IHaveModules
#include <Server.tmpl>
diff --git a/xc/programs/Xserver/GL/dri/Imakefile b/xc/programs/Xserver/GL/dri/Imakefile
index eec83ee85..0bda344d3 100644
--- a/xc/programs/Xserver/GL/dri/Imakefile
+++ b/xc/programs/Xserver/GL/dri/Imakefile
@@ -1,5 +1,4 @@
-XCOMM $XFree86: xc/programs/Xserver/GL/dri/Imakefile,v 1.4 1999/08/14 10:49:23 dawes Exp $
-XCOMM $PI: xc/programs/Xserver/GL/dri/Imakefile,v 1.13 1999/06/07 12:55:30 faith Exp $
+XCOMM $XFree86: xc/programs/Xserver/GL/dri/Imakefile,v 1.5 2000/02/23 04:46:52 martin Exp $
#define IHaveModules
#include <Server.tmpl>
diff --git a/xc/programs/Xserver/GL/dri/dri.c b/xc/programs/Xserver/GL/dri/dri.c
index 2996ecd27..68e638f27 100644
--- a/xc/programs/Xserver/GL/dri/dri.c
+++ b/xc/programs/Xserver/GL/dri/dri.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/dri/dri.c,v 1.11 2000/02/15 07:13:32 martin Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/dri/dri.c,v 1.13 2000/03/04 01:53:01 martin Exp $ */
/**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
@@ -223,11 +223,12 @@ Bool
DRIFinishScreenInit(ScreenPtr pScreen)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
+ DRIInfoPtr pDRIInfo = pDRIPriv->pDriverInfo;
DRIContextFlags flags = 0;
DRIContextPrivPtr pDRIContextPriv;
/* Set up flags for DRICreateContextPriv */
- switch (pDRIPriv->pDriverInfo->driverSwapMethod) {
+ switch (pDRIInfo->driverSwapMethod) {
case DRI_KERNEL_SWAP: flags = DRI_CONTEXT_2DONLY; break;
case DRI_HIDE_X_CONTEXT: flags = DRI_CONTEXT_PRESERVED; break;
}
@@ -248,7 +249,7 @@ DRIFinishScreenInit(ScreenPtr pScreen)
pDRIPriv->hiddenContextStore = NULL;
pDRIPriv->partial3DContextStore = NULL;
- switch(pDRIPriv->pDriverInfo->driverSwapMethod) {
+ switch(pDRIInfo->driverSwapMethod) {
case DRI_HIDE_X_CONTEXT:
/* Server will handle 3D swaps, and hide 2D swaps from kernel.
* Register server context as a preserved context.
@@ -256,7 +257,7 @@ DRIFinishScreenInit(ScreenPtr pScreen)
/* allocate memory for hidden context store */
pDRIPriv->hiddenContextStore
- = (void *)xalloc(pDRIPriv->pDriverInfo->contextSize);
+ = (void *)xalloc(pDRIInfo->contextSize);
if (!pDRIPriv->hiddenContextStore) {
DRIDrvMsg(pScreen->myNum, X_ERROR,
"failed to allocate hidden context\n");
@@ -266,7 +267,7 @@ DRIFinishScreenInit(ScreenPtr pScreen)
/* allocate memory for partial 3D context store */
pDRIPriv->partial3DContextStore
- = (void *)xalloc(pDRIPriv->pDriverInfo->contextSize);
+ = (void *)xalloc(pDRIInfo->contextSize);
if (!pDRIPriv->partial3DContextStore) {
DRIDrvMsg(pScreen->myNum, X_ERROR,
"[DRI] failed to allocate partial 3D context\n");
@@ -276,8 +277,8 @@ DRIFinishScreenInit(ScreenPtr pScreen)
}
/* save initial context store */
- if (pDRIPriv->pDriverInfo->SwapContext) {
- (*pDRIPriv->pDriverInfo->SwapContext)(
+ if (pDRIInfo->SwapContext) {
+ (*pDRIInfo->SwapContext)(
pScreen,
DRI_NO_SYNC,
DRI_2D_CONTEXT,
@@ -310,23 +311,29 @@ DRIFinishScreenInit(ScreenPtr pScreen)
}
/* Wrap DRI support */
- pDRIPriv->WakeupHandler = pScreen->WakeupHandler;
- pDRIPriv->BlockHandler = pScreen->BlockHandler;
- pDRIPriv->ValidateTree = pScreen->ValidateTree;
- pDRIPriv->PostValidateTree = pScreen->PostValidateTree;
- pScreen->WakeupHandler = DRIWakeupHandler;
- pScreen->BlockHandler = DRIBlockHandler;
- pScreen->ValidateTree = DRIValidateTree;
- pScreen->PostValidateTree = DRIPostValidateTree;
+ if (pDRIInfo->wrap.ValidateTree) {
+ pDRIPriv->wrap.ValidateTree = pScreen->ValidateTree;
+ pScreen->ValidateTree = pDRIInfo->wrap.ValidateTree;
+ }
+ if (pDRIInfo->wrap.PostValidateTree) {
+ pDRIPriv->wrap.PostValidateTree = pScreen->PostValidateTree;
+ pScreen->PostValidateTree = pDRIInfo->wrap.PostValidateTree;
+ }
/* Potentential optimization: don't wrap the following routines if
- pDRIPriv->pDriverInfo->bufferRequests == DRI_NO_WINDOWS */
- pDRIPriv->PaintWindowBackground = pScreen->PaintWindowBackground;
- pDRIPriv->PaintWindowBorder = pScreen->PaintWindowBorder;
- pDRIPriv->CopyWindow = pScreen->CopyWindow;
- pScreen->PaintWindowBackground = DRIPaintWindow;
- pScreen->PaintWindowBorder = DRIPaintWindow;
- pScreen->CopyWindow = DRICopyWindow;
+ pDRIInfo->bufferRequests == DRI_NO_WINDOWS */
+ if (pDRIInfo->wrap.PaintWindowBackground) {
+ pDRIPriv->wrap.PaintWindowBackground = pScreen->PaintWindowBackground;
+ pScreen->PaintWindowBackground = pDRIInfo->wrap.PaintWindowBackground;
+ }
+ if (pDRIInfo->wrap.PaintWindowBorder) {
+ pDRIPriv->wrap.PaintWindowBorder = pScreen->PaintWindowBorder;
+ pScreen->PaintWindowBorder = pDRIInfo->wrap.PaintWindowBorder;
+ }
+ if (pDRIInfo->wrap.CopyWindow) {
+ pDRIPriv->wrap.CopyWindow = pScreen->CopyWindow;
+ pScreen->CopyWindow = pDRIInfo->wrap.CopyWindow;
+ }
miClipNotify(DRIClipNotify);
DRIDrvMsg(pScreen->myNum, X_INFO, "[DRI] installation complete\n");
@@ -419,6 +426,8 @@ DRIExtensionInit(void)
return FALSE;
}
+ RegisterBlockAndWakeupHandlers(DRIBlockHandler, DRIWakeupHandler, NULL);
+
return TRUE;
}
@@ -938,8 +947,21 @@ DRIGetDeviceInfo(
DRIInfoPtr
DRICreateInfoRec(void)
{
- DRIInfoPtr inforec = xalloc(sizeof(DRIInfoRec));
+ DRIInfoPtr inforec = (DRIInfoPtr)xalloc(sizeof(DRIInfoRec));
+ if (!inforec) return NULL;
+
+ /* Initialize defaults */
inforec->busIdString = NULL;
+
+ /* Wrapped function defaults */
+ inforec->wrap.WakeupHandler = DRIDoWakeupHandler;
+ inforec->wrap.BlockHandler = DRIDoBlockHandler;
+ inforec->wrap.PaintWindowBackground = DRIPaintWindow;
+ inforec->wrap.PaintWindowBorder = DRIPaintWindow;
+ inforec->wrap.CopyWindow = DRICopyWindow;
+ inforec->wrap.ValidateTree = DRIValidateTree;
+ inforec->wrap.PostValidateTree = DRIPostValidateTree;
+
return inforec;
}
@@ -952,6 +974,44 @@ DRIDestroyInfoRec(DRIInfoPtr DRIInfo)
void
DRIWakeupHandler(
+ pointer wakeupData,
+ int result,
+ pointer pReadmask)
+{
+ int i;
+
+ for (i = 0; i < screenInfo.numScreens; i++) {
+ ScreenPtr pScreen = screenInfo.screens[i];
+ DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
+
+ if (pDRIPriv &&
+ pDRIPriv->pDriverInfo->wrap.WakeupHandler)
+ (*pDRIPriv->pDriverInfo->wrap.WakeupHandler)(i, wakeupData,
+ result, pReadmask);
+ }
+}
+
+void
+DRIBlockHandler(
+ pointer blockData,
+ OSTimePtr pTimeout,
+ pointer pReadmask)
+{
+ int i;
+
+ for (i = 0; i < screenInfo.numScreens; i++) {
+ ScreenPtr pScreen = screenInfo.screens[i];
+ DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
+
+ if (pDRIPriv &&
+ pDRIPriv->pDriverInfo->wrap.BlockHandler)
+ (*pDRIPriv->pDriverInfo->wrap.BlockHandler)(i, blockData,
+ pTimeout, pReadmask);
+ }
+}
+
+void
+DRIDoWakeupHandler(
int screenNum,
pointer wakeupData,
unsigned long result,
@@ -960,7 +1020,7 @@ DRIWakeupHandler(
ScreenPtr pScreen = screenInfo.screens[screenNum];
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
- DRILock(pScreen);
+ DRILock(pScreen, 0);
if (pDRIPriv->pDriverInfo->driverSwapMethod == DRI_HIDE_X_CONTEXT) {
/* hide X context by swapping 2D component here */
(*pDRIPriv->pDriverInfo->SwapContext)(pScreen,
@@ -970,38 +1030,18 @@ DRIWakeupHandler(
DRI_2D_CONTEXT,
pDRIPriv->hiddenContextStore);
}
-
- /* unwrap */
- pScreen->WakeupHandler = pDRIPriv->WakeupHandler;
-
- /* call lower layers */
- (*pScreen->WakeupHandler)(screenNum, wakeupData, result, pReadmask);
-
- /* rewrap */
- pDRIPriv->WakeupHandler = pScreen->WakeupHandler;
- pScreen->WakeupHandler = DRIWakeupHandler;
}
void
-DRIBlockHandler(
+DRIDoBlockHandler(
int screenNum,
pointer blockData,
- struct timeval **pTimeout,
+ pointer pTimeout,
pointer pReadmask)
{
ScreenPtr pScreen = screenInfo.screens[screenNum];
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
- /* unwrap */
- pScreen->BlockHandler = pDRIPriv->BlockHandler;
-
- /* call lower layers */
- (*pScreen->BlockHandler)(screenNum, blockData, pTimeout, pReadmask);
-
- /* rewrap */
- pDRIPriv->BlockHandler = pScreen->BlockHandler;
- pScreen->BlockHandler = DRIBlockHandler;
-
if (pDRIPriv->pDriverInfo->driverSwapMethod == DRI_HIDE_X_CONTEXT) {
/* hide X context by swapping 2D component here */
(*pDRIPriv->pDriverInfo->SwapContext)(pScreen,
@@ -1210,13 +1250,13 @@ DRIPaintWindow(
}
/* unwrap */
- pScreen->PaintWindowBackground = pDRIPriv->PaintWindowBackground;
+ pScreen->PaintWindowBackground = pDRIPriv->wrap.PaintWindowBackground;
/* call lower layers */
(*pScreen->PaintWindowBackground)(pWin, prgn, what);
/* rewrap */
- pDRIPriv->PaintWindowBackground = pScreen->PaintWindowBackground;
+ pDRIPriv->wrap.PaintWindowBackground = pScreen->PaintWindowBackground;
pScreen->PaintWindowBackground = DRIPaintWindow;
}
else {
@@ -1227,13 +1267,13 @@ DRIPaintWindow(
}
/* unwrap */
- pScreen->PaintWindowBorder = pDRIPriv->PaintWindowBorder;
+ pScreen->PaintWindowBorder = pDRIPriv->wrap.PaintWindowBorder;
/* call lower layers */
(*pScreen->PaintWindowBorder)(pWin, prgn, what);
/* rewrap */
- pDRIPriv->PaintWindowBorder = pScreen->PaintWindowBorder;
+ pDRIPriv->wrap.PaintWindowBorder = pScreen->PaintWindowBorder;
pScreen->PaintWindowBorder = DRIPaintWindow;
}
}
@@ -1269,13 +1309,13 @@ DRICopyWindow(
}
/* unwrap */
- pScreen->CopyWindow = pDRIPriv->CopyWindow;
+ pScreen->CopyWindow = pDRIPriv->wrap.CopyWindow;
/* call lower layers */
(*pScreen->CopyWindow)(pWin, ptOldOrg, prgnSrc);
/* rewrap */
- pDRIPriv->CopyWindow = pScreen->CopyWindow;
+ pDRIPriv->wrap.CopyWindow = pScreen->CopyWindow;
pScreen->CopyWindow = DRICopyWindow;
}
@@ -1358,7 +1398,7 @@ DRIValidateTree(
}
/* Call kernel to release lock */
- DRM_UNLOCK(pDRIPriv->drmFD, pDRIPriv->pSAREA, pDRIPriv->myContext);
+ DRIUnlock(pScreen);
/* Grab drawable spin lock: a time out between 10 and 30 seconds is
appropriate, since this should never time out except in the case of
@@ -1367,8 +1407,7 @@ DRIValidateTree(
DRISpinLockTimeout(&pDRIPriv->pSAREA->drawable_lock, 1, 10000); /* 10 secs */
/* Call kernel flush outstanding buffers and relock */
- DRM_LOCK(pDRIPriv->drmFD, pDRIPriv->pSAREA, pDRIPriv->myContext,
- DRM_LOCK_QUIESCENT|DRM_LOCK_FLUSH_ALL);
+ DRILock(pScreen, DRM_LOCK_QUIESCENT|DRM_LOCK_FLUSH_ALL);
/* Switch back to our 2D context if the X context is hidden */
if (pDRIPriv->pDriverInfo->driverSwapMethod == DRI_HIDE_X_CONTEXT) {
@@ -1382,13 +1421,13 @@ DRIValidateTree(
}
/* unwrap */
- pScreen->ValidateTree = pDRIPriv->ValidateTree;
+ pScreen->ValidateTree = pDRIPriv->wrap.ValidateTree;
/* call lower layers */
returnValue = (*pScreen->ValidateTree)(pParent, pChild, kind);
/* rewrap */
- pDRIPriv->ValidateTree = pScreen->ValidateTree;
+ pDRIPriv->wrap.ValidateTree = pScreen->ValidateTree;
pScreen->ValidateTree = DRIValidateTree;
return returnValue;
@@ -1410,15 +1449,15 @@ DRIPostValidateTree(
}
pDRIPriv = DRI_SCREEN_PRIV(pScreen);
- if (pDRIPriv->PostValidateTree) {
+ if (pDRIPriv->wrap.PostValidateTree) {
/* unwrap */
- pScreen->PostValidateTree = pDRIPriv->PostValidateTree;
+ pScreen->PostValidateTree = pDRIPriv->wrap.PostValidateTree;
/* call lower layers */
(*pScreen->PostValidateTree)(pParent, pChild, kind);
/* rewrap */
- pDRIPriv->PostValidateTree = pScreen->PostValidateTree;
+ pDRIPriv->wrap.PostValidateTree = pScreen->PostValidateTree;
pScreen->PostValidateTree = DRIPostValidateTree;
}
@@ -1464,11 +1503,11 @@ DRIGetDrawableIndex(
}
void
-DRILock(ScreenPtr pScreen) {
+DRILock(ScreenPtr pScreen, int flags) {
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
if (!lockRefCount)
- DRM_LIGHT_LOCK(pDRIPriv->drmFD, pDRIPriv->pSAREA, pDRIPriv->myContext);
+ DRM_LOCK(pDRIPriv->drmFD, pDRIPriv->pSAREA, pDRIPriv->myContext, flags);
lockRefCount++;
}
diff --git a/xc/programs/Xserver/GL/dri/dri.h b/xc/programs/Xserver/GL/dri/dri.h
index e04027161..d82ec5359 100644
--- a/xc/programs/Xserver/GL/dri/dri.h
+++ b/xc/programs/Xserver/GL/dri/dri.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/dri/dri.h,v 1.7 2000/02/14 06:27:13 martin Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/dri/dri.h,v 1.9 2000/03/04 01:53:02 martin Exp $ */
/**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
@@ -69,6 +69,21 @@ typedef int DRIWindowRequests;
#define DRI_3D_WINDOWS_ONLY 1
#define DRI_ALL_WINDOWS 2
+/*
+ * These functions can be wrapped by the DRI. Each of these have
+ * generic default funcs (initialized in DRICreateInfoRec) and can be
+ * overridden by the driver in its [driver]DRIScreenInit function.
+ */
+typedef struct {
+ ScreenWakeupHandlerProcPtr WakeupHandler;
+ ScreenBlockHandlerProcPtr BlockHandler;
+ PaintWindowBackgroundProcPtr PaintWindowBackground;
+ PaintWindowBorderProcPtr PaintWindowBorder;
+ CopyWindowProcPtr CopyWindow;
+ ValidateTreeProcPtr ValidateTree;
+ PostValidateTreeProcPtr PostValidateTree;
+} DRIWrappedFuncsRec, *DRIWrappedFuncsPtr;
+
typedef struct {
/* driver call back functions */
Bool (*CreateContext)(ScreenPtr pScreen,
@@ -93,6 +108,9 @@ typedef struct {
RegionPtr prgnSrc,
CARD32 index);
+ /* wrapped functions */
+ DRIWrappedFuncsRec wrap;
+
/* device info */
char* drmDriverName;
char* clientDriverName;
@@ -182,14 +200,22 @@ DRIInfoPtr DRICreateInfoRec(void);
void DRIDestroyInfoRec(DRIInfoPtr DRIInfo);
Bool DRIFinishScreenInit(ScreenPtr pScreen);
void DRIWakeupHandler(
+ pointer wakeupData,
+ int result,
+ pointer pReadmask);
+void DRIBlockHandler(
+ pointer blockData,
+ OSTimePtr pTimeout,
+ pointer pReadmask);
+void DRIDoWakeupHandler(
int screenNum,
pointer wakeupData,
unsigned long result,
pointer pReadmask);
-void DRIBlockHandler(
+void DRIDoBlockHandler(
int screenNum,
pointer blockData,
- struct timeval **pTimeout,
+ pointer pTimeout,
pointer pReadmask);
void DRISwapContext(
int drmFD,
@@ -218,7 +244,7 @@ void DRIClipNotify(
int dy);
CARD32 DRIGetDrawableIndex(
WindowPtr pWin);
-void DRILock(ScreenPtr pScreen);
+void DRILock(ScreenPtr pScreen, int flags);
void DRIUnlock(ScreenPtr pScreen);
void *DRIGetSAREAPrivate(ScreenPtr pScreen);
DRIContextPrivPtr
diff --git a/xc/programs/Xserver/GL/dri/drimodule.c b/xc/programs/Xserver/GL/dri/drimodule.c
index 9ea8c961b..e4e12df8b 100644
--- a/xc/programs/Xserver/GL/dri/drimodule.c
+++ b/xc/programs/Xserver/GL/dri/drimodule.c
@@ -24,14 +24,13 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
-/* $XFree86: xc/programs/Xserver/GL/dri/drimodule.c,v 1.2 2000/01/25 18:37:36 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/dri/drimodule.c,v 1.3 2000/02/23 04:46:52 martin Exp $ */
/*
* Authors:
* Kevin E. Martin <kevin@precisioninsight.com>
* Rickard E. Faith <faith@precisioninsight.com>
*
- * $PI: xc/programs/Xserver/GL/dri/drimodule.c,v 1.1 1999/06/07 12:55:30 faith Exp $
*/
#include "xf86Module.h"
diff --git a/xc/programs/Xserver/GL/dri/dristruct.h b/xc/programs/Xserver/GL/dri/dristruct.h
index 67da27c7a..392be3d97 100644
--- a/xc/programs/Xserver/GL/dri/dristruct.h
+++ b/xc/programs/Xserver/GL/dri/dristruct.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/dri/dristruct.h,v 1.5 2000/02/14 06:27:14 martin Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/dri/dristruct.h,v 1.7 2000/03/02 16:07: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:
* Jens Owen <jens@precisioninsight.com>
*
- * $PI: xc/programs/Xserver/GL/dri/dristruct.h,v 1.28 1999/08/04 18:12:56 faith Exp $
*/
#ifndef DRI_STRUCT_H
@@ -88,29 +87,7 @@ typedef struct _DRIScreenPrivRec
void** hiddenContextStore; /* hidden X context */
void** partial3DContextStore; /* parital 3D context */
DRIInfoPtr pDriverInfo;
- void (*WakeupHandler)(int screenNum,
- pointer wakeupData,
- unsigned long result,
- pointer pReadmask);
- void (*BlockHandler)(int screenNum,
- pointer blockData,
- struct timeval **pTimeout,
- pointer pReadmask);
- void (*PaintWindowBackground)(WindowPtr pWin,
- RegionPtr prgn,
- int what);
- void (*PaintWindowBorder)(WindowPtr pWin,
- RegionPtr prgn,
- int what);
- void (*CopyWindow)(WindowPtr pWin,
- DDXPointRec ptOldOrg,
- RegionPtr prgnSrc);
- int (*ValidateTree)(WindowPtr pParent,
- WindowPtr pChild,
- VTKind kind);
- void (*PostValidateTree)(WindowPtr pParent,
- WindowPtr pChild,
- VTKind kind);
+ DRIWrappedFuncsRec wrap;
DrawablePtr DRIDrawables[SAREA_MAX_DRAWABLES];
} DRIScreenPrivRec, *DRIScreenPrivPtr;
diff --git a/xc/programs/Xserver/GL/dri/sarea.h b/xc/programs/Xserver/GL/dri/sarea.h
index 86d4c4da2..c1054f0a0 100644
--- a/xc/programs/Xserver/GL/dri/sarea.h
+++ b/xc/programs/Xserver/GL/dri/sarea.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/dri/sarea.h,v 1.3 2000/02/14 06:27:14 martin Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/dri/sarea.h,v 1.4 2000/02/23 04:46:52 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/programs/Xserver/GL/dri/sarea.h,v 1.9 1999/05/19 01:26:35 martin Exp $
*/
#ifndef _SAREA_H_
diff --git a/xc/programs/Xserver/GL/dri/xf86dri.c b/xc/programs/Xserver/GL/dri/xf86dri.c
index daac61615..b39b57450 100644
--- a/xc/programs/Xserver/GL/dri/xf86dri.c
+++ b/xc/programs/Xserver/GL/dri/xf86dri.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/dri/xf86dri.c,v 1.5 2000/02/15 07:13:32 martin Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/dri/xf86dri.c,v 1.6 2000/02/23 04:46:52 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/programs/Xserver/GL/dri/xf86dri.c,v 1.20 1999/06/24 19:10:40 faith Exp $
*/
#if XFree86LOADER
diff --git a/xc/programs/Xserver/GL/glx/Imakefile b/xc/programs/Xserver/GL/glx/Imakefile
index c9e6767c4..be20058f1 100644
--- a/xc/programs/Xserver/GL/glx/Imakefile
+++ b/xc/programs/Xserver/GL/glx/Imakefile
@@ -1,5 +1,4 @@
-XCOMM $XFree86: xc/programs/Xserver/GL/glx/Imakefile,v 1.6 1999/06/14 14:28:46 dawes Exp $
-XCOMM $PI: xc/programs/Xserver/GL/glx/Imakefile,v 1.11 1999/05/27 03:43:33 jens Exp $
+XCOMM $XFree86: xc/programs/Xserver/GL/glx/Imakefile,v 1.7 2000/02/23 04:46:53 martin Exp $
#define IHaveModules
#include <Server.tmpl>
diff --git a/xc/programs/Xserver/GL/glxmodule.c b/xc/programs/Xserver/GL/glxmodule.c
index 6322f453b..a874bb6c9 100644
--- a/xc/programs/Xserver/GL/glxmodule.c
+++ b/xc/programs/Xserver/GL/glxmodule.c
@@ -25,13 +25,12 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
-/* $XFree86: xc/programs/Xserver/GL/glxmodule.c,v 1.8 2000/02/18 16:23:12 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/glxmodule.c,v 1.9 2000/02/23 04:46:51 martin Exp $ */
/*
* Authors:
* Kevin E. Martin <kevin@precisioninsight.com>
*
- * $PI: xc/programs/Xserver/GL/glxmodule.c,v 1.10 1999/06/08 11:01:04 faith Exp $
*/
#include "xf86Module.h"
diff --git a/xc/programs/Xserver/GL/include/GL/xf86glx.h b/xc/programs/Xserver/GL/include/GL/xf86glx.h
index f8a668cd1..7a467b9b5 100644
--- a/xc/programs/Xserver/GL/include/GL/xf86glx.h
+++ b/xc/programs/Xserver/GL/include/GL/xf86glx.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/include/GL/xf86glx.h,v 1.3 1999/06/14 07:31:41 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/include/GL/xf86glx.h,v 1.4 2000/02/23 04:46:54 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/programs/Xserver/GL/include/GL/xf86glx.h,v 1.6 1999/06/10 00:31:50 martin Exp $
*/
#include "miscstruct.h"
diff --git a/xc/programs/Xserver/GL/mesa/Imakefile b/xc/programs/Xserver/GL/mesa/Imakefile
index 397cb646d..45a2e7721 100644
--- a/xc/programs/Xserver/GL/mesa/Imakefile
+++ b/xc/programs/Xserver/GL/mesa/Imakefile
@@ -1,5 +1,4 @@
-XCOMM $XFree86: xc/programs/Xserver/GL/mesa/Imakefile,v 1.3 1999/06/14 14:37:12 dawes Exp $
-XCOMM $PI: xc/programs/Xserver/GL/mesa/Imakefile,v 1.3 1999/03/15 17:11:59 martin Exp $
+XCOMM $XFree86: xc/programs/Xserver/GL/mesa/Imakefile,v 1.4 2000/02/23 04:46:54 martin Exp $
#define IHaveModules
#include <Server.tmpl>
diff --git a/xc/programs/Xserver/GL/mesa/include/GL/Imakefile b/xc/programs/Xserver/GL/mesa/include/GL/Imakefile
index 654d183fd..3bef7e2db 100644
--- a/xc/programs/Xserver/GL/mesa/include/GL/Imakefile
+++ b/xc/programs/Xserver/GL/mesa/include/GL/Imakefile
@@ -1,5 +1,4 @@
-XCOMM $XFree86: xc/programs/Xserver/GL/mesa/include/GL/Imakefile,v 1.3 2000/02/08 17:18:51 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/programs/Xserver/GL/mesa/include/GL/Imakefile,v 1.4 2000/02/23 04:46:55 martin Exp $
#define IHaveModules
#include <Server.tmpl>
diff --git a/xc/programs/Xserver/GL/mesa/include/Imakefile b/xc/programs/Xserver/GL/mesa/include/Imakefile
index c42ca7c75..01129e606 100644
--- a/xc/programs/Xserver/GL/mesa/include/Imakefile
+++ b/xc/programs/Xserver/GL/mesa/include/Imakefile
@@ -1,5 +1,4 @@
-XCOMM $XFree86: xc/programs/Xserver/GL/mesa/include/Imakefile,v 1.2 1999/06/14 07:31:41 dawes Exp $
-XCOMM $PI: xc/programs/Xserver/GL/mesa/include/Imakefile,v 1.4 1999/03/15 21:36:09 martin Exp $
+XCOMM $XFree86: xc/programs/Xserver/GL/mesa/include/Imakefile,v 1.3 2000/02/23 04:46:54 martin Exp $
#define IHaveModules
#include <Server.tmpl>
diff --git a/xc/programs/Xserver/GL/mesa/src/GLcoremodule.c b/xc/programs/Xserver/GL/mesa/src/GLcoremodule.c
index aa8a85c8a..422da4820 100644
--- a/xc/programs/Xserver/GL/mesa/src/GLcoremodule.c
+++ b/xc/programs/Xserver/GL/mesa/src/GLcoremodule.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/mesa/src/GLcoremodule.c,v 1.4 2000/02/18 16:23:12 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/mesa/src/GLcoremodule.c,v 1.5 2000/02/23 04:46:55 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/programs/Xserver/GL/mesa/src/GLcoremodule.c,v 1.6 1999/05/27 03:43:46 jens Exp $
*/
#include "xf86Module.h"
diff --git a/xc/programs/Xserver/GL/mesa/src/Imakefile b/xc/programs/Xserver/GL/mesa/src/Imakefile
index b4e753ede..29ae102d4 100644
--- a/xc/programs/Xserver/GL/mesa/src/Imakefile
+++ b/xc/programs/Xserver/GL/mesa/src/Imakefile
@@ -1,5 +1,4 @@
-XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/Imakefile,v 1.11 2000/02/18 12:18:56 tsi Exp $
-XCOMM $PI: xc/programs/Xserver/GL/mesa/src/Imakefile,v 1.9 1999/05/27 03:43:46 jens Exp $
+XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/Imakefile,v 1.13 2000/03/02 16:07:38 martin Exp $
#define IHaveModules
#include <Server.tmpl>
@@ -67,6 +66,9 @@ LinkSourceFile(fixed.h,../../../../../extras/Mesa/src)
LinkSourceFile(fog.c,../../../../../extras/Mesa/src)
LinkSourceFile(fog.h,../../../../../extras/Mesa/src)
LinkSourceFile(fog_tmp.h,../../../../../extras/Mesa/src)
+LinkSourceFile(general_clip.h,../../../../../extras/Mesa/src)
+LinkSourceFile(get.c,../../../../../extras/Mesa/src)
+LinkSourceFile(get.h,../../../../../extras/Mesa/src)
LinkSourceFile(glapi.h,../../../../../extras/Mesa/src)
LinkSourceFile(glapi.c,../../../../../extras/Mesa/src)
LinkSourceFile(glapioffsets.h,../../../../../extras/Mesa/src)
@@ -77,9 +79,6 @@ LinkSourceFile(glapitemp.h,../../../../../extras/Mesa/src)
LinkSourceFile(glheader.h,../../../../../extras/Mesa/src)
LinkSourceFile(glthread.c,../../../../../extras/Mesa/src)
LinkSourceFile(glthread.h,../../../../../extras/Mesa/src)
-LinkSourceFile(general_clip.h,../../../../../extras/Mesa/src)
-LinkSourceFile(get.c,../../../../../extras/Mesa/src)
-LinkSourceFile(get.h,../../../../../extras/Mesa/src)
LinkSourceFile(hash.c,../../../../../extras/Mesa/src)
LinkSourceFile(hash.h,../../../../../extras/Mesa/src)
LinkSourceFile(hint.c,../../../../../extras/Mesa/src)
diff --git a/xc/programs/Xserver/GL/mesa/src/X/Imakefile b/xc/programs/Xserver/GL/mesa/src/X/Imakefile
index 9dd8819e4..83d864cb7 100644
--- a/xc/programs/Xserver/GL/mesa/src/X/Imakefile
+++ b/xc/programs/Xserver/GL/mesa/src/X/Imakefile
@@ -1,5 +1,4 @@
-XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/X/Imakefile,v 1.6 2000/02/08 17:18:52 dawes Exp $
-XCOMM $PI: xc/programs/Xserver/GL/mesa/src/X/Imakefile,v 1.6 1999/03/15 21:36:10 martin Exp $
+XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/X/Imakefile,v 1.7 2000/02/23 04:46:56 martin Exp $
#define IHaveModules
#include <Server.tmpl>
diff --git a/xc/programs/Xserver/GL/mesa/src/X/xf86glx.c b/xc/programs/Xserver/GL/mesa/src/X/xf86glx.c
index 3555ba070..f305e3488 100644
--- a/xc/programs/Xserver/GL/mesa/src/X/xf86glx.c
+++ b/xc/programs/Xserver/GL/mesa/src/X/xf86glx.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/mesa/src/X/xf86glx.c,v 1.6 2000/02/08 17:18:52 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/mesa/src/X/xf86glx.c,v 1.7 2000/02/23 04:46:56 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/programs/Xserver/GL/mesa/src/X/xf86glx.c,v 1.15 1999/08/04 18:14:14 faith Exp $
*/
#include <miscstruct.h>
diff --git a/xc/programs/Xserver/GL/mesa/src/X/xf86glx_util.c b/xc/programs/Xserver/GL/mesa/src/X/xf86glx_util.c
index c0cafaa8e..ff2654830 100644
--- a/xc/programs/Xserver/GL/mesa/src/X/xf86glx_util.c
+++ b/xc/programs/Xserver/GL/mesa/src/X/xf86glx_util.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/mesa/src/X/xf86glx_util.c,v 1.3 1999/06/14 07:31:43 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/mesa/src/X/xf86glx_util.c,v 1.5 2000/03/02 16:07:39 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/programs/Xserver/GL/mesa/src/X/xf86glx_util.c,v 1.6 1999/05/27 03:43:48 jens Exp $
+ * Brian Paul <brian@precisioninsight.com>
*/
#include <gcstruct.h>
@@ -45,7 +44,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define ROUNDUP(nbytes, pad) ((((nbytes) + ((pad)-1)) / (pad)) * ((pad)>>3))
-XMesaImage *XMesaCreateImage(int depth, int width, int height, char *data)
+XMesaImage *XMesaCreateImage(int bitsPerPixel, int width, int height, char *data)
{
XMesaImage *image;
@@ -56,8 +55,8 @@ XMesaImage *XMesaCreateImage(int depth, int width, int height, char *data)
image->height = height;
image->data = data;
/* Always pad to 32 bits */
- image->bytes_per_line = ROUNDUP((depth * width), 32);
- image->bits_per_pixel = depth;
+ image->bytes_per_line = ROUNDUP((bitsPerPixel * width), 32);
+ image->bits_per_pixel = bitsPerPixel;
}
return image;
diff --git a/xc/programs/Xserver/GL/mesa/src/X/xf86glx_util.h b/xc/programs/Xserver/GL/mesa/src/X/xf86glx_util.h
index e5a88fe86..ba9a04f9d 100644
--- a/xc/programs/Xserver/GL/mesa/src/X/xf86glx_util.h
+++ b/xc/programs/Xserver/GL/mesa/src/X/xf86glx_util.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/mesa/src/X/xf86glx_util.h,v 1.2 1999/06/14 07:31:43 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/mesa/src/X/xf86glx_util.h,v 1.4 2000/03/02 16:07:39 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/programs/Xserver/GL/mesa/src/X/xf86glx_util.h,v 1.5 1999/03/15 21:36:10 martin Exp $
+ * Brian Paul <brian@precisioninsight.com>
*/
#ifndef _XF86GLX_UTIL_H_
@@ -50,7 +49,7 @@ struct _XMesaImageRec {
int bits_per_pixel;
};
-extern XMesaImage *XMesaCreateImage(int depth, int width, int height,
+extern XMesaImage *XMesaCreateImage(int bitsPerPixel, int width, int height,
char *data);
extern void XMesaDestroyImage(XMesaImage *image);
extern unsigned long XMesaGetPixel(XMesaImage *image, int x, int y);
diff --git a/xc/programs/Xserver/GL/mesa/src/X/xf86glxint.h b/xc/programs/Xserver/GL/mesa/src/X/xf86glxint.h
index bd000fde8..c403c00fd 100644
--- a/xc/programs/Xserver/GL/mesa/src/X/xf86glxint.h
+++ b/xc/programs/Xserver/GL/mesa/src/X/xf86glxint.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/mesa/src/X/xf86glxint.h,v 1.2 1999/06/14 07:31:44 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/mesa/src/X/xf86glxint.h,v 1.3 2000/02/23 04:46:57 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/programs/Xserver/GL/mesa/src/X/xf86glxint.h,v 1.7 1999/04/11 04:20:55 martin Exp $
*/
#ifndef _XF86GLXINT_H_
diff --git a/xc/programs/Xserver/Imakefile b/xc/programs/Xserver/Imakefile
index f0ca1ff94..45300d897 100644
--- a/xc/programs/Xserver/Imakefile
+++ b/xc/programs/Xserver/Imakefile
@@ -2,7 +2,7 @@ XCOMM $TOG: Imakefile /main/249 1997/12/11 11:18:14 kaleb $
/*
* Server Master Makefile
*/
-XCOMM $XFree86: xc/programs/Xserver/Imakefile,v 3.180 2000/02/11 18:06:39 dawes Exp $
+XCOMM $XFree86: xc/programs/Xserver/Imakefile,v 3.182 2000/02/29 15:24:15 tsi Exp $
#ifndef InstallXserverSetUID
#define InstallXserverSetUID NO
@@ -612,13 +612,14 @@ XF86IDRIVERLIB = $(XF86SRC)/input/LibraryTargetName(idriver)
#if !DoLoadableServer
XF86DRVOBJS = $(XF86SRC)/drivers/drvConf.o
XF86DRVLIBS = $(XF86DRIVERLIB) $(XF86RAMDACLIB) $(XF86DDCLIB) $(XF86I2CLIB) \
- $(XF86INT10LIB) $(XF86XAALIB) $(XF86VGAHWLIB) $(XF86FBDEVHWLIB) \
+ $(XF86XAALIB) $(XF86VGAHWLIB) $(XF86FBDEVHWLIB) \
$(XF8_32BPPLIB) $(XF8_16BPPLIB) $(XF24_32BPPLIB) \
$(XF4BPPLIB) $(XF1BPPLIB) $(XFSHADOWFBLIB) $(AFBLIB)
XF86IDRVOBJS = $(XF86SRC)/input/drvConf.o
XF86IDRVLIBS = $(XF86IDRIVERLIB)
XF86SCANLIB = $(XF86SRC)/scanpci/LibraryTargetName(scanpci)
-XF86LIBS = $(XF86INIT) $(XF86COMLIB) $(XF86RACLIB) $(XF86PARSLIB) $(XF86OSLIB)
+XF86LIBS = $(XF86INIT) $(XF86COMLIB) $(XF86RACLIB) $(XF86PARSLIB) \
+ $(XF86OSLIB) $(XF86INT10LIB)
#else
XF86LIBS = $(XF86INIT) $(XF86COMLIB) $(XF86PARSLIB) $(XF86OSLIB)
#endif
@@ -637,7 +638,7 @@ XF86SERVERLIBS = $(XF86DRVLIBS) $(XF86IDRVLIBS) $(XF86LIBS) $(XF86LOADERLIB) \
#if HasParallelMake
MakeMutex($(XF86SERVERSUBDIRS) $(XF86SERVERLIBS) $(XF86SERVERSYSLIBS))
#endif
-#if HasGnuMake
+#if ForceServerRemake
$(XF86SERVERLIBS) $(XF86SERVERSYSLIBS):: $(XF86SERVERSUBDIRS)
@if [ -f $@ ]; then touch $@; fi
#endif
@@ -695,7 +696,7 @@ FBDEVSYSLIBS = StdKdSysLibs
#if HasParallelMake
MakeMutex($(FBDEVDIRS) $(FBDEVOBJS) $(FBDEVLIBS) $(FBDEVSYSLIBS))
#endif
-#if HasGnuMake
+#if ForceServerRemake
$(FBDEVOBJS) $(XFBDEV) $(FBDEVLIBS) $(FBDEVSYSLIBS):: $(FBDEVDIRS)
@if [ -f $@ ]; then touch $@; fi
#endif
@@ -720,7 +721,7 @@ SAVAGESYSLIBS = StdKdSysLibs
#if HasParallelMake
MakeMutex($(SAVAGEDIRS) $(SAVAGEOBJS) $(SAVAGELIBS) $(SAVAGESYSLIBS))
#endif
-#if HasGnuMake
+#if ForceServerRemake
$(SAVAGEOBJS) $(XSAVAGE) $(SAVAGELIBS) $(SAVAGESYSLIBS):: $(SAVAGEDIRS)
@if [ -f $@ ]; then touch $@; fi
#endif
@@ -747,7 +748,7 @@ TRIDENTSYSLIBS = StdKdSysLibs
#if HasParallelMake
MakeMutex($(TRIDENTDIRS) $(TRIDENTLIBS) $(TRIDENTSYSLIBS))
#endif
-#if HasGnuMake
+#if ForceServerRemake
$(TRIDENTOBJS) $(TRIDENTLIBS) $(TRIDENTSYSLIBS):: $(TRIDENTDIRS)
@if [ -f $@ ]; then touch $@; fi
#endif
@@ -772,7 +773,7 @@ SIS530SYSLIBS = StdKdSysLibs
#if HasParallelMake
MakeMutex($(SIS530DIRS) $(SIS530OBJS) $(SIS530LIBS) $(SIS530SYSLIBS))
#endif
-#if HasGnuMake
+#if ForceServerRemake
$(SIS530OBJS) $(SIS530LIBS) $(SIS530SYSLIBS):: $(SIS530DIRS)
@if [ -f $@ ]; then touch $@; fi
#endif
@@ -797,7 +798,7 @@ TRIOSYSLIBS = StdKdSysLibs
#if HasParallelMake
MakeMutex($(TRIODIRS) $(TRIOOBJS) $(TRIOLIBS) $(TRIOSYSLIBS))
#endif
-#if HasGnuMake
+#if ForceServerRemake
$(TRIOOBJS) $(TRIOLIBS) $(TRIOSYSLIBS):: $(TRIODIRS)
@if [ -f $@ ]; then touch $@; fi
#endif
@@ -828,7 +829,7 @@ XCOMM
#if HasParallelMake
MakeMutex($(TS300DIRS) $(TS300OBJS) $(TS300LIBS) $(TS300SYSLIBS))
#endif
-#if HasGnuMake
+#if ForceServerRemake
$(TS300OBJS) $(TS300LIBS) $(TS300SYSLIBS):: $(TS300DIRS)
@if [ -f $@ ]; then touch $@; fi
#endif
@@ -852,7 +853,7 @@ ITSYSYSLIBS = StdKdSysLibs
#if HasParallelMake
MakeMutex($(ITSYDIRS) $(ITSYOBJS) $(ITSYLIBS) $(ITSYSYSLIBS))
#endif
-#if HasGnuMake
+#if ForceServerRemake
$(ITSYOBJS) $(ITSYLIBS) $(ITSYSYSLIBS):: $(ITSYDIRS)
@if [ -f $@ ]; then touch $@; fi
#endif
@@ -888,7 +889,7 @@ XPSYSLIBS = $(FONTLIBS) $(CBRT) $(SYSLIBS)
#if HasParallelMake
MakeMutex($(XPSUBDIRS) $(XPOBJS) $(XPLIBS) $(XPSYSLIBS))
#endif
-#if HasGnuMake
+#if ForceServerRemake
$(XPOBJS) $(XPLIBS) $(XPSYSLIBS):: $(XPSUBDIRS)
@if [ -f $@ ]; then touch $@; fi
#endif
@@ -920,7 +921,7 @@ XNESTSYSLIBS = $(FONTLIBS) $(LDPRELIBS) $(XLIB) $(SYSLIBS)
#if HasParallelMake
MakeMutex($(XNESTDIRS) $(XNESTOBJS) $(XNESTLIBS) $(XNESTSYSLIBS))
#endif
-#if HasGnuMake
+#if ForceServerRemake
$(XNESTOBJS) $(XNESTLIBS) $(XNESTSYSLIBS):: $(XNESTDIRS)
@if [ -f $@ ]; then touch $@; fi
#endif
@@ -977,7 +978,7 @@ XVFBSYSLIBS = $(FONTLIBS) $(SYSLIBS)
#if HasParallelMake
MakeMutex($(XVFBDIRS) $(XVFBOBJS) $(XVFB) $(XVFBLIBS) $(XVFBSYSLIBS))
#endif
-#if HasGnuMake
+#if ForceServerRemake
$(XVFBOBJS) $(XVFB) $(XVFBLIBS) $(XVFBSYSLIBS):: $(XVFBDIRS)
@if [ -f $@ ]; then touch $@; fi
#endif
diff --git a/xc/programs/Xserver/Xext/fontcache.c b/xc/programs/Xserver/Xext/fontcache.c
index cd92f931f..cad7dcfba 100644
--- a/xc/programs/Xserver/Xext/fontcache.c
+++ b/xc/programs/Xserver/Xext/fontcache.c
@@ -25,9 +25,9 @@
* 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:41:12 kem Exp $
+ * Id: fontcache.c,v 1.12 1999/01/31 13:47:45 akiyama Exp $
*/
-/* $XFree86: xc/programs/Xserver/Xext/fontcache.c,v 1.4 2000/02/18 16:16:51 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/fontcache.c,v 1.5 2000/02/23 20:29:39 dawes Exp $ */
/* THIS IS NOT AN X CONSORTIUM STANDARD */
diff --git a/xc/programs/Xserver/Xext/panoramiX.c b/xc/programs/Xserver/Xext/panoramiX.c
index 0faee97e8..35456cd4b 100644
--- a/xc/programs/Xserver/Xext/panoramiX.c
+++ b/xc/programs/Xserver/Xext/panoramiX.c
@@ -19,7 +19,7 @@
* or in FAR 52.227-19, as applicable. *
* *
*****************************************************************/
-/* $XFree86: xc/programs/Xserver/Xext/panoramiX.c,v 3.15 2000/01/22 01:59:03 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/panoramiX.c,v 3.17 2000/03/03 22:17:37 mvojkovi Exp $ */
#define NEED_REPLIES
#include <stdio.h>
@@ -405,6 +405,27 @@ PanoramiXChangeWindow(int ScrnNum, WindowPtr pWin)
return pWin;
}
+typedef struct _connect_callback_list {
+ void (*func)(void);
+ struct _connect_callback_list *next;
+} XineramaConnectionCallbackList;
+
+static XineramaConnectionCallbackList *ConnectionCallbackList = NULL;
+
+Bool
+XineramaRegisterConnectionBlockCallback(void (*func)(void))
+{
+ XineramaConnectionCallbackList *newlist;
+
+ if(!(newlist = xalloc(sizeof(XineramaConnectionCallbackList))))
+ return FALSE;
+
+ newlist->next = ConnectionCallbackList;
+ newlist->func = func;
+ ConnectionCallbackList = newlist;
+
+ return TRUE;
+}
/*
* PanoramiXExtensionInit():
@@ -698,6 +719,16 @@ Bool PanoramiXCreateConnectionBlock(void)
height_mult = root->pixHeight / old_height;
root->mmWidth *= width_mult;
root->mmHeight *= height_mult;
+
+ while(ConnectionCallbackList) {
+ pointer tmp;
+
+ tmp = (pointer)ConnectionCallbackList;
+ (*ConnectionCallbackList->func)();
+ ConnectionCallbackList = ConnectionCallbackList->next;
+ xfree(tmp);
+ }
+
return TRUE;
}
@@ -850,6 +881,8 @@ ProcPanoramiXQueryVersion (ClientPtr client)
if (client->swapped) {
swaps(&rep.sequenceNumber, n);
swapl(&rep.length, n);
+ swaps(&rep.majorVersion, n);
+ swaps(&rep.minorVersion, n);
}
WriteToClient(client, sizeof (xPanoramiXQueryVersionReply), (char *)&rep);
return (client->noClientException);
@@ -935,6 +968,73 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
}
+int
+ProcXineramaIsActive(ClientPtr client)
+{
+ REQUEST(xXineramaIsActiveReq);
+ xXineramaIsActiveReply rep;
+
+ REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
+
+ rep.type = X_Reply;
+ rep.length = 0;
+ rep.sequenceNumber = client->sequence;
+ rep.state = !noPanoramiXExtension;
+ if (client->swapped) {
+ register int n;
+ swaps (&rep.sequenceNumber, n);
+ swapl (&rep.length, n);
+ swapl (&rep.state, n);
+ }
+ WriteToClient (client, sizeof (xXineramaIsActiveReply), (char *) &rep);
+ return client->noClientException;
+}
+
+
+int
+ProcXineramaQueryScreens(ClientPtr client)
+{
+ REQUEST(xXineramaQueryScreensReq);
+ xXineramaQueryScreensReply rep;
+
+ REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
+
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.number = (noPanoramiXExtension) ? 0 : PanoramiXNumScreens;
+ rep.length = rep.number * sz_XineramaScreenInfo >> 2;
+ if (client->swapped) {
+ register int n;
+ swaps (&rep.sequenceNumber, n);
+ swapl (&rep.length, n);
+ swapl (&rep.number, n);
+ }
+ WriteToClient (client, sizeof (xXineramaQueryScreensReply), (char *) &rep);
+
+ if(!noPanoramiXExtension) {
+ xXineramaScreenInfo scratch;
+ int i;
+
+ for(i = 0; i < PanoramiXNumScreens; i++) {
+ scratch.x_org = panoramiXdataPtr[i].x;
+ scratch.y_org = panoramiXdataPtr[i].y;
+ scratch.width = panoramiXdataPtr[i].width;
+ scratch.height = panoramiXdataPtr[i].height;
+
+ if(client->swapped) {
+ register int n;
+ swaps (&scratch.x_org, n);
+ swaps (&scratch.y_org, n);
+ swaps (&scratch.width, n);
+ swaps (&scratch.height, n);
+ }
+ WriteToClient (client, sz_XineramaScreenInfo, (char *) &scratch);
+ }
+ }
+
+ return client->noClientException;
+}
+
static int
ProcPanoramiXDispatch (ClientPtr client)
@@ -949,6 +1049,10 @@ ProcPanoramiXDispatch (ClientPtr client)
return ProcPanoramiXGetScreenCount(client);
case X_PanoramiXGetScreenSize:
return ProcPanoramiXGetScreenSize(client);
+ case X_XineramaIsActive:
+ return ProcXineramaIsActive(client);
+ case X_XineramaQueryScreens:
+ return ProcXineramaQueryScreens(client);
}
return BadRequest;
}
diff --git a/xc/programs/Xserver/Xext/panoramiXSwap.c b/xc/programs/Xserver/Xext/panoramiXSwap.c
index 0ccb67993..84b741a6c 100644
--- a/xc/programs/Xserver/Xext/panoramiXSwap.c
+++ b/xc/programs/Xserver/Xext/panoramiXSwap.c
@@ -19,7 +19,7 @@
* or in FAR 52.227-19, as applicable. *
* *
*****************************************************************/
-/* $XFree86: xc/programs/Xserver/Xext/panoramiXSwap.c,v 3.5 1999/07/18 08:34:27 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/panoramiXSwap.c,v 3.6 2000/02/27 23:15:30 mvojkovi Exp $ */
#include <stdio.h>
#include "X.h"
@@ -64,50 +64,38 @@ extern int (* ProcVector[256]) ();
PROC_EXTERN(ProcPanoramiXQueryVersion);
PROC_EXTERN(ProcPanoramiXGetState);
PROC_EXTERN(ProcPanoramiXGetScreenCount);
-PROC_EXTERN(PropPanoramiXGetScreenSize);
+PROC_EXTERN(ProcPanoramiXGetScreenSize);
+
+PROC_EXTERN(ProcXineramaIsActive);
+PROC_EXTERN(ProcXineramaQueryScreens);
static int
-#if NeedFunctionPrototypes
SProcPanoramiXQueryVersion (ClientPtr client)
-#else
-SProcPanoramiXQueryVersion (client)
- register ClientPtr client;
-#endif
{
- register int n;
- REQUEST(xPanoramiXQueryVersionReq);
+ REQUEST(xPanoramiXQueryVersionReq);
+ register int n;
- swaps(&stuff->length,n);
- REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq);
- return ProcPanoramiXQueryVersion(client);
+ swaps(&stuff->length,n);
+ REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq);
+ return ProcPanoramiXQueryVersion(client);
}
static int
-#if NeedFunctionPrototypes
SProcPanoramiXGetState(ClientPtr client)
-#else
-SProcPanoramiXGetState(client)
- register ClientPtr client;
-#endif
{
REQUEST(xPanoramiXGetStateReq);
- register int n;
+ register int n;
swaps (&stuff->length, n);
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
-
+ return ProcPanoramiXGetState(client);
}
static int
-#if NeedFunctionPrototypes
SProcPanoramiXGetScreenCount(ClientPtr client)
-#else
-SProcPanoramixGetScreenCount(client)
- register ClientPtr client;
-#endif
{
REQUEST(xPanoramiXGetScreenCountReq);
- register int n;
+ register int n;
swaps (&stuff->length, n);
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
@@ -115,29 +103,43 @@ SProcPanoramixGetScreenCount(client)
}
static int
-#if NeedFunctionPrototypes
SProcPanoramiXGetScreenSize(ClientPtr client)
-#else
-SProcPanoramiXGetScreenSize(client)
- register ClientPtr client;
-#endif
{
REQUEST(xPanoramiXGetScreenSizeReq);
- WindowPtr pWin;
- register int n;
+ register int n;
swaps (&stuff->length, n);
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
return ProcPanoramiXGetScreenSize(client);
}
+
+static int
+SProcXineramaIsActive(ClientPtr client)
+{
+ REQUEST(xXineramaIsActiveReq);
+ register int n;
+
+ swaps (&stuff->length, n);
+ REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
+ return ProcXineramaIsActive(client);
+}
+
+
+static int
+SProcXineramaQueryScreens(ClientPtr client)
+{
+ REQUEST(xXineramaQueryScreensReq);
+ register int n;
+
+ swaps (&stuff->length, n);
+ REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
+ return ProcXineramaQueryScreens(client);
+}
+
+
int
-#if NeedFunctionPrototypes
SProcPanoramiXDispatch (ClientPtr client)
-#else
-SProcPanoramiXDispatch (client)
- ClientPtr client;
-#endif
{ REQUEST(xReq);
switch (stuff->data)
{
@@ -149,6 +151,10 @@ SProcPanoramiXDispatch (client)
return SProcPanoramiXGetScreenCount(client);
case X_PanoramiXGetScreenSize:
return SProcPanoramiXGetScreenSize(client);
- return BadRequest;
+ case X_XineramaIsActive:
+ return SProcXineramaIsActive(client);
+ case X_XineramaQueryScreens:
+ return SProcXineramaQueryScreens(client);
}
+ return BadRequest;
}
diff --git a/xc/programs/Xserver/Xext/panoramiXprocs.c b/xc/programs/Xserver/Xext/panoramiXprocs.c
index 71629fc85..48e962d89 100644
--- a/xc/programs/Xserver/Xext/panoramiXprocs.c
+++ b/xc/programs/Xserver/Xext/panoramiXprocs.c
@@ -22,7 +22,7 @@
/* Massively rewritten by Mark Vojkovich <markv@valinux.com> */
-/* $XFree86: xc/programs/Xserver/Xext/panoramiXprocs.c,v 3.21 2000/01/22 01:59:03 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/panoramiXprocs.c,v 3.22 2000/02/27 23:15:30 mvojkovi Exp $ */
#include <stdio.h>
#include "X.h"
@@ -1251,7 +1251,7 @@ int PanoramiXPolyLine(ClientPtr client)
memcpy((char *) origPts, (char *) &stuff[1], npoint * sizeof(xPoint));
FOR_NSCREENS_FORWARD(j){
- if(j) memcpy(&stuff[1], origPts, npoint * sizeof(xPoint));
+ if(j) memcpy(&stuff[1], origPts, npoint * sizeof(xPoint));
if (isRoot) {
int x_off = panoramiXdataPtr[j].x;
@@ -1382,7 +1382,8 @@ int PanoramiXPolyRectangle(ClientPtr client)
int x_off = panoramiXdataPtr[j].x;
int y_off = panoramiXdataPtr[j].y;
- if(x_off || x_off) {
+
+ if(x_off || y_off) {
xRectangle *rects = (xRectangle *) &stuff[1];
for (i = nrects; i--; rects++) {
@@ -1390,7 +1391,7 @@ int PanoramiXPolyRectangle(ClientPtr client)
rects->y -= y_off;
}
}
- }
+ }
stuff->drawable = draw->info[j].id;
stuff->gc = gc->info[j].id;
diff --git a/xc/programs/Xserver/Xext/panoramiXsrv.h b/xc/programs/Xserver/Xext/panoramiXsrv.h
index 0020cd2eb..c12986093 100644
--- a/xc/programs/Xserver/Xext/panoramiXsrv.h
+++ b/xc/programs/Xserver/Xext/panoramiXsrv.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xext/panoramiXsrv.h,v 1.4 2000/01/22 01:59:03 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/panoramiXsrv.h,v 1.5 2000/03/03 22:17:37 mvojkovi Exp $ */
#ifndef _PANORAMIXSRV_H_
#define _PANORAMIXSRV_H_
@@ -15,6 +15,8 @@ extern Bool PanoramiXCreateConnectionBlock(void);
extern PanoramiXRes * PanoramiXFindIDByScrnum(RESTYPE, XID, int);
extern PanoramiXRes * PanoramiXFindIDOnAnyScreen(RESTYPE, XID);
extern WindowPtr PanoramiXChangeWindow(int, WindowPtr);
+extern Bool XineramaRegisterConnectionBlockCallback(void (*func)(void));
+
extern RegionRec XineramaScreenRegions[MAXSCREENS];
extern unsigned long XRC_DRAWABLE;
diff --git a/xc/programs/Xserver/Xext/shape.c b/xc/programs/Xserver/Xext/shape.c
index 8012f944f..a7819c1e0 100644
--- a/xc/programs/Xserver/Xext/shape.c
+++ b/xc/programs/Xserver/Xext/shape.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xext/shape.c,v 3.10 2000/01/02 00:18:20 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/shape.c,v 3.11 2000/03/03 20:50:25 mvojkovi Exp $ */
/************************************************************
Copyright 1989, 1998 The Open Group
@@ -375,7 +375,7 @@ ProcPanoramiXShapeRectangles (client)
if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->dest, XRT_WINDOW, SecurityWriteAccess)))
- return BadRequest;
+ return BadWindow;
FOR_NSCREENS(j) {
stuff->dest = win->info[j].id;
@@ -464,15 +464,19 @@ ProcPanoramiXShapeMask (client)
if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->dest, XRT_WINDOW, SecurityWriteAccess)))
- return BadRequest;
+ return BadWindow;
- if(!(pmap = (PanoramiXRes *)SecurityLookupIDByType(
+ if(stuff->src != None) {
+ if(!(pmap = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->src, XRT_PIXMAP, SecurityReadAccess)))
- return BadRequest;
+ return BadPixmap;
+ } else
+ pmap = NULL;
FOR_NSCREENS(j) {
stuff->dest = win->info[j].id;
- stuff->src = pmap->info[j].id;
+ if(pmap)
+ stuff->src = pmap->info[j].id;
result = ProcShapeMask (client);
BREAK_IF(result != Success);
}
@@ -575,11 +579,11 @@ ProcPanoramiXShapeCombine (client)
if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->dest, XRT_WINDOW, SecurityWriteAccess)))
- return BadRequest;
+ return BadWindow;
if(!(win2 = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->src, XRT_WINDOW, SecurityReadAccess)))
- return BadRequest;
+ return BadWindow;
FOR_NSCREENS(j) {
stuff->dest = win->info[j].id;
@@ -644,7 +648,7 @@ ProcPanoramiXShapeOffset (client)
if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->dest, XRT_WINDOW, SecurityWriteAccess)))
- return BadRequest;
+ return BadWindow;
FOR_NSCREENS(j) {
stuff->dest = win->info[j].id;
@@ -1050,37 +1054,29 @@ ProcShapeDispatch (client)
if ( !noPanoramiXExtension )
return ProcPanoramiXShapeRectangles (client);
else
- return ProcShapeRectangles (client);
-#else
- return ProcShapeRectangles (client);
#endif
+ return ProcShapeRectangles (client);
case X_ShapeMask:
#ifdef PANORAMIX
if ( !noPanoramiXExtension )
return ProcPanoramiXShapeMask (client);
else
- return ProcShapeMask (client);
-#else
- return ProcShapeMask (client);
#endif
+ return ProcShapeMask (client);
case X_ShapeCombine:
#ifdef PANORAMIX
if ( !noPanoramiXExtension )
return ProcPanoramiXShapeCombine (client);
else
- return ProcShapeCombine (client);
-#else
- return ProcShapeCombine (client);
#endif
+ return ProcShapeCombine (client);
case X_ShapeOffset:
#ifdef PANORAMIX
if ( !noPanoramiXExtension )
return ProcPanoramiXShapeOffset (client);
else
- return ProcShapeOffset (client);
-#else
- return ProcShapeOffset (client);
#endif
+ return ProcShapeOffset (client);
case X_ShapeQueryExtents:
return ProcShapeQueryExtents (client);
case X_ShapeSelectInput:
diff --git a/xc/programs/Xserver/Xext/shm.c b/xc/programs/Xserver/Xext/shm.c
index b8f206bf0..8352f2ccb 100644
--- a/xc/programs/Xserver/Xext/shm.c
+++ b/xc/programs/Xserver/Xext/shm.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xext/shm.c,v 3.20 2000/01/02 00:18:21 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/shm.c,v 3.21 2000/03/05 16:59:01 dawes Exp $ */
/************************************************************
Copyright 1989, 1998 The Open Group
@@ -766,6 +766,7 @@ CreatePmap:
}
xfree(newPix);
} else {
+ shmdesc->refcnt++;
AddResource(stuff->pid, ShmPixType, shmdesc);
AddResource(stuff->pid, XRT_PIXMAP, newPix);
}
diff --git a/xc/programs/Xserver/Xext/xf86bigfont.c b/xc/programs/Xserver/Xext/xf86bigfont.c
index 5cc115fc3..4669824c9 100644
--- a/xc/programs/Xserver/Xext/xf86bigfont.c
+++ b/xc/programs/Xserver/Xext/xf86bigfont.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xext/xf86bigfont.c,v 1.4 2000/02/11 18:06:40 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/xf86bigfont.c,v 1.5 2000/02/29 03:09:07 dawes Exp $ */
/*
* BIGFONT extension for sharing font metrics between clients (if possible)
* and for transmitting font metrics to clients in a compressed form.
@@ -40,7 +40,10 @@
#ifdef CSRG_BASED
#include <sys/param.h>
#endif
-#ifdef linux
+#if defined(linux) && !defined(__GNU_LIBRARY__)
+/* Linux libc4 and libc5 only (because glibc doesn't include kernel headers):
+ Linux 2.0.x and 2.2.x define SHMLBA as PAGE_SIZE, but forget to define
+ PAGE_SIZE. It is defined in <asm/page.h>. */
#include <asm/page.h>
#endif
#ifdef SVR4
@@ -53,6 +56,8 @@
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/stat.h>
+#include <stdlib.h>
+#include <time.h>
#include <errno.h>
#endif
@@ -85,6 +90,11 @@ static unsigned char XF86BigfontReqCode;
#ifdef HAS_SHM
+/* A random signature, transmitted to the clients so they can verify that the
+ shared memory segment they are attaching to was really established by the
+ X server they are talking to. */
+static CARD32 signature;
+
/* Index for additional information stored in a FontRec's devPrivates array. */
static int FontShmdescIndex;
@@ -147,7 +157,14 @@ XFree86BigfontExtensionInit()
return;
}
#endif
+
+ srand((unsigned int) time(NULL));
+ signature = ((unsigned int) (65536.0/(RAND_MAX+1.0) * rand()) << 16)
+ + (unsigned int) (65536.0/(RAND_MAX+1.0) * rand());
+ /* fprintf(stderr, "signature = 0x%08X\n", signature); */
+
FontShmdescIndex = AllocateFontPrivateIndex();
+
pagesize = SHMLBA;
#endif
}
@@ -301,7 +318,14 @@ ProcXF86BigfontQueryVersion(
reply.minorVersion = XF86BIGFONT_MINOR_VERSION;
reply.uid = geteuid();
reply.gid = getegid();
- reply.capabilities = 0; /* may add some bits here in future versions */
+ reply.signature = signature;
+ reply.capabilities =
+#ifdef HAS_SHM
+ (LocalClient(client) && !client->swapped ? XF86Bigfont_CAP_LocalShm : 0)
+#else
+ 0
+#endif
+ ; /* may add more bits here in future versions */
if (client->swapped) {
char tmp;
swaps(&reply.sequenceNumber, tmp);
@@ -310,6 +334,7 @@ ProcXF86BigfontQueryVersion(
swaps(&reply.minorVersion, tmp);
swapl(&reply.uid, tmp);
swapl(&reply.gid, tmp);
+ swapl(&reply.signature, tmp);
}
WriteToClient(client,
sizeof(xXF86BigfontQueryVersionReply), (char *)&reply);
@@ -343,6 +368,7 @@ ProcXF86BigfontQueryFont(
{
FontPtr pFont;
REQUEST(xXF86BigfontQueryFontReq);
+ CARD32 stuff_flags;
xCharInfo* pmax;
xCharInfo* pmin;
int nCharInfos;
@@ -357,7 +383,20 @@ ProcXF86BigfontQueryFont(
CARD16* pUniqIndex2Index;
CARD32 nUniqCharInfos;
+#if 0
REQUEST_SIZE_MATCH(xXF86BigfontQueryFontReq);
+#else
+ switch (client->req_len) {
+ case 2: /* client with version 1.0 libX11 */
+ stuff_flags = (LocalClient(client) && !client->swapped ? XF86Bigfont_FLAGS_Shm : 0);
+ break;
+ case 3: /* client with version 1.1 libX11 */
+ stuff_flags = stuff->flags;
+ break;
+ default:
+ return BadLength;
+ }
+#endif
client->errorValue = stuff->id; /* EITHER font or gc */
pFont = (FontPtr)SecurityLookupIDByType(client, stuff->id, RT_FONT,
SecurityReadAccess);
@@ -392,11 +431,12 @@ ProcXF86BigfontQueryFont(
pDesc = (ShmDescPtr) FontGetPrivate(pFont, FontShmdescIndex);
if (pDesc) {
pCI = (xCharInfo *) pDesc->attach_addr;
- if (LocalClient(client) && !client->swapped)
+ if (stuff_flags & XF86Bigfont_FLAGS_Shm)
shmid = pDesc->shmid;
} else {
- if (LocalClient(client) && !client->swapped)
- pDesc = shmalloc(nCharInfos * sizeof(xCharInfo));
+ if (stuff_flags & XF86Bigfont_FLAGS_Shm)
+ pDesc = shmalloc(nCharInfos * sizeof(xCharInfo)
+ + sizeof(CARD32));
if (pDesc) {
pCI = (xCharInfo *) pDesc->attach_addr;
shmid = pDesc->shmid;
@@ -440,6 +480,7 @@ ProcXF86BigfontQueryFont(
}
#ifdef HAS_SHM
if (pDesc) {
+ *(CARD32 *)(pCI + nCharInfos) = signature;
if (!FontSetPrivate(pFont, FontShmdescIndex, pDesc)) {
shmdealloc(pDesc);
return BadAlloc;
diff --git a/xc/programs/Xserver/fb/Imakefile b/xc/programs/Xserver/fb/Imakefile
index 272dfdb22..7b6a8f2a2 100644
--- a/xc/programs/Xserver/fb/Imakefile
+++ b/xc/programs/Xserver/fb/Imakefile
@@ -1,7 +1,7 @@
-XCOMM $XFree86: xc/programs/Xserver/fb/Imakefile,v 1.3 2000/02/14 19:20:26 dawes Exp $
+XCOMM $XFree86: xc/programs/Xserver/fb/Imakefile,v 1.4 2000/02/23 20:29:40 dawes Exp $
XCOMM
XCOMM
-XCOMM $Id: Imakefile,v 1.1.1.2 2000/02/22 15:42:19 kem Exp $
+XCOMM Id: Imakefile,v 1.1 1999/11/02 03:54:44 keithp Exp $
#define IHaveModule
#include <Server.tmpl>
diff --git a/xc/programs/Xserver/fb/fb.h b/xc/programs/Xserver/fb/fb.h
index d13b299d0..4a508f0ab 100644
--- a/xc/programs/Xserver/fb/fb.h
+++ b/xc/programs/Xserver/fb/fb.h
@@ -1,5 +1,5 @@
/*
- * $Id: fb.h,v 1.1.1.2 2000/02/22 15:42:19 kem Exp $
+ * Id: fb.h,v 1.1 1999/11/02 03:54:45 keithp Exp $
*
* Copyright © 1998 Keith Packard
*
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fb.h,v 1.11 2000/02/18 16:23:12 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/fb/fb.h,v 1.13 2000/03/01 00:25:14 dawes Exp $ */
#ifndef _FB_H_
#define _FB_H_
@@ -1358,6 +1358,12 @@ fbZeroLine (DrawablePtr pDrawable,
DDXPointPtr ppt);
void
+fbZeroSegment (DrawablePtr pDrawable,
+ GCPtr pGC,
+ int nseg,
+ xSegment *pSegs);
+
+void
fbPolyLine (DrawablePtr pDrawable,
GCPtr pGC,
int mode,
diff --git a/xc/programs/Xserver/fb/fballpriv.c b/xc/programs/Xserver/fb/fballpriv.c
index 97f649158..e1ae7b663 100644
--- a/xc/programs/Xserver/fb/fballpriv.c
+++ b/xc/programs/Xserver/fb/fballpriv.c
@@ -1,5 +1,5 @@
/*
- * $Id: fballpriv.c,v 1.1.1.1 2000/01/06 12:56:51 faith Exp $
+ * Id: fballpriv.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
*
* Copyright © 1998 Keith Packard
*
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fballpriv.c,v 1.2 1999/12/30 02:33:58 robin Exp $ */
+/* $XFree86: xc/programs/Xserver/fb/fballpriv.c,v 1.3 2000/02/23 20:29:41 dawes Exp $ */
#include "fb.h"
diff --git a/xc/programs/Xserver/fb/fbarc.c b/xc/programs/Xserver/fb/fbarc.c
index 056d63cdd..1ceebbf0f 100644
--- a/xc/programs/Xserver/fb/fbarc.c
+++ b/xc/programs/Xserver/fb/fbarc.c
@@ -1,5 +1,5 @@
/*
- * $Id: fbarc.c,v 1.1.1.2 2000/02/22 15:42:19 kem Exp $
+ * Id: fbarc.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
*
* Copyright © 1998 Keith Packard
*
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fbarc.c,v 1.2 2000/02/14 19:20:26 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/fb/fbarc.c,v 1.3 2000/02/23 20:29:41 dawes Exp $ */
#include "fb.h"
#include "mizerarc.h"
diff --git a/xc/programs/Xserver/fb/fbbits.c b/xc/programs/Xserver/fb/fbbits.c
index 37429630b..b1c123d21 100644
--- a/xc/programs/Xserver/fb/fbbits.c
+++ b/xc/programs/Xserver/fb/fbbits.c
@@ -1,5 +1,5 @@
/*
- * $Id: fbbits.c,v 1.1.1.2 2000/02/22 15:42:19 kem Exp $
+ * Id: fbbits.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
*
* Copyright © 1998 Keith Packard
*
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fbbits.c,v 1.5 2000/02/17 14:16:22 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/fb/fbbits.c,v 1.6 2000/02/23 20:29:41 dawes Exp $ */
#include "fb.h"
#include "miline.h"
diff --git a/xc/programs/Xserver/fb/fbbits.h b/xc/programs/Xserver/fb/fbbits.h
index 58fd3fd20..368989d98 100644
--- a/xc/programs/Xserver/fb/fbbits.h
+++ b/xc/programs/Xserver/fb/fbbits.h
@@ -1,5 +1,5 @@
/*
- * $Id: fbbits.h,v 1.1.1.2 2000/02/22 15:42:19 kem Exp $
+ * Id: fbbits.h,v 1.1 1999/11/02 03:54:45 keithp Exp $
*
* Copyright © 1998 Keith Packard
*
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fbbits.h,v 1.6 2000/02/14 19:20:27 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/fb/fbbits.h,v 1.8 2000/03/01 00:25:14 dawes Exp $ */
/*
* This file defines functions for drawing some primitives using
@@ -140,9 +140,8 @@ BRESDASH (DrawablePtr pDrawable,
UNIT *bits;
FbStride bitsStride;
FbStride majorStep, minorStep;
- BITS xor = (BITS) pPriv->xor;
- BITS bgxor = (BITS) pPriv->bgxor;
- unsigned char *dash, *lastDash;
+ BITS xorfg, xorbg;
+ unsigned char *dash, *lastDash, *firstDash;
int dashlen;
Bool even;
Bool doOdd;
@@ -150,17 +149,19 @@ BRESDASH (DrawablePtr pDrawable,
fbGetDrawable (pDrawable, dst, dstStride, dstBpp);
doOdd = pGC->lineStyle == LineDoubleDash;
even = TRUE;
- dash = pGC->dash;
- lastDash = dash + pGC->numInDashList;
- dashOffset %= pPriv->dashLength;
- while (dashOffset >= *dash)
+ xorfg = (BITS) pPriv->xor;
+ xorbg = (BITS) pPriv->bgxor;
+ firstDash = pGC->dash;
+ lastDash = firstDash + pGC->numInDashList;
+ dash = firstDash;
+ while (dashOffset >= (dashlen = *dash++))
{
- dashOffset -= *dash++;
+ dashOffset -= dashlen;
if (dash == lastDash)
- dash = pGC->dash;
- even = !even;
+ dash = firstDash;
+ even ^= 1;
}
- dashlen = *dash - dashOffset;
+ dashlen -= dashOffset;
bits = ((UNIT *) (dst + (y1 * dstStride))) + x1 * MUL;
bitsStride = dstStride * (sizeof (FbBits) / sizeof (UNIT));
if (signdy < 0)
@@ -175,25 +176,92 @@ BRESDASH (DrawablePtr pDrawable,
majorStep = bitsStride;
minorStep = signdx * MUL;
}
- while (len--)
+ if (dashlen >= len)
+ dashlen = len;
+ if (doOdd)
{
- if (even)
- STORE(bits,xor);
- else if (doOdd)
- STORE(bits,bgxor);
- bits += majorStep;
- e += e1;
- if (e >= 0)
+ if (!even)
+ goto doubleOdd;
+ for (;;)
{
- bits += minorStep;
- e += e3;
+ len -= dashlen;
+ while (dashlen--)
+ {
+ STORE(bits,xorfg);
+ bits += majorStep;
+ if ((e += e1) >= 0)
+ {
+ e += e3;
+ bits += minorStep;
+ }
+ }
+ if (!len)
+ break;
+ dashlen = *dash++;
+ if (dash == lastDash)
+ dash = firstDash;
+ if (dashlen >= len)
+ dashlen = len;
+doubleOdd:
+ len -= dashlen;
+ while (dashlen--)
+ {
+ STORE(bits,xorbg);
+ bits += majorStep;
+ if ((e += e1) >= 0)
+ {
+ e += e3;
+ bits += minorStep;
+ }
+ }
+ if (!len)
+ break;
+ dashlen = *dash++;
+ /* numInDashList is even, no need to check here */
+ if (dashlen >= len)
+ dashlen = len;
}
- if (!--dashlen)
+ }
+ else
+ {
+ if (!even)
+ goto onOffOdd;
+ for (;;)
{
- if (++dash == lastDash)
- dash = pGC->dash;
- dashlen = *dash;
- even = !even;
+ len -= dashlen;
+ while (dashlen--)
+ {
+ STORE(bits,xorfg);
+ bits += majorStep;
+ if ((e += e1) >= 0)
+ {
+ e += e3;
+ bits += minorStep;
+ }
+ }
+ if (!len)
+ break;
+ dashlen = *dash++;
+ if (dash == lastDash)
+ dash = firstDash;
+ if (dashlen >= len)
+ dashlen = len;
+onOffOdd:
+ len -= dashlen;
+ while (dashlen--)
+ {
+ bits += majorStep;
+ if ((e += e1) >= 0)
+ {
+ e += e3;
+ bits += minorStep;
+ }
+ }
+ if (!len)
+ break;
+ dashlen = *dash++;
+ if (dashlen >= len)
+ dashlen = len;
}
}
}
@@ -215,7 +283,8 @@ DOTS (FbBits *dst,
INT32 *pts = (INT32 *) ptsOrig;
UNIT *bits = (UNIT *) dst;
UNIT *point;
- BITS fg = (BITS) xor;
+ BITS bxor = (BITS) xor;
+ BITS band = (BITS) and;
FbStride bitsStride = dstStride * (sizeof (FbBits) / sizeof (UNIT));
INT32 ul, lr;
INT32 off;
@@ -228,13 +297,28 @@ DOTS (FbBits *dst,
bits += bitsStride * yoff + xoff * MUL;
- while (npt--)
+ if (and == 0)
+ {
+ while (npt--)
+ {
+ pt = *pts++;
+ if (!isClipped(pt,ul,lr))
+ {
+ point = bits + intToY(pt) * bitsStride + intToX(pt) * MUL;
+ STORE(point,bxor);
+ }
+ }
+ }
+ else
{
- pt = *pts++;
- if (!isClipped(pt,ul,lr))
+ while (npt--)
{
- point = bits + intToY(pt) * bitsStride + intToX(pt) * MUL;
- STORE(point,fg);
+ pt = *pts++;
+ if (!isClipped(pt,ul,lr))
+ {
+ point = bits + intToY(pt) * bitsStride + intToX(pt) * MUL;
+ RROP(point,band,bxor);
+ }
}
}
}
@@ -282,10 +366,20 @@ ARC (FbBits *dst,
if (!(arc->width & 1))
{
- if (mask & 2)
- ARCRROP(yorgp + info.xorgo);
- if (mask & 8)
- ARCRROP(yorgop + info.xorgo);
+ if (andBits == 0)
+ {
+ if (mask & 2)
+ ARCCOPY(yorgp + info.xorgo);
+ if (mask & 8)
+ ARCCOPY(yorgop + info.xorgo);
+ }
+ else
+ {
+ if (mask & 2)
+ ARCRROP(yorgp + info.xorgo);
+ if (mask & 8)
+ ARCRROP(yorgop + info.xorgo);
+ }
}
if (!info.end.x || !info.end.y)
{
@@ -405,16 +499,33 @@ ARC (FbBits *dst,
}
if ((x == info.start.x) || (y == info.start.y))
mask = info.start.mask;
- if (mask & 1)
- ARCRROP(yorgp + yoffset + info.xorg + x * MUL);
- if (mask & 4)
- ARCRROP(yorgop - yoffset + info.xorgo - x * MUL);
- if (arc->height & 1)
+ if (andBits == 0)
{
- if (mask & 2)
- ARCRROP(yorgp + yoffset + info.xorgo - x * MUL);
- if (mask & 8)
- ARCRROP(yorgop - yoffset + info.xorg + x * MUL);
+ if (mask & 1)
+ ARCCOPY(yorgp + yoffset + info.xorg + x * MUL);
+ if (mask & 4)
+ ARCCOPY(yorgop - yoffset + info.xorgo - x * MUL);
+ if (arc->height & 1)
+ {
+ if (mask & 2)
+ ARCCOPY(yorgp + yoffset + info.xorgo - x * MUL);
+ if (mask & 8)
+ ARCCOPY(yorgop - yoffset + info.xorg + x * MUL);
+ }
+ }
+ else
+ {
+ if (mask & 1)
+ ARCRROP(yorgp + yoffset + info.xorg + x * MUL);
+ if (mask & 4)
+ ARCRROP(yorgop - yoffset + info.xorgo - x * MUL);
+ if (arc->height & 1)
+ {
+ if (mask & 2)
+ ARCRROP(yorgp + yoffset + info.xorgo - x * MUL);
+ if (mask & 8)
+ ARCRROP(yorgop - yoffset + info.xorg + x * MUL);
+ }
}
}
#undef ARCCOPY
diff --git a/xc/programs/Xserver/fb/fbblt.c b/xc/programs/Xserver/fb/fbblt.c
index 39a80744c..2fbe0773c 100644
--- a/xc/programs/Xserver/fb/fbblt.c
+++ b/xc/programs/Xserver/fb/fbblt.c
@@ -1,5 +1,5 @@
/*
- * $Id: fbblt.c,v 1.1.1.2 2000/02/22 15:42:19 kem Exp $
+ * Id: fbblt.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
*
* Copyright © 1998 Keith Packard
*
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fbblt.c,v 1.5 2000/02/14 19:20:27 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/fb/fbblt.c,v 1.6 2000/02/23 20:29:42 dawes Exp $ */
#include "fb.h"
diff --git a/xc/programs/Xserver/fb/fbbltone.c b/xc/programs/Xserver/fb/fbbltone.c
index a6bf8a31e..169aec4cc 100644
--- a/xc/programs/Xserver/fb/fbbltone.c
+++ b/xc/programs/Xserver/fb/fbbltone.c
@@ -1,5 +1,5 @@
/*
- * $Id: fbbltone.c,v 1.1.1.2 2000/02/22 15:42:19 kem Exp $
+ * Id: fbbltone.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
*
* Copyright © 1998 Keith Packard
*
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fbbltone.c,v 1.6 2000/02/14 19:20:27 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/fb/fbbltone.c,v 1.7 2000/02/23 20:29:42 dawes Exp $ */
#include "fb.h"
diff --git a/xc/programs/Xserver/fb/fbbstore.c b/xc/programs/Xserver/fb/fbbstore.c
index 065bc6559..07a6400a8 100644
--- a/xc/programs/Xserver/fb/fbbstore.c
+++ b/xc/programs/Xserver/fb/fbbstore.c
@@ -1,5 +1,5 @@
/*
- * $Id: fbbstore.c,v 1.1.1.1 2000/01/06 12:56:52 faith Exp $
+ * Id: fbbstore.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
*
* Copyright © 1998 Keith Packard
*
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fbbstore.c,v 1.1 1999/11/19 13:53:42 hohndel Exp $ */
+/* $XFree86: xc/programs/Xserver/fb/fbbstore.c,v 1.2 2000/02/23 20:29:42 dawes Exp $ */
#include "fb.h"
diff --git a/xc/programs/Xserver/fb/fbcopy.c b/xc/programs/Xserver/fb/fbcopy.c
index 2028ea698..9a34455fb 100644
--- a/xc/programs/Xserver/fb/fbcopy.c
+++ b/xc/programs/Xserver/fb/fbcopy.c
@@ -1,5 +1,5 @@
/*
- * $Id: fbcopy.c,v 1.1.1.2 2000/02/22 15:42:20 kem Exp $
+ * Id: fbcopy.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
*
* Copyright © 1998 Keith Packard
*
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fbcopy.c,v 1.3 2000/02/14 19:20:28 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/fb/fbcopy.c,v 1.4 2000/02/23 20:29:43 dawes Exp $ */
#include "fb.h"
diff --git a/xc/programs/Xserver/fb/fbfill.c b/xc/programs/Xserver/fb/fbfill.c
index 7fd5cc5e7..51d5f654e 100644
--- a/xc/programs/Xserver/fb/fbfill.c
+++ b/xc/programs/Xserver/fb/fbfill.c
@@ -1,5 +1,5 @@
/*
- * $Id: fbfill.c,v 1.1.1.2 2000/02/22 15:42:20 kem Exp $
+ * Id: fbfill.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
*
* Copyright © 1998 Keith Packard
*
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fbfill.c,v 1.2 2000/01/21 15:06:16 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/fb/fbfill.c,v 1.3 2000/02/23 20:29:43 dawes Exp $ */
#include "fb.h"
diff --git a/xc/programs/Xserver/fb/fbfillrect.c b/xc/programs/Xserver/fb/fbfillrect.c
index 702299858..d0468e041 100644
--- a/xc/programs/Xserver/fb/fbfillrect.c
+++ b/xc/programs/Xserver/fb/fbfillrect.c
@@ -1,5 +1,5 @@
/*
- * $Id: fbfillrect.c,v 1.1.1.1 2000/01/06 12:56:53 faith Exp $
+ * Id: fbfillrect.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
*
* Copyright © 1998 Keith Packard
*
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fbfillrect.c,v 1.1 1999/11/19 13:53:43 hohndel Exp $ */
+/* $XFree86: xc/programs/Xserver/fb/fbfillrect.c,v 1.2 2000/02/23 20:29:43 dawes Exp $ */
#include "fb.h"
diff --git a/xc/programs/Xserver/fb/fbfillsp.c b/xc/programs/Xserver/fb/fbfillsp.c
index 3a7321960..29c3a36b0 100644
--- a/xc/programs/Xserver/fb/fbfillsp.c
+++ b/xc/programs/Xserver/fb/fbfillsp.c
@@ -1,5 +1,5 @@
/*
- * $Id: fbfillsp.c,v 1.1.1.1 2000/01/06 12:56:53 faith Exp $
+ * Id: fbfillsp.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
*
* Copyright © 1998 Keith Packard
*
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fbfillsp.c,v 1.1 1999/11/19 13:53:43 hohndel Exp $ */
+/* $XFree86: xc/programs/Xserver/fb/fbfillsp.c,v 1.2 2000/02/23 20:29:43 dawes Exp $ */
#include "fb.h"
diff --git a/xc/programs/Xserver/fb/fbgc.c b/xc/programs/Xserver/fb/fbgc.c
index d4251ab6b..7cd14833b 100644
--- a/xc/programs/Xserver/fb/fbgc.c
+++ b/xc/programs/Xserver/fb/fbgc.c
@@ -1,5 +1,5 @@
/*
- * $Id: fbgc.c,v 1.1.1.2 2000/02/22 15:42:20 kem Exp $
+ * Id: fbgc.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
*
* Copyright © 1998 Keith Packard
*
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fbgc.c,v 1.5 2000/02/14 19:20:28 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/fb/fbgc.c,v 1.6 2000/02/23 20:29:44 dawes Exp $ */
#include "fb.h"
diff --git a/xc/programs/Xserver/fb/fbgetsp.c b/xc/programs/Xserver/fb/fbgetsp.c
index 5520ded14..80299d3ab 100644
--- a/xc/programs/Xserver/fb/fbgetsp.c
+++ b/xc/programs/Xserver/fb/fbgetsp.c
@@ -1,5 +1,5 @@
/*
- * $Id: fbgetsp.c,v 1.1.1.2 2000/02/22 15:42:20 kem Exp $
+ * Id: fbgetsp.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
*
* Copyright © 1998 Keith Packard
*
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fbgetsp.c,v 1.3 2000/02/14 19:20:29 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/fb/fbgetsp.c,v 1.4 2000/02/23 20:29:44 dawes Exp $ */
#include "fb.h"
diff --git a/xc/programs/Xserver/fb/fbglyph.c b/xc/programs/Xserver/fb/fbglyph.c
index 3851f5eac..842ee8fcf 100644
--- a/xc/programs/Xserver/fb/fbglyph.c
+++ b/xc/programs/Xserver/fb/fbglyph.c
@@ -1,5 +1,5 @@
/*
- * $Id: fbglyph.c,v 1.1.1.2 2000/02/22 15:42:20 kem Exp $
+ * Id: fbglyph.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
*
* Copyright © 1998 Keith Packard
*
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fbglyph.c,v 1.6 2000/02/18 16:23:13 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/fb/fbglyph.c,v 1.7 2000/02/23 20:29:44 dawes Exp $ */
#include "fb.h"
#include "fontstruct.h"
diff --git a/xc/programs/Xserver/fb/fbimage.c b/xc/programs/Xserver/fb/fbimage.c
index fcffc7584..d9a467f38 100644
--- a/xc/programs/Xserver/fb/fbimage.c
+++ b/xc/programs/Xserver/fb/fbimage.c
@@ -1,5 +1,5 @@
/*
- * $Id: fbimage.c,v 1.1.1.2 2000/02/22 15:42:20 kem Exp $
+ * Id: fbimage.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
*
* Copyright © 1998 Keith Packard
*
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fbimage.c,v 1.4 2000/02/14 19:20:29 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/fb/fbimage.c,v 1.5 2000/02/23 20:29:45 dawes Exp $ */
#include "fb.h"
#ifdef XFree86LOADER
diff --git a/xc/programs/Xserver/fb/fbline.c b/xc/programs/Xserver/fb/fbline.c
index a260425cf..999755d73 100644
--- a/xc/programs/Xserver/fb/fbline.c
+++ b/xc/programs/Xserver/fb/fbline.c
@@ -1,5 +1,5 @@
/*
- * $Id: fbline.c,v 1.1.1.2 2000/02/22 15:42:20 kem Exp $
+ * Id: fbline.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
*
* Copyright © 1998 Keith Packard
*
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fbline.c,v 1.3 2000/02/14 19:20:29 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/fb/fbline.c,v 1.6 2000/03/07 01:37:33 dawes Exp $ */
#include "fb.h"
@@ -68,6 +68,30 @@ fbZeroLine (DrawablePtr pDrawable,
}
void
+fbZeroSegment (DrawablePtr pDrawable,
+ GCPtr pGC,
+ int nseg,
+ xSegment *pSegs)
+{
+ int dashOffset;
+ int x, y;
+ Bool drawLast = pGC->capStyle != CapNotLast;
+
+ x = pDrawable->x;
+ y = pDrawable->y;
+ while (nseg--)
+ {
+ dashOffset = 0;
+ fbSegment (pDrawable, pGC,
+ pSegs->x1 + x, pSegs->y1 + y,
+ pSegs->x2 + x, pSegs->y2 + y,
+ drawLast,
+ &dashOffset);
+ pSegs++;
+ }
+}
+
+void
fbFixCoordModePrevious (int npt,
DDXPointPtr ppt)
{
@@ -130,22 +154,28 @@ fbPolySegment (DrawablePtr pDrawable,
{
void (*seg) (DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment *pseg);
- seg = miPolySegment;
-#ifndef FBNOPIXADDR
- if (pGC->lineWidth == 0 &&
- pGC->fillStyle == FillSolid &&
- pGC->lineStyle == LineSolid &&
- REGION_NUM_RECTS (fbGetCompositeClip(pGC)) == 1)
+ if (pGC->lineWidth == 0)
{
- switch (pDrawable->bitsPerPixel) {
- case 8: seg = fbPolySegment8; break;
- case 16: seg = fbPolySegment16; break;
+ seg = fbZeroSegment;
+#ifndef FBNOPIXADDR
+ if (pGC->fillStyle == FillSolid &&
+ pGC->lineStyle == LineSolid &&
+ REGION_NUM_RECTS (fbGetCompositeClip(pGC)) == 1)
+ {
+ switch (pDrawable->bitsPerPixel) {
+ case 8: seg = fbPolySegment8; break;
+ case 16: seg = fbPolySegment16; break;
#ifdef FB_24BIT
- case 24: seg = fbPolySegment24; break;
+ case 24: seg = fbPolySegment24; break;
#endif
- case 32: seg = fbPolySegment32; break;
+ case 32: seg = fbPolySegment32; break;
+ }
}
- }
#endif
+ }
+ else
+ {
+ seg = miPolySegment;
+ }
(*seg) (pDrawable, pGC, nseg, pseg);
}
diff --git a/xc/programs/Xserver/fb/fbpixmap.c b/xc/programs/Xserver/fb/fbpixmap.c
index 3a892d8b6..eb2fe6949 100644
--- a/xc/programs/Xserver/fb/fbpixmap.c
+++ b/xc/programs/Xserver/fb/fbpixmap.c
@@ -1,5 +1,5 @@
/*
- * $Id: fbpixmap.c,v 1.1.1.1 2000/01/06 12:56:53 faith Exp $
+ * Id: fbpixmap.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
*
* Copyright © 1998 Keith Packard
*
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fbpixmap.c,v 1.2 1999/12/27 01:26:21 robin Exp $ */
+/* $XFree86: xc/programs/Xserver/fb/fbpixmap.c,v 1.3 2000/02/23 20:29:45 dawes Exp $ */
#include "fb.h"
diff --git a/xc/programs/Xserver/fb/fbpoint.c b/xc/programs/Xserver/fb/fbpoint.c
index 421d9cd8f..537c95b2b 100644
--- a/xc/programs/Xserver/fb/fbpoint.c
+++ b/xc/programs/Xserver/fb/fbpoint.c
@@ -1,5 +1,5 @@
/*
- * $Id: fbpoint.c,v 1.1.1.2 2000/02/22 15:42:20 kem Exp $
+ * Id: fbpoint.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
*
* Copyright © 1998 Keith Packard
*
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fbpoint.c,v 1.4 2000/02/14 19:20:30 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/fb/fbpoint.c,v 1.6 2000/03/01 00:25:15 dawes Exp $ */
#include "fb.h"
@@ -139,16 +139,13 @@ fbPolyPoint (DrawablePtr pDrawable,
xor = pPriv->xor;
dots = fbDots;
#ifndef FBNOPIXADDR
- if (and == 0)
- {
- switch (dstBpp) {
- case 8: dots = fbDots8; break;
- case 16: dots = fbDots16; break;
+ switch (dstBpp) {
+ case 8: dots = fbDots8; break;
+ case 16: dots = fbDots16; break;
#ifdef FB_24BIT
- case 24: dots = fbDots24; break;
+ case 24: dots = fbDots24; break;
#endif
- case 32: dots = fbDots32; break;
- }
+ case 32: dots = fbDots32; break;
}
#endif
for (nBox = REGION_NUM_RECTS (pClip), pBox = REGION_RECTS (pClip);
diff --git a/xc/programs/Xserver/fb/fbpush.c b/xc/programs/Xserver/fb/fbpush.c
index f187c1b1a..8c3f7f7ea 100644
--- a/xc/programs/Xserver/fb/fbpush.c
+++ b/xc/programs/Xserver/fb/fbpush.c
@@ -1,5 +1,5 @@
/*
- * $Id: fbpush.c,v 1.1.1.2 2000/02/22 15:42:20 kem Exp $
+ * Id: fbpush.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
*
* Copyright © 1998 Keith Packard
*
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fbpush.c,v 1.3 2000/02/14 19:20:30 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/fb/fbpush.c,v 1.4 2000/02/23 20:29:46 dawes Exp $ */
#include "fb.h"
diff --git a/xc/programs/Xserver/fb/fbrop.h b/xc/programs/Xserver/fb/fbrop.h
index 574f837d5..9481be680 100644
--- a/xc/programs/Xserver/fb/fbrop.h
+++ b/xc/programs/Xserver/fb/fbrop.h
@@ -1,5 +1,5 @@
/*
- * $Id: fbrop.h,v 1.1.1.2 2000/02/22 15:42:20 kem Exp $
+ * Id: fbrop.h,v 1.1 1999/11/02 03:54:45 keithp Exp $
*
* Copyright © 1998 Keith Packard
*
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fbrop.h,v 1.3 2000/02/14 19:20:30 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/fb/fbrop.h,v 1.4 2000/02/23 20:29:46 dawes Exp $ */
#ifndef _FBROP_H_
#define _FBROP_H_
diff --git a/xc/programs/Xserver/fb/fbscreen.c b/xc/programs/Xserver/fb/fbscreen.c
index 69cdc8341..90e812e1e 100644
--- a/xc/programs/Xserver/fb/fbscreen.c
+++ b/xc/programs/Xserver/fb/fbscreen.c
@@ -1,5 +1,5 @@
/*
- * $Id: fbscreen.c,v 1.1.1.2 2000/02/22 15:42:20 kem Exp $
+ * Id: fbscreen.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
*
* Copyright © 1998 Keith Packard
*
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fbscreen.c,v 1.7 2000/02/14 19:20:30 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/fb/fbscreen.c,v 1.8 2000/02/23 20:29:46 dawes Exp $ */
#include "fb.h"
diff --git a/xc/programs/Xserver/fb/fbseg.c b/xc/programs/Xserver/fb/fbseg.c
index 49f3a750f..85c927d29 100644
--- a/xc/programs/Xserver/fb/fbseg.c
+++ b/xc/programs/Xserver/fb/fbseg.c
@@ -1,5 +1,5 @@
/*
- * $Id: fbseg.c,v 1.1.1.2 2000/02/22 15:42:20 kem Exp $
+ * Id: fbseg.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
*
* Copyright © 1998 Keith Packard
*
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fbseg.c,v 1.4 2000/02/14 19:20:31 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/fb/fbseg.c,v 1.5 2000/02/23 20:29:46 dawes Exp $ */
#include "fb.h"
#include "miline.h"
diff --git a/xc/programs/Xserver/fb/fbsetsp.c b/xc/programs/Xserver/fb/fbsetsp.c
index a946499be..4bddf8560 100644
--- a/xc/programs/Xserver/fb/fbsetsp.c
+++ b/xc/programs/Xserver/fb/fbsetsp.c
@@ -1,5 +1,5 @@
/*
- * $Id: fbsetsp.c,v 1.1.1.2 2000/02/22 15:42:20 kem Exp $
+ * Id: fbsetsp.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
*
* Copyright © 1998 Keith Packard
*
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fbsetsp.c,v 1.2 2000/02/14 19:20:31 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/fb/fbsetsp.c,v 1.3 2000/02/23 20:29:47 dawes Exp $ */
#include "fb.h"
diff --git a/xc/programs/Xserver/fb/fbsolid.c b/xc/programs/Xserver/fb/fbsolid.c
index 728c1851b..23897ca66 100644
--- a/xc/programs/Xserver/fb/fbsolid.c
+++ b/xc/programs/Xserver/fb/fbsolid.c
@@ -1,5 +1,5 @@
/*
- * $Id: fbsolid.c,v 1.1.1.2 2000/02/22 15:42:20 kem Exp $
+ * Id: fbsolid.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
*
* Copyright © 1998 Keith Packard
*
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fbsolid.c,v 1.5 2000/02/14 19:20:31 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/fb/fbsolid.c,v 1.6 2000/02/23 20:29:47 dawes Exp $ */
#define FbSelectPart(xor,o,t) xor
diff --git a/xc/programs/Xserver/fb/fbstipple.c b/xc/programs/Xserver/fb/fbstipple.c
index ea0546d2f..f2e7907e5 100644
--- a/xc/programs/Xserver/fb/fbstipple.c
+++ b/xc/programs/Xserver/fb/fbstipple.c
@@ -1,5 +1,5 @@
/*
- * $Id: fbstipple.c,v 1.1.1.2 2000/02/22 15:42:20 kem Exp $
+ * Id: fbstipple.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
*
* Copyright © 1998 Keith Packard
*
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fbstipple.c,v 1.5 2000/02/14 19:20:31 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/fb/fbstipple.c,v 1.6 2000/02/23 20:29:47 dawes Exp $ */
#include "fb.h"
diff --git a/xc/programs/Xserver/fb/fbtile.c b/xc/programs/Xserver/fb/fbtile.c
index 1bba5f703..ed447f8d3 100644
--- a/xc/programs/Xserver/fb/fbtile.c
+++ b/xc/programs/Xserver/fb/fbtile.c
@@ -1,5 +1,5 @@
/*
- * $Id: fbtile.c,v 1.1.1.2 2000/02/22 15:42:20 kem Exp $
+ * Id: fbtile.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
*
* Copyright © 1998 Keith Packard
*
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fbtile.c,v 1.3 2000/02/12 03:39:43 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/fb/fbtile.c,v 1.4 2000/02/23 20:29:48 dawes Exp $ */
#include "fb.h"
diff --git a/xc/programs/Xserver/fb/fbutil.c b/xc/programs/Xserver/fb/fbutil.c
index 6ebac45a0..9515074b4 100644
--- a/xc/programs/Xserver/fb/fbutil.c
+++ b/xc/programs/Xserver/fb/fbutil.c
@@ -1,5 +1,5 @@
/*
- * $Id: fbutil.c,v 1.1.1.2 2000/02/22 15:42:20 kem Exp $
+ * Id: fbutil.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
*
* Copyright © 1998 Keith Packard
*
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fbutil.c,v 1.3 2000/02/14 19:20:32 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/fb/fbutil.c,v 1.4 2000/02/23 20:29:48 dawes Exp $ */
#include "fb.h"
diff --git a/xc/programs/Xserver/fb/fbwindow.c b/xc/programs/Xserver/fb/fbwindow.c
index 96c8ed956..79090a55d 100644
--- a/xc/programs/Xserver/fb/fbwindow.c
+++ b/xc/programs/Xserver/fb/fbwindow.c
@@ -1,5 +1,5 @@
/*
- * $Id: fbwindow.c,v 1.1.1.2 2000/02/22 15:42:20 kem Exp $
+ * Id: fbwindow.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
*
* Copyright © 1998 Keith Packard
*
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fbwindow.c,v 1.2 2000/02/14 19:20:32 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/fb/fbwindow.c,v 1.3 2000/02/23 20:29:48 dawes Exp $ */
#include "fb.h"